Open deathsaber opened 3 months ago
Thanks for filing! I suspect this might be related to the environment. Just trying your snippet on a colab I don't see this the issue. https://colab.research.google.com/gist/mattdangerw/7639862e2d45ab55a3634c0d3f965265/try-snippet.ipynb
So some more information might be useful for diagnosing here.
How are you running this? How did you install deps? Os version? python version? tf verison? sentencepiece version?
Thanks!
Hi @mattdangerw ,
Apologies for a delayed response. Sure, I am happy to provide more information to help diagnose the issue. I noticed that the code was able to run successfully on your colab notebook and, your keras-nlp and tf versions matched mine. This led me to suspect if the CUDA or CuDNN versions could have something to do with this. I have provided the GPU details as well, in case it helps. Please do let me know if you need more information or if there are any steps you'd want me to try out.
I have tried it on two separate machines - on my desktop (WSL2 on Win 11) and on an AWS EC2 (RHEL 9). After creating a python virtual environment and installing the dependencies in it, I just start a python script with the virtual environment activated. (Details shared below).
Tried on a couple of OS's.
1. Kali Linux 2021.4 on WSL2 (Win 11)
2. RHEL 9 on an AWS EC2
Python 3.9 (same for both the OS's)
On a clean system, a python virtual env was created, which was then activated and the deps were installed in that virtual env via pip.
(.venv) xxx@xxx:~# pip install -U pip && pip install keras-nlp tensorflow[and-cuda] sentencepiece
tensorflow==2.16.1
sentencepiece==0.2.0
@mattdangerw - Hate to bother you but were you able to get a chance to take a look into this issue?
Not sure why but, apart from the BERT and ROBERTA classifiers, the other BERT-based models like DEBERTA and ALBERT keep failing for me with the same error, no matter where I try them (apart from colab).
Should I run a pip freeze
and list the packages I got installed, in case that helps?
Describe the bug I am fine-tuning the Keras implementation of Albert for my dataset for a classification problem by following the documentations present here - https://keras.io/api/keras_nlp/models/albert/albert_classifier/
The gist of how I am creating the model and fitting it is given below:
When the fitting process runs, it always errors out with the stacktrace shown below. I am suspecting it must be related to SentencePiece not getting detected somehow based on the error message.
What might be doing wrong here? Am I missing something obvious?
To Reproduce Run the following code:
Expected behavior The Albert preprocessor is able to detect sentence piece and use it for its preprocessing tasks,
Additional context Things I have tried to fix it but with no success :