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

ImportError: cannot import name '_get_trace_graph' #2652

Closed
123mw123 opened this issue Feb 23, 2021 · 5 comments
Closed

ImportError: cannot import name '_get_trace_graph' #2652

123mw123 opened this issue Feb 23, 2021 · 5 comments

Comments

@123mw123
Copy link

123mw123 commented Feb 23, 2021

** fvcore version of PathManager will be deprecated soon. **
** Please migrate to the version in iopath repo. **
https://github.com/facebookresearch/iopath

Traceback (most recent call last):
File "object_det_pipeline.py", line 31, in
from modules.deep_learning.MaskRCNN_detectron2.api import RunModel as RunModel_Object
File "/home/Saiteja/pipeline/modules/object_detection/source/../../../modules/deep_learning/MaskRCNN_detectron2/api.py", line 3, in
from detectron2.engine import DefaultPredictor
File "/home/Saiteja/detectron2/detectron2/engine/init.py", line 11, in
from .hooks import *
File "/home/Saiteja/detectron2/detectron2/engine/hooks.py", line 15, in
from fvcore.nn.precise_bn import get_bn_modules, update_bn_stats
File "/home/Saiteja/venv_Pipeline/lib/python3.6/site-packages/fvcore-0.1.3.post20210223-py3.6.egg/fvcore/nn/init.py", line 2, in
File "/home/Saiteja/venv_Pipeline/lib/python3.6/site-packages/fvcore-0.1.3.post20210223-py3.6.egg/fvcore/nn/activation_count.py", line 9, in
File "/home/Saiteja/venv_Pipeline/lib/python3.6/site-packages/fvcore-0.1.3.post20210223-py3.6.egg/fvcore/nn/jit_analysis.py", line 14, in
ImportError: cannot import name '_get_trace_graph'

How to resolve this? Can somebody help me

Environment:

Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

GPU: GeForce RTX 3070
Cuda: 10.0

torch installation: pip3.6 install torch==1.3.1+cu100 torchvision==0.4.2+cu100 -f https://download.pytorch.org/whl/torch_stable.html

git commit ID: 94d0f13

@github-actions
Copy link

You've chosen to report an unexpected problem or bug. Unless you already know the root cause of it, please include details about it by filling the issue template.
The following information is missing: "Instructions To Reproduce the Issue and Full Logs"; "Your Environment";

@github-actions github-actions bot added the needs-more-info More info is needed to complete the issue label Feb 23, 2021
@123mw123 123mw123 changed the title Please read & provide the following ImportError: cannot import name '_get_trace_graph' Feb 23, 2021
@github-actions github-actions bot removed the needs-more-info More info is needed to complete the issue label Feb 23, 2021
@ppwwyyxx
Copy link
Contributor

We do not support pytorch 1.3 as https://detectron2.readthedocs.io/en/latest/tutorials/install.html says

@123mw123
Copy link
Author

We do not support pytorch 1.3 as https://detectron2.readthedocs.io/en/latest/tutorials/install.html says

But I am able to train and test on Ubuntu 16.04, NVIDIA TITAN RTX, CUDA 10.0 using torch 1.3

@voldemortX
Copy link

@ramadevsaiteja I met a similar issue with torch1.3 since the lastest fvcore does not support torch1.3 anymore. Rolling fvcore back to earlier versions can solve this.
For example, I use this version. You can do this by:

pip uninstall fvcore
git clone https://github.com/facebookresearch/fvcore.git
cd fvcore
git checkout c0ba80ac330ac08dd27ef1ce2e69c455d6f48e56
cd ..
pip install -e fvcore

egemenertugrul pushed a commit to egemenertugrul/detectron2 that referenced this issue Jun 18, 2021
Installing the latest version of fvcore results in the following error: facebookresearch/detectron2#2652
We should specify the solution, which is rolling fvcore to one of the previous versions, in the README file.
@123mw123
Copy link
Author

123mw123 commented Aug 13, 2021

Found the solution. Just do pip install fvcore=='0.1.dev200114'

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants