Skip to content

test: Implement Unit Tests for StateDictAdapter Class #1628

@pankaj-bind

Description

@pankaj-bind

Bug description

The StateDictAdapter class in torchtitan/protocols/state_dict_adapter.py, which is responsible for converting model state dictionaries between TorchTitan and Hugging Face formats, currently lacks unit tests. This absence of tests poses a risk of incorrect model weight conversions, which could impact model accuracy and make future code changes difficult to verify.

To reproduce:

  1. Examine the tests/unit_tests/ directory.
  2. Note the absence of a test file for torchtitan/protocols/state_dict_adapter.py.
  3. The lack of tests means the conversion logic is unverified.

If allowed, I can discuss more on it, also I can write a solution for it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions