Skip to main content

Experiment tracking module

Project description



Just use:

pip install track-ml

Right now this requires python 3.


Report various metrics of interest, with automatically configured and persisted logging.

import track 

def training_function(param1=0.01, param2=10):
    local = "~/track/myproject"
    remote = "s3://my-track-bucket/myproject"
    with track.trial(local, remote, param_map={"param1": param1, "param2": param2}):
        model = create_model()
        for epoch in range(100):
            loss = model.get_loss()
            track.metric(iteration=epoch, loss=loss)
            track.debug("epoch {} just finished with loss {}", epoch, loss)
  , "model{}.ckpt".format(epoch)))

Inspect existing experiments

$ python -m track.trials --local_dir ~/track/myproject trial_id "start_time>2018-06-28" param2
trial_id    start_time                param2
8424fb387a 2018-06-28 11:17:28.752259 10

Plot results

import track
import matplotlib
import matplotlib.pyplot as plt

proj = track.Project("~/track/myproject", "s3://my-track-bucket/myproject")
most_recent = proj.ids["start_time"].idxmax()
most_recent_id = proj.ids["trial_id"].iloc[[most_recent]]
res = proj.results(most_recent_id)
plt.plot(res[["iteration", "loss"]].dropna())

Recover saved artifacts

model.load(proj.fetch_artifact(most_recent_id[0], 'model10.ckpt'))

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for track-ml, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size track_ml-0.1.1-py3-none-any.whl (15.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size track-ml-0.1.1.tar.gz (12.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page