Difference between `TrainingPlan.log()` vs `TrainingPlan.compute_and_log_metrics()`?

What is the difference between TrainingPlan.log() and TrainingPlan.compute_and_log_metrics()?

In scvi.train.TraniningPlan, it looks like self.log() just records a subset (the average reconstruction loss) of the stuff recorder by self.compute_and_log_metrics() but I’m confused about which one of these satisfies the LightningModule.training_step() pattern to return a loss to the trainer?

self.log() is just logging the loss and all the other stuff is there to log the output of LossRecorder, which computes the ELBO automatically and records any other stored metrics.