Compare commits

...
40 Commits
Author SHA1 Message Date
William Falcon 8c00c4a3cd release v0.5.1.2 2019-10-06 00:08:17 -04:00
William Falcon 3b9e97fb96 Merge branch 'master' into docs 2019-10-05 23:51:36 -04:00
William Falcon 438a4f74d0 cleaned up test_tube logger 2019-10-05 23:46:09 -04:00
William Falcon d0a9c92326 cleaned up test_tube logger 2019-10-05 23:35:10 -04:00
William Falcon d0a2438e22 cleaned up test_tube logger 2019-10-05 23:23:38 -04:00
William Falcon 4e1c90d892 cleaning up docs 2019-10-05 20:50:40 -04:00
William Falcon dccab6ce19 cleaning up demos 2019-10-05 16:38:48 -04:00
William Falcon 602236ecf2 cleaning up demos 2019-10-05 16:35:39 -04:00
William Falcon f1caeb49cc cleaning up demos 2019-10-05 16:33:49 -04:00
William Falcon 1c45edd192 cleaning up demos 2019-10-05 16:30:27 -04:00
William Falcon dd85e1c600 cleaning up demos 2019-10-05 16:26:16 -04:00
William Falcon ae8f6866bb cleaning up demos 2019-10-05 16:25:17 -04:00
William Falcon 35d85b2de1 cleaning up demos 2019-10-05 16:24:02 -04:00
William Falcon d63c19539f cleaning up demos 2019-10-05 16:21:19 -04:00
William Falcon 0d86302e05 cleaning up demos 2019-10-05 16:19:53 -04:00
William Falcon d179ad6d1d cleaning up demos 2019-10-05 16:16:48 -04:00
William Falcon 221c10c8c3 cleaning up demos 2019-10-05 16:14:05 -04:00
William Falcon 90faf9118c cleaning up demos 2019-10-05 16:12:29 -04:00
William Falcon a00e24ed80 cleaning up demos 2019-10-05 16:09:48 -04:00
William Falcon 5c99da5861 cleaning up demos 2019-10-05 16:07:00 -04:00
William Falcon d3ca836024 cleaning up demos 2019-10-05 16:05:42 -04:00
William Falcon d6c79644af cleaning up demos 2019-10-05 16:01:27 -04:00
William Falcon 56179bdbbb cleaning up demos 2019-10-05 16:00:32 -04:00
William Falcon a3df04f049 cleaning up demos 2019-10-05 15:57:31 -04:00
William Falcon 170262ff73 cleaning up demos 2019-10-05 15:54:48 -04:00
William Falcon 18f58d4bf4 cleaning up demos 2019-10-05 15:52:52 -04:00
William Falcon 7b982f2280 cleaning up demos 2019-10-05 15:48:15 -04:00
William Falcon 7b5a40b170 cleaning up demos 2019-10-05 15:45:41 -04:00
William Falcon e7f15e4e89 cleaning up demos 2019-10-05 15:39:37 -04:00
William Falcon c0c1cf058f cleaning up demos 2019-10-05 15:36:12 -04:00
William Falcon 6be5fb3cf7 cleaning up demos 2019-10-05 15:32:54 -04:00
William Falcon 45f36d3e74 cleaning up demos 2019-10-05 15:21:32 -04:00
William Falcon 0994cd9b09 cleaning up demos 2019-10-05 15:20:54 -04:00
William Falcon f02856c0bc cleaning up demos 2019-10-05 15:15:28 -04:00
William Falcon 67de4c241e cleaning up demos 2019-10-05 15:14:34 -04:00
William Falcon a7e154e643 cleaning up demos 2019-10-05 15:08:39 -04:00
William Falcon f2fb219bfe cleaning up demos 2019-10-05 15:05:23 -04:00
William Falcon e2bf0cda07 cleaning up demos 2019-10-05 15:04:22 -04:00
William Falcon 149628a003 cleaning up demos 2019-10-05 15:02:46 -04:00
William Falcon ac4216f95c cleaning up demos 2019-10-05 15:00:58 -04:00
5 changed files with 13 additions and 8 deletions
+3 -3
View File
@@ -65,12 +65,12 @@ You can override this method to adjust how you do the optimizer step for each op
Called once per optimizer
```python
# DEFAULT
def optimizer_step(self, current_epoch, batch_nb, optimizer, optimizer_i):
def optimizer_step(self, current_epoch, batch_nb, optimizer, optimizer_i, second_order_closure=None):
optimizer.step()
optimizer.zero_grad()
# Alternating schedule for optimizer steps (ie: GANs)
def optimizer_step(self, current_epoch, batch_nb, optimizer, optimizer_i):
def optimizer_step(self, current_epoch, batch_nb, optimizer, optimizer_i, second_order_closure=None):
# update generator opt every 2 steps
if optimizer_i == 0:
if batch_nb % 2 == 0 :
@@ -91,7 +91,7 @@ This step allows you to do a lot of non-standard training tricks such as learnin
```python
# learning rate warm-up
def optimizer_step(self, current_epoch, batch_nb, optimizer, optimizer_i):
def optimizer_step(self, current_epoch, batch_nb, optimizer, optimizer_i, second_order_closure=None):
# warm up lr
if self.trainer.global_step < 500:
lr_scale = min(1., float(self.trainer.global_step + 1) / 500.)
@@ -10,11 +10,13 @@ class TestTubeLogger(LightningLoggerBase):
__test__ = False
def __init__(
self, save_dir, name="default", debug=False, version=None, create_git_tag=False
self, save_dir, name="default", description=None, debug=False,
version=None, create_git_tag=False
):
super().__init__()
self.save_dir = save_dir
self.name = name
self.description = description
self.debug = debug
self._version = version
self.create_git_tag = create_git_tag
@@ -29,6 +31,7 @@ class TestTubeLogger(LightningLoggerBase):
name=self.name,
debug=self.debug,
version=self.version,
description=self.description,
create_git_tag=self.create_git_tag,
rank=self.rank,
)
+4 -2
View File
@@ -659,11 +659,12 @@ class Trainer(TrainerIO):
"""
warnings.warn(msg)
if on_ddp and self.get_val_dataloaders is not None:
if on_ddp and self.get_val_dataloaders() is not None:
for dataloader in self.get_val_dataloaders():
if not isinstance(dataloader.sampler, DistributedSampler):
msg = """
Your val_dataloader(s) don't use DistributedSampler.
You're using multiple gpus and multiple nodes without using a
DistributedSampler to assign a subset of your data to each process.
To silence this warning, pass a DistributedSampler to your DataLoader.
@@ -682,11 +683,12 @@ class Trainer(TrainerIO):
warnings.warn(msg)
break
if on_ddp and self.get_test_dataloaders is not None:
if on_ddp and self.get_test_dataloaders() is not None:
for dataloader in self.get_test_dataloaders():
if not isinstance(dataloader.sampler, DistributedSampler):
msg = """
Your test_dataloader(s) don't use DistributedSampler.
You're using multiple gpus and multiple nodes without using a
DistributedSampler to assign a subset of your data to each process.
To silence this warning, pass a DistributedSampler to your DataLoader.
+1 -1
View File
@@ -14,7 +14,7 @@ from setuptools import setup, find_packages
# engineer specific practices
setup(
name='pytorch-lightning',
version='0.5.1',
version='0.5.1.2',
description='The Keras for ML researchers using PyTorch',
author='William Falcon',
author_email='waf2107@columbia.edu',
+1 -1
View File
@@ -446,7 +446,7 @@ def test_gradient_accumulation_scheduling():
assert Trainer(accumulate_grad_batches={1: 2.5, 3: 5})
# test optimizer call freq matches scheduler
def optimizer_step(self, epoch_nb, batch_nb, optimizer, optimizer_i):
def optimizer_step(self, epoch_nb, batch_nb, optimizer, optimizer_i, second_order_closure=None):
# only test the first 12 batches in epoch
if batch_nb < 12:
if epoch_nb == 0: