PaddlePaddle / PaddleNLP

👑 Easy-to-use and powerful NLP and LLM library with 🤗 Awesome model zoo, supporting wide-range of NLP tasks from research to industrial applications, including 🗂Text Classification, 🔍 Neural Search, ❓ Question Answering, ℹ️ Information Extraction, 📄 Document Intelligence, 💌 Sentiment Analysis etc.
https://paddlenlp.readthedocs.io
Apache License 2.0
12.1k stars 2.93k forks source link

Taskflow 无法指定显卡 #1613

Closed kg-nlp closed 1 year ago

kg-nlp commented 2 years ago

您好:

wordtag = Taskflow("knowledge_mining", model="wordtag", device_id=3,task_path="./custom_task_path/",linking=False) 指定显卡序列3 但在程序运行时仍然要判断0号显卡 Please check whether there is any other process using GPU 0.

  1. If yes, please stop them, or start PaddlePaddle on another GPU.
  2. If no, please decrease the batch size of your model.

使用环境 paddlenlp 2.2.3 paddlepaddle 2.2.1

linjieccc commented 2 years ago

您好,unset CUDA_VISIBLE_DEVICES后再试下呢 image

kg-nlp commented 2 years ago

您好,仍然存在问题

`[2022-01-21 09:09:58,123] [ INFO] - Already cached /home/zhangyj-n/.paddlenlp/models/wordtag/vocab.txt [2022-01-21 09:09:58,158] [ INFO] - Already cached /home/zhangyj-n/.paddlenlp/models/wordtag/wordtag_pos.pdparams W0121 09:09:58.161566 184825 device_context.cc:447] Please NOTE: device: 2, GPU Compute Capability: 7.5, Driver API Version: 10.1, Runtime API Version: 10.1 W0121 09:09:58.169664 184825 device_context.cc:465] device: 2, cuDNN Version: 7.6. [2022-01-21 09:10:05,785] [ INFO] - Converting to the inference model cost a little time. [2022-01-21 09:10:09,733] [ INFO] - The inference model save in the path:./custom_task_path/static/inference

InvalidArgumentError: The start row index must be less than the end row index.But received the start index = 1, the end index = 1. [Hint: Expected begin_idx < end_idx, but received begin_idx:1 >= end_idx:1.] (at /paddle/paddle/fluid/framework/tensor.cc:120) [operator < viterbi_decode > error]`

kg-nlp commented 2 years ago

设置为device_id = 0 程序正常运行

a101269 commented 2 years ago

我也遇到同样问题

linjieccc commented 2 years ago

@joey12300 辛苦帮忙看下这个问题

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。