﻿# Flyte 2 ignored cache inputs: removing a parameter asserts that its value cannot change the result

Audit Flyte 2 ignored_inputs for mapped model work by distinguishing volatile reporting metadata from parameters that alter predictions, normalization or evaluation.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-flyte-two-ignored-cache-input-semantic-equivalence/
Language: en

## The tempting way to improve cache reuse

A mapped evaluator receives a model reference, a dataset shard and a report identifier. Changing the report identifier invalidates otherwise reusable element results. Excluding that metadata may be sensible. Excluding the model reference for the same reason would be a fundamentally different decision: it could reuse a score produced by another model.

The optimization question is therefore semantic. Ask which inputs can change the returned value, not which inputs change frequently. A frequently changed parameter may be central to the computation and should remain part of its identity.

## Ignored inputs are removed from the key

The [Cache API](https://www.union.ai/docs/v2/flyte/api-reference/flyte-sdk/flyte/cache/) documents ignored_inputs as parameter names excluded from key generation. It does not independently prove those inputs are irrelevant. The author of the task is responsible for whether different values may legitimately share an output.

Trace each candidate parameter into the function's computation and output. Even a flag named debug can affect returned diagnostics or file contents. Names alone are insufficient evidence that excluding a parameter preserves the intended result contract.

## Bound arguments affect mapped elements

The [caching guide](https://www.union.ai/docs/v2/flyte/user-guide/tasks/task-configuration/caching/) explains that constant bound arguments contribute to each mapped element's key unless excluded. A changing report identifier can therefore affect the whole mapped collection even when the actual shards are unchanged.

Keep the computational result separate from the report envelope where appropriate. A score artifact can be reused while a fresh reporting operation associates it with a new report identifier. This avoids pretending that a cached result was originally computed in the new reporting context.

## Preserve the relevant candidate identity

The [mapping guide](https://www.union.ai/docs/v2/flyte/user-guide/tasks/task-programming/map/) describes binding constant arguments and per-item caching. For model evaluation, the bound model identity often remains semantically relevant to every element. It should not disappear merely because it is constant within one map call.

Use an [artifact manifest](/journal/tokenizer-artifact-release-manifest/) to explain the model reference. A name such as production can move, while a resolved artifact identity describes the candidate actually scored. Excluding an unresolved moving name does not repair that ambiguity.

## Validate the equivalence claim

Change only the proposed ignored input and compare fresh results under controlled conditions. Include outputs that are not part of the main score, such as diagnostic fields or generated artifact references. The full returned contract determines whether reuse is valid.

Relate the test to [explicit schema contracts](/journal/data-guide-frictionless-table-schema/). A stable schema helps review outputs, but identical field names do not prove identical meaning after a computational input has been removed from cache identity.
