[Python] How to load "Royc30ne/emnist-byclass" from hugging-face using load_dataset

Discussão em 'Python' iniciado por Stack, Maio 22, 2025.

  1. Stack

    Stack Membro Participativo

    I've been trying to load Royc30ne/emnist-byclass from hugging-face using the method load_dataset provided by hugging-face/datasets library but failed.

    First I tried this, which is a common way to load a dataset with load_dataset method:

    testset = load_dataset(path="Royc30ne/emnist-byclass",split="test")


    Unfortunately, this error occured:

    raise DataFilesNotFoundError("No (supported) data files found" + (f" in {path}" if path else ""))
    datasets.exceptions.DataFilesNotFoundError: No (supported) data files found in Royc30ne/emnist-byclass


    I then go back to Royc30ne/emnist-byclass on hugging-face and found that the version of the dataset is in provided in the binary format instead of the CSV/JSON/Parquet format which the load_dataset method supports. The following are files provided by Royc30ne/emnist-byclass:

    .gitattributes
    README.md
    emnist-byclass-mapping.txt
    emnist-byclass-test-images-idx3-ubyte.gz
    emnist-byclass-test-labels-idx1-ubyte.gz
    emnist-byclass-train-images-idx3-ubyte.gz
    emnist-byclass-train-labels-idx1-ubyte.gz


    What should I do in order to load Royc30ne/emnist-byclass with load_dataset correctly? I don't want to use the method EMNIST provided by torchvision.datasets for special reasons.

    Continue reading...

Compartilhe esta Página