Ray is a flexible, high-performance distributed execution framework.
View the codebase on GitHub.
Ray comes with libraries that accelerate deep learning and reinforcement learning development:
- Ray Tune: Hyperparameter Optimization Framework
- Ray RLlib: A Scalable Reinforcement Learning Library
|Basic Python||Distributed with Ray|
import time def f(): time.sleep(1) return 1 # Execute f serially. results = [f() for i in range(4)]
import time import ray ray.init() @ray.remote def f(): time.sleep(1) return 1 # Execute f in parallel. results = ray.get([f.remote() for i in range(4)])