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()
Release files for track-ml 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| track-ml-0.1.1.tar.gz | 12.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| track_ml-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.6 kB
Release files / track-ml-0.1.1.tar.gz
| Download URL | track-ml-0.1.1.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c7648684474fd6fc470deed50fd1836c10d0a7b6681303448f01319ea435ad8
|
|
BLAKE2b-256 checksum How to use checksums |
f02b220c19d193eed1b2fe354f6d65aa84823b27c6f35b0d4cd3d7605347beab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / track_ml-0.1.1-py3-none-any.whl
| Download URL | track_ml-0.1.1-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b39ad7c0c3bbac1c2f030bd57aca9244ed9c7516de78d87aa0a47eaddf7fe869
|
|
BLAKE2b-256 checksum How to use checksums |
f02b2d46a31e91aa3d764c886c450de7b4d6cf82b1bc2ca27ee54650ed1d0836
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|