question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: 'make_lvis_metrics'

See original GitHub issue

🐛 Describe the bug A clear and concise description of what the bug is. I got this error message:

ImportError: cannot import name 'make_lvis_metrics' from 'avalanche.evaluation.metrics'

while running one of your examples mentioned in this link: https://avalanche.continualai.org/examples/training

🐜 To Reproduce A minimal working example to reproduce the issue. The code should be executable without modifications.

I am running one of those instructions in the terminal that has avalancha as the current environment:

python examples/detection.py or python examples/detection_lvis.py

I got same error after running any of them.

🐝 Expected behavior A clear and concise description of what you expected to happen.

I expected that i will get some results of object detection using lvis dataset

🐞 Screenshots If applicable, add screenshots to help explain your problem.

avalanche problem

🦋 Additional context Add any other context about the problem here like your python setup.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
HamedHematicommented, Aug 19, 2022

@alaa-shubbak This is a different error related to metric imports which we need to fix. If you want to run the code you can remove make_lvis_metrics from from avalanche.evaluation.metrics import (...) and add a new import line as below: from avalanche.evaluation.metrics.detection import make_lvis_metrics I tested it and it works.

@lrzpellegrini make_lvis_metrics which is supposed to return the metric class for Lvis is missing in detection_evaluators. Is the one implemented in avalanche.evaluation.metrics.detection.py the initializer that should be used inside the code example?

1reaction
HamedHematicommented, Aug 16, 2022

Hi @alaa-shubbak !

Did you install avalanche with the detection packages, i.e. pip install avalanche-lib[detection]? Have a look at here the link below for more details: https://avalanche.continualai.org/getting-started/how-to-install

Read more comments on GitHub >

github_iconTop Results From Across the Web

cannot import name '_ClassNamePrefixFeaturesOutMixin ...
ImportError : cannot import name '_ClassNamePrefixFeaturesOutMixin' from 'sklearn.base' · Ask Question. Asked 6 months ago.
Read more >
PYTHON : ImportError in importing from sklearn - YouTube
PYTHON : ImportError in importing from sklearn: cannot import name check_build [ Gift : Animated Search Engine ...
Read more >
cannot import name '_raise_dep_warning_if_not_pytest' from ...
ImportError : cannot import name '_raise_dep_warning_if_not_pytest' from 'sklearn.utils.deprecation' Anaconda3\lib\site-packages\sklearn\utils\deprecation.py) # ...
Read more >
VPI Python Import Error - Jetson Nano
Hi everyone, I am currently trying to get the stereo disparity estimator in the VPI to work with Python but there is a...
Read more >
dynamic module does not define init function (init_semaphore)
ImportError : dynamic module does not define init function (init_semaphore). >>> gevent.__version__. '1.0rc2'. Any ideas how to solve this?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found