-
-
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
Remove direct access to properties moved to KeyedVectors #1147
Conversation
@tmylk - the class comments still reference |
Agree, also the method should throw a "Deprecated, please use KeyedVectors" exception because it confuses a lot of user and it is not clear where did this function go. |
I'm getting lost too. Why not just return what the user asked for, instead of raising an exception? Don't we have that information? |
After removing the direct access now there is only one way left to access the attribute. It makes things simpler and uniform across various embeddings. Do you agree? |
It's fine if the "recommended way" changes to something else, no problem with that. But raising exceptions, breaking backward compatibility, where we could actually serve the request no problem, sounds strange. I don't remember the reasoning any more, but it looks plain malicious to me. Why would we do that? |
Sorry, I don't understand the question. One way to access an attribute is better than two ways. The reason we added KeyedVectors class is described in the release notes. After adding KeyedVectors there were two ways to do things so we needed to deprecate one of them. |
As I recall the reasoning: There would be somewhat of a surprise/violating-expectations problem if If it still returned a |
If I understand correctly, continuing to support attribute access like On the other hand, not supporting it costs a lot to the users, who are confused about this (seemingly) useless obfuscation of Weighing the costs/benefits, I don't think removing the support is a good choice. It feels capricious. But maybe such breaking changes will force users to upgrade :-) |
The cost of cleanly supporting both Reasons why this change is required:
Another minor cost is that bugs like #1173 would be harder to catch where "the vectors are not loaded into the syn0 attribute of the KeyedVector instance, and are instead loaded into the syn0 attribute of the Word2Vec instance". I avoided the change to The deprecation seemed a better choice because it only affects word2vec and the users were warned with Warnings for 2 months. It was a learning experience in how much attention users pay to warnings. And they pay less attention than I wish they did. :) In hindsight, in this release instead of a complete code path deprecation, the warning should have become an Exception suggesting to use There are also advantages of deprecation as @gojomo wrote above: better API for a minimal |
Following up on deprecation warnings added in #980