Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel
..
fe46adaa97
Initial commit
4 years ago
fe46adaa97
Initial commit
4 years ago
fe46adaa97
Initial commit
4 years ago
fe46adaa97
Initial commit
4 years ago

README.md

You have to be logged in to leave a comment. Sign In

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.

Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...