Skip to content

Commit

Permalink
reformatted (huggingface#1129)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangsibo1129 authored and Andrew Lapp committed May 10, 2024
1 parent 1b9b397 commit 55cb862
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/scripts/ddpo.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def __init__(self, *, dtype, model_id, model_filename):
cached_path = hf_hub_download(model_id, model_filename)
except EntryNotFoundError:
cached_path = os.path.join(model_id, model_filename)
state_dict = torch.load(cached_path)
state_dict = torch.load(cached_path, map_location=torch.device("cpu"))
self.mlp.load_state_dict(state_dict)
self.dtype = dtype
self.eval()
Expand Down

0 comments on commit 55cb862

Please sign in to comment.