Ray is a flexible, high-performance distributed execution framework.
Ray is easy to install:
pip install ray
|Basic Python||Distributed with Ray|
# Execute f serially. def f(): time.sleep(1) return 1 results = [f() for i in range(4)]
# Execute f in parallel. @ray.remote def f(): time.sleep(1) return 1 ray.init() results = ray.get([f.remote() for i in range(4)])
View the codebase on GitHub.
Ray comes with libraries that accelerate deep learning and reinforcement learning development: