Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -21,7 +21,7 @@ model-index:
|
|
| 21 |
type: OpenAI/Gym/Box2d-BipedalWalker-v3
|
| 22 |
metrics:
|
| 23 |
- type: mean_reward
|
| 24 |
-
value:
|
| 25 |
name: mean_reward
|
| 26 |
---
|
| 27 |
|
|
@@ -67,10 +67,10 @@ import torch
|
|
| 67 |
|
| 68 |
# Pull model from files which are git cloned from huggingface
|
| 69 |
policy_state_dict = torch.load("pytorch_model.bin", map_location=torch.device("cpu"))
|
| 70 |
-
cfg = EasyDict(Config.file_to_dict("policy_config.py"))
|
| 71 |
# Instantiate the agent
|
| 72 |
agent = DDPGAgent(
|
| 73 |
-
|
| 74 |
)
|
| 75 |
# Continue training
|
| 76 |
agent.train(step=5000)
|
|
@@ -98,7 +98,7 @@ from huggingface_ding import pull_model_from_hub
|
|
| 98 |
policy_state_dict, cfg = pull_model_from_hub(repo_id="OpenDILabCommunity/BipedalWalker-v3-DDPG")
|
| 99 |
# Instantiate the agent
|
| 100 |
agent = DDPGAgent(
|
| 101 |
-
|
| 102 |
exp_name="BipedalWalker-v3-DDPG",
|
| 103 |
cfg=cfg.exp_config,
|
| 104 |
policy_state_dict=policy_state_dict
|
|
@@ -128,7 +128,7 @@ from ding.bonus import DDPGAgent
|
|
| 128 |
from huggingface_ding import push_model_to_hub
|
| 129 |
|
| 130 |
# Instantiate the agent
|
| 131 |
-
agent = DDPGAgent("
|
| 132 |
# Train the agent
|
| 133 |
return_ = agent.train(step=int(200000))
|
| 134 |
# Push model to huggingface hub
|
|
@@ -145,7 +145,8 @@ push_model_to_hub(
|
|
| 145 |
usage_file_by_git_clone="./ddpg/bipedalwalker_ddpg_deploy.py",
|
| 146 |
usage_file_by_huggingface_ding="./ddpg/bipedalwalker_ddpg_download.py",
|
| 147 |
train_file="./ddpg/bipedalwalker_ddpg.py",
|
| 148 |
-
repo_id="OpenDILabCommunity/BipedalWalker-v3-DDPG"
|
|
|
|
| 149 |
)
|
| 150 |
|
| 151 |
```
|
|
@@ -224,6 +225,7 @@ exp_config = {
|
|
| 224 |
'render_freq': -1,
|
| 225 |
'mode': 'train_iter'
|
| 226 |
},
|
|
|
|
| 227 |
'cfg_type': 'InteractionSerialEvaluatorDict',
|
| 228 |
'stop_value': 10000000000,
|
| 229 |
'n_episode': 5
|
|
@@ -265,7 +267,7 @@ exp_config = {
|
|
| 265 |
|
| 266 |
**Training Procedure**
|
| 267 |
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 268 |
-
- **Weights & Biases (wandb):** [monitor link](https://wandb.ai/
|
| 269 |
|
| 270 |
## Model Information
|
| 271 |
<!-- Provide the basic links for the model. -->
|
|
@@ -274,14 +276,14 @@ exp_config = {
|
|
| 274 |
- **Configuration:** [config link](https://huggingface.co/OpenDILabCommunity/BipedalWalker-v3-DDPG/blob/main/policy_config.py)
|
| 275 |
- **Demo:** [video](https://huggingface.co/OpenDILabCommunity/BipedalWalker-v3-DDPG/blob/main/replay.mp4)
|
| 276 |
<!-- Provide the size information for the model. -->
|
| 277 |
-
- **Parameters total size:**
|
| 278 |
-
- **Last Update Date:** 2023-
|
| 279 |
|
| 280 |
## Environments
|
| 281 |
<!-- 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. -->
|
| 282 |
- **Benchmark:** OpenAI/Gym/Box2d
|
| 283 |
- **Task:** BipedalWalker-v3
|
| 284 |
- **Gym version:** 0.25.1
|
| 285 |
-
- **DI-engine version:** v0.4.
|
| 286 |
-
- **PyTorch version:**
|
| 287 |
- **Doc**: [DI-engine-docs Environments link](https://di-engine-docs.readthedocs.io/en/latest/13_envs/bipedalwalker.html)
|
|
|
|
| 21 |
type: OpenAI/Gym/Box2d-BipedalWalker-v3
|
| 22 |
metrics:
|
| 23 |
- type: mean_reward
|
| 24 |
+
value: 225.39 +/- 112.62
|
| 25 |
name: mean_reward
|
| 26 |
---
|
| 27 |
|
|
|
|
| 67 |
|
| 68 |
# Pull model from files which are git cloned from huggingface
|
| 69 |
policy_state_dict = torch.load("pytorch_model.bin", map_location=torch.device("cpu"))
|
| 70 |
+
cfg = EasyDict(Config.file_to_dict("policy_config.py").cfg_dict)
|
| 71 |
# Instantiate the agent
|
| 72 |
agent = DDPGAgent(
|
| 73 |
+
env_id="BipedalWalker-v3", exp_name="BipedalWalker-v3-DDPG", cfg=cfg.exp_config, policy_state_dict=policy_state_dict
|
| 74 |
)
|
| 75 |
# Continue training
|
| 76 |
agent.train(step=5000)
|
|
|
|
| 98 |
policy_state_dict, cfg = pull_model_from_hub(repo_id="OpenDILabCommunity/BipedalWalker-v3-DDPG")
|
| 99 |
# Instantiate the agent
|
| 100 |
agent = DDPGAgent(
|
| 101 |
+
env_id="BipedalWalker-v3",
|
| 102 |
exp_name="BipedalWalker-v3-DDPG",
|
| 103 |
cfg=cfg.exp_config,
|
| 104 |
policy_state_dict=policy_state_dict
|
|
|
|
| 128 |
from huggingface_ding import push_model_to_hub
|
| 129 |
|
| 130 |
# Instantiate the agent
|
| 131 |
+
agent = DDPGAgent(env_id="BipedalWalker-v3", exp_name="BipedalWalker-v3-DDPG")
|
| 132 |
# Train the agent
|
| 133 |
return_ = agent.train(step=int(200000))
|
| 134 |
# Push model to huggingface hub
|
|
|
|
| 145 |
usage_file_by_git_clone="./ddpg/bipedalwalker_ddpg_deploy.py",
|
| 146 |
usage_file_by_huggingface_ding="./ddpg/bipedalwalker_ddpg_download.py",
|
| 147 |
train_file="./ddpg/bipedalwalker_ddpg.py",
|
| 148 |
+
repo_id="OpenDILabCommunity/BipedalWalker-v3-DDPG",
|
| 149 |
+
create_repo=False
|
| 150 |
)
|
| 151 |
|
| 152 |
```
|
|
|
|
| 225 |
'render_freq': -1,
|
| 226 |
'mode': 'train_iter'
|
| 227 |
},
|
| 228 |
+
'figure_path': None,
|
| 229 |
'cfg_type': 'InteractionSerialEvaluatorDict',
|
| 230 |
'stop_value': 10000000000,
|
| 231 |
'n_episode': 5
|
|
|
|
| 267 |
|
| 268 |
**Training Procedure**
|
| 269 |
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 270 |
+
- **Weights & Biases (wandb):** [monitor link](https://wandb.ai/zjowowen/BipedalWalker-v3-DDPG)
|
| 271 |
|
| 272 |
## Model Information
|
| 273 |
<!-- Provide the basic links for the model. -->
|
|
|
|
| 276 |
- **Configuration:** [config link](https://huggingface.co/OpenDILabCommunity/BipedalWalker-v3-DDPG/blob/main/policy_config.py)
|
| 277 |
- **Demo:** [video](https://huggingface.co/OpenDILabCommunity/BipedalWalker-v3-DDPG/blob/main/replay.mp4)
|
| 278 |
<!-- Provide the size information for the model. -->
|
| 279 |
+
- **Parameters total size:** 2690.66 KB
|
| 280 |
+
- **Last Update Date:** 2023-09-22
|
| 281 |
|
| 282 |
## Environments
|
| 283 |
<!-- 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. -->
|
| 284 |
- **Benchmark:** OpenAI/Gym/Box2d
|
| 285 |
- **Task:** BipedalWalker-v3
|
| 286 |
- **Gym version:** 0.25.1
|
| 287 |
+
- **DI-engine version:** v0.4.9
|
| 288 |
+
- **PyTorch version:** 2.0.1+cu117
|
| 289 |
- **Doc**: [DI-engine-docs Environments link](https://di-engine-docs.readthedocs.io/en/latest/13_envs/bipedalwalker.html)
|