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:
@@ -59,7 +59,7 @@ def unwrap_and_save_reload_schedule(scheduler, num_steps=10):
|
|||||||
file_name = os.path.join(tmpdirname, "schedule.bin")
|
file_name = os.path.join(tmpdirname, "schedule.bin")
|
||||||
torch.save(scheduler.state_dict(), file_name)
|
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)
|
scheduler.load_state_dict(state_dict)
|
||||||
return lrs
|
return lrs
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user