Skip to content

Commit

Permalink
polish(zc): change PD config name (#749)
Browse files Browse the repository at this point in the history
* add action

* change entry
  • Loading branch information
Super1ce authored Nov 6, 2023
1 parent e9a978e commit 043001b
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ding/policy/plan_diffuser.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def _init_learn(self) -> None:
self.step_start_update_target = self._cfg.learn.step_start_update_target
self.target_weight = self._cfg.learn.target_weight
self.value_step = self._cfg.learn.value_step
self.use_target = True
self.use_target = False
self.horizon = self._cfg.model.diffuser_model_cfg.horizon
self.include_returns = self._cfg.learn.include_returns

Expand Down
2 changes: 2 additions & 0 deletions ding/utils/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1090,11 +1090,13 @@ def __getitem__(self, idx, eps=1e-4):
'trajectories': trajectories,
'returns': returns,
'done': done,
'action': actions,
}
else:
batch = {
'trajectories': trajectories,
'done': done,
'action': actions,
}

batch.update(self.get_conditions(observations))
Expand Down
2 changes: 1 addition & 1 deletion dizoo/d4rl/config/antmaze_umaze_pd_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
model=dict(
diffuser_model='GaussianDiffusion',
diffuser_model_cfg=dict(
model='TemporalUnet',
model='DiffusionUNet1d',
model_cfg=dict(
transition_dim=37,
dim=32,
Expand Down
2 changes: 1 addition & 1 deletion dizoo/d4rl/config/halfcheetah_medium_expert_pd_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
model=dict(
diffuser_model='GaussianDiffusion',
diffuser_model_cfg=dict(
model='TemporalUnet',
model='DiffusionUNet1d',
model_cfg=dict(
transition_dim=23,
dim=32,
Expand Down
2 changes: 1 addition & 1 deletion dizoo/d4rl/config/halfcheetah_medium_pd_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
model=dict(
diffuser_model='GaussianDiffusion',
diffuser_model_cfg=dict(
model='TemporalUnet',
model='DiffusionUNet1d',
model_cfg=dict(
transition_dim=23,
dim=32,
Expand Down
2 changes: 1 addition & 1 deletion dizoo/d4rl/config/hopper_medium_expert_pd_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
model=dict(
diffuser_model='GaussianDiffusion',
diffuser_model_cfg=dict(
model='TemporalUnet',
model='DiffusionUNet1d',
model_cfg=dict(
transition_dim=14,
dim=32,
Expand Down
2 changes: 1 addition & 1 deletion dizoo/d4rl/config/hopper_medium_pd_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
model=dict(
diffuser_model='GaussianDiffusion',
diffuser_model_cfg=dict(
model='TemporalUnet',
model='DiffusionUNet1d',
model_cfg=dict(
transition_dim=14,
dim=32,
Expand Down
2 changes: 1 addition & 1 deletion dizoo/d4rl/config/walker2d_medium_expert_pd_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
model=dict(
diffuser_model='GaussianDiffusion',
diffuser_model_cfg=dict(
model='TemporalUnet',
model='DiffusionUNet1d',
model_cfg=dict(
transition_dim=23,
dim=32,
Expand Down
2 changes: 1 addition & 1 deletion dizoo/d4rl/config/walker2d_medium_pd_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
model=dict(
diffuser_model='GaussianDiffusion',
diffuser_model_cfg=dict(
model='TemporalUnet',
model='DiffusionUNet1d',
model_cfg=dict(
transition_dim=23,
dim=32,
Expand Down
2 changes: 1 addition & 1 deletion dizoo/d4rl/entry/d4rl_pd_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ def train(args):

parser = argparse.ArgumentParser()
parser.add_argument('--seed', '-s', type=int, default=10)
parser.add_argument('--config', '-c', type=str, default='hopper_expert_cql_config.py')
parser.add_argument('--config', '-c', type=str, default='halfcheetah_medium_pd_config.py')
args = parser.parse_args()
train(args)

0 comments on commit 043001b

Please sign in to comment.