Explicit Access to the Training Set During scVI Training

I would like to explicitly access the training DataLoader to compute quantities things like Pearson/Spearman gene correlations, gene entropies, NearestNeighbors etc. It is important that these batches are not computed per batch, but rather on the entire training set. What is the best way to go about this?