* add state_dict for early stopping
* move best attr after monitor_op defined
* improve early stopping and model checkpoint callbacks
* fix formatting
* fix attr init order
* clean up setting of default_root_dir attr
* logger needs default root dir set first
* reorg trainer init
* remove direct references to checkpoint callback
* more fixes
* more bugfixes
* run callbacks at epoch end
* update tests to use on epoch end
* PR cleanup
* address failing tests
* refactor for homogeneity
* fix merge conflict
* separate tests
* tests for early stopping bug regressions
* small fixes
* revert model checkpoint change
* typo fix
* fix tests
* update train loop
* cannot pass an int as default_save_path
* refactor log message
* fix test case
* appease the linter
* fix some doctests
* move config to callback
* fixes from rebase
* fixes from rebase
* chlog
* docs
* reformat
* formatting
* fix
* fix
* fixes from rebase
* add new test for patience
* 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>
* Update tests/callbacks/test_early_stopping.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* fix formatting
* remove enable_early_stop attribute
* add state_dict for early stopping
* move best attr after monitor_op defined
* improve early stopping and model checkpoint callbacks
* fix formatting
* fix attr init order
* clean up setting of default_root_dir attr
* logger needs default root dir set first
* reorg trainer init
* remove direct references to checkpoint callback
* more fixes
* more bugfixes
* run callbacks at epoch end
* update tests to use on epoch end
* PR cleanup
* address failing tests
* refactor for homogeneity
* fix merge conflict
* separate tests
* tests for early stopping bug regressions
* small fixes
* revert model checkpoint change
* typo fix
* fix tests
* update train loop
* fix test case
* appease the linter
* fix some doctests
* move config to callback
* fixes from rebase
* fixes from rebase
* chlog
* docs
* reformat
* formatting
* fix
* fix
* fixes from rebase
* add new test for patience
* 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>
* Update tests/callbacks/test_early_stopping.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* fix formatting
* remove enable_early_stop attribute
* fix test with new epoch indexing
* fix progress bar totals
* fix off by one error (see #2289) epoch starts at 0 now
* added missing imports
* fix hpc_save folderpath
* fix formatting
* fix tests
* small fixes from a rebase
* fix
* tmpdir
* tmpdir
* tmpdir
* wandb
* fix merge conflict
* add back evaluation after training
* test_resume_early_stopping_from_checkpoint TODO
* undo the horovod check
* update changelog
* remove a duplicate test from merge error
* try fix dp_resume test
* add the logger fix from master
* try remove default_root_dir
* try mocking numpy
* try import numpy in docs test
* fix wandb test
* pep 8 fix
* skip if no amp
* dont mock when doctesting
* install extra
* fix the resume ES test
* undo conf.py changes
* revert remove comet pickle from test
* Update CHANGELOG.md
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update weights_loading.rst
* Update weights_loading.rst
* Update weights_loading.rst
* renamed flag
* renamed flag
* revert the None check in logger experiment name/version
* add the old comments
* _experiment
* test chckpointing on DDP
* skip the ddp test on windows
* cloudpickle
* renamed flag
* renamed flag
* parentheses for clarity
* apply suggestion max epochs
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Jeremy Jordan <jtjordan@ncsu.edu>
Co-authored-by: Jirka <jirka@pytorchlightning.ai>
Co-authored-by: Jeremy Jordan <13970565+jeremyjordan@users.noreply.github.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: William Falcon <waf2107@columbia.edu>
`save_top_k` should be an `int` and have been mentioned as `save_top_k=True` in the snippet provided under 'Saving and Loading Weights' docs. Changed it to its default value (1) to make it consistent.
Signed-off-by: Kshitij Patil <kshitijpatil98@gmail.com>
* no cov
* no cov
* ReduceOp
* group
* reduce_op.sum
* Update sklearns.py
* formatting
* horovod
* Apply suggestions from code review
* horovod
* horovod
* horovod
* horovod
* ci
* print
* ci
* timeout
* timeout
* time
* fix
* distributed cpu
* pipes
* time
* cpu
* spawn
* spawn
* spawn
* tp
* separate
* os
* os
* npm
* Fix load_from_checkpoint() not working with URL on Windows
* Update CHANGELOG
* Update CHANGELOG.md
Co-authored-by: Peter Yu <2057325+yukw777@users.noreply.github.com>
* Apply suggestions from code review
* fix
* fix meta tags creating empty lines
* pyright
* node
* fix httpserver address
* drop tutils.default_trainer_options
* imports
* Better fix for load_from_checkpoint() not working with absolute path on Windows (#2294)
* Fix load_from_checkpoint() not working with URL on Windows
* Update CHANGELOG
* Update CHANGELOG.md
Co-authored-by: Peter Yu <2057325+yukw777@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Peter Yu <2057325+yukw777@users.noreply.github.com>
* drop duplicate
Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
Co-authored-by: airium <airium@outlook.com>
Co-authored-by: Peter Yu <2057325+yukw777@users.noreply.github.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: AIRIUM <38249940+airium@users.noreply.github.com>
* deal with NotImplementedError raised by torchtext
* deal with NotImplementedError raised by torchtext
* Added tests for dataloader which raise NotImplementedError in __len__()
* Fixed some typos
* enabled tests for dataloader raising NotImplementedError in __len__ and corrected match string for raised exception
* deleted empty line for style compliance
* refactored CustomNotImplementedErrorDataloader to derive from CustomInfDataloader
* enabled reduced number of not_implemented_error dataloader test to reduce runtime for continuous integration
* reduced test number of not_implemented_error dataloader test further to reduce test time
* reduced test number of not_implemented_error dataloader test to one to reduce test time
* disabled all not_implemented_error dataloader test to see if test pass in time
* added __next__ with a reduced number (5) of elements after which CustomNotImplementedErrorDataloader stops to speedup test.
* enabling all not_implemented_error dataloader test
* added brief description of change and relation of torchtext
* CustomNotImplementedErrorDataloader reduced number of batches served to 2.
* Update CHANGELOG.md
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Apply suggestions from code review
* Update CHANGELOG.md
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Disable parallelism in dataloader
Suspect that it might cause pytest to hang more frequent
* added max_steps=None to Trainer in not_implemented_error dataloader tests
* rearranged not_implemented_error test in file to group them together
* disabled parallel data loading
Reason: testing if that stops the test framework from hanging.
* Apply suggestions from code review
* Apply suggestions from code review
Co-authored-by: Thomas Schaaf <tschaaf@cs.cmu.edu>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* added tpu params test
* added tests
* removed xla imports
* added test cases for TPU
* fix pep 8 issues
* refactorings and comments
* add message to MisconfigurationException
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* test if device is set correctly
* added TPU device check
removed mark.spawn
* removed device selection
* remove xla_device call
* readded spawn due to test failures
* add TODO for tpu check
* Apply suggestions from code review
* Apply suggestions from code review
* flake8
* added tpu args to cli tests
* added support for tpu_core selection via cli
* fixed flake formatting
* replaced default_save_path with default_root_dir
* added check for data type for tpu_cores
* fixed flake indent
* protected
* protected
* added tpu params test
* added tests
* removed xla imports
* test if device is set correctly
* added support for tpu_core selection via cli
* replaced default_save_path with default_root_dir
* added check for data type for tpu_cores
* chlog
* fixed tpu cores error
* rebased with latest changes
* flake fix
* Update pytorch_lightning/trainer/distrib_parts.py
added suggesstion
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Jirka <jirka@pytorchlightning.ai>
* Init fix num_batches
* Fix num_batches in case of multiple dataloaders
* Apply suggestions from code review
* Changes based on suggestions
* Flake8
* Add test to check num_batches
* generalize dataloader percent check test
* fix formatting
* remove hparams
* tests
* CHANGELOG
* Update CHANGELOG.md
* max_batches can be int
* conflict and rebase
* add back the test
fix
fix message
0.0 works
Revert "fix message"
This reverts commit 839cacf8b8610f4e697e654ef6f3d2501bf23984.
* update changelog
* Update CHANGELOG.md
* Fix num batches in case of multiple dataloaders and percent_check (#1920)
* git conflict
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* missing union
* doc update suggestion by @rohitgr7
* extend test
* changelog
* docs add note about multiple loaders
* update changelog
* remove unused variable
Co-authored-by: rohitgr7 <rohitgr1998@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Checking if the parameters are a DictConfig Object
This is in reference to #2058 .
To be honest, I have no idea how I should go about writing a test for this.
* Update pytorch_lightning/loggers/base.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* fix ...
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Jirka <jirka@pytorchlightning.ai>
* Fixed average_precision metric, parenthesis were missing. Added test test that failed with the old implementation
* Modified CHANGELOG.md
* Update CHANGELOG.md
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Revert "deprecated: epoch indexing from 1 (#2206)"
This reverts commit f94b919b
* chlog
* grad index
* Apply suggestions from code review
* tests
* fix
* test
* deal with NotImplementedError raised by torchtext
* deal with NotImplementedError raised by torchtext
* Added tests for dataloader which raise NotImplementedError in __len__()
* Fixed some typos
Co-authored-by: Thomas Schaaf <tschaaf@cs.cmu.edu>