A run starts withDocumentation Index
Fetch the complete documentation index at: https://docs.trainy.ai/llms.txt
Use this file to discover all available pages before exploring further.
pluto.init() and ends with either run.finish() (mark it complete on the server) or run.close() (release local resources without changing the run’s server-side state). This page covers the parameters for each, plus how to resume a finished run.
Starting a Run
| Parameter | Type | Description |
|---|---|---|
project | str | Project name (auto-created if it doesn’t exist). |
name | str | Human-readable run name. Pluto also auto-generates a sequential display ID like MMP-42. |
config | dict | Hyperparameters. Snapshot at init; for in-run edits use run.update_config(). |
tags | list[str] | Initial tag set. Edit later with run.add_tags() / run.remove_tags(). |
run_id | int | str | Resume an existing run by numeric ID or display ID. Used with resume=True. |
resume | bool | If True, re-open a previously finished run instead of creating a new one. |
fork_run_id | int | str | Fork from a parent run. See Run Forking. |
fork_step | int | Required with fork_run_id. Step number to fork at. |
inherit_config | bool | When forking, deep-merge the parent’s config into the child’s. Defaults to True. |
inherit_tags | bool | When forking, copy the parent’s tags. Defaults to False. |
Resuming a Finished Run
12345) and display IDs ("MMP-42") are accepted.
Ending a Run
The SDK exposes two teardown methods:| Method | Local cleanup | Marks the run on the server | Use when |
|---|---|---|---|
run.finish() | Yes | Yes — transitions to COMPLETED (or FAILED on uncaught exception) | The training loop is done and you want the run to leave the active state. |
run.close() | Yes | No — server status is unchanged | A short-lived process attached to an ongoing run and shouldn’t end it. |
run.finish() also fires automatically on interpreter shutdown via atexit. run.close() unregisters the atexit hook, so a process that calls close() won’t accidentally complete the run when it exits.
When to Use close() Instead of finish()
close() supports multi-process workflows where one process attaches to an active run and shouldn’t take it down on exit. Two common cases:
- Eval job appending to a live training run. The training loop holds the “real”
finish(). The eval process opens the same run withresume=True, writes metrics, andclose()s — leaving the run active. - Side process uploading artifacts while the main run is still producing data elsewhere.
close() is idempotent and thread-safe; subsequent finish() calls on a closed run are no-ops.