-
Notifications
You must be signed in to change notification settings - Fork 242
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
keras-nlp insists I use the (buggy) Tensorflow 2.16.1 which does not work with my GPU #1519
Comments
I was able to detect GPU in the colab GPU vm. I followed the below list of commands. !pip install -U keras-nlp
!pip install -U tensorflow
import tensorflow as tf
print(tf.config.list_physical_devices('GPU'))
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')] If you are still unable to detect |
Yes it works on Github, I reproduced it as well (see my link). But it
doesn't work on my PC.
…On Thu, Mar 21, 2024, 5:17 PM Sachin Prasad ***@***.***> wrote:
I was able to detect GPU in the colab GPU vm.
I followed the below list of commands.
Create a fresh environment and try.
!pip install -U keras-nlp
!pip install -U tensorflow
import tensorflow as tfprint(tf.config.list_physical_devices('GPU'))
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
If you are still unable to detect GPU, you can close this issue and
create a new issue in the TensorFlow repo since it is related to
TensorFlow.
—
Reply to this email directly, view it on GitHub
<#1519 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMES55VEMZIVRJMVFWZIXKDYZNE5DAVCNFSM6AAAAABFCD5KAGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJTG42TGNJWG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
You link is localhost runtime, we can't access it. |
My apologies, I'm not very familiar with colab.
I'll update the post.
Here's the updated link:
https://colab.research.google.com/drive/1BIQpgHH_Ri7HzXIykt34cRDEQ9-Yodv1?usp=sharing
…On Thu, Mar 21, 2024, 6:25 PM Sachin Prasad ***@***.***> wrote:
You link is localhost runtime, we can't access it.
—
Reply to this email directly, view it on GitHub
<#1519 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMES55UG5P7GAPCRBC2FQO3YZNM5LAVCNFSM6AAAAABFCD5KAGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJTHE2TMNRVHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I can see |
That's just a colab I made because the guidelines asked me to.
I'm trying to run this on my own PC, not the colab.
…On Thu, Mar 21, 2024, 7:12 PM Sachin Prasad ***@***.***> wrote:
I can see Num GPUs Available: 1 in your colab, what is the issue again?
—
Reply to this email directly, view it on GitHub
<#1519 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMES55TC22OZRSEQIUTCPULYZNSNNAVCNFSM6AAAAABFCD5KAGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJUGAYTQNRUGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Got it, Looks like this is the TensorFlow issue for the specific OS. |
I think it would be nice if keras-nlp was usable by older tensorflow versions, as 2.16.1 version has several bugs in it, and keras-nlp seems to be compatible with tf 2.15 |
We always try to match the latest TensorFlow version during the time of release, it's the same practice we follow for Keras-Cv as well. |
@arsenstonelab thanks for the issue. This is indeed a bit of a rough edge. The issue is actually with One option is to pin the tf version you want during install for both tensorflow-text and tensorflow. E.g. this works for installing keras-nlp with tf 2.15. Does that work for you? |
This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you. |
This issue was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further. |
Describe the bug
The latest Tensorflow 2.16.1 has a bug, it doesn't seem to detect GPUs (see for example: http://127.0.0.1:8888/lab?token=59ba515252bb7306a955696efe83ad0b816e730b847fac69
To get around that, I ran
pip install tensorflow[and-cuda]==2.15.1
It worked and my GPU was detected.
The problem is when I
pip install keras-nlp
, it tries to uninstall tensorboard, tensorflow etc. to install their latest versions. I suspect keras does the same too.I tried
pip install keras-nlp --no-deps
and got errors during imports (such asModuleNotFoundError: No module named 'keras_core'
(The preinstalled keras version was 2.15.0)I tried
pip uninstall keras keras-nlp
thenpip install keras==3.0.0 keras-nlp==0.6.3 --no-deps
and I got import errors again, such asModuleNotFoundError: No module named 'rich'
To Reproduce
Here's a colab link. The aspect that's not reproduced is tensorflow not recognizing the GPU. The GPU issue seems to be restricted to PCs.
Expected behavior
I would like to be able to install functional keras and keras-nlp packages with Tf 2.15.1
Additional context
PC windows 11 with WSL2 Ubuntu
The text was updated successfully, but these errors were encountered: