Closed pietermarsman closed 3 years ago
The root cause for this issue has been fixed in #1696 - however, there's actually another issue related to the store_as_json_and_weights option that's still open and being tracked here: https://github.com/bentoml/BentoML/issues/1698
Describe the bug
I want to use
KerasModelArtifact
such that the name of the model is saved and restored. I also want to usestore_as_json_and_weights=True
to forget about the loss function and optimizer state (see #1559). However, when I fixatestore_as_json_and_weight
toTrue
the model does not load properly and cannot be used for inference due to this error:I think it has something to do with the tensorflow session and graph that is started and created when the model is loaded from json and weights.
To Reproduce
Expected behavior
Not raise an error :)
Screenshots/Logs
Environment:
Additional context
I fixed it by using: