remove dependency upper bounds for numpy and matplotlib - #3499
Conversation
c226368 to
71cc3bc
Compare
C-Achard
left a comment
There was a problem hiding this comment.
Let's keep pandas pinned for now, matplotlib is definitely fine.
numpy is inherently more risky but I also agree that we should unpin.
|
@deruyter92 Some additional findings numpy lower bound and pickleOnce the We may want
|
| extra | tensorflow | its own numpy specifier | needs a DLC cap? |
|---|---|---|---|
tf-cu11 |
==2.14 |
numpy>=1.23.5 — no upper bound |
yes, the compile failure |
tf-cu12 |
==2.18 |
numpy<2.1.0,>=1.26.0 |
no — supports numpy 2.0 already |
tf |
2.12–2.17 |
2.15.1 <2.0.0,>=1.23.5; 2.16.1/2.17 <2.0.0 |
no |
apple_mchips |
2.12–2.17 |
same as above | no |
CI changes
Every full-suite job installs the [tf] extra so after merge, CI resolves numpy 1 everywhere. We may have to add more jobs.
The downloaded fixtures (tests/data/{dets,montblanc_*,trimouse_*}.pickle, montblanc_tracks.h5) were written under numpy 1 and are readable by numpy 2, so they work.
Removing both caps together is required
matplotlib 3.8.4 declares only numpy>=1.21, with no upper bound. So dropping numpy<2 while leaving matplotlib<3.9 would try to resolve matplotlib 3.8.4 + np2. Same risk for any compiled transitive dep that declares no numpy cap (pycocotools, tables, h5py, scikit-image), so an import smoke test under numpy 2 may be worth it.
numba
numba 0.54 requires numpy<1.21, which no DLC-supported numpy version satisfies. Per numba's support matrix, 0.60.0 is the first release supporting numpy 2.0 and the latest (0.67) supports 2.0 <= numpy < 2.6.
Should still play nice with TF opt deps I think.
TF specific (low priority)
np.lib.pad is still used at visualize.py:93 and vis_dataset.py:70. Unlikely to be a problem as we're not migrating TF to np2.
@C-Achard agreed, just arrived at the same conclusion |
Edit: TF defines an upper bound themselves, which means that installing the |
|
Let's keep an eye on the canary lane CI. Errors should surface here (softly). |
|
Fixed numba + errors surfaced by the canary lane in #3508 |
|
We should really decide whether this gets included now or later; I would include #3508 in 3.0.2 anyway but I think either:
but I don't think merging this as is right now is advisable. Missing:
|
|
Note: fmpose3d also still pins numpy. See AdaptiveMotorControlLab/FMPose3D#36 |
4ec23a6 to
9dc8f52
Compare
Agreed. I would say we ship 3.0.2 ASAP in any case. If these PRs are fully resolved before the review + release is finished, we can include it. Otherwise we will ship in the next release. Review comments below. @C-Achard agreed? Shall I address these myself? |
Add the missing comma between the `matplotlib` and `numpy-1` matrix entries in `.github/workflows/intelligent-testing.yml` so the GitHub Actions matrix parses correctly.
Broaden the intelligent-testing workflow to include strict dependency-resolution checks for Python 3.10 and 3.12, plus NumPy 1/2 and Matplotlib upgrade variants. This improves compatibility coverage and validates resolver behavior beyond the previous narrower matrix.
Restore exclusion of matplotlib 3.7 and 3.7.1 from the base dependencies, and drop the redundant numpy cap from the `tf-cu12` extra because TensorFlow 2.18 already declares the required numpy range.
9648bb1 to
f010715
Compare
numpy and matplotlib had upper bounds because we used legacy patterns that are now deprecated. These are addressed in the PRs below, allowing us to remove the upper bounds. This allows for broader compatibility.