Ray is a flexible, high-performance distributed execution framework.
Ray comes with libraries that accelerate deep learning and reinforcement learning development:
- Ray.tune: Efficient Distributed Hyperparameter Search
- Ray RLlib: A Composable and 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)])