zhangpaipai
commited on
Commit
•
ca7f2e6
1
Parent(s):
5206977
Upload policy_config.py with huggingface_hub
Browse files- policy_config.py +88 -0
policy_config.py
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
exp_config = {
|
2 |
+
'env': {
|
3 |
+
'manager': {
|
4 |
+
'episode_num': float("inf"),
|
5 |
+
'max_retry': 1,
|
6 |
+
'retry_type': 'reset',
|
7 |
+
'auto_reset': True,
|
8 |
+
'step_timeout': None,
|
9 |
+
'reset_timeout': None,
|
10 |
+
'retry_waiting_time': 0.1,
|
11 |
+
'cfg_type': 'BaseEnvManagerDict'
|
12 |
+
},
|
13 |
+
'stop_value': -200,
|
14 |
+
'n_evaluator_episode': 5,
|
15 |
+
'collector_env_num': 8,
|
16 |
+
'evaluator_env_num': 5,
|
17 |
+
'act_scale': True
|
18 |
+
},
|
19 |
+
'policy': {
|
20 |
+
'model': {
|
21 |
+
'action_space': 'continuous',
|
22 |
+
'obs_shape': 3,
|
23 |
+
'action_shape': 1
|
24 |
+
},
|
25 |
+
'learn': {
|
26 |
+
'learner': {
|
27 |
+
'train_iterations': 1000000000,
|
28 |
+
'dataloader': {
|
29 |
+
'num_workers': 0
|
30 |
+
},
|
31 |
+
'log_policy': True,
|
32 |
+
'hook': {
|
33 |
+
'load_ckpt_before_run': '',
|
34 |
+
'log_show_after_iter': 100,
|
35 |
+
'save_ckpt_after_iter': 10000,
|
36 |
+
'save_ckpt_after_run': True
|
37 |
+
},
|
38 |
+
'cfg_type': 'BaseLearnerDict'
|
39 |
+
},
|
40 |
+
'batch_size': 200,
|
41 |
+
'learning_rate': 0.001,
|
42 |
+
'entropy_weight': 0.001,
|
43 |
+
'grad_norm': 5,
|
44 |
+
'ignore_done': False
|
45 |
+
},
|
46 |
+
'collect': {
|
47 |
+
'collector': {
|
48 |
+
'get_train_sample': True
|
49 |
+
},
|
50 |
+
'unroll_len': 1,
|
51 |
+
'discount_factor': 0.99,
|
52 |
+
'n_episode': 20
|
53 |
+
},
|
54 |
+
'eval': {
|
55 |
+
'evaluator': {
|
56 |
+
'eval_freq': 200,
|
57 |
+
'render': {
|
58 |
+
'render_freq': -1,
|
59 |
+
'mode': 'train_iter'
|
60 |
+
},
|
61 |
+
'cfg_type': 'InteractionSerialEvaluatorDict',
|
62 |
+
'stop_value': -200,
|
63 |
+
'n_episode': 5
|
64 |
+
}
|
65 |
+
},
|
66 |
+
'other': {
|
67 |
+
'replay_buffer': {}
|
68 |
+
},
|
69 |
+
'on_policy': True,
|
70 |
+
'cuda': False,
|
71 |
+
'multi_gpu': False,
|
72 |
+
'bp_update_sync': True,
|
73 |
+
'traj_len_inf': False,
|
74 |
+
'type': 'pg',
|
75 |
+
'action_space': 'continuous',
|
76 |
+
'deterministic_eval': True,
|
77 |
+
'cfg_type': 'PGPolicyDict'
|
78 |
+
},
|
79 |
+
'exp_name': 'Pendulum-v1-PG',
|
80 |
+
'seed': 0,
|
81 |
+
'wandb_logger': {
|
82 |
+
'gradient_logger': True,
|
83 |
+
'video_logger': True,
|
84 |
+
'plot_logger': True,
|
85 |
+
'action_logger': True,
|
86 |
+
'return_logger': False
|
87 |
+
}
|
88 |
+
}
|