111 Commits
Author SHA1 Message Date
William Falcon 397c0754d8 remove summary 2019-12-11 07:27:32 -08:00
William Falcon 84c23d3a1d remove summary 2019-12-11 06:23:21 -08:00
William Falcon e8fb2fc111 remove summary 2019-12-11 06:21:36 -08:00
Adrian Wälchli e2ee4ddbdb Fix early stopping off by 2 (min_epochs) (#617)
* fix early stopping off by 2

* add min_epochs example in docs
2019-12-09 10:32:49 -08:00
Elliot Waite b492e2b89e Change nb to num in ABCs, comments, and tqdm logging (#613)
* Change nb to num in ABCs, comments, and tqdm logging

* Fix warnings text

* Make warnings one line

* Change num to number in comments
2019-12-09 04:40:26 -08:00
Jirka Borovec 5d00e62047 Fix logger, tensorboard (#610)
* fix logger tests

* fix missing flush

* fix tensorboard

* fix namespace

* fix flush

* fix add_hparams
2019-12-08 07:59:25 -08:00
Nic Eggert 2baa80d626 Make sure train doesn't crash when called at max_epoch (#608) 2019-12-07 23:22:03 -05:00
ctlaltdefeat 58cc6e13b9 Update logging.py (#602) 2019-12-07 10:12:33 -05:00
schwobr 2f01c03b38 Additional hooks (#598)
* Renamed `on_sanity_check_start` to `on_train_start` and added `on_train_end` to `ModelHooks`

* changed tests to use `on_train_start` instead of `on_sanity_check_start`
2019-12-07 08:52:06 -05:00
Elliot Waite 1051c189e1 Simplify variables: step, epoch, max_epochs, min_epochs (#589) 2019-12-07 08:50:21 -05:00
Adrian Wälchli f7e1040236 Docs and Tests for "gpus" Trainer Argument (#593)
* add table for gpus argument

* fix typo in error message

* tests for supported values

* tests for unsupported values

* fix typo

* add table for gpus argument

* fix typo in error message

* tests for supported values

* tests for unsupported values

* fix typo

* fix typo list->str

* fix travis warning "line too long"
2019-12-07 08:48:45 -05:00
YehCF cc65f39d97 Fix number of total steps shown in progress bar during sanity validation check when number of validation dataloaders >= 2 (#597)
* type: debug

Calculate the adequate number of steps to run during sanity_check.
This fixes the bug when there are two or more validation dataloaders.

- Before: total=self.num_sanity_val_steps
- After: total=self.num_sanity_val_steps*len(self.get_val_dataloaders())

* type: refactor

Put total=... in the next line

* type: refactor

run flake8
2019-12-07 08:47:59 -05:00
Jirka Borovec 1d4b6be17b rename trainer modules, drop _mixin (#571)
* rename trainer modules, drop _mixin

* fix imports
2019-12-04 11:39:14 -05:00
Jirka Borovec e0dbc8ab46 Abstract Mixin classes (#572)
* make partial Trainer classes as abstract

* add empty attributes/methods

* flake8

* fix mixin order

* update abstact

* reorder
2019-12-04 10:57:32 -05:00
Adrian Wälchli 218f0a5b4a inspect training_step for opt_idx (#573) 2019-12-04 07:32:47 -05:00
Ir1dXD c316173e89 use print for INFO and lower levels summarize() (#580)
* use print for INFO and lower levels summarize()

* use logging.INFO instead of magic number

* bring logging.info back for other cases

* move logging config to __init__.py

* prepend the model summary with a newline
2019-12-04 07:05:34 -05:00
Ir1dXD d4571d1d6f filter param with no grad (#579) 2019-12-04 07:04:58 -05:00
Jirka Borovec ab4fea0b55 fix defecation warnings (#570)
* fix defecation warnings

* flake8

* update deprecations
2019-12-04 06:59:19 -05:00
Jirka Borovec 3a58937d8b rename variables nb -> num (#567)
* rename nb -> num

* flake8

* batch_nb, epoch_nb, gpu_nb, split_nb

* add _num deprecations
2019-12-04 06:57:10 -05:00
Mary Trofimova a6d64ac013 Support torch.optim.lr_scheduler.ReduceLROnPlateau (#320)
* feat: add reducelronplateau callback

* feat: use reducelronplateau callback in trainer

* feat: only on unsupported lr schedulers

* feat: last but not the least merge of master

* feat: merge master

* feat: support only on scheduler in reduceLrOnPlateauScheduler

* refactor: code style

* Update pt_callbacks.py

* Update trainer.py

* Update train_loop_mixin.py

* Update trainer.py

* Update train_loop_mixin.py
2019-12-03 07:59:41 -05:00
Yongrae Jo 2b8475f590 Add resuming from specific checkpoint (#516)
* Add resume_from_checkpoint

* Fix variable name

* #515 Remove did_restore

* #515 Simplify code

* #515 Update doc for resume_from_checkpoint

* #515 Add on_gpu
2019-11-30 16:48:38 -05:00
Pariente Manuel df7b6d958e Correct behavior for argument gpus in Trainer (#561) 2019-11-30 14:50:50 -05:00
williamFalcon db0587f158 fixed tests 2019-11-28 16:02:36 -08:00
William Falcon 29122e4308 Dp default (#560)
* set auto dp if no backend

* fix imagenet example

* run flake8 first to fail build on syntax first
2019-11-28 18:14:08 -05:00
Jirka Borovec d71556e7a1 Sphinx generated documentation (#521)
* upgrade req.

* move MkDocs

* create Sphinx

* init Sphinx

* move md from MkDocs to Sphinx

* CI: build docs

* build Sphinx

formatting

move docs from MD to docstring in particular package/modules

formatting

add Sphinx ext.

rename root_module to core

drop implicit name "_logger"

drop duplicate name "overwrite"

fix imports

use pytorch theme

add sample link mapping

try fix RTD build

use forked template

fix some docs warnings

fix paths

add deprecation warnings

fix flake8

fix paths

revert refactor

revert MLFlowLogger

* revert example import

* update link

* Update lightning_module_template.py
2019-11-28 12:48:55 -05:00
Jirka Borovec 9785a3e78e Refactor: name modules (#548)
* refactor: rename some modules

* add deprecation warnings

* fix paths
2019-11-26 22:39:18 -05:00
Anton Bakhtin fea7cc87f6 Move model to cuda before creating optimizer (#554) 2019-11-26 22:35:38 -05:00
Jirka Borovec f2191b0cdf fix for pyTorch 1.2 (#549)
* min pytorch 1.2

* fix IterableDataset

* upgrade torchvision

* fix msg
2019-11-26 10:58:50 -05:00
MikeScarp 55f3ffd7c7 fixing bug in testing for IterableDataset (#547) 2019-11-26 04:59:20 -05:00
Tullie Murrell 48b797fdb0 Copy batch for local forward (#532) 2019-11-23 04:04:40 -05:00
Tullie Murrell c1ecca418e Write progress bar to stdout (#531)
* Default write progress bar to stdout

* Change validation progress too
2019-11-21 13:26:24 -05:00
Jeffrey Ling 619143a734 Fix incorrect handling of on_batch_end edge cases in run_training_batch (#509)
* Fix returning only 2 values on an early exit. 

This fixes a bug 

`ValueError: not enough values to unpack (expected 3, got 2)`

* Update train_loop_mixin.py

* Change to return dict

The return value was actually a dict even though that variable is initialized as a list.
2019-11-19 15:38:54 -08:00
Ryan Wong ba0a32c2ae fixed issue where callback_metrics was replaced instead of updated (#492) 2019-11-11 22:58:32 -05:00
William Falcon e350a7db07 Enable apex O2 + dp (#493)
* remove O2 crash

* remove O2 crash

* bananas
2019-11-11 22:58:11 -05:00
William Falcon 8ea74733c1 bananas (#494) 2019-11-11 22:58:03 -05:00
William Falcon a7f3974f95 Release (#467)
* smurf ethics

* smurf ethics

* removed auto ddp fix

* removed auto ddp fix

* removed auto ddp fix

* removed auto ddp fix

* removed auto ddp fix

* removed auto ddp fix
2019-11-06 14:34:50 -05:00
Nic Eggert 9fa2806605 Fix ModelCheckpoint default paths (#413)
* Make name and version properties required

* Warn before deleting files in checkpoint directory

* Get default checkpoint path from any logger

* Fix typos

* Uncomment logger tests

* Whitespace

* Update callback_config_mixin.py

checkpoints and version file names would just have a number. it's easy to tell what you're looking at with version_ prepended

* Address comments

* Fix broken tests
2019-11-05 10:41:59 -05:00
William Falcon 3e38005a61 Ddp2 fix (#448)
* added training_end

* added training_end

* added training_end

* added training_end

* added training_end

* added training_end

* added training_end

* added training_end

* added training_end

* added training_end

* added training_end

* added training_end

* allow ddp and apex to be configured

* allow ddp and apex to be configured

* bananas

* bananas

* bananas

* bananas

* bananas

* bananas

* bananas

* bananas

* bananas

* bananas

* bananas

* bananas

* bananas

* bananas

* bananas

* added eval and train for redundancy

* added eval and train for redundancy

* added training_end

* added training_end

* added training_end

* added training_end

* added training_end

* added training_end

* added training_end

* added training_end

* added training_end

* added training_end

* added training_end

* added training_end

* allow ddp and apex to be configured

* allow ddp and apex to be configured

* bananas

* bananas

* bananas

* bananas

* bananas

* bananas

* bananas

* bananas

* bananas

* bananas

* bananas

* bananas

* bananas

* bananas

* bananas

* added eval and train for redundancy

* added eval and train for redundancy
2019-11-05 10:01:52 -05:00
Ir1dXD 5a9afb11cc change print to logging (#457)
* change print to logging

* always use logging.info

* use f-strings

* update code style

* set logging configs

* remove unused code
2019-11-05 08:43:21 -05:00
Vadim Bereznyuk 446a1b5d45 Split progress bar (#449)
* Splitted progress bars

* Iterable dataset total batches fix

* Use dynamic ncols and use batch as units

* Count epochs from 1 in progress bar

* Fix for disabled progress bar

* Code simplifications
2019-11-03 05:42:53 -05:00
Tullie Murrell 248495b1d1 Add tbptt (#429)
* Add truncated bptt

* Fix rebase error

* AutoPep8

* Address comments, incl default bptt_split impl

* Add tbptt test

* Add default split for lists/tuples

* Add tbptt docs

* Fix trainer spacing

* Update RequiredTrainerInterface.md
2019-10-31 06:45:28 -04:00
Vadim Bereznyuk f79bdf2327 Set total number of batches in progress bar while testing (#425) 2019-10-30 12:14:28 -04:00
Vadim Bereznyuk 9f8ab7c29e Fixed total number of batches (#439)
* Fixed total number of batches

* Fixed flake8 warning

* Update train_loop_mixin.py

* Update train_loop_mixin.py
2019-10-30 12:13:40 -04:00
William Falcon 8347a6c87e mem clear (#440)
* mem clear

* mem clear
2019-10-30 12:11:21 -04:00
William Falcon b86d223889 makes checkpoint process safe (#431) 2019-10-25 08:57:05 -04:00
William Falcon d5ca464cc6 Back hook (#424)
* Fixes #356

* Fixes #356

* Fixes #356

* Fixes #356

* Fixes #356

* Fixes #356
2019-10-24 07:56:56 -04:00
William Falcon a4b43ce095 Loaders (#422)
* refactor dataloading

* refactor dataloading

* refactor dataloading

* refactor dataloading

* refactor dataloading

* refactor dataloading

* refactor dataloading

* refactor dataloading
2019-10-24 06:43:35 -04:00
William Falcon 5db90e32eb hpc restore takes priority over non hpc weights (#419)
* hpc restore takes priority over non hpc weights

* hpc restore takes priority over non hpc weights

* hpc restore takes priority over non hpc weights

* hpc restore takes priority over non hpc weights

* hpc restore takes priority over non hpc weights

* hpc restore takes priority over non hpc weights

* hpc restore takes priority over non hpc weights
2019-10-23 20:18:26 -04:00
William Falcon c6244594a6 clear memory cache before train starts (#418)
* clear memory cache before train starts

* clear memory cache before train starts
2019-10-23 11:41:00 -04:00
David Kossnick 56fa2075a5 Move global_step incrementing (#412)
* Move global_step incrementing to the end of a batch loop, per https://github.com/williamFalcon/pytorch-lightning/issues/411

* Move met_batch_limit condition to the end

* cleanup whitespace

* Update train_loop_mixin.py
2019-10-23 06:11:18 -04:00