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

train failed, attributeError: __exit__ #8

Open
luoyangen opened this issue May 10, 2017 · 5 comments
Open

train failed, attributeError: __exit__ #8

luoyangen opened this issue May 10, 2017 · 5 comments

Comments

@luoyangen
Copy link

while using the command adagram-train input output, it comes to a error that in the learn.py line 30
with ThreadPool(processes=n_workers) as pool:

attributeError: exit

i am wondering if it's my python edition too old(2.7.12)? Should it be python3?

@lopuhin
Copy link
Owner

lopuhin commented May 10, 2017

@luoyangen it should work on Python 2.7, although I mostly tested on Python 3.5. Do you have a full traceback to share?

But also note that training with python-adagram is not recommended yet - it's better to train a model with AdaGram.jl and then convert it to python-adagram format.

@palfi-andras
Copy link

palfi-andras commented Jun 20, 2018

I know this is a year late, but I experienced the same issue, I was able to fix it by making the following change in the source code of python-adagram, in the file learn.py:

Change: with ThreadPool(...) as pool:

into: pool = ThreadPool(...)

This is tested and confirmed working on Python 2.7

On another note, @lopuhin Not sure what the current status of this project is anymore, but has any progress been made on the training portion of it? Or would you still advise that using the Julia version of the library is a safer option?

Regards.

@lopuhin
Copy link
Owner

lopuhin commented Jun 21, 2018

@palfi-andras no progress on the training part was made and I'm not working on it at the moment (but occasionally using the library for inference), so training a model with Julia version is still the way to go.

@natalytvinova
Copy link

@lopuhin I'm trying to understand the process of AdaGram and maybe use your implementation for my diploma work. Can you please tell what do you think is not working in the training part and maybe I will be helpful to fix it?

@lopuhin
Copy link
Owner

lopuhin commented Apr 10, 2019

Nice to hear that @natalytvinova . Unfortunately I don't know why training is not working as expected, but nearest neighbours don't make sense even for single-threaded code. It may be better to use original Julia code as a base, as it produces correct results.

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

4 participants