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

Downloading USE-large3 hangs #326

Closed LanceNorskog closed 5 years ago

LanceNorskog commented 5 years ago

Downloading https://tfhub.dev/google/universal-sentence-encoder-large/3 hangs. It seems to be waiting for a lock file to do something, and the lock file never does.

https://tfhub.dev/google/universal-sentence-encoder/2 downloads just fine.

Cheers! (My apologies for the formatting.)

KeyboardInterrupt Traceback (most recent call last)

in () 1 module_url = "https://tfhub.dev/google/universal-sentence-encoder-large/3" #@param ["https://tfhub.dev/google/universal-sentence-encoder/2", "https://tfhub.dev/google/universal-sentence-encoder-large/3"] ----> 2 embed = hub.Module(module_url) 3 embed_size = embed.get_output_info_dict()['default'].get_shape()[1].value 4 def UniversalEmbedding(x): 5 return embed(tf.squeeze(tf.cast(x, tf.string)), signature="default", as_dict=True)["default"] 6 frames /usr/local/lib/python3.6/dist-packages/tensorflow_hub/module.py in __init__(self, spec, trainable, name, tags) 145 """ 146 self._graph = tf_v1.get_default_graph() --> 147 self._spec = as_module_spec(spec) 148 self._trainable = trainable 149 /usr/local/lib/python3.6/dist-packages/tensorflow_hub/module.py in as_module_spec(spec) 34 return spec 35 elif isinstance(spec, six.string_types): ---> 36 return load_module_spec(spec) 37 else: 38 raise ValueError("Unknown module spec type: %r" % type(spec)) /usr/local/lib/python3.6/dist-packages/tensorflow_hub/module.py in load_module_spec(path) 58 tf.OpError: on file handling exceptions. 59 """ ---> 60 path = registry.resolver(path) 61 return registry.loader(path) 62 /usr/local/lib/python3.6/dist-packages/tensorflow_hub/registry.py in __call__(self, *args, **kwargs) 40 for impl in reversed(self._impls): 41 if impl.is_supported(*args, **kwargs): ---> 42 return impl(*args, **kwargs) 43 raise RuntimeError( 44 "Missing implementation that supports: %s(*%r, **%r)" % ( /usr/local/lib/python3.6/dist-packages/tensorflow_hub/compressed_module_resolver.py in __call__(self, handle) 101 102 return resolver.atomic_download(handle, download, module_dir, --> 103 self._lock_file_timeout_sec()) 104 105 def _lock_file_timeout_sec(self): /usr/local/lib/python3.6/dist-packages/tensorflow_hub/resolver.py in atomic_download(handle, download_fn, module_dir, lock_file_timeout_sec) 388 389 # Wait for lock file to disappear. --> 390 _wait_for_lock_to_disappear(handle, lock_file, lock_file_timeout_sec) 391 # At this point we either deleted a lock or a lock got removed by the 392 # owner or another process. Perform one more iteration of the while-loop, /usr/local/lib/python3.6/dist-packages/tensorflow_hub/resolver.py in _wait_for_lock_to_disappear(handle, lock_file, lock_file_timeout_sec) 340 pass 341 finally: --> 342 time.sleep(5) 343 344 KeyboardInterrupt: ``
gowthamkpr commented 5 years ago

@LanceNorskog Was not able to reproduce the error as I don't get any error in downloading the USE-large3 on Google Colab. Please give us the exact steps you followed to reproduce the issue or you can take a look at the similar issue and let me know if it helps. Thanks!

gowthamkpr commented 5 years ago

@LanceNorskog Closing this issue as this has not been responded for more than 7 days. Please add additional comments and we can reopen the issue again. Thanks!