Skip to content

[bugfix] fix set_module lora#33

Merged
Jintao-Huang merged 4 commits intomodelscope:mainfrom
Jintao-Huang:fix_set_module_lora
Apr 16, 2026
Merged

[bugfix] fix set_module lora#33
Jintao-Huang merged 4 commits intomodelscope:mainfrom
Jintao-Huang:fix_set_module_lora

Conversation

@Jintao-Huang
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown

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

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 updates the _set_module method in gpt_bridge.py to track PEFT target modules and modules to save by extracting them from the state dictionary keys. A review comment pointed out that the string splitting logic for extracting these module names is fragile and could fail if the separator is not found, suggesting a more robust implementation.

Comment thread src/mcore_bridge/bridge/gpt_bridge.py Outdated
@Jintao-Huang
Copy link
Copy Markdown
Collaborator Author

/gemini review

Copy link
Copy Markdown

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

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 updates the gpt_bridge.py file to track PEFT target modules and modules to save by parsing module names from state dictionary keys. The review feedback suggests refactoring the extraction logic to eliminate code duplication and improve maintainability.

Comment thread src/mcore_bridge/bridge/gpt_bridge.py
@Jintao-Huang Jintao-Huang merged commit eec1426 into modelscope:main Apr 16, 2026
1 check passed
Jintao-Huang added a commit that referenced this pull request Apr 18, 2026
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.

1 participant