Skip to content

Commit e368bb7

Browse files
authored
robust distributed data fetch (#1224)
1 parent 22e859e commit e368bb7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

visualdl/component/profiler/profiler_data.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,6 +1804,8 @@ def get_distributed_info(self):
18041804
device_infos = profile_data.device_infos
18051805
if not device_infos:
18061806
return data
1807+
if not profile_data.has_gpu:
1808+
continue
18071809
gpu_id = int(next(iter(profile_data.gpu_ids)))
18081810
data.append({
18091811
'worker_name':
@@ -1835,6 +1837,8 @@ def get_distributed_histogram(self, step, time_unit='ms'):
18351837
data['data'] = []
18361838
new_data = defaultdict(list)
18371839
for profile_data in self.profile_datas:
1840+
if not profile_data.distributed_parser:
1841+
continue
18381842
data['worker_name'].append(profile_data.worker_name)
18391843
if step != 'All':
18401844
new_data['ProfileStep'].append(
@@ -1867,6 +1871,8 @@ def get_distributed_histogram(self, step, time_unit='ms'):
18671871

18681872
def get_distributed_steps(self):
18691873
for profile_data in self.profile_datas:
1874+
if not profile_data.distributed_parser:
1875+
continue
18701876
steps = list(profile_data.distributed_time.keys())
18711877
final_steps = ['All'] + sorted(
18721878
[int(step) for step in steps if step != 'All'])

0 commit comments

Comments
 (0)