-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
[WIP] Computes training loss for Word2Vec model (fixes issue #999) #1201
Merged
menshikh-iv
merged 27 commits into
piskvorky:develop
from
chinmayapancholi13:word2vec_skipgram_loss
Jun 29, 2017
Merged
Changes from 26 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
a3b57f3
computes training loss for skip gram
chinmayapancholi13 0cfc672
Merge branch 'develop' of https://github.com/RaRe-Technologies/gensim…
chinmayapancholi13 501647c
synced word2vec.py with gensim_main
chinmayapancholi13 03fff61
removed unnecessary keep_bocab_item import
chinmayapancholi13 ed78b06
synced word2vec.py with gensim_main
chinmayapancholi13 dcd80f2
Merge remote-tracking branch 'refs/remotes/origin/develop' into develop
chinmayapancholi13 c455d18
Merge branch 'develop' of https://github.com/RaRe-Technologies/gensim…
chinmayapancholi13 64ececd
Merge branch 'develop' of https://github.com/RaRe-Technologies/gensim…
chinmayapancholi13 dcae99d
Merge branch 'word2vec_skipgram_loss' of https://github.com/chinmayap…
chinmayapancholi13 0939b32
PEP8 changes
chinmayapancholi13 8949749
added Python-only implementation for skip-gram model
chinmayapancholi13 d2620fd
updated param name to 'compute_loss'
chinmayapancholi13 4d01f78
removed 'raise ImportError' statement from prev commit
chinmayapancholi13 3fdd2e9
[WIP] partial changes for loss computation for skipgram case
chinmayapancholi13 e0fc9f2
[WIP] updated cython code
chinmayapancholi13 ca4aa69
added unit test for training loss computation
chinmayapancholi13 96f28fc
added loss computation for neg sampling
chinmayapancholi13 4a686de
removed unnecessary 'raise ImportError' stmt
chinmayapancholi13 5ab89b0
Merge branch 'develop' of https://github.com/RaRe-Technologies/gensim…
chinmayapancholi13 c3db4fa
added .c and .pyx to flake8 ignore list
chinmayapancholi13 4e8ecac
added loss computation for CBOW model in Python path
chinmayapancholi13 e71401a
added loss computation for CBOW model in Cython path
chinmayapancholi13 b80e183
PEP8 (F811) fix due to var 'prod'
chinmayapancholi13 cc6e0ea
updated w2v ipynb for training loss computation and benchmarking
8c84680
resolved merge conflict in 'flake8_diff.sh'
dda1911
updated .c files
0acd3d6
added benchmark results
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure
.pyx
should be here? I didn't see what kind of warnings flake was generating, but as cython syntax is mostly python, and most of our enforceable conventions should still be in effect, we may want some style-enforcement there.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gojomo flake8 can't correctly check
pyx
filesThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gojomo We were getting errors like these due to flake8 :
So although I do agree that there is some style-checking that we might want to do in .pyx files (in the python-like code), to avoid getting errors due to cases similar to the above cases, I thought it would be better to ignore .pyx for flake8 tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. There's an SO answer that implies it may be possible to turn off just certain warnings for
.pyx
files – https://stackoverflow.com/questions/31269527/running-pep8-or-pylint-on-cython-code – though the full example file is a broken link.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for sharing this link. :) I can try to use the config specified in the answer here to check if all the undesired warnings/errors are turned off using it.