Skip to content

Commit f516541

Browse files
committed
optimize
1 parent dc0b5cb commit f516541

File tree

3 files changed

+1
-27
lines changed

3 files changed

+1
-27
lines changed

dlrover/python/common/grpc.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,6 @@ class WorkerDiagnosisData(Message):
493493
type: str = ""
494494
timestamp: int = 0
495495
content: str = ""
496-
node_id: int = -1
497-
node_type: str = ""
498496
node_rank: int = -1
499497

500498

dlrover/python/diagnosis/common/diagnosis_data.py

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ def __init__(
5252
timestamp: int = 0,
5353
data_type: str = DiagnosisDataType.GENERIC,
5454
data_content: str = "",
55-
node_id: int = -1,
56-
node_type: str = "",
5755
node_rank: int = -1,
5856
):
5957
"""
@@ -62,24 +60,12 @@ def __init__(
6260
Args:
6361
data_type (str): Type of metric. Defaults to "GENERIC".
6462
data_content (str): Content of the metric. Defaults to "".
65-
node_id (int): Node ID. Defaults to -1.
66-
node_type (str): Node type. Defaults to "".
6763
node_rank (int): Node rank. Defaults to -1.
6864
"""
6965

7066
super().__init__(timestamp, data_type, data_content)
71-
self._node_id = node_id
72-
self._node_type = node_type
7367
self._node_rank = node_rank
7468

75-
@property
76-
def node_id(self):
77-
return self._node_id
78-
79-
@property
80-
def node_type(self):
81-
return self._node_type
82-
8369
@property
8470
def node_rank(self):
8571
return self._node_rank
@@ -91,8 +77,6 @@ def __init__(
9177
timestamp: int = 0,
9278
data_type: str = DiagnosisDataType.GENERIC,
9379
data_content: str = "",
94-
node_id: int = -1,
95-
node_type: str = "",
9680
node_rank: int = -1,
9781
is_final_result=False,
9882
need_report=False,
@@ -107,14 +91,10 @@ def __init__(
10791
result or not. Defaults to False.
10892
need_report (bool, optional): Whether the metric needs
10993
report(to Brain). Defaults to False.
110-
node_id (int): Node ID. Defaults to -1.
111-
node_type (str): Node type. Defaults to "".
11294
node_rank (int): Node rank. Defaults to -1.
11395
"""
11496

115-
super().__init__(
116-
timestamp, data_type, data_content, node_id, node_type, node_rank
117-
)
97+
super().__init__(timestamp, data_type, data_content, node_rank)
11898
self._is_final_result = is_final_result
11999
self._need_report = need_report
120100

@@ -144,8 +124,6 @@ def __init__(self, timestamp: int = 0, logs: List[str] = None):
144124
timestamp,
145125
DiagnosisDataType.TRAINING_LOG,
146126
data_content,
147-
env_utils.get_node_id(),
148-
env_utils.get_node_type(),
149127
env_utils.get_node_rank(),
150128
)
151129

dlrover/python/elastic_agent/master_client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,6 @@ def report_diagnosis_agent_metrics(self, data: WorkerDiagnosisData):
387387
data.data_type,
388388
data.timestamp,
389389
data.data_content,
390-
data.node_id,
391-
data.node_type,
392390
data.node_rank,
393391
)
394392
self._report(message)

0 commit comments

Comments
 (0)