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
Trying to use TF-Hub module with CoLab TPU #604
Comments
@ayulockin I tried to reproduce this issue on Google Cloab using TPU but I am not running into any error. Can you share a github gist showing its failing because I am not able to reproduce it. Thanks! |
@gowthamkpr here's the GitHub gist showing the error. Gist Hope this helps reproduce the error on CoLab TPU. |
As discussed by email.. Unfortunately this is a known issue. Colab TPUs do not have access to the local file system which TF-Hub relies on. TF-Hub modules are stored compressed on GCS and then downloaded, uncompressed, and cached locally. Because the Colab TPUs cannot read the local filesystem, you cannot read the downloaded model. A current workaround for this is to cache the uncompressed model on a public GCS bucket. You need to cache the uncompressed model. The system variable So, you should be able to set the cache dir like this:
And then call If that doesn't work for some reason, then this should be roughly equivalent:
And then you can call: We are looking at ways to make sure that users don't need this workaround in a future release. |
The problem still persists, can't download feature vectors from tf_hub via Colab on TPU... |
Hi @Lawrence-Krukrubo
You can find other solutions here. Thanks! |
I am doing some experimentation with style transfer and I used this TF-Hub module.
The accompanied CoLab Notebook can help reproduce the issue.
This works fine with CoLab GPU. But I need to use the same with CoLab TPU. With CoLab TPU I am getting this error.
What's causing this issue? What's a potential way out?
Thanks in advance. :D
The text was updated successfully, but these errors were encountered: