chore(deps): relax numpy pin to >=1.26.4 for bfcl-eval compatibility#345
chore(deps): relax numpy pin to >=1.26.4 for bfcl-eval compatibility#345Palanivelg wants to merge 1 commit into
Conversation
|
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
There was a problem hiding this comment.
Code Review
This pull request relaxes the dependency requirement for numpy in pyproject.toml from ==2.4.4 to >=1.26.4. The reviewer recommends keeping a strict pin of ==1.26.4 instead of a relaxed constraint to prevent potential API incompatibilities and reproducibility issues caused by major breaking changes in numpy 2.0.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| # Required by transformers' apply_chat_template | ||
| "jinja2==3.1.6", | ||
| "numpy==2.4.4", | ||
| "numpy>=1.26.4", |
There was a problem hiding this comment.
Relaxing the numpy pin to >=1.26.4 allows pip to resolve to either numpy 1.x (when [bfcl] is installed) or numpy 2.x (when it is not). Because numpy 2.0 introduced significant breaking changes, running different major versions of numpy across environments can lead to subtle bugs, API incompatibilities, or non-reproducible benchmark results. To maintain strict environment reproducibility and adhere to the repository's exact-pinning policy, consider pinning numpy to 1.26.4 globally instead.
| "numpy>=1.26.4", | |
| "numpy==1.26.4", |
bfcl-eval (used in the upcoming BFCL v4 accuracy integration) hard-pins numpy==1.26.4, which is mutually exclusive with our existing top-level numpy==2.4.4 pin and causes pip's resolver to fail when installing the [bfcl] extra. Relax the top-level pin to a lower bound (>=1.26.4) so pip can satisfy both constraints. Our code paths work with numpy 1.x and 2.x; the only binding constraint comes from bfcl-eval. When [bfcl] is not installed, pip will still resolve the latest numpy. Note: this is a narrow exception to the AGENTS.md "pin exact versions" rule, driven by an external library's hard pin. If we want to enforce a single resolved version everywhere, the alternative is to pin numpy==1.26.4 (matching bfcl-eval) at the top level.
9176b4e to
35e35ec
Compare
|
Superseded by #346, which now includes this numpy relaxation (numpy>=1.26.4) directly so the BFCL-v4 integration is self-contained and passes CI on its own. Closing as redundant. |
bfcl-eval (used in the upcoming BFCL v4 accuracy integration) hard-pins numpy==1.26.4, which is mutually exclusive with our existing top-level numpy==2.4.4 pin and causes pip's resolver to fail when installing the [bfcl] extra.
Relax the top-level pin to a lower bound (>=1.26.4) so pip can satisfy both constraints. Our code paths work with numpy 1.x and 2.x; the only binding constraint comes from bfcl-eval. When [bfcl] is not installed, pip will still resolve the latest numpy.
Note: this is a narrow exception to the AGENTS.md "pin exact versions" rule, driven by an external library's hard pin. If we want to enforce a single resolved version everywhere, the alternative is to pin numpy==1.26.4 (matching bfcl-eval) at the top level.
What does this PR do?
Type of change
Related issues
Testing
Checklist