question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sklearn shouldn't warn when unpickling an Estimator with a different patch version

See original GitHub issue

Description

I pickled an estimator with sklearn 0.22.0 and I’m trying to unpickle it with 0.22.1.

Expected Results

No warning since this is a patch version change, there should be no breaking changes.

Actual Results

I got the following warning:

UserWarning: Trying to unpickle estimator MinMaxScaler from version 0.22 when using version 0.22.1. This might lead to breaking code or invalid results. Use at your own risk.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
victornoelcommented, Jan 9, 2020

@amueller thanks for the clarification.

Basically your point is that pickling is not a public API. The reason I created this issue is that because from my usage, I believed that pickling of models was part of the public API. It seems I was mistaken 😃

Actually you do have documentation on this here and after reading it (I didn’t before), I now believe there exist better alternative than pickling to achieve model persistence in case backward compatibility is important.

0reactions
tinaroootcommented, Mar 16, 2022

Fuck, just changing a version at random will kill people when migrating code

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Trying to unpickle estimator LinearRegression from version X ...
1 when using version 1.0. 2. This might lead to breaking code or invalid results.
Read more >
How to Fix FutureWarning Messages in scikit-learn
Suppressing warnings might be a quick fix for R&D work, but should not be used in a production system. Worse than simply ignoring...
Read more >
scikit-learn user guide
When unpickling a scikit-learn estimator in a different version than the one the estimator was trained with, a.
Read more >
how to resolve sklearn version mismatch - Alteryx Community
I'm trying to use the sklearn Python library in a workflow. ... to unpickle estimator MLPRegressor from version 0.19.2 when using version ......
Read more >
Developing custom scikit-learn transformers and estimators
scikit -learn offers a wide range of Machine Learning models, but it goes way beyond that by providing other tools such as hyperparameter ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found