I want to create a model instance and then save it so I can load and solve at a later time (the initialization takes quite long compared to the solving).
When I tried this i
The solution is the cloudpickle module, regular pickle has problems pickling functions. An example:
import cloudpickle
with open('test.pkl', mode='wb') as file:
cloudpickle.dump(instance, file)
with open('test.pkl', mode='rb') as file:
instance = cloudpickle.load(file)