Skip to content

fix trainer pass trust_remote_code to model#1713

Merged
tastelikefeet merged 2 commits into
masterfrom
fix/0512-2
May 12, 2026
Merged

fix trainer pass trust_remote_code to model#1713
tastelikefeet merged 2 commits into
masterfrom
fix/0512-2

Conversation

@tastelikefeet
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Contributor

@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 introduces whitelist-based plugin filtering in base_model.py and ensures the trust_remote_code flag is correctly passed from the Trainer to the model loading process. However, two significant issues were identified: the filter_plugin_in_whitelist function is imported but its implementation is missing from the PR, which will cause an ImportError. Additionally, the security check logic appears to be inverted, potentially blocking safe, whitelisted plugins when trust_remote_code is disabled.

Comment thread modelscope/models/base/base_model.py
Comment thread modelscope/models/base/base_model.py
@tastelikefeet tastelikefeet merged commit d77bc8f into master May 12, 2026
2 of 3 checks passed
@tastelikefeet tastelikefeet deleted the fix/0512-2 branch May 12, 2026 11:16
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