You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from ckip_transformers.nlp import CkipNerChunker
ner_driver = CkipNerChunker(level=3, device=-1)
res = ner_driver(text_list)
Before running the script:
After running the script:
What do you think should happen instead
It should not consume GPU resources.
How to reproduce
Run the script in GPU enable env:
from ckip_transformers.nlp import CkipNerChunker
ner_driver = CkipNerChunker(level=3, device=-1)
res = ner_driver(text_list)
Operating System
Ubuntu 20.04.2 LTS
Development Environment
Python 3.8.12
PyTorch 1.9.0+cu111
Transformers 4.7.0
Tensorflow 2.11.0
Anything else
I've checked the source code, self.device is set as "cpu", and both model and data tensor has to(self.device), so it's weird to have this problem.
And if the environment has no GPU, the model script is still runnable.
The text was updated successfully, but these errors were encountered:
Hi @emfomy , thank you for your attention 🙏
ckip_transformers
version0.2.7
What happened
Set
device
= -1, but the model still uses GPU.script:
Before running the script:
![image](https://user-images.githubusercontent.com/9716977/215410339-02c8d007-b557-4882-9662-7bd6447a0d04.png)
After running the script:
![image](https://user-images.githubusercontent.com/9716977/215410195-371a66fc-b5a7-49ac-910f-438a8c577250.png)
What do you think should happen instead
It should not consume GPU resources.
How to reproduce
Run the script in GPU enable env:
Operating System
Ubuntu 20.04.2 LTS
Development Environment
Anything else
I've checked the source code,
self.device
is set as "cpu", and both model and data tensor hasto(self.device)
, so it's weird to have this problem.And if the environment has no GPU, the model script is still runnable.
The text was updated successfully, but these errors were encountered: