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

Circular Import Issue when Importing OpenVINOInferencer #410

Closed
glucasol opened this issue Jul 7, 2022 · 0 comments · Fixed by #416
Closed

Circular Import Issue when Importing OpenVINOInferencer #410

glucasol opened this issue Jul 7, 2022 · 0 comments · Fixed by #416
Assignees
Labels
Bug Something isn't working Inference

Comments

@glucasol
Copy link

glucasol commented Jul 7, 2022

I am trying to do some inferences, but i am getting this error:
"ImportError: cannot import name 'OpenVINOInferencer' from partially initialized module 'anomalib.deploy.inferencers' (most likely due to a circular import) (/home/ga/Documents/anomalib/anomalib/deploy/inferencers/init.py)"
when executing inference/openvino.py and inference/gradio_inference.py .

Complete error:
Traceback (most recent call last):
File "tools/inference/openvino.py", line 30, in
from anomalib.deploy.inferencers import OpenVINOInferencer
File "/home/ga/Documents/anomalib/anomalib/deploy/init.py", line 17, in
from .inferencers import OpenVINOInferencer, TorchInferencer
File "/home/ga/Documents/anomalib/anomalib/deploy/inferencers/init.py", line 18, in
from .openvino import OpenVINOInferencer
File "/home/ga/Documents/anomalib/anomalib/deploy/inferencers/openvino.py", line 30, in
from openvino.inference_engine import ( # type: ignore # pylint: disable=no-name-in-module
File "/home/ga/Documents/anomalib/tools/inference/openvino.py", line 30, in
from anomalib.deploy.inferencers import OpenVINOInferencer
ImportError: cannot import name 'OpenVINOInferencer' from partially initialized module 'anomalib.deploy.inferencers' (most likely due to a circular import) (/home/ga/Documents/anomalib/anomalib/deploy/inferencers/init.py)

@samet-akcay samet-akcay added Bug Something isn't working Inference labels Jul 8, 2022
@samet-akcay samet-akcay self-assigned this Jul 8, 2022
@samet-akcay samet-akcay changed the title "ImportError: cannot import name 'OpenVINOInferencer' from partially initialized module 'anomalib.deploy.inferencers' (most likely due to a circular import) (/home/ga/Documents/anomalib/anomalib/deploy/inferencers/init.py)" Circular Import Issue when Importing OpenVINOInferencer Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Inference
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants