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

trainers docs show configuring callbacks but these will not be used #1642

Closed
robmarkcole opened this issue Oct 10, 2023 · 2 comments · Fixed by #1647
Closed

trainers docs show configuring callbacks but these will not be used #1642

robmarkcole opened this issue Oct 10, 2023 · 2 comments · Fixed by #1647
Labels
documentation Improvements or additions to documentation trainers PyTorch Lightning trainers
Milestone

Comments

@robmarkcole
Copy link
Contributor

robmarkcole commented Oct 10, 2023

Issue

The trainer docs show setting callbacks=[checkpoint_callback, early_stopping_callback], but if you run this you will get a warning:

The following callbacks returned in `LightningModule.configure_callbacks` will override existing 
callbacks passed to Trainer: EarlyStopping, ModelCheckpoint

Honestly I am not a fan of this behaviour, but regardless the docs need ammending

Fix

The docs should state the behaviour of tasks, and show how to use a conventional lightning module in their place when the default behaviour is not desired

@robmarkcole robmarkcole added the documentation Improvements or additions to documentation label Oct 10, 2023
@calebrob6
Copy link
Member

I think configure_callbacks should be removed from BaseTask

@adamjstewart
Copy link
Collaborator

Interesting, this is frustrating. I wish there was a way to set defaults without them overriding everything. We could leave it up to the user but it's annoying that everyone will have to add these every time they want them.

@adamjstewart adamjstewart added the trainers PyTorch Lightning trainers label Oct 10, 2023
@adamjstewart adamjstewart added this to the 0.5.1 milestone Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation trainers PyTorch Lightning trainers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants