Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions content/docs/guides/writing-workflows-yaml.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,19 @@ outputs:
Each artifact has an `id` (unique within the task's inputs or outputs) and a
`path`. A task counts as complete when all of its `outputs` exist on disk.

An artifact may also carry `labels`, a free-form `string: string` mapping the
runtime never reads:

```yaml
outputs:
- { kind: file, id: scored, path: batch_017.parquet, labels: { subject: batch_017, role: measurement } }
```

They exist for whatever reads the workflow afterwards, not for the run
itself: a UI grouping nodes, or a lineage query answering "everything derived
from subject X." A domain expresses its own structure through labels instead
of the runtime growing a field per domain.

The **directory containing** each output is created before the task runs, so
`path: "./out/model.pkl"` works even when `out/` does not exist yet. No task
needs a `mkdir` step of its own.
Expand Down
5 changes: 5 additions & 0 deletions content/docs/sdk/core/artifact.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ Each artifact:
unique (see [DAG planning](/sdk/core/workflow#dag-planning) and
[edges](/sdk/core/workflow#edges)).
- Has a **path** identifying its location on disk
- Carries optional **`labels`**: a `dict[str, str]` of free-form metadata
(`labels: {subject: batch_017, role: measurement}`). The runtime never
interprets them and they play no part in caching; they exist for whatever
reads the workflow afterwards, such as a UI grouping nodes or a lineage
query.
- Defines:
- How to **read** its contents back into a Python object
- How to **write** a Python object to its file representation
Expand Down
Loading