-
Notifications
You must be signed in to change notification settings - Fork 50
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
[BUG] Getting error when loading back a saved session-based model #1132
Comments
I've narrowed it down to this PR #1022 that started causing this error on reload (in an different python process to the one that saved the model) |
I get the same error if I run this code as a python script, instead of in a jupyter nb. |
I debugged the reloading process of the save transformer model and noticed that when reloading the Jupyter notebook, the step of building the transformer block from the configuration (here) is skipped, resulting in the loss of input shape information. This lead to passing an input shape of I managed to avoid the error by importing transformers as well:
|
Looks like models/merlin/models/tf/__init__.py Line 133 in 729da27
models/merlin/models/utils/dependencies.py Lines 44 to 49 in 729da27
|
|
Notes based on @oliverholworthy 's debugging:
|
Bug description
I am getting different errors when I try to load back a saved session-based model.
Error 1:
This error goes away if I add
import merlin.models.tf as mm
after I import tensorflow, and I get another error:Error 2:
Steps/Code to reproduce bug
Once the model is saved, please restart the kernel, and load back the model with the following script:
Expected behavior
We should be able to load back the model and then do offline evaluation or predictions, accordingly.
Environment details
Additional context
The text was updated successfully, but these errors were encountered: