mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-11 12:31:23 +08:00
Split callbacks (#849)
* add .vscode in .gitignore * Split callbacks in individual files + add a property to Callback for easy trainer instance access * formatting * Add a conda env file for quick and easy env setup to develop on PL * Adress comments * add fix to kth_best_model * add some typing to callbacks * fix typo * add autopep8 config to pyproject.toml * format again * format * fix toml * fix toml again * consistent max line length in all config files * remove conda env file * Update pytorch_lightning/callbacks/early_stopping.py Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com> * Update pytorch_lightning/callbacks/model_checkpoint.py Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com> * docstring * Update pytorch_lightning/callbacks/model_checkpoint.py Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com> * Update pytorch_lightning/callbacks/model_checkpoint.py Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com> * fix logic error * format * simplify if/else * format * fix linting issue in changelog * edit changelog about new callback mechanism * fix remaining formating issue on CHANGELOG * remove lambda function because it's compatible with pickle (used during ddp) Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
This commit is contained in:
co-authored by
Jirka Borovec
parent
da2f11a9c4
commit
89d5772f55
@@ -1,6 +1,11 @@
|
||||
from .pt_callbacks import EarlyStopping, ModelCheckpoint, GradientAccumulationScheduler
|
||||
from .base import Callback
|
||||
from .early_stopping import EarlyStopping
|
||||
from .model_checkpoint import ModelCheckpoint
|
||||
from .gradient_accumulation_scheduler import GradientAccumulationScheduler
|
||||
|
||||
|
||||
__all__ = [
|
||||
'Callback',
|
||||
'EarlyStopping',
|
||||
'ModelCheckpoint',
|
||||
'GradientAccumulationScheduler',
|
||||
|
||||
Reference in New Issue
Block a user