Closed VinuraD closed 3 years ago
@VinuraD , thanks for reporting this issue. I tried reproducing this issue with the steps and versions mentioned in your comment and faced same errors. I've also tried with a conda environment using :
a)tensorflow-gpu==2.2.1 b)tensorflow-text==2.2.0 c)tensorflow-hub==0.12.0 d)python 3.8.10
by following the below steps:-
a)pip install tensorflow-gpu==2.2.1 b)pip install tensorflow-text==2.2.0 installs tensorflow==2.2.3 (doesn't uninstall tensorflow-gpu==2.2.1) c)pip install tensorflow-hub==0.12.0
after this when i import tensorflow,tensorflow_text and tensorflow_hub using import statements in a notebook with the conda kernel ,i donot face any error.The tensorflow version is also being shown as 2.2.1 (gpu). Also, i've set my cuda device in the notebook by :- !export CUDA_VISIBLE_DEVICES=0
Hi, I later tried with tensorflow-gpu v.2.4.1 (which is shown as the next available & compatible version in conda search). and used (Python 3.7, CUDA 10.1)
pip install tensorflow-text==2.4.1
pip install tf-models-official==2.4.0
then I get an error simiar to https://github.com/tensorflow/text/issues/385, except there gpu is not used.
Hi @VinuraD, can you please provide a code sample that demonstrates where the error happens, and the original error text?
Generally speaking, it sounds like you are running into a compatibility issue between the versions of tensorflow-text and tensorflow that you are using. It sounds like the version requirements that tensorflow-text imposes on tensorflow are quite strict. I suspect the issue might be that you are using the gpu version of tensorflow, instead of the cpu version.
How are you installing tensorflow? Based on previous questions in the TF Text repo (example), the recommended approach is to install your tensorflow version after you install tensorflow-text.
@MorganR The error text related to my original issue is mentioned in my first comment. The error text related to the 2nd comment is here https://github.com/tensorflow/text/issues/644 (which I opened separately). Will this be sufficient?
I am installing tensorflow-gpu first (before installing the tensorflow-text), using conda install -c anaconda tensorflow-gpu==2.4.1
in a conda virtual env, which is a setup working with other gpu related runs. Only this came up with errors.
The CPU is enough just to get the embeddings. But it takes a lot of time for fine tuning the model with added layers only with CPU.
Thanks for clarifying and for opening tensorflow/text#644. Since all these issues are related to compatibility between your tensorflow-text and tensorflow versions, and are not related to TF Hub, I am closing this issue.
Hi,
I'm using LaBSE model from the tf-hub and running on tensorflow-gpu (v2.2.0) on conda virtual environment. I've checked whether the tensorflow-gpu version is running correctly and have run other models (Huggingface) too. However, I observed below output when installing pip packages related to tf-hub model. Python=3.8 CUDA=10.1
After that, the tensorflow version falls to v.2.5.0 (CPU) and runs. I tried manually removing this tensorflow version but it happens to install again. If I run it without tensorflow 2.5.0,(skipping above two pip install steps and using tf-gpu 2.2.0) it gives an error,
Is there some way that I could install tf-hub and related libraries on GPU or is it not compatible with the tensorflow version I'm using?. I did not find a specific instruction here; https://www.tensorflow.org/hub/installation