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

Replace open() by smart_open() in gensim.models.fasttext._load_fasttext_format #2335

Merged
merged 3 commits into from
Jan 17, 2019

Conversation

rsdel2007
Copy link
Contributor

Fixed a TODO in fasttext.py.
Since https://github.com/RaRe-Technologies/smart_open/issues/207 is fixed now, we can replace open by smart_open.

@menshikh-iv
Copy link
Contributor

@rsdel2007 thank you, please

  • add a test (to avoid this regression in future)
  • update smart-open version in setup.py (should be "first release that includes this bugfix)

@rsdel2007
Copy link
Contributor Author

Okay I will do that.

@rsdel2007
Copy link
Contributor Author

@menshikh-iv , there is already a test for the function _load_fasttext_format and after changes it passing the tests.

@menshikh-iv
Copy link
Contributor

@rsdel2007 okay, just link it here and fix requirements

@rsdel2007
Copy link
Contributor Author

Here is the link for the test of _load_fasttext_format.
What should I update smart_open, previously in setup.py it is written as smart_open >= 1.2.1.

@menshikh-iv
Copy link
Contributor

@rsdel2007 update minimal version to version without a bug

setup.py Outdated
@@ -347,7 +347,7 @@ def finalize_options(self):
'numpy >= 1.11.3',
'scipy >= 0.18.1',
'six >= 1.5.0',
'smart_open >= 1.2.1',
'smart_open >= 1.7.1',
Copy link
Contributor

Choose a reason for hiding this comment

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

this fixed in 1.7.0, is the problem still appears in 1.7.0?

Copy link
Contributor Author

@rsdel2007 rsdel2007 Jan 16, 2019

Choose a reason for hiding this comment

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

No, it is working fine for 1.7.0. Should I change it to 1.7.0?

Copy link
Contributor

Choose a reason for hiding this comment

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

of course, this must be minimal supported version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. 👍

@menshikh-iv
Copy link
Contributor

@rsdel2007 I temporary disabled CI here, will re-run later (next several days), I need all CIs for pre-release checks, sorry.

@menshikh-iv menshikh-iv changed the title replaced open() by smart_open() in fasttext Replace open() by smart_open() in gensim.models.fasttext._load_fasttext_format Jan 17, 2019
@menshikh-iv
Copy link
Contributor

Thank you @rsdel2007 🥇

@menshikh-iv menshikh-iv merged commit ea611b4 into piskvorky:develop Jan 17, 2019
@rsdel2007 rsdel2007 deleted the open branch January 17, 2019 12:10
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.

None yet

2 participants