Skip to content

[DoRA] Add serialization and integration tests for DoRA - #23386

Draft
buildwithsuhana wants to merge 1 commit into
keras-team:masterfrom
buildwithsuhana:dora-integration
Draft

[DoRA] Add serialization and integration tests for DoRA#23386
buildwithsuhana wants to merge 1 commit into
keras-team:masterfrom
buildwithsuhana:dora-integration

Conversation

@buildwithsuhana

Copy link
Copy Markdown
Collaborator

Description

Ensures that DoRA-enabled layers are fully integrated into the Keras ecosystem, focusing on model persistence.

  • Adds tests to saving_lib_test.py verifying that dora_magnitude, dora_kernel_a, and dora_kernel_b are correctly saved and loaded.
  • Confirms that get_config/from_config correctly preserves DoRA state.
  • Ensures compatibility with both high-level model.save() and low-level weight loading.

Contributor Agreement

Please review our AI-Assisted Contribution Policy and check all boxes below before submitting your PR for review:

  • I am a human, and not a bot.
  • I will be responsible for responding to review comments in a timely manner.
  • I will work with the maintainers to push this PR forward until submission.

Note: Failing to adhere to this agreement may result in your future PRs no longer being reviewed.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a new unit test test_h5_io_store_dora to verify saving and loading DoRA weights using H5IOStore. However, the test calls enable_dora and accesses DoRA-related attributes on the Dense layer, which are not currently implemented and will cause an AttributeError. Additionally, the H5IOStore opened in read mode is not closed, which could lead to an unreleased file handle.

Comment thread keras/src/saving/saving_lib_test.py
Comment thread keras/src/saving/saving_lib_test.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants