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

[MRG] Migrate tutorials & how-tos to 4.0.0 #2968

Merged
merged 6 commits into from
Oct 1, 2020
Merged

Conversation

piskvorky
Copy link
Owner

@piskvorky piskvorky commented Sep 30, 2020

Part of #2960.

@piskvorky piskvorky added this to the 4.0.0 milestone Sep 30, 2020
@piskvorky piskvorky self-assigned this Sep 30, 2020
@piskvorky
Copy link
Owner Author

@gojomo I went over our guides & tutorials, and all necessary migrations are in 502b654. It went pretty smoothly, I only wasn't sure about doc2vec (see the one FIXME in diff). Overall migration shouldn't be a major issue, I'm happy about that.

I did see some uses of build_vocab() in the tutorials. These might need another touch after your #2944 is merged (maybe), I'll keep that in mind.

@piskvorky piskvorky changed the title [WIP] Migrate tutorials & how-tos to 4.0.0 [MRG] Migrate tutorials & how-tos to 4.0.0 Sep 30, 2020
@piskvorky
Copy link
Owner Author

piskvorky commented Sep 30, 2020

Should be done now. I'll remove my internal test hacks & regenerate all docs next, so there will be lots of autogenerated auto_examples files in this PR soon.

My migration notes:

word2vec

  • .vocab => .index_to_key
  • size=100 => vector_size=100
  • model.analogies() => model.wv.evaluate_word_analogies()
  • index2word => .index_to_key

doc2vec

  • .docvecs => .dv
  • .index_to_doctag => .index_to_key
  • dv.count = len(dv)

fasttext

  • shenanigans around OOV / in-vocab for word in model ~ word in model.wv.key_to_index

@piskvorky
Copy link
Owner Author

piskvorky commented Sep 30, 2020

Actually, before I push the autogenerated auto_examples – do you want to review too @mpenkov ? After the push, the PR will be a mess of files.

I already pushed auto_examples for the four core tutorials by accident – only the files in gallery matter for review.

Edit: The regenerated docs are now available at https://radimrehurek.com/gensim_redesign/
I'll wait for @mpenkov review before I push auto_examples & merge.

@piskvorky
Copy link
Owner Author

piskvorky commented Oct 1, 2020

OK I'll merge, I need to continue with the other tickets. @mpenkov please let me know if you see anything wrong here whenever you get to it. I'll fix ex-post.

@piskvorky piskvorky merged commit 683cebe into develop Oct 1, 2020
@piskvorky piskvorky deleted the migrate_tutorials branch October 1, 2020 20:14
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