SQLTrack Documentation#

SQLTrack is a set of tools to track your (machine learning) experiments. While using other tools like Sacred or mlflow tracking, we found that they limited how we could track our experiments and later what analyses we could perform. What we realized is that it is ultimately futile for library authors to guess how experiment data will be used. If it was possible for a library to cater to every single use case it would then become too bloated to use.

That is why our goal is to collect a wide variety of examples for analyses and visualizations to empower our users, instead of providing complex functionality in our package.

SQLTrack provides a basic schema for experiments, runs, and metrics that you can extend to suit your needs, along with some basic tools to set up the database and store experiment data.

Here is a minimal example for how to track an experiment:

from random import random

import sqltrack
from sqltrack.commands import setup

def main():
    client = sqltrack.Client()
    setup(client, [(
        "test",
        "ALTER TABLE metrics ADD COLUMN IF NOT EXISTS loss FLOAT;"
    )])
    experiment = sqltrack.Experiment(client, name="Random")
    run = experiment.get_run()
    with run.track():
        for epoch in range(90):
            run.add_metrics(step=epoch, loss=random())

if __name__ == "__main__":
    main()

Contents#

Indices and tables#