Commit Graph

2736 Commits

Author SHA1 Message Date
Thomas Schaaf 7c0a3f4745
Bugfix/_has_len (#2307)
* 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>
2020-06-26 09:31:08 -04:00
William Falcon cbb2427f0d
changed apex level (#2362) 2020-06-25 18:54:32 -04:00
William Falcon 0a092f6683
making optimization steps for hooks (#2363)
*simplified optimizer step and zero grad overriding
2020-06-25 16:02:16 -04:00
William Falcon d22181714a
fix 2333 (#2360) 2020-06-25 11:10:17 -04:00
William Falcon f2710bb500
adds tensorboard hparams logging test (#2342)
* fixes hparam logging

* fixes hparam logging

* fixes hparam logging

* fixes hparam logging

* fixes hparam logging

* Apply suggestions from code review

* skipif

* rename

* Update test_tensorboard.py

* Update test_tensorboard.py

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Jirka <jirka@pytorchlightning.ai>
2020-06-25 09:22:28 -04:00
William Falcon c275e1fc91
swaps lr sched order (#2356)
* swaps lr sched order

* Update optimizers.py

* added amdim encoder choice
2020-06-25 09:21:41 -04:00
davinnovation b6ab7ca121
[docs] add community example : pl + ms nni (#2340)
https://github.com/PyTorchLightning/pytorch-lightning/issues/2329
2020-06-24 23:13:49 -04:00
Adrian Wälchli 220bb6db57
remove wrong annotation (#2349) 2020-06-24 22:29:26 -04:00
Adrian Wälchli 9b2e60530f
Python logging level docs (#2348)
* docs about Python logging

* add link to Python logging docs
2020-06-24 22:29:01 -04:00
David Waterworth cc07dcae96
corrected example usage of save_hyperparameters from List[str] to seperate str (#2353)
Co-authored-by: David Waterworth <david.waterworth@cim.io>
2020-06-24 22:28:38 -04:00
Adrian Wälchli aab9e77d2d
Fix lost compatibility with custom datatypes implementing `.to` (#2335)
* generalize data transfer

* added test

* update docs

* fix spelling error

* changelog

* update docs
2020-06-23 23:41:02 -04:00
William Falcon 598f5140c5
refactor training loop (#2336)
* refactoring training epoch

* refactored training epoch

* refactored training epoch

* refactored training epoch

* refactored training epoch

* refactored training epoch

* fixes slurm weights saving

* fixes slurm weights saving
2020-06-23 23:38:22 -04:00
William Falcon c09b2ffb91
test (#2341)
* fixes rank zero issue
2020-06-23 21:57:45 -04:00
William Falcon a915280427
fixes slurm weights saving (#2339) 2020-06-23 20:16:34 -04:00
Lezwon Castelino 9446390779
fix TPU parsing and TPU tests (#2094)
* 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>
2020-06-23 12:06:57 -04:00
Adrian Wälchli e085e93dd3
Add missing test for "multiple dataloader + percent_check fix" (#2226)
* 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>
2020-06-23 11:21:24 -04:00
Siavash Sakhavi 44385bb582
Checking if the parameters are a DictConfig Object (#2216)
* 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>
2020-06-23 17:20:44 +02:00
Adrian Wälchli bdee1cd106
update docs for "overfit_batches" (#2324)
* update docs

* Apply suggestions from code review

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-06-23 11:19:38 -04:00
William Falcon 0f073819d3
refactored training_batch + tests to verify correctness (#2328)
* refactored training_bath

* refactored training_bath

* refactored training_bath

* refactored training_bath

* refactored training_bath

* refactored training_bath

* refactored training_bath

* refactored training_bath

* refactored training_bath

* refactored training_bath

* refactored training_bath
2020-06-23 11:17:10 -04:00
Tri Dao 29179dbfcc
Fix ROC metric for CUDA tensors (#2304)
* Fix ROC metric for CUDA tensors

Previously roc metric (and auroc) errors when passed in CUDA tensors,
due to torch.tensor construction without specifying device.
This fixes the error by using F.pad instead.

* Update test_classification.py

* Update test_classification.py

* chlog

* Update test_classification.py

* Update test_classification.py

* Update tests/metrics/functional/test_classification.py

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>

* Update test_classification.py

Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
Co-authored-by: Jirka <jirka@pytorchlightning.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-06-23 15:19:16 +02:00
elias-ramzi 92f122e0df
Fix average_precision metric (#2319)
* 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>
2020-06-23 13:21:00 +02:00
Rezyapkin-Vyacheslav 63bd0582e3
fix typo in forward return (#2301) 2020-06-21 15:54:17 -04:00
Adrian Wälchli f972ab3a82
Fix summary hook handles not getting removed (#2298)
* detach hooks after completion

* detach hook

* update docs

* add test

* docs

* changelog
2020-06-20 07:38:47 -04:00
Jirka Borovec c7f8367650
devel version (#2292) 2020-06-19 23:42:57 -04:00
Jirka Borovec 4b90b79080
check omegaconf gpus (#2273)
* check omegaconf gpus

* test

* test

* Apply suggestions from code review

Co-authored-by: Omry Yadan <omry@fb.com>

Co-authored-by: Omry Yadan <omry@fb.com>
2020-06-19 23:42:11 -04:00
Jirka Borovec 7ecb0d2528
test CLI parsing gpus (#2284)
* cli gpus

* test

* test
2020-06-19 23:41:42 -04:00
Rohit Gupta b96dd21d69
Update new project code sample (#2287) 2020-06-19 23:41:03 -04:00
Jirka Borovec f278ac42c8
Revert/Fix: epoch indexing from 1, to be from 0 (#2289)
* Revert "deprecated: epoch indexing from 1 (#2206)"

This reverts commit f94b919b

* chlog

* grad index

* Apply suggestions from code review

* tests

* fix

* test
2020-06-19 23:39:53 -04:00
thschaaf 554fb4754c
Bugfix/_has_len (#2293)
* 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>
2020-06-19 23:38:15 -04:00
Paweł Biernat 3256fe4e5a
Update progress.py (#2268)
Fixes a minor bug introduced in #2213
2020-06-19 15:47:39 -04:00
Jirka Borovec e0b7fed92e
deprecated Trainer proc_rank (#2269)
* deprecated

* test
2020-06-19 15:46:27 -04:00
William Falcon 8d51279703
[refactor results 1] - refactor backward (#2276)
* move backward

* refactor backward to remove 16 bit from user override

* refactor backward to remove 16 bit from user override

* Update pytorch_lightning/core/hooks.py

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-06-19 15:44:44 -04:00
Sam Shleifer e780072961
Attempt to add broken test to mimic transformers use case (#2272)
* Attempt to add broken test

* use wandb logger

* Update test_amp.py

Co-authored-by: William Falcon <waf2107@columbia.edu>
2020-06-19 14:43:07 -04:00
Jirka Borovec 54acc79f31
continue 0.8.x (#2264)
* cleaning

* docs

* docs

* types

* mixins

* mixins

* docs

* typo
2020-06-19 11:00:46 -04:00
William Falcon b2dd1a35aa
Update README.md 2020-06-19 02:50:30 -04:00
William Falcon 2fbc997895
Update __init__.py 2020-06-19 02:43:21 -04:00
William Falcon d5f77c9d1b
Release2 (#2262)
* fix missing arg

* fix missing arg

* fix missing arg

* fix missing arg

* fix missing arg

* fix missing arg

* fix missing arg
2020-06-19 02:38:10 -04:00
Jirka Borovec 9739b3e2ee
updates to changelog (#2248)
* miss

* miss

* chlog

* chlog
2020-06-19 02:37:38 -04:00
William Falcon e8f58b5ed6 Merge branch 'master' of https://github.com/PyTorchLightning/pytorch-lightning 2020-06-19 01:11:29 -04:00
William Falcon 3c8c2e3deb fix missing arg 2020-06-19 01:11:22 -04:00
William Falcon a6f94a6f43
remove tpu barrier (#2260) 2020-06-19 00:57:00 -04:00
William Falcon 81720d9ee5
fallback to hparams str (#2259) 2020-06-19 00:49:40 -04:00
William Falcon 57d5f6e74a
Barrier (#2257)
* remove barriers

* remove barriers

* remove barriers

* remove barriers

* remove barriers

* remove barriers

* remove barriers

* remove barriers

* remove barriers

* remove barriers
2020-06-19 00:42:20 -04:00
William Falcon 03ab574b0f
decrease some training times (#2256) 2020-06-18 23:30:16 -04:00
William Falcon 6ae9a97b09
remove frame inspection on self.hparams (#2253)
* remove frame inspection on self.hparams

* remove frame inspection on self.hparams

* remove frame inspection on self.hparams

* remove frame inspection on self.hparams

* remove frame inspection on self.hparams

* remove frame inspection on self.hparams
2020-06-18 23:08:25 -04:00
William Falcon 4885cfad03
fix gpu template (#2255) 2020-06-18 22:43:24 -04:00
William Falcon b5a2f1ec44
fix setup and on fit calls (#2252) 2020-06-18 21:45:09 -04:00
William Falcon b7fc092bf4
made fx public (#2247)
* made fx public

* made fx public

* made fx public
2020-06-18 20:20:29 -04:00
William Falcon 68a1e52292
added barrier (#2245)
* added barrier

* blank line

* added barrier

* added barrier

* made fx public

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-06-18 20:15:02 -04:00
William Falcon 0b0c292cb9
Update README.md 2020-06-18 17:55:35 -04:00