﻿# ZenML metadata targets: a metric attached to a step is not automatically an artifact field

Attach ZenML metrics and summaries to the intended step, run, artifact or model entity while keeping searchable metadata separate from materialized result payloads.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-zenml-artifact-metadata-target-entity-not-payload/
Language: en

## The dashboard value is absent from the loaded object

An evaluation step logs a score and returns a predictions table. A downstream consumer loads the table and expects the score to appear as a column because both were visible in the run view. The score was attached as metadata to a workflow entity, while the returned table had a different serialized schema.

Specify the intended owner of each value. A step metric, run annotation and artifact characteristic can describe the same computation from different perspectives without becoming interchangeable data fields for downstream consumers.

## Logging metadata has an attachment target

The [ZenML metadata guide](https://docs.zenml.io/concepts/metadata) describes metadata on steps, runs, artifacts and models, including contextual logging from within a step. Choosing the target determines where a later reader should look for that value and what relationship the attachment expresses.

For the evaluation score, preserve the population and model identity that give the number meaning. A value attached to a broad run may be ambiguous when several candidate evaluations occur inside that run and reuse the same metric name.

## Materialized payload is another contract

The [artifact guide](https://docs.zenml.io/concepts/artifacts) explains values returned from steps as artifacts and their later consumption. A consumer that needs a metric as computational input should receive a deliberately represented value or a clearly resolved metadata reference, rather than scraping a dashboard label.

Use [explicit data schemas](/journal/data-guide-frictionless-table-schema/) to define the returned table. Adding a metadata entry does not by itself change that schema, and changing the table representation does not automatically update every related annotation.

## Extraction creates summaries for inspection

The [materializer guide](https://docs.zenml.io/concepts/artifacts/materializers) includes metadata extraction alongside save and load behavior. A materializer can publish a row count or model characteristic for inspection while storing a richer object separately. These summaries help discovery but do not replace the serialized result.

For predictions, a count says little about individual example identities or missing values. [Annotation vote distributions](/journal/data-guide-annotator-votes-target-distribution/) illustrate why a compact summary can hide the underlying target structure that an evaluation needs to interpret.

## Test how the next consumer retrieves evidence

Log a recognizable metric to the intended entity and inspect it through that entity's metadata access. Then load the returned artifact independently and confirm its actual schema. These operations should match the documented downstream contract.

The final evaluation record should explain where the score lives, which artifact or population it describes and whether a consumer must read metadata or payload. Clear ownership prevents a polished run view from being mistaken for a single self-contained data object.
