mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-01-07 12:37:27 +00:00
feat: Make PipelineBase().validate_input public (#9520)
* Make validate_input public * Add reno
This commit is contained in:
parent
c5027d711c
commit
ba6f5eeb9a
@ -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
|
||||
|
||||
@ -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.
|
||||
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -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…
x
Reference in New Issue
Block a user