Created
August 16, 2023 18:01
-
-
Save dacbd/7d6d369c57d345926ecfca95577acd4d to your computer and use it in GitHub Desktop.
dvc-pipeline-base
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stages: | |
train: | |
cmd: python train.py | |
params: | |
- params.yaml: | |
metrics: | |
- dvclive/metrics.json: | |
cache: false | |
plots: | |
- dvclive/plots: | |
cache: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
epochs: 8 | |
sleep: 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import time | |
from dvclive import Live | |
from dvc.api import params_show | |
params = params_show() | |
time.sleep(1) | |
with Live(save_dvc_exp=True) as live: | |
time.sleep(params["sleep"]) | |
for i in range(params["epochs"]): | |
print(f"training on epoch: {i}") | |
live.log_metric("foo", i + random.random()) | |
live.log_metric("bar", params["epochs"] - (i + random.random())) | |
live.next_step() | |
time.sleep(params["sleep"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment