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

More granular callbacks #1440

Closed
awaelchli opened this issue Apr 10, 2020 · 3 comments · Fixed by #2842
Closed

More granular callbacks #1440

awaelchli opened this issue Apr 10, 2020 · 3 comments · Fixed by #2842
Assignees
Labels
feature Is an improvement or enhancement help wanted Open to be worked on won't fix This will not be worked on

Comments

@awaelchli
Copy link
Contributor

🚀 Make callback system more granular

Motivation

I am currently implementing #765 (make progress bar into a callback) and I need additional callback methods to do this.

Pitch

introduce these new callback methods:

  • on_train_batch_start (currently named on_batch_start)
  • on_train_batch_end (currently named on_batch_end)
  • on_val_batch_start
  • on_val_batch_end
  • on_test_batch_start
  • on_test_batch_end

and make on_batch_start run on any of the above *_start (same for on_batch_end)

Further suggestions:

  • introduce on_train_epoch_start, on_val_epoch_start, on_test_epoch_start and corresponding *_end methods.

Alternatives

Keep as is, but I don't know how to implement the progress bar callback otherwise for validation/test updates.

@awaelchli awaelchli added feature Is an improvement or enhancement help wanted Open to be worked on labels Apr 10, 2020
@awaelchli awaelchli mentioned this issue Apr 11, 2020
7 tasks
@awaelchli
Copy link
Contributor Author

For the record, #1450 introduced callbacks for validation_start/end, test_start/end, and sanity_check_start/end.

The question remains whether we should rename on_batch_* to on_training_batch_* for consistency with the naming of the others.

@Borda
Copy link
Member

Borda commented Apr 24, 2020

The question remains whether we should rename on_batch_* to on_training_batch_* for consistency with the naming of the others.

that it shall be for all batch train/valid...

@awaelchli awaelchli self-assigned this Apr 27, 2020
@stale
Copy link

stale bot commented Jun 26, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the won't fix This will not be worked on label Jun 26, 2020
@stale stale bot closed this as completed Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Is an improvement or enhancement help wanted Open to be worked on won't fix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants