-
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
[FEA] cannot properly save and load the TF Retrieval model #498
Comments
This is also required in this RMP NVIDIA-Merlin/Merlin#271 |
It looks like we've got some custom objects (custom metrics in this case) that need to be specified when calling custom_objects = {
"RecallAt": mm.RecallAt,
"NDCGAt": mm.NDCGAt,
}
reloaded = tf.keras.models.load_model('two_tower', custom_objects=custom_objects) We could potentially create a @oliverholworthy tested that but it did not work for me. |
Update. The saving of TwoTowerModel is now working. (22.08) However, loading is still not working. Due to an unbound
There is work on-going in #633 that is taking us toward a place where we can replace this retrieval scorer with a new implementation that won't have this issue. Aiming for the next release 22.09 |
PR #790 introduces the definition of |
Bug description
We want to be able to save the entire Two-Tower model and load back to be able to do
model.evaluate()
andmodel.predict()
. However, we get the following error when we load back the model. To reproduce the following errors, please run the 05-Retrieval-Model.ipynb example. Then save and reload the model with the following scripts.First save the model after
model.fit()
step:model.save('two_tower')
Then when we load back the saved model we get the following error:
Expected behavior
Environment details
Using
merlin-tensorflow-training:22.05
docker image with the latest main branches pulled.The text was updated successfully, but these errors were encountered: