fix retruning returns (#1431)

* returns

* changelog
This commit is contained in:
Jirka Borovec
2020-04-09 15:01:08 -04:00
committed by GitHub
parent 2dec93f588
commit b2707c9b2e
3 changed files with 4 additions and 3 deletions
+1
View File
@@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed default `DistributedSampler` for DDP training ([#1425](https://github.com/PyTorchLightning/pytorch-lightning/pull/1425))
- Fixed workers warning not on windows ([#1430](https://github.com/PyTorchLightning/pytorch-lightning/pull/1430))
- Fixed returning tuple from `run_training_batch` ([#1431](https://github.com/PyTorchLightning/pytorch-lightning/pull/1431))
## [0.7.2] - 2020-04-07
+1 -1
View File
@@ -322,7 +322,7 @@ class TrainerIOMixin(ABC):
checkpoint['hparams_type'] = 'namespace' if is_namespace else 'dict'
else:
rank_zero_warn(
"Did not find hyperparameters at model.hparams. Saving checkpoint without hyperparameters."
"Did not find hyperparameters at model hparams. Saving checkpoint without hyperparameters."
)
# give the model a chance to add a few things
+2 -2
View File
@@ -532,7 +532,7 @@ class TrainerTrainLoopMixin(ABC):
all_log_metrics = []
if batch is None:
return 0, grad_norm_dic, {}
return 0, grad_norm_dic, {}, {}
# Batch start events
with self.profiler.profile('on_batch_start'):
@@ -542,7 +542,7 @@ class TrainerTrainLoopMixin(ABC):
if self.is_function_implemented('on_batch_start'):
response = self.get_model().on_batch_start(batch)
if response == -1:
return -1, grad_norm_dic, {}
return -1, grad_norm_dic, {}, {}
splits = [batch]
if self.truncated_bptt_steps is not None: