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

Gensim update breaks pecanpy due to size vs vector_size argument #16

Closed
CalvinLeather opened this issue Apr 22, 2021 · 1 comment
Closed

Comments

@CalvinLeather
Copy link

CalvinLeather commented Apr 22, 2021

Gensim has changed the size keyword argument to vector_size in genesis ~4. This broke pecanpy, as it pins gensim >=3.8.0.

The resulting traceback looks like:

Traceback (most recent call last):\n  File "/usr/local/Caskroom/miniconda/base/envs/pipeline/bin/pecanpy", line 8, in <module>\n    sys.exit(main())\n  File "/usr/local/Caskroom/miniconda/base/envs/pipeline/lib/python3.7/site-packages/pecanpy/cli.py", line 182, in main\n    main_helper(parse_args())\n  File "/usr/local/Caskroom/miniconda/base/envs/pipeline/lib/python3.7/site-packages/pecanpy/cli.py", line 177, in main_helper\n    timed_emb()\n  File "/usr/local/Caskroom/miniconda/base/envs/pipeline/lib/python3.7/site-packages/pecanpy/wrappers.py", line 18, in wrapper\n    result = func(*args, **kwargs)\n  File "/usr/local/Caskroom/miniconda/base/envs/pipeline/lib/python3.7/site-packages/pecanpy/cli.py", line 171, in timed_emb\n    learn_embeddings(args=args, walks=walks)\n  File "/usr/local/Caskroom/miniconda/base/envs/pipeline/lib/python3.7/site-packages/pecanpy/cli.py", line 148, in learn_embeddings\n    iter=args.iter,\nTypeError: __init__() got an unexpected keyword argument \'size\'\n

I will probably open a PR once I identify the breaking version (either to ping the version or just to fix the keyword argument usage), maybe later today, but opening this in case I forget so others can see. The easy fix is just to pin gensim at 3.8 locally.

Backup source on breaking changes: https://stackoverflow.com/questions/53195906/getting-init-got-an-unexpected-keyword-argument-document-this-error-in

@RemyLau
Copy link
Contributor

RemyLau commented May 12, 2021

Hi, this is resolved in the newest release (see this commit)!

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

2 participants