Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configspace_converter data types #2

Open
akalino opened this issue Mar 16, 2024 · 1 comment
Open

Configspace_converter data types #2

akalino opened this issue Mar 16, 2024 · 1 comment

Comments

@akalino
Copy link

akalino commented Mar 16, 2024

Hello,

I'm facing a datatype issue when running jobs from the GraSH CLI. Specifically, when reading in config files, I am given the following error:

line 42, in get_configspace
CSH.UniformFloatHyperparameter(
File "ConfigSpace/hyperparameters/uniform_float.pyx", line 62, in ConfigSpace.hyperparameters.uniform_float.UniformFloatHyperparameter.init
File "ConfigSpace/hyperparameters/uniform_float.pyx", line 124, in ConfigSpace.hyperparameters.uniform_float.UniformFloatHyperparameter.check_default
TypeError: Expected float, got numpy.float64

This comes from the LR bounds, which I have as follows in my config yaml:

parameters:

  • bounds:
    • 0.0003
    • 1.0
      log_scale: true
      name: train.optimizer_args.lr
      type: range

My environment is as described below, using two gpus for shared compute:

name: kge
channels:

  • conda-forge
    dependencies:
  • _libgcc_mutex=0.1=conda_forge
  • _openmp_mutex=4.5=2_gnu
  • bzip2=1.0.8=hd590300_5
  • ca-certificates=2024.2.2=hbcca054_0
  • ld_impl_linux-64=2.40=h41732ed_0
  • libexpat=2.6.1=h59595ed_0
  • libffi=3.4.2=h7f98852_5
  • libgcc-ng=13.2.0=h807b86a_5
  • libgomp=13.2.0=h807b86a_5
  • libnsl=2.0.1=hd590300_0
  • libsqlite=3.45.1=h2797004_0
  • libuuid=2.38.1=h0b41bf4_0
  • libxcrypt=4.4.36=hd590300_1
  • libzlib=1.2.13=hd590300_5
  • ncurses=6.4=h59595ed_2
  • openssl=3.2.1=hd590300_0
  • pip=24.0=pyhd8ed1ab_0
  • python=3.12.2=hab00c5b_0_cpython
  • readline=8.2=h8228510_1
  • setuptools=69.1.1=pyhd8ed1ab_0
  • tk=8.6.13=noxft_h4845f30_101
  • wheel=0.42.0=pyhd8ed1ab_0
  • xz=5.2.6=h166bdaf_0
  • pip:
    • argparse==1.4.0
    • asttokens==2.4.1
    • ax-platform==0.3.7
    • botorch==0.10.0
    • comm==0.2.1
    • configspace==0.7.1
    • contextlib2==21.6.0
    • decorator==5.1.1
    • execnet==2.0.2
    • executing==2.0.1
    • filelock==3.13.1
    • fsspec==2024.2.0
    • gpytorch==1.11
    • greenlet==3.0.3
    • hpbandster==0.7.4
    • igraph==0.11.4
    • iniconfig==2.0.0
    • ipython==8.22.2
    • ipywidgets==8.1.2
    • jaxtyping==0.2.28
    • jedi==0.19.1
    • jinja2==3.1.3
    • joblib==1.3.2
    • jupyterlab-widgets==3.0.10
    • linear-operator==0.5.1
    • llvmlite==0.42.0
    • markupsafe==2.1.5
    • matplotlib-inline==0.1.6
    • mock==5.1.0
    • more-itertools==10.2.0
    • mpmath==1.3.0
    • multipledispatch==1.0.0
    • mypy-extensions==1.0.0
    • netifaces==0.11.0
    • networkx==3.2.1
    • numba==0.59.0
    • numpy==1.26.4
    • nvidia-cublas-cu12==12.1.3.1
    • nvidia-cuda-cupti-cu12==12.1.105
    • nvidia-cuda-nvrtc-cu12==12.1.105
    • nvidia-cuda-runtime-cu12==12.1.105
    • nvidia-cudnn-cu12==8.9.2.26
    • nvidia-cufft-cu12==11.0.2.54
    • nvidia-curand-cu12==10.3.2.106
    • nvidia-cusolver-cu12==11.4.5.107
    • nvidia-cusparse-cu12==12.1.0.106
    • nvidia-nccl-cu12==2.19.3
    • nvidia-nvjitlink-cu12==12.4.99
    • nvidia-nvtx-cu12==12.1.105
    • opt-einsum==3.3.0
    • packaging==24.0
    • pandas==2.2.1
    • parso==0.8.3
    • path==16.10.0
    • path-py==12.5.0
    • patsy==0.5.6
    • pexpect==4.9.0
    • plotly==5.19.0
    • pluggy==1.4.0
    • prompt-toolkit==3.0.43
    • ptyprocess==0.7.0
    • pure-eval==0.2.2
    • pygments==2.17.2
    • pyparsing==3.1.2
    • pyre-extensions==0.0.30
    • pyro-api==0.1.2
    • pyro-ppl==1.9.0
    • pyro4==4.82
    • pytest==8.1.1
    • pytest-shutil==1.7.0
    • python-dateutil==2.9.0.post0
    • python-graphviz==0.20.1
    • pytz==2024.1
    • pyyaml==6.0.1
    • scikit-learn==1.4.1.post1
    • scipy==1.12.0
    • serpent==1.41
    • six==1.16.0
    • sqlalchemy==1.4.52
    • stack-data==0.6.3
    • statsmodels==0.14.1
    • sympy==1.12
    • tenacity==8.2.3
    • termcolor==2.4.0
    • texttable==1.7.0
    • threadpoolctl==3.3.0
    • torch==2.2.1
    • torchviz==0.0.2
    • tqdm==4.66.2
    • traitlets==5.14.1
    • typeguard==2.13.3
    • typing-extensions==4.10.0
    • typing-inspect==0.9.0
    • tzdata==2024.1
    • wcwidth==0.2.13
    • widgetsnbextension==4.0.10
      prefix: /home/alexander-kalinowski/miniforge3/envs/kge

Is there a quick fix I can use to get around this? I have tried to directly cast the relevant hyperparameters to floats with no luck.

@AdrianKs
Copy link
Collaborator

AdrianKs commented Apr 11, 2024

Hi,
I am sorry for the very late reply, I just saw your Issue now. I suppose the issue lies in the numpy version.
Around version 1.25 or so they changed something data type related.
I fixed the setup script so that it should install dependencies correctly now:

conda create -n grash python==3.8
conda activate grash
pip install -e .

python -m kge start examples/toy-complex-search-grash.yaml --job.device cpu

I hope this works for you.

It worked for me with the following package versions after installation:

package version
ax-platform 0.1.19
botorch 0.4.0
ConfigSpace 0.7.1
filelock 3.13.4
fsspec 2024.3.1
gpytorch 1.4.2
graphviz 0.20.3
greenlet 3.0.3
hpbandster 0.7.4
igraph 0.11.4
importlib_metadata 7.1.0
Jinja2 3.1.3
joblib 1.4.0
libkge 0.1
llvmlite 0.33.0
MarkupSafe 2.1.5
mock 5.1.0
more-itertools 10.2.0
mpmath 1.3.0
netifaces 0.11.0
networkx 3.1
numba 0.50.1
numpy 1.19.5
nvidia-cublas-cu12 12.1.3.1
nvidia-cuda-cupti-cu12 12.1.105
nvidia-cuda-nvrtc-cu12 12.1.105
nvidia-cuda-runtime-cu12 12.1.105
nvidia-cudnn-cu12 8.9.2.26
nvidia-cufft-cu12 11.0.2.54
nvidia-curand-cu12 10.3.2.106
nvidia-cusolver-cu12 11.4.5.107
nvidia-cusparse-cu12 12.1.0.106
nvidia-nccl-cu12 2.19.3
nvidia-nvjitlink-cu12 12.4.127
nvidia-nvtx-cu12 12.1.105
packaging 24.0
pandas 1.4.4
path 16.14.0
patsy 0.5.6
pip 23.3.1
plotly 5.20.0
psutil 5.9.8
py3nvml 0.2.7
pyparsing 3.1.2
Pyro4 4.82
python-dateutil 2.9.0.post0
pytz 2024.1
PyYAML 6.0.1
scikit-learn 1.3.2
scipy 1.10.1
serpent 1.41
setuptools 68.2.2
six 1.16.0
SQLAlchemy 1.4.26
statsmodels 0.14.1
sympy 1.12
tenacity 8.2.3
texttable 1.7.0
threadpoolctl 3.4.0
torch 2.2.2
torchviz 0.0.2
tqdm 4.66.2
triton 2.2.0
typeguard 4.2.1
typing_extensions 4.11.0
wheel 0.41.2
xmltodict 0.13.0
zipp 3.18.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants