mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-01-08 04:56:45 +00:00
Bugfix - save_to_yaml for OpenSearchDocumentStore (#2017)
* fix save_to_yaml * add link to issue * added generic implementation * added type * remove not used imports
This commit is contained in:
parent
ea10d011ab
commit
6267476015
@ -717,7 +717,12 @@ class Pipeline(BasePipeline):
|
||||
component_type = component_instance.pipeline_config["type"]
|
||||
component_params = component_instance.pipeline_config["params"]
|
||||
components[node] = {"name": node, "type": component_type, "params": {}}
|
||||
component_signature = inspect.signature(type(component_instance)).parameters
|
||||
|
||||
component_parent_classes = inspect.getmro(type(component_instance))
|
||||
component_signature: dict = {}
|
||||
for component_parent in component_parent_classes:
|
||||
component_signature = {**component_signature, **inspect.signature(component_parent).parameters}
|
||||
|
||||
for key, value in component_params.items():
|
||||
# A parameter for a Component could be another Component. For instance, a Retriever has
|
||||
# the DocumentStore as a parameter.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user