zjowowen commited on
Commit
9f0e20f
1 Parent(s): b1f271d

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +19 -14
README.md CHANGED
@@ -21,7 +21,7 @@ model-index:
21
  type: OpenAI/Gym/MuJoCo-HalfCheetah-v3
22
  metrics:
23
  - type: mean_reward
24
- value: 1569.47 +/- 83.96
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="HalfCheetah", exp_name="HalfCheetah-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/HalfCheetah-v3-PPO")
106
  # Instantiate the agent
107
- agent = PPOF(env="HalfCheetah", exp_name="HalfCheetah-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,9 +131,9 @@ from ding.bonus import PPOF
130
  from huggingface_ding import push_model_to_hub
131
 
132
  # Instantiate the agent
133
- agent = PPOF(env="HalfCheetah", exp_name="HalfCheetah-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
137
  push_model_to_hub(
138
  agent=agent.best,
@@ -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/halfcheetah_ppo_deploy.py",
170
  usage_file_by_huggingface_ding="./ppo/halfcheetah_ppo_download.py",
171
  train_file="./ppo/halfcheetah_ppo.py",
172
- repo_id="OpenDILabCommunity/HalfCheetah-v3-PPO"
 
173
  )
174
 
175
  ```
@@ -204,7 +207,9 @@ exp_config = {
204
  'unroll_len': 1,
205
  'deterministic_eval': True,
206
  'model': {},
207
- 'cfg_type': 'PPOFPolicyDict'
 
 
208
  }
209
 
210
  ```
@@ -212,7 +217,7 @@ exp_config = {
212
 
213
  **Training Procedure**
214
  <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
215
- - **Weights & Biases (wandb):** [monitor link](https://wandb.ai/ruoyugao/HalfCheetah-v3-PPO)
216
 
217
  ## Model Information
218
  <!-- Provide the basic links for the model. -->
@@ -222,13 +227,13 @@ exp_config = {
222
  - **Demo:** [video](https://huggingface.co/OpenDILabCommunity/HalfCheetah-v3-PPO/blob/main/replay.mp4)
223
  <!-- Provide the size information for the model. -->
224
  - **Parameters total size:** 385.85 KB
225
- - **Last Update Date:** 2023-06-14
226
 
227
  ## Environments
228
  <!-- 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. -->
229
  - **Benchmark:** OpenAI/Gym/MuJoCo
230
  - **Task:** HalfCheetah-v3
231
  - **Gym version:** 0.25.1
232
- - **DI-engine version:** v0.4.8
233
- - **PyTorch version:** 1.7.1
234
  - **Doc**: [DI-engine-docs Environments link](https://di-engine-docs.readthedocs.io/en/latest/13_envs/mujoco.html)
 
21
  type: OpenAI/Gym/MuJoCo-HalfCheetah-v3
22
  metrics:
23
  - type: mean_reward
24
+ value: 1390.84 +/- 49.64
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="HalfCheetah-v3", exp_name="HalfCheetah-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/HalfCheetah-v3-PPO")
107
  # Instantiate the agent
108
+ agent = PPOF(env_id="HalfCheetah-v3", exp_name="HalfCheetah-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="HalfCheetah-v3", exp_name="HalfCheetah-v3-PPO")
135
  # Train the agent
136
+ return_ = agent.train(step=int(5000000))
137
  # Push model to huggingface hub
138
  push_model_to_hub(
139
  agent=agent.best,
 
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/halfcheetah_ppo_deploy.py",
172
  usage_file_by_huggingface_ding="./ppo/halfcheetah_ppo_download.py",
173
  train_file="./ppo/halfcheetah_ppo.py",
174
+ repo_id="OpenDILabCommunity/HalfCheetah-v3-PPO",
175
+ create_repo=False
176
  )
177
 
178
  ```
 
207
  'unroll_len': 1,
208
  'deterministic_eval': True,
209
  'model': {},
210
+ 'cfg_type': 'PPOFPolicyDict',
211
+ 'env_id': 'HalfCheetah-v3',
212
+ 'exp_name': 'HalfCheetah-v3-PPO'
213
  }
214
 
215
  ```
 
217
 
218
  **Training Procedure**
219
  <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
220
+ - **Weights & Biases (wandb):** [monitor link](https://wandb.ai/zjowowen/HalfCheetah-v3-PPO)
221
 
222
  ## Model Information
223
  <!-- Provide the basic links for the model. -->
 
227
  - **Demo:** [video](https://huggingface.co/OpenDILabCommunity/HalfCheetah-v3-PPO/blob/main/replay.mp4)
228
  <!-- Provide the size information for the model. -->
229
  - **Parameters total size:** 385.85 KB
230
+ - **Last Update Date:** 2023-09-25
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:** HalfCheetah-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)