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

add wordrank in dockerfile #1460

Merged
merged 8 commits into from
Jul 19, 2017

Conversation

parulsethi
Copy link
Contributor

Fixes #1457

Used mpich instead of openmpi to avoid multithreading errors in wordrank.

@menshikh-iv
Copy link
Contributor

menshikh-iv commented Jul 5, 2017

About wordrank

======================================================================
ERROR: testEnsemble (gensim.test.test_wordrank_wrapper.TestWordrank)
Test ensemble of two embeddings
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/gensim/gensim/test/test_wordrank_wrapper.py", line 37, in setUp
    self.test_model = wordrank.Wordrank.train(self.wr_path, self.corpus_file, self.out_name, iter=6, dump_period=5, period=5, cleanup_files=True)
  File "/gensim/gensim/models/wrappers/wordrank.py", line 161, in train
    output = utils.check_output(args=cmd)
  File "/gensim/gensim/utils.py", line 1177, in check_output
    raise error
CalledProcessError: Command '['mpirun', '-np', '1', '../wordrank', '--beta', '99', '--loss', 'hinge', '--epsilon', '0.75', '--period', '5', '--alpha', '100', '--lrate', '0.001', '--path', 'meta', '--dump_period', '5', '--dump_prefix', 'model', '--dim', '100', '--sgd_num', '100', '--nthread', '8', '--iter', '6', '--reg', '0']' returned non-zero exit status 139
root@18d3d950726b:/gensim/gensim_dependencies/wordrank# mpirun -np 1 ../wordrank --beta 99 --loss hinge --epsilon 0.75 --period 5 --alpha 100 --lrate 0.001 --path meta --dump_period 5 --dump_prefix model --dim 100 --sgd_num 100 --nthread 8 --iter 6 --reg 0
[proxy:0:0@18d3d950726b] HYDU_create_process (utils/launch/launch.c:75): execvp error on file ../wordrank (Permission denied)

Also, please update develop branch in your gensim fork & use updated version as base branch for your PRs in future (because I see old errors too, but this errors already fixed)

@parulsethi
Copy link
Contributor Author

@menshikh-iv Updated my add_wordrank_in_docker branch with develop. And the Segmentation fault (signal 11) error can be reproduced by first running gensim's test_wordrank_wrapper.py (to create testmodel directory containing metadata, vocab.txt etc.) and then running the

mpirun -np 1 ../wordrank --beta 99 --loss hinge --epsilon 0.75 --period 5 --alpha 100 --lrate 0.001 --path meta --dump_period 5 --dump_prefix model --dim 100 --sgd_num 100 --nthread 8 --iter 6 --reg 0

from directory /gensim/gensim_dependencies/wordrank/testmodel

@@ -0,0 +1,20 @@
#!/bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this script from PR. You already download it with the wordrank repo. After it, use awk or sed to replace #export CC=icc CXX=icc to export CC=gcc CXX=g++

@menshikh-iv
Copy link
Contributor

menshikh-iv commented Jul 13, 2017

Also, do several things

  1. Add parameter for -np to WordRank __init__
  2. Remove cd call from wrapper and use absolute path to binary instead of relative ../wordrank
  3. Add comment & link in wrapper about ompi+docker problems (for example, this thread)

@menshikh-iv menshikh-iv merged commit 59c3834 into piskvorky:develop Jul 19, 2017
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

Successfully merging this pull request may close these issues.

2 participants