Repository navigation
fix(deps): regenerate bias-detection requirements for Python 3.14 - #6261
Conversation
The Python 3.13.13 -> 3.14.7 CI bump (83fa697) broke resolution of apps/web/src/lib/ai/bias-detection/requirements.txt: tensorflow==2.21.0rc0 has no cp314 wheels, so "Install Python dependencies" fails on every PR touching the bias-detection path. - tensorflow 2.21.0rc0 -> 2.22.0rc0 (only release with cp314 wheels) - h5py 3.14.0 -> 3.15.1 (required by TF 2.22.0rc0 wheel metadata) - add keras-nightly==3.15.0.dev2026040704 (required by TF RC; pinned to the April 2026 era build matching keras 3.15.0, not a bleeding daily) - fairlearn 0.13.0 -> 0.14.0 (0.13 caps scipy <1.16, which has no cp314) - scipy 1.15.3 -> 1.17.1 (first stable scipy with cp314 wheels) - torch 2.13.0 CUDA family (cuda-toolkit, nvidia-*-13) added per current Linux wheel metadata - regenerated the self-bootstrap file with `uv pip compile requirements.txt -o requirements.txt --python-version 3.14` Verified in a clean environment: full CI-equivalent install succeeds on CPython 3.14.8, imports OK (tensorflow 2.22.0-rc0, keras 3.15.0.dev, h5py 3.15.1, scipy 1.17.1, fairlearn 0.14.0), and the exact CI test command passes: 22/22 tests, coverage 39.95% (threshold 25%). Co-Authored-By: Claude Code <noreply@anthropic.com>
|
Sorry @daggerstuff, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 3 days and 7 hours by commenting |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
px Advisor ReviewRisk: unknown No summary available No findings. |
Lighthouse CI ResultsRoutes audited: Thresholds: Performance ≥90 | Accessibility ≥90 | Best Practices ≥85 Reports
|
| # -r requirements.txt | ||
| # ipywidgets | ||
| keras==3.15.0 | ||
| # via -r requirements.txt |
There was a problem hiding this comment.
Bug: The requirements.txt file lists both keras and keras-nightly. These packages conflict by installing to the same namespace, creating a fragile dependency resolution.
Severity: MEDIUM
Suggested Fix
Remove the explicit keras==3.15.0 dependency from requirements.txt. The correct version, keras-nightly, is already included as a transitive dependency of tensorflow, which is the intended package. This ensures the correct version is always installed.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: apps/web/src/lib/ai/bias-detection/requirements.txt#L347
Potential issue: The `requirements.txt` file specifies both `keras==3.15.0` and
`keras-nightly==3.15.0.dev2026040704`. Both packages install to the same `keras/` module
directory, causing one to overwrite the other. Since `tensorflow` is used in the
application and requires the nightly version, the application's behavior becomes
dependent on the non-deterministic installation order of the package manager. If the
stable `keras` package is installed last, it will overwrite the required `keras-nightly`
and cause runtime failures when TensorFlow's internal Keras APIs are called.
Also affects:
apps/web/src/lib/ai/bias-detection/requirements.txt:333~333
Did we get this right? 👍 / 👎 to inform future reviews.
Summary
apps/web/src/lib/ai/bias-detection/requirements.txtfor Python 3.14 (CI runs CPython 3.14.7 since 83fa697)tensorflow==2.21.0rc0has no cp314 wheels, soInstall Python dependenciescould never resolveTest plan
uv pip install -r requirements.txtwith numpy/pandas binary constraints)uv run python -m pytest tests/test_bias_detection_service.py --cov=... --cov-fail-under=25→ 22/22 passed, coverage 39.95%🤖 Generated with Claude Code