global_chunk_id int64 0 478 | text stringlengths 288 999 |
|---|---|
0 | Overview#
Ray is an open-source unified framework for scaling AI and Python applications like machine learning. It provides the compute layer for parallel processing so that you don’t need to be a distributed systems expert. Ray minimizes the complexity of running your distributed individual and end-to-end machine lear... |
1 | For data scientists and machine learning practitioners, Ray lets you scale jobs without needing infrastructure expertise:
Easily parallelize and distribute ML workloads across multiple nodes and GPUs.
Leverage the ML ecosystem with native and extensible integrations.
For ML platform builders and ML engineers, Ray:
P... |
2 | For distributed systems engineers, Ray automatically handles key processes:
Orchestration–Managing the various components of a distributed system.
Scheduling–Coordinating when and where tasks are executed.
Fault tolerance–Ensuring tasks complete regardless of inevitable points of failure.
Auto-scaling–Adjusting the nu... |
3 | Ray framework#
Stack of Ray libraries - unified toolkit for ML workloads.
Ray’s unified compute framework consists of three layers:
Ray AI Libraries–An open-source, Python, domain-specific set of libraries that equip ML engineers, data scientists, and researchers with a scalable and unified toolkit for ML app... |
4 | Build ML applications with a toolkit of libraries for distributed
data processing,
model training,
tuning,
reinforcement learning,
model serving,
and more.
Ray AI Libraries
Build distributed applications
Build and run distributed applications with a
simple and flexible API.
Parallelize single machine code wit... |
5 | Ray Clusters
Each of Ray’s five native libraries distributes a specific ML task:
Data: Scalable, framework-agnostic data loading and transformation across training, tuning, and prediction.
Train: Distributed multi-node and multi-core model training with fault tolerance that integrates with popular training librar... |
6 | Ray’s libraries are for both data scientists and ML engineers alike. For data scientists, these libraries can be used to scale individual workloads, and also end-to-end ML applications. For ML Engineers, these libraries provides scalable platform abstractions that can be used to easily onboard and integrate tooling fro... |
7 | Ray for ML Infrastructure#
Tip
We’d love to hear from you if you are using Ray to build a ML platform! Fill out this short form to get involved.
Ray and its AI libraries provide unified compute runtime for teams looking to simplify their ML platform.
Ray’s libraries such as Ray Train, Ray Data, and Ray Serve can be u... |
8 | Why Ray for ML Infrastructure?#
Ray’s AI libraries simplify the ecosystem of machine learning frameworks, platforms, and tools, by providing a seamless, unified, and open experience for scalable ML:
1. Seamless Dev to Prod: Ray’s AI libraries reduces friction going from development to production. With Ray and its libra... |
9 | Example ML Platforms built on Ray#
Merlin is Shopify’s ML platform built on Ray. It enables fast-iteration and scaling of distributed applications such as product categorization and recommendations.
Shopify’s Merlin architecture built on Ray.#
Spotify uses Ray for advanced applications that include personalizing c... |
10 | Deploying Ray for ML platforms#
Here, we describe how you might use or deploy Ray in your infrastructure. There are two main deployment patterns – pick and choose and within existing platforms.
The core idea is that Ray can be complementary to your existing infrastructure and integration tools.
Design Principles#
Ray... |
11 | Pick and choose your own libraries#
You can pick and choose which Ray AI libraries you want to use.
This is applicable if you are an ML engineer who wants to independently use a Ray library for a specific AI app or service use case and do not need to integrate with existing ML platforms.
For example, Alice wants to use... |
12 | Existing ML Platform integration#
You may already have an existing machine learning platform but want to use some subset of Ray’s ML libraries. For example, an ML engineer wants to use Ray within the ML Platform their organization has purchased (e.g., SageMaker, Vertex).
Ray can complement existing machine learning pla... |
13 | In the above diagram:
A workflow orchestrator such as AirFlow, Oozie, SageMaker Pipelines, etc. is responsible for scheduling and creating Ray clusters and running Ray apps and services. The Ray application may be part of a larger orchestrated workflow (e.g., Spark ETL, then Training on Ray).
Lightweight orchestration... |
14 | Installing Ray#
Ray currently officially supports x86_64, aarch64 (ARM) for Linux, and Apple silicon (M1) hardware.
Ray on Windows is currently in beta.
Official Releases#
From Wheels#
You can install the latest official version of Ray from PyPI on Linux, Windows,
and macOS by choosing the option that best matches... |
15 | pip install -U "ray[default]"
Core, Dashboard, Cluster Launcher
pip install -U "ray[data]"
Core, Data
pip install -U "ray[train]"
Core, Train
pip install -U "ray[tune]"
Core, Tune
pip install -U "ray[serve]"
Core, Dashboard, Cluster Launcher, Serve
pip install -U "ray[serve-grpc]"
Core, Dashboard, Cluster Launcher... |
16 | Tip
You can combine installation extras.
For example, to install Ray with Dashboard, Cluster Launcher, and Train support, you can run:
pip install -U "ray[default,train]"
Daily Releases (Nightlies)#
You can install the nightly Ray wheels via the following links. These daily releases are tested via automated tes... |
17 | Linux Python 3.10 (x86_64)
Linux Python 3.10 (aarch64)
Linux Python 3.11 (x86_64)
Linux Python 3.11 (aarch64)
Linux Python 3.12 (x86_64)
Linux Python 3.12 (aarch64)
Linux Python 3.13 (x86_64) (beta)
Linux Python 3.13 (aarch64) (beta)
MacOS
MacOS (x86_64)
MacOS (arm64)
MacOS Python 3.9 (x86_64)
MacOS Pytho... |
18 | Windows Python 3.12
Note
On Windows, support for multi-node Ray clusters is currently experimental and untested.
If you run into issues please file a report at ray-project/ray#issues.
Note
Usage stats collection is enabled by default (can be disabled) for nightly wheels including both local clusters started via... |
19 | For example, here are the Ray 3.0.0.dev0 wheels for Python 3.9, MacOS for commit 4f2ec46c3adb6ba9f412f09a9732f436c4a5d0c9:
pip install https://s3-us-west-2.amazonaws.com/ray-wheels/master/4f2ec46c3adb6ba9f412f09a9732f436c4a5d0c9/ray-3.0.0.dev0-cp39-cp39-macosx_10_15_x86_64.whl
There are minor variations to the format... |
20 | Install miniforge.
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh
bash Miniforge3-MacOSX-arm64.sh
rm Miniforge3-MacOSX-arm64.sh # Cleanup.
Ensure you’re using the miniforge environment (you should see (base) in your terminal).
source ~/.bash_profile
conda activate
... |
21 | Windows Support#
Windows support is in Beta. Ray supports running on Windows with the following caveats (only the first is
Ray-specific, the rest are true anywhere Windows is used):
Multi-node Ray clusters are untested.
Filenames are tricky on Windows and there still may be a few places where Ray
assumes UNIX filename... |
22 | Submit any issues you encounter to
GitHub.
Installing Ray on Arch Linux#
Note: Installing Ray on Arch Linux is not tested by the Project Ray developers.
Ray is available on Arch Linux via the Arch User Repository (AUR) as
python-ray.
You can manually install the package by following the instructions on the
Arch Wiki ... |
23 | # Install Ray with support for the dashboard + cluster launcher
conda install -c conda-forge "ray-default"
# Install Ray with minimal dependencies
# conda install -c conda-forge ray
To install Ray libraries, use pip as above or conda/mamba.
conda install -c conda-forge "ray-data" # installs Ray + dependencies for ... |
24 | For a complete list of available ray libraries on Conda-forge, have a look
at https://anaconda.org/conda-forge/ray-default
Note
Ray conda packages are maintained by the community, not the Ray team. While
using a conda environment, it is recommended to install Ray from PyPi using
pip install ray in the newly created en... |
25 | Ray version tag
Description
latest
The most recent Ray release.
x.y.z
A specific Ray release, e.g. 2.31.0
nightly
The most recent Ray development build (a recent commit from Github master)
The optional Python version tag specifies the Python version in the image. All Python versions supported by Ray are availab... |
26 | -gpu
Aliases to a specific -cuXX tagged image.
<no tag>
Aliases to -cpu tagged images.
Example: for the nightly image based on Python 3.9 and without GPU support, the tag is nightly-py39-cpu.
If you want to tweak some aspects of these images and build them locally, refer to the following script:
cd ray
./build-dock... |
27 | Launch Ray in Docker#
Start out by launching the deployment container.
docker run --shm-size=<shm-size> -t -i rayproject/ray
Replace <shm-size> with a limit appropriate for your system, for example
512M or 2G. A good estimate for this is to use roughly 30% of your available memory (this is
what Ray uses internally fo... |
28 | Test if the installation succeeded#
To test if the installation was successful, try running some tests. This assumes
that you’ve cloned the git repository.
python -m pytest -v python/ray/tests/test_mini.py
Installed Python dependencies#
Our docker images are shipped with pre-installed Python dependencies
required f... |
29 | Install Ray Java with Maven#
Note
All Ray Java APIs are experimental and only supported by the community.
Before installing Ray Java with Maven, you should install Ray Python with pip install -U ray . Note that the versions of Ray Java and Ray Python must match.
Note that nightly Ray python wheels are also required i... |
30 | The latest Ray Java snapshot can be found in sonatype repository. To use the latest Ray Java snapshot in your application, add the following entries in your pom.xml:
<!-- only needed for snapshot version of ray -->
<repositories>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/repositorie... |
31 | Note
When you run pip install to install Ray, Java jars are installed as well. The above dependencies are only used to build your Java code and to run your code in local mode.
If you want to run your Java code in a multi-node Ray cluster, it’s better to exclude Ray jars when packaging your code to avoid jar conflicts i... |
32 | Ray Use Cases#
This page indexes common Ray use cases for scaling ML.
It contains highlighted references to blogs, examples, and tutorials also located
elsewhere in the Ray documentation.
LLMs and Gen AI#
Large language models (LLMs) and generative AI are rapidly changing industries, and demand compute at an astonis... |
33 | Explore LLMs and Gen AI examples
Batch Inference#
Batch inference is the process of generating model predictions on a large “batch” of input data.
Ray for batch inference works with any cloud provider and ML framework,
and is fast and cheap for modern deep learning applications.
It scales from single machines to large... |
34 | Explore batch inference examples
Model Serving#
Ray Serve is well suited for model composition, enabling you to build a complex inference service consisting of multiple ML models and business logic all in Python code.
It supports complex model deployment patterns requiring the orchestration of multiple Ray actors, whe... |
35 | Hyperparameter Tuning#
The Ray Tune library enables any parallel Ray workload to be run under a hyperparameter tuning algorithm.
Running multiple hyperparameter tuning experiments is a pattern apt for distributed computing because each experiment is independent of one another. Ray Tune handles the hard bit of distribut... |
36 | Distributed Training#
The Ray Train library integrates many distributed training frameworks under a simple Trainer API,
providing distributed orchestration and management capabilities out of the box.
In contrast to training many models, model parallelism partitions a large model across many machines for training. Ray T... |
37 | Reinforcement Learning#
RLlib is an open-source library for reinforcement learning (RL), offering support for production-level, highly distributed RL workloads while maintaining unified and simple APIs for a large variety of industry applications. RLlib is used by industry leaders in many different verticals, such as c... |
38 | ML Platform#
Ray and its AI libraries provide unified compute runtime for teams looking to simplify their ML platform.
Ray’s libraries such as Ray Train, Ray Data, and Ray Serve can be used to compose end-to-end ML workflows, providing features and APIs for
data preprocessing as part of training, and transitioning from... |
39 | Large Scale Workload Orchestration#
The following highlights feature projects leveraging Ray Core’s distributed APIs to simplify the orchestration of large scale workloads.
[Blog] Highly Available and Scalable Online Applications on Ray at Ant Group
[Blog] Ray Forward 2022 Conference: Hyper-scale Ray Application Use C... |
40 | Getting Started#
Ray is an open source unified framework for scaling AI and Python applications. It provides a simple, universal API for building distributed applications that can scale from a laptop to a cluster.
What’s Ray?#
Ray simplifies distributed computing by providing:
Scalable compute primitives: Tasks and a... |
41 | Ray AI Libraries Quickstart#
Use individual libraries for ML workloads. Each library specializes in a specific part of the ML workflow, from data processing to model serving. Click on the dropdowns for your workload below.
Data: Scalable Datasets for ML
Ray Data provides distributed data processing optimized for... |
42 | # Create datasets from on-disk files, Python objects, and cloud storage like S3.
ds = ray.data.read_csv("s3://anonymous@ray-example-data/iris.csv")
# Apply functions to transform data. Ray Data executes transformations in parallel.
def compute_area(batch: Dict[str, np.ndarray]) -> Dict[str, np.ndarray]:
length = b... |
43 | Ray Train makes distributed model training simple. It abstracts away the complexity of setting up distributed training across popular frameworks like PyTorch and TensorFlow.
PyTorch
This example shows how you can use Ray Train with PyTorch.
To run this example install Ray Train and PyTorch packages:
Note
pip instal... |
44 | def get_dataset():
return datasets.FashionMNIST(
root="/tmp/data",
train=True,
download=True,
transform=ToTensor(),
)
class NeuralNetwork(nn.Module):
def __init__(self):
super().__init__()
self.flatten = nn.Flatten()
self.linear_relu_stack = nn.Sequen... |
45 | model = NeuralNetwork()
criterion = nn.CrossEntropyLoss()
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)
for epoch in range(num_epochs):
for inputs, labels in dataloader:
optimizer.zero_grad()
pred = model(inputs)
loss = criterion(pred, labels)
... |
46 | def train_func_distributed():
num_epochs = 3
batch_size = 64
dataset = get_dataset()
dataloader = DataLoader(dataset, batch_size=batch_size, shuffle=True)
dataloader = ray.train.torch.prepare_data_loader(dataloader)
model = NeuralNetwork()
model = ray.train.torch.prepare_model(model)
... |
47 | Instantiate a TorchTrainer
with 4 workers, and use it to run the new training function.
from ray.train.torch import TorchTrainer
from ray.train import ScalingConfig
# For GPU Training, set `use_gpu` to True.
use_gpu = False
trainer = TorchTrainer(
train_func_distributed,
scaling_config=ScalingConfig(num_worke... |
48 | Note
pip install -U "ray[train]" tensorflow
Set up your dataset and model.
import sys
import numpy as np
if sys.version_info >= (3, 12):
# Tensorflow is not installed for Python 3.12 because of keras compatibility.
sys.exit(0)
else:
import tensorflow as tf
def mnist_dataset(batch_size):
(x_train, y... |
49 | def build_and_compile_cnn_model():
model = tf.keras.Sequential([
tf.keras.layers.InputLayer(input_shape=(28, 28)),
tf.keras.layers.Reshape(target_shape=(28, 28, 1)),
tf.keras.layers.Conv2D(32, 3, activation='relu'),
tf.keras.layers.Flatten(),
tf.keras.layers.Dense(128, activa... |
50 | This training function can be executed with:
train_func()
Now convert this to a distributed multi-worker training function.
Set the global batch size - each worker processes the same size
batch as in the single-worker code.
Choose your TensorFlow distributed training strategy. This examples
uses the MultiWorkerM... |
51 | with strategy.scope():
# Model building/compiling need to be within `strategy.scope()`.
multi_worker_model = build_and_compile_cnn_model()
multi_worker_model.fit(multi_worker_dataset, epochs=3, steps_per_epoch=70)
Instantiate a TensorflowTrainer
with 4 workers, and use it to run the new training ... |
52 | Learn more about Ray Train
Tune: Hyperparameter Tuning at Scale
Ray Tune is a library for hyperparameter tuning at any scale.
It automatically finds the best hyperparameters for your models with efficient distributed search algorithms.
With Tune, you can launch a multi-node distributed hyperparameter sweep in... |
53 | tuner = tune.Tuner(objective, param_space=search_space) # ③
results = tuner.fit()
print(results.get_best_result(metric="score", mode="min").config)
If TensorBoard is installed (pip install tensorboard), you can automatically visualize all trial results:
tensorboard --logdir ~/ray_results
Learn more about Ray Tune... |
54 | from sklearn.datasets import load_iris
from sklearn.ensemble import GradientBoostingClassifier
from ray import serve
# Train model.
iris_dataset = load_iris()
model = GradientBoostingClassifier()
model.fit(iris_dataset["data"], iris_dataset["target"])
@serve.deployment
class BoostingModel:
def __init__(self, m... |
55 | # Query it!
sample_request_input = {"vector": [1.2, 1.0, 1.1, 0.9]}
response = requests.get(
"http://localhost:8000/iris", json=sample_request_input)
print(response.text)
The response shows {"result": "versicolor"}.
Learn more about Ray Serve
RLlib: Industry-Grade Reinforcement Learning
RLlib is a reinfor... |
56 | import gymnasium as gym
import numpy as np
import torch
from typing import Dict, Tuple, Any, Optional
from ray.rllib.algorithms.ppo import PPOConfig
# Define your problem using python and Farama-Foundation's gymnasium API:
class SimpleCorridor(gym.Env):
"""Corridor environment where an agent must learn to move r... |
57 | Rewards:
-0.1 for each step
+1.0 when reaching the goal
Episode termination:
When the agent reaches the goal (position >= corridor_length)
"""
def __init__(self, config):
self.end_pos = config["corridor_length"]
self.cur_pos = 0.0
self.action_space = gym.spa... |
58 | Args:
seed: Random seed for reproducibility
options: Additional options (not used in this environment)
Returns:
Initial observation of the new episode and an info dict.
"""
super().reset(seed=seed) # Initialize RNG if seed is provided
self.cur_pos = ... |
59 | Returns:
A tuple of (observation, reward, terminated, truncated, info):
observation: Agent's new position
reward: Reward from taking the action (-0.1 or +1.0)
terminated: Whether episode is done (reached goal)
truncated: Whether episode was tru... |
60 | # Create an RLlib Algorithm instance from a PPOConfig object.
print("Setting up the PPO configuration...")
config = (
PPOConfig().environment(
# Env class to use (our custom gymnasium environment).
SimpleCorridor,
# Config dict passed to our custom env's constructor.
# Use corridor w... |
61 | # Construct the actual PPO algorithm object from the config.
algo = config.build_algo()
rl_module = algo.get_module()
# Train for n iterations and report results (mean episode rewards).
# Optimal reward calculation:
# - Need at least 19 steps to reach the goal (from position 0 to 19)
# - Each step (except last) gets -... |
62 | # Save the trained algorithm (optional)
checkpoint_dir = algo.save()
print(f"\nSaved model checkpoint to: {checkpoint_dir}")
print("\nRunning inference with the trained policy...")
# Create a test environment with a shorter corridor to verify the agent's behavior
env = SimpleCorridor({"corridor_length": 10})
# Get the... |
63 | # Get the action with highest probability
action = np.argmax(action_logits)
# Log the agent's decision
action_name = "LEFT" if action == 0 else "RIGHT"
print(f" Step {step_count}: Position {obs[0]:.1f}, Action: {action_name}")
# Apply the computed action in the environment
obs, reward, termin... |
64 | Learn more about Ray RLlib
Ray Core Quickstart#
Ray Core provides simple primitives for building and running distributed applications. It enables you to turn regular Python or Java functions and classes into distributed stateless tasks and stateful actors with just a few lines of code.
The examples below show yo... |
65 | @ray.remote
def f(x):
return x * x
futures = [f.remote(i) for i in range(4)]
print(ray.get(futures)) # [0, 1, 4, 9]
Java
Note
To run this example, add the ray-api and ray-runtime dependencies in your project.
Use Ray.init to initialize Ray runtime.
Then use Ray.task(...).remote() to convert any Java static ... |
66 | public class RayDemo {
public static int square(int x) {
return x * x;
}
public static void main(String[] args) {
// Initialize Ray runtime.
Ray.init();
List<ObjectRef<Integer>> objectRefList = new ArrayList<>();
// Invoke the `square` method 4 times remotely as Ray... |
67 | Core: Parallelizing Classes with Ray Actors
Ray provides actors to allow you to parallelize an instance of a class in Python or Java.
When you instantiate a class that is a Ray actor, Ray starts a remote instance
of that class in the cluster. This actor can then execute remote method calls and
maintain its own inte... |
68 | Java
Note
To run this example, add the ray-api and ray-runtime dependencies in your project.
import io.ray.api.ActorHandle;
import io.ray.api.ObjectRef;
import io.ray.api.Ray;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
public class RayDemo {
public static class Counte... |
69 | // Invoke the `increment` method on each actor.
// This sends an actor task to each remote actor.
for (ActorHandle<Counter> counter : counters) {
counter.task(Counter::increment).remote();
}
// Invoke the `read` method on each actor, and print the results.
List<Object... |
70 | Ray programs can run on a single machine, or seamlessly scale to large clusters.
Note
To run this example install the following:
pip install -U "ray[default]" boto3
If you haven’t already, configure your credentials as described in the documentation for boto3.
Take this simple example that waits for individual node... |
71 | def main():
wait_for_nodes(4)
# Check that objects can be transferred from each node to each other node.
for i in range(10):
print("Iteration {}".format(i))
results = [get_host_name.remote(get_host_name.remote(())) for _ in range(100)]
print(Counter(ray.get(results)))
sys.st... |
72 | # Tell the autoscaler the allowed node types and the resources they provide.
# The key is the name of the node type, which is for debugging purposes.
# The node config specifies the launch config and physical instance type.
available_node_types:
ray.head.default:
# The node type's CPU and GPU resources are ... |
73 | # Ray auto-configures unspecified fields such as SubnetId and KeyName.
# For more documentation on available fields, see
# http://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances
node_config:
InstanceType: m5.large
ray.worker.default... |
74 | # You can also set custom resources.
# For example, to mark a node type as having 1 CPU, 1 GPU, and 5 units of a resource called "custom", set
# resources: {"CPU": 1, "GPU": 1, "custom": 5}
resources: {}
# Provider-specific config for this node type, e.g., instance type. By default
... |
75 | Assuming you have stored this configuration in a file called cluster.yaml, you can now launch an AWS cluster as follows:
ray submit cluster.yaml example.py --start
Learn more about launching Ray Clusters on AWS, GCP, Azure, and more
Clusters: Launching a Ray Cluster on Kubernetes
Ray programs can run on a sin... |
76 | Ray Dashboard: Web GUI to monitor and debug Ray
Ray dashboard provides a visual interface that displays real-time system metrics, node-level resource monitoring, job profiling, and task visualizations. The dashboard is designed to help users understand the performance of their Ray applications and identify potentia... |
77 | Note
To get started with the state API, install the default installation as follows:
pip install -U "ray[default]"
Run the following code.
import ray
import time
ray.init(num_cpus=4)
@ray.remote
def task_running_300_seconds():
print("Start!")
time.sleep(300)
@ray.remote
class Actor:
def __init__(self)... |
78 | ======== Tasks Summary: 2022-07-22 08:54:38.332537 ========
Stats:
------------------------------------
total_actor_scheduled: 2
total_actor_tasks: 0
total_tasks: 2
Table (group by func_name):
------------------------------------
FUNC_OR_CLASS_NAME STATE_COUNTS TYPE
0 task_running_300_seconds RUNNING: 2 ... |
79 | Learn more about Ray State APIs
Learn More#
Ray has a rich ecosystem of resources to help you learn more about distributed computing and AI scaling.
Blog and Press#
Modern Parallel and Distributed Python: A Quick Tutorial on Ray
Why Every Python Developer Will Love Ray
Ray: A Distributed System for AI (Berkeley Ar... |
80 | Videos#
Unifying Large Scale Data Preprocessing and Machine Learning Pipelines with Ray Data | PyData 2021 (slides)
Programming at any Scale with Ray | SF Python Meetup Sept 2019
Ray for Reinforcement Learning | Data Council 2019
Scaling Interactive Pandas Workflows with Modin
Ray: A Distributed Execution Framework fo... |
81 | Ray 2.0 Architecture white paper
Ray 1.0 Architecture white paper (old)
Exoshuffle: large-scale data shuffle in Ray
RLlib paper
RLlib flow paper
Tune paper
Ray paper (old)
Ray HotOS paper (old)
If you encounter technical issues, post on the Ray discussion forum. For general questions, announcements, and community disc... |
82 | Image Classification Batch Inference with PyTorch ResNet152Beginner. Data. PyTorch.Computer Vision ray-teamObject Detection Batch Inference with PyTorch FasterRCNN_ResNet50Beginner. Data. PyTorch.Computer Vision ray-teamImage Classification Batch Inference with Hugging Face Vision TransformerBeginner. Data. Transformer... |
83 | a Text Classification ModelBeginner. Serve.Natural Language Processing ray-teamServe an Object Detection ModelBeginner. Serve.Computer Vision ray-teamServe an Inference Model on AWS NeuronCores Using FastAPIIntermediate. Serve.Natural Language Processing ray-teamServe an Inference with Stable Diffusion Model on AWS Neu... |
84 | AI Large Language Models Natural Language Processing ray-teamServe a Chatbot with Request and Response StreamingIntermediate. Serve.Generative AI Large Language Models Natural Language Processing ray-teamServing models with Triton Server in Ray ServeIntermediate. Serve.Computer Vision Generative AI ray-teamServe a Java... |
85 | and PyTorchBeginner. Train. Horovod. ray-teamTrain ResNet model with Intel GaudiBeginner. Train. PyTorch.Computer Vision community*Contributed by the Ray Community💪 ✨Train BERT model with Intel GaudiBeginner. Train. Transformers.Natural Language Processing community*Contributed by the Ray Community💪 ✨Train a text cla... |
86 | Train. Lightning.Natural Language Processing ray-teamTrain a text classifier with Hugging Face TransformersIntermediate. Train. Transformers.Natural Language Processing ray-teamFine-tune Llama-2-7b and Llama-2-70b with Intel GaudiIntermediate. Train. Accelerate. Transformers.Natural Language Processing Large Language M... |
87 | AccelerateAdvanced. Train. Accelerate. DeepSpeed. Hugging Face.Natural Language Processing Large Language Models ray-teamFine-tune a GPT-J-6B text generation model with DeepSpeed and Hugging Face TransformersAdvanced. Train. Hugging Face. DeepSpeed.Natural Language Processing Large Language Models Generative AI ray-tea... |
88 | The Ray Ecosystem#
This page lists libraries that have integrations with Ray for distributed execution
in alphabetical order.
It’s easy to add your own integration to this list.
Simply open a pull request with a few lines of text, see the dropdown below for
more information.
Adding Your Integration
To add an inte... |
89 | BuildFlow Integration
Classy Vision is a new end-to-end, PyTorch-based framework for large-scale training of state-of-the-art image and video classification models. The library features a modular, flexible design that allows anyone to train machine learning models on top of PyTorch using very simple abstract... |
90 | Dask Integration
Data-Juicer is a one-stop multimodal data processing system to make data higher-quality, juicier, and more digestible for foundation models. It integrates with Ray for distributed data processing on large-scale datasets with over 100 multimodal operators and supports TB-size dataset deduplic... |
91 | Flowdapt Integration
Flyte is a Kubernetes-native workflow automation platform for complex, mission-critical data and ML processes at scale. It has been battle-tested at Lyft, Spotify, Freenome, and others and is truly open-source.
Flyte Integration
Horovod is a distributed deep learning traini... |
92 | Analytics Zoo seamlessly scales TensorFlow, Keras and PyTorch to distributed big data (using Spark, Flink & Ray).
Intel Analytics Zoo Integration
The power of 350+ pre-trained NLP models, 100+ Word Embeddings, 50+ Sentence Embeddings, and 50+ Classifiers in 46 languages with 1 line of Python code.
NLU ... |
93 | MARS Integration
Scale your pandas workflows by changing one line of code. Modin transparently distributes the data and computation so that all you need to do is continue using the pandas API as you were before installing Modin.
Modin Integration
Prefect is an open source workflow orchestration... |
94 | PyCaret Integration
RayDP (“Spark on Ray”) enables you to easily use Spark inside a Ray program. You can use Spark to read the input data, process the data using SQL, Spark DataFrame, or Pandas (via Koalas) API, extract and transform features using Spark MLLib, and use RayDP Estimator API for distributed tra... |
95 | Scikit Learn Integration
Alibi is an open source Python library aimed at machine learning model inspection and interpretation. The focus of the library is to provide high-quality implementations of black-box, white-box, local and global explanation methods for classification and regression models.
Seldon ... |
96 | spaCy Integration
XGBoost is a popular gradient boosting library for classification and regression. It is one of the most popular tools in data science and workhorse of many top-performing Kaggle kernels.
XGBoost Integration
LightGBM is a high-performance gradient boosting library for classific... |
97 | What’s Ray Core?#
Ray Core is a powerful distributed computing framework that provides a small set of essential primitives (tasks, actors, and objects) for building and scaling distributed applications.
This walk-through introduces you to these core concepts with simple examples that demonstrate how to transform your... |
98 | ray.init()
Note
In recent versions of Ray (>=1.5), ray.init() is automatically called on the first use of a Ray remote API.
Running a Task#
Tasks are the simplest way to parallelize your Python functions across a Ray cluster. To create a task:
Decorate your function with @ray.remote to indicate it should run rem... |
99 | Calling an Actor#
While tasks are stateless, Ray actors allow you to create stateful workers that maintain their internal state between method calls.
When you instantiate a Ray actor:
Ray starts a dedicated worker process somewhere in your cluster
The actor’s methods run on that specific worker and can access and modi... |
End of preview. Expand in Data Studio
- Downloads last month
- 3