Val idx optional in validation_step (#108)

* made dataset_i only available with multiple datasets

* updated interface signature

* updated tests
This commit is contained in:
William Falcon
2019-08-13 11:37:37 -04:00
committed by GitHub
parent 905a2e5a12
commit 7f53e7bfb3
6 changed files with 48 additions and 34 deletions
+12 -10
View File
@@ -33,11 +33,21 @@ class LightningModule(GradInformation, ModelIO, ModelHooks):
"""
raise NotImplementedError
def validation_step(self, data_batch, batch_nb):
def training_step(self, *args, **kwargs):
"""
return loss, dict with metrics for tqdm
:param called with batch, batch_nb
additional: optimizer_i if multiple optimizers used
:return:
"""
raise NotImplementedError
def validation_step(self, *args, **kwargs):
"""
return whatever outputs will need to be aggregated in validation_end
OPTIONAL
:param data_batch:
:param called with batch, batch_nb
additional: dataset_i if multiple val datasets used
:return:
"""
pass
@@ -51,14 +61,6 @@ class LightningModule(GradInformation, ModelIO, ModelHooks):
"""
pass
def training_step(self, data_batch, batch_nb):
"""
return loss, dict with metrics for tqdm
:param data_batch:
:return:
"""
raise NotImplementedError
def configure_optimizers(self):
"""
Return a list of optimizers and a list of schedulers (could be empty)