How to assign a task to a specific node(or machine)?
See original GitHub issueDescribe 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:
- Created 5 years ago
- Comments:7 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
You could define custom resource available only for machine A and then set that your task requires that resource.