Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md
__init__.py
logger.py
utils.py

README.md

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.

Usage

pip install dagshub
from dagshub.pytorch_lightning import DAGsHubLogger
from pytorch_lightning import Trainer

trainer = Trainer(
    logger=DAGsHubLogger(),
    default_save_path='lightning_logs',
)

By default, 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.

Examples

See examples in:

  • examples/hyperparams-as-dependency
    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 repro to run the training stage. In theory, this is the correct workflow with DVC.

  • examples/hyperparams-as-output
    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-lightning from 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 dvc commit.


Made with 🐶 by DAGsHub.

You can’t perform that action at this time.