zjowowen commited on
Commit
bf76f1f
1 Parent(s): 80c4bc5

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +18 -15
README.md CHANGED
@@ -21,7 +21,7 @@ model-index:
21
  type: OpenAI/Gym/ClassicControl-Pendulum-v1
22
  metrics:
23
  - type: mean_reward
24
- value: -200.85 +/- 155.78
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 = TD3Agent(
73
- env="pendulum", exp_name="Pendulum-v1-TD3", cfg=cfg.exp_config, policy_state_dict=policy_state_dict
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/Pendulum-v1-TD3")
99
  # Instantiate the agent
100
  agent = TD3Agent(
101
- env="pendulum",
102
  exp_name="Pendulum-v1-TD3",
103
  cfg=cfg.exp_config,
104
  policy_state_dict=policy_state_dict
@@ -128,7 +128,7 @@ from ding.bonus import TD3Agent
128
  from huggingface_ding import push_model_to_hub
129
 
130
  # Instantiate the agent
131
- agent = TD3Agent("pendulum", exp_name="Pendulum-v1-TD3")
132
  # Train the agent
133
  return_ = agent.train(step=int(4000000))
134
  # Push model to huggingface hub
@@ -145,7 +145,8 @@ push_model_to_hub(
145
  usage_file_by_git_clone="./td3/pendulum_td3_deploy.py",
146
  usage_file_by_huggingface_ding="./td3/pendulum_td3_download.py",
147
  train_file="./td3/pendulum_td3.py",
148
- repo_id="OpenDILabCommunity/Pendulum-v1-TD3"
 
149
  )
150
 
151
  ```
@@ -170,10 +171,11 @@ exp_config = {
170
  'cfg_type': 'BaseEnvManagerDict'
171
  },
172
  'stop_value': -250,
 
 
173
  'collector_env_num': 8,
174
  'evaluator_env_num': 5,
175
- 'act_scale': True,
176
- 'n_evaluator_episode': 5
177
  },
178
  'policy': {
179
  'model': {
@@ -227,9 +229,10 @@ exp_config = {
227
  'render_freq': -1,
228
  'mode': 'train_iter'
229
  },
 
230
  'cfg_type': 'InteractionSerialEvaluatorDict',
231
- 'n_episode': 5,
232
- 'stop_value': -250
233
  }
234
  },
235
  'other': {
@@ -268,7 +271,7 @@ exp_config = {
268
 
269
  **Training Procedure**
270
  <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
271
- - **Weights & Biases (wandb):** [monitor link](https://wandb.ai/zhangpaipai/Pendulum-v1-TD3)
272
 
273
  ## Model Information
274
  <!-- Provide the basic links for the model. -->
@@ -277,14 +280,14 @@ exp_config = {
277
  - **Configuration:** [config link](https://huggingface.co/OpenDILabCommunity/Pendulum-v1-TD3/blob/main/policy_config.py)
278
  - **Demo:** [video](https://huggingface.co/OpenDILabCommunity/Pendulum-v1-TD3/blob/main/replay.mp4)
279
  <!-- Provide the size information for the model. -->
280
- - **Parameters total size:** 53.01 KB
281
- - **Last Update Date:** 2023-04-29
282
 
283
  ## Environments
284
  <!-- 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. -->
285
  - **Benchmark:** OpenAI/Gym/ClassicControl
286
  - **Task:** Pendulum-v1
287
  - **Gym version:** 0.25.1
288
- - **DI-engine version:** v0.4.7
289
- - **PyTorch version:** 1.7.1
290
  - **Doc**: [DI-engine-docs Environments link](https://di-engine-docs.readthedocs.io/en/latest/13_envs/pendulum.html)
 
21
  type: OpenAI/Gym/ClassicControl-Pendulum-v1
22
  metrics:
23
  - type: mean_reward
24
+ value: -191.58 +/- 148.46
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 = TD3Agent(
73
+ env_id="Pendulum-v1", exp_name="Pendulum-v1-TD3", 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/Pendulum-v1-TD3")
99
  # Instantiate the agent
100
  agent = TD3Agent(
101
+ env_id="Pendulum-v1",
102
  exp_name="Pendulum-v1-TD3",
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 = TD3Agent(env_id="Pendulum-v1", exp_name="Pendulum-v1-TD3")
132
  # Train the agent
133
  return_ = agent.train(step=int(4000000))
134
  # Push model to huggingface hub
 
145
  usage_file_by_git_clone="./td3/pendulum_td3_deploy.py",
146
  usage_file_by_huggingface_ding="./td3/pendulum_td3_download.py",
147
  train_file="./td3/pendulum_td3.py",
148
+ repo_id="OpenDILabCommunity/Pendulum-v1-TD3",
149
+ create_repo=False
150
  )
151
 
152
  ```
 
171
  'cfg_type': 'BaseEnvManagerDict'
172
  },
173
  'stop_value': -250,
174
+ 'n_evaluator_episode': 5,
175
+ 'env_id': 'Pendulum-v1',
176
  'collector_env_num': 8,
177
  'evaluator_env_num': 5,
178
+ 'act_scale': True
 
179
  },
180
  'policy': {
181
  'model': {
 
229
  'render_freq': -1,
230
  'mode': 'train_iter'
231
  },
232
+ 'figure_path': None,
233
  'cfg_type': 'InteractionSerialEvaluatorDict',
234
+ 'stop_value': -250,
235
+ 'n_episode': 5
236
  }
237
  },
238
  'other': {
 
271
 
272
  **Training Procedure**
273
  <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
274
+ - **Weights & Biases (wandb):** [monitor link](https://wandb.ai/zjowowen/Pendulum-v1-TD3)
275
 
276
  ## Model Information
277
  <!-- Provide the basic links for the model. -->
 
280
  - **Configuration:** [config link](https://huggingface.co/OpenDILabCommunity/Pendulum-v1-TD3/blob/main/policy_config.py)
281
  - **Demo:** [video](https://huggingface.co/OpenDILabCommunity/Pendulum-v1-TD3/blob/main/replay.mp4)
282
  <!-- Provide the size information for the model. -->
283
+ - **Parameters total size:** 106.02 KB
284
+ - **Last Update Date:** 2023-09-22
285
 
286
  ## Environments
287
  <!-- 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. -->
288
  - **Benchmark:** OpenAI/Gym/ClassicControl
289
  - **Task:** Pendulum-v1
290
  - **Gym version:** 0.25.1
291
+ - **DI-engine version:** v0.4.9
292
+ - **PyTorch version:** 2.0.1+cu117
293
  - **Doc**: [DI-engine-docs Environments link](https://di-engine-docs.readthedocs.io/en/latest/13_envs/pendulum.html)