Experiment tracking module
Project description
track
Installation
Just use:
pip install track-ml
Right now this requires python 3.
Usage
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):
model.train()
loss = model.get_loss()
track.metric(iteration=epoch, loss=loss)
track.debug("epoch {} just finished with loss {}", epoch, loss)
model.save(os.path.join(track.trial_dir(), "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
matplotlib.use('Agg')
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())
plt.savefig("loss.png")
Recover saved artifacts
model.load(proj.fetch_artifact(most_recent_id[0], 'model10.ckpt'))
model.serve_predictions()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
track-ml-0.1.1.tar.gz
(12.5 kB
view details)
Built Distribution
track_ml-0.1.1-py3-none-any.whl
(15.1 kB
view details)
File details
Details for the file track-ml-0.1.1.tar.gz
.
File metadata
- Download URL: track-ml-0.1.1.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c7648684474fd6fc470deed50fd1836c10d0a7b6681303448f01319ea435ad8 |
|
MD5 | 50d1b0cd83cf4d0712977ed51118e40b |
|
BLAKE2b-256 | f02b220c19d193eed1b2fe354f6d65aa84823b27c6f35b0d4cd3d7605347beab |
File details
Details for the file track_ml-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: track_ml-0.1.1-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b39ad7c0c3bbac1c2f030bd57aca9244ed9c7516de78d87aa0a47eaddf7fe869 |
|
MD5 | d0ded1c58b401341ce2b816ac8a6913e |
|
BLAKE2b-256 | f02b2d46a31e91aa3d764c886c450de7b4d6cf82b1bc2ca27ee54650ed1d0836 |