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

apex error #38

Open
zhh210 opened this issue Aug 20, 2018 · 6 comments
Open

apex error #38

zhh210 opened this issue Aug 20, 2018 · 6 comments

Comments

@zhh210
Copy link

zhh210 commented Aug 20, 2018

Somehow it keeps getting errors when running the cmd from colab:

!python3 transfer.py --load_model imdb_clf.pt

It yields error of:
File "transfer.py", line 20, in <module> from apex.reparameterization import apply_weight_norm, remove_weight_norm File "/usr/local/lib/python3.6/dist-packages/apex/__init__.py", line 18, in <module> from apex.interfaces import (ApexImplementation, File "/usr/local/lib/python3.6/dist-packages/apex/interfaces.py", line 10, in <module> class ApexImplementation(object): File "/usr/local/lib/python3.6/dist-packages/apex/interfaces.py", line 14, in ApexImplementation implements(IApex) File "/usr/local/lib/python3.6/dist-packages/zope/interface/declarations.py", line 483, in implements raise TypeError(_ADVICE_ERROR % 'implementer') TypeError: Class advice impossible in Python3. Use the @implementer class decorator instead.

@raulpuric
Copy link
Contributor

What are your environment specs and also did you run python setup.py install?

@nickto
Copy link

nickto commented Oct 18, 2018

Had the same issue, running python setup.py install solved the problem.

@ChrystianSchutz
Copy link

ChrystianSchutz commented Dec 23, 2018

Even after python setup.py install I still have the same error.
Installed apex 0.1 and running on AWS t2.2xlarge GPU

@raulpuric
Copy link
Contributor

Sorry, other people are also having install errors. Please give us until after the holidays to fix this.

In the meantime copying apex to your working directory should solve import problems (cp -r apex_utils/apex .)

@MichaMucha
Copy link

MichaMucha commented Apr 2, 2019

Actually the methods being imported seem to refer to the directory reparameterization in the root directory of this repo, specifically to reparameterization/__init__.py

All you need to do to get over this hurdle is to remove the apex. part from.
from apex.reparameterization import apply_weight_norm, remove_weight_norm
in main.py and generate.py

edit:
correct me if I'm wrong please.
I understand the error message comes from the module "apex" available on pypi, which seems to be about authentication. Not sure why the authors used the word apex

@raymondklutse
Copy link

Actually the methods being imported seem to refer to the directory reparameterization in the root directory of this repo, specifically to reparameterization/__init__.py

All you need to do to get over this hurdle is to remove the apex. part from.
from apex.reparameterization import apply_weight_norm, remove_weight_norm
in main.py and generate.py

edit:
correct me if I'm wrong please.
I understand the error message comes from the module "apex" available on pypi, which seems to be about authentication. Not sure why the authors used the word apex

This worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants