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.