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:
Yih-Dar 2025-01-29 14:30:57 +01:00 committed by GitHub
parent 42c8ccfd4c
commit c600e89f5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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