No description
Find a file
Ion ee3718c80c Ion and Philipp's table retries (#10)
* Ion and Philipp's table retries

* Refactor the retry struct:
- Rename it from retry_struct to retry_info
- Retry information contains the failure callback, not the retry callback
- All functions take in retry information as an arg instead of its expanded fields

* Rename cb -> callback

* Remove prints

* Fix compiler warnings

* Change some CHECKs to greatest ASSERTs

* Key outstanding callbacks hash table with timer ID instead of callback data pointer

* Use the new retry API for table commands

* Memory cleanup in plasma unit tests

* fix Robert's comments

* add valgrind for common
2016-10-29 15:22:33 -07:00
.travis Changes to make tests pass on Travis. (#3) 2016-10-25 22:39:21 -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 Update documentation (#445) 2016-10-12 15:41:00 -07:00
docker Migrate repositories to ray-project. (#438) 2016-09-17 00:52:05 -07:00
examples Update documentation (#445) 2016-10-12 15:41:00 -07:00
lib/python Pip install numbuf. (#8) 2016-10-28 14:30:20 -07:00
scripts Remove unnecessary files. (#4) 2016-10-26 23:24:40 -07:00
src Ion and Philipp's table retries (#10) 2016-10-29 15:22:33 -07:00
test Pip install numbuf. (#8) 2016-10-28 14:30:20 -07:00
thirdparty Changes to make tests pass on Travis. (#3) 2016-10-25 22:39:21 -07:00
vsprojects Update Windows support (#317) 2016-07-28 13:11:13 -07:00
.clang-format Changes to make tests pass on Travis. (#3) 2016-10-25 22:39:21 -07:00
.editorconfig Update Windows support (#317) 2016-07-28 13:11:13 -07:00
.gitignore Update .gitignore file. (#7) 2016-10-28 11:40:08 -07:00
.travis.yml Ion and Philipp's table retries (#10) 2016-10-29 15:22:33 -07:00
build-docker.sh Migrate repositories to ray-project. (#438) 2016-09-17 00:52:05 -07:00
build.sh Changes to make tests pass on Travis. (#3) 2016-10-25 22:39:21 -07:00
CMakeLists.txt Add hiredis to build (#395) 2016-09-01 20:15:00 -07:00
install-dependencies.sh Pip install numbuf. (#8) 2016-10-28 14:30:20 -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 Update Windows support (#317) 2016-07-28 13:11:13 -07:00
README.md Migrate repositories to ray-project. (#438) 2016-09-17 00:52:05 -07:00
setup-env.sh Export GRPC environment variable in Python instead of in setup-env.sh (#382) 2016-08-18 15:39:19 -07:00

Ray

Build Status

Ray is an experimental distributed extension of Python. It is under development and not ready to be used.

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 numpy as np

# Start a scheduler, an object store, and some workers.
ray.init(start_ray_local=True, num_workers=10)

# Define a remote function for estimating pi.
@ray.remote
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)

# Launch 10 tasks, each of which estimates pi.
result_ids = []
for _ in range(10):
  result_ids.append(estimate_pi.remote(100))

# Fetch the results of the tasks and print their average.
estimate = np.mean(ray.get(result_ids))
print "Pi is approximately {}.".format(estimate)

Within the for loop, each call to estimate_pi.remote(100) sends a message to the scheduler asking it to schedule the task of running 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 ID, which represents the eventual output of the computation (this is a similar to a Future).

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

Next Steps

Example Applications