On 09/28/2018 04:45 PM, Javier López wrote:
On Fri, Sep 28, 2018 at 8:46 PM Andreas Mueller <t3k...@gmail.com
<mailto:t3k...@gmail.com>> wrote:
Basically what you're saying is that you're fine with versioning the
models and having the model break loudly if anything changes.
That's not actually what most people want. They want to be able to
make
predictions with a given model for ever into the future.
Are we talking about "(the new version of) the old model can still
make predictions" or "the old model makes exactly the same predictions
as before"? I'd like the first to hold, don't care that much about the
second.
The second.
We're now storing the version of scikit-learn that was used in the
pickle and warn if you're trying to load with a different version.
This is not the whole truth. Yes, you store the sklearn version on the
pickle and raise a warning; I am mostly ok with that, but the pickles
are brittle and oftentimes they stop loading when other versions of
other stuff change. I am not talking about "Warning: wrong version",
but rather "Unpickling error: expected bytes, found tuple" that
prevent the file from loading entirely.
Can you give examples of that? That shouldn't really happen afaik.
That's basically a stricter test than what you wanted. Yes, there are
false positives, but given that this release took a year,
this doesn't seem that big an issue?
1. Things in the current state break when something else changes, not
only sklearn.
2. Sharing pickles is a bad practice due to a number of reasons.
3. We might want to explore model parameters without having to load
the entire runtime
I agree, it would be great to have something other than pickle, but as I
said, the usual request is "I want a way for a model to make the same
predictions in the future".
If you have a way to do that with a text-based format that doesn't
require writing lots of version converters I'd be very happy.
Generally, what you want is not to store the model but to store the
prediction function, and have separate runtimes for training and prediction.
It might not be possible to represent a model from a previous version of
scikit-learn in a newer version.
_______________________________________________
scikit-learn mailing list
scikit-learn@python.org
https://mail.python.org/mailman/listinfo/scikit-learn