Skip to content

Commit

Permalink
Update runner.py to load models to correct device
Browse files Browse the repository at this point in the history
  • Loading branch information
e3ntity authored Apr 3, 2024
1 parent c7e9504 commit 96393c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rsl_rl/runners/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def _update(self) -> None:

def load(self, path: str) -> Any:
"""Restores the agent and runner state from a file."""
content = torch.load(path)
content = torch.load(path, map_location=self.device)

assert "agent" in content
assert "data" in content
Expand Down

0 comments on commit 96393c4

Please sign in to comment.