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

Adding and removing instances yields errors #79

Open
jeroenrook opened this issue Sep 4, 2024 · 2 comments
Open

Adding and removing instances yields errors #79

jeroenrook opened this issue Sep 4, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jeroenrook
Copy link
Collaborator

Steps to reproduce:
mkdir tempexp; cd tempexp' sparkle initialise sparkle add_instances ../Sparkle/Examples/Resources/Instances/PTN`

yields
"""
Start adding all instances in directory ../Sparkle/Examples/Resources/Instances/PTN ...
Copying files...
Copying ../Sparkle/Examples/Resources/Instances/PTN/Ptn-7824-b15.cnf to Instances/PTN...
Copying done!
Traceback (most recent call last):
File "/home/rook/.miniforge3/envs/sparkle/lib/python3.10/site-packages/sparkle/CLI/add_instances.py", line 96, in
performance_data.add_instance(str(instance_path))
File "/home/rook/.miniforge3/envs/sparkle/lib/python3.10/site-packages/sparkle/structures/performance_dataframe.py", line 253, in add_instance
emidx = pd.MultiIndex(levels, names=PerformanceDataFrame.multi_dim_names)
File "/home/rook/.miniforge3/envs/sparkle/lib/python3.10/site-packages/pandas/core/indexes/multi.py", line 340, in new
raise TypeError("Must pass both levels and codes")
TypeError: Must pass both levels and codes
"""

sparkle remove instances PTN
yields
"""
Start removing all instances in directory Instances/PTN ...
Traceback (most recent call last):
File "/home/rook/.miniforge3/envs/sparkle/lib/python3.10/site-packages/sparkle/CLI/remove_instances.py", line 53, in
feature_data.remove_instances(str(instance))
File "/home/rook/.miniforge3/envs/sparkle/lib/python3.10/site-packages/sparkle/structures/feature_dataframe.py", line 85, in remove_instances
self.dataframe.drop(instances, axis=1, inplace=True)
File "/home/rook/.miniforge3/envs/sparkle/lib/python3.10/site-packages/pandas/core/frame.py", line 5581, in drop
return super().drop(
File "/home/rook/.miniforge3/envs/sparkle/lib/python3.10/site-packages/pandas/core/generic.py", line 4788, in drop
obj = obj._drop_axis(labels, axis, level=level, errors=errors)
File "/home/rook/.miniforge3/envs/sparkle/lib/python3.10/site-packages/pandas/core/generic.py", line 4830, in _drop_axis
new_axis = axis.drop(labels, errors=errors)
File "/home/rook/.miniforge3/envs/sparkle/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 7070, in drop
raise KeyError(f"{labels[mask].tolist()} not found in axis")
KeyError: "['Instances/PTN/Ptn-7824-b03.cnf'] not found in axis"
"""

@jeroenrook jeroenrook added the bug Something isn't working label Sep 4, 2024
@jeroenrook
Copy link
Collaborator Author

jeroenrook commented Sep 4, 2024

conda list

packages in environment at /home/rook/.miniforge3/envs/sparkle:

 Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
bzip2                     1.0.8                h4bc722e_7    conda-forge
ca-certificates           2024.8.30            hbcca054_0    conda-forge
click                     8.1.7                    pypi_0    pypi
cloudpickle               3.0.0                    pypi_0    pypi
configspace               1.2.0                    pypi_0    pypi
dask                      2024.8.2                 pypi_0    pypi
dask-jobqueue             0.9.0                    pypi_0    pypi
distributed               2024.8.2                 pypi_0    pypi
emcee                     3.1.6                    pypi_0    pypi
filelock                  3.15.1                   pypi_0    pypi
fsspec                    2024.6.1                 pypi_0    pypi
importlib-metadata        8.4.0                    pypi_0    pypi
jinja2                    3.1.4                    pypi_0    pypi
joblib                    1.4.2                    pypi_0    pypi
kaleido                   0.2.1                    pypi_0    pypi
ld_impl_linux-64          2.40                 hf3520f5_7    conda-forge
liac-arff                 2.5.0                    pypi_0    pypi
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc                    14.1.0               h77fa898_1    conda-forge
libgcc-ng                 14.1.0               h69a702a_1    conda-forge
libgomp                   14.1.0               h77fa898_1    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libnuma                   2.0.18               h4ab18f5_2    conda-forge
libsqlite                 3.46.1               hadc24fc_0    conda-forge
libstdcxx                 14.1.0               hc0a3c3a_1    conda-forge
libstdcxx-ng              14.1.0               h4852527_1    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libxcrypt                 4.4.36               hd590300_1    conda-forge
libzlib                   1.3.1                h4ab18f5_1    conda-forge
locket                    1.0.0                    pypi_0    pypi
markupsafe                2.1.5                    pypi_0    pypi
more-itertools            10.4.0                   pypi_0    pypi
msgpack                   1.0.8                    pypi_0    pypi
ncurses                   6.5                  he02047a_1    conda-forge
numactl                   2.0.18               h4ab18f5_2    conda-forge
numpy                     1.26.4                   pypi_0    pypi
openssl                   3.3.2                hb9d3cd8_0    conda-forge
packaging                 24.1                     pypi_0    pypi
pandas                    2.2.2                    pypi_0    pypi
partd                     1.4.2                    pypi_0    pypi
pcre                      8.45                 h9c3ff4c_0    conda-forge
pip                       24.2               pyh8b19718_1    conda-forge
plotly                    5.23.0                   pypi_0    pypi
psutil                    6.0.0                    pypi_0    pypi
pydantic                  1.10.18                  pypi_0    pypi
pynisher                  1.0.10                   pypi_0    pypi
pyparsing                 3.1.4                    pypi_0    pypi
pyrfr                     0.9.0                    pypi_0    pypi
python                    3.10.14         hd12c33a_0_cpython    conda-forge
python-dateutil           2.9.0.post0              pypi_0    pypi
pytz                      2024.1                   pypi_0    pypi
pyyaml                    6.0.2                    pypi_0    pypi
readline                  8.2                  h8228510_1    conda-forge
regex                     2024.7.24                pypi_0    pypi
runrunner                 0.1.6.4                  pypi_0    pypi
scikit-learn              1.3.2                    pypi_0    pypi
scipy                     1.14.1                   pypi_0    pypi
setuptools                73.0.1             pyhd8ed1ab_0    conda-forge
six                       1.16.0                   pypi_0    pypi
smac                      2.2.0                    pypi_0    pypi
sortedcontainers          2.4.0                    pypi_0    pypi
sparkleai                 0.8.5                    pypi_0    pypi
swig                      4.0.2                hd3c618e_2    conda-forge
tabulate                  0.9.0                    pypi_0    pypi
tblib                     3.0.0                    pypi_0    pypi
tenacity                  9.0.0                    pypi_0    pypi
threadpoolctl             3.5.0                    pypi_0    pypi
tk                        8.6.13          noxft_h4845f30_101    conda-forge
toolz                     0.12.1                   pypi_0    pypi
tornado                   6.4.1                    pypi_0    pypi
typing-extensions         4.12.2                   pypi_0    pypi
tzdata                    2024.1                   pypi_0    pypi
urllib3                   2.2.2                    pypi_0    pypi
wheel                     0.44.0             pyhd8ed1ab_0    conda-forge
xgboost                   2.0.3                    pypi_0    pypi
xz                        5.2.6                h166bdaf_0    conda-forge
zict                      3.0.0                    pypi_0    pypi
zipp                      3.20.1                   pypi_0    pypi

@jeroenrook
Copy link
Collaborator Author

sparkle installed with: conda env create -f environment.yml on Kathleen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant