Open vondrejc opened 5 months ago
It is possible to store some models with dill https://pypi.org/project/dill/. There is a problem to load models with SLSQP optimizer because of package symengine (since this package is only optional in Windows, it is possible to load models there). Still, it would be nice to have a class method, which allows an official way how to store it without trying several packages.
Yes, indeed, we probably have to find our own way of storing the models and not solely rely on Dill. I think the biggest issue is the Executor class or the Backend class used within. We probably can't avoid reinitializing the Executor.
Is your feature request related to a problem? Please describe. At the moment, there is no simple way for saving/loading of models. I have tried pickle, joblib, cloudpickle and none of them works.
Describe the solution you'd like Enable the possibility of saving/loading of models with pickle or cloudpickle.
Describe alternatives you've considered Alternatively, one could implement get_weights(), set_weights(weights: numpy.ndarray) for storing only the weights in the same way as in keras/tensorflow https://keras.io/guides/serialization_and_saving/
Additional context Another solution is welcome!