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
2 changes: 1 addition & 1 deletion haystack/core/pipeline/async_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ async def process_results():
prepared_data = self._prepare_component_input_data(data)

# raises ValueError if input is malformed in some way
self._validate_input(prepared_data)
self.validate_input(prepared_data)
inputs_state = self._convert_to_internal_format(prepared_data)

# For quick lookup of downstream receivers
Expand Down
2 changes: 1 addition & 1 deletion haystack/core/pipeline/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ def _create_component_span(
parent_span=parent_span,
)

def _validate_input(self, data: Dict[str, Any]) -> None:
def validate_input(self, data: Dict[str, Any]) -> None:
"""
Validates pipeline input data.

Expand Down
2 changes: 1 addition & 1 deletion haystack/core/pipeline/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def run( # noqa: PLR0915, PLR0912
data = self._prepare_component_input_data(data)

# Raise ValueError if input is malformed in some way
self._validate_input(data)
self.validate_input(data)

if include_outputs_from is None:
include_outputs_from = set()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
enhancements:
- |
Make the PipelineBase().validate_input method public so users can use it with the confidence that it won't receive breaking changes without warning.
This method is useful for checking that all required connections in a pipeline have a connection and is automatically called in the run method of Pipeline.
It is being exposed as public for users who would like to call this method before runtime to validate the pipeline.
Loading