dwavesystems / dwave-ocean-sdk

Installer for D-Wave's Ocean tools
https://docs.ocean.dwavesys.com
Apache License 2.0
401 stars 154 forks source link

Collision of libraries at HPC Forschungszentrum Jülich #290

Open AlvaroHuanay opened 6 months ago

AlvaroHuanay commented 6 months ago

Current Problem

Greetings,

We are contacting you from Forschungszentrum Jülich. Our software Stage/2024 has a problem of incompatibility with your current libraries and we cannot change it since it is from the very base of the software. These are the incompatibilities issues we have with the library dwave-ocean-sdk. I add an image because I am not able to submit tables.

tablefordwave

The rest of libraries and dependencies for dwave-ocean-sdk 6.8.0 do not prompt any collision with our HPC systems. We would really appreciate if you could help us modifying these 3 libraries in a way that use “pydantic 1.10.13” and “Cython 0.29.35” since the only incompatibility is with this. The rest works perfectly.

We use Python 3.11.3, numpy 1.25.1

Apologies for any inconvenience.

Please, do not hesitate to reach me out if more information is needed!

Kind regards.

arcondello commented 6 months ago

Hello @AlvaroHuanay ,

For dwave-samplers/Cython, how are you installing dwave-samplers? It's true that dwave-samplers uses Cython~=3.0 at build time, but pip install dwave-samplers==1.2.0 should not install or require Cython at all unless you're building from source.

randomir commented 6 months ago

Hi @AlvaroHuanay,

pydantic unfortunately introduced a major compatibility break with v2, however in the meantime they backed down a little bit, and they now fully support v1 API from within v2. It's easy as changing imports:

-from pydantic import BaseModel
+from pydantic.v1 import BaseModel

They also provide code transformation tool for easier migration from v1 to v2.

Pydantic people claim v2 offers significant improvements (it's much faster, as it's written in Rust, and the API is much cleaner), and say they'll completely drop support for v1 soon (from version policy):

Active development of V1 has already stopped, however critical bug fixes and security vulnerabilities will be fixed in V1 for one year after the release of V2 (June 30, 2024).

All this is to say that going back to v1 is not really a viable long-term option. Would you be able to use v1 from v2, at least until people convert their code for v2?