fix: #351 make serde errors more informative#806
Merged
elijahbenizzy merged 1 commit intoJun 13, 2026
Merged
Conversation
Pandas serde now raises a clear ValueError explaining the required pandas_kwargs 'path' entry instead of an opaque TypeError/KeyError; State.serialize/deserialize wrap failures with the offending field name; unknown deserializer keys now list registered keys and hint at the missing registration import. Signed-off-by: adawang <adawang12101210@gmail.com>
elijahbenizzy
approved these changes
Jun 13, 2026
elijahbenizzy
left a comment
Contributor
There was a problem hiding this comment.
This seesms reasonable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Serializing state that contains a pandas DataFrame without configuring
pandas_kwargsfailed with an opaque internal error (TypeError: serialize_pandas_df() missing 1 required positional argument: 'pandas_kwargs', orKeyError: 'path'ifpathwas missing). There was also no way to tell which state field failed. Serde failures now raise clear, actionable errors.Before:
After:
Related issue
Addresses the "make it clear if we do not have the values we need" and "type-check the values coming in" parts of #351.
Changes made
burr/integrations/serde/pandas.py:pandas_kwargsis now optional in the signature; the serializer validates it and raises an informativeValueErrorwhenpathis missing; the deserializer no longer requirespandas_kwargsat all (the parquet path is embedded in the serialized value).burr/core/state.py:State.serialize/State.deserializewrap serde failures with the offending field name (chained withfrom eso the original traceback is preserved).burr/core/serde.py: unknown deserializer keys now report the registered keys and hint that the registering module may not have been imported.tests/core/test_serde.py,tests/integrations/serde/test_pandas.py: cover the missing-kwargs, missing-path, unknown-key, and kwargs-free deserialization cases.How to test
Checklist
pytest tests/ --ignore=tests/integration_tests: 577 passed, 5 skipped)git commit -s)