https://github.com/bigbuildbench/iterative_dvclive

https://github.com/bigbuildbench/iterative_dvclive

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: BigBuildBench
  • License: apache-2.0
  • Language: Python
  • Default Branch: master
  • Size: 1.92 MB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 2
  • Releases: 0
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme Contributing License Code of conduct

README.md

DVCLive

PyPI Status Python Version License

Tests Codecov pre-commit Black

DVCLive is a Python library for logging machine learning metrics and other metadata in simple file formats, which is fully compatible with DVC.

Documentation


Quickstart

| Python API Overview | PyTorch Lightning | Scikit-learn | Ultralytics YOLO v8 | |--------|--------|--------|--------| | | | | |

Install dvclive

console $ pip install dvclive

Initialize DVC Repository

console $ git init $ dvc init $ git commit -m "DVC init"

Example code

Copy the snippet below into train.py for a basic API usage example:

```python import time import random

from dvclive import Live

params = {"learning_rate": 0.002, "optimizer": "Adam", "epochs": 20}

with Live() as live:

# log a parameters
for param in params:
    live.log_param(param, params[param])

# simulate training
offset = random.uniform(0.2, 0.1)
for epoch in range(1, params["epochs"]):
    fuzz = random.uniform(0.01, 0.1)
    accuracy = 1 - (2 ** - epoch) - fuzz - offset
    loss = (2 ** - epoch) + fuzz + offset

    # log metrics to studio
    live.log_metric("accuracy", accuracy)
    live.log_metric("loss", loss)
    live.next_step()
    time.sleep(0.2)

```

See Integrations for examples using DVCLive alongside different ML Frameworks.

Running

Run this a couple of times to simulate multiple experiments:

console $ python train.py $ python train.py $ python train.py ...

Comparing

DVCLive outputs can be rendered in different ways:

DVC CLI

You can use dvc exp show and dvc plots to compare and visualize metrics, parameters and plots across experiments:

console $ dvc exp show

───────────────────────────────────────────────────────────────────────────────────────────────────────────── Experiment Created train.accuracy train.loss val.accuracy val.loss step epochs ───────────────────────────────────────────────────────────────────────────────────────────────────────────── workspace - 6.0109 0.23311 6.062 0.24321 6 7 master 08:50 PM - - - - - - ├── 4475845 [aulic-chiv] 08:56 PM 6.0109 0.23311 6.062 0.24321 6 7 ├── 7d4cef7 [yarer-tods] 08:56 PM 4.8551 0.82012 4.5555 0.033533 4 5 └── d503f8e [curst-chad] 08:56 PM 4.9768 0.070585 4.0773 0.46639 4 5 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────

console $ dvc plots diff $(dvc exp list --names-only) --open

dvc plots diff

DVC Extension for VS Code

Inside the DVC Extension for VS Code, you can compare and visualize results using the Experiments and Plots views:

VSCode Experiments

VSCode Plots

While experiments are running, live updates will be displayed in both views.

DVC Studio

If you push the results to DVC Studio, you can compare experiments against the entire repo history:

Studio Compare

You can enable Studio Live Experiments to see live updates while experiments are running.


Comparison to related technologies

DVCLive is an ML Logger, similar to:

The main differences with those ML Loggers are:

  • DVCLive does not require any additional services or servers to run.
  • DVCLive metrics, parameters, and plots are stored as plain text files that can be versioned by tools like Git or tracked as pointers to files in DVC storage.
  • DVCLive can save experiments or runs as hidden Git commits.

You can then use different options to visualize the metrics, parameters, and plots across experiments.


Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the Apache 2.0 license, dvclive is free and open source software.

Owner

  • Name: BigBuildBench
  • Login: BigBuildBench
  • Kind: organization

abbr. B3, benchmarking the repo-level understanding capability of your LLMs by reconstructing project build-file.

GitHub Events

Total
  • Delete event: 5
  • Issue comment event: 13
  • Pull request event: 14
  • Create event: 14
Last Year
  • Delete event: 5
  • Issue comment event: 13
  • Pull request event: 14
  • Create event: 14

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 0
  • Total pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: 28 days
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 1.5
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 0
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: 28 days
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 1.5
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
  • dependabot[bot] (1)
Pull Request Authors
  • dependabot[bot] (7)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/release.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/tests.yml actions
  • actions/cache v4 composite
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • codecov/codecov-action v4.5.0 composite
.github/workflows/update-template.yaml actions
  • actions/checkout v4 composite
  • iterative/py-template main composite
pyproject.toml pypi