Ray
ActiveDescription
Ray is a unified framework for scaling Python and AI applications from a laptop to a cluster.
Key Features
- Unified distributed runtime — scale from a single machine to a cluster without configuration overhead
- Ray AI Libraries — built-in ML libraries for Data, Training, Tuning, RL, and Serving
- Tasks and Actors — simple abstractions for stateless and stateful workloads
- Ray Serve — programmable model serving with dynamic scaling and batching
- RLlib — industry-grade reinforcement learning library with support for major RL algorithms
- Ray Tune — scalable hyperparameter tuning with parallel search algorithms
Use Cases
Categories
Quick Start
# Install Ray
pip install ray
# Initialize local Ray cluster
import ray
ray.init()
# Define remote task
@ray.remote
def square(x):
return x * x
# Execute 4 tasks in parallel
futures = [square.remote(i) for i in range(4)]
ray.get(futures)