[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:
fyrestone
2020-09-17 01:17:29 +08:00
committed by GitHub
parent eb891e6c94
commit 50784e2496
18 changed files with 182 additions and 115 deletions
+4
View File
@@ -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())
+1
View File
@@ -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)
+2 -1
View File
@@ -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.