Skip to content

Commit

Permalink
Merge pull request #196 from edbeeching/Ivan-267-set-imitation-to-cpu…
Browse files Browse the repository at this point in the history
…-device

Set sb3_imitation.py to CPU to fix error with CUDA
  • Loading branch information
Ivan-267 authored Jul 11, 2024
2 parents 30494cd + c343cb6 commit 931cd28
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/sb3_imitation.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def close_env():
policy_kwargs=policy_kwargs,
verbose=2,
tensorboard_log=f"logs/{args.experiment_name}",
device="cpu",
# seed=args.seed // Not currently supported as stable_baselines_wrapper.py seed() method is not yet implemented.
)

Expand All @@ -190,6 +191,7 @@ def close_env():
rng=rng,
policy=learner.policy,
custom_logger=logger,
device="cpu",
)
print("Starting Imitation Learning Training using BC:")
bc_trainer.train(n_epochs=args.bc_epochs)
Expand Down

0 comments on commit 931cd28

Please sign in to comment.