All Projects → DerwenAI → ray_tutorial

DerwenAI / ray_tutorial

Licence: MIT license
An introductory tutorial about leveraging Ray core features for distributed patterns.

Programming Languages

Jupyter Notebook
11667 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to ray tutorial

Mars
Mars is a tensor-based unified framework for large-scale data computation which scales numpy, pandas, scikit-learn and Python functions.
Stars: ✭ 2,308 (+3344.78%)
Mutual labels:  scikit-learn, ray
a-minimalist-guide
Walkthroughs for DSL, AirSim, the Vector Institute, and more
Stars: ✭ 37 (-44.78%)
Mutual labels:  ray, rllib
Layr
A decentralized (p2p) file storage system built atop Kademlia DHT that enforces data integrity, privacy, and availability through sharding, proofs of retrievability, redundancy, and encryption, with smart-contract powered incentive scheme
Stars: ✭ 90 (+34.33%)
Mutual labels:  distributed-systems, sharding
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.
Stars: ✭ 18,547 (+27582.09%)
Mutual labels:  ray, rllib
gym example
An example implementation of an OpenAI Gym environment used for a Ray RLlib tutorial
Stars: ✭ 25 (-62.69%)
Mutual labels:  ray, rllib
pylm
A framework to build components for high performance distributed applications.
Stars: ✭ 14 (-79.1%)
Mutual labels:  distributed-systems
suggestions-bot
A Discord bot designed to build better communities by encouraging a positive and constructive relationship between community and staff.
Stars: ✭ 22 (-67.16%)
Mutual labels:  sharding
vim-profiler
A vim plugin profiler and data plotter
Stars: ✭ 31 (-53.73%)
Mutual labels:  profiling
NimbusML-Samples
Samples for NimbusML, a Python machine learning package providing simple interoperability between ML.NET and scikit-learn components.
Stars: ✭ 31 (-53.73%)
Mutual labels:  scikit-learn
iopipe-go
Go agent for AWS Lambda metrics, tracing, profiling & analytics
Stars: ✭ 18 (-73.13%)
Mutual labels:  profiling
clockwork-firefox
Clockwork - php dev tools integrated to your browser - Firefox add-on
Stars: ✭ 22 (-67.16%)
Mutual labels:  profiling
five-minute-midas
Predicting Profitable Day Trading Positions using Decision Tree Classifiers. scikit-learn | Flask | SQLite3 | pandas | MLflow | Heroku | Streamlit
Stars: ✭ 41 (-38.81%)
Mutual labels:  scikit-learn
Azuma
A package that actually syncs your ratelimits across all your clusters on Discord.JS
Stars: ✭ 19 (-71.64%)
Mutual labels:  sharding
swift-futures
Demand-driven asynchronous programming in Swift
Stars: ✭ 32 (-52.24%)
Mutual labels:  futures
activerecord-shard for
Database Sharding Library for ActiveRecord
Stars: ✭ 16 (-76.12%)
Mutual labels:  sharding
audria
audria - A Utility for Detailed Ressource Inspection of Applications
Stars: ✭ 35 (-47.76%)
Mutual labels:  profiling
centrifuge-toolkit
Tool for visualizing and empirically analyzing information encoded in binary files
Stars: ✭ 49 (-26.87%)
Mutual labels:  scikit-learn
mongodb-cluster
MongoDB sharded cluster
Stars: ✭ 25 (-62.69%)
Mutual labels:  sharding
nact
nact ⇒ node.js + actors ⇒ your services have never been so µ
Stars: ✭ 1,003 (+1397.01%)
Mutual labels:  distributed-systems
akshare
AKShare is an elegant and simple financial data interface library for Python, built for human beings! 开源财经数据接口库
Stars: ✭ 5,155 (+7594.03%)
Mutual labels:  futures

A Guided Tour of Ray Core

An introductory tutorial about leveraging Ray core features for distributed patterns.

These examples have been tested in the following environments:

  • Ubuntu 18.04 LTS
  • macOS 11.6, Big Sur

Using:

  • Ray versions 1.7+
  • Python versions: 3.6, 3.7, 3.8

See the slides.pdf file for the presentation slide deck that accompanies this tutorial.

Getting Started

To get started use git to clone this public repository:

git clone https://github.com/DerwenAI/ray_tutorial.git
cd ray_tutorial

Getting Started with a Virtual Environment

Set up a local virtual environment and activate it:

python3 -m venv venv
source venv/bin/activate

Then use pip to install the required dependencies:

python3 -m pip install -U pip
python3 -m pip install -r requirements.txt
python3 -m ipykernel install

Alternatively, if you use conda for installing Python packages:

conda create -n ray_tutorial python=3.7
conda activate ray_tutorial
python3 -m pip install -r requirements.txt
conda install ipykernel --name Python3

Note: if you run into any problems on Python 3.8 with "wheels" during a pip installation, you may need to use the conda approach instead.

For some of the visualizations in pi.ipynb you also need to install graphviz

Then launch the JupyterLab environment to run examples in this repo:

jupyter-lab

Browse to http://localhost:8888/lab to continue.

Getting started with Docker-Compose

First, install docker and docker-compose, then:

docker-compose up -d

Docker compose will start a JupyterLab service without requiring use of a security token.

Browse to http://localhost:8888/lab to continue.

To stop this container:

docker-compose stop

Syllabus

Overview

A Guided Tour of Ray Core covers an introductory, hands-on coding tour through the core features of Ray, which provide powerful yet easy-to-use design patterns for implementing distributed systems in Python. This training includes a brief talk to provide overview of concepts, then coding for remote functions, tasks, object references and resolutions, actors, and so on.

Then we'll follow with Q&A. All code is available in notebooks in the GitHub repo.

Intended Audience

  • Python developers who want to learn how to parallelize their application code

Note: this material is not intended as an introduction to the higher level components in Ray, such as RLlib and Ray Tune.

Prerequisites

  • Some prior experience developing code in Python
  • Basic understanding of distributed systems

Key Takeaways

  • What are the Ray core features and how to use them?
  • In which contexts are the different approaches indicated?
  • Profiling methods, to decide when to make trade-offs (compute cost, memory, I/O, etc.) ?

Course Outline

  1. Introduction to Ray core features as a pattern language for distributed systems
  2. Overview of the main Ray core features and their intended usage
  3. Background, primary sources, and closely related resources about distributed systems
  4. Code samples:
  5. Profiling: comparing trade-offs and overhead
  6. Ray Summit, Anyscale Connect, developer forums, and other resources
  7. Q&A

Other Recommended Reading

Kudos

@dmatrix, @penolove, @deanwampler, @ceteri.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].