No description
Find a file
2016-07-25 16:17:17 -07:00
cmake/Modules help cmake find right python interpreter on mac (#251) 2016-07-11 12:16:10 -07:00
data load imagenet 2016-06-10 17:25:55 -07:00
doc mock cloudpickle module to allow readthedocs to work (#279) 2016-07-18 11:19:55 -07:00
examples Moved Imagenet loading library to example applications; Changed code to return filenames as well as arrays (#257) 2016-07-11 18:06:58 -07:00
include/ray RAY_BREAK_IF_DEBUGGING (#247) 2016-07-10 13:39:54 -07:00
lib/python Properly import remote functions and reusable variables on workers that register late (#290) 2016-07-25 16:17:17 -07:00
protos Properly import remote functions and reusable variables on workers that register late (#290) 2016-07-25 16:17:17 -07:00
scripts script for launching nodes on ec2 (#270) 2016-07-16 15:14:14 -07:00
src Properly import remote functions and reusable variables on workers that register late (#290) 2016-07-25 16:17:17 -07:00
test implement key value store for sharing reusable variables 2016-07-22 18:43:33 -07:00
thirdparty cleanup serialization code (#291) 2016-07-25 15:47:10 -07:00
vsprojects Suppress Visual C++ secure-iterator warning globally since I cannot just suppress them in protobuf headers (#280) 2016-07-18 12:56:37 -07:00
.editorconfig Initial editor config (#175) 2016-06-27 13:10:55 -07:00
.gitignore Ignore protobuf generated files (#200) 2016-07-02 21:07:28 -07:00
.gitmodules cleanup serialization code (#291) 2016-07-25 15:47:10 -07:00
.travis.yml Moved Imagenet loading library to example applications; Changed code to return filenames as well as arrays (#257) 2016-07-11 18:06:58 -07:00
build.sh Write computation graph to file 2016-06-27 12:20:30 -07:00
CMakeLists.txt cleanup serialization code (#291) 2016-07-25 15:47:10 -07:00
install-dependencies.sh Function serialization (#261) 2016-07-17 22:05:07 -07:00
LICENSE switching to BSD (#90) 2016-06-06 12:07:36 -07:00
pylintrc adding pylint (#233) 2016-07-08 12:39:11 -07:00
Ray.sln Visual Studio - Project cleanup, warning suppression, and removal of zlib dependency (#272) 2016-07-16 13:02:51 -07:00
README.md remove installation of dependencies from setup script (#239) 2016-07-08 20:03:21 -07:00
setup-env.sh new arrow serialization code (serialize python objects recursively) (#284) 2016-07-25 13:41:47 -07:00
setup.sh remove installation of dependencies from setup script (#239) 2016-07-08 20:03:21 -07:00

Ray

Build Status

Ray is an experimental distributed execution framework with a Python-like programming model. It is under development and not ready for general use.

The goal of Ray is to make it easy to write machine learning applications that run on a cluster while providing the development and debugging experience of working on a single machine.

Before jumping into the details, here's a simple Python example for doing a Monte Carlo estimation of pi (using multiple cores or potentially multiple machines).

import ray
import functions # See definition below

results = []
for _ in range(10):
  results.append(functions.estimate_pi(100))
estimate = np.mean([ray.get(ref) for ref in results])
print "Pi is approximately {}.".format(estimate)

This assumes that we've defined the file functions.py as below.

import ray
import numpy as np

@ray.remote([int], [float])
def estimate_pi(n):
  x = np.random.uniform(size=n)
  y = np.random.uniform(size=n)
  return 4 * np.mean(x ** 2 + y ** 2 < 1)

Within the for loop, each call to functions.estimate_pi(100) sends a message to the scheduler asking it to schedule the task of running functions.estimate_pi with the argument 100. This call returns right away without waiting for the actual estimation of pi to take place. Instead of returning a float, it returns an object reference, which represents the eventual output of the computation.

The call to ray.get(ref) takes an object reference and returns the actual estimate of pi (waiting until the computation has finished if necessary).

Next Steps

Example Applications