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

compute_struct_fingerprints.py: cannot insert material_id, already exists #30

Closed
pbenner opened this issue May 7, 2023 · 0 comments · Fixed by #31
Closed

compute_struct_fingerprints.py: cannot insert material_id, already exists #30

pbenner opened this issue May 7, 2023 · 0 comments · Fixed by #31
Labels
bug Something isn't working data Data loading and processing

Comments

@pbenner
Copy link
Collaborator

pbenner commented May 7, 2023

Seems that fetch_process_wbm_dataset.py requires me to run compute_struct_fingerprints.py first. However, I get the following error:

> python scripts/compute_struct_fingerprints.py
Traceback (most recent call last):
  File "/home/pbenner/Source/tmp/matbench-discovery/scripts/compute_struct_fingerprints.py", line 133, in <module>
    df_out.reset_index().to_json(f"{out_dir}/site-stats.json.gz")
  File "/home/pbenner/.local/opt/anaconda3/envs/crysfeat/lib/python3.10/site-packages/pandas/core/frame.py", line 6219, in reset_index
    new_obj.insert(
  File "/home/pbenner/.local/opt/anaconda3/envs/crysfeat/lib/python3.10/site-packages/pandas/core/frame.py", line 4782, in insert
    raise ValueError(f"cannot insert {column}, already exists")
ValueError: cannot insert material_id, already exists
@pbenner pbenner changed the title compute_struct_fingerprints.py: compute_struct_fingerprints.py: cannot insert material_id, already exists May 7, 2023
janosh added a commit that referenced this issue May 7, 2023
@janosh janosh added bug Something isn't working data Data loading and processing labels May 7, 2023
@janosh janosh closed this as completed in #31 May 7, 2023
janosh added a commit that referenced this issue May 7, 2023
…ready exists (#31)

* fix compute_struct_fingerprints.py: cannot insert material_id, already exists (closes #30)

* add ruff rule sets

pep8-naming
pandas-vet
flakes8-pyi
flake8-return

* add rows=2 x cols=4 version of each-scatter-models

* add rows=2 x cols=4 version of hist-clf-(pred|true)-hull-dist-models

* fix CI assert list(df_metrics) == [*models, "metric"]
E       AssertionError: assert ['MEGNet', 'C... 'Voronoi RF'] == ['MEGNet', 'C...RF', 'metric']
E         Right contains one more item: 'metric'
E         Full diff:
E         - ['MEGNet', 'CGCNN', 'Voronoi RF', 'metric']
E         ?                                 ----------
E         + ['MEGNet', 'CGCNN', 'Voronoi RF']
janosh added a commit that referenced this issue Jun 20, 2023
…ready exists (#31)

* fix compute_struct_fingerprints.py: cannot insert material_id, already exists (closes #30)

* add ruff rule sets

pep8-naming
pandas-vet
flakes8-pyi
flake8-return

* add rows=2 x cols=4 version of each-scatter-models

* add rows=2 x cols=4 version of hist-clf-(pred|true)-hull-dist-models

* fix CI assert list(df_metrics) == [*models, "metric"]
E       AssertionError: assert ['MEGNet', 'C... 'Voronoi RF'] == ['MEGNet', 'C...RF', 'metric']
E         Right contains one more item: 'metric'
E         Full diff:
E         - ['MEGNet', 'CGCNN', 'Voronoi RF', 'metric']
E         ?                                 ----------
E         + ['MEGNet', 'CGCNN', 'Voronoi RF']
janosh added a commit that referenced this issue Jun 20, 2023
…ready exists (#31)

* fix compute_struct_fingerprints.py: cannot insert material_id, already exists (closes #30)

* add ruff rule sets

pep8-naming
pandas-vet
flakes8-pyi
flake8-return

* add rows=2 x cols=4 version of each-scatter-models

* add rows=2 x cols=4 version of hist-clf-(pred|true)-hull-dist-models

* fix CI assert list(df_metrics) == [*models, "metric"]
E       AssertionError: assert ['MEGNet', 'C... 'Voronoi RF'] == ['MEGNet', 'C...RF', 'metric']
E         Right contains one more item: 'metric'
E         Full diff:
E         - ['MEGNet', 'CGCNN', 'Voronoi RF', 'metric']
E         ?                                 ----------
E         + ['MEGNet', 'CGCNN', 'Voronoi RF']
# 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