Skip to content

Commit

Permalink
📝 Document how to log metrics to WandB via LightningCLI (#13)
Browse files Browse the repository at this point in the history
* ➕ Add wandb

A tool for visualizing and tracking your machine learning experiments!

* 📝 Document how to log metrics to WandB via LightningCLI

Control the logging to Weights and Biases via LightningCLI, instead of setting a hardcoded default somewhere. Metrics will be uploaded to https://wandb.ai/devseed/chabud2023.

* 🔍 Add shields.io badge for Weights and Biases experiments

Custom made from https://shields.io, with icon and color from https://simpleicons.org/?q=weightsandbiases.

* 🙈 Gitignore WandB logs and checkpoints

Some checkpoint files under `chabud2023/**/checkpoints/*.ckpt` and log files under `wandb/` generated from WandB runs to untrack from git.
  • Loading branch information
weiji14 authored May 29, 2023
1 parent 612a861 commit 0f9f876
Show file tree
Hide file tree
Showing 4 changed files with 255 additions and 86 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ data/**
!data/**/
**/*.csv

# Lightning checkpoints
# Checkpoints and logs
chabud2023/
checkpoints/*.ckpt
lightning_logs/
wandb/

# Unit test / coverage reports
.pytest_cache/
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ A Machine Learning data pipeline for the
challenge at the [ECML/PKDD 2023](https://2023.ecmlpkdd.org/submissions/discovery-challenge/challenges)
conference.

[![Weights and Biases experiments](https://img.shields.io/static/v1?label=WandB&message=experiments&color=FFBE00&logo=weightsandbiases)](https://wandb.ai/devseed/chabud2023)

# Getting started

### Quickstart
Expand Down Expand Up @@ -82,9 +84,13 @@ To quickly test the model on one batch in the validation set:

python trainer.py validate --trainer.fast_dev_run=True

To train the model for a hundred epochs:
To train the model for a hundred epochs and log metrics to
[WandB](https://wandb.ai/devseed/chabud2023):

python trainer.py fit --trainer.max_epochs=100
python trainer.py fit --trainer.max_epochs=100 \
--trainer.logger=WandbLogger \
--trainer.logger.entity=devseed \
--trainer.logger.project=chabud2023

To generate the CSV file of predicted masks on the validation set for
[submission](https://huggingface.co/datasets/chabud-team/chabud-ecml-pkdd2023/blob/main/create_sample_submission.py)
Expand Down
Loading

0 comments on commit 0f9f876

Please sign in to comment.