Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loading a model #130

Closed
CameliaSNCF opened this issue Mar 25, 2022 · 3 comments
Closed

loading a model #130

CameliaSNCF opened this issue Mar 25, 2022 · 3 comments

Comments

@CameliaSNCF
Copy link

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.

savedModel1

savedModel2

savedModel3

Could you give me some pointers ?

Best regards,
Camelia.

@TFA-MAIF
Copy link
Contributor

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

@hugo-quantmetry
Copy link
Contributor

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

@hugo-quantmetry
Copy link
Contributor

Closing the issue for now,
Feel free to re-open it if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants