Runtime Configuration¶
The runtime configuration specifies storage, executors, state, logging, and resource-profile settings. Workflows refer to execution contexts defined by resource profiles.
Configuration file¶
The runtime discovers runtime.toml in the current directory or its ancestors,
then checks TKR_CONFIG, then ~/.tierkreis/runtime.toml. A file with another
name, such as tierkreis.toml, can be supplied explicitly or through
TKR_CONFIG. Python’s new_default() uses built-in defaults rather than
loading this file; use load_runtime_config() and new_from_config() to load
it.
The following tables list the supported fields. Required fields must be present when deserializing a configuration file.
Top-level fields¶
Field |
Required |
Description |
|---|---|---|
|
Yes |
Name of an entry in |
|
Yes |
Name of an entry in |
|
Yes |
Named asset storage definitions. |
|
Yes |
Named executor definitions. |
|
Yes |
Workflow state backend. |
|
No |
Logging and telemetry settings. If omitted, the built-in logging defaults are used. |
|
No |
Resource-profile selection and search paths. |
[asset_storage.<name>]¶
Field |
Required |
Description |
|---|---|---|
|
Yes |
|
|
For |
Directory used for file-backed assets. |
[executors.<name>]¶
Every executor requires type and output_storage_name. The latter names a
registered asset store for its outputs. The remaining fields depend on
type:
Type |
Additional fields |
|---|---|
|
None. |
|
|
|
|
|
|
|
|
[runtime_state]¶
Field |
Required |
Description |
|---|---|---|
|
Yes |
|
|
For |
If |
|
No |
SQLite database path or URL for persistent state. If omitted, |
[logging_config]¶
Field |
Required |
Description |
|---|---|---|
|
Yes, if the table is present |
|
|
No |
Log file path; if omitted from this table, logs go to stderr. |
|
No |
Tierkreis log filter level; defaults to |
|
No |
OTLP endpoint for runtime traces and metrics. |
|
No |
OpenTelemetry service name; defaults to |
|
No |
OpenTelemetry service namespace; defaults to |
When the entire table is omitted, the built-in defaults use
~/.tierkreis/tierkreis.log, "compact", and the
OTEL_EXPORTER_OTLP_ENDPOINT environment variable if set. If the table is
provided, set otel_endpoint explicitly to enable telemetry.
[resources]¶
Field |
Required |
Description |
|---|---|---|
|
No |
Default resource profile name; takes precedence over |
|
No |
Array of additional profile search roots. |
See Execution context and profiles for profile selection and context fields, and Tierkreis on HPC systems for HPC examples.
Asset storage¶
Every graph input and task output is an asset. Runtime state records its
AssetKey; the selected AssetStorage transfers the serialized bytes to and
from executors. Available implementations are:
Memory, for local tests and the in-memory executor;File, for subprocesses and schedulers that share a filesystem.
Configuration Example¶
Storage is named, allowing an executor to name both the store from which it loads inputs and the store to which it writes results.
default_storage_name = "file"
[asset_storage.file]
type = "File"
asset_dir = "/shared/tierkreis/assets"
Executors¶
The runtime currently supports:
Type |
Use |
|---|---|
|
Builtins in the runtime process |
|
Installed |
|
Nexus-hosted jobs |
|
QRMI execution |
|
PBS, PJSUB, or Slurm submission |
The default configuration combines a memory executor for builtins with a
subprocess executor for installed workers. A subprocess worker is normally
discovered as tkr-<namespace>-worker.
The subprocess executor launches installed worker commands in a isolated shell subprocess.
Use graph metadata and resource profiles to select a non-default executor. Profiles can also provide environment variables and resource requests, and a profile can be selected for an individual run:
run_id = await runtime.start_new_run(workflow_id, inputs, profile="gpu")
Configurations¶
Many of the executors provide custom configuration options:
For [executors.<name>.client_config] on a Nexus executor:
Field |
Required |
Description |
|---|---|---|
|
Yes |
|
|
Yes |
Nexus host name. |
|
No |
Directory containing Nexus authentication tokens; defaults to |
For [executors.<name>.config] on a Qrmi executor:
Field |
Required |
Description |
|---|---|---|
|
Yes |
Resource identifier or backend name. |
|
Yes |
One of |
|
No |
Map of QRMI settings without the resource-name prefix. If empty, QRMI reads from the process environment. |
|
No |
Status polling interval in seconds; defaults to |
For Hpc, scheduler is "pbs", "pjsub", or "slurm".
The [executors.<name>.resources] can be found here
Configuration Example¶
The default runtime already defines a subprocess executor using file-backed
assets. Override it when a deployment needs different named stores or a worker
does not install the conventional command:
default_executor_name = "subprocess"
[executors.memory]
type = "Memory"
output_storage_name = "memory"
[executors.subprocess]
type = "Subprocess"
subprocess_storage_name = "file"
output_storage_name = "file"
[executors.subprocess.worker_commands]
openssl_worker = ["/opt/workers/openssl_worker/main.sh"]
Worker inputs are copied from the executor’s configured asset storage (subprocess_storage_name) before launch,
and outputs are saved to output_storage_name when the worker finishes.
External workers can be supplied as an command invocation through executors.subprocess.worker_commands.
Each line is a worker name and an argument list, so wrappers can include fixed arguments,
for example ["uv", "run", "/opt/workers/example/main.py"].