Commit Graph

3947 Commits

Author SHA1 Message Date
SeanNaren 888b12bbc9 Add additional else check 2020-11-25 20:20:45 +00:00
Sean Naren 22b4d5ee1a
Merge branch 'master' into feature/plug 2020-11-25 20:16:37 +00:00
SeanNaren 586f6c62ee Attempt try catch to prevent errors 2020-11-25 20:16:20 +00:00
chaton 204a0a2d03
[bugfix] Accumulated_gradient and TensoBoard (#4738)
* resolve bug

* update

* update

* modify one test

* remove paramters

* update on comments

* update changelog

* update docstring

Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2020-11-25 19:44:05 +00:00
SeanNaren ba312473f8 Add check to ensure 1.6 2020-11-25 19:40:58 +00:00
SeanNaren a311ee17ab Add fairscale requirement as zip before release 2020-11-25 18:16:36 +00:00
SeanNaren d8224687b8 Move to percentage diff, increase diff 2020-11-25 16:16:57 +00:00
SeanNaren 99326088bb Add additional test cases 2020-11-25 15:38:54 +00:00
SeanNaren b39f290c4d Merge branch 'master' into feature/plug 2020-11-25 12:55:42 +00:00
SeanNaren bfe754da12 Removed comments, skip test 2020-11-25 12:55:02 +00:00
Jirka Borovec d24a26748d
update chlong after 1.0.8 (#4845) 2020-11-25 11:16:20 +00:00
Teddy Koker f2fa3c8256
Add formulas and references to metrics docs (#4823)
* precision

* precision

* recall

* f beta

* confusion matrix

* mse

* mae

* msle

* expalained variance

* psnr

* ssim

* text fp fn tp

* accuracy

* wiki -> sklearn for confusion metrix link

* confusion matrix logging note

Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
2020-11-25 09:05:30 +01:00
edenlightning 78076ea0d9
Replace readme DQN link with bolts implementation (#4841) 2020-11-24 23:45:25 +01:00
SeanNaren a52e6a4a61 Add additional checkpoint tests 2020-11-24 21:12:18 +00:00
SeanNaren 17f23e5e66 Ensure imports are not required explicitly for type casting 2020-11-24 20:11:12 +00:00
SeanNaren 6b129216d0 Add catches around fairscale installation 2020-11-24 19:23:55 +00:00
SeanNaren f765364c02 Fixed configure_ddp, removed lr scheduler modification, added unit tests 2020-11-24 18:05:00 +00:00
Adrian Wälchli fb0278a457
Update test for logging a metric object and state reset (#4825)
* update test

* docstring

Co-authored-by: Ananya Harsh Jha <ananya@pytorchlightning.ai>
2020-11-24 11:28:02 +01:00
Adrian Wälchli e971437551
Document behaviour when setting both on_step=True and on_epoch=True in self.log (#4327)
* update logging.rst

* logger of choice

Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>

* add metrics reference

* trigger ci

* Revert "trigger ci"

This reverts commit 97bf461cf9.

Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
Co-authored-by: Ananya Harsh Jha <ananya@pytorchlightning.ai>
2020-11-24 10:41:31 +01:00
Teddy Koker 5b74effb1a
Update lr_monitor.py (#4826) 2020-11-24 02:07:33 -05:00
Peter Gagarinov 70361ebb6d
Fixed a crash bug in MLFlow logger (#4716)
* warnings.warn doesn't accept tuples, which causes "TypeError: expected string or bytes-like object" when the execution flow gets to this warning. Fixed that.

* Try adding a mock test

* Try adding a mock test

Co-authored-by: rohitgr7 <rohitgr1998@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
2020-11-24 00:50:34 -05:00
Jungwhan 471ca375ba
Fix torchtext data to gpu (#4785)
Co-authored-by: chaton <thomas@grid.ai>
2020-11-24 00:27:14 -05:00
Jeff Yang 7d96fd1168
[tests/checkpointing] refactor with BoringModel (#4661)
* [tests/checkpointing] refactor with BoringModel

* [tests/checkpointing] refactor with BoringModel

* [tests/checkpointing] refactor with BoringModel

* LessBoringModel -> LogInTwoMethods

* LessBoringModel -> LogInTwoMethods

* LessBoringModel -> TrainingStepCalled

Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Ananya Harsh Jha <ananya@pytorchlightning.ai>
2020-11-24 01:23:12 +01:00
Adrian Wälchli 89e8796e2a
fix incomplete progress bar when refresh_rate > num batches (#4577)
* fix progress bar overshoot

* fix updates for partially incomplete main  progress bar when val loop starts

* add tests

* chlog
2020-11-24 00:01:33 +01:00
Sean Naren 9186abe73c
[docs] Add step to ensure sync_dist is adding to logging when multi-gpu enabled (#4817)
* Add additional check to ensure validation/test step are updated accordingly

* Update docs/source/multi_gpu.rst

Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>

* Update docs/source/multi_gpu.rst

Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>

* Update docs/source/multi_gpu.rst

Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>

* Update docs/source/multi_gpu.rst

Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>

Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2020-11-23 22:08:13 +00:00
Samyak S Sarnayak ccf38ced2e
Use high progress_bar_refresh_rate on Google Colab (#4654)
* Use high refresh rate on Google Colab (#3786)

Automatically override progress_bar_refresh_rate when on Google
Colab. Also added a constant IS_COLAB in utilities to check
whether it is being run in colab or not.
(#3786)

* Show a warning instead of overriding when rate is low on colab

* Change warning to suggestion and move it

Moved warning to configure_progress_bar instead of on_trainer_init

* Apply suggestions from code review

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>

* add a mock test

Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2020-11-24 02:13:33 +05:30
SeanNaren 08d37d9cd2 Fixed name ref 2020-11-23 20:20:19 +00:00
SeanNaren d953f2be5b Merge branch 'master' into feature/fairscale-817-6n
# Conflicts:
#	pytorch_lightning/accelerators/accelerator.py
#	pytorch_lightning/accelerators/ddp2_accelerator.py
#	pytorch_lightning/accelerators/ddp_accelerator.py
#	pytorch_lightning/accelerators/ddp_cpu_spawn_accelerator.py
#	pytorch_lightning/accelerators/ddp_hpc_accelerator.py
#	pytorch_lightning/accelerators/ddp_spawn_accelerator.py
#	pytorch_lightning/accelerators/dp_accelerator.py
#	pytorch_lightning/plugins/ddp_plugin.py
#	pytorch_lightning/trainer/connectors/model_connector.py
2020-11-23 20:19:46 +00:00
Boris Dayma c586e5db77
feat(wandb): let wandb cli handle runs (#4648)
* feat(wandb): reinit handled by CLI

* fix: typo

* docs(wandb): improve formatting

* test(wandb): set wandb.run to None

* test(wandb): fix tests

* style: fix formatting

* docs(wandb): fix documentation

* Update code markup

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

* docs(wandb): update CHANGELOG

* test(wandb): init called only when needed

* Update CHANGELOG.md

* try fix the test

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: edenlightning <66261195+edenlightning@users.noreply.github.com>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: rohitgr7 <rohitgr1998@gmail.com>
2020-11-24 01:31:28 +05:30
Sean Naren 404af43cde
5/n: Extract reference model call to plugins/accelerators (#4773)
* Encapsulate extracting reference model within the plugin to allow custom wrapper logic to live within the plugin/accelerators

* Add missing new lines

* Fix call to accelerator

* Removed double blank

* Use accelerator backend

* Handle case where wrapper has not been initialized within the plugin

* Added basic get model tests, add better typing

* Change model name

* Split GPU/DDP test

* Add stronger typing, skip ddp test on windows

* Fix import

* Fix import in dp

* Fixed PEP8 definition

* Add ddp launcher for ddp testing

* Modify accelerator reference model to property, change name to reflect func

* Revert property as this is incorrect.=

* Revert across accelerators

* Modified name to get_model_from_plugin

* Code review changes, fix issue with dp

* Add verb to function getter

Co-authored-by: chaton <thomas@grid.ai>
2020-11-23 17:21:47 +00:00
Nicki Skafte 6831ba9aa0
[Metrics] Unification of FBeta (#4656)
* implementation

* init files

* more stable reduction

* add tests

* docs

* remove old implementation

* pep8

* changelog

* Apply suggestions from code review

Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>

Co-authored-by: Nicki Skafte <nugginea@gmail.com>
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2020-11-23 09:44:35 +01:00
Mohamed Al Salti cd90dd429b
Fix batch_arg_name bug (#4812)
Add `batch_arg_name` to all calls to `_adjust_batch_size`
2020-11-23 11:34:11 +05:30
SeanNaren c590e3a166 Ensure we check if we should use sharded amp plugin 2020-11-22 15:18:50 +00:00
SeanNaren df416f6c78 Fix conversion in on_before_forward 2020-11-22 15:06:11 +00:00
SeanNaren 50ed083fc7 Add module wrapper code 2020-11-22 15:00:44 +00:00
SeanNaren 4ae6f0969a Fixed reference 2020-11-22 15:00:44 +00:00
SeanNaren 1e429bae58 Unified API upstream with suggestion to ben 2020-11-22 15:00:44 +00:00
SeanNaren 9c34589493 Assert availability via imports 2020-11-22 15:00:44 +00:00
SeanNaren 2e8585f46a Add base code 2020-11-22 15:00:44 +00:00
SeanNaren b506a7e46a Revert across accelerators 2020-11-22 15:00:23 +00:00
Sean Naren 250cd96626
Merge branch 'master' into feature/817-fairscale-5n 2020-11-22 14:56:28 +00:00
SeanNaren 977625c289 Revert property as this is incorrect.= 2020-11-22 14:54:00 +00:00
Simon-Martin Schröder 8601268c70
Fix #4375: Always use trainer.global_step for step (#4376)
* Fix #4375: Always use trainer.global_step for step

* Changelog

* Remove superflous use "epoch"

* Update Changelog

Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2020-11-22 13:02:06 +01:00
Sean Naren 4b16b47843
Merge branch 'master' into feature/817-fairscale-5n 2020-11-22 11:39:15 +00:00
SeanNaren 358f503848 Modify accelerator reference model to property, change name to reflect func 2020-11-22 11:39:00 +00:00
Teddy Koker 299de5dc62
don't override PYTHONWARNINGS (#4700)
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2020-11-22 11:25:24 +01:00
edenlightning a716ea60e1
Clarify checkpoint deprecation message (#4640)
* Clarify checkpoint deprecation message

* Update pytorch_lightning/trainer/connectors/callback_connector.py

Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Jeff Yang <ydcjeff@outlook.com>
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-22 07:35:54 +01:00
George b29757da90
Implemented ModelSummary total params values (#4521)
* Implemented ModelSummary total params values

Signed-off-by: George Corrêa de Araújo <george.gcac@gmail.com>

* Fixed documentation, handling modules that are containers for other modules when calculating total params

Signed-off-by: gca <george.gcac@gmail.com>

* Reduced max line length, updated total number of params layout

Signed-off-by: gca <george.gcac@gmail.com>

* Now using only top-level modules of main module to calculate total params

Signed-off-by: gca <george.gcac@gmail.com>

* Added default value for named_modules param in summarize function

Signed-off-by: gca <george.gcac@gmail.com>

* Removed summary function params, removed unused properties

Signed-off-by: gca <george.gcac@gmail.com>

* Changed from np.prod(shape) to numel

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>

* changelog

* Update pytorch_lightning/core/memory.py

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2020-11-22 07:07:52 +01:00
Rohit Gupta 2d9d7e4daa
Add prefix argument in loggers (#4557)
* Add prefix parameter in loggers

* chlog

* pep

* patch test

* remove args, access via self

* try fix the test

* try fix the test

* try fix the test

* prefix test

* fix assert has calls


fix assert call

Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2020-11-22 06:38:58 +01:00
Rohit Gupta db69d169e8
Deprecate prefix argument in ModelCheckpoint (#4765)
* Deprecate prefix in ModelCheckpoint

* chlog

Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-21 18:08:42 +05:30