mirror of
https://github.com/saymrwulf/transformers.git
synced 2026-05-14 20:58:08 +00:00
Update unwrap_and_save_reload_schedule to use weights_only=False (#35952)
* fix * Fix --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
parent
42c8ccfd4c
commit
c600e89f5c
1 changed files with 1 additions and 1 deletions
|
|
@ -59,7 +59,7 @@ def unwrap_and_save_reload_schedule(scheduler, num_steps=10):
|
|||
file_name = os.path.join(tmpdirname, "schedule.bin")
|
||||
torch.save(scheduler.state_dict(), file_name)
|
||||
|
||||
state_dict = torch.load(file_name)
|
||||
state_dict = torch.load(file_name, weights_only=False)
|
||||
scheduler.load_state_dict(state_dict)
|
||||
return lrs
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue