-
-
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
Throw exception if load() is called on instance rather than the class #889
Merged
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
25fc004
Update word2vec.py
aayux 58976d8
Update word2vec.py
aayux cf34e2d
Update word2vec.py
aayux 773a75e
Update doc2vec.py
aayux 96d65ec
Update doc2vec.py
aayux d91b99d
Update word2vec.py
aayux c156c79
Update utils.py
aayux 60d42a3
Update word2vec.py
aayux cc7e3e1
Update utils.py
aayux a0ea2b4
Update word2vec.py
aayux 2d85ef5
Update doc2vec.py
aayux ac0b0f3
Merge pull request #1 from dust0x/Issue-889
aayux 770a277
Update doc2vec.py
aayux 772cdcd
Update word2vec.py
aayux 4c4ec8c
Update utils.py
aayux 7173993
Update word2vec.py
aayux bb7b9e9
Update doc2vec.py
aayux 23461e3
Merge branch 'develop' of https://github.com/RaRe-Technologies/gensim…
aayux fb5bd0b
Update doc2vec.py
aayux 6ef3599
Update utils.py
aayux 075d925
modified: gensim/utils.py
aayux bb53ccf
modified: gensim/test/test_doc2vec.py
aayux e39b8d6
modified: gensim/test/test_word2vec.py
aayux cec0a1b
modified: gensim/test/test_doc2vec.py
aayux c09e4d8
modified: gensim/test/test_doc2vec.py
aayux ea89bd5
modified: gensim/test/test_doc2vec.py
aayux 5d743f1
modified: gensim/test/test_doc2vec.py
aayux d045bd2
modified: gensim/test/test_doc2vec.py
aayux 07b3700
Merge https://github.com/RaRe-Technologies/gensim into develop
aayux 40f2a50
Update test_word2vec.py
aayux 43c7b08
Update test_doc2vec.py
aayux b50d60a
Update test_doc2vec.py
aayux eba33bc
Update test_word2vec.py
aayux 6ffacdf
Update doc2vec.py
aayux f0137b8
Update doc2vec.py
aayux 3bf25fc
Update test_word2vec.py
aayux 7519519
Update test_word2vec.py
aayux 2d28b03
Update test_word2vec.py
aayux 19d2035
Update test_doc2vec.py
aayux e68bb13
Update test_word2vec.py
aayux 37c9149
Merge pull request #2 from dust0x/tests
aayux d9b45c3
Merge branch 'develop' into develop
tmylk 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
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
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
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
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
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.
But this will leave the attribute function unbound, leading to potential confusion / serialization issues.
Proper way would be to bind it properly with
types.MethodType
or somesuch.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.
If the serialization tests pass, and the exception message is understandable if it's ever called (by mistake), I don't see what other clarity would come from binding the method. That'd just make it look more like an instance-specific operation... which it specifically is not.
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.
@piskvorky, that is what I did at the beginning. Apart from the points @gojomo raises, there are some issues with the way
types.MethodTypes
is handled in Python versions 2 and 3.