Skip to content

Conversation

@vl-dud
Copy link
Contributor

@vl-dud vl-dud commented Apr 3, 2025

It makes sense to specify parameter weights_only for torch.load explicitly. The default value has changed from False to True in the latest version (2.6).

@lululxvi
Copy link
Owner

lululxvi commented Apr 4, 2025

Just to confirm, using weights_only=True, it still loads optimizer state, right?

@vl-dud
Copy link
Contributor Author

vl-dud commented Apr 6, 2025

I checked, model.opt.state_dict() is the same when using weights_only=True and weights_only=False

@lululxvi lululxvi merged commit 67ec746 into lululxvi:master Apr 7, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants