zjowowen commited on
Commit
11bc9e0
·
1 Parent(s): 2b31873

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +19 -13
README.md CHANGED
@@ -21,7 +21,7 @@ model-index:
21
  type: OpenAI/Gym/MuJoCo-Hopper-v3
22
  metrics:
23
  - type: mean_reward
24
- value: 2698.5 +/- 901.84
25
  name: mean_reward
26
  ---
27
 
@@ -53,7 +53,8 @@ wget https://mujoco.org/download/mujoco210-linux-x86_64.tar.gz -O mujoco.tar.gz
53
  tar -xf mujoco.tar.gz -C ~/.mujoco
54
  echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/.mujoco/mjpro210/bin:~/.mujoco/mujoco210/bin" >> ~/.bashrc
55
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/.mujoco/mjpro210/bin:~/.mujoco/mujoco210/bin
56
- pip3 install DI-engine[common_env]
 
57
 
58
  ```
59
  </details>
@@ -76,9 +77,9 @@ import torch
76
 
77
  # Pull model from files which are git cloned from huggingface
78
  policy_state_dict = torch.load("pytorch_model.bin", map_location=torch.device("cpu"))
79
- cfg = EasyDict(Config.file_to_dict("policy_config.py"))
80
  # Instantiate the agent
81
- agent = PPOF(env="hopper", exp_name="Hopper-v3-PPO", cfg=cfg.exp_config, policy_state_dict=policy_state_dict)
82
  # Continue training
83
  agent.train(step=5000)
84
  # Render the new agent performance
@@ -104,7 +105,7 @@ from huggingface_ding import pull_model_from_hub
104
  # Pull model from Hugggingface hub
105
  policy_state_dict, cfg = pull_model_from_hub(repo_id="OpenDILabCommunity/Hopper-v3-PPO")
106
  # Instantiate the agent
107
- agent = PPOF(env="hopper", exp_name="Hopper-v3-PPO", cfg=cfg.exp_config, policy_state_dict=policy_state_dict)
108
  # Continue training
109
  agent.train(step=5000)
110
  # Render the new agent performance
@@ -130,7 +131,7 @@ from ding.bonus import PPOF
130
  from huggingface_ding import push_model_to_hub
131
 
132
  # Instantiate the agent
133
- agent = PPOF(env="hopper", exp_name="Hopper-v3-PPO")
134
  # Train the agent
135
  return_ = agent.train(step=int(10000000), collector_env_num=4, evaluator_env_num=4, debug=False)
136
  # Push model to huggingface hub
@@ -164,12 +165,14 @@ wget https://mujoco.org/download/mujoco210-linux-x86_64.tar.gz -O mujoco.tar.gz
164
  tar -xf mujoco.tar.gz -C ~/.mujoco
165
  echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/.mujoco/mjpro210/bin:~/.mujoco/mujoco210/bin" >> ~/.bashrc
166
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/.mujoco/mjpro210/bin:~/.mujoco/mujoco210/bin
167
- pip3 install DI-engine[common_env]
 
168
  ''',
169
  usage_file_by_git_clone="./ppo/hopper_ppo_deploy.py",
170
  usage_file_by_huggingface_ding="./ppo/hopper_ppo_download.py",
171
  train_file="./ppo/hopper_ppo.py",
172
- repo_id="OpenDILabCommunity/Hopper-v3-PPO"
 
173
  )
174
 
175
  ```
@@ -191,19 +194,22 @@ exp_config = {
191
  'epoch_per_collect': 10,
192
  'batch_size': 320,
193
  'learning_rate': 0.0003,
 
194
  'weight_decay': 0,
195
  'value_weight': 0.5,
196
  'entropy_weight': 0.01,
197
  'clip_ratio': 0.2,
198
  'adv_norm': True,
199
- 'value_norm': 'symlog',
200
  'ppo_param_init': True,
201
  'grad_norm': 0.5,
202
  'n_sample': 3200,
203
  'unroll_len': 1,
204
  'deterministic_eval': True,
205
  'model': {},
206
- 'cfg_type': 'PPOFPolicyDict'
 
 
207
  }
208
 
209
  ```
@@ -221,13 +227,13 @@ exp_config = {
221
  - **Demo:** [video](https://huggingface.co/OpenDILabCommunity/Hopper-v3-PPO/blob/main/replay.mp4)
222
  <!-- Provide the size information for the model. -->
223
  - **Parameters total size:** 375.3 KB
224
- - **Last Update Date:** 2023-04-13
225
 
226
  ## Environments
227
  <!-- Address questions around what environment the model is intended to be trained and deployed at, including the necessary information needed to be provided for future users. -->
228
  - **Benchmark:** OpenAI/Gym/MuJoCo
229
  - **Task:** Hopper-v3
230
  - **Gym version:** 0.25.1
231
- - **DI-engine version:** v0.4.7
232
- - **PyTorch version:** 1.7.1
233
  - **Doc**: [DI-engine-docs Environments link](https://di-engine-docs.readthedocs.io/en/latest/13_envs/mujoco.html)
 
21
  type: OpenAI/Gym/MuJoCo-Hopper-v3
22
  metrics:
23
  - type: mean_reward
24
+ value: 3795.27 +/- 26.06
25
  name: mean_reward
26
  ---
27
 
 
53
  tar -xf mujoco.tar.gz -C ~/.mujoco
54
  echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/.mujoco/mjpro210/bin:~/.mujoco/mujoco210/bin" >> ~/.bashrc
55
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/.mujoco/mjpro210/bin:~/.mujoco/mujoco210/bin
56
+ pip3 install "cython<3"
57
+ pip3 install DI-engine[common_env,video]
58
 
59
  ```
60
  </details>
 
77
 
78
  # Pull model from files which are git cloned from huggingface
79
  policy_state_dict = torch.load("pytorch_model.bin", map_location=torch.device("cpu"))
80
+ cfg = EasyDict(Config.file_to_dict("policy_config.py").cfg_dict)
81
  # Instantiate the agent
82
+ agent = PPOF(env_id="Hopper-v3", exp_name="Hopper-v3-PPO", cfg=cfg.exp_config, policy_state_dict=policy_state_dict)
83
  # Continue training
84
  agent.train(step=5000)
85
  # Render the new agent performance
 
105
  # Pull model from Hugggingface hub
106
  policy_state_dict, cfg = pull_model_from_hub(repo_id="OpenDILabCommunity/Hopper-v3-PPO")
107
  # Instantiate the agent
108
+ agent = PPOF(env_id="Hopper-v3", exp_name="Hopper-v3-PPO", cfg=cfg.exp_config, policy_state_dict=policy_state_dict)
109
  # Continue training
110
  agent.train(step=5000)
111
  # Render the new agent performance
 
131
  from huggingface_ding import push_model_to_hub
132
 
133
  # Instantiate the agent
134
+ agent = PPOF(env_id="Hopper-v3", exp_name="Hopper-v3-PPO")
135
  # Train the agent
136
  return_ = agent.train(step=int(10000000), collector_env_num=4, evaluator_env_num=4, debug=False)
137
  # Push model to huggingface hub
 
165
  tar -xf mujoco.tar.gz -C ~/.mujoco
166
  echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/.mujoco/mjpro210/bin:~/.mujoco/mujoco210/bin" >> ~/.bashrc
167
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/.mujoco/mjpro210/bin:~/.mujoco/mujoco210/bin
168
+ pip3 install "cython<3"
169
+ pip3 install DI-engine[common_env,video]
170
  ''',
171
  usage_file_by_git_clone="./ppo/hopper_ppo_deploy.py",
172
  usage_file_by_huggingface_ding="./ppo/hopper_ppo_download.py",
173
  train_file="./ppo/hopper_ppo.py",
174
+ repo_id="OpenDILabCommunity/Hopper-v3-PPO",
175
+ create_repo=False
176
  )
177
 
178
  ```
 
194
  'epoch_per_collect': 10,
195
  'batch_size': 320,
196
  'learning_rate': 0.0003,
197
+ 'lr_scheduler': None,
198
  'weight_decay': 0,
199
  'value_weight': 0.5,
200
  'entropy_weight': 0.01,
201
  'clip_ratio': 0.2,
202
  'adv_norm': True,
203
+ 'value_norm': 'baseline',
204
  'ppo_param_init': True,
205
  'grad_norm': 0.5,
206
  'n_sample': 3200,
207
  'unroll_len': 1,
208
  'deterministic_eval': True,
209
  'model': {},
210
+ 'cfg_type': 'PPOFPolicyDict',
211
+ 'env_id': 'Hopper-v3',
212
+ 'exp_name': 'Hopper-v3-PPO'
213
  }
214
 
215
  ```
 
227
  - **Demo:** [video](https://huggingface.co/OpenDILabCommunity/Hopper-v3-PPO/blob/main/replay.mp4)
228
  <!-- Provide the size information for the model. -->
229
  - **Parameters total size:** 375.3 KB
230
+ - **Last Update Date:** 2023-09-24
231
 
232
  ## Environments
233
  <!-- Address questions around what environment the model is intended to be trained and deployed at, including the necessary information needed to be provided for future users. -->
234
  - **Benchmark:** OpenAI/Gym/MuJoCo
235
  - **Task:** Hopper-v3
236
  - **Gym version:** 0.25.1
237
+ - **DI-engine version:** v0.4.9
238
+ - **PyTorch version:** 2.0.1+cu117
239
  - **Doc**: [DI-engine-docs Environments link](https://di-engine-docs.readthedocs.io/en/latest/13_envs/mujoco.html)