Skip to content

fix: handle mixed batches with missing saved modules - #4000

Closed
rushikeshraghatate90 wants to merge 1 commit into
huggingface:mainfrom
rushikeshraghatate90:fix/mixed-adapter-modules-to-save
Closed

rushikeshraghatate90 wants to merge 1 commit into
huggingface:mainfrom
rushikeshraghatate90:fix/mixed-adapter-modules-to-save

Conversation

@rushikeshraghatate90

Copy link
Copy Markdown

Summary

  • Fix mixed adapter batch forwarding when an adapter does not have modules_to_save for a wrapped module.
  • Fall back to the original module when the active adapter is not registered with the auxiliary training wrapper.
  • Add a regression test covering mixed batches containing two adapters and base-model inputs.

Testing

  • python -m pytest tests/test_custom_models.py -k missing_modules_to_save -vv --no-cov — passed.
  • python -m pytest tests/test_custom_models.py -k TestMixedAdapterBatches -q --no-cov — 35 passed, 2 skipped.
  • The full test file was interrupted before completion.

Copilot AI balanced review requested due to automatic review settings October 17, 2026 04:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@rushikeshraghatate90

Copy link
Copy Markdown
Author

Closing this PR to avoid duplicating the original contributor's work. Apologies for the oversight, and thanks for the clarification. I'll leave the issue to the original contributor to submit their fix following maintainer approval.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants