Closed NeolithEra closed 1 year ago
Thank you for bringing this to our attention, @NeolithEra.
Due to existing dependency on numpy (both in Python and C/Cython code), I'm hesitant to remove the upper bound (ad 1), and/or both bounds/defer to dimod (ad 2).
Third solution is too restrictive; patch updates to dimod should be allowed.
I vote for a variation of (3): dimod>=0.7.7,<0.10.0
.
Obsoleted by move to dwave-samplers.
Hi, as shown in the following full dependency graph of dwave-neal, dwave-neal requires numpy >=1.14.0,<2.0.0, dwave-neal requires dimod >=0.7.7 (dimod 0.9.1 will be installed, i.e., the newest version satisfying the version constraint), and directed dependency dimod 0.9.1 transitively introduces numpy >=1.16.0,<2.0.0. Obviously, there are multiple version constraints set for numpy in this project. However, according to pip's “first found wins” installation strategy, numpy 1.18.4 (i.e., the newest version satisfying constraint >=1.14.0,<2.0.0) is the actually installed version. Although the first found package version numpy 1.18.4 just satisfies the later dependency constraint (numpy >=1.16.0,<2.0.0), such installed version is very close to the upper bound of the version constraint of Numpy specified by dimod 0.9.1 . Once dimod upgrades,its newest version will be installed, as dwave-neal does not specify the upper bound of version constraint for dimod. Therefore, it will easily cause a dependency conflict (build failure), if the upgraded dimod version introduces a higher version of Numpy, violating its another version constraint >=1.14.0,<2.0.0. According to the release history of dimod, it habitually upgrates Numpy in its recent releases. For instance, dimod 0.7.0 upgrated Numpy’s constraint from >=1.11.3,<2.0.0 to >=1.14.0,<2.0.0, dimod 0.8.5 upgrated Numpy’s constraint from >=1.14.0,<2.0.0 to >=1.15.0,<2.0.0, and dimod 0.9.0.dev6 upgrated Numpy’s constraint from >=1.15.0,<2.0.0 to >=1.16.0,<2.0.0. As such, it is a warm warning of a potential dependency conflict issue for dwave-neal.
Dependency tree
Thanks for your help. Best, Neolith