Skip to content

Images, tables and artifacts ​

Log media and files alongside a training run.

Start Rundial and create an API key with the Quickstart. Keep the stack running and set RUNDIAL_API_KEY.

Log media ​

Pass an image path and a table to run.log. Replace sample.png with an image file on your machine.

python
import rundial as rd

with rd.init(workspace="default-workspace", project="default-project") as run:
    run.log({
        "sample": rd.Image("sample.png", caption="Input image"),
        "predictions": rd.Table(columns=["label", "score"], rows=[["cat", 0.9]]),
    }, step=1)

rd.Image also accepts a PIL-like image or a uint8 NumPy-like image array. Open the run's Media tab to view images and tables.

Upload and use an artifact ​

Pass a file or directory to run.log_artifact. Replace model.bin with a file on your machine.

python
import rundial as rd

with rd.init(workspace="default-workspace", project="default-project") as run:
    run.log_artifact("model.bin", name="model", type="model", aliases=["latest"])

After the upload finishes, use the artifact from another run and download its files:

python
import rundial as rd

with rd.init(workspace="default-workspace", project="default-project") as run:
    artifact = run.use_artifact("model:latest")
    artifact.download("downloaded-model")

The producing and consuming runs are linked in the artifact's lineage. Open Artifacts in the project or run to find the artifact.

Log a checkpoint ​

Call rd.checkpoint inside an active run. Replace model.bin with your saved checkpoint path.

python
import rundial as rd

with rd.init(workspace="default-workspace", project="default-project"):
    rd.checkpoint("model.bin", step=100, keep_last=5)

The checkpoint uses the latest alias. keep_last defaults to five; pass None to omit the retention policy.

Next steps ​