You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "ev.py", line 7, in
pipeline.dumps()
File "/home/anakin87/apps/haystack/haystack/core/pipeline/base.py", line 202, in dumps
return marshaller.marshal(self.to_dict())
File "/home/anakin87/apps/haystack/haystack/marshal/yaml.py", line 13, in marshal
return yaml.dump(dict_)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/__init__.py", line 253, in dump
return dump_all([data], stream, Dumper=Dumper, **kwds)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/__init__.py", line 241, in dump_all
dumper.represent(data)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 27, in represent
node = self.represent_data(data)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 48, in represent_data
node = self.yaml_representers[data_types[0]](self, data)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 207, in represent_dict
return self.represent_mapping('tag:yaml.org,2002:map', data)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 118, in represent_mapping
node_value = self.represent_data(item_value)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 48, in represent_data
node = self.yaml_representers[data_types[0]](self, data)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 207, in represent_dict
return self.represent_mapping('tag:yaml.org,2002:map', data)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 118, in represent_mapping
node_value = self.represent_data(item_value)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 48, in represent_data
node = self.yaml_representers[data_types[0]](self, data)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 207, in represent_dict
return self.represent_mapping('tag:yaml.org,2002:map', data)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 118, in represent_mapping
node_value = self.represent_data(item_value)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 48, in represent_data
node = self.yaml_representers[data_types[0]](self, data)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 207, in represent_dict
return self.represent_mapping('tag:yaml.org,2002:map', data)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 118, in represent_mapping
node_value = self.represent_data(item_value)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 48, in represent_data
node = self.yaml_representers[data_types[0]](self, data)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 199, in represent_list
return self.represent_sequence('tag:yaml.org,2002:seq', data)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 92, in represent_sequence
node_item = self.represent_data(item)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 48, in represent_data
node = self.yaml_representers[data_types[0]](self, data)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 286, in represent_tuple
return self.represent_sequence('tag:yaml.org,2002:python/tuple', data)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 92, in represent_sequence
node_item = self.represent_data(item)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 52, in represent_data
node = self.yaml_multi_representers[data_type](self, data)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 346, in represent_object
return self.represent_sequence(tag+function_name, args)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 92, in represent_sequence
node_item = self.represent_data(item)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 52, in represent_data
node = self.yaml_multi_representers[data_type](self, data)
File "/home/anakin87/apps/haystack/.hatch/haystack-ai/lib/python3.8/site-packages/yaml/representer.py", line 331, in represent_object
if function.__name__ == '__newobj__':
AttributeError: 'str' object has no attribute '__name__'
Additional context
I encountered several problems, discussed a bit with Massi.
python types (in inputs: List[Tuple[str, Type[List]]]) are not serialized. -> this causes the error I am encountering. We can take the Multiplexer as an example to serialize types.
I'm encountering issues with serializing
LLMEvaluator
and child classes (ContextRelevanceEvaluator
,FaithfulnessEvaluator
).To Reproduce
Error message
Additional context
I encountered several problems, discussed a bit with Massi.
inputs: List[Tuple[str, Type[List]]]
) are not serialized. -> this causes the error I am encountering. We can take theMultiplexer
as an example to serialize types.timeout_config
is not serialized properly haystack-core-integrations#523 Error when serializing ElasticSearchEmbeddingRetriever from ElasticSearchDocumentStore with authentication haystack-core-integrations#694). If we want to use tuples in the__init__
parameters, we should probably better configure the default marshaller and then check that components can do proper deserialization.@component
decorator in the child classes was problematic. It probably isn't. It doesn't hurt to check.)System:
The text was updated successfully, but these errors were encountered: