deepset-ai/haystack · error · PipelineInvalidPipelineSnapshotError
Invalid pipeline snapshot: components {invalid_input_data} i
Error message
Invalid pipeline snapshot: components {invalid_input_data} in 'input_data' are not part of the current pipeline. What it means
_validate_pipeline_snapshot_against_pipeline raises PipelineInvalidPipelineSnapshotError when keys of the snapshot's original_input_data (serialized_data) reference components that do not exist in the current pipeline. The input data must be addressed to components of the pipeline being resumed.
Source
Thrown at haystack/core/pipeline/breakpoint.py:80
:param pipeline_snapshot: The saved state to validate.
"""
pipeline_state = pipeline_snapshot.pipeline_state
valid_components = set(graph.nodes.keys())
# Check if the ordered_component_names are valid components in the pipeline
invalid_ordered_components = set(pipeline_snapshot.ordered_component_names) - valid_components
if invalid_ordered_components:
raise PipelineInvalidPipelineSnapshotError(
f"Invalid pipeline snapshot: components {invalid_ordered_components} in 'ordered_component_names' "
f"are not part of the current pipeline."
)
# Check if the original_input_data is valid components in the pipeline
serialized_input_data = pipeline_snapshot.original_input_data["serialized_data"]
invalid_input_data = set(serialized_input_data.keys()) - valid_components
if invalid_input_data:
raise PipelineInvalidPipelineSnapshotError(
f"Invalid pipeline snapshot: components {invalid_input_data} in 'input_data' "
f"are not part of the current pipeline."
)
# Validate 'component_visits'
invalid_component_visits = set(pipeline_state.component_visits.keys()) - valid_components
if invalid_component_visits:
raise PipelineInvalidPipelineSnapshotError(
f"Invalid pipeline snapshot: components {invalid_component_visits} in 'component_visits' "
f"are not part of the current pipeline."
)
component_name = pipeline_snapshot.break_point.component_name
visit_count = pipeline_snapshot.pipeline_state.component_visits[component_name]
logger.info(
"Resuming pipeline from {component} with visit count {visits}", component=component_name, visits=visit_count
)View on GitHub (pinned to e318778c9b)
Solutions
- Use a snapshot whose original_input_data keys match the current pipeline's components; regenerate it from the current pipeline.
- Remove or rename the stale component keys in original_input_data['serialized_data'].
- Pre-check in code: set(snapshot.original_input_data['serialized_data']) <= set(pipeline.graph.nodes).
Example fix
// before
snapshot.original_input_data["serialized_data"] = {"old_retriever": {...}}
// after
snapshot.original_input_data["serialized_data"] = {"retriever": {...}} Defensive patterns
Strategy: validation
Validate before calling
invalid = set(snapshot.original_input_data["serialized_data"]) - set(pipeline.graph.nodes)
assert not invalid, f"input_data references unknown components: {invalid}" Type guard
def input_data_valid(snapshot, pipeline) -> bool:
return set(snapshot.original_input_data["serialized_data"]) <= set(pipeline.graph.nodes) Try / catch
try:
result = pipeline.run(data, pipeline_snapshot=snapshot)
except PipelineInvalidPipelineSnapshotError as e:
logger.error("Snapshot input_data invalid: %s", e) Prevention
- Never hand-edit snapshot input_data keys
- Rename keys when renaming components in saved snapshots
- Validate all snapshot sections before resuming
When it happens
Trigger: Resuming with a snapshot whose original_input_data contains component keys from another/older pipeline; hand-editing a snapshot JSON and adding or renaming component keys.
Common situations: Sharing snapshot files between different pipeline definitions; refactoring component names after capturing a state; manually constructing snapshots for tests with wrong keys.
Related errors
- Invalid pipeline snapshot: components {invalid_ordered_compo
- Invalid pipeline snapshot: components {invalid_component_vis
- Input '${input_name}' not found in component '${component_na
- Missing mandatory input '${socket_name}' for component '${co
- break_point {break_point} is not a registered component in t
AI-assisted analysis of deepset-ai/haystack@e318778c9b (2026-08-30).
Data as JSON: /api/errors/b884b95c5978323c.
Report an issue: GitHub.