feat: Make PipelineBase().validate_input public (#9520)

* Make validate_input public

* Add reno
This commit is contained in:
Sebastian Husch Lee 2025-06-16 11:58:28 +02:00 committed by GitHub
parent c5027d711c
commit ba6f5eeb9a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 9 additions and 3 deletions

View File

@ -198,7 +198,7 @@ class AsyncPipeline(PipelineBase):
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

View File

@ -899,7 +899,7 @@ class PipelineBase:
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.

View File

@ -172,7 +172,7 @@ class Pipeline(PipelineBase):
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()

View File

@ -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.