Skip to content
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

RuntimeError: (NotFound) Cannot open file /home/tcenteryn/.paddleclas/inference_model/PULC/text_image_orientation/inference.json, please confirm whether the file is normal. #3329

Open
yangqiheng2019 opened this issue Dec 18, 2024 · 3 comments
Assignees

Comments

@yangqiheng2019
Copy link

欢迎您使用PaddleClas并反馈相关问题,非常感谢您对PaddleClas的贡献!
提出issue时,辛苦您提供以下信息,方便我们快速定位问题并及时有效地解决您的问题:

  1. PaddleClas版本以及PaddlePaddle版本:请您提供您使用的版本号或分支信息,如PaddleClas release/2.2和PaddlePaddle 2.1.0
  2. 涉及的其他产品使用的版本号:如您在使用PaddleClas的同时还在使用其他产品,如PaddleServing、PaddleInference等,请您提供其版本号
  3. 训练环境信息:
    a. 具体操作系统,如Linux
    b. Python版本号,Python3.10.16
    c. CUDA/cuDNN版本, 如CUDA 11.8
  4. 完整的代码
    import paddleclas
    model = paddleclas.PaddleClas(model_name="text_image_orientation")
    result = model.predict(input_data="/home/tcenteryn/Direction_program/dataest/chailvfei/20241127100942.jpg")
    print(next(result))
  5. 问题:
    /opt/anaconda3/envs/paddleclas/lib/python3.10/site-packages/paddle/utils/cpp_extension/extension_utils.py:686: UserWarning: No ccache found. Please be aware that recompiling all source files may be required. You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md
    warnings.warn(warning_message)
    Traceback (most recent call last):
    File "/home/tcenteryn/Direction_program/PaddleClas/test.py", line 14, in
    model = paddleclas.PaddleClas(model_name="text_image_orientation")
    File "/home/tcenteryn/Direction_program/PaddleClas/paddleclas.py", line 609, in init
    self.predictor = ClsPredictor(self.config)
    File "/home/tcenteryn/Direction_program/PaddleClas/deploy/python/predict_cls.py", line 28, in init
    super().init(config["Global"])
    File "/home/tcenteryn/Direction_program/PaddleClas/deploy/utils/predictor.py", line 37, in init
    self.predictor, self.config = self.create_paddle_predictor(
    File "/home/tcenteryn/Direction_program/PaddleClas/deploy/utils/predictor.py", line 65, in create_paddle_predictor
    config = Config(inference_model_dir, model_prefix)
    RuntimeError: (NotFound) Cannot open file /home/tcenteryn/.paddleclas/inference_model/PULC/text_image_orientation/inference.json, please confirm whether the file is normal.
    [Hint: Expected paddle::inference::IsFileExists(prog_file
    ) == true, but received paddle::inference::IsFileExists(prog_file_):0 != true:1.] (at ../paddle/fluid/inference/api/analysis_config.cc:106)
@cou920
Copy link

cou920 commented Dec 18, 2024

paddlecls=2.6.0
训练环境windows 也存在相同的问题

@Arylu
Copy link

Arylu commented Dec 18, 2024

我也遇到了

@liuhongen1234567
Copy link
Collaborator

inference.json 是 paddle3.0 新lr的模型格式,可以使用 export FLAGS_enable_pir_api=0 导出pdmodel 试试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants