3 ms·
We save the state of an object (an instance of a class with a predict() method) to disk once we have a model that we are happy with. During deployment we copy t
by aaron-santos 7y ago
We save the state of an object (an instance of a class with a predict() method) to disk once we have a model that we are happy with. During deployment we copy this file to a server which loads the file from disk and restores the state of the object on the remote machine.
We use dill[0], but there are other similar libraries.
[0] https://pypi.org/project/dill/ https://pypi.org/project/dill/