Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
VisualDL
提交
26e029ae
V
VisualDL
项目概览
PaddlePaddle
/
VisualDL
大约 1 年 前同步成功
通知
88
Star
4655
Fork
642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
5
Wiki
分析
仓库
DevOps
项目成员
Pages
V
VisualDL
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
5
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
26e029ae
编写于
12月 05, 2022
作者:
C
chenjian
提交者:
GitHub
12月 05, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix a bug when device info not exists in json format (#1166) (#1176)
上级
4aec1570
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
22 addition
and
9 deletion
+22
-9
visualdl/component/profiler/parser/event_node.py
visualdl/component/profiler/parser/event_node.py
+10
-4
visualdl/component/profiler/profiler_data.py
visualdl/component/profiler/profiler_data.py
+2
-0
visualdl/component/profiler/profiler_reader.py
visualdl/component/profiler/profiler_reader.py
+6
-2
visualdl/component/profiler/profiler_server.py
visualdl/component/profiler/profiler_server.py
+4
-0
visualdl/component/profiler/run_manager.py
visualdl/component/profiler/run_manager.py
+0
-3
未找到文件。
visualdl/component/profiler/parser/event_node.py
浏览文件 @
26e029ae
...
...
@@ -265,10 +265,16 @@ class ProfilerResult:
def
parse_json
(
self
,
json_data
):
self
.
schema_version
=
json_data
[
'schemaVersion'
]
self
.
span_idx
=
json_data
[
'span_indx'
]
self
.
device_infos
=
{
device_info
[
'id'
]:
device_info
for
device_info
in
json_data
[
'deviceProperties'
]
}
try
:
self
.
device_infos
=
{
device_info
[
'id'
]:
device_info
for
device_info
in
json_data
[
'deviceProperties'
]
}
except
Exception
:
print
(
"paddlepaddle-gpu version is needed to get GPU device informations."
)
self
.
device_infos
=
{}
hostnodes
=
[]
runtimenodes
=
[]
devicenodes
=
[]
...
...
visualdl/component/profiler/profiler_data.py
浏览文件 @
26e029ae
...
...
@@ -1767,6 +1767,8 @@ class DistributedProfilerData:
data
=
[]
for
profile_data
in
self
.
profile_datas
:
device_infos
=
profile_data
.
device_infos
if
not
device_infos
:
return
data
gpu_id
=
int
(
next
(
iter
(
profile_data
.
gpu_ids
)))
data
.
append
({
'worker_name'
:
...
...
visualdl/component/profiler/profiler_reader.py
浏览文件 @
26e029ae
...
...
@@ -14,6 +14,7 @@
# =======================================================================
import
os
import
re
from
threading
import
Lock
from
threading
import
Thread
import
packaging.version
...
...
@@ -28,6 +29,7 @@ from .run_manager import RunManager
from
visualdl.io
import
bfile
_name_pattern
=
re
.
compile
(
r
"(.+)_time_(.+)\.paddle_trace\.((pb)|(json))"
)
_lock
=
Lock
()
def
is_VDLProfiler_file
(
path
):
...
...
@@ -118,8 +120,10 @@ class ProfilerReader(object):
self
.
run_managers
[
run
]
=
RunManager
(
run
)
self
.
run_managers
[
run
].
set_all_filenames
(
filenames
)
for
filename
in
filenames
:
if
self
.
run_managers
[
run
].
has_handled
(
filename
):
continue
with
_lock
:
# we add this to prevent parallel requests for handling a file multiple times
if
self
.
run_managers
[
run
].
has_handled
(
filename
):
continue
self
.
run_managers
[
run
].
handled_filenames
.
add
(
filename
)
self
.
_read_data
(
run
,
filename
)
return
list
(
self
.
walks
.
keys
())
...
...
visualdl/component/profiler/profiler_server.py
浏览文件 @
26e029ae
...
...
@@ -194,6 +194,8 @@ class ProfilerApi(object):
run_manager
=
self
.
_reader
.
get_run_manager
(
run
)
distributed_profiler_data
=
run_manager
.
get_distributed_profiler_data
(
span
)
if
distributed_profiler_data
is
None
:
return
return
distributed_profiler_data
.
get_distributed_steps
()
@
result
()
...
...
@@ -201,6 +203,8 @@ class ProfilerApi(object):
run_manager
=
self
.
_reader
.
get_run_manager
(
run
)
distributed_profiler_data
=
run_manager
.
get_distributed_profiler_data
(
span
)
if
distributed_profiler_data
is
None
:
return
return
distributed_profiler_data
.
get_distributed_histogram
(
step
,
time_unit
)
...
...
visualdl/component/profiler/run_manager.py
浏览文件 @
26e029ae
...
...
@@ -104,11 +104,8 @@ class RunManager:
return
def
join
(
self
):
if
self
.
has_join
:
return
for
thread
in
self
.
threads
.
values
():
thread
.
join
()
self
.
has_join
=
True
distributed_profiler_data
=
defaultdict
(
list
)
for
worker_name
,
span_data
in
self
.
profiler_data
.
items
():
for
span_idx
,
profiler_data
in
span_data
.
items
():
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录