Skip to content

Commit cacab2e

Browse files
committed
fix(nyz): add cartpole dt config
1 parent 0192aad commit cacab2e

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
from easydict import EasyDict
2+
3+
cartpole_discrete_dt_config = dict(
4+
exp_name='cartpole_dt_seed0',
5+
env=dict(
6+
collector_env_num=8,
7+
evaluator_env_num=5,
8+
n_evaluator_episode=5,
9+
stop_value=195,
10+
),
11+
dataset=dict(
12+
data_dir_prefix='./cartpole_qrdqn_generation_data_seed0/expert_demos.hdf5',
13+
rtg_scale=None,
14+
context_len=20,
15+
env_type='classic',
16+
),
17+
policy=dict(
18+
cuda=False,
19+
rtg_target=10,
20+
evaluator_env_num=5,
21+
clip_grad_norm_p=1.0,
22+
state_mean=1,
23+
state_std=0,
24+
model=dict(
25+
state_dim=4,
26+
act_dim=2,
27+
n_blocks=6,
28+
h_dim=128,
29+
context_len=20,
30+
n_heads=8,
31+
drop_p=0.1,
32+
continuous=False,
33+
),
34+
max_timestep=1000,
35+
discount_factor=0.97,
36+
nstep=3,
37+
batch_size=64,
38+
learning_rate=0.001,
39+
target_update_freq=100,
40+
kappa=1.0,
41+
min_q_weight=4.0,
42+
collect=dict(
43+
data_type='hdf5',
44+
data_path='./cartpole_qrdqn_generation_data_seed0/expert_demos.hdf5',
45+
),
46+
eval=dict(evaluator=dict(eval_freq=100, )),
47+
),
48+
)
49+
cartpole_discrete_dt_config = EasyDict(cartpole_discrete_dt_config)
50+
main_config = cartpole_discrete_dt_config
51+
cartpole_discrete_dt_create_config = dict(
52+
env=dict(
53+
type='cartpole',
54+
import_names=['dizoo.classic_control.cartpole.envs.cartpole_env'],
55+
),
56+
env_manager=dict(type='base'),
57+
policy=dict(type='dt'),
58+
)
59+
cartpole_discrete_dt_create_config = EasyDict(cartpole_discrete_dt_create_config)
60+
create_config = cartpole_discrete_dt_create_config
61+
# You can run this config with the entry file like `ding/example/dt.py`

0 commit comments

Comments
 (0)