/ray

An open source framework that provides a simple, universal API for building distributed applications. Ray is packaged with RLlib, a scalable reinforcement learning library, and Tune, a scalable hyperparameter tuning library.

Primary LanguagePythonApache License 2.0Apache-2.0

image

image

image

image

image

Ray provides a simple, universal API for building distributed applications.

Ray is packaged with the following libraries for accelerating machine learning workloads:

  • Tune: Scalable Hyperparameter Tuning
  • RLlib: Scalable Reinforcement Learning
  • RaySGD: Distributed Training Wrappers
  • Datasets: Flexible Distributed Data Loading (alpha)

As well as libraries for taking ML and distributed apps to production:

  • Serve: Scalable and Programmable Serving
  • Workflows: Fast, Durable Application Flows (alpha)

There are also many community integrations with Ray, including Dask, MARS, Modin, Horovod, Hugging Face, Scikit-learn, and others. Check out the full list of Ray distributed libraries here.

Install Ray with: pip install ray. For nightly wheels, see the Installation page.

Quick Start

Execute Python functions in parallel.

To use Ray's actor model:

Ray programs can run on a single machine, and can also seamlessly scale to large clusters. To execute the above Ray script in the cloud, just download this configuration file, and run:

ray submit [CLUSTER.YAML] example.py --start

Read more about launching clusters.

Tune Quick Start

image

Tune is a library for hyperparameter tuning at any scale.

To run this example, you will need to install the following:

This example runs a parallel grid search to optimize an example objective function.

If TensorBoard is installed, automatically visualize all trial results:

RLlib Quick Start

image

RLlib is an open-source library for reinforcement learning built on top of Ray that offers both high scalability and a unified API for a variety of applications.

Ray Serve Quick Start

image

Ray Serve is a scalable model-serving library built on Ray. It is:

  • Framework Agnostic: Use the same toolkit to serve everything from deep learning models built with frameworks like PyTorch or Tensorflow & Keras to Scikit-Learn models or arbitrary business logic.
  • Python First: Configure your model serving declaratively in pure Python, without needing YAMLs or JSON configs.
  • Performance Oriented: Turn on batching, pipelining, and GPU acceleration to increase the throughput of your model.
  • Composition Native: Allow you to create "model pipelines" by composing multiple models together to drive a single prediction.
  • Horizontally Scalable: Serve can linearly scale as you add more machines. Enable your ML-powered service to handle growing traffic.

To run this example, you will need to install the following:

This example runs serves a scikit-learn gradient boosting classifier.

More Information

Older documents:

Getting Involved

  • Forum: For discussions about development, questions about usage, and feature requests.
  • GitHub Issues: For reporting bugs.
  • Twitter: Follow updates on Twitter.
  • Slack: Join our Slack channel.
  • Meetup Group: Join our meetup group.
  • StackOverflow: For questions about how to use Ray.