ga4gh / ga4gh/va-spec-python

Look into `PydanticSerializationUnexpectedValue`

Open
#38 1 comment 1 reaction 1 assignee Claimed by @korikuzma View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.