Skip to content
New issue

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

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

Already on GitHub? # to your account

df_wbm has wrong index column name type for wandb.Table #81

Closed
pbenner opened this issue Jan 30, 2024 · 2 comments · Fixed by #82
Closed

df_wbm has wrong index column name type for wandb.Table #81

pbenner opened this issue Jan 30, 2024 · 2 comments · Fixed by #82
Labels
bug Something isn't working data Data loading and processing

Comments

@pbenner
Copy link
Collaborator

pbenner commented Jan 30, 2024

Running test_mace.py currently fails with the following error:

Relaxing: 100%|██████████| 257/257 [13:10:57<00:00, 184.66s/it]  
Traceback (most recent call last):
  File "/home/pbenner/Source/tmp/matbench-discovery-pbenner/models/mace/test_mace.py", line 168, in <module>
    table = wandb.Table(
            ^^^^^^^^^^^^
  File "/home/pbenner/.local/opt/anaconda3/envs/mace/lib/python3.11/site-packages/wandb/data_types.py", line 281, in __init__
    self._init_from_dataframe(dataframe, columns, optional, dtype)
  File "/home/pbenner/.local/opt/anaconda3/envs/mace/lib/python3.11/site-packages/wandb/data_types.py", line 334, in _init_from_dataframe
    self._assert_valid_columns(columns)
  File "/home/pbenner/.local/opt/anaconda3/envs/mace/lib/python3.11/site-packages/wandb/data_types.py", line 304, in _assert_valid_columns
    assert len(columns) == 0 or all(
           ^^^^^^^^^^^^^^^^^
AssertionError: columns argument expects list of strings or ints

dataframe=df_wbm.dropna()[[Key.dft_energy, e_pred_col, Key.formula]].reset_index()

A simple bugfix is the following:

df_wbm.index.name = str(df_wbm.index.name)

i.e. the index column name has type enum 'Key', which is not accepted by wandb.

@janosh
Copy link
Owner

janosh commented Jan 30, 2024

thanks for reporting! 👍

@janosh
Copy link
Owner

janosh commented Feb 14, 2024

fixed in #82 but forgot to close here after

@janosh janosh closed this as completed Feb 14, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working data Data loading and processing
Projects
None yet
2 participants