tensorflow / hub

A library for transfer learning by reusing parts of TensorFlow models.
https://tensorflow.org/hub
Apache License 2.0
3.49k stars 1.67k forks source link

Issue with caching #807

Closed sayakpaul closed 2 years ago

sayakpaul commented 3 years ago

There seems to be a caching issue for the BERT models (including the preprocessors and the encoders). I am referring to the BERT models mentioned in this blog post: https://blog.tensorflow.org/2020/12/making-bert-easier-with-preprocessing-models-from-tensorflow-hub.html.

For reproducing this issue, one can run code from any of the tutorials mentioned in the above blog post.

The error is as follows:

OSError: SavedModel file does not exist at: /var/folders/z_/d29z43w90kz6f4kbzv5c9m9r0000gn/T/tfhub_modules/602d30248ff7929470db09f7385fc895e9ceb4c0/{saved_model.pbtxt|saved_model.pb}

The issue seems to go after rerunning the code from scratch. Is there a better workaround?

pindinagesh commented 3 years ago

@sayakpaul

Could you please refer the similar issues link1 and link2, and let us know if it helps. Thanks

sayakpaul commented 3 years ago

They do not.

akhorlin commented 2 years ago

Running colabs mentioned in https://blog.tensorflow.org/2020/12/making-bert-easier-with-preprocessing-models-from-tensorflow-hub.html on CPU, GPU and TPU (for advanced example) works. The issue might have been resolved. If you still see the issue, please let us know.