Pytorch
When using auto_record()
for PyTorch-Lightning models, the following information is automatically captured:
- Hyper-parameters: Information provided in
trainer.optimizer.defaults
. - 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:
name
: PyTorch model name.notes
: Notes for future reference. (optional)project_id
: Project ID of the Project you will be working on.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
Updated about 2 months ago
What’s Next