zhanghang1989 / zhanghang1989/PyTorch-Encoding

cannot import name 'gpu' from partially initialized module 'encoding'

Open
#403 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2k
Forks
448
PR merge metrics
No merged PRs in 30d

Description

When I run the following code:
python test.py --dataset ADE20K --model-zoo EncNet_ResNet50s_ADE --eval
I miss the error and i can't fix it :
ImportError: cannot import name 'gpu' from partially initialized module 'encoding' (most likely due to a circular import) (/home/anaconda3/lib/python3.8/site-packages/torch_encoding-1.2.2b20210718-py3.8-linux-x86_64.egg/encoding/init.py)
2021-07-18 21-47-45 的屏幕截图

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the command python test.py --dataset ADE20K --model-zoo EncNet_ResNet50s_ADE --eval in the reported Python 3.8 environment. Inspect the installed encoding/__init__.py named in the traceback and determine why importing gpu fails; done means the command reaches evaluation without this ImportError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.