Skip to content

Downloading datasets throws KeyError #1

@laserkelvin

Description

@laserkelvin

I'm trying to test out downloading some Colab Fit datasets, and wasn't sure if things weren't completely settled just yet.

Running the following command fails with a KeyError:

colabfit query -t ABC2D6-16_PRL_2018 -d xyz

Found 1 Dataset(s) on the ColabFit Exchange!
--------------------------------------------
{'colabfit-id': 'DS_0ady7a8a8n6p_0',
 'name': 'ABC2D6-16_PRL_2018',
 'authors': ['Felix Faber',
             'Alexander Lindmaa',
             'O. Anatole von Lilienfeld',
             'Rickard Armiento'],
 'description': 'Dataset used to train a machine learning model to calculate '
                'density functional theory-quality formation energies of all '
                '~2 x 106 pristine ABC2D6 elpasolite crystals that can be made '
                'up from main-group elements (up to bismuth).',
 'links': ['https://doi.org/10.1103/PhysRevLett.117.135502',
           'https://qmml.org/datasets.html',
           'https://materials.colabfit.org/id/DS_0ady7a8a8n6p_0']}
--------------------------------------------
Downloading Datasets
--------------------
  0%|                                                                                                                                                                                        | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/data/users/kelvin/.conda/matsciml/bin/colabfit", line 8, in <module>
    sys.exit(colabfit())
  File "/nfs/home/kinlongk/.local/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/nfs/home/kinlongk/.local/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/nfs/home/kinlongk/.local/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/nfs/home/kinlongk/.local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/nfs/home/kinlongk/.local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/nfs/home/kinlongk/.local/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/data/users/kelvin/.conda/matsciml/lib/python3.9/site-packages/cli/colabfit.py", line 79, in query
    _download(i,download)
  File "/data/users/kelvin/.conda/matsciml/lib/python3.9/site-packages/cli/utils.py", line 39, in _download
    e_id = doc['extended-id']
KeyError: 'extended-id'

I get the same error for both -d lmdb and -d xyz.

On an unrelated note, there aren't installation instructions on the README. I just ran pip install git+https://github.com/colabfit/colabfit-cli and could be something you add to the docs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions