zjowowen commited on
Commit
3a6a8e8
1 Parent(s): c093651

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-Walker2d-v3
22
  metrics:
23
  - type: mean_reward
24
- value: 4016.46 +/- 1054.83
25
  name: mean_reward
26
  ---
27
 
@@ -53,6 +53,7 @@ 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
  ```
@@ -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 = DDPGAgent(env="Walker2d", exp_name="Walker2d-v3-DDPG", 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/Walker2d-v3-DDPG")
106
  # Instantiate the agent
107
- agent = DDPGAgent(env="Walker2d", exp_name="Walker2d-v3-DDPG", 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 DDPGAgent
130
  from huggingface_ding import push_model_to_hub
131
 
132
  # Instantiate the agent
133
- agent = DDPGAgent(env="Walker2d", exp_name="Walker2d-v3-DDPG")
134
  # Train the agent
135
  return_ = agent.train(step=int(5000000))
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="./ddpg/walker2d_ddpg_deploy.py",
170
  usage_file_by_huggingface_ding="./ddpg/walker2d_ddpg_download.py",
171
  train_file="./ddpg/walker2d_ddpg.py",
172
- repo_id="OpenDILabCommunity/Walker2d-v3-DDPG"
 
173
  )
174
 
175
  ```
@@ -194,6 +197,7 @@ exp_config = {
194
  'cfg_type': 'BaseEnvManagerDict'
195
  },
196
  'stop_value': 6000,
 
197
  'env_id': 'Walker2d-v3',
198
  'norm_obs': {
199
  'use_norm': False
@@ -203,7 +207,7 @@ exp_config = {
203
  },
204
  'collector_env_num': 1,
205
  'evaluator_env_num': 8,
206
- 'n_evaluator_episode': 8
207
  },
208
  'policy': {
209
  'model': {
@@ -252,9 +256,10 @@ exp_config = {
252
  'render_freq': -1,
253
  'mode': 'train_iter'
254
  },
 
255
  'cfg_type': 'InteractionSerialEvaluatorDict',
256
- 'n_episode': 8,
257
- 'stop_value': 6000
258
  }
259
  },
260
  'other': {
@@ -293,7 +298,7 @@ exp_config = {
293
 
294
  **Training Procedure**
295
  <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
296
- - **Weights & Biases (wandb):** [monitor link](https://wandb.ai/zhangpaipai/Walker2d-v3-DDPG)
297
 
298
  ## Model Information
299
  <!-- Provide the basic links for the model. -->
@@ -302,14 +307,14 @@ exp_config = {
302
  - **Configuration:** [config link](https://huggingface.co/OpenDILabCommunity/Walker2d-v3-DDPG/blob/main/policy_config.py)
303
  - **Demo:** [video](https://huggingface.co/OpenDILabCommunity/Walker2d-v3-DDPG/blob/main/replay.mp4)
304
  <!-- Provide the size information for the model. -->
305
- - **Parameters total size:** 563.03 KB
306
- - **Last Update Date:** 2023-04-15
307
 
308
  ## Environments
309
  <!-- 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. -->
310
  - **Benchmark:** OpenAI/Gym/MuJoCo
311
  - **Task:** Walker2d-v3
312
  - **Gym version:** 0.25.1
313
- - **DI-engine version:** v0.4.7
314
- - **PyTorch version:** 1.7.1
315
  - **Doc**: [DI-engine-docs Environments link](https://di-engine-docs.readthedocs.io/en/latest/13_envs/mujoco.html)
 
21
  type: OpenAI/Gym/MuJoCo-Walker2d-v3
22
  metrics:
23
  - type: mean_reward
24
+ value: 3565.24 +/- 1007.75
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]
58
 
59
  ```
 
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 = DDPGAgent(env_id="Walker2d-v3", exp_name="Walker2d-v3-DDPG", 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/Walker2d-v3-DDPG")
107
  # Instantiate the agent
108
+ agent = DDPGAgent(env_id="Walker2d-v3", exp_name="Walker2d-v3-DDPG", 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 = DDPGAgent(env_id="Walker2d-v3", exp_name="Walker2d-v3-DDPG")
135
  # Train the agent
136
  return_ = agent.train(step=int(5000000))
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]
170
  ''',
171
  usage_file_by_git_clone="./ddpg/walker2d_ddpg_deploy.py",
172
  usage_file_by_huggingface_ding="./ddpg/walker2d_ddpg_download.py",
173
  train_file="./ddpg/walker2d_ddpg.py",
174
+ repo_id="OpenDILabCommunity/Walker2d-v3-DDPG",
175
+ create_repo=False
176
  )
177
 
178
  ```
 
197
  'cfg_type': 'BaseEnvManagerDict'
198
  },
199
  'stop_value': 6000,
200
+ 'n_evaluator_episode': 8,
201
  'env_id': 'Walker2d-v3',
202
  'norm_obs': {
203
  'use_norm': False
 
207
  },
208
  'collector_env_num': 1,
209
  'evaluator_env_num': 8,
210
+ 'env_wrapper': 'mujoco_default'
211
  },
212
  'policy': {
213
  'model': {
 
256
  'render_freq': -1,
257
  'mode': 'train_iter'
258
  },
259
+ 'figure_path': None,
260
  'cfg_type': 'InteractionSerialEvaluatorDict',
261
+ 'stop_value': 6000,
262
+ 'n_episode': 8
263
  }
264
  },
265
  'other': {
 
298
 
299
  **Training Procedure**
300
  <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
301
+ - **Weights & Biases (wandb):** [monitor link](https://wandb.ai/zjowowen/Walker2d-v3-DDPG)
302
 
303
  ## Model Information
304
  <!-- Provide the basic links for the model. -->
 
307
  - **Configuration:** [config link](https://huggingface.co/OpenDILabCommunity/Walker2d-v3-DDPG/blob/main/policy_config.py)
308
  - **Demo:** [video](https://huggingface.co/OpenDILabCommunity/Walker2d-v3-DDPG/blob/main/replay.mp4)
309
  <!-- Provide the size information for the model. -->
310
+ - **Parameters total size:** 1126.05 KB
311
+ - **Last Update Date:** 2023-09-22
312
 
313
  ## Environments
314
  <!-- 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. -->
315
  - **Benchmark:** OpenAI/Gym/MuJoCo
316
  - **Task:** Walker2d-v3
317
  - **Gym version:** 0.25.1
318
+ - **DI-engine version:** v0.4.9
319
+ - **PyTorch version:** 2.0.1+cu117
320
  - **Doc**: [DI-engine-docs Environments link](https://di-engine-docs.readthedocs.io/en/latest/13_envs/mujoco.html)