Import ERROR: Class advice impossible in Python3. Use the @implementer class decorator instead.
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9k
- Forks
- 1.5k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 3
Description
Work on colab.
from apex import amp
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-15-84f31a44eed6> in <module>()
16 from torchsnooper import snoop
17 import math
---> 18 from apex import amp
3 frames
/usr/local/lib/python3.6/dist-packages/apex/__init__.py in <module>()
16 from apex.exceptions import (ApexAuthSecret,
17 ApexSessionSecret)
---> 18 from apex.interfaces import (ApexImplementation,
19 IApex)
20 from apex.lib.libapex import (groupfinder,
/usr/local/lib/python3.6/dist-packages/apex/interfaces.py in <module>()
8 pass
9
---> 10 class ApexImplementation(object):
11 """ Class so that we can tell if Apex is installed from other
12 applications
/usr/local/lib/python3.6/dist-packages/apex/interfaces.py in ApexImplementation()
12 applications
13 """
---> 14 implements(IApex)
/usr/local/lib/python3.6/dist-packages/zope/interface/declarations.py in implements(*interfaces)
481 # the coverage for this block there. :(
482 if PYTHON3:
--> 483 raise TypeError(_ADVICE_ERROR % 'implementer')
484 _implements("implements", interfaces, classImplements)
485
TypeError: Class advice impossible in Python3. Use the @implementer class decorator instead.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start with apex/interfaces.py, where the Python 3 traceback shows the failing class declaration, and reproduce the problem with from apex import amp. Update the interface declaration as indicated by the error, then verify that importing apex.amp succeeds under Python 3.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100