You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bug has not been fixed in the latest version(dev-1.x).
Describe the bug
----------------------------- Captured stderr call -----------------------------
Traceback (most recent call last):
File "/opt/mmflow/mmengine/mmengine/config/config.py", line 51, in __getattr__
value = super().__getattr__(name)
File "/opt/conda/lib/python3.7/site-packages/addict/addict.py", line 67, in __getattr__
return self.__getitem__(item)
File "/opt/mmflow/mmengine/mmengine/config/config.py", line 47, in __missing__
raise KeyError(name)
KeyError: 'test_pipeline'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/mmflow/demo/image_demo.py", line 50, in <module>
main(args)
File "/opt/mmflow/demo/image_demo.py", line 38, in main
result = inference_model(model, args.img1, args.img2)
File "/opt/mmflow/mmflow/apis/inference.py", line 91, in inference_model
cfg.test_pipeline.remove(t)
File "/opt/mmflow/mmengine/mmengine/config/config.py", line 53, in __getattr__
raise AttributeError(f"'{self.__class__.__name__}' object has no "AttributeError: 'ConfigDict' object has no attribute 'test_pipeline'
In inference.py Line 79 - 82,the cfg is changed and the cfg.test_pipeline is replaced by cfg.pipeline. if isinstance(cfg.test_dataloader, list): cfg = copy.deepcopy(cfg.test_dataloader[0].dataset) else: cfg = copy.deepcopy(cfg.test_dataloader.dataset)
So, the code will run after changing cfg.test_pipeline.remove(t) to cfg.pipeline.remove(t).
In inference.py Line 79 - 82,the cfg is changed and the cfg.test_pipeline is replaced by cfg.pipeline. if isinstance(cfg.test_dataloader, list): cfg = copy.deepcopy(cfg.test_dataloader[0].dataset) else: cfg = copy.deepcopy(cfg.test_dataloader.dataset)
So, the code will run after changing cfg.test_pipeline.remove(t) to cfg.pipeline.remove(t).
Thanks a lot, I run after changing cfg.test_pipeline.remove(t) to cfg.pipeline.remove(t) and successfull solved the problem.
I hope the developer could fix code in the dev-1.x.
Thanks for your error report and we appreciate it a lot.
Checklist
Describe the bug
Reproduction
AssertionError: Failed to run image_demo.py
Environment
mmcv 2.0.0rc1
mmflow 1.0.0rc0
mmengine 0.5.0
The text was updated successfully, but these errors were encountered: