mirror of
https://github.com/wassname/ray.git
synced 2026-07-09 06:23:29 +08:00
[Dashboard] Dashboard node grouping (#10528)
* Add RAY_NODE_ID environment var to agent * Node ralated data use node id as key * ray.init() return node id; Pass test_reporter.py * Fix lint & CI * Fix comments * Minor fixes * Fix CI * Add const to ClientID in AgentManager::Options * Use fstring * Add comments * Fix lint * Add test_multi_nodes_info Co-authored-by: 刘宝 <po.lb@antfin.com>
This commit is contained in:
@@ -783,6 +783,10 @@ cdef class CoreWorker:
|
||||
return JobID(
|
||||
CCoreWorkerProcess.GetCoreWorker().GetCurrentJobId().Binary())
|
||||
|
||||
def get_current_node_id(self):
|
||||
return ClientID(
|
||||
CCoreWorkerProcess.GetCoreWorker().GetCurrentNodeId().Binary())
|
||||
|
||||
def get_actor_id(self):
|
||||
return ActorID(
|
||||
CCoreWorkerProcess.GetCoreWorker().GetActorId().Binary())
|
||||
|
||||
@@ -121,6 +121,7 @@ cdef extern from "ray/core_worker/core_worker.h" nogil:
|
||||
|
||||
CJobID GetCurrentJobId()
|
||||
CTaskID GetCurrentTaskId()
|
||||
CClientID GetCurrentNodeId()
|
||||
const CActorID &GetActorId()
|
||||
void SetActorTitle(const c_string &title)
|
||||
void SetWebuiDisplay(const c_string &key, const c_string &message)
|
||||
|
||||
@@ -753,7 +753,8 @@ def init(
|
||||
for hook in _post_init_hooks:
|
||||
hook()
|
||||
|
||||
return _global_node.address_info
|
||||
node_id = global_worker.core_worker.get_current_node_id()
|
||||
return dict(_global_node.address_info, node_id=node_id.hex())
|
||||
|
||||
|
||||
# Functions to run as callback after a successful ray init.
|
||||
|
||||
Reference in New Issue
Block a user