chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:17:40 +08:00
commit f1825c8ceb
10096 changed files with 2364182 additions and 0 deletions
+160
View File
@@ -0,0 +1,160 @@
# See https://help.github.com/articles/about-codeowners/
# for more info about CODEOWNERS file
# It uses the same pattern rule for gitignore file,
# see https://git-scm.com/docs/gitignore#_pattern_format.
# ==== Documentation ====
# Authors responsible for documentation infrastructure and layout.
# ray-ci co-owns doc CI/build config; ray-docs-reviewers is a silent fallback
# (notifications disabled) so docs leads can unblock docs-required reviews.
/doc/ @ray-project/ray-docs @ray-project/ray-ci @ray-project/ray-docs-reviewers
# ==== Ray core ====
# All C++ code.
/src/ @ray-project/ray-core
# Python worker.
/python/ray/ @ray-project/ray-core
# Java worker.
/java/ @kfstorm @raulchen @WangTaoTheTonic @SongGuyang @ray-project/ray-core
# C++ worker
/cpp/ @SongGuyang @raulchen @kfstorm @ray-project/ray-core
/doc/source/cluster/ @ray-project/ray-core @ray-project/ray-docs
/doc/source/ray-core/ @ray-project/ray-core @ray-project/ray-docs
/doc/source/cluster/kubernetes/ @andrewsykim @ray-project/ray-core @ray-project/ray-docs
# Public protobuf files.
/src/ray/protobuf/public/ @edoakes @dayshah @MengjinYan
# Azure autoscaler
/python/ray/autoscaler/azure/ @ray-project/ray-core @marosset @jackfrancis @alimaazamat
/python/ray/autoscaler/_private/_azure/ @ray-project/ray-core @marosset @jackfrancis @alimaazamat
# ==== Libraries and frameworks ====
# Dependencies
/python/setup.py @richardliaw @edoakes @ray-project/ray-ci
# Common directory shared by core and the libraries.
# Stricter enforcement because this defines the public boundary supported by core.
/python/ray/_common/ @edoakes @dayshah @MengjinYan
# Ray data.
/python/ray/data/ @ray-project/ray-data
/doc/source/data/ @ray-project/ray-data @ray-project/ray-docs
/python/ray/dashboard/modules/data/ @ray-project/ray-data
/python/ray/dashboard/modules/metrics/dashboards/data_dashboard_panels.py @ray-project/ray-data
# RLlib.
/rllib/ @ray-project/ray-rllib
/doc/source/rllib/ @ray-project/ray-rllib @ray-project/ray-docs
# Ray Tune
/python/ray/tune/ @ray-project/ray-tune
/doc/source/tune/ @ray-project/ray-tune @ray-project/ray-docs
# Ray Train
/python/ray/train/ @ray-project/ray-train
/doc/source/train/ @ray-project/ray-train @ray-project/ray-docs
# Ray AIR
/python/ray/air/ @ray-project/ray-train
# Ray Serve
/python/ray/serve/ @ray-project/ray-serve
/java/serve/ @ray-project/ray-serve
/src/ray/protobuf/serve.proto @ray-project/ray-serve
/python/ray/dashboard/modules/serve/ @ray-project/ray-serve
/doc/source/serve/ @ray-project/ray-serve @ray-project/ray-docs
# LLM
/python/ray/llm/ @ray-project/ray-llm
/python/ray/data/llm.py @ray-project/ray-llm
/python/ray/dashboard/modules/metrics/dashboards/serve_llm_dashboard_panels.py @ray-project/ray-llm
/python/ray/dashboard/modules/metrics/dashboards/serve_llm_grafana_dashboard_base.json @ray-project/ray-llm
/python/ray/serve/llm/ @ray-project/ray-llm
/doc/source/serve/llm/ @ray-project/ray-llm @ray-project/ray-docs
/doc/source/data/working-with-llms.rst @ray-project/ray-llm @ray-project/ray-docs
/doc/source/data/doc_code/working-with-llms/ @ray-project/ray-llm @ray-project/ray-docs
# LLM dependencies
/python/requirements/llm/llm-requirements.txt @ray-project/ray-llm
/python/deplocks/llm/ @ray-project/ray-llm
# ML Docker Dependencies
/python/requirements/ml/dl-cpu-requirements.txt @richardliaw @matthewdeng
/python/requirements/ml/dl-gpu-requirements.txt @richardliaw @matthewdeng
# Ray symbol export
/src/ray/ray_version_script.lds @ray-project/ray-core
/src/ray/ray_exported_symbols.lds @ray-project/ray-core
# Ray usage stats
/python/ray/_private/usage/ @edoakes @richardliaw
/python/ray/dashboard/modules/usage_stats/ @edoakes @richardliaw
/src/ray/protobuf/usage.proto @pcmoritz @thomasdesr
# ==== Build and CI ====
# Bazel.
/BUILD.bazel @ray-project/ray-core @ray-project/ray-ci
/WORKSPACE @ray-project/ray-core @ray-project/ray-ci
/bazel/ @ray-project/ray-core @ray-project/ray-ci
# CI scripts. More specific /ci/ rules below override this catch-all.
/ci/ @ray-project/ray-core @ray-project/ray-ci
# CI
/ci/docker @ray-project/ray-ci
/ci/ray_ci @ray-project/ray-ci
/ci/ray_ci/serve_di_test_names.txt @ray-project/ray-serve
/ci/ray_ci/serve_hap_test_names.txt @ray-project/ray-serve
/.rayciversion @ray-project/ray-ci
# Buildkite pipeline management
.buildkite/hooks @ray-project/ray-ci
# Buildkite pipeline definitions and the change-detection rules that decide
# what CI runs for every PR. Editing these changes what runs for everyone.
/.buildkite/*.rayci.yml @ray-project/ray-ci
/.buildkite/test.rules.txt @ray-project/ray-ci
/.buildkite/always.rules.txt @ray-project/ray-ci
# Compiled dependency lockfile. Gates the build and test environment.
/python/requirements_compiled.txt @ray-project/ray-ci
# Read the Docs build configuration. ray-docs owns the docs build; ray-ci
# co-owns, and ray-docs-reviewers is a silent fallback for backup approval.
/.readthedocs.yaml @ray-project/ray-docs @ray-project/ray-ci @ray-project/ray-docs-reviewers
/release/ray_release @ray-project/ray-ci
/release/release_tests.yaml @ray-project/ray-ci
# Allow people to add BYOD post-installation shell scripts
# on their own.
/release/ray_release/byod/*.sh
/release/ray_release/byod/*.lock
/release/ray_release/byod/requirements_*.in
/release/ray_release/byod/requirements_*.txt
/.github/ISSUE_TEMPLATE/ @ray-project/ray-ci
/.github/workflows/ @ray-project/ray-ci
/.gemini/ @edoakes @ray-project/ray-ci
# TPU
/python/ray/util/tpu.py @andrewsykim @edoakes @ryanaoleary
/python/ray/tests/test_tpu.py @andrewsykim @edoakes @ryanaoleary
/python/ray/tests/accelerators/test_tpu.py @andrewsykim @edoakes @ryanaoleary
/python/ray/_private/accelerators/tpu.py @andrewsykim @edoakes @ryanaoleary
+62
View File
@@ -0,0 +1,62 @@
name: Bug report
title: "[<Ray component: Core|RLlib|etc...>] "
description: Problems and issues with code of Ray
labels: [bug, triage]
body:
- type: markdown
attributes:
value: |
Thank you for reporting the problem!
Please make sure what you are reporting is a bug with reproducible steps. To ask questions
or share ideas, please post on our [Discussion page](https://discuss.ray.io/) instead.
- type: textarea
attributes:
label: What happened + What you expected to happen
description: Describe 1. the bug 2. expected behavior 3. useful information (e.g., logs)
placeholder: >
Please provide the context in which the problem occurred and explain what happened. Further,
please also explain why you think the behaviour is erroneous. It is extremely helpful if you can
copy and paste the fragment of logs showing the exact error messages or wrong behaviour here.
**NOTE**: please copy and paste texts instead of taking screenshots of them for easy future search.
validations:
required: true
- type: textarea
attributes:
label: Versions / Dependencies
description: Please specify the versions of Ray, Python, OS, and other libraries that are used.
placeholder: >
Please specify the versions of dependencies.
validations:
required: true
- type: textarea
attributes:
label: Reproduction script
description: >
Please provide a reproducible script. Providing a narrow reproduction (minimal / no external dependencies) will
help us triage and address issues in the timely manner!
placeholder: >
Please provide a short code snippet (less than 50 lines if possible) that can be copy-pasted to
reproduce the issue. The snippet should have **no external library dependencies**
(i.e., use fake or mock data / environments).
**NOTE**: If the code snippet cannot be run by itself, the issue will be marked as "needs-repro-script"
until the repro instruction is updated.
validations:
required: true
- type: dropdown
attributes:
label: Issue Severity
description: |
How does this issue affect your experience as a Ray user?
multiple: false
options:
- "Low: It annoys or frustrates me."
- "Medium: It is a significant difficulty but I can work around it."
- "High: It blocks me from completing my task."
validations:
required: false
+5
View File
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Ask a question or get support
url: https://discuss.ray.io/
about: Ask a question or request support for using Ray
@@ -0,0 +1,26 @@
name: Documentation
title: "[<Ray component: Core|RLlib|etc...>] "
description: Report an issue with the Ray documentation
labels: [docs, triage]
body:
- type: markdown
attributes:
value: Thank you for helping us improve the Ray documentation!
- type: textarea
attributes:
label: Description
description: |
Tell us about the change you'd like to see. For example, "I'd like to
see more examples of how to use `ray.remote`."
validations:
required: true
- type: textarea
attributes:
label: Link
description: |
If the problem is related to an existing section, please add a link to
the section. For example, https://docs.ray.io/en/master/ray-core/package-ref.html#ray.remote.
validations:
required: false
@@ -0,0 +1,25 @@
name: Ray feature request
description: Suggest an idea for Ray project
title: "[<Ray component: Core|RLlib|etc...>] "
labels: [enhancement, triage]
body:
- type: markdown
attributes:
value: |
Thank you for finding the time to propose a new feature!
We really appreciate the community efforts to improve Ray.
- type: textarea
attributes:
label: Description
description: A short description of your feature
- type: textarea
attributes:
label: Use case
description: >
Describe the use case of your feature request. It will help us understand and
prioritize the feature request.
placeholder: >
Rather than telling us how you might implement this feature, try to take a
step back and describe what you are trying to achieve.
+15
View File
@@ -0,0 +1,15 @@
> Thank you for contributing to Ray! 🚀
> Please review the [Ray Contribution Guide](https://docs.ray.io/en/master/ray-contribute/getting-involved.html) before opening a pull request.
> ⚠️ Remove these instructions before submitting your PR.
> 💡 Tip: Mark as draft if you want early feedback, or ready for review when it's complete.
## Description
> Briefly describe what this PR accomplishes and why it's needed.
## Related issues
> Link related issues: "Fixes #1234", "Closes #1234", or "Related to #1234".
## Additional information
> Optional: Add implementation details, API changes, usage examples, screenshots, etc.
+43
View File
@@ -0,0 +1,43 @@
version: 2
updates:
# ML Requirements.
- package-ecosystem: "pip"
# If we want to add more requirements here (Core, Serve, etc.), then we should
# make additional subdirectories for each one.
directory: "/python/requirements/ml"
schedule:
# Automatic upgrade checks Saturday at 12 AM.
# Dependabot updates can still be manually triggered via Github at any time.
interval: "weekly"
day: "saturday"
# 12 AM
time: "00:00"
# Use Pacific Standard Time.
timezone: "America/Los_Angeles"
commit-message:
prefix: "[air]"
include: "scope"
# Only 5 upgrade PRs open at a time.
open-pull-requests-limit: 5
reviewers:
- "ray-project/ray-tune"
# Data Requirements.
- package-ecosystem: "pip"
directory: "/python/requirements/data_processing"
schedule:
# Automatic upgrade checks Saturday at 12 AM.
# Dependabot updates can still be manually triggered via Github at any time.
interval: "weekly"
day: "saturday"
# 12 AM
time: "00:00"
# Use Pacific Standard Time.
timezone: "America/Los_Angeles"
commit-message:
prefix: "[data]"
include: "scope"
# Only 5 upgrade PRs open at a time.
open-pull-requests-limit: 5
reviewers:
- "scv119"
- "clarkzinzow"
+136
View File
@@ -0,0 +1,136 @@
name: Notify Slack on Labeled Issue or PR
on:
issues:
types: [labeled]
pull_request:
types: [labeled]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Notify Slack Channel Based on Label
uses: actions/github-script@v7
with:
script: |
// ── Label → Slack webhook secret name mapping ──────────────────────
// Add or remove entries here as you add/remove Ray library channels.
// The key is the GitHub label name; the value is the name of the
// GitHub Actions secret that holds that channel's Incoming Webhook URL.
const LABEL_TO_SECRET = {
"serve": "SLACK_WEBHOOK_SERVE",
"train": "SLACK_WEBHOOK_TRAIN",
"tune": "SLACK_WEBHOOK_TUNE",
"rllib": "SLACK_WEBHOOK_RLLIB",
"data": "SLACK_WEBHOOK_DATA",
"air": "SLACK_WEBHOOK_AIR",
"core": "SLACK_WEBHOOK_CORE",
"workflow": "SLACK_WEBHOOK_WORKFLOW",
"cluster": "SLACK_WEBHOOK_CLUSTER",
};
// ── Resolve the webhook URLs from secrets ──────────────────────────
// We pass secrets in as env vars so the script can read them safely.
const SECRET_VALUES = {
"SLACK_WEBHOOK_SERVE": process.env.SLACK_WEBHOOK_SERVE,
"SLACK_WEBHOOK_TRAIN": process.env.SLACK_WEBHOOK_TRAIN,
"SLACK_WEBHOOK_TUNE": process.env.SLACK_WEBHOOK_TUNE,
"SLACK_WEBHOOK_RLLIB": process.env.SLACK_WEBHOOK_RLLIB,
"SLACK_WEBHOOK_DATA": process.env.SLACK_WEBHOOK_DATA,
"SLACK_WEBHOOK_AIR": process.env.SLACK_WEBHOOK_AIR,
"SLACK_WEBHOOK_CORE": process.env.SLACK_WEBHOOK_CORE,
"SLACK_WEBHOOK_WORKFLOW": process.env.SLACK_WEBHOOK_WORKFLOW,
"SLACK_WEBHOOK_CLUSTER": process.env.SLACK_WEBHOOK_CLUSTER,
};
// ── Determine event type and payload ──────────────────────────────
const isPR = !!context.payload.pull_request;
const item = isPR ? context.payload.pull_request : context.payload.issue;
const type = isPR ? "Pull Request" : "Issue";
const action = context.payload.action; // "opened" | "labeled"
const labels = (item.labels || []).map(l => l.name);
// On "labeled" events, only act on the label that was just added
// (avoids duplicate messages when multiple labels already exist).
const triggeredLabel = action === "labeled"
? context.payload.label.name
: null;
const labelsToProcess = triggeredLabel ? [triggeredLabel] : labels;
// ── Send a message for each matching label ─────────────────────────
for (const label of labelsToProcess) {
const secretName = LABEL_TO_SECRET[label];
if (!secretName) continue; // label not mapped
const webhookUrl = SECRET_VALUES[secretName];
if (!webhookUrl) {
core.warning(`Secret ${secretName} is not set — skipping #${label}`);
continue;
}
// Build a rich Slack Block Kit message
const allLabelNames = labels.map(l => `\`${l}\``).join(" ");
const body = {
blocks: [
{
type: "section",
text: {
type: "mrkdwn",
text: `*New ${type} in <https://github.com/${context.repo.owner}/${context.repo.repo}|${context.repo.owner}/${context.repo.repo}>*`
}
},
{
type: "section",
fields: [
{ type: "mrkdwn", text: `*Title*\n<${item.html_url}|${item.title}>` },
{ type: "mrkdwn", text: `*Author*\n<${item.user.html_url}|${item.user.login}>` },
{ type: "mrkdwn", text: `*Labels*\n${allLabelNames || "_none_"}` },
{ type: "mrkdwn", text: `*#*\n${item.number}` },
]
},
...(item.body ? [{
type: "section",
text: {
type: "mrkdwn",
// Truncate long bodies so the message stays readable
text: `*Description*\n${item.body.slice(0, 300)}${item.body.length > 300 ? "…" : ""}`
}
}] : []),
{
type: "actions",
elements: [
{
type: "button",
text: { type: "plain_text", text: `View ${type}` },
url: item.html_url,
style: "primary"
}
]
}
]
};
const response = await fetch(webhookUrl, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(body)
});
if (!response.ok) {
core.error(`Failed to post to Slack for label "${label}": ${response.status} ${response.statusText}`);
} else {
core.info(`Posted to Slack channel for label "${label}"`);
}
}
env:
SLACK_WEBHOOK_SERVE: ${{ secrets.SLACK_WEBHOOK_SERVE }}
SLACK_WEBHOOK_TRAIN: ${{ secrets.SLACK_WEBHOOK_TRAIN }}
SLACK_WEBHOOK_TUNE: ${{ secrets.SLACK_WEBHOOK_TUNE }}
SLACK_WEBHOOK_RLLIB: ${{ secrets.SLACK_WEBHOOK_RLLIB }}
SLACK_WEBHOOK_DATA: ${{ secrets.SLACK_WEBHOOK_DATA }}
SLACK_WEBHOOK_AIR: ${{ secrets.SLACK_WEBHOOK_AIR }}
SLACK_WEBHOOK_CORE: ${{ secrets.SLACK_WEBHOOK_CORE }}
SLACK_WEBHOOK_WORKFLOW: ${{ secrets.SLACK_WEBHOOK_WORKFLOW }}
SLACK_WEBHOOK_CLUSTER: ${{ secrets.SLACK_WEBHOOK_CLUSTER }}
+19
View File
@@ -0,0 +1,19 @@
name: Auto merge enabled
on:
pull_request_target:
types:
- auto_merge_enabled
jobs:
add-go-label:
runs-on: ubuntu-latest
steps:
- name: Add go label
uses: actions/github-script@v5
with:
script: |
github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['go']
})
@@ -0,0 +1,47 @@
name: Pull request synchronized
on:
pull_request_target:
types:
- synchronize
branches:
- "master"
- "releases/**"
jobs:
disable-automerge:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
script: |
const prQuery = `query PullRequest($owner: String!, $repo: String!, $pullRequestNumber: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pullRequestNumber) {
id
autoMergeRequest {
enabledAt
}
}
}
}`;
const prVariables = {
owner: context.repo.owner,
repo: context.repo.repo,
pullRequestNumber: context.issue.number
}
const prResult = await github.graphql(prQuery, prVariables)
if (!prResult.repository.pullRequest.autoMergeRequest) {
console.log('Auto merge is not enabled')
return
}
const automergeQuery = `mutation DisablePullRequestAutoMerge($pullRequestId: ID!) {
disablePullRequestAutoMerge(input: {pullRequestId: $pullRequestId}) {
pullRequest {
id
}
}
}`;
const automergeVariables = {
pullRequestId: prResult.repository.pullRequest.id
}
const result = await github.graphql(automergeQuery, automergeVariables)
console.log(result)
+75
View File
@@ -0,0 +1,75 @@
name: Mark and Close Stale Pull Requests
on:
schedule:
# Runs twice a day at 15 minutes past midnight and noon UTC
- cron: '15 */12 * * *'
jobs:
stale:
runs-on: ubuntu-latest
permissions:
pull-requests: write # Required to add labels, comment, close PRs.
steps:
- name: Mark and Close Stale Pull Requests
uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# --- Ignore Issues ---
# Set to -1 so we never mark issues as stale or closed.
days-before-issue-stale: -1
days-before-issue-close: -1
# --- Pull Request Specific Settings ---
# Number of days of inactivity before a Pull Request becomes stale (currently 2 weeks)
days-before-pr-stale: 14
# Number of days of inactivity after being marked stale before a Pull Request is closed (2 more weeks)
days-before-pr-close: 14
# Label to use when marking a PR as stale
stale-pr-label: 'stale'
# Comment to post when marking a PR as stale
stale-pr-message: |
This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.
You can always ask for help on our [discussion forum](https://discuss.ray.io/) or [Ray's public slack channel](https://github.com/ray-project/ray#getting-involved).
If you'd like to keep this open, just leave any comment, and the stale label will be removed.
# Comment to post when closing a stale PR
close-pr-message: |
This pull request has been automatically closed because there has been no more activity in the 14 days
since being marked stale.
Please feel free to reopen or open a new pull request if you'd still like this to be addressed.
Again, you can always ask for help on our [discussion forum](https://discuss.ray.io) or [Ray's public slack channel](https://github.com/ray-project/ray#getting-involved).
Thanks again for your contribution!
# Pull Requests with these labels will never be considered stale
exempt-pr-labels: >
weekly-release-blocker,
release-blocker,
unstale
# Set to true to ignore PRs in a milestone (defaults to false)
exempt-all-pr-milestones: true
# --- Shared Settings & Other Options ---
# Limit the number of actions per run.
operations-per-run: 500
# Remove stale label from PRs on update (default is true)
remove-pr-stale-when-updated: true
# Add unstale label. Whenever a PR is marked as 'unstale' it will not be marked stale again.
labels-to-add-when-unstale: unstale
ascending: true