Skip to content

fix: allow nested model dump via docvec #1808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 28, 2023
Merged

fix: allow nested model dump via docvec #1808

merged 3 commits into from
Sep 28, 2023

Conversation

samsja
Copy link
Member

@samsja samsja commented Sep 28, 2023

Context

DocVec nested document could not serialize correctly using model_dump from pydantic v2.

This pr fix it by recursively deep copying the document whereas before it was just done at level 1

@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (26d776d) 84.26% compared to head (f18ee76) 84.56%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1808      +/-   ##
==========================================
+ Coverage   84.26%   84.56%   +0.30%     
==========================================
  Files         135      135              
  Lines        8971     8979       +8     
==========================================
+ Hits         7559     7593      +34     
+ Misses       1412     1386      -26     
Flag Coverage Δ
docarray 84.56% <100.00%> (+0.30%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
docarray/base_doc/doc.py 92.18% <100.00%> (+0.26%) ⬆️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link

📝 Docs are deployed on https://ft-fix-nested-model-dump--jina-docs.netlify.app 🎉

@JoanFM JoanFM marked this pull request as ready for review September 28, 2023 15:32
@JoanFM JoanFM merged commit 4a1bc26 into main Sep 28, 2023
@JoanFM JoanFM deleted the fix-nested-model-dump branch September 28, 2023 15:32
@JoanFM JoanFM mentioned this pull request Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pydantic v2] csv and pandas reader DocList with Nested Documents is not working
2 participants