An open API service indexing awesome lists of open source software.

https://github.com/vessl-ai/tvault

Quickly compare PyTorch models in a local, lightweight registry
https://github.com/vessl-ai/tvault

deep-learning machine-learning mlops pytorch

Last synced: 10 months ago
JSON representation

Quickly compare PyTorch models in a local, lightweight registry

Awesome Lists containing this project

README

          




tvault


 
 
 
 


Quickly compare PyTorch models in a local, lightweight registry

----

`tvault` is designed to help academic researchers iterate their models faster without logging overheads.

Many of the academic researchers we encounter simply want to *get going* with minimum setup and configurations. This often means using local codebase as opposed to integrating tools like [VESSL Experiments](https://docs.vessl.ai/api-reference/python-sdk/utils/vessl.log) and Weights & Biases to git-committed codes.

`tvault` is "git diff for machine learning" — a simple, lightweight framework for quickly tracking and comparing ML experiments in a local model registry.

* Track and version models locally with `tvault.log_all()`
* Get a birds-eye differences of two experiments with `tvault --diff_flag`

tvault-diff

Get started with pip install:
```
pip install tvault
```

For those who are already using [VESSL Python SDK and CLI](https://docs.vessl.ai/api-reference/what-is-the-vessl-cli-sdk),
```
pip install "vessl[tvault]"
```

Follow our guide below with our [MNIST example code](https://github.com/vessl-ai/tvault/blob/1a6b5e038ff3fd4780a186bec7a555215a5e3c31/assets/mnist-train.py).

----

## Getting started with `tvault.log()`

Insert `tvault.log()` in your code's training loop with the metrics you want to track as tags.
https://github.com/vessl-ai/tvault/blob/4bebfe48594b00597889b2696dcec532d72b33d4/assets/mnist-train.py#L145-L146

`tvault.log()` will automatically create the following:

* A folder `model_log` under your current directory - a tracking dashboard or model registry for your code
* A unique hash for the model and model ID for each training run with the key metrics

tvault-model

## Look up experiments with `tvault --find_flag`

`tvault`'s `find_flag` option allows you to look up different experiments with a simple CLI command. `find_flag` offers three different ways of exploring results:

1. Search by hash — The command below shows all experiments with the hash value of `2ba4adf`.
```
tvault --find_flag --condition hash --hash 2ba4adf
```
tvault-diff-hash

2. Search by result — The command below shows all experiments with the result between `50` and `100`.
```
tvault --find_flag --condition result --min 90 --max 100
```
tvault-diff-result

3. Search by tags — The command below shows all experiments tagged as `0.5x`.
```
tvault --find_flag --condition tag --tag_type size --tag 0.5x
```
tvault-diff-tag

## Compare models with `tvault --diff_flag`

`tvault`'s `diff_flag` option allows you to look up the difference of two models by specifying the model hash and index. `tvault` automatically detects and displays the changes in functions while removing git diffs that are not related to the model.

This is useful when you have a baseline model that you want to iterate with different hyperparameters and higher-level architectures without digging through your code line-by-line. `tvault` can also get the diff related to the optimizers.
```
tvault --diff_flag --sha1 f407ed0 --index1 0 --sha2 737b47a --index2 0
```
tvault-diff

## Issues, feature requests, and questions

We are excited to hear your feedback!
* For issues and feature requests, please open a GitHub issue.
* For questions, please use GitHub Discussions.
* For general discussions, join our community Slack.

## VESSL for Academics

vessl-for-academics

Our free academic plan is dedicated to help graduate students set up a modern ML research workflow with zero maintenance overheads. [Learn more](https://vesslai.notion.site/VESSL-for-Academics-fa47bf5e69b44e92b5daaead758cb057) about VESSL's full-fledged, fully-managed job scheduler and experiment tracking.