Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda authored and williamFalcon committed Apr 3, 2020
1 parent 944465e commit 906c569
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/source/introduction_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ However, if you have multiple optimizers use the matching parameters
class LitMNIST(pl.LightningModule):
def configure_optimizers(self):
return Adam(self.generator(), lr=1e-3), Adam(self.discriminator(), lr=1e-3)
def configure_optimizers(self):
return Adam(self.generator(), lr=1e-3), Adam(self.discriminator(), lr=1e-3)
Training step
^^^^^^^^^^^^^
Expand Down
7 changes: 3 additions & 4 deletions pytorch_lightning/core/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def training_step(self, batch, batch_idx, hiddens):
The presented loss value in progress bar is smooth (average) over last values,
so it differs from values set in train/validation step.
"""
warnings.warn('training_step must be implemented to be used with the Lightning Trainer')
warnings.warn('`training_step` must be implemented to be used with the Lightning Trainer')

def training_end(self, *args, **kwargs):
"""
Expand Down Expand Up @@ -1076,8 +1076,7 @@ def configure_optimizers(self):
}
"""
warnings.warn('configure_optimizers must be implemented to be used with the '
'Lightning Trainer')
warnings.warn('`configure_optimizers` must be implemented to be used with the Lightning Trainer')

def optimizer_step(
self,
Expand Down Expand Up @@ -1279,7 +1278,7 @@ def train_dataloader(self):
return loader
"""
warnings.warn('train_dataloader must be implemented to be used with the Lightning Trainer')
warnings.warn('`train_dataloader` must be implemented to be used with the Lightning Trainer')

def tng_dataloader(self): # todo: remove in v1.0.0
"""Implement a PyTorch DataLoader.
Expand Down

0 comments on commit 906c569

Please sign in to comment.