zjowowen commited on
Commit
9be5339
·
1 Parent(s): 805cfd5

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +15 -13
README.md CHANGED
@@ -21,7 +21,7 @@ model-index:
21
  type: OpenAI/Gym/Box2d-LunarLander-v2
22
  metrics:
23
  - type: mean_reward
24
- value: 244.37 +/- 3.77
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="lunarlander_continuous",
74
  exp_name="LunarLander-v2-TD3",
75
  cfg=cfg.exp_config,
76
  policy_state_dict=policy_state_dict
@@ -101,7 +101,7 @@ from huggingface_ding import pull_model_from_hub
101
  policy_state_dict, cfg = pull_model_from_hub(repo_id="OpenDILabCommunity/LunarLander-v2-TD3")
102
  # Instantiate the agent
103
  agent = TD3Agent(
104
- env="lunarlander_continuous",
105
  exp_name="LunarLander-v2-TD3",
106
  cfg=cfg.exp_config,
107
  policy_state_dict=policy_state_dict
@@ -131,7 +131,7 @@ from ding.bonus import TD3Agent
131
  from huggingface_ding import push_model_to_hub
132
 
133
  # Instantiate the agent
134
- agent = TD3Agent("lunarlander_continuous", exp_name="LunarLander-v2-TD3")
135
  # Train the agent
136
  return_ = agent.train(step=int(4000000), collector_env_num=4, evaluator_env_num=4)
137
  # Push model to huggingface hub
@@ -148,7 +148,8 @@ push_model_to_hub(
148
  usage_file_by_git_clone="./td3/lunarlander_td3_deploy.py",
149
  usage_file_by_huggingface_ding="./td3/lunarlander_td3_download.py",
150
  train_file="./td3/lunarlander_td3.py",
151
- repo_id="OpenDILabCommunity/LunarLander-v2-TD3"
 
152
  )
153
 
154
  ```
@@ -173,10 +174,10 @@ exp_config = {
173
  'cfg_type': 'BaseEnvManagerDict'
174
  },
175
  'stop_value': 240,
 
176
  'env_id': 'LunarLanderContinuous-v2',
177
  'collector_env_num': 4,
178
  'evaluator_env_num': 8,
179
- 'n_evaluator_episode': 8,
180
  'act_scale': True
181
  },
182
  'policy': {
@@ -229,9 +230,10 @@ exp_config = {
229
  'render_freq': -1,
230
  'mode': 'train_iter'
231
  },
 
232
  'cfg_type': 'InteractionSerialEvaluatorDict',
233
- 'n_episode': 8,
234
- 'stop_value': 240
235
  }
236
  },
237
  'other': {
@@ -279,14 +281,14 @@ exp_config = {
279
  - **Configuration:** [config link](https://huggingface.co/OpenDILabCommunity/LunarLander-v2-TD3/blob/main/policy_config.py)
280
  - **Demo:** [video](https://huggingface.co/OpenDILabCommunity/LunarLander-v2-TD3/blob/main/replay.mp4)
281
  <!-- Provide the size information for the model. -->
282
- - **Parameters total size:** 57.52 KB
283
- - **Last Update Date:** 2023-04-17
284
 
285
  ## Environments
286
  <!-- 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. -->
287
  - **Benchmark:** OpenAI/Gym/Box2d
288
  - **Task:** LunarLander-v2
289
  - **Gym version:** 0.25.1
290
- - **DI-engine version:** v0.4.7
291
- - **PyTorch version:** 1.7.1
292
  - **Doc**: [DI-engine-docs Environments link](https://di-engine-docs.readthedocs.io/en/latest/13_envs/lunarlander.html)
 
21
  type: OpenAI/Gym/Box2d-LunarLander-v2
22
  metrics:
23
  - type: mean_reward
24
+ value: 235.02 +/- 78.67
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="LunarLanderContinuous-v2",
74
  exp_name="LunarLander-v2-TD3",
75
  cfg=cfg.exp_config,
76
  policy_state_dict=policy_state_dict
 
101
  policy_state_dict, cfg = pull_model_from_hub(repo_id="OpenDILabCommunity/LunarLander-v2-TD3")
102
  # Instantiate the agent
103
  agent = TD3Agent(
104
+ env_id="LunarLanderContinuous-v2",
105
  exp_name="LunarLander-v2-TD3",
106
  cfg=cfg.exp_config,
107
  policy_state_dict=policy_state_dict
 
131
  from huggingface_ding import push_model_to_hub
132
 
133
  # Instantiate the agent
134
+ agent = TD3Agent(env_id="LunarLanderContinuous-v2", exp_name="LunarLander-v2-TD3")
135
  # Train the agent
136
  return_ = agent.train(step=int(4000000), collector_env_num=4, evaluator_env_num=4)
137
  # Push model to huggingface hub
 
148
  usage_file_by_git_clone="./td3/lunarlander_td3_deploy.py",
149
  usage_file_by_huggingface_ding="./td3/lunarlander_td3_download.py",
150
  train_file="./td3/lunarlander_td3.py",
151
+ repo_id="OpenDILabCommunity/LunarLander-v2-TD3",
152
+ create_repo=False
153
  )
154
 
155
  ```
 
174
  'cfg_type': 'BaseEnvManagerDict'
175
  },
176
  'stop_value': 240,
177
+ 'n_evaluator_episode': 8,
178
  'env_id': 'LunarLanderContinuous-v2',
179
  'collector_env_num': 4,
180
  'evaluator_env_num': 8,
 
181
  'act_scale': True
182
  },
183
  'policy': {
 
230
  'render_freq': -1,
231
  'mode': 'train_iter'
232
  },
233
+ 'figure_path': None,
234
  'cfg_type': 'InteractionSerialEvaluatorDict',
235
+ 'stop_value': 240,
236
+ 'n_episode': 8
237
  }
238
  },
239
  'other': {
 
281
  - **Configuration:** [config link](https://huggingface.co/OpenDILabCommunity/LunarLander-v2-TD3/blob/main/policy_config.py)
282
  - **Demo:** [video](https://huggingface.co/OpenDILabCommunity/LunarLander-v2-TD3/blob/main/replay.mp4)
283
  <!-- Provide the size information for the model. -->
284
+ - **Parameters total size:** 115.03 KB
285
+ - **Last Update Date:** 2023-09-22
286
 
287
  ## Environments
288
  <!-- 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. -->
289
  - **Benchmark:** OpenAI/Gym/Box2d
290
  - **Task:** LunarLander-v2
291
  - **Gym version:** 0.25.1
292
+ - **DI-engine version:** v0.4.9
293
+ - **PyTorch version:** 2.0.1+cu117
294
  - **Doc**: [DI-engine-docs Environments link](https://di-engine-docs.readthedocs.io/en/latest/13_envs/lunarlander.html)