When using auto_record() for PyTorch-Lightning models, the following information is automatically captured:

  1. Hyper-parameters: Information provided in trainer.optimizer.defaults.
  2. Metrics:Epoch-time versus epoch; Average running loss versus epoch; Learning rate versus epoch; Custom metrics logged by the user using self.log in the PyTorch-Lightning model.

To utilize this feature, simply call markov.pytorchlightning.auto_record()and provide the following details:

  1. name: PyTorch model name.
  2. notes: Notes for future reference. (optional)
  3. project_id: Project ID of the Project you will be working on.
  4. model_class: Define the Markov model class, such as the Classification model.

Sample Code

import markov
import pytorch_lightning

MODEL_NAME = "My Test PL Model"

markov.pytorchlightning.auto_record(
    name=MODEL_NAME,
    notes="Testing PL Auto Record with MarkovML",
    project_id="some_project_id",
    model_class=markov.ModelClass.CLASSIFICATION
)

# Continue creating Pytorch lightning model and training

What’s Next