fix(langfuse): stop relying on haystack.utils.base_serialization helpers#3563
Conversation
Coverage report (langfuse)Click to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
haystack.utils.base_serialization helpers
| "data": { | ||
| "type": "tests.test_langfuse_connector.CustomSpanHandler", | ||
| "init_parameters": {}, | ||
| }, | ||
| "init_parameters": {}, |
There was a problem hiding this comment.
Would it be possible to keep the old serialization format working (handling this in from_dict)? Otherwise, this would break serialized pipelines
There was a problem hiding this comment.
What do you mean by the "old serialization format working"? Using the
def serialize_class_instance(obj: Any) -> dict[str, Any]:The purpose of the PR is to avoid using that.
There was a problem hiding this comment.
or wait, you mean still being able to deserialise old formats?
There was a problem hiding this comment.
I mean: if a user has a serialized Pipeline with LangfuseConnector and langfuse-haystack==5.0.2, the new from_dict method would not be able to load it.
So, to ease the transition, we could modify the from_dict method so it does not break deserialization and add a test covering this case.
anakin87
left a comment
There was a problem hiding this comment.
Thank you!
Please release 5.1.0 after merging
Related Issues
Proposed Changes:
serialize_class_instance/deserialize_class_instanceinhaystack.utils.base_serializationare being removed fromhaystack-aias dead code (see chore!: removing deadcode haystack#11905).to_dict: serializespan_handlerwithcomponent_to_dict(fromhaystack.core.serialization) instead ofserialize_class_instance.from_dict: deserializespan_handlerwithdeserialize_component_inplace(fromhaystack.utils) instead ofdeserialize_class_instanceHow did you test it?
test_langfuse_connector.pyfixtures to match the new (flatter)span_handlerserialization format.langfuseintegration.Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:.