loading a model
CameliaSNCF opened this issue · comments
Hey there and thank you for using Issue Tracker!
Python version : 3.8.10
Melusine version : 2.3.2
Operating System : Windows
Hello, I am trying to save a model and then load it and test it in another notebook.
Unfortunately I can't find any exammple of this process in your documentation and I can't figure out how to load the model properly and keep having an error.
Could you give me some pointers ?
Best regards,
Camelia.
Hello Camelia,
I will be working on the library next week. I will take a look at your issue then except if someone answers you before.
Have a good week-end.
Best regards,
Tiphaine
Hello Camelia,
I think I know where your problem comes from.
Could you try the solution suggested in this issue ?
#89
import joblib
model.save_nn_model("MY_MODEL")
joblib.dump(model, "MY_MODEL.pkl", compress=True)
loaded_model = joblib.load("MY_MODEL.pkl")
loaded_model.load_nn_model("MY_MODEL")
The way Melusine models should be saved is not obvious, sorry about that
Closing the issue for now,
Feel free to re-open it if needed