2

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.

desertnaut
  • 57,590
  • 26
  • 140
  • 166
Mikel
  • 21
  • 1
  • Welcome to SO; you seem to ask two different questions, in your title and the body. Please edit & update to clarify **exactly** is your issue and your question are. – desertnaut Jun 12 '23 at 16:28

0 Answers0