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

[Bug]AttributeError: 'UNet' object has no attribute '_export_inference_model' #210

Closed
delbern310 opened this issue Dec 5, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@delbern310
Copy link

C:\ProgramData\Anaconda3\envs\ppdemo\lib\site-packages\setuptools\sandbox.py:13: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
C:\ProgramData\Anaconda3\envs\ppdemo\lib\site-packages\pkg_resources_init_.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google').
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
C:\ProgramData\Anaconda3\envs\ppdemo\lib\site-packages\pkg_resources_init_.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google.cloud').
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
C:\ProgramData\Anaconda3\envs\ppdemo\lib\site-packages\pkg_resources_init_.py:2350: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google').
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(parent)
C:\ProgramData\Anaconda3\envs\ppdemo\lib\site-packages\pkg_resources_init_.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google.logging').
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
C:\ProgramData\Anaconda3\envs\ppdemo\lib\site-packages\pkg_resources_init_.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('mpl_toolkits').
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
C:\ProgramData\Anaconda3\envs\ppdemo\lib\site-packages\pkg_resources_init_.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('zope').
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
Can not use conditional_random_field. Please install pydensecrf first.
Warning: import ppdet from source directory without installing, run 'python setup.py install' to install ppdet firstly
2024-12-05 16:56:23,473-WARNING: post-quant-hpo is not support in system other than linux
W1205 16:56:23.543646 107816 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 8.6, Driver API Version: 11.7, Runtime API Version: 11.6
W1205 16:56:23.553741 107816 gpu_resources.cc:91] device: 0, cuDNN Version: 8.9.
2024-12-05 16:56:24 [WARNING] Including an Arrange object in the transformation operator list is deprecated and will not take effect.
2024-12-05 16:56:24 [INFO] Model[UNet] loaded.
Traceback (most recent call last):
File "export_model.py", line 78, in
model._export_inference_model(args.save_dir, fixed_input_shape)
AttributeError: 'UNet' object has no attribute '_export_inference_model'

I can export model success a year ago,but now export error above,the environment not changed,I try export in two different computer, the error stil exist!

@delbern310 delbern310 added the bug Something isn't working label Dec 5, 2024
@github-actions github-actions bot added triage new issue/PR waiting to be dealed and removed triage new issue/PR waiting to be dealed labels Dec 5, 2024
@delbern310
Copy link
Author

why? I export the before trainmodel , still show the Error , All the model export show the Error , who know how to solve??

@delbern310
Copy link
Author

I have solved this problem, because suddenly change the base.py file,change the _export_inference_model method name to export_inference_model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants