Skip to content

Commit

Permalink
ro2
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Feb 17, 2021
1 parent 2d07ace commit 098376c
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions pytorch_lightning/trainer/training_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,29 +406,6 @@ def _process_training_step_output_1_0(self, training_step_output, split_batch):

return training_step_output_for_epoch_end, training_step_output

def _process_result(self, training_step_output, split_batch):
training_step_output.track_batch_size(len(split_batch))
m = """
TrainResult and EvalResult were deprecated in 0.9.1 and support will drop in 1.0.0.
Use self.log and .write from the LightningModule to log metrics and write predictions.
training_step can now only return a scalar (for the loss) or a dictionary with anything you want.
Option 1:
return loss
Option 2:
return {'loss': loss, 'anything_else': ...}
Option 3:
return {'loss': loss, 'hiddens': hiddens, 'anything_else': ...}
"""
rank_zero_warn(m)

training_step_output_for_epoch_end = copy(training_step_output)
training_step_output_for_epoch_end.detach()

return training_step_output_for_epoch_end

def optimizer_step(self, optimizer, opt_idx, batch_idx, train_step_and_backward_closure):
model_ref = self.trainer.get_model()

Expand Down

0 comments on commit 098376c

Please sign in to comment.