How to disable the automatic reduce/mean while using dp?
Hello everyone,
I have upgraded pytorch-lightning to 1.2.6 recently, the behavior of dp seems different from 1.2.0. To be specific, the returned values of validation_step() are automatically reduced before sent to validation_epoch_end(). However, the metrics I use need the original predictions of each sample instead of the reduced values. Is there a way to disable the automatic reduce and pass the whole predictions to validation_epoch_end()? Note that the validation_step_end() is not implemented in my model.
cc: @tchaton
I notice that the validation_step_end() and test_step_end() functions in dp.py script are:
def validation_step_end(output):
       return self.reduce(output)

def test_step_end(output):
       return self.reduce(output)

Thus, overwrite these two methods as follows will disable the automatic reduce in evaluation and test:
def validation_step_end(output):
       return output

def test_step_end(output):
       return output