Open edoakes opened 2 years ago
cc @ericl @pcmoritz for API issues
@jjyao I think we should standardize this for Ray 2.0. In the meantime, I'm trying to accomplish something quite simple: I just want to get the NodeID
for all of the nodes currently connected to the cluster so I can pass them into a SchedulingPolicy
. Could you please advise me on the best way to do this? It seems that ray.nodes()
should work assuming I can pass the string version of the NodeID
into the scheduling API.
@edoakes We discussed this and we decided to use hex string as the standard node id. This work is planned for 2.0.
Currently NodeAffinitySchedulingStrategy
accepts both hex string and NodeID so either will work. But after 2.0, it will only accepts hex string.
Ok, sounds good, per my question above should I be used ray.nodes
to get all NodeID
s in the cluster?
Ok, sounds good, per my question above should I be used
ray.nodes
to get allNodeID
s in the cluster?
Yes. ray.nodes() to get all nodes.
We should also audit this API for Ray 2.0... for example it seems to have both alive: True
and Alive: True
above 😅
Yea, it's currently marked as DeveloperAPI. Will this API (getting all the nodes of the cluster) be covered by observability work? @rkooo567
ray.get_runtime_context()
,ray.state.node_ids()
, andray.nodes()
all return different types for node ID. We should standardize these and make them consistent. Ideally it seems this would return aNodeID
type across all of the APIs asget_runtime_context()
does.