Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable starting remote ray nodes with raylet #1880

Merged
merged 1 commit into from
Apr 12, 2018

Conversation

atumanov
Copy link
Contributor

What do these changes do?

We're passing use_raylet for non-head ray nodes, to enable non-head nodes to be started with raylet instead of the local_scheduler. Currently, remote nodes start with local_scheduler even when --use-raylet is specified on the command line. This may resolve #1870.

Related issue number

#1870

@atumanov atumanov requested a review from pcmoritz April 12, 2018 03:43
Copy link
Contributor

@pcmoritz pcmoritz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

@atumanov
Copy link
Contributor Author

a simple test with two actors distributes the actors across the two raylet nodes. To reproduce:

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import ray
import sys

if len(sys.argv) < 2:
  print("USAGE: %s redis_ip:redis_port")
  sys.exit(1)

redis_addr = sys.argv[1]

@ray.remote(resources={"Actor1": 1})
class Worker1(object):

    def __init__(self):
        pass

    def get_node_ip(self):
        return ray.services.get_node_ip_address()

@ray.remote(resources={"Actor2" : 1})
class Worker2(object):

    def __init__(self):
        pass

    def get_node_ip(self):
        return ray.services.get_node_ip_address()

ray.init(redis_address=redis_addr, use_raylet=True)
ws1 = Worker1.remote()
ws2 = Worker2.remote()

print("XXX", [ray.get(ws1.get_node_ip.remote()), ray.get(ws2.get_node_ip.remote())])

Output:

XXX ['172.31.9.114', '172.31.10.237']

@@ -1551,7 +1551,8 @@ def start_ray_node(node_ip_address,
redirect_output=redirect_output,
resources=resources,
plasma_directory=plasma_directory,
huge_pages=huge_pages)
huge_pages=huge_pages,
use_raylet=use_raylet)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/4816/
Test PASSed.

@pcmoritz pcmoritz merged commit 85d3963 into ray-project:master Apr 12, 2018
@pcmoritz pcmoritz deleted the userayletremote branch April 12, 2018 05:06
royf added a commit to royf/ray that referenced this pull request Apr 22, 2018
* master: (56 commits)
  [xray] Turn on flushing to the GCS for the lineage cache (ray-project#1907)
  Single Big Object Parallel Transfer. (ray-project#1827)
  Remove num_threads as a parameter. (ray-project#1891)
  Adds Valgrind tests for multi-threaded object manager. (ray-project#1890)
  Pin cython version in docker base dependencies file. (ray-project#1898)
  Update arrow to efficiently serialize more types of numpy arrays. (ray-project#1889)
  updates (ray-project#1896)
  [DataFrame] Inherit documentation from Pandas (ray-project#1727)
  Update arrow and parquet-cpp. (ray-project#1875)
  raylet command line resource configuration plumbing (ray-project#1882)
  use raylet for remote ray nodes (ray-project#1880)
  [rllib] Propagate dim option to deepmind wrappers (ray-project#1876)
  [RLLib] DDPG (ray-project#1685)
  Lint Python files with Yapf (ray-project#1872)
  [DataFrame] Fixed repr, info, and memory_usage (ray-project#1874)
  Fix getattr compat (ray-project#1871)
  check if arrow build dir exists (ray-project#1863)
  [DataFrame] Encapsulate index and lengths into separate class (ray-project#1849)
  [DataFrame] Implemented __getattr__ (ray-project#1753)
  Add better analytics to docs (ray-project#1854)
  ...

# Conflicts:
#	python/ray/rllib/__init__.py
#	python/setup.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[XRay] GPU label support
4 participants