Sandbox — LSD is in active testing. All systems operational·payments are test-mode (no real charges).
Overview Use Cases News Docs Tool Store Support Community Get LSD
All docs
Docs/ API Reference/ Context/ set_output
Context· method

StepContext.set_output

record a read-only graph-scalar output on the node card

Python
set_output(name: str, value: Any) -> None

Parameters#

name type default description
name str the graph_outputs param name to set
value Any the scalar value to record on the node card

Example#

Python
@tool.shape(graph_outputs=["n_rows"])
def keep_top(t: Table, ctx: StepContext) -> Table:
    out = t.filter(t["score"] > 10)
    ctx.set_output("n_rows", len(out))
    return out

Notes#

The name must be a param declared via @tool.<kind>(graph_outputs=…). These are output=True params — excluded from the cache key and emitted in STEP_FINISHED — so setting them never affects resume caching.

See also#

API: progress · emit · StepContext

Guides: Parameters vs ports

By LSD Team · Last updated Jul 17, 2026 Ask on Discord View as Markdown