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

Multifit inference problem #64

Open
javithe7 opened this issue Apr 15, 2020 · 2 comments
Open

Multifit inference problem #64

javithe7 opened this issue Apr 15, 2020 · 2 comments

Comments

@javithe7
Copy link

Hi everyone.
Maybe you can help me with something.
Once the multifit model is trained with my own dataset, I export it to a .pkl file, in order to use it later to make predictions. The problem comes when I load the model from a different machine than the one that trained the multifit. The model is loaded with load_learner(), but when I try to make a prediction an error related to SentencePiece appears, followed by this error message :

OSError: Not found: "/home/.fastai/data/.../tmp/spm.model": No such file or directory

Maybe I need to save the model in another way in order to load it and make predictions correctly?

@tpietruszka
Copy link
Contributor

spm.model and spm.vocab in the same directory - the next thing your code will complain about - are files containing a SentencePiece tokenization model, trained on a specific dataset.

I believe they are generally stored separately from the model itself, so you will need to copy them to the other machine and adjust paths accordingly

Hope that helps and good luck!

@javithe7
Copy link
Author

Thanks for your answer Tomasz, it seems to be exactly what you say. I've found the directory where those files are, in my case was : /home/javithe7/.fastai/models/es_multifit_paper_version/ , i will copy it into the other machine to check if everything works fine.

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

2 participants