ray

ray-projectApache-2.0活跃维护

分布式 AI 计算引擎,提供核心分布式运行时和一组 AI 库,用来加速机器学习负载、大模型推理与超参搜索。

Ray is an AI compute engine. Ray consists of a core distributed runtime and a set of AI Libraries for accelerating ML workloads.

ray-2.60.0发布于 2026-11-04 02:08 UTC44,248star +20 / 7 天8,263fork同步于 2026-11-10 11:19 UTC

怎么上手

由 README 提炼,执行前请确认
pip install ray
硬件要求按 README 说明

README 未说明具体硬件要求,仅称可在任意机器、集群、云厂商和 Kubernetes 上运行

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

把 Python 和 AI 应用从笔记本无缝扩展到集群的分布式计算引擎

分布式 AI 计算引擎,提供核心分布式运行时和一组 AI 库,用来加速机器学习负载、大模型推理与超参搜索。

核心能力

  • 用 Tasks、Actors、Objects 抽象分布式任务与状态
  • 提供 Data、Train、Tune、RLlib、Serve 等 AI 库
  • 同一份代码从单机扩展到集群无需改基础设施
  • 内置 Ray Dashboard 监控与分布式调试器

容易踩的坑

AI 库(Data/Train/Tune/RLlib/Serve)需按需单独安装对应依赖;nightly 版本需参考安装页而非默认 pip 源

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本ray-2.60.0
  1. ray-2.59.1Ray-2.59.12026-11-04 · 2026-11-04 08:13 UTC
    查看更新说明

    Security fixes

    eMudhra intermediate CA compromise

    The eMudhra intermediate CA keys were reported compromised on October 20, 2026. pip trusts its own vendored certifi bundle in addition to the system store, so updating OS ca-certificates alone doesn't protect pip. This release moves every place Ray installs or bundles a CA bundle to the fixed releases:

    • Docker images: pip 26.2.2 on every Python version, conda and site-packages certifi 2026.10.19, uv 0.13.4 (#67295, #67350, pick #67487).
    • virtualenv 21.14.12, which bundles pip 26.2.2 for runtime_env virtualenvs. This also moves packaging to 26.3, typing-extensions to 4.16.0, distlib to 0.4.3 and python-discovery to 1.6.1 (#67301, pick #67487).
    • certifi>=2026.10.19 floor in Ray's security requirements (#67305, pick #67487).
    • pip 26.2.2 and uv 0.13.4 in the Windows and macOS wheel builds (#67298, pick #67487). The shipped wheels don't vendor a CA bundle and are unaffected.

    aiohttp

    • aiohttp 3.14.3 → 3.14.4 (and yarl 1.23.0 → 1.25.1) in the bundled runtime_env agent dependencies, ray[default], and the images. Fixes CVE-2026-111064, CVE-2026-111066 and GHSA-2g87-pp6c-29x5 (#67304, pick #67487; reported in #67302).

    Bug fixes

    Ray Data

    • Keep the pandas metadata on Arrow blocks readable by pandas. Dtype names that pandas can't parse are now written as `object`, so converting those blocks or files back to pandas no longer fails (#67576, pick #67649).

    Ray Serve

    • Ingress request router deployments no longer keep proxies on the nodes they run on. Those nodes can now scale down normally (#65824, pick #67633).

    Contributors

    Thanks to everyone who contributed to this release!

    @sai-miduthuri, @elliot-barn, @ramannanda9, @marwan116

  2. ray-2.60.0Ray-2.60.0最新正式版2026-11-04 · 2026-11-04 02:08 UTC

    Highlights

    • Ray Data shuffle and Parquet reads: In this Ray release, shuffle v2 is the default shuffle strategy for joins, aggregations (#66260). Parquet reads now size read tasks from the row-group metadata in each file's footer instead of estimating from file size, so read tasks are packed to an accurate byte budget (#65596, #65806, #65821).
    • Ray Serve rolling updates: We've added max_surge_percent, which starts replacement replicas before stopping old ones so a rolling update doesn't reduce serving capacity (#66267). A rolling update whose new replicas keep failing now stops at DEPLOY_FAILED and leaves the remaining old replicas routable, instead of replacing every healthy replica (#66252, #66290).
    • Security: Ray Data now rejects pickled-object columns in every reader that deserializes Arrow data from external input, closing a remote code execution path in the LeRobot, Databricks, Iceberg, Hugging Face, ClickHouse, BigQuery, and Delta Sharing readers (#66042, #65769). Ray images and wheel builds pin certifi 2026.10.19 and pip 26.2.2 after the eMudhra CA compromise, and aiohttp moves to 3.14.4 for CVE-2026-111064 and CVE-2026-111066 (#67295, #67298, #67301, #67304, #67305, #67350).

    Ray Data

    🎉 New Features

    • Add Dataset.write_orc() for writing ORC files (#65453)
    • Add an unnest() expression that expands a struct-valued expression or column into one column per field (#65241)
    • Add min_bytes_per_file to write_parquet to combine small blocks toward a target output file size (#65636)
    • Support nested schema evolution in write_delta through schema_mode (#65858)
    • Support appending a subset of columns to an existing Lance dataset (#64474)
    • Add a rate-based cluster autoscaler that scales from measured operator throughput, now the default (#65954)
    • Add a backlog-aware actor-pool autoscaler, now the default; RAY_DATA_ACTOR_AUTOSCALER=DEFAULT restores the old one (#66035)
    • Make checkpoint restore pluggable through CheckpointConfig.checkpoint_manager_cls and checkpoint_filter_cls (#65676)
    • Add the ray.data.list_stats_summaries() developer API for execution stats of completed datasets (#66294)
    • Add a logical memory usage chart to the Ray Data dashboard (#66044)

    💫 Enhancements

    • Keep pandas metadata on Arrow blocks parsable by pandas (#67576)
      Make shuffle v2 the default, add task-based shuffle v2 for sort, and rename external shuffle to disk shuffle (#66260, #64875, #66367)
    • Read Parquet footers to bin-pack read tasks by row group, and use one reader thread per fragment (#65596, #65806, #65821, #65169)
    • Use Polars streaming joins for in-partition joins with one Polars thread per reducer, and Polars in hash_partitions (#66075, #66341, #66269)
    • Make actor pools node-aware: skip actors on draining nodes and refresh actor locations after restarts (#66109)
    • Count lineage reconstruction tasks in task-pool resource usage so Data doesn't over-submit under object loss (#66217)
    • Default GPU map operators to num_cpus=1 when num_cpus is unspecified; set num_cpus=0 to opt out (#66202)
    • Speed up aggregations, sorts, row access, and tensor-to-pandas conversion by cutting per-row work and copies (#66194, #66120, #66246, #66254, #66116, #66219, #64961, #66122, #65796)
    • Break ds.stats() UDF time into input prep, function body, and output build, optionally per fused stage (#65807, #65810)
    • Warn when an operator's configured memory is below 1.25x its observed max USS (#65512)
    • Add an opt-in per-operator release interval for OutputBackpressureGuard (#65202)
    • Track autoscaling coordinator reservations per node (#66001, #66370)
    • Defer loading pyarrow.dataset on import ray.data (#66463)
    • Fetch only each read task's root bundles in read_lerobot (#65284)
    • Clearer errors for S3 ACCESS_DENIED writes, partition value cast
  3. ray-2.58.1Ray-2.58.12026-10-21 · 2026-10-21 00:57 UTC
    查看更新说明

    Fixes

    Ray Data

    • Fix out-of-scope block callbacks being registered on blocks passed through from input to output (#66369, cherry-pick #66404). Fixes spurious callback errors on passthrough datasets.

    Images

    • google-cloud-cli is now installed in the base-extra images (#65757, pick #66611).

    Contributors

    Thanks to everyone who contributed to this release! @marwan116, @jeffreywang88, @dstrodtman, @owenowenisme, @elliot-barn

  4. ray-2.57.1Ray-2.57.12026-10-21 · 2026-10-21 00:57 UTC
    查看更新说明

    Fixes

    Ray Data

    • Fix out-of-scope block callbacks being registered on blocks passed through from input to output (#66369, cherry-pick #66403). Fixes spurious callback errors on passthrough datasets.

    Images

    • google-cloud-cli is now installed in the base-extra images (#65757, pick #66610).

    Contributors

    Thanks to everyone who contributed to this release! @marwan116, @jeffreywang88, @elliot-barn

  5. ray-2.59.0Ray-2.59.02026-10-02 · 2026-10-02 07:04 UTC
    查看更新说明

    Highlights

    • Ray Data LLM & Ray Serve LLM are GA/Stable: the LLM APIs graduate to general availability this release (#65194), alongside an upgrade to vLLM 0.27.0 (#65351).
    • Ray Data external shuffle (shuffle_v2): the new shuffle backend gains an external, disk-backed mode — a new external shuffle runtime library and task/operator set (#64828, #65144), planner integration (#65499), and Join & Aggregation support on external shuffle (#65897). The strategy was renamed from hash_shuffle_v2 to shuffle_v2 (#65411) and the compression setting from hash_shuffle_compression to shuffle_compression (#65590).
    • Token authentication: Ray now turns on token authentication by default for local clusters. ray.init() without an address enables authentication and generates a token at ~/.ray/auth_token when none exists. ray start --head enables authentication when a token is already available, and otherwise warns that it started an unauthenticated cluster. Remote and multi-node clusters are unchanged in this release. Set RAY_AUTH_MODE=disabled to opt out (#64755).
    • Security hardening: the dashboard redacts runtime_env values (which routinely carry credentials) in browser-facing endpoints (#65226), and read_hudi gained an unpickling guard preventing remote code execution (#65780).
    • Ray Core at scale: removed the GCS resource-view reset that caused placement-group retry storms on large clusters (#65271), hardened the worker-lease protocol (at most one CancelWorkerLease per pending lease, lease-id tombstones — #65613, #65420), and batched local object frees (#65000, #64037).
    • New Data sources: native ORC file reading (#64600), multi-path read_lance (#64560), and fps/resize parameters for read_videos (#64120).

    Ray Data

    🎉 New Features

    • Add support for reading ORC files (#64600)
    • Introduce external disk shuffle: runtime library, tasks and operators, planner integration, and Join & Aggregations on external shuffle (#64828, #65144, #65499, #65897)
    • Support reading multiple paths in read_lance (#64560)
    • Add fps and resize parameters to read_videos() (#64120)
    • Add max_concurrent_calls_per_actor to ActorPoolStrategy (#65534)
    • Introduce reporting for task USS distribution metrics (#65666)

    💫 Enhancements

    • Iceberg: deduplicate read-task state, better decoded-size estimation, and bounded read-task memory (#64811, #65042, #64813)
    • Count materialized data as downstream capacity, and return external consumer bytes for downstream-capacity backpressure (#66226, #65474)
    • Disable throttling for Union and Mix operators (#65242)
    • Pin the fused map function for shuffle tasks (#65480)
    • Chunk DataFrame emission in WebDatasetDatasource._read_stream and detect non-contiguous keys in read_webdataset (#65394, #63407)
    • Expose read-task resource args in read_webdataset (#65623)
    • Auto-detect AzureFileSystem for Blob HTTPS URLs in download() (#63648)
    • Groundwork for footer-based Parquet reads: footer types and online bin packer, FooterReader actor pool, and ListFiles pushdown state derived from the ReadFiles scanner (#65210, #65273, #65214)
    • Groundwork for Data fault tolerance (1/n): add a linear application-layer lineage tracker (#65519)

    🔨 Fixes

    • Add an unpickling guard to prevent RCE when reading Hudi (#65780)
    • Fix Iceberg Dataset.count() returning wrong row counts (#65175)
    • Fix LeRobot delta windows for multidimensional features (#65165)
    • OpTask._cancel never passed force=True (#65389)
    • Fix an incorrect timeout value in the autoscaler shutdown warning (#65317)
    • Correct the physical-to-logical operator mapping type (#61790)
    • Don't register out-of-scope callbacks on blocks passed through from input to output (#66369)
    • Fix crash in preprocessors due to st

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Ray is a unified framework for scaling AI and Python applications. Ray consists of a core distributed runtime and a set of AI libraries for simplifying ML compute:

    Learn more about Ray AI Libraries:

    • Data: Scalable Datasets for ML
    • Train: Distributed Training
    • Tune: Scalable Hyperparameter Tuning
    • RLlib: Scalable Reinforcement Learning
    • Serve: Scalable and Programmable Serving

    Or more about Ray Core and its key abstractions:

    • Tasks: Stateless functions executed in the cluster.
    • Actors: Stateful worker processes created in the cluster.
    • Objects: Immutable values accessible across the cluster.

    Learn more about Monitoring and Debugging:

    Ray runs on any machine, cluster, cloud provider, and Kubernetes, and features a growing ecosystem of community integrations.

    Install Ray with: pip install ray. For nightly wheels, see the Installation page.

    Why Ray?

    Today's ML workloads are increasingly compute-intensive. As convenient as they are, single-node development environments such as your laptop cannot scale to meet these demands.

    Ray is a unified way to scale Python and AI applications from a laptop to a cluster.

    With Ray, you can seamlessly scale the same code from a laptop to a cluster. Ray is designed to be general-purpose, meaning that it can performantly run any kind of workload. If your application is written in Python, you can scale it with Ray, no other infrastructure required.

    More Information

    Older documents:

    Getting Involved

    PlatformPurposeEstimated Response TimeSupport Level
    Discourse ForumFor discussions about development and questions about usage.< 1 dayCommunity
    GitHub IssuesFor reporting bugs and filing feature requests.< 2 daysRay OSS Team
    SlackFor collaborating with other Ray users.< 2 daysCommunity
    StackOverflowFor asking questions about how to use Ray.3-5 daysCommunity
    Meetup GroupFor learning about Ray projects and best practices.MonthlyRay DevRel
    TwitterFor staying up-to-date on new features.DailyRay DevRel