Skip to content

[Feature]: Improve Test Coverage for Binary Parsers (SafeTensors & PyTorch) #29

Description

@pipe1os

Problem Description

Test coverage for the local binary parsers is quite low: pytorch.py is at 21% and safetensors.py is at 45%.

Proposed Solution

  1. Review the existing tests/test_parsers.py.
  2. Construct simple, dummy binary files (using struct.pack) inside the tests to simulate valid and invalid .safetensors and .pt headers.
  3. Assert that the parsers correctly raise ValueError or successfully extract the metadata without needing to commit heavy .safetensors files to the git repository.

Alternatives Considered

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions