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

Forward compatibility of sklearn models saved with skops.io #270

Closed
tachukao opened this issue Jan 18, 2023 · 4 comments · Fixed by #290
Closed

Forward compatibility of sklearn models saved with skops.io #270

tachukao opened this issue Jan 18, 2023 · 4 comments · Fixed by #290
Labels
documentation Improvements or additions to documentation persistence Secure persistence feature

Comments

@tachukao
Copy link

Are sklearn models saved with skops.io forward compatible? For example, if I have a model trained and saved with sklearn 1.0, would it still work in sklearn 1.1?

@BenjaminBossan BenjaminBossan added question Further information is requested persistence Secure persistence feature labels Jan 19, 2023
@adrinjalali
Copy link
Member

The format doesn't fix the forward compatibility issue. scikit-learn internals change quite often, and there's nothing we can do about that, and when they change, setting the attributes from the old model won't work for new models.

But we should add this to our documentation.

@adrinjalali adrinjalali added documentation Improvements or additions to documentation and removed question Further information is requested labels Jan 19, 2023
@tachukao
Copy link
Author

@adrinjalali thanks for the clarification!

@BenjaminBossan
Copy link
Collaborator

If more questions around this topic come up, feel free to re-open the issue.

@adrinjalali
Copy link
Member

I think we can keep this issue open till we add it to our docs @BenjaminBossan

@adrinjalali adrinjalali reopened this Jan 20, 2023
BenjaminBossan added a commit to BenjaminBossan/skops that referenced this issue Feb 3, 2023
Resolves skops-dev#270

Add a section to the persistence docs that cautions about using skops to
load sklearn models saved with one version while using another version.
Refers to sklearn docs on that issue.
adrinjalali added a commit that referenced this issue Feb 28, 2023
* [skip ci] Document compatibility across versions

Resolves #270

Add a section to the persistence docs that cautions about using skops to
load sklearn models saved with one version while using another version.
Refers to sklearn docs on that issue.

* Update docs/persistence.rst

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>

* Update docs/persistence.rst

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>

* wrap lines

---------

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation persistence Secure persistence feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants