Only Download Metadata

#5
by pshagnea - opened

Hi,

Is there a way to just download the metadata? I want to plot coverage over some types of areas I am interested in, and it would be convenient if I could just grab the shards with data I want!

Thanks!

Satellogic org

Hi. As far as we know, the HuggingFace Dataset API does not support only downloading metadata. I understand this is more complex as the .parquet files are compressed and the samples inside are stored as a complete object one after the other. If I'm correct, even if you only wanted metadata, you have to download the whole object, get the metadata, and then download the next.

We are evaluating reprocessing the Dataset, and this is one of the things we want to simplify, likely exposing different configs, for image and metadata.

Other ideas are welcome

You can provide the "columns" parameter to huggingface's dataset API to get only specific columns of the parquet file. I hope it doesn't download the whole file in this case. After all it's a columnar file format so in theory it should be able to seek to the chunk with data for one column. Not sure if that is happening under the hood though.
Here's a colab notebook that shows how to download only the metadata. It takes about 30-40 minutes for the satellogic subset:
https://colab.research.google.com/gist/tfriedel/5f039c255da381151f9f2ce6dc00520f/earthview-dataset-metadata.ipynb

I think having separate files with only the metadata would be much easier though.

Sign up or log in to comment