👑 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.
RuntimeError: (NotFound) Cannot open file /home/aistudio/.paddlenlp/taskflow/feature_extraction/PaddlePaddle/ernie_vil-2.0-base-zh/static/get_text_features.pdmodel, please confirm whether the file is normal.
[Hint: Expected paddle::inference::IsFileExists(progfile) == true, but received paddle::inference::IsFileExists(progfile):0 != true:1.] (at /paddle/paddle/fluid/inference/api/analysis_config.cc:111)
请提出你的问题
Paddle文档中写明的Taskflow("feature_extraction")这个功能是否不能使用了?我在aistudio中运行该功能会出现报错。
代码
出现如下报错:
RuntimeError Traceback (most recent call last) Cell In[17], line 3 1 from paddlenlp import Taskflow 2 import paddle.nn.functional as F ----> 3 feature_extractor = Taskflow("feature_extraction")
File /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/paddlenlp/taskflow/taskflow.py:809, in Taskflow.init(self, task, model, mode, device_id, from_hf_hub, kwargs) 807 self.kwargs = kwargs 808 task_class = TASKS[self.task][tag][self.model]["task_class"] --> 809 self.task_instance = task_class( 810 model=self.model, task=self.task, priority_path=self.priority_path, from_hf_hub=from_hf_hub, self.kwargs 811 ) 812 task_list = TASKS.keys() 813 Taskflow.task_list = task_list
File /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/paddlenlp/taskflow/multimodal_feature_extraction.py:229, in MultimodalFeatureExtractionTask.init(self, task, model, batch_size, is_static_model, max_length, return_tensors, **kwargs) 227 self._check_predictor_type() 228 if self.is_static_model: --> 229 self._get_inference_model() 230 else: 231 self._construct_model(model)
File /opt/conda/envs/python35-paddle120-env/lib/python3.10/site-packages/paddlenlp/taskflow/multimodal_feature_extraction.py:427, in MultimodalFeatureExtractionTask._get_inference_model(self) 425 self._static_model_file = self.inference_model_path + ".pdmodel" 426 self._static_params_file = self.inference_model_path + ".pdiparams" --> 427 self._config = paddle.inference.Config(self._static_model_file, self._static_params_file) 428 self._prepare_static_mode() 430 self.predictor_map["text"] = self.predictor
RuntimeError: (NotFound) Cannot open file /home/aistudio/.paddlenlp/taskflow/feature_extraction/PaddlePaddle/ernie_vil-2.0-base-zh/static/get_text_features.pdmodel, please confirm whether the file is normal. [Hint: Expected paddle::inference::IsFileExists(progfile) == true, but received paddle::inference::IsFileExists(progfile):0 != true:1.] (at /paddle/paddle/fluid/inference/api/analysis_config.cc:111)