Ray
Last Updated: July 29, 2026 | By Mihail Sebastian | AI Dictionary
Ray is an open-source framework for scaling Python workloads across a cluster, with libraries for distributed training, tuning, and model serving.
What is Ray?
Ray is an open-source framework for scaling Python programs from a laptop to a cluster: functions and classes marked with Ray’s decorators run as parallel tasks across many machines, and Ray handles the scheduling, data movement, and recovery when a node fails.
Ray began at UC Berkeley’s RISELab, and its creators founded Anyscale to develop it commercially. In machine learning it has become common infrastructure for work too big for one machine.
How Ray Works
The core is small. A Python function becomes a remote task, a class becomes a long-lived actor, and Ray distributes the calls across whatever cluster is available – the same script runs on one machine or five hundred.
On this core Ray ships purpose-built libraries: Ray Tune for hyperparameter tuning, Ray Train for distributed model training, RLlib for reinforcement learning, Ray Serve for model serving, and Ray Data for processing large datasets.
Example of Ray
A team’s training script finds good hyperparameters by trial and error, one run at a time – a week of waiting per search. They wrap the script in Ray Tune and point it at a 32-node cluster.
Tune launches dozens of trials in parallel, each a Ray task with its own configuration, and stops the clearly losing trials early to free capacity for promising ones. The same search finishes overnight, and the script itself barely changed.
Related AI terms: Parameter Server · Pipeline · Deploy · Hyperparameter Tuning · Model Training
Did you like the Ray gist?
Learn about 250+ need-to-know artificial intelligence terms in the AI Dictionary.
Mihail Sebastian — Writes about AI governance, regulation, and the technology behind them. Placeholder bio — replace with a real credential line. About