Skip to content

Modern Serialization of Custom Datatypes #444

Open

Description

@electronsandstuff

From #443, encoders/decoders are used to handle serialization of fields with datatypes like np.ndarray and torch.Tensor. This is not longer well supported in pydantic V2. I am guessing we could modernize by using @field_serializer for much of this or wrapping the array objects.

Activity

  1. self-assigned this
    on Jul 16, 2026
  2. nikitakuklev commented on Jul 16, 2026

    @nikitakuklev
    Collaborator

    I have a custom implementation of serialization + compression in apsopt (ala b64zstd:(encoded array data)), will try port over as custom serializers.

  3. roussel-ryan commented on Jul 20, 2026

    @roussel-ryan
    Collaborator

    This would be a great contribution @nikitakuklev thanks for taking this on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions