yukinarit / pyserde

Yet another serialization library on top of dataclasses, inspired by serde-rs.
https://yukinarit.github.io/pyserde/guide/en
MIT License
711 stars 40 forks source link

initial working jaxtyping serializing/deserializing #576

Closed pablovela5620 closed 1 month ago

pablovela5620 commented 1 month ago

Jaxtyping serialization/deserializing working along with type checking with beartype #572 . This allows one to use jaxtyping when serializing/deserializing and check both the dtype and the shape. Let me know if this direction makes sense!

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 80.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 90.86%. Comparing base (f882338) to head (2a012c1). Report is 29 commits behind head on main.

Files Patch % Lines
serde/numpy.py 73.33% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #576 +/- ## ========================================== - Coverage 91.04% 90.86% -0.18% ========================================== Files 13 13 Lines 1942 1971 +29 Branches 437 440 +3 ========================================== + Hits 1768 1791 +23 - Misses 117 122 +5 - Partials 57 58 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

pablovela5620 commented 1 month ago

Hi @yukinarit,

I've implemented initial support for jaxtyping serialization/deserialization and all tests are passing. Before I proceed with adding specific tests for jaxtyping, could you please review the current implementation and let me know if you're happy with the direction? Any feedback would be greatly appreciated!

pablovela5620 commented 1 month ago

Made jaxtyping an optional dep and addressed your typ comment!

pablovela5620 commented 1 month ago

Added tests in! Let me know if there's anything else you'd like me to add/fix @yukinarit @kmsquire, otherwise I also think this is probably good to merge

yukinarit commented 1 month ago

@pablovela5620 Is there anything you want to add before publishing v0.20.0?

pablovela5620 commented 1 month ago

Nope, this looks good! Thanks