How to store test_step outputs to file?
Is there an approach to save to one file all the outputs during test_step?
    def test_step(self, batch, batch_idx):
        x1, x2 = batch["x1"], batch["x2"]
        r1, r2 = self(x1, x2)
        
        test_loss = self.loss_fn(predict)
        test_mrr = self.mrr(r1, r2)

        return {'test_loss': test_loss, 'test_mrr': test_mrr}
My LightningModule outputs two dense vectors for representation r1 and r2. They must be saved to be used in a downstream task and for the measurement of some metrics.