code for write_prediction
: lightning/lightning.py at 71d5cc11f13c1338fbe3f74a8d12e438cc6fddef · Lightning-AI/lightning · GitHub
it won’t dump at every call, it will gather it in _step
methods and saves it in _epoch_end
.
BTW there is an open PR regarding prediction you might want to check out: https://github.com/PyTorchLightning/pytorch-lightning/pull/5468