Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenDILab开源决策智能平台
DI-engine
提交
d6a1eaca
D
DI-engine
项目概览
OpenDILab开源决策智能平台
/
DI-engine
上一次同步 2 年多
通知
60
Star
321
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
D
DI-engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d6a1eaca
编写于
10月 01, 2021
作者:
N
niuyazhe
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test(nyz): polish unittest and fix remove ckpt dir bug
上级
13450e65
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
17 addition
and
15 deletion
+17
-15
.coveragerc
.coveragerc
+2
-0
ding/entry/tests/test_serial_entry.py
ding/entry/tests/test_serial_entry.py
+3
-3
ding/entry/tests/test_serial_entry_algo.py
ding/entry/tests/test_serial_entry_algo.py
+12
-12
未找到文件。
.coveragerc
浏览文件 @
d6a1eaca
...
...
@@ -7,9 +7,11 @@ omit =
ding/utils/k8s_helper.py
ding/config/utils.py
ding/entry/tests/test_serial_entry_algo.py
ding/entry/tests/test_serial_entry.py
ding/entry/dist_entry.py
ding/entry/cli.py
ding/entry/predefined_config.py
ding/hpc_rl/*
ding/worker/collector/tests/speed_test/*
ding/envs/env_wrappers/env_wrappers.py
ding/rl_utils/tests/test_ppg.py
ding/entry/tests/test_serial_entry.py
浏览文件 @
d6a1eaca
...
...
@@ -354,8 +354,6 @@ def test_cql():
serial_pipeline_offline
(
config
,
seed
=
0
)
except
Exception
:
assert
False
,
"pipeline fail"
finally
:
os
.
popen
(
'rm -rf default_experiment'
)
@
pytest
.
mark
.
unittest
...
...
@@ -364,10 +362,12 @@ def test_d4pg():
config
[
0
].
policy
.
learn
.
update_per_collect
=
1
try
:
serial_pipeline
(
config
,
seed
=
0
,
max_iterations
=
1
)
except
Exception
:
except
Exception
as
e
:
assert
False
,
"pipeline fail"
print
(
repr
(
e
))
@
pytest
.
mark
.
unittest
def
test_discrete_cql
():
# train expert
config
=
[
deepcopy
(
cartpole_qrdqn_config
),
deepcopy
(
cartpole_qrdqn_create_config
)]
...
...
ding/entry/tests/test_serial_entry_algo.py
浏览文件 @
d6a1eaca
...
...
@@ -395,7 +395,18 @@ def test_discrete_cql():
f
.
write
(
"27. discrete cql
\n
"
)
@
pytest
.
mark
.
algotest
# @pytest.mark.algotest
def
test_wqmix
():
config
=
[
deepcopy
(
cooperative_navigation_wqmix_config
),
deepcopy
(
cooperative_navigation_wqmix_create_config
)]
try
:
serial_pipeline
(
config
,
seed
=
0
)
except
Exception
:
assert
False
,
"pipeline fail"
with
open
(
"./algo_record.log"
,
"a+"
)
as
f
:
f
.
write
(
"28. wqmix
\n
"
)
# @pytest.mark.algotest
def
test_running_on_orchestrator
():
from
kubernetes
import
config
,
client
,
dynamic
cluster_name
=
'test-k8s-launcher'
...
...
@@ -438,17 +449,6 @@ def test_running_on_orchestrator():
launcher
.
delete_cluster
()
# @pytest.mark.algotest
def
test_wqmix
():
config
=
[
deepcopy
(
cooperative_navigation_wqmix_config
),
deepcopy
(
cooperative_navigation_wqmix_create_config
)]
try
:
serial_pipeline
(
config
,
seed
=
0
)
except
Exception
:
assert
False
,
"pipeline fail"
with
open
(
"./algo_record.log"
,
"a+"
)
as
f
:
f
.
write
(
"27. wqmix
\n
"
)
def
create_object_from_config
(
config_path
:
str
,
namespace
:
str
=
'default'
):
args
=
[
'kubectl'
,
'apply'
,
'-n'
,
namespace
,
'-f'
,
config_path
]
proc
=
subprocess
.
Popen
(
args
,
stderr
=
subprocess
.
PIPE
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录