Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Allow to pass strict=False when loading model #116

Closed
araffin opened this issue Jul 20, 2020 · 1 comment · Fixed by #138
Closed

[Feature Request] Allow to pass strict=False when loading model #116

araffin opened this issue Jul 20, 2020 · 1 comment · Fixed by #138
Assignees
Labels
enhancement New feature or request

Comments

@araffin
Copy link
Member

araffin commented Jul 20, 2020

In SB2, for load_parameters, we had a exact_match parameter to allow key mismatch when loading.
It would be nice to have that, we have to exclude optimizers state dict though.
This feature allows for instance to load models with same architecture but different names (recently there was a rename with #92 that broke previously saved policy, with strict=False we can still load the old models that are still valid).

We also had a custom_objects parameter to replace parameters on the fly, not sure if it is still needed... @Miffyli could you comment on that?

@araffin araffin added the enhancement New feature or request label Jul 20, 2020
@Miffyli Miffyli self-assigned this Jul 20, 2020
@Miffyli
Copy link
Collaborator

Miffyli commented Jul 20, 2020

I will include this in the part of reviewing over saving/loading code, currently playing around with A2C/PPO discrete performance.

I need to check if still need custom_objects parameter. I had to use it couple of times in the past to lazily skip loading some only-training-related things that were not required during evaluation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants