Commit Graph

915 Commits

Author SHA1 Message Date
Jirka Borovec bec43c9f8a
update docs for progress bat values (#1253) 2020-03-27 08:41:07 -04:00
Jirka Borovec 593bf50759
update deprecation warning (#1258) 2020-03-27 08:40:47 -04:00
Tyler Yep 6772e0c197
Remove unnecessary parameters to super() in documentation and source code (#1240)
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-03-27 12:36:50 +00:00
Jeremy Jordan d394b80ac8
calling self.forward() -> self() (#1211)
* self.forward() -> self()

* update changelog

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-03-27 08:17:56 +01:00
Adrian Wälchli 2a4cd479e2
Disable validation when val_percent_check=0 (#1251)
* fix disable validation

* add test

* update changelog

* update docs for val_percent_check

* make "fast training" docs consistent
2020-03-27 02:07:22 +00:00
Jirka Borovec 45d671a4a8
CI: split tests-examples (#990)
* CI: split tests-examples

* tests without template

* comment depends

* CircleCI typo

* add doctest

* update test req.

* CI tests

* setup macOS

* longer train

* lover pred acc

* fix model

* rename default model

* lower tests acc

* typo

* imports

* fix test optimizer

* update calls

* fix Win

* lower Drone image

* fix call

* pytorch image

* fix test

* add dev image

* add dev image

* update image

* drone volume

* lint

* update test notes

* rename tests/models >> tests/base

* group models

* conftest

* optim imports

* typos

* fix import

* fix tests

* install AMP

* tests

* fix import
2020-03-25 07:46:27 -04:00
Alexey Karnachev ced662fc27
Custom argparser extension with Trainer arguments (argument types added) (#1147)
* `add_argparse_args` method fixed (argument types added)

* CHANGELOG.md upd

* autopep8 fixes

* --gpus=0 removed from test (for ci tests)

* typo fixed

* reduce on plateau scheduler fixed

* Trainer cli related tests moved to test_trainer_cli.py

* refactored: get_init_arguments_and_types is a public classmethod of the Trainer now

* test_get_init_arguments_and_types added

* autopep8 fixes

* Trainer cli related tests moved to test_trainer_cli.py

* refactored: get_init_arguments_and_types is a public classmethod of the Trainer now

* test_get_init_arguments_and_types added

* autopep8 fixes

* Trainer cli related tests moved to test_trainer_cli.py

* refactored: get_init_arguments_and_types is a public classmethod of the Trainer now

* test_get_init_arguments_and_types added

* autopep8 fixes

* Trainer cli related tests moved to test_trainer_cli.py

* test_get_init_arguments_and_types added

* autopep8 fixes

* Apply suggestions from code review

* cosmetics

* cosmetics

* Update pytorch_lightning/trainer/trainer.py

Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com>

* `Trainer.get_init_arguments_and_types` now returns arg types wrapped in tuples (not in sets)

* deprecated args are now ignored in argparser

* get_deprecated_arg_names small refactor

* get_deprecated_arg_names bug fixed

* Trainer cli related tests moved to test_trainer_cli.py

* refactored: get_init_arguments_and_types is a public classmethod of the Trainer now

* test_get_init_arguments_and_types added

* autopep8 fixes

* Trainer cli related tests moved to test_trainer_cli.py

* autopep8 fixes

* Trainer cli related tests moved to test_trainer_cli.py

* Trainer cli related tests moved to test_trainer_cli.py

* test_get_init_arguments_and_types added

* autopep8 fixes

* autopep8 fixes

* Apply suggestions from code review

* cosmetics

* cosmetics

* Update pytorch_lightning/trainer/trainer.py

Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com>

* `Trainer.get_init_arguments_and_types` now returns arg types wrapped in tuples (not in sets)

* deprecated args are now ignored in argparser

* get_deprecated_arg_names small refactor

* get_deprecated_arg_names bug fixed

* Update pytorch_lightning/trainer/trainer.py

Co-Authored-By: Joe Davison <joe@huggingface.co>

* Update pytorch_lightning/trainer/trainer.py

Co-Authored-By: Joe Davison <joe@huggingface.co>

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Joe Davison <joe@huggingface.co>
Co-authored-by: William Falcon <waf2107@columbia.edu>
2020-03-24 14:55:27 -04:00
So Uchida 60b8246bc3
Pretty test results with pprint (#1176) 2020-03-24 14:52:57 -04:00
Adrian Wälchli d735055e6f
add missing overfit_pct docs (#1204)
* add missing overfit_pct docs

* move arg to old position

* move arg docs
2020-03-24 14:49:11 -04:00
Jeremy Jordan 4c2026bf9a
increase profiler test coverage (#1208)
* increase profiler test coverage

* fix line length

* tests for valueerror assertions
2020-03-24 09:15:16 -04:00
Jirka Borovec 3be81cb54e
test deprecated - model (#1074)
* pylint

* model API

* update test

* formatting

* disable logger

* fix checking overwrite

* fix test

* typo

* deprecated model

* fix for DDP

* drop Flake8 in GH actions

* Update pytorch_lightning/trainer/evaluation_loop.py

* fix imports

Co-authored-by: Nic Eggert <nic@eggert.io>
2020-03-20 20:51:14 +01:00
Adrian Wälchli 792962ecc9
CI: Force docs warnings to be raised as errors (+ fix all) (#1191)
* add argument to force warn

* fix automodule error

* fix permalink error

* fix indentation warning

* fix warning

* fix import warnings

* fix duplicate label warning

* fix bullet point indentation warning

* fix duplicate label warning

* fix "import not top level" warning

* line too long

* fix indentation

* fix bullet points indentation warning

* fix hooks warnings

* fix reference problem with excluded test_tube

* fix indentation in print

* change imports for trains logger

* remove pandas type annotation

* Update pytorch_lightning/core/lightning.py

* include bullet points inside note

* remove old quick start guide (unused)

* fix unused warning

* fix formatting

* fix duplicate label issue

* fix duplicate label warning (replaced by class ref)

* fix tick

* fix indentation warnings

* docstring ticks

* remove obsolete docstring typing

* Revert "remove old quick start guide (unused)"

This reverts commit d51bb40695.

* added old quick start guide to navigation

* remove unused  tutorials file

* ignore some modules that got deprecated and are not used anymore

* fix duplicate label warning

* move examples doc and exclude pl_examples from autodoc

* fix formatting for configure_optimizer

* fix no blank line warnings

* fix "see also" labels and add paramref extension

* fix more reference problems

* fix multi-gpu reference

* fix weird warning

* fix indentation and unrecognized characters in code block

* fix warning "... not included in toctree"

* fix PIL import error

* fix duplicate target "here" warning

* fix broken link

* revert accidentally moved pl_examples

* changelog

* stdout

* note some things to know

Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: J. Borovec <jirka.borovec@seznam.cz>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-03-20 20:49:01 +01:00
Adrian Wälchli 732eaee4d7
nan detection and intervention (#1097)
* check for nan values

* test nan detection on loss

* sys.exit

* whitespace

* detect nan and inf values in loss and params

* update

* added documentation

* moved detect nan to training loop, remove flag for print

* blank line

* test

* rename

* deprecate print_nan_grads

* deprecated print_nan_grads

* remove unused imports

* update changelog

* fix line too long

* correct deprecated version

Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com>

* raise exception instead of sysexit

Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com>

* raise exception instead of sysexit

Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com>

* Update pytorch_lightning/trainer/training_tricks.py

Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com>

* Update pytorch_lightning/trainer/training_tricks.py

Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com>

* fix test

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-03-19 09:24:45 -04:00
authman 711892a0a2
Fix Configuring Learning Rate Schedulers (#1177)
* Update docs so users know the desired manner of configuring learning rate schedulers.

* update list

* as note

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-03-19 09:22:29 -04:00
So Uchida 01b8991c5a
Support hierarchical dict (#1152)
* Add support for hierarchical dict

* Support nested Namespace

* Add docstring

* Migrate hparam flattening to each logger

* Modify URLs in CHANGELOG

* typo

* Simplify the conditional branch about Namespace

Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com>

* Update CHANGELOG.md

Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com>

* added examples section to docstring

* renamed _dict -> input_dict

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-03-19 09:15:47 -04:00
Jirka Borovec 22a7264e9a
improve partial Codecov (#1172)
* ignore in setup

* show report

* abs imports

* abstract pass

* cover loggers

* doctest trains

* locals

* pass

* revert tensorboard

* use tensorboardX

* revert tensorboardX

* fix trains

* Add TrainsLogger.set_credentials (#1179)

* Add TrainsLogger.set_credentials to control trains server configuration and authentication from code. Sync trains package version.
Fix CI Trains tests

* Add global TrainsLogger set_bypass_mode (#1187)

* Add global TrainsLogger set_bypass_mode skips all external communication

Co-authored-by: bmartinn <>

* rm some no-cov

Co-authored-by: Martin.B <51887611+bmartinn@users.noreply.github.com>
2020-03-19 09:14:29 -04:00
Abhinav Moudgil 73a911890b
Backward compatibility for checkpoint loading (#1132)
* check if hparams_type exists in checkpoint dictionary for backward compatibility

* concisely maintain backward compatibility for hparams type

* Bug fix in checkpoint loading (#1132)
2020-03-17 18:45:36 -04:00
Jacob Zhong 1a73fa0b03
change default logger to dedicated one (#1064)
Fix test


Fix format

Update pytorch_lightning/__init__.py
Separate imports
2020-03-17 18:44:00 -04:00
William Falcon c32e3f3ea5
coverage increase (#1167)
* fixed docs

* Docs (#1164)

* fixed docs

* fixed docs

* fixed docs

* fixing Win failed import (#1163)

* version

* try fix distrib

* update try import

* fixed docs

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-03-16 21:43:43 -04:00
Jirka Borovec e461ec0037
fixing Win failed import (#1163)
* version

* try fix distrib

* update try import
2020-03-16 20:50:36 -04:00
William Falcon 49d000c0c9
Docs (#1164)
* fixed docs

* fixed docs

* fixed docs
2020-03-16 20:50:14 -04:00
Nicki Skafte 384e124490
ReduceLROnPlateau bug fix (#1126)
* bug fix and test

* update CHANGELOG.md

Co-authored-by: Nicki Skafte <nugginea@gmail.com>
2020-03-16 14:35:10 -04:00
Jirka Borovec 774d9be357
Fix docs - missing Trainer (#1159)
* drop pandas

* formatting
2020-03-15 19:46:39 -04:00
Jakub 3ad6169f18
Neptune Logger Improvements (#1084)
* removed project and experiment from getstate

* added tests for closing experiment, updated token in example to user neptuner

* updated teoken

* Update neptune.py

added a link to example experiment

* added exmaple experiment link

* dropped duplication

* flake fixes

* merged with master, added changes information to CHANGELOG
2020-03-14 13:02:40 -04:00
Ibraheem Moosa 2232eb35d1
Fix examples that uses type_as (#1129) 2020-03-14 13:02:31 -04:00
Martin.B c0bedd2587
Add TRAINS experiment manager support (#1122)
* Add allegro.ai TRAINS experiment manager support

* improve docstring and type hinting, fix the bug in log_metrics, add support torch.Tensor to input into log_image

* complete missing docstring of constructor's arguments

* fix docs

* pep8

* pep8

* remove redundant typing
use logging
fix typing and pep8

* remove deprecated interface

* add TrainsLogger test

* add TrainsLogger PR in CHANGELOG

* add id/name property documentation

* change logging as log

Co-authored-by: bmartinn <>
Co-authored-by: Sou Uchida <s.aiueo32@gmail.com>
2020-03-14 13:02:14 -04:00
monney da61398835
Add Support for Non-primitive types in TensorboardLogger (#1130)
* Added support for non-primitive types to tensorboard logger

* added EOF newline

* PEP8

* Updated CHANGELOG for PR #1130. Moved _sanitize_params to base logger. Cleaned up _sanitize_params

* Updated CHANGELOG for PR #1130. Moved _sanitize_params to base logger. Cleaned up _sanitize_params

* changed convert_params to static method

* PEP8

* Cleanup Doctest for _sanitize_params

Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com>

* Removed OrderedDict import

* Updated import order to conventions

Co-authored-by: Manbir Gulati <manbirgulati@Manbirs-MBP.hsd1.md.comcast.net>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-03-14 13:02:05 -04:00
Jirka Borovec f6a7a5278a
enable Codecov (#1133)
* update config

* try Drone cache

* drop Drone cache

* move import

* remove token
2020-03-14 13:01:57 -04:00
Adrian Wälchli 3c2fd560aa
Type Hints for Lightning Core (#946)
* first pass for LightningModule typehints

* fix return types

* add missing types

* add type annotations to grads.py

* add type annotations to hooks.py

* add type annotation to memory.py

* proper docstring quotation marks

* add type annotations to saving.py

* fix cyclic import problem

* fix cyclic import problem

* add missing whitespace

* finish type hints for load_from_ methods

* docs: prepare_data does not return anything

* fix auto types in docs

* revert typehint for trainer in hook

* remove unnecessary return docs

* some fixes for memory docs

* revert typing for args kwargs

* added all missing None return types

* remove unused import

* add more details to dict/list return types

* fix line too long

* optimize imports

* linted

* Revert "linted"

This reverts commit 85559611e8.

* remove whitespace

* update

* update

* update

* update

* update

* changelog

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: William Falcon <waf2107@columbia.edu>
2020-03-12 12:47:23 -04:00
Ethan Harris 2b3f443f6b
Add support for IterableDatasets everywhere (#1104)
* Add support for IterableDatasets everywhere

* Added type hints, simplified code and improved coverage in data_loading.py

* Update CHANGELOG.md
2020-03-12 12:46:02 -04:00
Jirka Borovec 514d182b7f
cleaning imports (#1032) 2020-03-12 12:41:37 -04:00
So Uchida 322e7157e0
set the default value of progress_bar_refresh_rate to 1 (#1100) 2020-03-12 12:40:30 -04:00
Xing Zhao LEE b4d4e489bf
Run on_validation_end only on main process in DDP (#1125)
Co-authored-by: xingzhaolee <xingzhaolee@users.noreply.github.com>
2020-03-12 15:50:00 +01:00
Heon Song b29613b758
fix typo (#1124) 2020-03-12 15:49:27 +01:00
Jirka Borovec bc01b9ac1c
update chnagelog (#1091)
* update chnagelog

* update chnagelog
2020-03-10 11:15:03 -04:00
William Falcon af621f8590 release v0.7.1 2020-03-06 18:23:04 -05:00
William Falcon 21057d0064
Fixes print issues and data_loader (#1080)
* print issue

* print issue

* print issue

* print issue

* print issue
2020-03-06 18:14:03 -05:00
William Falcon e17c72148e release v0.7.0 2020-03-06 16:19:51 -05:00
William Falcon 38e9fabdd5 release v0.6.4.dev1 2020-03-06 16:15:33 -05:00
Jirka Borovec 4896815067
remove deprecated `data_loader` (#1077)
* change version in CHangelog

* warning

* remove der data_loader

Co-authored-by: William Falcon <waf2107@columbia.edu>
2020-03-06 16:11:05 -05:00
William Falcon 3d18099262
removed decorators (#1079) 2020-03-06 16:09:47 -05:00
William Falcon 2bc01a00e8 dev release 1 2020-03-06 16:04:54 -05:00
William Falcon 21ac476b17 release v 2020-03-06 21:36:59 +01:00
William Falcon be89eb07c8 cleaned docs, fixed argparse generator (#1075)
* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Test deprecated API for 0.8.0 and 0.9.0 (#1071)

* till 0.8

* refactor

* fix tests

* fix tests

* deprx till 0.9

* Update trainer.py

* Apply suggestions from code review

Co-authored-by: William Falcon <waf2107@columbia.edu>

* updated test

* updated test

* updated test

* updated test

* updated test

* updated test

* updated test

* updated test

* updated test

* updated test

* updated test

* updated test

* updated test

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-03-06 21:36:59 +01:00
Jirka Borovec ff1f8ef400 Test deprecated API for 0.8.0 and 0.9.0 (#1071)
* till 0.8

* refactor

* fix tests

* fix tests

* deprx till 0.9

* Update trainer.py

* Apply suggestions from code review

Co-authored-by: William Falcon <waf2107@columbia.edu>
2020-03-06 21:36:44 +01:00
Adrian Wälchli 09482fb64f
Fix Inconsistencies after introducing *_step_end and *_epoch_end (#1072)
* fix copy-paste errors after renaming *_end methods

* line too long

* update

* Update lightning.py

* Update lightning.py

* Update lightning.py

Co-authored-by: William Falcon <waf2107@columbia.edu>
2020-03-06 10:33:17 -05:00
William Falcon b183782e83 updated test 2020-03-06 07:05:33 -05:00
William Falcon f6f11d31d3 updated test 2020-03-06 06:57:14 -05:00
Jirka Borovec 6bc7132c99
fix deprecated warnings (#1048)
* fix deprecated warnings

* deprecated
2020-03-06 06:45:59 -05:00
William Falcon d80215ed9d
Docs2 (#1069)
* new image

* new image
2020-03-06 06:33:28 -05:00