diff --git a/.github/BECOMING_A_CORE_CONTRIBUTOR.md b/.github/BECOMING_A_CORE_CONTRIBUTOR.md
index 80efc228..46db2111 100644
--- a/.github/BECOMING_A_CORE_CONTRIBUTOR.md
+++ b/.github/BECOMING_A_CORE_CONTRIBUTOR.md
@@ -6,7 +6,7 @@ We're currently recruiting for a team of 5 core maintainers.
As a core maintainer you will have a strong say in the direction of the project. Big changes will require a majority of maintainers to agree.
### Code of conduct
-First and foremost, you'll be evaluated against [these core values](https://github.com/williamFalcon/pytorch-lightning/blob/master/.github/CONTRIBUTING.md). Any code we commit or feature we add needs to align with those core values.
+First and foremost, you'll be evaluated against [these core values](https://github.com/PyTorchLightning/pytorch-lightning/blob/master/.github/CONTRIBUTING.md). Any code we commit or feature we add needs to align with those core values.
### The bar for joining the team
Lightning is being used to solve really hard problems at the top AI labs in the world. As such, the bar for adding team members is extremely high. Candidates must have solid engineering skills, have a good eye for user experience, and must be a power user of Lightning and PyTorch.
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 6ae828ac..a7967307 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -8,8 +8,8 @@ assignees: ''
---
### Common bugs:
-1. Tensorboard not showing in Jupyter-notebook see [issue 79](https://github.com/williamFalcon/pytorch-lightning/issues/79).
-2. PyTorch 1.1.0 vs 1.2.0 support [see FAQ](https://github.com/williamFalcon/pytorch-lightning#faq)
+1. Tensorboard not showing in Jupyter-notebook see [issue 79](https://github.com/PyTorchLightning/pytorch-lightning/issues/79).
+2. PyTorch 1.1.0 vs 1.2.0 support [see FAQ](https://github.com/PyTorchLightning/pytorch-lightning#faq)
## 🐛 Bug
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index c488b97d..258aac92 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,7 +1,7 @@
# Before submitting
- [ ] Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
-- [ ] Did you read the [contributor guideline](https://github.com/williamFalcon/pytorch-lightning/blob/master/.github/CONTRIBUTING.md)?
+- [ ] Did you read the [contributor guideline](https://github.com/PyTorchLightning/pytorch-lightning/blob/master/.github/CONTRIBUTING.md)?
- [ ] Did you make sure to update the docs?
- [ ] Did you write any new necessary tests?
diff --git a/.gitignore b/.gitignore
index 43541c9d..d10d5aba 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,29 +1,26 @@
# project
.DS_Store
-.data/
run_configs/
-test_tube_logs/
-test_tube_data/
-datasets/
model_weights/
app/models/
pip-wheel-metadata/
-test_tube_exp/
-tests/tests_tt_dir/
-tests/save_dir
-default/
lightning_logs/
-tests/tests/
-*.rst
+
+# Test-tube
+test_tube_logs/
+test_tube_data/
+test_tube_exp/
+
+# Documentations
+docs/source/pl_examples*.rst
+docs/source/pytorch_lightning*.rst
/docs/source/*.md
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
-example.py
timit_data/
-LJSpeech-1.1/
# C extensions
*.so
@@ -32,7 +29,6 @@ LJSpeech-1.1/
# Distribution / packaging
.Python
-env/
ide_layouts/
build/
develop-eggs/
@@ -44,7 +40,6 @@ lib/
lib64/
parts/
sdist/
-var/
wheels/
*.egg-info/
.installed.cfg
@@ -70,6 +65,9 @@ nosetests.xml
coverage.xml
*.cover
.hypothesis/
+tests/tests_tt_dir/
+tests/save_dir
+tests/tests/
# Translations
*.mo
@@ -87,7 +85,7 @@ instance/
.scrapy
# Sphinx documentation
-docs/_build/
+docs/build/
# PyBuilder
target/
@@ -109,6 +107,7 @@ celerybeat-schedule
# virtualenv
.venv
+env/
venv/
ENV/
@@ -126,4 +125,6 @@ ENV/
.mypy_cache/
# data
+.data/
+datasets/
mnist/
diff --git a/.readthedocs.yml b/.readthedocs.yml
index 51fe628f..312b50e6 100644
--- a/.readthedocs.yml
+++ b/.readthedocs.yml
@@ -20,5 +20,5 @@ formats: all
python:
version: 3.7
install:
- #- requirements: requirements.txt
- requirements: docs/requirements.txt
+ #- requirements: requirements.txt
diff --git a/MANIFEST.in b/MANIFEST.in
index 9b4eae6a..b15ebfd8 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,7 +1,6 @@
# Manifest syntax https://docs.python.org/2/distutils/sourcedist.html
graft wheelhouse
-recursive-include birl *.py
recursive-exclude __pycache__ *.py[cod] *.orig
# Include the README
diff --git a/README.md b/README.md
index 75745291..30a576cf 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ pip install pytorch-lightning
```
## Docs
-**[View the docs here](https://pytorch-lightning.readthedocs.io/en/latest)**
+**[View the docs here](https://pytorch-lightning.rtfd.io/en/latest)**
** DOCS TEMPORARILY have broken links because we recently switched orgs from williamfalcon/pytorch-lightning to pytorchlightning/pytorch-lightning [jan 15, 2020].
As a temporary hack, when you get the 404, replace williamfalcon.github.io with pytorchlightning.github.io.
@@ -84,12 +84,12 @@ Lightning sets up all the boilerplate state-of-the-art training for you so you c
---
## How do I do use it?
-Think about Lightning as refactoring your research code instead of using a new framework. The research code goes into a [LightningModule](https://williamfalcon.github.io/pytorch-lightning/LightningModule/RequiredTrainerInterface/) which you fit using a Trainer.
+Think about Lightning as refactoring your research code instead of using a new framework. The research code goes into a [LightningModule](https://pytorch-lightning.rtfd.io/en/latest/LightningModule/RequiredTrainerInterface/) which you fit using a Trainer.
The LightningModule defines a *system* such as seq-2-seq, GAN, etc... It can ALSO define a simple classifier such as the example below.
To use lightning do 2 things:
-1. [Define a LightningModule](https://williamfalcon.github.io/pytorch-lightning/LightningModule/RequiredTrainerInterface/)
+1. [Define a LightningModule](https://pytorch-lightning.rtfd.io/en/latest/LightningModule/RequiredTrainerInterface/)
**WARNING:** This syntax is for version 0.5.0+ where abbreviations were removed.
```python
import os
@@ -165,7 +165,7 @@ To use lightning do 2 things:
# OPTIONAL
return DataLoader(MNIST(os.getcwd(), train=False, download=True, transform=transforms.ToTensor()), batch_size=32)
```
-2. Fit with a [trainer](https://williamfalcon.github.io/pytorch-lightning/Trainer/)
+2. Fit with a [trainer](https://pytorch-lightning.rtfd.io/en/latest/Trainer/)
```python
from pytorch_lightning import Trainer
@@ -277,77 +277,20 @@ Lightning also adds a text column with all the hyperparameters for this experime

-## Lightning automates all of the following ([each is also configurable](https://williamfalcon.github.io/pytorch-lightning/Trainer/)):
-
-#### Checkpointing
-
-- [Checkpoint callback](https://williamfalcon.github.io/pytorch-lightning/Trainer/Checkpointing/#model-saving)
-- [Model saving](https://williamfalcon.github.io/pytorch-lightning/Trainer/Checkpointing/#model-saving)
-- [Model loading](https://williamfalcon.github.io/pytorch-lightning/LightningModule/methods/#load-from-metrics)
-- [Restoring training session](https://williamfalcon.github.io/pytorch-lightning/Trainer/Checkpointing/#restoring-training-session)
-
-#### Computing cluster (SLURM)
-
-- [Running grid search on a cluster](https://williamfalcon.github.io/pytorch-lightning/Trainer/SLURM%20Managed%20Cluster#running-grid-search-on-a-cluster)
-- [Walltime auto-resubmit](https://williamfalcon.github.io/pytorch-lightning/Trainer/SLURM%20Managed%20Cluster#walltime-auto-resubmit)
-
-#### Debugging
-
-- [Fast dev run](https://williamfalcon.github.io/pytorch-lightning/Trainer/debugging/#fast-dev-run)
-- [Inspect gradient norms](https://williamfalcon.github.io/pytorch-lightning/Trainer/debugging/#inspect-gradient-norms)
-- [Log GPU usage](https://williamfalcon.github.io/pytorch-lightning/Trainer/debugging/#Log-gpu-usage)
-- [Make model overfit on subset of data](https://williamfalcon.github.io/pytorch-lightning/Trainer/debugging/#make-model-overfit-on-subset-of-data)
-- [Print the parameter count by layer](https://williamfalcon.github.io/pytorch-lightning/Trainer/debugging/#print-the-parameter-count-by-layer)
-- [Print which gradients are nan](https://williamfalcon.github.io/pytorch-lightning/Trainer/debugging/#print-which-gradients-are-nan)
-- [Print input and output size of every module in system](https://williamfalcon.github.io/pytorch-lightning/LightningModule/properties/#example_input_array)
+## Lightning automates all of the following ([each is also configurable](https://pytorch-lightning.rtfd.io/en/latest/pytorch_lightning.trainer.html)):
-#### Distributed training
-
-- [Implement Your Own Distributed (DDP) training](https://williamfalcon.github.io/pytorch-lightning/Trainer/hooks/#init_ddp_connection)
-- [16-bit mixed precision](https://williamfalcon.github.io/pytorch-lightning/Trainer/Distributed%20training/#16-bit-mixed-precision)
-- [Multi-GPU](https://williamfalcon.github.io/pytorch-lightning/Trainer/Distributed%20training/#Multi-GPU)
-- [Multi-node](https://williamfalcon.github.io/pytorch-lightning/Trainer/Distributed%20training/#Multi-node)
-- [Single GPU](https://williamfalcon.github.io/pytorch-lightning/Trainer/Distributed%20training/#single-gpu)
-- [Self-balancing architecture](https://williamfalcon.github.io/pytorch-lightning/Trainer/Distributed%20training/#self-balancing-architecture)
-
-
-#### Experiment Logging
-
-- [Display metrics in progress bar](https://williamfalcon.github.io/pytorch-lightning/Trainer/Logging/#display-metrics-in-progress-bar)
-- [Log metric row every k batches](https://williamfalcon.github.io/pytorch-lightning/Trainer/Logging/#log-metric-row-every-k-batches)
-- [Process position](https://williamfalcon.github.io/pytorch-lightning/Trainer/Logging/#process-position)
-- [Tensorboard support](https://williamfalcon.github.io/pytorch-lightning/Trainer/Logging/#tensorboard-support)
-- [Save a snapshot of all hyperparameters](https://williamfalcon.github.io/pytorch-lightning/Trainer/Logging/#save-a-snapshot-of-all-hyperparameters)
-- [Snapshot code for a training run](https://williamfalcon.github.io/pytorch-lightning/Trainer/Logging/#snapshot-code-for-a-training-run)
-- [Write logs file to csv every k batches](https://williamfalcon.github.io/pytorch-lightning/Trainer/Logging/#write-logs-file-to-csv-every-k-batches)
-- [Logging on W&B](https://williamfalcon.github.io/pytorch-lightning/Trainer/Logging/#w&b)
-- [Logging experiment data to Neptune](https://williamfalcon.github.io/pytorch-lightning/Trainer/Logging/#neptune-support)
-
-#### Training loop
-
-- [Accumulate gradients](https://williamfalcon.github.io/pytorch-lightning/Trainer/Training%20Loop/#accumulated-gradients)
-- [Force training for min or max epochs](https://williamfalcon.github.io/pytorch-lightning/Trainer/Training%20Loop/#force-training-for-min-or-max-epochs)
-- [Early stopping callback](https://williamfalcon.github.io/pytorch-lightning/Trainer/Training%20Loop/#early-stopping)
-- [Force disable early stop](https://williamfalcon.github.io/pytorch-lightning/Trainer/Training%20Loop/#force-disable-early-stop)
-- [Gradient Clipping](https://williamfalcon.github.io/pytorch-lightning/Trainer/Training%20Loop/#gradient-clipping)
-- [Hooks](https://williamfalcon.github.io/pytorch-lightning/Trainer/hooks/)
-- [Learning rate scheduling](https://williamfalcon.github.io/pytorch-lightning/LightningModule/RequiredTrainerInterface/#configure_optimizers)
-- [Use multiple optimizers (like GANs)](https://williamfalcon.github.io/pytorch-lightning/LightningModule/RequiredTrainerInterface/#configure_optimizers)
-- [Set how much of the training set to check (1-100%)](https://williamfalcon.github.io/pytorch-lightning/Trainer/Training%20Loop/#set-how-much-of-the-training-set-to-check)
-- [Step optimizers at arbitrary intervals](https://williamfalcon.github.io/pytorch-lightning/Trainer/hooks/#optimizer_step)
-
-#### Validation loop
-
-- [Check validation every n epochs](https://williamfalcon.github.io/pytorch-lightning/Trainer/Validation%20loop/#check-validation-every-n-epochs)
-- [Hooks](https://williamfalcon.github.io/pytorch-lightning/Trainer/hooks/)
-- [Set how much of the validation set to check](https://williamfalcon.github.io/pytorch-lightning/Trainer/Validation%20loop/#set-how-much-of-the-validation-set-to-check)
-- [Set how much of the test set to check](https://williamfalcon.github.io/pytorch-lightning/Trainer/Validation%20loop/#set-how-much-of-the-test-set-to-check)
-- [Set validation check frequency within 1 training epoch](https://williamfalcon.github.io/pytorch-lightning/Trainer/Validation%20loop/#set-validation-check-frequency-within-1-training-epoch)
-- [Set the number of validation sanity steps](https://williamfalcon.github.io/pytorch-lightning/Trainer/Validation%20loop/#set-the-number-of-validation-sanity-steps)
-
-#### Testing loop
-- [Run test set](https://williamfalcon.github.io/pytorch-lightning/Trainer/Testing%20loop/)
+- [Running grid search on a cluster](https://pytorch-lightning.rtfd.io/en/latest/pytorch_lightning.trainer.distrib_data_parallel.html)
+- [Fast dev run](https://pytorch-lightning.rtfd.io/en/latest/pytorch_lightning.utilities.debugging.html)
+- [Logging](https://pytorch-lightning.rtfd.io/en/latest/pytorch_lightning.logging.html)
+- [Implement Your Own Distributed (DDP) training](https://pytorch-lightning.rtfd.io/en/latest/pytorch_lightning.core.lightning.html#pytorch_lightning.core.lightning.LightningModule.configure_ddp)
+- [Multi-GPU & Multi-node](https://pytorch-lightning.rtfd.io/en/latest/pytorch_lightning.trainer.distrib_parts.html)
+- [Training loop](https://pytorch-lightning.rtfd.io/en/latest/pytorch_lightning.trainer.training_loop.html)
+- [Hooks](https://pytorch-lightning.rtfd.io/en/latest/pytorch_lightning.core.hooks.html)
+- [Configure optimizers](https://pytorch-lightning.rtfd.io/en/latest/pytorch_lightning.core.lightning.html#pytorch_lightning.core.lightning.LightningModule.configure_optimizers)
+- [Validations](https://pytorch-lightning.rtfd.io/en/latest/pytorch_lightning.trainer.evaluation_loop.html)
+- [Model saving & Restoring training session](https://pytorch-lightning.rtfd.io/en/latest/pytorch_lightning.trainer.training_io.html)
+
## Examples
- [GAN](https://github.com/PytorchLightning/pytorch-lightning/tree/master/pl_examples/domain_templates/gan.py)
@@ -366,16 +309,18 @@ Lightning also adds a text column with all the hyperparameters for this experime
Welcome to the Lightning community!
If you have any questions, feel free to:
-1. [read the docs](https://williamfalcon.github.io/pytorch-lightning/).
+1. [read the docs](https://pytorch-lightning.rtfd.io/en/latest/).
2. [Search through the issues](https://github.com/PytorchLightning/pytorch-lightning/issues?utf8=%E2%9C%93&q=my++question).
3. [Ask on stackoverflow](https://stackoverflow.com/questions/ask?guided=false) with the tag pytorch-lightning.
-If no one replies to you quickly enough, feel free to post the stackoverflow link to our [Slack channel](https://join.slack.com/t/pytorch-lightning/shared_invite/enQtODU5ODIyNTUzODQwLTFkMDg5Mzc1MDBmNjEzMDgxOTVmYTdhYjA1MDdmODUyOTg2OGQ1ZWZkYTQzODhhNzdhZDA3YmNhMDhlMDY4YzQ)!
+If no one replies to you quickly enough, feel free to post the stackoverflow link to our Gitter chat!
+
+To chat with the rest of us visit our [gitter channel](https://gitter.im/PyTorch-Lightning/community)!
---
## FAQ
**How do I use Lightning for rapid research?**
-[Here's a walk-through](https://williamfalcon.github.io/pytorch-lightning/)
+[Here's a walk-through](https://pytorch-lightning.rtfd.io/en/latest/)
**Why was Lightning created?**
Lightning has 3 goals in mind:
@@ -425,16 +370,16 @@ If you can't wait for the next release, install the most up to date code with:
### Any release installation
-You can also install any past release from this repository:
+You can also install any past release `0.X.Y` from this repository:
```bash
-pip install https://github.com/PytorchLightning/pytorch-lightning/archive/0.4.4.zip --upgrade
+pip install https://github.com/PytorchLightning/pytorch-lightning/archive/0.X.Y.zip --upgrade
```
## Bibtex
If you want to cite the framework feel free to use this (but only if you loved it 😊):
```
@misc{Falcon2019,
- author = {Falcon, W.A.},
+ author = {Falcon, W.A. et al.},
title = {PyTorch Lightning},
year = {2019},
publisher = {GitHub},
diff --git a/docs/source/_static/images/lightning_icon.svg b/docs/source/_static/images/lightning_icon.svg
new file mode 100644
index 00000000..5ab3512c
--- /dev/null
+++ b/docs/source/_static/images/lightning_icon.svg
@@ -0,0 +1,62 @@
+
+
diff --git a/docs/source/_static/images/lightning_logo-large.svg b/docs/source/_static/images/lightning_logo-large.svg
new file mode 100644
index 00000000..4a6cd73f
--- /dev/null
+++ b/docs/source/_static/images/lightning_logo-large.svg
@@ -0,0 +1,61 @@
+
+
diff --git a/docs/source/_static/images/lightning_logo-name.svg b/docs/source/_static/images/lightning_logo-name.svg
new file mode 100755
index 00000000..37cdba22
--- /dev/null
+++ b/docs/source/_static/images/lightning_logo-name.svg
@@ -0,0 +1,12 @@
+
+
\ No newline at end of file
diff --git a/docs/source/_static/images/lightning_logo.png b/docs/source/_static/images/lightning_logo.png
index bd5117dc..a28606b5 100644
Binary files a/docs/source/_static/images/lightning_logo.png and b/docs/source/_static/images/lightning_logo.png differ
diff --git a/docs/source/_static/images/lightning_logo.svg b/docs/source/_static/images/lightning_logo.svg
new file mode 100644
index 00000000..d8b56e58
--- /dev/null
+++ b/docs/source/_static/images/lightning_logo.svg
@@ -0,0 +1,62 @@
+
+
diff --git a/docs/source/_static/images/lightning_logo_medium.png b/docs/source/_static/images/lightning_logo_medium.png
deleted file mode 100644
index a28606b5..00000000
Binary files a/docs/source/_static/images/lightning_logo_medium.png and /dev/null differ
diff --git a/docs/source/_static/images/lightning_logo_small.png b/docs/source/_static/images/lightning_logo_small.png
deleted file mode 100644
index 17d0aa92..00000000
Binary files a/docs/source/_static/images/lightning_logo_small.png and /dev/null differ
diff --git a/docs/source/_templates/theme_variables.jinja b/docs/source/_templates/theme_variables.jinja
index 3a67ad64..b61b79d6 100644
--- a/docs/source/_templates/theme_variables.jinja
+++ b/docs/source/_templates/theme_variables.jinja
@@ -2,16 +2,16 @@
'github': 'https://github.com/PytorchLightning/pytorch-lightning',
'github_issues': 'https://github.com/PytorchLightning/pytorch-lightning/issues',
'contributing': 'https://github.com/PytorchLightning/pytorch-lightning/blob/master/CONTRIBUTING.md',
- 'docs': 'https://pytorchlightning.github.io/pytorch-lightning',
+ 'docs': 'https://pytorch-lightning.rtfd.io/en/latest',
'twitter': 'https://twitter.com/PyTorchLightnin',
'discuss': 'https://discuss.pytorch.org',
- 'tutorials': 'https://pytorchlightning.github.io/pytorch-lightning/',
- 'previous_pytorch_versions': 'https://pytorchlightning.github.io/pytorch-lightning/',
- 'home': 'https://pytorchlightning.github.io/pytorch-lightning/',
- 'get_started': 'https://pytorchlightning.github.io/pytorch-lightning/',
- 'features': 'https://pytorchlightning.github.io/pytorch-lightning/',
- 'blog': 'https://pytorchlightning.github.io/pytorch-lightning/',
- 'resources': 'https://pytorchlightning.github.io/pytorch-lightning/',
- 'support': 'https://pytorchlightning.github.io/pytorch-lightning/',
+ 'tutorials': 'https://pytorch-lightning.rtfd.io/en/latest/',
+ 'previous_pytorch_versions': 'https://pytorch-lightning.rtfd.io/en/latest/',
+ 'home': 'https://pytorch-lightning.rtfd.io/en/latest/',
+ 'get_started': 'https://pytorch-lightning.rtfd.io/en/latest/',
+ 'features': 'https://pytorch-lightning.rtfd.io/en/latest/',
+ 'blog': 'https://pytorch-lightning.rtfd.io/en/latest/',
+ 'resources': 'https://pytorch-lightning.rtfd.io/en/latest/',
+ 'support': 'https://pytorch-lightning.rtfd.io/en/latest/',
}
-%}
diff --git a/docs/source/conf.py b/docs/source/conf.py
index fa3558ab..5183ef6b 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -150,7 +150,7 @@ html_theme_options = {
'logo_only': False,
}
-html_logo = '_static/images/lightning_logo_small.png'
+html_logo = '_static/images/lightning_logo-name.svg'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
@@ -303,7 +303,7 @@ autodoc_mock_imports = MOCK_REQUIRE_PACKAGES + MOCK_MANUAL_PACKAGES
# Options for the linkcode extension
# ----------------------------------
-github_user = 'williamFalcon'
+github_user = 'PyTorchLightning'
github_repo = project
diff --git a/pl_examples/__init__.py b/pl_examples/__init__.py
index 7cffc0ee..92abda69 100644
--- a/pl_examples/__init__.py
+++ b/pl_examples/__init__.py
@@ -3,13 +3,13 @@ Template model definition
-------------------------
In 99% of cases you want to just copy `one of the examples
- `_
+ `_
to start a new lightningModule and change the core of what your model is actually trying to do.
.. code-block:: bash
# get a copy of the module template
- wget https://raw.githubusercontent.com/williamFalcon/pytorch-lightning/master/pl_examples/new_project_templates/lightning_module_template.py # noqa: E501
+ wget https://raw.githubusercontent.com/PyTorchLightning/pytorch-lightning/master/pl_examples/new_project_templates/lightning_module_template.py # noqa: E501
Trainer Example
diff --git a/pl_examples/basic_examples/lightning_module_template.py b/pl_examples/basic_examples/lightning_module_template.py
index eb1fe9f1..07ca1196 100644
--- a/pl_examples/basic_examples/lightning_module_template.py
+++ b/pl_examples/basic_examples/lightning_module_template.py
@@ -1,8 +1,8 @@
"""
Example template for defining a system
"""
-import os
import logging
+import os
from argparse import ArgumentParser
from collections import OrderedDict
diff --git a/pl_examples/full_examples/imagenet/imagenet_example.py b/pl_examples/full_examples/imagenet/imagenet_example.py
index a277705c..c2175da8 100644
--- a/pl_examples/full_examples/imagenet/imagenet_example.py
+++ b/pl_examples/full_examples/imagenet/imagenet_example.py
@@ -8,20 +8,18 @@ from collections import OrderedDict
import torch
import torch.backends.cudnn as cudnn
-import torch.nn.parallel
import torch.nn.functional as F
+import torch.nn.parallel
import torch.optim as optim
import torch.optim.lr_scheduler as lr_scheduler
import torch.utils.data
import torch.utils.data.distributed
-
-import torchvision.transforms as transforms
-import torchvision.models as models
import torchvision.datasets as datasets
+import torchvision.models as models
+import torchvision.transforms as transforms
import pytorch_lightning as pl
-
# pull out resnet names from torchvision models
MODEL_NAMES = sorted(
name for name in models.__dict__
diff --git a/pytorch_lightning/__init__.py b/pytorch_lightning/__init__.py
index 3ef4f4a1..49dd9591 100644
--- a/pytorch_lightning/__init__.py
+++ b/pytorch_lightning/__init__.py
@@ -5,7 +5,7 @@ __author__ = 'William Falcon et al.'
__author_email__ = 'waf2107@columbia.edu'
__license__ = 'Apache-2.0'
__copyright__ = 'Copyright (c) 2018-2019, %s.' % __author__
-__homepage__ = 'https://github.com/williamFalcon/pytorch-lightning'
+__homepage__ = 'https://github.com/PyTorchLightning/pytorch-lightning'
# this has to be simple string, see: https://github.com/pypa/twine/issues/522
__docs__ = "PyTorch Lightning is the lightweight PyTorch wrapper for ML researchers." \
" Scale your models. Write less boilerplate."
@@ -21,7 +21,7 @@ except NameError:
if __LIGHTNING_SETUP__:
import sys
- sys.stderr.write('Partial import of skimage during the build process.\n')
+ sys.stderr.write('Partial import of torchlightning during the build process.\n')
# We are not importing the rest of the scikit during the build
# process, as it may not be compiled yet
else:
diff --git a/pytorch_lightning/callbacks/pt_callbacks.py b/pytorch_lightning/callbacks/pt_callbacks.py
index 4c7d877a..42a8336f 100644
--- a/pytorch_lightning/callbacks/pt_callbacks.py
+++ b/pytorch_lightning/callbacks/pt_callbacks.py
@@ -1,13 +1,15 @@
"""
Callbacks
-====================================
+=========
+
Callbacks supported by Lightning
"""
+import logging
import os
import shutil
-import logging
import warnings
+
import numpy as np
from pytorch_lightning.overrides.data_parallel import LightningDistributedDataParallel
@@ -163,9 +165,7 @@ class EarlyStopping(Callback):
class ModelCheckpoint(Callback):
- r"""
-
- Save the model after every epoch.
+ r"""Save the model after every epoch.
Args:
filepath (str): path to save the model file.
diff --git a/pytorch_lightning/core/lightning.py b/pytorch_lightning/core/lightning.py
index e1a328e4..2e8b634d 100644
--- a/pytorch_lightning/core/lightning.py
+++ b/pytorch_lightning/core/lightning.py
@@ -1,21 +1,19 @@
-
-
-import os
-import warnings
import collections
import logging
-import pandas as pd
+import os
+import warnings
from abc import ABC, abstractmethod
from argparse import Namespace
+import pandas as pd
import torch
import torch.distributed as dist
-#
+
from pytorch_lightning.core.decorators import data_loader
from pytorch_lightning.core.grads import GradInformation
from pytorch_lightning.core.hooks import ModelHooks
-from pytorch_lightning.core.saving import ModelIO
from pytorch_lightning.core.memory import ModelSummary
+from pytorch_lightning.core.saving import ModelIO
from pytorch_lightning.overrides.data_parallel import LightningDistributedDataParallel
diff --git a/pytorch_lightning/core/memory.py b/pytorch_lightning/core/memory.py
index 1abc349e..826329c8 100644
--- a/pytorch_lightning/core/memory.py
+++ b/pytorch_lightning/core/memory.py
@@ -3,13 +3,13 @@ Generates a summary of a model's layers and dimensionality
'''
import gc
+import logging
import os
import subprocess
import numpy as np
import pandas as pd
import torch
-import logging
class ModelSummary(object):
diff --git a/pytorch_lightning/core/root_module.py b/pytorch_lightning/core/root_module.py
index 9f8612bd..abc97f3c 100644
--- a/pytorch_lightning/core/root_module.py
+++ b/pytorch_lightning/core/root_module.py
@@ -6,5 +6,3 @@ import warnings
warnings.warn("`root_module` module has been renamed to `lightning` since v0.6.0"
" and will be removed in v0.8.0", DeprecationWarning)
-
-from pytorch_lightning.core.lightning import LightningModule # noqa: E402
diff --git a/pytorch_lightning/testing/model_base.py b/pytorch_lightning/testing/model_base.py
index df9a3320..9baaf176 100644
--- a/pytorch_lightning/testing/model_base.py
+++ b/pytorch_lightning/testing/model_base.py
@@ -9,6 +9,7 @@ from torch.utils.data import DataLoader
from torch.utils.data.distributed import DistributedSampler
from torchvision import transforms
from torchvision.datasets import MNIST
+
try:
from test_tube import HyperOptArgumentParser
except ImportError:
diff --git a/pytorch_lightning/trainer/data_loading.py b/pytorch_lightning/trainer/data_loading.py
index 33bd99fc..ee6c341c 100644
--- a/pytorch_lightning/trainer/data_loading.py
+++ b/pytorch_lightning/trainer/data_loading.py
@@ -2,6 +2,7 @@ import warnings
from abc import ABC
import torch.distributed as dist
+
try:
# loading for pyTorch 1.3
from torch.utils.data import IterableDataset
diff --git a/pytorch_lightning/trainer/distrib_data_parallel.py b/pytorch_lightning/trainer/distrib_data_parallel.py
index 665ec800..0561a6d4 100644
--- a/pytorch_lightning/trainer/distrib_data_parallel.py
+++ b/pytorch_lightning/trainer/distrib_data_parallel.py
@@ -113,9 +113,9 @@ When the script starts again, Lightning will:
"""
+import logging
import os
import re
-import logging
import warnings
from abc import ABC, abstractmethod
diff --git a/pytorch_lightning/trainer/distrib_parts.py b/pytorch_lightning/trainer/distrib_parts.py
index 4681d11b..db21e4d0 100644
--- a/pytorch_lightning/trainer/distrib_parts.py
+++ b/pytorch_lightning/trainer/distrib_parts.py
@@ -276,7 +276,7 @@ Instead of manually building SLURM scripts, you can use the
Here is an example where you run a grid search of 9 combinations of hyperparams.
The full examples are `here
- `_.
+ `_.
.. code-block:: python
diff --git a/pytorch_lightning/trainer/evaluation_loop.py b/pytorch_lightning/trainer/evaluation_loop.py
index cb7cc219..e0148d60 100644
--- a/pytorch_lightning/trainer/evaluation_loop.py
+++ b/pytorch_lightning/trainer/evaluation_loop.py
@@ -123,10 +123,10 @@ In this second case, the options you pass to trainer will be used when running
"""
+import sys
from abc import ABC, abstractmethod
import torch
-import sys
import tqdm
from pytorch_lightning.utilities.debugging import MisconfigurationException
diff --git a/pytorch_lightning/trainer/trainer.py b/pytorch_lightning/trainer/trainer.py
index dd68293a..cc9f9394 100644
--- a/pytorch_lightning/trainer/trainer.py
+++ b/pytorch_lightning/trainer/trainer.py
@@ -1,9 +1,9 @@
+import logging
import os
import sys
import warnings
-import logging
import torch
import torch.distributed as dist
@@ -23,8 +23,8 @@ from pytorch_lightning.trainer.distrib_parts import (
from pytorch_lightning.trainer.evaluation_loop import TrainerEvaluationLoopMixin
from pytorch_lightning.trainer.logging import TrainerLoggingMixin
from pytorch_lightning.trainer.model_hooks import TrainerModelHooksMixin
-from pytorch_lightning.trainer.training_loop import TrainerTrainLoopMixin
from pytorch_lightning.trainer.training_io import TrainerIOMixin
+from pytorch_lightning.trainer.training_loop import TrainerTrainLoopMixin
from pytorch_lightning.trainer.training_tricks import TrainerTrainingTricksMixin
from pytorch_lightning.utilities.debugging import MisconfigurationException
diff --git a/pytorch_lightning/trainer/training_io.py b/pytorch_lightning/trainer/training_io.py
index 168e9835..b569a6c1 100644
--- a/pytorch_lightning/trainer/training_io.py
+++ b/pytorch_lightning/trainer/training_io.py
@@ -89,14 +89,16 @@ At a rough level, here's what happens inside Trainer :py:mod:`pytorch_lightning.
"""
+import logging
import os
import re
import signal
import warnings
-from subprocess import call
-import logging
from abc import ABC
+from subprocess import call
+from argparse import Namespace
+import pandas as pd
import torch
import torch.distributed as dist
@@ -268,6 +270,7 @@ class TrainerIOMixin(ABC):
torch.save(checkpoint, filepath)
def restore(self, checkpoint_path, on_gpu):
+
# if on_gpu:
# checkpoint = torch.load(checkpoint_path)
# else:
diff --git a/pytorch_lightning/trainer/training_loop.py b/pytorch_lightning/trainer/training_loop.py
index 7c8d0143..48a10e19 100644
--- a/pytorch_lightning/trainer/training_loop.py
+++ b/pytorch_lightning/trainer/training_loop.py
@@ -151,10 +151,10 @@ When this flag is enabled each batch is split into sequences of size truncated_b
"""
+
import copy
-import inspect
-from abc import ABC, abstractmethod
import warnings
+from abc import ABC, abstractmethod
import numpy as np
diff --git a/pytorch_lightning/trainer/training_tricks.py b/pytorch_lightning/trainer/training_tricks.py
index c9c31bb8..227ef245 100644
--- a/pytorch_lightning/trainer/training_tricks.py
+++ b/pytorch_lightning/trainer/training_tricks.py
@@ -1,7 +1,8 @@
+import logging
from abc import ABC, abstractmethod
import torch
-import logging
+
from pytorch_lightning.callbacks import GradientAccumulationScheduler
diff --git a/setup.py b/setup.py
index 23e11493..44d0d199 100755
--- a/setup.py
+++ b/setup.py
@@ -44,7 +44,7 @@ setup(
author=pytorch_lightning.__author__,
author_email=pytorch_lightning.__author_email__,
url=pytorch_lightning.__homepage__,
- download_url='https://github.com/williamFalcon/pytorch-lightning',
+ download_url='https://github.com/PyTorchLightning/pytorch-lightning',
license=pytorch_lightning.__license__,
packages=find_packages(exclude=['tests']),
diff --git a/tests/README.md b/tests/README.md
index 045347f2..183e9c25 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -10,7 +10,7 @@ run on a 2-GPU machine to validate the full test-suite.
To run all tests do the following:
```bash
-git clone https://github.com/williamFalcon/pytorch-lightning
+git clone https://github.com/PyTorchLightning/pytorch-lightning
cd pytorch-lightning
# install module locally