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

Remove on_batch_begin and on_batch_end callbacks #3078

Merged
merged 6 commits into from
Mar 19, 2021
Merged

Remove on_batch_begin and on_batch_end callbacks #3078

merged 6 commits into from
Mar 19, 2021

Conversation

mpenkov
Copy link
Collaborator

@mpenkov mpenkov commented Mar 16, 2021

Fix #2182

I added a documentation note to avoid using these callbacks. With Python, we cannot prevent people from implementing those callback handlers in their own subclasses, so a documentation warning is the most that we can do.

Copy link
Owner

@piskvorky piskvorky left a comment

Choose a reason for hiding this comment

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

Looks good, thanks. But tests are failing + needs a mention in the Migration notes too.

@mpenkov
Copy link
Collaborator Author

mpenkov commented Mar 16, 2021

The tests are failing for an unrelated reason.

504  Gateway Time-out [IP: 34.223.170.36 443]
Reading package lists...
E: The repository 'https://dl.bintray.com/sbt/debian  Release' is no longer signed.

Not sure what's going on there. If it doesn't self-resolve, I'll have to investigate explicitly later.

Updated the migration docs here.

@mpenkov
Copy link
Collaborator Author

mpenkov commented Mar 16, 2021

Alright, I managed to work around the unrelated test failures. Please have a look at the PR and the migration note updates and let me know if this is good to merge.

@gojomo
Copy link
Collaborator

gojomo commented Mar 17, 2021

Looks good, though if progress_queue.callbacks now never consulted, it also need not be set (in "messy way") earlier:

https://github.com/RaRe-Technologies/gensim/blob/1efa5066ccd8c3e60898a4a7d64828c348b7a3fb/gensim/models/word2vec.py#L1406

@mpenkov mpenkov merged commit 0dbfa80 into develop Mar 19, 2021
@mpenkov mpenkov deleted the callbacks branch March 19, 2021 02:10
@piskvorky piskvorky changed the title remove on_batch_begin and on_batch_end callbacks Remove on_batch_begin and on_batch_end callbacks Mar 21, 2021
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.

Word2Vec keeps on training during on_batch_end call
3 participants