How ray-project/ray works
Ray is a framework for scaling Python and AI workloads from a laptop to a cluster. The central workflow starts with an application submitting tasks or creating actors; Ray executes work across a cluster and makes immutable objects available to consumers. Around that runtime, the README identifies Data, Train, Tune, RLlib, and Serve as major AI libraries, with dashboard monitoring and distributed debugging. The graph preserves these documented branches; internal links for unsampled subsystems are omitted rather than inferred.
Main entry points: worker.py Worker API · node_manager.cc Cluster scheduler · data Ray Data · rllib Reinforcement learning
Components 24
Ray Core
- Python API
python/ray/__init__.py - Worker API
python/ray/_private/worker.py - Actors
python/ray/actor.py - Task manager
src/ray/core_worker/task_manager.cc - Cluster scheduler
src/ray/raylet/node_manager.cc - Distributed objects
src/ray/object_manager/object_manager.cc - Global control store
src/ray/gcs/gcs_table_storage.h
Data Processing
- Ray Data
python/ray/data - Data utilities
python/ray/data/_internal/collections.py - Torch preprocessing
python/ray/data/preprocessors/torch.py
AI Libraries
- Distributed training
python/ray/train - Training storage
python/ray/train/_internal/storage.py - Hyperparameter tuning
python/ray/tune - Tune trials
python/ray/tune/experiment/trial.py - Reinforcement learning
rllib - RLlib rollouts
rllib/evaluation/rollout_worker.py - RLlib actor manager
rllib/utils/actor_manager.py
Model Serving
- Ray Serve
java/serve/src/main/java/io/ray/serve - Serve controller
java/serve/src/main/java/io/ray/serve/controller/ServeController.java - Request routing
java/serve/src/main/java/io/ray/serve/router/Router.java
Monitoring
- Ray Dashboard
python/ray/dashboard - Task event storage
python/ray/dashboard/modules/task_events/task_event_storage.py - Distributed debugger
python/ray/util
Other components
- Application developer
Connections 23
- Application developer → Python API: uses
README.rst - Python API → Worker API: exposes runtime
python/ray/__init__.py - Worker API → Task manager: submits work
- Worker API → Actors: creates actors
- Task manager → Cluster scheduler: schedules tasks
- Cluster scheduler → Distributed objects: coordinates objects
- Cluster scheduler → Global control store: uses cluster state
- Application developer → Ray Data: uses
README.rst - Application developer → Distributed training: uses
README.rst - Application developer → Hyperparameter tuning: uses
README.rst - Application developer → Reinforcement learning: uses
README.rst - Application developer → Ray Serve: uses
README.rst - Application developer → Ray Dashboard: monitors with
README.rst - Application developer → Distributed debugger: debugs with
README.rst - Ray Data → Data utilities: uses utilities
- Ray Data → Torch preprocessing: supports preprocessing
python/ray/data/preprocessors/torch.py - Distributed training → Training storage: persists state
python/ray/train/_internal/storage.py - Hyperparameter tuning → Tune trials: manages trials
python/ray/tune/experiment/__init__.py - Reinforcement learning → RLlib rollouts: collects rollouts
rllib/evaluation/rollout_worker.py - Reinforcement learning → RLlib actor manager: manages actors
rllib/utils/actor_manager.py - Ray Serve → Serve controller: controls deployments
java/serve/src/main/java/io/ray/serve/api/ServeControllerClient.java - Ray Serve → Request routing: routes requests
- Ray Dashboard → Task event storage: stores task events
python/ray/dashboard/modules/task_events/task_event_storage.py