ImportError during testing pre-trained model with test_panoptic.py, possibly a circular import?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Domain
- machine-learning
Research direction
Start with scripts/test_panoptic.py and follow its imports into seamseg/algos/detection.py, seamseg/utils/bbx/init.py, and seamseg/utils/bbx/bbx.py. Check how the _backend module is provided and reproduce the pretrained-model test. Done means test_panoptic.py starts without the ImportError.
Written by the indexing model from the issue text.
Description
I've been trying to run the test_panoptic.py inference test on the pre-trained model available through the README.
I've tried renaming the backend files to check whether it could be a naming issue, but nothing changed.
Traceback (most recent call last):
File "seamseg/scripts/test_panoptic.py", line 22, in <module>
from seamseg.algos.detection import PredictionGenerator as BbxPredictionGenerator, DetectionLoss, \
File "seamseg/seamseg/algos/detection.py", line 8, in <module>
from seamseg.utils.bbx import ious, calculate_shift, bbx_overlap, mask_overlap
File "seamseg/seamseg/utils/bbx/__init__.py", line 1, in <module>
from .bbx import *
File "seamseg/seamseg/utils/bbx/bbx.py", line 7, in <module>
from . import _backend
ImportError: cannot import name '_backend' from partially initialized module 'seamseg.utils.bbx' (most likely due to a circular import) (seamseg/seamseg/utils/bbx/__init__.py)
E0712 15:54:19.384609 139737663112000 torch/distributed/elastic/multiprocessing/api.py:826] failed (exitcode: 1) local_rank: 0 (pid: 39771) of binary: seamseg/env/bin/python
Traceback (most recent call last):
File "anaconda3/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "anaconda3/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "seamseg/env/lib/python3.9/site-packages/torch/distributed/launch.py", line 198, in <module>
main()
File "seamseg/env/lib/python3.9/site-packages/torch/distributed/launch.py", line 194, in main
launch(args)
File "seamseg/env/lib/python3.9/site-packages/torch/distributed/launch.py", line 179, in launch
run(args)
File "seamseg/env/lib/python3.9/site-packages/torch/distributed/run.py", line 870, in run
elastic_launch(
File "seamseg/env/lib/python3.9/site-packages/torch/distributed/launcher/api.py", line 132, in __call__
return launch_agent(self._config, self._entrypoint, list(args))
File "seamseg/env/lib/python3.9/site-packages/torch/distributed/launcher/api.py", line 263, in launch_agent
raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:
============================================================
scripts/test_panoptic.py FAILED
------------------------------------------------------------
Failures:
<NO_OTHER_FAILURES>
- Dominant language
- Python
- Stars
- 301
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mapillary/seamseg
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
-
Creating a ColabOpen
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
All issues in mapillary/seamseg
Similar issues
-
[Bug] @deck.gl/arcgis dist import resolves to unpublished @deck.gl/core source path (9.3.11, 9.4.0)Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
workflow: a tick's dispatch counts as 'only this step', and no review self-grants a round unattendedOpenworkflow
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
kristofdegrave/homeassistant-smart-charging#1505 ·
Maintainers usually reply within 1 day
-
metadata submission
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
canonical/content-cache-operator#163 · 1 comment ·
Maintainers usually reply within 1 day
-
[submission]Opensubmission
Difficulty 1/5 Under an hour Newbie friendliness 65/100
leanprover/lean-eval-submissions#1852 ·
Maintainers usually reply within 1 day