Quickstart
Once you've installed hectiqlab and logged in, choose the project this repository records to:
hlab init hectiq-ai/demoThis writes .hectiqlab/config.toml. Every script run from this repository now records to hectiq-ai/demo.
Track a training and save a model
import hectiqlab as hl
with hl.run("My first run", category="training", config={"lr": 1e-3, "epochs": 3}):
data = hl.datasets.get("interactions").unwrap()
hl.datasets.attach(data.id)
with hl.stage("train"):
for epoch in hl.each(range(3), "epoch"):
loss = train_one_epoch()
hl.add_metric("loss", step=epoch, value=loss)
hl.models.create("checkpoints/", name="my-model")When the block ends, the run is completed. If the block raises, it is failed, with the traceback. Ctrl-C makes it stopped.
The run also records its commit, its diff, the installed packages, the machine and the command line. You set none of it.
Find it again
hlab run list
hlab run get 42 # a run, by the number the web app showsEach run read, in Python or with --json, carries url: its page in the web app.