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

Get quickstart to download straight from HuggingFace #72

Open
jerrylin96 opened this issue Dec 22, 2023 · 2 comments
Open

Get quickstart to download straight from HuggingFace #72

jerrylin96 opened this issue Dec 22, 2023 · 2 comments

Comments

@jerrylin96
Copy link
Collaborator

Quickstart assumes data is locally downloaded, which may not be ideal for some users.

@cisaacstern
Copy link
Contributor

Good call.

I've never used it but have heard good things about https://pypi.org/project/pooch/ for this use case.

@jackmiller2003
Copy link
Contributor

When I was downloading the data I used huggingface_hub although this may add too many additional dependencies. I'm not sure if this can be done with pooch but hub allows for really easy download of subsets. For example, here is a script that I used to get just one day's worth of data:

import datasets
import logging
from pathlib import Path
from huggingface_hub import snapshot_download

logging.basicConfig(level=logging.INFO)

custom_cache_dir = ""

datasets.config.DOWNLOADED_DATASETS_PATH = Path(custom_cache_dir)

# Download the dataset from the Hugging Face Hub
download_path = snapshot_download(
    repo_id="LEAP/ClimSim_low-res",
    allow_patterns="train/0001-02/*0001-02-01-*.nc",
    cache_dir=custom_cache_dir,
    repo_type="dataset",
)

print(f"Downloaded the dataset to {download_path}")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants