Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Video recording in SOTA examples #2070

Merged
merged 13 commits into from
Apr 23, 2024
Prev Previous commit
Next Next commit
amend
  • Loading branch information
vmoens committed Apr 23, 2024
commit f11fadb976d86652f1e85e91ee7d4d71f5109ab7
3 changes: 2 additions & 1 deletion sota-implementations/cql/discrete_cql_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ logger:
eval_steps: 200
mode: online
eval_iter: 1000
video: False

# Buffer
replay_buffer:
Expand All @@ -41,7 +42,7 @@ replay_buffer:
# Optimization
optim:
utd_ratio: 1
device: cuda:0
device: null
lr: 1e-3
weight_decay: 0.0
batch_size: 256
Expand Down
8 changes: 7 additions & 1 deletion sota-implementations/cql/discrete_cql_online.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@

@hydra.main(version_base="1.1", config_path="", config_name="discrete_cql_config")
def main(cfg: "DictConfig"): # noqa: F821
device = torch.device(cfg.optim.device)
device = cfg.optim.device
if device in ("", None):
if torch.cuda.is_available():
device = "cuda:0"
else:
device = "cpu"
device = torch.device(device)

# Create logger
exp_name = generate_exp_name("DiscreteCQL", cfg.logger.exp_name)
Expand Down
Loading