Skip to content

update requirements#51

Merged
Jintao-Huang merged 1 commit intomodelscope:mainfrom
Jintao-Huang:update_requirements
Apr 23, 2026
Merged

update requirements#51
Jintao-Huang merged 1 commit intomodelscope:mainfrom
Jintao-Huang:update_requirements

Conversation

@Jintao-Huang
Copy link
Copy Markdown
Collaborator

No description provided.

@Jintao-Huang Jintao-Huang merged commit bb0dc5b into modelscope:main Apr 23, 2026
1 check passed
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 version constraints for peft and transformers in requirements.txt. The review feedback suggests adding packaging as a direct dependency since it is used in the codebase and recommends restricting the transformers version to <5.0.0 to avoid potential breaking changes in future major releases.

Comment thread requirements.txt
megatron-core>=0.12
modelscope
peft>=0.11,<0.19
peft>=0.11,<0.20
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The packaging library is imported in src/mcore_bridge/patcher.py and src/mcore_bridge/tuners/lora.py but is not listed as a direct dependency in requirements.txt. It is best practice to explicitly declare all direct dependencies to ensure environment consistency and avoid potential ImportError if transitive dependencies change.

peft>=0.11,<0.20
packaging

Comment thread requirements.txt
safetensors
tqdm
transformers>=4.33,<5.6.0
transformers>=4.33,<5.7.0
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The upper bound constraint <5.7.0 for transformers is unconventional. Since transformers is currently in the 4.x series, a major version release (5.0.0) is expected to contain breaking changes. Given that this project performs extensive monkey-patching on internal APIs, it is safer to restrict the dependency to the current major version (e.g., <5.0.0) unless compatibility with 5.x has been explicitly verified.

transformers>=4.33,<5.0.0

Jintao-Huang added a commit that referenced this pull request Apr 25, 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