-
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] Error when loading the session-based model in example #908
Comments
Steps/Code to reproduce bug
It does have some warnings though:
We are wondering if we did something wrong with the saving and loading of the model, or if there's a bug in saving and loading Merlin session-based models. |
Thank you for reporting the bug. I was able to reproduce this error when loading the model without importing The recommended way to load a trained MM model is to import merlin.models.tf before calling
Please let us know if this fixes the loading issue. Thanks! |
We also have a classmethod on our Model class. So can also do the following to load the model import merlin.models.tf as mm
mm.Model.load('<path-to-saved-model-directory>') |
@zhiruiwang @FredHJC closing this issue since it should be solved via #927. |
@rnyak We used the Merlin-tensorflow 22.12 image and refactored our pipeline to use the lastest API of merlin-models codebase, now the saving and loading two tower, LSTM, and transformer models are all working. Thanks for the help! |
❓ Questions & Help
Details
https://github.com/NVIDIA-Merlin/models/blob/main/examples/usecases/ecommerce-session-based-next-item-prediction-for-fashion.ipynb
We are trying to implement the session-based models shown in the above notebook. However, there is a consistent error when loading the saved model.
TypeError: ('Keyword argument not understood:', 'layer was saved without config')
We can just run the example notebook and save the trained model. Then the error occurs when trying to load it. It looks like customized layers / prediction tasks should be handled with a manually specified config.
The text was updated successfully, but these errors were encountered: