automl / CAVE

[deprecated] Configuration Assessment, Visualization and Evaluation
https://www.automl.org
BSD 3-Clause "New" or "Revised" License
46 stars 13 forks source link

CAVE 1.4.0 cant read BOHB results #289

Closed PhMueller closed 4 years ago

PhMueller commented 4 years ago

Hey Joshua,

I've tried to read in some BOHB results but I stumbled across multiple obstacles.

First, CAVE (1.4.0) raised the following error. image

I've remembered that you said that to read BOHB results you always need the configspace as a json. And yes I've forgotten to place the configspace.json file in the same folder. Moving it to the right place solved the error. Maybe you could add a hint in the error message above or in the documentation. :smile: (Also, I guess the file needs to be named exactly configspace.json, not config_space.json or similar. Is this correct?)

With this bug fixed, the next call raised the following error:

image

Maybe, you have a tip on how to solve this one. The necessary files for reproducing the error, as well as the cave log file are attached. Perhaps, this occurs because I am using constant hyperparameter in the configspace?

Cheers, Philipp

not_working.zip

shukon commented 4 years ago

@PhMueller Hi Philipp, good idea about the hint. But I cannot reproduce your second error. I'm getting another one, interestingly, on fanova and lpi (and an expected but annoying error on parallel coordinates, which should just skip constants altogether I guess), but initialization and everything else works fine (report attached). Can you give me your pip freeze / conda list --export output?

``` INFO:pimp.LPI:--------------------------------------------------> Found 500 valid neighbors ERROR:cave.cavefacade.CAVE:local variable 'p' referenced before assignment Traceback (most recent call last): File "/home/shuki/Repos/CAVE/cave/cavefacade.py", line 55, in wrap analyzer = f(self, *args, **kw) File "/home/shuki/Repos/CAVE/cave/cavefacade.py", line 341, in local_parameter_importance return LocalParameterImportance(self.runscontainer) File "/home/shuki/Repos/CAVE/cave/analyzer/parameter_importance/local_parameter_importance.py", line 22, in __init__ self.parameter_importance("lpi") File "/home/shuki/Repos/CAVE/cave/analyzer/parameter_importance/base_parameter_importance.py", line 60, in parameter_importance 'bokeh': components(run.pimp.evaluator.plot_bokeh(show_plot=False)) File "/home/shuki/niki/virtualenvs/cave_dev/lib/python3.6/site-packages/pimp/evaluator/local_parameter_importance.py", line 450, in plot_bokeh plots.append(Panel(child=Row(p), title=param)) UnboundLocalError: local variable 'p' referenced before assignment Traceback (most recent call last): File "/home/shuki/niki/virtualenvs/cave_dev/bin/cave", line 33, in sys.exit(load_entry_point('cave', 'console_scripts', 'cave')()) File "/home/shuki/Repos/CAVE/cave/cave_cli.py", line 295, in entry_point cave.main_cli() File "/home/shuki/Repos/CAVE/cave/cave_cli.py", line 290, in main_cli cave.analyze() File "/home/shuki/Repos/CAVE/cave/utils/timing.py", line 11, in wrap result = f(*args, **kw) File "/home/shuki/Repos/CAVE/cave/cavefacade.py", line 233, in analyze self.parameter_importance(self._get_dict(self.website, "Parameter Importance")) File "/home/shuki/Repos/CAVE/cave/cavefacade.py", line 356, in parameter_importance self.local_parameter_importance(d=d) File "/home/shuki/Repos/CAVE/cave/cavefacade.py", line 55, in wrap analyzer = f(self, *args, **kw) File "/home/shuki/Repos/CAVE/cave/cavefacade.py", line 341, in local_parameter_importance return LocalParameterImportance(self.runscontainer) File "/home/shuki/Repos/CAVE/cave/analyzer/parameter_importance/local_parameter_importance.py", line 22, in __init__ self.parameter_importance("lpi") File "/home/shuki/Repos/CAVE/cave/analyzer/parameter_importance/base_parameter_importance.py", line 60, in parameter_importance 'bokeh': components(run.pimp.evaluator.plot_bokeh(show_plot=False)) File "/home/shuki/niki/virtualenvs/cave_dev/lib/python3.6/site-packages/pimp/evaluator/local_parameter_importance.py", line 450, in plot_bokeh plots.append(Panel(child=Row(p), title=param)) UnboundLocalError: local variable 'p' referenced before assignment ```
``` INFO:fanova.visualizer.Visualizer:creating ../tmp/analysis_data/2433029771847169631/fanova/lr_batch_size.png ERROR:cave.cavefacade.CAVE:must be str, not int Traceback (most recent call last): File "/home/shuki/Repos/CAVE/cave/cavefacade.py", line 55, in wrap analyzer = f(self, *args, **kw) File "/home/shuki/Repos/CAVE/cave/cavefacade.py", line 324, in cave_fanova fanova = Fanova(self.runscontainer) File "/home/shuki/Repos/CAVE/cave/analyzer/parameter_importance/fanova.py", line 35, in __init__ self.parameter_importance("fanova") File "/home/shuki/Repos/CAVE/cave/analyzer/parameter_importance/base_parameter_importance.py", line 60, in parameter_importance 'bokeh': components(run.pimp.evaluator.plot_bokeh(show_plot=False)) File "/home/shuki/niki/virtualenvs/cave_dev/lib/python3.6/site-packages/pimp/evaluator/fanova.py", line 256, in plot_bokeh inc_indices = [labels.index(val) for val in values] File "/home/shuki/niki/virtualenvs/cave_dev/lib/python3.6/site-packages/pimp/evaluator/fanova.py", line 256, in inc_indices = [labels.index(val) for val in values] TypeError: must be str, not int Traceback (most recent call last): File "/home/shuki/niki/virtualenvs/cave_dev/bin/cave", line 33, in sys.exit(load_entry_point('cave', 'console_scripts', 'cave')()) File "/home/shuki/Repos/CAVE/cave/cave_cli.py", line 295, in entry_point cave.main_cli() File "/home/shuki/Repos/CAVE/cave/cave_cli.py", line 290, in main_cli cave.analyze() File "/home/shuki/Repos/CAVE/cave/utils/timing.py", line 11, in wrap result = f(*args, **kw) File "/home/shuki/Repos/CAVE/cave/cavefacade.py", line 233, in analyze self.parameter_importance(self._get_dict(self.website, "Parameter Importance")) File "/home/shuki/Repos/CAVE/cave/cavefacade.py", line 353, in parameter_importance self.cave_fanova(d=d) File "/home/shuki/Repos/CAVE/cave/cavefacade.py", line 55, in wrap analyzer = f(self, *args, **kw) File "/home/shuki/Repos/CAVE/cave/cavefacade.py", line 324, in cave_fanova fanova = Fanova(self.runscontainer) File "/home/shuki/Repos/CAVE/cave/analyzer/parameter_importance/fanova.py", line 35, in __init__ self.parameter_importance("fanova") File "/home/shuki/Repos/CAVE/cave/analyzer/parameter_importance/base_parameter_importance.py", line 60, in parameter_importance 'bokeh': components(run.pimp.evaluator.plot_bokeh(show_plot=False)) File "/home/shuki/niki/virtualenvs/cave_dev/lib/python3.6/site-packages/pimp/evaluator/fanova.py", line 256, in plot_bokeh inc_indices = [labels.index(val) for val in values] File "/home/shuki/niki/virtualenvs/cave_dev/lib/python3.6/site-packages/pimp/evaluator/fanova.py", line 256, in inc_indices = [labels.index(val) for val in values] TypeError: must be str, not int ```

It works for me with cave . --skip lpi fanova parallel_coordinates and results in this report report.zip

<details My pip freeze>

appdirs==1.4.3
argcomplete==1.11.1
backcall==0.2.0
bokeh==1.1.0
CacheControl==0.12.6
-e git+git@github.com:automl/CAVE.git@5c16adf8a37d291482fa9d64325699bd74b4b6bb#egg=cave
certifi==2019.11.28
chardet==3.0.4
colorama==0.4.3
ConfigSpace==0.4.13
contextlib2==0.6.0
cycler==0.10.0
Cython==0.29.20
decorator==4.4.2
distlib==0.3.0
distro==1.4.0
docutils==0.16
fanova==2.0.19
hpbandster==0.7.4
html5lib==1.0.1
idna==2.8
importlib-metadata==1.7.0
ipaddr==2.2.0
ipykernel==5.3.0
ipython==7.16.1
ipython-genutils==0.2.0
jedi==0.17.1
Jinja2==2.11.2
joblib==0.15.1
jupyter-client==6.1.5
jupyter-core==4.6.3
kiwisolver==1.2.0
lazy-import==0.2.2
lockfile==0.12.2
MarkupSafe==1.1.1
matplotlib==3.2.2
msgpack==0.6.2
netifaces==0.10.9
nose==1.3.7
numpy==1.19.0
packaging==20.3
pandas==1.0.5
parso==0.7.0
patsy==0.5.1
pep517==0.8.2
pexpect==4.8.0
pickleshare==0.7.5
Pillow==7.2.0
progress==1.5
prompt-toolkit==3.0.5
psutil==5.7.0
ptyprocess==0.6.0
Pygments==2.6.1
PyImp==1.1.2
pynisher==0.5.0
pyparsing==2.4.6
pyrfr==0.8.0
Pyro4==4.80
python-dateutil==2.8.1
pytoml==0.1.21
pytz==2020.1
PyYAML==5.3.1
pyzmq==19.0.1
requests==2.22.0
retrying==1.3.3
scikit-learn==0.23.1
scipy==1.5.0
selenium==3.141.0
serpent==1.30.2
six==1.14.0
sklearn==0.0
smac==0.12.2
sobol-seq==0.2.0
statsmodels==0.11.1
threadpoolctl==2.1.0
tornado==6.0.4
tqdm==4.47.0
traitlets==4.3.3
urllib3==1.25.8
wcwidth==0.2.5
webencodings==0.5.1
zipp==3.1.0

shukon commented 4 years ago

As an addition, the errors for fanova and lpi came from the interactive plots, so this worked for me as well: cave . --skip parallel_coordinates --pimp_interactive off (report.zip)

shukon commented 4 years ago

Oh AND a third thought, you can always force a specific file-format when the format-detection fails with the flag --file_format BOHB. But yeah, since it's supposed to work automatic, you shouldn't have to.

PhMueller commented 4 years ago

Hey,

I've exported it to a different machine and then I receive the same error, as you reported :smile: (Also not the TypeError: success_states not given).

Ah I guess I found the evildoer :smile: pyImp was installed with version 1.1.0. Upgrading it to 1.1.2 fixed the success_states not given- Error!

Output pip freeze

``` pip freeze absl-py==0.9.0 alabaster==0.7.12 AnyQt==0.0.10 argcomplete==1.11.1 astor==0.7.1 attrs==19.3.0 Babel==2.8.0 bokeh==1.1.0 Bottleneck==1.3.2 CacheControl==0.12.6 cachetools==4.0.0 cave==1.4.0 certifi==2019.11.28 cffi==1.13.2 chardet==3.0.4 commonmark==0.9.1 ConfigSpace==0.4.12 cryptography==2.9 cycler==0.10.0 Cython==0.29.15 decorator==4.4.1 docutils==0.16 et-xmlfile==1.0.1 fanova==2.0.14 gast==0.2.2 google-auth==1.11.2 google-auth-oauthlib==0.4.1 google-pasta==0.1.8 grpcio==1.27.2 h5py==2.10.0 hpbandster==0.7.4 idna==2.9 imageio==2.8.0 imagesize==1.2.0 importlib-metadata==1.5.0 jdcal==1.4.1 jeepney==0.4.3 Jinja2==2.11.1 joblib==0.14.1 json-tricks==3.15.2 Keras==2.3.1 Keras-Applications==1.0.8 Keras-Preprocessing==1.0.5 keyring==21.2.0 keyrings.alt==3.4.0 kiwisolver==1.1.0 lazy-import==0.2.2 liac-arff==2.4.0 llvmlite==0.31.0 lockfile==0.12.2 Markdown==3.2.1 MarkupSafe==1.1.1 matplotlib==3.1.3 mkl-fft==1.0.15 mkl-random==1.1.0 mkl-service==2.3.0 more-itertools==8.2.0 msgpack==1.0.0 netifaces==0.10.9 networkx==2.4 nibabel==3.0.1 nose==1.3.7 numba==0.48.0 numpy==1.18.1 oauthlib==3.1.0 olefile==0.46 openml==0.10.2 openpyxl==3.0.3 openTSNE==0.3.12 Operation-Nierenstein==0.0.1 opt-einsum==3.1.0 orange-canvas-core==0.1.11 orange-widget-base==4.5.0 Orange3==3.24.1 packaging==20.1 pandas==1.0.1 patsy==0.5.1 Pillow==7.0.0 pluggy==0.13.1 protobuf==3.11.3 psutil==5.7.0 py==1.8.1 pyasn1==0.4.8 pyasn1-modules==0.2.8 pycparser==2.19 Pygments==2.6.1 PyImp==1.1.0 pynisher==0.5.0 pynndescent==0.4.7 pyparsing==2.4.6 pyqtgraph==0.10.0 pyrfr==0.8.0 Pyro4==4.77 pytest==5.3.4 python-dateutil==2.8.1 python-louvain==0.14 pytz==2019.3 PyWavelets==1.1.1 PyYAML==5.3 requests==2.23.0 requests-oauthlib==1.3.0 rsa==4.0 scikit-image==0.16.2 scikit-learn==0.23.1 scipy==1.4.1 SecretStorage==3.1.2 selenium==3.141.0 serpent==1.30.2 serverfiles==0.3.0 six==1.14.0 sklearn==0.0 smac==0.12.2 snowballstemmer==2.0.0 sobol-seq==0.1.2 Sphinx==3.0.0 sphinx-rtd-theme==0.4.3 sphinxcontrib-applehelp==1.0.2 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==1.0.3 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.4 statsmodels==0.11.1 tensorboard==2.1.0 tensorflow==1.15.0 tensorflow-estimator==1.15.1 termcolor==1.1.0 threadpoolctl==2.1.0 torch==1.3.0 torchvision==0.4.1a0+d94043a tornado==6.0.4 tqdm==4.41.1 urllib3==1.25.8 wcwidth==0.1.8 Werkzeug==1.0.0 wrapt==1.11.2 xgboost==0.90 xlrd==1.2.0 XlsxWriter==1.2.8 xmltodict==0.12.0 zipp==3.0.0 ```

cave . --skip lpi fanova parallel_coordinates works now fine!

Thanks for your support!