huggingface-datasets

Why Pytorch Dataset class does not returning list?

Why Pytorch Dataset class does not returning list? Question: I am trying to use torch.utils.Dataset on a custom dataset. In my dataset, in a single row I have a list of 10 images like as follow: | word | images | gold_image | |:—–|:——-|:———–| |’andromeda’|[‘image.1.jpg’,’image.2.jpg’,’image.3.jpg’]|[0,0,1]| I expect to return batch from dataloader like this, with …

Total answers: 1

Errno 13 Permission denied error when trying to load Huggingface dataset

Errno 13 Permission denied error when trying to load Huggingface dataset Question: I’m trying to do a very simple thing: to load a dataset from the Huggingface library (see example code here) on my Mac: from datasets import load_dataset raw_datasets = load_dataset("glue", "mrpc") I’m getting the following error: PermissionError: [Errno 13] Permission denied: ‘/Users/username/.cache/huggingface/datasets/downloads/6d9bc094a0588d875caee4e51df39ab5d6b6316bf60695294827b02601d421a5.759f3e257a3fad0984d9f8ba9a26479d341795eb50fa64e4c1de40f1fc421313.py.lock’ I’ve …

Total answers: 2

Can I visualize the content of a datasets.Dataset?

Can I visualize the content of a datasets.Dataset? Question: I am using the Huggingface datasets library to load a dataset from a pandas dataframe. The code is something similar to this: from datasets import Dataset import pandas as pd df = pd.DataFrame({"a": [1], "b":[1]}) dataset = Dataset.from_pandas(df) Everything went smoothly, however, I wanted to double …

Total answers: 1

how to create a dataset from three files on disk with datasets library in python?

how to create a dataset from three files on disk with datasets library in python? Question: I have three files under the name train.xlsx and validation.xlsx and test.xlsx on disk. And I need to have a dataset with datasets library with these three files. Here is my code: from google.colab import drive from datasets import …

Total answers: 2

Loading data using hugging_face load_dataset from Common Voice is giving an error

Loading data using hugging_face load_dataset from Common Voice is giving an error Question: I am working on a voice dataset using the Facebook Hugging Face_ transformer, but I am unable to load data from the Common Voice forum: from datasets import load_dataset, load_metric common_voice_train = load_dataset("common_voice", "id", split="train+validation") common_voice_test = load_dataset("common_voice", "id", split="test") It gives the …

Total answers: 2

ModuleNotFoundError huggingface datasets in Jupyter notebook

ModuleNotFoundError huggingface datasets in Jupyter notebook Question: I want to use the huggingface datasets library from within a Jupyter notebook. This should be as simple as installing it (pip install datasets, in bash within a venv) and importing it (import datasets, in Python or notebook). All works well when I test it in the standard …

Total answers: 2