Commit Graph

3724 Commits

Author SHA1 Message Date
Jirka Borovec b10b11deb0
add version for CPU users (#4794) 2020-11-20 21:32:13 +01:00
Jirka Borovec 500e2853f3
increase Parity threshold (#4795)
* increase Parity threshold

* typos

* increase

* increase
2020-11-20 19:58:45 +00:00
Jirka Borovec 94a9d3d283
Update examples - use DataModule (#4740)
* rename

* add mnist_datamodule.py

* dm

* fix

* imports

* clean

* imports

* transforms

* skip
2020-11-20 23:40:40 +05:30
Roger Shieh 42e59c6add
Cast hparams to dict when not using omegaconf (#4770)
* init fix

* init test

* more specific dict assert

* update changelog

* Update tests/checkpointing/test_model_checkpoint.py

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

Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-20 19:53:05 +08:00
chaton 4803f681b0
[FEAT] DDP: Create DDPLauncher (#4515)
* test

* poc

* add simpler test for ddp

* typo

* resolve pep8

* try coverage testing

* trying to add coverage inside ddp

* resolve flake8

* update

* forgot coverage

* move .coveragerc

* update rcfile path

* update

* test

* update

* adding description

* add DDPLauncher decorator

* add undecorated

* push update

* update ddp testing

* Update tests/backends/launcher.py

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

* Update tests/backends/launcher.py

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

* update on comments

* update on comments

* resolve comments

* resolve isort

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-20 10:17:46 +00:00
chaton 6e788d2dc6
Add lightning-geometric (#4771)
* add link

* typo

Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2020-11-20 08:45:04 +01:00
Jirka Borovec e752348e94
update stale bot (#4769)
Co-authored-by: chaton <thomas@grid.ai>
2020-11-19 21:45:44 +01:00
chaton 8e8263ab6c
update docs (#4739) 2020-11-19 22:23:10 +05:30
Yang Zhang 18730e307f
Add masked language modeling to community examples (#4744)
Add masked language modeling (based on Transformers) to community examples

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-19 08:35:25 +00:00
Roger Shieh cc8359be26
Proper casting for np scalars in hparams logging (#4647)
* first implementation

* add test and changelog

* Update tests/loggers/test_base.py

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

* pep8

* rounding

* increase casting specificity to bool + number

* bugfix

* changelog formatting

* single loop

* Update CHANGELOG.md

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: chaton <thomas@grid.ai>
2020-11-19 15:52:48 +08:00
Jeff Yang c36121326d
[metrics] Update SSIM (#4566)
* [metrics] Update SSIM

* [metrics] Update SSIM

* [metrics] Update SSIM

* [metrics] Update SSIM

* [metrics] update ssim

* dist_sync_on_step True

* [metrics] update ssim

* Update tests/metrics/regression/test_ssim.py

Co-authored-by: chaton <thomas@grid.ai>

* Update pytorch_lightning/metrics/functional/ssim.py

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

* ddp=True

* Update test_ssim.py

Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2020-11-19 11:51:18 +06:30
Tadej Svetina 7383a2c912
Change version in __init__.py 1.0.4 -> 1.1-dev (#4760)
* Change version in __init__.py 1.0.4 -> 1.0.7

* fix ver

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-19 07:56:30 +06:30
Sean Naren f0ab74dc2f
Expose scaler in amp plugin (#4737) 2020-11-18 22:30:47 +00:00
ananthsub 45c57600af
Move init_ddp_connection to DDP Plugin (#4407)
* Move init_ddp_connection to DDP Plugin

* cluster-env

* trainer?

* imports

* Update ddp_plugin.py

Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-11-18 15:49:22 -05:00
chaton b7601e9deb
[Example] Add Pytorch Geometric Example (#4568)
* add example for Pytorch Geometric

* remove hydra

* add docstring

* remove description

* rename folder

* update script to not break test

* remove .lock

* add Pytorch Geometric to doc

* add docstring at the begining

* add comments

* Update pl_examples/pytorch_ecosystem/pytorch_geometric/README.md

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

* Update pl_examples/pytorch_ecosystem/pytorch_geometric/README.md

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

* Update pl_examples/pytorch_ecosystem/pytorch_geometric/cora_dna.py

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

* add toml

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Jirka Borovec <jirka@pytorchlightning.ai>
2020-11-18 20:03:55 +00:00
Sean Naren e7134a9135
Sharded Plugin 2/n: Allow ddp plugin to modify optimizer state saving (#4675)
* Allow ddp plugin to modify optimizer state saving

* Rely on the accelerator for optimizer states

* Ensure we init the accelerator for the saving function

* Better comment for optim state dump

* Revert "Ensure we init the accelerator for the saving function"

This reverts commit af65effa

* Added accelerator check to initialize tuner before saving model checkpoint

* Simplify comment

* Revert "Added accelerator check to initialize tuner before saving model checkpoint"

This reverts commit f9929c0c

* Return single optimizer state to reduce duplication

* Fixed docstring

* Fixed typing

* Fixed comment

* Added CHANGELOG.md

Co-authored-by: chaton <thomas@grid.ai>
2020-11-18 16:38:35 +00:00
Sean Naren 8283680aa0
Sharded Plugin 3/n: Expose step input to DDP plugin (#4686)
* Allow ddp plugin to move the input to a different device if needed

* Swapped name to on_before_forward to align with hooks in the future

* Update pytorch_lightning/plugins/ddp_plugin.py

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

* Pass variable arg type to hook, add example

* Remove blank space (pep check)

* Added blank line

Co-authored-by: William Falcon <waf2107@columbia.edu>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-18 15:45:30 +00:00
Jirka Borovec 5fd1afb38a
Delay PyPI releasing (#4730)
* Delay PyPI releasing

* Delay PyPI releasing

Co-authored-by: chaton <thomas@grid.ai>
2020-11-18 15:15:41 +01:00
Jirka Borovec 5ea383332d
update chlog after 1.0.7 release (#4735) 2020-11-18 12:26:41 +00:00
Jirka Borovec bddc6cd77a
pytest default color (#4703)
* pytest default color

* time

Co-authored-by: chaton <thomas@grid.ai>
2020-11-18 10:53:44 +00:00
Carlos Mocholí 396a46f55f
Add current_score to ModelCheckpoint.on_save_checkpoint (#4721)
* Add current_score to ModelCheckpoint.on_save_checkpoint

* Update CHANGELOG

[ci skip]

* fix

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

* fix2

* Add test for NaN

* Fix failing tests

* Simplify line

* Add test docstrings

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-18 08:09:44 +00:00
Akihiro Nitta ece09f0c5f
Apply import formatting to files in the 2nd top level (#4717)
* Update pyproject.toml

* Apply isort to files in second level

Co-authored-by: chaton <thomas@grid.ai>
2020-11-18 00:29:09 +01:00
Jirka Borovec 9a5d40aff4
test PL examples (#4551)
* test PL examples

* minor formatting

* skip failing

* skip failing

* args

* mnist datamodule

* refactor tests

* refactor tests

* skip

* skip

* drop DM

* drop DM

Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-11-17 19:35:17 +01:00
Jay Mody b8a1916453
Update trainer.rst (#4722)
small spelling fix
2020-11-17 23:07:15 +05:30
Ludger Paehler 7c4356464c
Minor typo in the description of Adam's beta 2 (#4715)
Adam's beta 2 parameter was mistakenly referred to as the first order momentum of the gradient, whereas it should be the second order momentum. This has no effect on the correct working of the example.
2020-11-17 17:00:36 +01:00
Maxim Ostroukhov c208ac68c8
Added experiment_id to NeptuneLogger (#3462)
* 1) Added experiment_id to NeptuneLogger initialization input arguments.
2) Now function _create_or_get_experiment() overrides "experiment_name", "params", "properties", "tags".

* Added test case for existing experiment.

* Revert "Added test case for existing experiment."

This reverts commit 9f3ba2e37b.

* Added test case for existing experiment.

* Fix merging issue.

* Moved experiment_id assignment directly to the part with experiment initialization.

* Update pytorch_lightning/loggers/neptune.py

Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-16 23:50:23 +05:30
chaton 96769a7184
quick fix (#4697) 2020-11-16 16:20:35 +00:00
Nicki Skafte 51097669b9
[metrics] change default behaviour of state dict (#4685)
* fix state dict

* Update docs/source/metrics.rst

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

* changelog

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
2020-11-16 12:33:45 +00:00
Jirka Borovec be60efb3cf
allow decorate model init with saving hparams (#4662)
* addd tests

* use boring model

* parsing init

* chlog

* double decorate

* Apply suggestions from code review

Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>

* bug

Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
2020-11-16 11:02:26 +01:00
William Falcon 886702a1af
Update CODEOWNERS 2020-11-15 10:55:50 -05:00
edenlightning 1656061051
Add williamfalcon as owner for API changes (#4610)
* Add   williamfalcon as owner for API changes

* Update .github/CODEOWNERS

Co-authored-by: Teddy Koker <teddy.koker@gmail.com>

* Update CODEOWNERS

Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
Co-authored-by: William Falcon <waf2107@columbia.edu>
2020-11-15 10:53:49 -05:00
chaton 867eef0e4c
[HOTFIX] Logging for evaluation (#4684)
* resolve bugs

* add should_flush_logs

* remove should_flush

* should work

* update test

* use something else

* Update pytorch_lightning/trainer/connectors/logger_connector/logger_connector.py

* log mock_log_metrics.mock_calls

* typo

* don't use keys

* convert to list

* typo

* check kwargs

* resolve bug

* resolve flake8

Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-11-15 10:41:33 -05:00
edenlightning 53f14391da
Rename distributed_backend to accelerator in examples (#4657)
* Rename distributed_backend to accelerator

* Update submit_ddp2_job.sh

* Update 05-trainer-flags-overview.ipynb

Co-authored-by: Jeff Yang <ydcjeff@outlook.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2020-11-15 15:47:14 +01:00
Carlos Mocholí 61394d543c
Improve skipping step tests (#4109)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-11-14 21:10:24 +00:00
Xinyao(Alvin) Sun 504a669015
[Fix]: Improve documentation (#4670)
Fix an error in training_step_end() documentation #4669

Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-11-14 14:04:55 +00:00
Jirka Borovec e1955e3c89
isolate PL debugger in tests (#4643)
* isolate PL debugger in tests

* miss

Co-authored-by: Jeff Yang <ydcjeff@outlook.com>
2020-11-14 11:22:56 +00:00
Justus Schock e04e7c9ecc
Makes automatic optimization a model attribute (#4602)
* Makes automatic optimization a model attribute

* Update trainer.py

* remove setting property in model

* Update pytorch_lightning/core/lightning.py

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

* Update pytorch_lightning/trainer/trainer.py

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

* Update trainer.py

Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Jeff Yang <ydcjeff@outlook.com>
2020-11-14 11:13:42 +06:30
Justus Schock 144a5c9913
Increase parity to match logging refactor (#4651)
Co-authored-by: Jeff Yang <ydcjeff@outlook.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-14 10:33:30 +06:30
Espen Haugsdal fa88905af0
Fix docs typo: train_batch => val_batch (#4659)
Co-authored-by: Jeff Yang <ydcjeff@outlook.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-14 08:23:11 +06:30
ananthsub d096a2ea6d
Fix setup callback hook to pass LightningModule through (#4608)
* Fix setup callback hook

* Update CHANGELOG.md

* Update test_trainer.py

* Update test_trainer.py

* Update test_trainer.py

* fix chlog

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-13 19:34:46 -05:00
Nathan Painchaud 2d78d9b84a
CI: Added isort import check for the code on pull-request (#4242)
* added isort CI job and updated isort config

* changed CI check output from files to full diff

* added isort pre-commit hook

* Added missing first party and restricted files affected by isort

* Applied isort to root-level, docs and benchmarks

* Apply suggestions from code review

Co-authored-by: Nathan Painchaud <nathanpainchaud@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: chaton <thomas@grid.ai>
2020-11-13 22:57:46 +01:00
Jeff Yang baa8558cc0
logger docs and api docs (#3950)
* logger and api docs

* remove gpu_usage_logger, lr_logger

* update docstring

* fix wandb example

* remove step result

* charts

* add some charts info

Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2020-11-13 20:35:54 +05:30
Jirka Borovec 7940ea5aaf
CI: TPU drop install horovod (#4622)
Co-authored-by: chaton <thomas@grid.ai>
2020-11-13 11:33:52 +01:00
chaton 4018237c30
[FEAT] Add lambda closure to manual_optimizer_step (#4618)
* added lambda_closure

* move to types

* add 2 new tests

* make example more complex

* add complex example to doc

* added more tests

* resolve doc

* typo

* update

* update tpu optimizer_step

* Apply suggestions from code review

* Update pytorch_lightning/core/lightning.py

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

* update

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-12 19:22:06 +00:00
Sean Naren bacabaebaf
Sharded Accelerator 1/n: Expose clip gradients to plugins via abstract class (#4639)
* Added abstract precision plugin to expose clip_gradients function, use within accelerator to clip gradients

* Exclude model from override, keep optimizer (needed for sharded clip gradients), add override for O2 support apex

* Fix doc

* Applied codereview changes

* Refactored clip function to encapsulate tpu changes with tpu accelerator. Default to standard clip function for vanilla torch

* Pass correct grad clip val

* Moved var to property

* Apply code review suggestions
2020-11-12 17:18:09 +00:00
chaton 4a01fd048c
[FIX] Average Pbar Metrics (#4534)
* wip

* update

* normalize loss

* update test

* resolve bug

* update test and add TODO

* make sure it can be sync

* add TODO

* update sol
2020-11-12 15:59:01 +00:00
Jirka Borovec bd6c413829
Conda: PT 1.8 (#3833)
* PT 1.8

* unfreeze PT

* drop nightly from full

* add PT 1.8 to workflow

* readme table

* cuda

* skip cuda

* test 1.8

* unfreeze torch vision

Co-authored-by: ydcjeff <ydcjeff@outlook.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2020-11-12 15:03:43 +01:00
chaton 35f00df176
[FEAT] Add pytest section to Contribution how to ? (#4633)
* update contributing

* formatting
2020-11-12 11:48:54 +00:00
Jeff Yang 79fc92647c
[make] Create Makefile (#4620)
* [make] Create Makefile

* exclude makefile

* contributing info

* rm .run_local_test.sh
2020-11-12 09:25:31 +00:00
Jirka Borovec 396a18eb78
update changelog after 1.0.6 (#4624)
* update changelog after 1.0.6

* fix formatting
2020-11-12 09:21:57 +01:00