SMTorg / smt

Surrogate Modeling Toolbox
https://smt.readthedocs.io/en/stable
BSD 3-Clause "New" or "Revised" License
690 stars 210 forks source link

ConfigSpace vs Numpy 2.0 compatibility #588

Open relf opened 5 months ago

relf commented 5 months ago

numpy 2.0 is now pulled by default in CI tests but there is a compatibility issue with ConfigSpace.

...
smt/utils/kriging.py:15: in <module>
    from smt.utils.design_space import CategoricalVariable
smt/utils/design_space.py:14: in <module>
    from ConfigSpace import (
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/ConfigSpace/__init__.py:32: in <module>
    from ConfigSpace.api import (Beta, Categorical, Distribution, Float, Integer,
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/ConfigSpace/api/__init__.py:2: in <module>
    import ConfigSpace.api.types as types
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/ConfigSpace/api/types/__init__.py:1: in <module>
    from ConfigSpace.api.types.categorical import Categorical
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/ConfigSpace/api/types/categorical.py:8: in <module>
    from ConfigSpace.hyperparameters import (CategoricalHyperparameter,
ConfigSpace/hyperparameters.pyx:1: in init ConfigSpace.hyperparameters
    ???
E   ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
relf commented 5 months ago

As for Python 3.12 compatibility (see #575), the numpy 2.0 compatibility relies on the ConfigSpace PR #346