pytorch-lightning + DAGsHub integration
This package allows you to output logs from
pytorch-lightning runs to a simple, open format used by DAGsHub.
These logs include your metrics and hyperparameters, essential information to keep a record of your experiments.
pip install dagshub
from dagshub.pytorch_lightning import DAGsHubLogger from pytorch_lightning import Trainer trainer = Trainer( logger=DAGsHubLogger(), default_save_path='lightning_logs', )
DAGsHubLogger will save the following two files:
lightning_logs/metrics.csv- A CSV file containing all the run's metrics.
lightning_logs/params.yml- A YAML file containing all the run's hyperparameters, plus an additional "status" field to indicate whether the run was successful.
See examples in:
Gives a framework for setting up your hyperparameter file as a DVC dependency of the training stage.
This means that you manually edit your params.yml file before training, then use
dvc reproto run the training stage. In theory, this is the correct workflow with DVC.
Gives a framework for setting up your hyperparameter file as a DVC output of the training stage.
This means that you can keep using
pytorch-lightningfrom the command line as usual, specifying hyperparameters as command arguments.
After training is done and you're happy with the results, you can set the results in stone and make them reproducible using