Open Aylr opened 7 years ago
Pickling is dangerous because it assumes the exact environment when objects are deserialized from disk.
A real solution would be to save a model in an environmental agnostic way, such as JSON. This is nontrivial to do. Therefore, MVP first:
When a model is saved (as a pickled TrainedSupervisedModel), also save a .json (preferable) or .txt file describing the following:
This finally struck and caused me to lose 2-3 hours on client work.
This is a small amount of work and the output from pip freeze and python --version should easily suffice.
pip freeze
python --version
Background
Pickling is dangerous because it assumes the exact environment when objects are deserialized from disk.
A real solution would be to save a model in an environmental agnostic way, such as JSON. This is nontrivial to do. Therefore, MVP first:
MVP
When a model is saved (as a pickled TrainedSupervisedModel), also save a .json (preferable) or .txt file describing the following:
Implementation Notes