question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to assign a task to a specific node(or machine)?

See original GitHub issue

Describe the problem

Suppose I have 2 machine each with one node. I make machine A the head by ray start --head --redis-port=6379 . In machine B, I make it connect with the head by ray start --redis-address=<redis-address> . Now I have the following script: @ray.remote def f(): time.sleep(0.01) return ray.services.get_node_ip_address()

With this setting, I want to assign a task node_id_address = ray.get(f.remote()) to machine A. How can I do that?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
atumanovcommented, Aug 20, 2018

We explicitly disallow exposing such topological details and using them for placement. This leads to problems. Typically, there’s an underlying reason why a user wants to place a task on a specific physical machine, e.g., data locality, task affinity, or some special resources the user knows are on that machine. In most cases you can use custom resource labels to achieve this. Here’s a good starting point for using custom resources: https://ray.readthedocs.io/en/latest/resources.html#custom-resources

1reaction
mitarcommented, Aug 20, 2018

You could define custom resource available only for machine A and then set that your task requires that resource.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there any way to assign a task to a specific node with ...
Yes, you can use the constraint stanza: The constraint allows restricting the set of eligible nodes. Constraints may filter on attributes or ...
Read more >
Supporting task execution on specific node
Documents; User Documents; Select your document; Server tab; Performance tab; Document Control; Select Customize; Choose the Cluster node. Best ...
Read more >
Tasks - cBackup - Read the Docs
Task can be assigned under Processes -> Task Assignments menu to any node or to the device. Or you can press seen on...
Read more >
Placing pods on specific nodes using node selectors
You configure cluster-wide node selectors by editing the Scheduler Operator custom resource (CR). You add labels to a node, a machine set, or...
Read more >
Assigning Pods to Nodes
You can use any of the following methods to choose where Kubernetes schedules specific Pods: nodeSelector field matching against node labels ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found