Look into `PydanticSerializationUnexpectedValue`
- Dominant language
- Python
- Stars
- 2
- Forks
- 1
- Avg merge
- 9d 23h
- Merged PRs (30d)
- 1
Description
When running CIViC Transformer in MetaKB (see [PR](https://github.com/cancervariants/metakb/pull/523)), I was getting a ton of `PydanticSerializationUnexpectedValue` warnings, specifically for `Statement.model_dump`.
Example warnings:
```
metakb/server/.venv/lib/python3.12/site-packages/pydantic/main.py:463: UserWarning: Pydantic serializer warnings:
PydanticSerializationUnexpectedValue(Expected `ExperimentalVariantFunctionalImpactProposition` - serialized value may not be as expected [input_value=VariantTherapeuticRespons...elation='exactMatch')])), input_type=VariantTherapeuticResponseProposition])
PydanticSerializationUnexpectedValue(Expected `VariantDiagnosticProposition` - serialized value may not be as expected [input_value=VariantTherapeuticRespons...elation='exactMatch')])), input_type=VariantTherapeuticResponseProposition])
PydanticSerializationUnexpectedValue(Expected `VariantOncogenicityProposition` - serialized value may not be as expected [input_value=VariantTherapeuticRespons...elation='exactMatch')])), input_type=VariantTherapeuticResponseProposition])
PydanticSerializationUnexpectedValue(Expected `VariantPathogenicityProposition` - serialized value may not be as expected [input_value=VariantTherapeuticRespons...elation='exactMatch')])), input_type=VariantTherapeuticResponseProposition])
PydanticSerializationUnexpectedValue(Expected `VariantPrognosticProposition` - serialized value may not be as expected [input_value=VariantTherapeuticRespons...elation='exactMatch')])), input_type=VariantTherapeuticResponseProposition])
PydanticSerializationUnexpectedValue(PydanticSerializationUnexpectedValue: Unexpected Value
PydanticSerializationUnexpectedValue: Expected `CategoricalVariant` - serialized value may not be as expected [input_value=ProteinSequenceConsequenc...lation='relatedMatch')]), input_type=ProteinSequenceConsequence]
PydanticSerializationUnexpectedValue: Unexpected Value)
PydanticSerializationUnexpectedValue(Unexpected Value)
PydanticSerializationUnexpectedValue(Unexpected Value)
PydanticSerializationUnexpectedValue(Unexpected Value)
PydanticSerializationUnexpectedValue(Unexpected Value)
```
We should see if we're able to resolve these? Might need a custom serializer.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.