# Ray 2.7.0 — Ray-2.7.0 - Product: Ray (https://whatsnew.fyi/product/ray) - Vendor: Anyscale - Date: 2023-09-17 - Version: 2.7.0 - Original notes: https://github.com/ray-project/ray/releases/tag/ray-2.7.0 - Permalink: https://whatsnew.fyi/product/ray/releases/2.7.0 What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. --- - **changed** — Rebrand Ray AI Runtime (AIR) to Ray AI Libraries and consolidate the ray.air namespace into ray.data, ray.train, and ray.tune - **added** — Ray Serve and Ray Train PyTorch support are now generally available - **added** — Introduce new backwards-compatible DeploymentHandle API in Ray Serve to unify various existing Handle APIs - **added** — Add high performant gRPC proxy to Ray Serve to serve gRPC requests - **added** — Consolidate various PyTorch-based trainers into TorchTrainer in Ray Train - **added** — Introduce new train.Checkpoint API providing consolidated way of interacting with remote and local storage - **added** — Add initial integrations with TPUs and AWS accelerators in Ray Core to natively detect these devices and schedule tasks/actors onto them - **added** — Add official support for actor task cancellation in Ray Core - **added** — Add experimental streaming generator in Ray Core that supports streaming response to the caller - **added** — Integrate Ray Core streaming generator API by default in Ray Data to reduce memory footprint throughout the data pipeline - **added** — Add Dataset.write_images to write images - **added** — Add Dataset.write_sql() to write SQL databases - **added** — Support sort on multiple keys in Ray Data - **added** — Support reading and writing JSONL file format in Ray Data - **added** — Support class constructor args for Dataset.map() and flat_map() - **added** — Implement streamed read from Hugging Face Dataset - **changed** — Read data with multi-threading for FileBasedDataSource in Ray Data - **changed** — Add partition_filter parameter to read_parquet - **changed** — Move away from LightningTrainer in favor of TorchTrainer as the recommended way of running distributed PyTorch Lightning - **deprecated** — Ray Train Preprocessors and Predictors are deprecated in favor of Ray Data #### Release Highlights Ray 2.7 release brings important stability improvements and enhancements to Ray libraries, with Ray Train and Ray Serve becoming generally available. Ray 2.7 is accompanied with a GA release of KubeRay. * Following user feedback, we are rebranding “Ray AI Runtime (AIR)” to “Ray AI Libraries”. Without reducing any of the underlying functionality of the original Ray AI runtime vision as put forth in Ray 2.0, the underlying namespace (ray.air) is consolidated into ray.data, ray.train, and ray.tune. This change reduces the friction for new machine learning (ML) practitioners to quickly understand and leverage Ray for their production machine learning use cases. * With this release, Ray Serve and Ray Train’s Pytorch support are becoming Generally Available -- indicating that the core APIs have been marked stable and that both libraries have undergone significant production hardening. * In Ray Serve, we are introducing a new backwards-compatible `DeploymentHandle` API to unify various existing Handle APIs, a high performant gRPC proxy to serve gRPC requests through Ray Serve, along with various stability and usability improvements. * In Ray Train, we are consolidating various Pytorch-based trainers into the TorchTrainer, reducing the amount of refactoring work new users needed to scale existing training scripts. We are also introducing a new train.Checkpoint API, which provides a consolidated way of interacting with remote and local storage, along with various stability and usability improvements. * In Ray Core, we’ve added initial integrations with TPUs and AWS accelerators, enabling Ray to natively detect these devices and schedule tasks/actors onto them. Ray Core also officially now supports actor task cancellation and has an experimental streaming generator that supports streaming response to the caller. Take a look at our [refreshed documentation](https://docs.ray.io/en/releases-2.7.0) and the [Ray 2.7 migration guide](https://docs.google.com/document/d/1J-09US8cXc-tpl2A1BpOrlHLTEDMdIJp6Ah1ifBUw7Y/view#heading=h.3eeweptnwn6p) and let us know your feedback! #### Ray Libraries ##### Ray AIR 🏗 Architecture refactoring: * **Ray AIR namespace**: We are sunsetting the "Ray AIR" concept and namespace (#39516, #38632, #38338, #38379, #37123, #36706, #37457, #36912, #37742, #37792, #37023). The changes follow the proposal outlined in [this REP](https://github.com/ray-project/enhancements/pull/36). * **Ray Train Preprocessors, Predictors**: We now recommend using Ray Data instead of Preprocessors (#38348, #38518, #38640, #38866) and Predictors (#38209). ##### Ray Data 🎉 New Features: * In this release, we’ve integrated the Ray Core streaming generator API by default, which allows us to reduce memory footprint throughout the data pipeline (#37736). * Avoid unnecessary data buffering between `Read` and `Map` operator (zero-copy fusion) (#38789) * Add `Dataset.write_images` to write images (#38228) * Add `Dataset.write_sql()` to write SQL databases (#38544) * Support sort on multiple keys (#37124) * Support reading and writing JSONL file format (#37637) * Support class constructor args for `Dataset.map()` and `flat_map()` (#38606) * Implement streamed read from Hugging Face Dataset (#38432) 💫Enhancements: * Read data with multi-threading for `FileBasedDataSource` (#39493) * Optimization to reduce `ArrowBlock` building time for blocks of size 1 (#38988) * Add `partition_filter` parameter to `read_parquet `(#38479) * Apply limit to `Dataset.take()` and related methods (#38677) * Postpone `reader.get_read_tasks` until execution (#38373) * Lazily construct metadata providers (#38198) * Support writing each block to a separate file (#37986) * Make `iter_batches` an Iterable (#37881) * Remove default limit on `Dataset.to_pandas()` (#37420) * Add `Dataset.to_dask()` parameter to toggle consistent metadata check (#37163) * Add `Datasource. _[Truncated at 4000 characters — full notes: https://github.com/ray-project/ray/releases/tag/ray-2.7.0]_