* prune check on Trainer fit result
* flake8
* Apply suggestions from code review
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* .
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* add support for wrong dtype in apply_func
* apply loader resetting to possible collection of loaders
* add combined loader iter class
* integrate combined loader iter to training loop
* fix imports
* fix imports
* finish supporters
* add tests for supporters
* add test for model with multiple loaders
* fix trainer integration
* fix instance check
* Train loaders (#4032)
* patch for issues discussed in #1959, encapsulating underlying datastructures returned from train_dataloader
* update data_loading.py to it uses patch discussed in #1959
* rename class
* Separate CombinedLoaderIterator into two classes, and update related tests. (#4606)
* Fix the bugs after rebasing.
* Add custom get_len for apply_to_collection
* Refactor MultiIterator to be as CombinedLoaderIterator
* To get the right num_training_batches. Call the wrapper for multi trainloader in data_loading.py, instead of training_loop.py
* Reload _loader_iters when calling __iter__
* Don't transform DataLoader to CombinedLoaderIterator when it's along
* Updates test_fit_multiple_train_loaders for testing num_training_batches
* Seperate CombinedLoaderIterator into CombinedLoaderIterator and CombinedDataLoader. Add CombinedDataset for unified DataLoader format.
* Initialize CombinedDataLoader before calculating num_training_batches. Also updating self._worker_check for multiple loaders
* Update tests for supporters
* Update tests for multiple trainloaders. Add tests about few_workers for multiple loaders.
* Fix pep8 issues
* Add tests for train_loader_patch.py
* Add descriptions to multiple_trainloader_mode
* Remove unused variables
* Add docstrings and typing
* Add more tests for better converage
* Remove unused commented codes
* Add sampler property
* Remove extract_dataset
* Update typing
* pep8
* Update train_loader_patch.py
* Apply suggestions from code review
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update pytorch_lightning/trainer/supporters.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* reviewer comments
* fix stupid import
* add docs
* add back line separator
* fix line sep
* pep8
* Apply suggestions from code review
* fix
* fix
* Apply suggestions from code review
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Apply suggestions from code review
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
* flake8
Co-authored-by: Justus Schock <justusschock@justuss-mbp.fritz.box>
Co-authored-by: Christofer Fransson <christofer_fransson@yahoo.com>
Co-authored-by: YI-LIN SUNG <r06942076@ntu.edu.tw>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
* Add dirpath and filename parameter in ModelCheckpoint
* remove old function
* chlog
* codefactor
* update tests
* docs
* fix doctest and added tests
* pathlib dirpath
* dep version and docs
* try fix doctest
* pep
* suggestions
Co-authored-by: carmocca <carlossmocholi@gmail.com>
* suggestions
* fix test
* pep
* trigger tests
* Apply suggestions from code review
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* suggestions
* try fix windows test
* add and update some tests
* trigger tests
* Apply suggestions from code review
* Apply suggestions from code review
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: William Falcon <waf2107@columbia.edu>
* Update optimizer code
* Update CHANGELOG
* Fix tuple of one list case
* Update docs
* Fix pep issue
* Minor typo [skip-ci]
* Use minimal match
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Apply suggestions from code review
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* closure for all optimizers
* rename hook and take care of alternating backwards
* add comment
* training_loop_fix
* closure whenever possible
* training_loop
* simple tests that count backward calls
* fix test to work with closure
* remove debugging statement
* better place
* check grads after backward
* start fixing manual optimization
* skip step when result returned by closure was None
* fix gradient clipping test to work with closure
* attribute dict result only for automatic optimization
* adjust backward calls in accelerator
* adjust where to call gradient clipping
* adjust backward calls in tests
* Apply suggestions from code review
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* pass kwargs to xla optimizer
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Added test for logging in validation step when using dict dataset with string value
* fix recursive issue
* fix recursive issue
Co-authored-by: Nathan Painchaud <nathanpainchaud@gmail.com>
Co-authored-by: William Falcon <waf2107@columbia.edu>
* Fix.
* Fix#2550: allow to load model from checkpoint if self.save_hyperparameters() was not called.
* Fix? Cleaner way of not calling self.save_hyperparameters in EvalModelTemplate.
* Fix? `_load_model_state` cleanup
* Fix?
* Fix#2550: allow to load model from checkpoint if self.save_hyperparameters() was not called.
* Fix.
* Fix? Cleaner way of not calling self.save_hyperparameters in EvalModelTemplate.
* Fix? `_load_model_state` cleanup
* Fixed side effect in `test_load_model_from_checkpoint_extra_args`.
* Apply suggestions from code review
* fix
* try
* fixed missing arg in evalmodel
* fixed missing arg in evalmodel
* fix
* update
* fix loading
* add test
* prune
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Jirka Borovec <jirka@pytorchlightning.ai>
Co-authored-by: William Falcon <waf2107@columbia.edu>