I am attempting to use MLflow to log a pytorch lightning model to experiments in Databricks. Accoring to the documentation, it seems like metrics like training and validation loss are supposed to be logged automatically without having to call self.log within the model. However, the metrics page is blank if I do not explicitly log anything within the model. However, I see all of my logged metrics in the experiments page when I do explicitly log things. My question is if I am missing anything. The documentation really makes it seem like certain metrics are logged automatically. How come MLflow does not log these metrics automatically?
Note: I do in fact see the params of the model automatically, just not the metrics without logging them. My code looks something like this:
mlflow.set_experiment(experiment_name = "path_to_databricks_experiment")
mlflow.autolog(log_input_examples = True)
mlflow.pytorch.autolog(log_every_n_epoch=1, log_models=True)
trainer = pl.Trainer(max_epochs = 2, default_root_dir="path_to_databricks_experiment", log_every_n_steps=1)
with mlflow.start_run():
trainer.fit(model, data_module)
It is weird that I am getting params logged automatically but not metrics.