html_url
stringlengths
51
51
title
stringlengths
6
280
comments
stringlengths
67
24.7k
body
stringlengths
51
36.2k
__index_level_0__
int64
1
1.17k
comment_length
int64
16
1.45k
text
stringlengths
190
38.3k
embeddings
list
https://github.com/huggingface/datasets/issues/5798
Support parallelized downloading and processing in load_dataset with Spark
From your feedback, seems to me there are two paths to consider now for supporting spark's `map` function in `map_nested` now: 1. Keep the current `pool.map` implementation, and add an if statement for the spark's `map` code (which is what I did in my current PR) -- the code change is just a few lines in the `map_nest...
### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```python load_dataset(..., use_spark=True) ``` ### Motivation Further speed up ...
173
185
Support parallelized downloading and processing in load_dataset with Spark ### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```pyth...
[ -1.1312775611877441, -0.9242454767227173, -0.714408814907074, 1.547906517982483, -0.12344713509082794, -1.2318037748336792, 0.21573010087013245, -1.112957239151001, 1.7478069067001343, -0.8699119091033936, 0.3358379304409027, -1.5951608419418335, 0.11269205808639526, -0.5536026358604431, ...
https://github.com/huggingface/datasets/issues/5798
Support parallelized downloading and processing in load_dataset with Spark
Yup correct ! I think it's a nice path because it would be possible for users to define whatever parallel processing backend they want. I think we still need to discuss how that would look like in the `datasets` API : how to specify it has to use the "spark" parallel backend ? And how to specify the spark session param...
### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```python load_dataset(..., use_spark=True) ``` ### Motivation Further speed up ...
173
94
Support parallelized downloading and processing in load_dataset with Spark ### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```pyth...
[ -1.1700689792633057, -0.8764587044715881, -0.8295596241950989, 1.5323126316070557, -0.14994648098945618, -1.2969651222229004, 0.13497783243656158, -1.185383677482605, 1.7357656955718994, -0.9287930727005005, 0.3179791569709778, -1.6431914567947388, 0.10531292110681534, -0.6245393753051758,...
https://github.com/huggingface/datasets/issues/5798
Support parallelized downloading and processing in load_dataset with Spark
Sure, please let me know if you have more updates regarding the API and implementation from the team. For parameters we don't need to worry about setting them for Spark, because Spark will figure out the environment / number of worker nodes by itself, so it's preferable to just provide some parameter such as `use_sp...
### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```python load_dataset(..., use_spark=True) ``` ### Motivation Further speed up ...
173
61
Support parallelized downloading and processing in load_dataset with Spark ### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```pyth...
[ -1.1626156568527222, -0.9130444526672363, -0.819238007068634, 1.623268961906433, -0.14086875319480896, -1.3001998662948608, 0.17571207880973816, -1.1379238367080688, 1.7446753978729248, -0.9287018179893494, 0.3551841974258423, -1.6384711265563965, 0.11599162966012955, -0.6144850254058838, ...
https://github.com/huggingface/datasets/issues/5798
Support parallelized downloading and processing in load_dataset with Spark
Hi! I wanted to check in to see if there is any update from the team. A potential change of API I can think of is change the argument to `distributed_backend=...`, which accepts `str`, such as `load_dataset(..., distributed_backend="spark")`. Implementation wise, we can add a class / function to abstract away the...
### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```python load_dataset(..., use_spark=True) ``` ### Motivation Further speed up ...
173
66
Support parallelized downloading and processing in load_dataset with Spark ### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```pyth...
[ -1.1135056018829346, -0.8810833096504211, -0.759917676448822, 1.5548791885375977, -0.17177189886569977, -1.3717790842056274, 0.21412622928619385, -1.1400351524353027, 1.7598307132720947, -0.9239068627357483, 0.3762843906879425, -1.5825845003128052, 0.10622622072696686, -0.6503382921218872,...
https://github.com/huggingface/datasets/issues/5798
Support parallelized downloading and processing in load_dataset with Spark
I found this quite interesting: https://github.com/joblib/joblib-spark with this syntax: ```python with parallel_backend('spark', n_jobs=3): ... ``` cc @lu-wang-dl who might know better
### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```python load_dataset(..., use_spark=True) ``` ### Motivation Further speed up ...
173
21
Support parallelized downloading and processing in load_dataset with Spark ### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```pyth...
[ -1.1324222087860107, -0.8346030712127686, -0.8242124915122986, 1.6101762056350708, -0.16984923183918, -1.3630967140197754, 0.19239874184131622, -1.0873650312423706, 1.7247227430343628, -0.8591459393501282, 0.34679192304611206, -1.6278042793273926, 0.032157622277736664, -0.6453025341033936,...
https://github.com/huggingface/datasets/issues/5798
Support parallelized downloading and processing in load_dataset with Spark
Joblib spark is providing Spark backend for joblib. We can implement a general parallel backend like ``` with parallel_backend("<parallel-backedn>", n_jobs=..): ``` It can support multiprocessing , spark, ray, and etc. https://joblib.readthedocs.io/en/latest/parallel.html#joblib.parallel_backend
### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```python load_dataset(..., use_spark=True) ``` ### Motivation Further speed up ...
173
31
Support parallelized downloading and processing in load_dataset with Spark ### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```pyth...
[ -1.1696476936340332, -0.8996327519416809, -0.8012564182281494, 1.5973737239837646, -0.20595121383666992, -1.3456335067749023, 0.199664905667305, -1.1072782278060913, 1.7262952327728271, -0.902502179145813, 0.35168763995170593, -1.6593899726867676, 0.004030873067677021, -0.6340603828430176,...
https://github.com/huggingface/datasets/issues/5798
Support parallelized downloading and processing in load_dataset with Spark
Thank you @lhoestq for finding this repo. I validated that it can distribute downloading jobs with Spark to arbitrary cluster worker nodes evenly with `n_jobs=-1`. For the API, I think it makes sense to define it as ```python load_dataset(..., parallel_backend=<str>) ``` where `parallel_backend` can be `spark`, ...
### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```python load_dataset(..., use_spark=True) ``` ### Motivation Further speed up ...
173
82
Support parallelized downloading and processing in load_dataset with Spark ### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```pyth...
[ -1.1136215925216675, -0.8526799082756042, -0.7578601241111755, 1.548964500427246, -0.14344488084316254, -1.3350157737731934, 0.25061964988708496, -1.147214651107788, 1.8029663562774658, -0.8905744552612305, 0.4033561944961548, -1.6187058687210083, 0.05500779673457146, -0.6764839291572571, ...
https://github.com/huggingface/datasets/issues/5798
Support parallelized downloading and processing in load_dataset with Spark
Hello @lhoestq, I wanted to follow up on my previous comment with some prototyping code that demonstrates how `map_nested` would be like if we unify `multiprocessing` and `spark` with `joblib`. The snippet hasn't hashed out the details such as dealing with `tqdm` yet. In terms of API, the way of using multiprocessin...
### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```python load_dataset(..., use_spark=True) ``` ### Motivation Further speed up ...
173
291
Support parallelized downloading and processing in load_dataset with Spark ### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```pyth...
[ -1.2034595012664795, -0.8881780505180359, -0.6831247806549072, 1.5652879476547241, -0.16860422492027283, -1.2131807804107666, 0.20357908308506012, -1.0910589694976807, 1.6467254161834717, -0.8577591776847839, 0.3062984049320221, -1.5372023582458496, 0.061498045921325684, -0.646149337291717...
https://github.com/huggingface/datasets/issues/5798
Support parallelized downloading and processing in load_dataset with Spark
Nice ! It should be quite easy to make the change then :) I think adding spark support can actually be less than 20 lines of code and would roughly require one line of code to change in map_nested: Maybe we can define a new `datasets.parallel` submodule that has the `parallel_backend()` context manager and a `par...
### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```python load_dataset(..., use_spark=True) ``` ### Motivation Further speed up ...
173
108
Support parallelized downloading and processing in load_dataset with Spark ### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```pyth...
[ -1.1545783281326294, -0.859910786151886, -0.7641624212265015, 1.5488080978393555, -0.18641091883182526, -1.3068565130233765, 0.15636751055717468, -1.1624020338058472, 1.7732734680175781, -0.9171699285507202, 0.4086684584617615, -1.600021243095398, 0.07167720794677734, -0.620754063129425, ...
https://github.com/huggingface/datasets/issues/5798
Support parallelized downloading and processing in load_dataset with Spark
Although until we've switched to all the steps in `load_dataset` to use `datasets.parallel`, I would require the user to explicitly say which step should use Spark. Maybe something like this, but I'm not sure yet: ```python from datasets.parallel import parallel_backend with parallel_backend("spark", steps=["dow...
### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```python load_dataset(..., use_spark=True) ``` ### Motivation Further speed up ...
173
106
Support parallelized downloading and processing in load_dataset with Spark ### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```pyth...
[ -1.0919241905212402, -0.8664455413818359, -0.7287660837173462, 1.494221806526184, -0.16718550026416779, -1.2634316682815552, 0.1762145608663559, -1.2064971923828125, 1.6977709531784058, -0.8560483455657959, 0.3460804224014282, -1.6214559078216553, 0.02370581589639187, -0.5955716371536255, ...
https://github.com/huggingface/datasets/issues/5798
Support parallelized downloading and processing in load_dataset with Spark
Sounds good! I like the partial rollout idea. So for example `map_nested` would call `parallel_map` under the hood if `num_proc != 1` or `parallel_backend` is specified right? I would be happy to start a PR next week to explore this path.
### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```python load_dataset(..., use_spark=True) ``` ### Motivation Further speed up ...
173
41
Support parallelized downloading and processing in load_dataset with Spark ### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```pyth...
[ -1.10128915309906, -0.8351441621780396, -0.819977343082428, 1.573537826538086, -0.1171698048710823, -1.377828598022461, 0.22747087478637695, -1.1480613946914673, 1.8042625188827515, -0.9218506813049316, 0.3684820234775543, -1.6493340730667114, 0.09689544141292572, -0.6743228435516357, -0...
https://github.com/huggingface/datasets/issues/5798
Support parallelized downloading and processing in load_dataset with Spark
Awesome ! I think map_nested can call `parallel_map()` if num_proc > 1, and `parallel_map` can be responsible to use Pool.map by default or joblib.
### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```python load_dataset(..., use_spark=True) ``` ### Motivation Further speed up ...
173
24
Support parallelized downloading and processing in load_dataset with Spark ### Feature request When calling `load_dataset` for datasets that have multiple files, support using Spark to distribute the downloading and processing job to worker nodes when `cache_dir` is a cloud file system shared among nodes. ```pyth...
[ -1.1037724018096924, -0.8533070087432861, -0.7624935507774353, 1.5878700017929077, -0.15887171030044556, -1.3460118770599365, 0.24077929556369781, -1.161879062652588, 1.76569664478302, -0.9278571605682373, 0.3575015068054199, -1.5890419483184814, 0.0936352014541626, -0.6315961480140686, ...
https://github.com/huggingface/datasets/issues/5797
load_dataset is case sentitive?
Hi @haonan-li , thank you for the report! It seems to be a bug on the [`huggingface_hub`](https://github.com/huggingface/huggingface_hub) site, there is even no such dataset as `mbzuai/bactrian-x` on the Hub. I opened and [issue](https://github.com/huggingface/huggingface_hub/issues/1453) there.
### Describe the bug load_dataset() function is case sensitive? ### Steps to reproduce the bug The following two code, get totally different behavior. 1. load_dataset('mbzuai/bactrian-x','en') 2. load_dataset('MBZUAI/Bactrian-X','en') ### Expected behavior Compare 1 and 2. 1 will download all 52 subsets, sh...
174
34
load_dataset is case sentitive? ### Describe the bug load_dataset() function is case sensitive? ### Steps to reproduce the bug The following two code, get totally different behavior. 1. load_dataset('mbzuai/bactrian-x','en') 2. load_dataset('MBZUAI/Bactrian-X','en') ### Expected behavior Compare 1 and 2. ...
[ -1.1215648651123047, -0.94125896692276, -0.7942426204681396, 1.5914305448532104, -0.14628814160823822, -1.256242036819458, 0.15065868198871613, -0.9379811882972717, 1.6703059673309326, -0.7767090201377869, 0.3225754499435425, -1.7344516515731812, -0.076690673828125, -0.6716168522834778, ...
https://github.com/huggingface/datasets/issues/5797
load_dataset is case sentitive?
I think `load_dataset("mbzuai/bactrian-x")` shouldn't be loaded at all and raise an error but because of [this fallback](https://github.com/huggingface/datasets/blob/main/src/datasets/load.py#L1194) to packaged loaders when no other options are applicable, it loads the dataset with standard `json` loader instead of the...
### Describe the bug load_dataset() function is case sensitive? ### Steps to reproduce the bug The following two code, get totally different behavior. 1. load_dataset('mbzuai/bactrian-x','en') 2. load_dataset('MBZUAI/Bactrian-X','en') ### Expected behavior Compare 1 and 2. 1 will download all 52 subsets, sh...
174
40
load_dataset is case sentitive? ### Describe the bug load_dataset() function is case sensitive? ### Steps to reproduce the bug The following two code, get totally different behavior. 1. load_dataset('mbzuai/bactrian-x','en') 2. load_dataset('MBZUAI/Bactrian-X','en') ### Expected behavior Compare 1 and 2. ...
[ -1.1350953578948975, -0.8674898147583008, -0.8282607793807983, 1.5295828580856323, -0.166192427277565, -1.207721471786499, 0.15263883769512177, -1.0018264055252075, 1.701391577720642, -0.8154732584953308, 0.23492677509784698, -1.724178671836853, -0.05635766312479973, -0.6507952213287354, ...
https://github.com/huggingface/datasets/issues/5791
TIFF/TIF support
The issue with multichannel TIFF images has already been reported in Pillow (https://github.com/python-pillow/Pillow/issues/1888). We can't do much about it on our side. Still, to avoid the error, you can bypass the default Pillow decoding and define a custom one as follows: ```python import tifffile # pip install...
### Feature request I currently have a dataset (with tiff and json files) where I have to do this: `wget path_to_data/images.zip && unzip images.zip` `wget path_to_data/annotations.zip && unzip annotations.zip` Would it make sense a contribution that supports these type of files? ### Motivation instead o...
176
92
TIFF/TIF support ### Feature request I currently have a dataset (with tiff and json files) where I have to do this: `wget path_to_data/images.zip && unzip images.zip` `wget path_to_data/annotations.zip && unzip annotations.zip` Would it make sense a contribution that supports these type of files? ### M...
[ -1.146712064743042, -0.9168297648429871, -0.7759732604026794, 1.4893070459365845, -0.19714568555355072, -1.2737550735473633, 0.19573849439620972, -1.0839648246765137, 1.696624994277954, -0.8172821998596191, 0.44575682282447815, -1.6353954076766968, 0.13750475645065308, -0.5648261904716492,...
https://github.com/huggingface/datasets/issues/5786
Multiprocessing in a `filter` or `map` function with a Pytorch model
Hi ! PyTorch may hang when calling `load_state_dict()` in a subprocess. To fix that, set the multiprocessing start method to "spawn". Since `datasets` uses `multiprocess`, you should do: ```python # Required to avoid issues with pytorch (otherwise hangs during load_state_dict in multiprocessing) import multiproces...
### Describe the bug I am trying to use a Pytorch model loaded on CPUs with multiple processes with a `.map` or a `.filter` method. Usually, when dealing with models that are non-pickable, creating a class such that the `map` function is the method `__call__`, and adding `reduce` helps to solve the problem. Howe...
177
67
Multiprocessing in a `filter` or `map` function with a Pytorch model ### Describe the bug I am trying to use a Pytorch model loaded on CPUs with multiple processes with a `.map` or a `.filter` method. Usually, when dealing with models that are non-pickable, creating a class such that the `map` function is the met...
[ -1.2766934633255005, -0.9636735916137695, -0.6539439558982849, 1.5622365474700928, -0.15562894940376282, -1.1848043203353882, 0.27882060408592224, -1.0496315956115723, 1.6472023725509644, -0.8125002384185791, 0.3273656964302063, -1.6085292100906372, 0.09558933973312378, -0.6590056419372559...
https://github.com/huggingface/datasets/issues/5786
Multiprocessing in a `filter` or `map` function with a Pytorch model
@lhoestq Hello, I also encountered this problem but maybe with another reason. Here is my code: ```python tokenizer = AutoTokenizer.from_pretrained(model_args.model_name_or_path, cache_dir=model_args.cache_dir, model_max_length=training_args.model_max_length) data = load_dataset("json", data_files=data_args.train_fi...
### Describe the bug I am trying to use a Pytorch model loaded on CPUs with multiple processes with a `.map` or a `.filter` method. Usually, when dealing with models that are non-pickable, creating a class such that the `map` function is the method `__call__`, and adding `reduce` helps to solve the problem. Howe...
177
64
Multiprocessing in a `filter` or `map` function with a Pytorch model ### Describe the bug I am trying to use a Pytorch model loaded on CPUs with multiple processes with a `.map` or a `.filter` method. Usually, when dealing with models that are non-pickable, creating a class such that the `map` function is the met...
[ -1.2766934633255005, -0.9636735916137695, -0.6539439558982849, 1.5622365474700928, -0.15562894940376282, -1.1848043203353882, 0.27882060408592224, -1.0496315956115723, 1.6472023725509644, -0.8125002384185791, 0.3273656964302063, -1.6085292100906372, 0.09558933973312378, -0.6590056419372559...
https://github.com/huggingface/datasets/issues/5786
Multiprocessing in a `filter` or `map` function with a Pytorch model
@SkyAndCloud your issue doesn't seem related to the original post - could you open a new issue and provide more details ? (size of the dataset, number of cpus, how much time it took to run, `datasets` version)
### Describe the bug I am trying to use a Pytorch model loaded on CPUs with multiple processes with a `.map` or a `.filter` method. Usually, when dealing with models that are non-pickable, creating a class such that the `map` function is the method `__call__`, and adding `reduce` helps to solve the problem. Howe...
177
38
Multiprocessing in a `filter` or `map` function with a Pytorch model ### Describe the bug I am trying to use a Pytorch model loaded on CPUs with multiple processes with a `.map` or a `.filter` method. Usually, when dealing with models that are non-pickable, creating a class such that the `map` function is the met...
[ -1.2766934633255005, -0.9636735916137695, -0.6539439558982849, 1.5622365474700928, -0.15562894940376282, -1.1848043203353882, 0.27882060408592224, -1.0496315956115723, 1.6472023725509644, -0.8125002384185791, 0.3273656964302063, -1.6085292100906372, 0.09558933973312378, -0.6590056419372559...
https://github.com/huggingface/datasets/issues/5786
Multiprocessing in a `filter` or `map` function with a Pytorch model
@lhoestq Hi, I just solved this problem. Because the input is extremely long and the tokenizer requests a large amount of memory, which leads to a OOM error and may eventually causes the hang. I didn't filter those too-long sentences because I thought `tokenizer` would stop once the length exceeds the `max_length`. How...
### Describe the bug I am trying to use a Pytorch model loaded on CPUs with multiple processes with a `.map` or a `.filter` method. Usually, when dealing with models that are non-pickable, creating a class such that the `map` function is the method `__call__`, and adding `reduce` helps to solve the problem. Howe...
177
66
Multiprocessing in a `filter` or `map` function with a Pytorch model ### Describe the bug I am trying to use a Pytorch model loaded on CPUs with multiple processes with a `.map` or a `.filter` method. Usually, when dealing with models that are non-pickable, creating a class such that the `map` function is the met...
[ -1.2766934633255005, -0.9636735916137695, -0.6539439558982849, 1.5622365474700928, -0.15562894940376282, -1.1848043203353882, 0.27882060408592224, -1.0496315956115723, 1.6472023725509644, -0.8125002384185791, 0.3273656964302063, -1.6085292100906372, 0.09558933973312378, -0.6590056419372559...
https://github.com/huggingface/datasets/issues/5783
Offset overflow while doing regex on a text column
Hi! This looks like an Arrow bug, but it can be avoided by reducing the `writer_batch_size`. (`ds = ds.map(get_text_caption, writer_batch_size=100)` in Colab runs without issues)
### Describe the bug `ArrowInvalid: offset overflow while concatenating arrays` Same error as [here](https://github.com/huggingface/datasets/issues/615) ### Steps to reproduce the bug Steps to reproduce: (dataset is a few GB big so try in colab maybe) ``` import datasets import re ds = datasets.lo...
178
25
Offset overflow while doing regex on a text column ### Describe the bug `ArrowInvalid: offset overflow while concatenating arrays` Same error as [here](https://github.com/huggingface/datasets/issues/615) ### Steps to reproduce the bug Steps to reproduce: (dataset is a few GB big so try in colab maybe) ...
[ -1.2490326166152954, -1.016045093536377, -0.7192366719245911, 1.559781789779663, -0.14998488128185272, -1.2319121360778809, 0.13393017649650574, -1.0625097751617432, 1.6829222440719604, -0.8364272117614746, 0.3222373425960541, -1.6455180644989014, -0.008762655779719353, -0.6353757381439209...
https://github.com/huggingface/datasets/issues/5782
Support for various audio-loading backends instead of always relying on SoundFile
Hi! You can use `set_transform`/`with_transform` to define a custom decoding for audio formats not supported by `soundfile`: ```python audio_dataset_amr = Dataset.from_dict({"audio": ["audio_samples/audio.amr"]}) def decode_audio(batch): batch["audio"] = [read_ffmpeg(audio_path) for audio_path in batch["a...
### Feature request Introduce an option to select from a variety of audio-loading backends rather than solely relying on the SoundFile library. For instance, if the ffmpeg library is installed, it can serve as a fallback loading option. ### Motivation - The SoundFile library, used in [features/audio.py](https://gith...
179
57
Support for various audio-loading backends instead of always relying on SoundFile ### Feature request Introduce an option to select from a variety of audio-loading backends rather than solely relying on the SoundFile library. For instance, if the ffmpeg library is installed, it can serve as a fallback loading option...
[ -1.2506405115127563, -0.9204078316688538, -0.6826140284538269, 1.4030389785766602, -0.1625693291425705, -1.293544888496399, 0.13924826681613922, -1.0432124137878418, 1.6291160583496094, -0.742811918258667, 0.3129993975162506, -1.6759306192398071, 0.0504981204867363, -0.5894086360931396, ...
https://github.com/huggingface/datasets/issues/5782
Support for various audio-loading backends instead of always relying on SoundFile
Considering the number of times a custom decoding transform has been suggested as a solution, an example in the [docs](https://huggingface.co/docs/datasets/process#format-transform) would be nice. cc @stevhliu
### Feature request Introduce an option to select from a variety of audio-loading backends rather than solely relying on the SoundFile library. For instance, if the ffmpeg library is installed, it can serve as a fallback loading option. ### Motivation - The SoundFile library, used in [features/audio.py](https://gith...
179
25
Support for various audio-loading backends instead of always relying on SoundFile ### Feature request Introduce an option to select from a variety of audio-loading backends rather than solely relying on the SoundFile library. For instance, if the ffmpeg library is installed, it can serve as a fallback loading option...
[ -1.2506405115127563, -0.9204078316688538, -0.6826140284538269, 1.4030389785766602, -0.1625693291425705, -1.293544888496399, 0.13924826681613922, -1.0432124137878418, 1.6291160583496094, -0.742811918258667, 0.3129993975162506, -1.6759306192398071, 0.0504981204867363, -0.5894086360931396, ...
https://github.com/huggingface/datasets/issues/5781
Error using `load_datasets`
It looks like an issue with your installation of scipy, can you try reinstalling it ?
### Describe the bug I tried to load a dataset using the `datasets` library in a conda jupyter notebook and got the below error. ``` ImportError: dlopen(/Users/gilbertyoung/miniforge3/envs/review_sense/lib/python3.8/site-packages/scipy/sparse/linalg/_isolve/_iterative.cpython-38-darwin.so, 0x0002): Library not ...
180
16
Error using `load_datasets` ### Describe the bug I tried to load a dataset using the `datasets` library in a conda jupyter notebook and got the below error. ``` ImportError: dlopen(/Users/gilbertyoung/miniforge3/envs/review_sense/lib/python3.8/site-packages/scipy/sparse/linalg/_isolve/_iterative.cpython-38-da...
[ -1.1035425662994385, -0.8877943754196167, -0.6851385831832886, 1.4833195209503174, -0.02772693708539009, -1.2885911464691162, 0.10321732610464096, -0.8732654452323914, 1.5320765972137451, -0.6237130165100098, 0.27652740478515625, -1.597454309463501, -0.2172369658946991, -0.5587021708488464...
https://github.com/huggingface/datasets/issues/5778
Schrödinger's dataset_dict
Hi ! Passing `data_files="path/test.json"` is equivalent to `data_files={"train": ["path/test.json"]}`, that's why you end up with a train split. If you don't pass `data_files=`, then split names are inferred from the data files names
### Describe the bug If you use load_dataset('json', data_files="path/test.json"), it will return DatasetDict({train:...}). And if you use load_dataset("path"), it will return DatasetDict({test:...}). Why can't the output behavior be unified? ### Steps to reproduce the bug as description above. ### Expected b...
181
33
Schrödinger's dataset_dict ### Describe the bug If you use load_dataset('json', data_files="path/test.json"), it will return DatasetDict({train:...}). And if you use load_dataset("path"), it will return DatasetDict({test:...}). Why can't the output behavior be unified? ### Steps to reproduce the bug as descr...
[ -1.182214617729187, -1.0347455739974976, -0.8008841872215271, 1.6343438625335693, -0.1948118507862091, -1.1043345928192139, 0.12878867983818054, -0.9572628140449524, 1.706277847290039, -0.8200430870056152, 0.266997754573822, -1.6987440586090088, 0.01634538732469082, -0.6312517523765564, ...
https://github.com/huggingface/datasets/issues/5777
datasets.load_dataset("code_search_net", "python") : NotADirectoryError: [Errno 20] Not a directory
Note: I listed the datasets and grepped around to find what appears to be an alternative source for this: raw_datasets = load_dataset("espejelomar/code_search_net_python_10000_examples", "python")
### Describe the bug While checking out the [tokenizer tutorial](https://huggingface.co/course/chapter6/2?fw=pt), i noticed getting an error while initially downloading the python dataset used in the examples. The [collab with the error is here](https://colab.research.google.com/github/huggingface/notebooks/blob/ma...
182
23
datasets.load_dataset("code_search_net", "python") : NotADirectoryError: [Errno 20] Not a directory ### Describe the bug While checking out the [tokenizer tutorial](https://huggingface.co/course/chapter6/2?fw=pt), i noticed getting an error while initially downloading the python dataset used in the examples. The ...
[ -1.2191482782363892, -0.8311535716056824, -0.7604543566703796, 1.4691193103790283, -0.09448185563087463, -1.2026780843734741, 0.09687452018260956, -1.0932890176773071, 1.5775238275527954, -0.7166644334793091, 0.2938610911369324, -1.6695624589920044, -0.05842898041009903, -0.592119634151458...
https://github.com/huggingface/datasets/issues/5777
datasets.load_dataset("code_search_net", "python") : NotADirectoryError: [Errno 20] Not a directory
Thanks for reporting, @jason-brian-anderson. Yes, this is a known issue: the [CodeSearchNet](https://github.com/github/CodeSearchNet) repo has been archived (Apr 11, 2023) and their source data files are no longer accessible in their S3: e.g. https://s3.amazonaws.com/code-search-net/CodeSearchNet/v2/python.zip gives...
### Describe the bug While checking out the [tokenizer tutorial](https://huggingface.co/course/chapter6/2?fw=pt), i noticed getting an error while initially downloading the python dataset used in the examples. The [collab with the error is here](https://colab.research.google.com/github/huggingface/notebooks/blob/ma...
182
60
datasets.load_dataset("code_search_net", "python") : NotADirectoryError: [Errno 20] Not a directory ### Describe the bug While checking out the [tokenizer tutorial](https://huggingface.co/course/chapter6/2?fw=pt), i noticed getting an error while initially downloading the python dataset used in the examples. The ...
[ -1.2191482782363892, -0.8311535716056824, -0.7604543566703796, 1.4691193103790283, -0.09448185563087463, -1.2026780843734741, 0.09687452018260956, -1.0932890176773071, 1.5775238275527954, -0.7166644334793091, 0.2938610911369324, -1.6695624589920044, -0.05842898041009903, -0.592119634151458...
https://github.com/huggingface/datasets/issues/5777
datasets.load_dataset("code_search_net", "python") : NotADirectoryError: [Errno 20] Not a directory
This issue is fixed because we are hosting the CodeSearchNet data files in the Hugging Face Hub. See: https://huggingface.co/datasets/code_search_net/discussions/7
### Describe the bug While checking out the [tokenizer tutorial](https://huggingface.co/course/chapter6/2?fw=pt), i noticed getting an error while initially downloading the python dataset used in the examples. The [collab with the error is here](https://colab.research.google.com/github/huggingface/notebooks/blob/ma...
182
19
datasets.load_dataset("code_search_net", "python") : NotADirectoryError: [Errno 20] Not a directory ### Describe the bug While checking out the [tokenizer tutorial](https://huggingface.co/course/chapter6/2?fw=pt), i noticed getting an error while initially downloading the python dataset used in the examples. The ...
[ -1.2191482782363892, -0.8311535716056824, -0.7604543566703796, 1.4691193103790283, -0.09448185563087463, -1.2026780843734741, 0.09687452018260956, -1.0932890176773071, 1.5775238275527954, -0.7166644334793091, 0.2938610911369324, -1.6695624589920044, -0.05842898041009903, -0.592119634151458...
https://github.com/huggingface/datasets/issues/5777
datasets.load_dataset("code_search_net", "python") : NotADirectoryError: [Errno 20] Not a directory
Thanks @hamelsmu for the Zenodo link. I am adding it to the dataset card on the Hugging Face Hub, so that the community knows about this "official" source data. I guess this link is not well known, because some community members already hosted an "unofficial" version of the data on Zenodo as well: https://zenodo.org/re...
### Describe the bug While checking out the [tokenizer tutorial](https://huggingface.co/course/chapter6/2?fw=pt), i noticed getting an error while initially downloading the python dataset used in the examples. The [collab with the error is here](https://colab.research.google.com/github/huggingface/notebooks/blob/ma...
182
54
datasets.load_dataset("code_search_net", "python") : NotADirectoryError: [Errno 20] Not a directory ### Describe the bug While checking out the [tokenizer tutorial](https://huggingface.co/course/chapter6/2?fw=pt), i noticed getting an error while initially downloading the python dataset used in the examples. The ...
[ -1.2191482782363892, -0.8311535716056824, -0.7604543566703796, 1.4691193103790283, -0.09448185563087463, -1.2026780843734741, 0.09687452018260956, -1.0932890176773071, 1.5775238275527954, -0.7166644334793091, 0.2938610911369324, -1.6695624589920044, -0.05842898041009903, -0.592119634151458...
https://github.com/huggingface/datasets/issues/5773
train_dataset does not implement __len__
Thanks for reporting, @v-yunbin. Could you please give more details, the steps to reproduce the bug, the complete error back trace and the environment information (`datasets-cli env`)?
when train using data precessored by the datasets, I get follow warning and it leads to that I can not set epoch numbers: `ValueError: The train_dataset does not implement __len__, max_steps has to be specified. The number of steps needs to be known in advance for the learning rate scheduler.`
184
27
train_dataset does not implement __len__ when train using data precessored by the datasets, I get follow warning and it leads to that I can not set epoch numbers: `ValueError: The train_dataset does not implement __len__, max_steps has to be specified. The number of steps needs to be known in advance for the learni...
[ -1.3317745923995972, -0.864311695098877, -0.7249059677124023, 1.3925011157989502, -0.21591134369373322, -1.2339130640029907, 0.20677152276039124, -1.1794809103012085, 1.6692954301834106, -0.8805052042007446, 0.2583061158657074, -1.5658608675003052, 0.014881766401231289, -0.5769771933555603...
https://github.com/huggingface/datasets/issues/5773
train_dataset does not implement __len__
this is a detail error info from transformers: ``` Traceback (most recent call last): File "finetune.py", line 177, in <module> whisper_finetune(traindir,devdir,outdir) File "finetune.py", line 161, in whisper_finetune trainer = Seq2SeqTrainer( File "/home/ybZhang/miniconda3/envs/whister/lib/python...
when train using data precessored by the datasets, I get follow warning and it leads to that I can not set epoch numbers: `ValueError: The train_dataset does not implement __len__, max_steps has to be specified. The number of steps needs to be known in advance for the learning rate scheduler.`
184
73
train_dataset does not implement __len__ when train using data precessored by the datasets, I get follow warning and it leads to that I can not set epoch numbers: `ValueError: The train_dataset does not implement __len__, max_steps has to be specified. The number of steps needs to be known in advance for the learni...
[ -1.2401282787322998, -0.8403675556182861, -0.6372190117835999, 1.5290462970733643, -0.17617391049861908, -1.2622276544570923, 0.17171244323253632, -1.117249608039856, 1.4804695844650269, -0.7732105851173401, 0.33755746483802795, -1.6157748699188232, 0.045893438160419464, -0.616722345352172...
https://github.com/huggingface/datasets/issues/5773
train_dataset does not implement __len__
How did you create `train_dataset`? The `datasets` library does not appear in your stack trace. We need more information in order to reproduce the issue...
when train using data precessored by the datasets, I get follow warning and it leads to that I can not set epoch numbers: `ValueError: The train_dataset does not implement __len__, max_steps has to be specified. The number of steps needs to be known in advance for the learning rate scheduler.`
184
25
train_dataset does not implement __len__ when train using data precessored by the datasets, I get follow warning and it leads to that I can not set epoch numbers: `ValueError: The train_dataset does not implement __len__, max_steps has to be specified. The number of steps needs to be known in advance for the learni...
[ -1.300323247909546, -0.8498461842536926, -0.7057887315750122, 1.409334659576416, -0.21623703837394714, -1.2027586698532104, 0.22090476751327515, -1.1831670999526978, 1.697435975074768, -0.8855360746383667, 0.26459142565727234, -1.550510287284851, -0.002974244300276041, -0.5868687033653259,...
https://github.com/huggingface/datasets/issues/5773
train_dataset does not implement __len__
``` def asr_dataset(traindir,devdir): we_voice = IterableDatasetDict() #we_voice["train"] = load_from_disk(traindir,streaming=True) #we_voice["test"]= load_from_disk(devdir,streaming=True) we_voice["train"] = load_dataset("csv",data_files=os.path.join(traindir,"train.csv"),split="train",streaming=T...
when train using data precessored by the datasets, I get follow warning and it leads to that I can not set epoch numbers: `ValueError: The train_dataset does not implement __len__, max_steps has to be specified. The number of steps needs to be known in advance for the learning rate scheduler.`
184
29
train_dataset does not implement __len__ when train using data precessored by the datasets, I get follow warning and it leads to that I can not set epoch numbers: `ValueError: The train_dataset does not implement __len__, max_steps has to be specified. The number of steps needs to be known in advance for the learni...
[ -1.2421706914901733, -0.9405226111412048, -0.5692014098167419, 1.5513588190078735, -0.22297008335590363, -1.0597989559173584, 0.22433164715766907, -1.0332162380218506, 1.4980961084365845, -0.8753895163536072, 0.4475371837615967, -1.5902633666992188, 0.0031615234911441803, -0.62268716096878...
https://github.com/huggingface/datasets/issues/5773
train_dataset does not implement __len__
As you are using iterable datasets (`streaming=True`), their length is not defined. You should: - Either use non-iterable datasets, which have a defined length: use `DatasetDict` and not passing `streaming=True` - Or pass `args.max_steps` to the `Trainer`
when train using data precessored by the datasets, I get follow warning and it leads to that I can not set epoch numbers: `ValueError: The train_dataset does not implement __len__, max_steps has to be specified. The number of steps needs to be known in advance for the learning rate scheduler.`
184
37
train_dataset does not implement __len__ when train using data precessored by the datasets, I get follow warning and it leads to that I can not set epoch numbers: `ValueError: The train_dataset does not implement __len__, max_steps has to be specified. The number of steps needs to be known in advance for the learni...
[ -1.2005255222320557, -0.9399008750915527, -0.7182595133781433, 1.5036914348602295, -0.18478284776210785, -1.2923835515975952, 0.16731959581375122, -1.186020016670227, 1.6750397682189941, -0.8794461488723755, 0.40599796175956726, -1.627034306526184, -0.0019488073885440826, -0.59780639410018...
https://github.com/huggingface/datasets/issues/5773
train_dataset does not implement __len__
@albertvillanova I think @v-yunbin, myself, and others might be slightly confused about max_steps and how it differs from num_train_epochs.
when train using data precessored by the datasets, I get follow warning and it leads to that I can not set epoch numbers: `ValueError: The train_dataset does not implement __len__, max_steps has to be specified. The number of steps needs to be known in advance for the learning rate scheduler.`
184
19
train_dataset does not implement __len__ when train using data precessored by the datasets, I get follow warning and it leads to that I can not set epoch numbers: `ValueError: The train_dataset does not implement __len__, max_steps has to be specified. The number of steps needs to be known in advance for the learni...
[ -1.3105714321136475, -0.943544864654541, -0.6800290942192078, 1.4268354177474976, -0.23236320912837982, -1.1894943714141846, 0.18517981469631195, -1.0944072008132935, 1.6037583351135254, -0.8916651010513306, 0.3195977210998535, -1.510530948638916, -0.03508378192782402, -0.6048634648323059,...
https://github.com/huggingface/datasets/issues/5773
train_dataset does not implement __len__
@lkurlandski A **step** is referring to optimizer's update after back propagation, and it's associated with a batch of data. For example, if a dataset contains 64 examples and you have an overall batch size of 4, then an epoch will have 64/4=16 batches. Therefore, in one epoch, you will have 16 optimizer **steps**.
when train using data precessored by the datasets, I get follow warning and it leads to that I can not set epoch numbers: `ValueError: The train_dataset does not implement __len__, max_steps has to be specified. The number of steps needs to be known in advance for the learning rate scheduler.`
184
53
train_dataset does not implement __len__ when train using data precessored by the datasets, I get follow warning and it leads to that I can not set epoch numbers: `ValueError: The train_dataset does not implement __len__, max_steps has to be specified. The number of steps needs to be known in advance for the learni...
[ -1.2766127586364746, -1.0399574041366577, -0.7259251475334167, 1.4400029182434082, -0.27168333530426025, -1.2861191034317017, 0.15733329951763153, -1.1277066469192505, 1.6771312952041626, -0.9008724689483643, 0.2899356186389923, -1.581748366355896, 0.033331915736198425, -0.6537350416183472...
https://github.com/huggingface/datasets/issues/5769
Tiktoken tokenizers are not pickable
Thanks for reporting, @markovalexander. Unfortunately, I'm not able to reproduce the issue: the `tiktoken` tokenizer can be used within `Dataset.map`, both in my local machine and in a Colab notebook: https://colab.research.google.com/drive/1DhJroZgk0sNFJ2Mrz-jYgrmh9jblXaCG?usp=sharing Are you sure you are using ...
### Describe the bug Since tiktoken tokenizer is not pickable, it is not possible to use it inside `dataset.map()` with multiprocessing enabled. However, you [made](https://github.com/huggingface/datasets/issues/5536) tiktoken's tokenizers pickable in `datasets==2.10.0` for caching. For some reason, this logic does no...
186
40
Tiktoken tokenizers are not pickable ### Describe the bug Since tiktoken tokenizer is not pickable, it is not possible to use it inside `dataset.map()` with multiprocessing enabled. However, you [made](https://github.com/huggingface/datasets/issues/5536) tiktoken's tokenizers pickable in `datasets==2.10.0` for cach...
[ -1.1800875663757324, -0.9220454096794128, -0.6876906752586365, 1.4953796863555908, -0.1720784306526184, -1.163080096244812, 0.14514422416687012, -1.0526939630508423, 1.6667680740356445, -0.7231392860412598, 0.2982511520385742, -1.713374376296997, 0.008714422583580017, -0.6296529173851013, ...
https://github.com/huggingface/datasets/issues/5768
load_dataset("squad") doesn't work in 2.7.1 and 2.10.1
I am not able to reproduce your issue: the dataset loads perfectly on my local machine and on a Colab notebook: https://colab.research.google.com/drive/1Fbdoa1JdNz8DOdX6gmIsOK1nCT8Abj4O?usp=sharing ```python In [1]: from datasets import load_dataset In [2]: ds = load_dataset("squad") Downloading builder script: 1...
### Describe the bug There is an issue that seems to be unique to the "squad" dataset, in which it cannot be loaded using standard methods. This issue is most quickly reproduced from the command line, using the HF examples to verify a dataset is loaded properly. This is not a problem with "squad_v2" dataset for e...
187
134
load_dataset("squad") doesn't work in 2.7.1 and 2.10.1 ### Describe the bug There is an issue that seems to be unique to the "squad" dataset, in which it cannot be loaded using standard methods. This issue is most quickly reproduced from the command line, using the HF examples to verify a dataset is loaded properl...
[ -1.269569754600525, -0.9472349286079407, -0.6904863119125366, 1.4093470573425293, -0.18275101482868195, -1.1904391050338745, 0.07730994373559952, -1.1222432851791382, 1.683840036392212, -0.731477677822113, 0.2488894760608673, -1.6942880153656006, 0.0029024872928857803, -0.5075297355651855,...
https://github.com/huggingface/datasets/issues/5768
load_dataset("squad") doesn't work in 2.7.1 and 2.10.1
I am at a complete loss for what's happening here. A quick summary, I have 3 machines to try this with: 1) My windows 10 laptop 2) Linux machine1, super computer login node 3) Linux machine2, super computer compute node Let's define the following as a test script for the machines: ``` import traceback import...
### Describe the bug There is an issue that seems to be unique to the "squad" dataset, in which it cannot be loaded using standard methods. This issue is most quickly reproduced from the command line, using the HF examples to verify a dataset is loaded properly. This is not a problem with "squad_v2" dataset for e...
187
1,237
load_dataset("squad") doesn't work in 2.7.1 and 2.10.1 ### Describe the bug There is an issue that seems to be unique to the "squad" dataset, in which it cannot be loaded using standard methods. This issue is most quickly reproduced from the command line, using the HF examples to verify a dataset is loaded properl...
[ -1.2798125743865967, -0.9700546264648438, -0.6780890822410583, 1.3986114263534546, -0.1794208586215973, -1.1662852764129639, 0.08255334943532944, -1.1187233924865723, 1.736251950263977, -0.7445816993713379, 0.2425457239151001, -1.6792999505996704, -0.001762485597282648, -0.5085324645042419...
https://github.com/huggingface/datasets/issues/5768
load_dataset("squad") doesn't work in 2.7.1 and 2.10.1
I'm back on linux machine 1 (login node) now. After submitting that as a job to machine 2 and it failing with TypeError, linux machine 1 now produces identical traceback to machine 2: > (arkroyal) [yr3g17@cyan52 squad_qanswering]$ python > Python 3.10.8 (main, Nov 24 2022, 14:13:03) [GCC 11.2.0] on linux > Type "h...
### Describe the bug There is an issue that seems to be unique to the "squad" dataset, in which it cannot be loaded using standard methods. This issue is most quickly reproduced from the command line, using the HF examples to verify a dataset is loaded properly. This is not a problem with "squad_v2" dataset for e...
187
156
load_dataset("squad") doesn't work in 2.7.1 and 2.10.1 ### Describe the bug There is an issue that seems to be unique to the "squad" dataset, in which it cannot be loaded using standard methods. This issue is most quickly reproduced from the command line, using the HF examples to verify a dataset is loaded properl...
[ -1.2868084907531738, -0.962947428226471, -0.690953254699707, 1.4309908151626587, -0.1983925849199295, -1.1768583059310913, 0.08960655331611633, -1.1221787929534912, 1.7209266424179077, -0.7430174350738525, 0.25335395336151123, -1.6798754930496216, -0.0031185937114059925, -0.518686652183532...
https://github.com/huggingface/datasets/issues/5768
load_dataset("squad") doesn't work in 2.7.1 and 2.10.1
I see this is quite a complex use case... Let's try multiple things: - First, update `datasets` and make sure you use the same version in all machines, so that we can easily compare different behaviors. ``` pip install -U datasets ``` - Second, wherever you run the `load_dataset("squad")` command, make su...
### Describe the bug There is an issue that seems to be unique to the "squad" dataset, in which it cannot be loaded using standard methods. This issue is most quickly reproduced from the command line, using the HF examples to verify a dataset is loaded properly. This is not a problem with "squad_v2" dataset for e...
187
244
load_dataset("squad") doesn't work in 2.7.1 and 2.10.1 ### Describe the bug There is an issue that seems to be unique to the "squad" dataset, in which it cannot be loaded using standard methods. This issue is most quickly reproduced from the command line, using the HF examples to verify a dataset is loaded properl...
[ -1.234336018562317, -0.9501729607582092, -0.6695875525474548, 1.396459698677063, -0.17038269340991974, -1.2012196779251099, 0.11567026376724243, -1.0877516269683838, 1.7662417888641357, -0.7621121406555176, 0.2449980229139328, -1.7011770009994507, -0.004717961419373751, -0.5323485136032104...
https://github.com/huggingface/datasets/issues/5768
load_dataset("squad") doesn't work in 2.7.1 and 2.10.1
Additionally, we just had an infrastructure issue on the Hugging Face Hub at around 11:30 today. That might have contributed to the connectivity issue... It is fixed now. https://status.huggingface.co/
### Describe the bug There is an issue that seems to be unique to the "squad" dataset, in which it cannot be loaded using standard methods. This issue is most quickly reproduced from the command line, using the HF examples to verify a dataset is loaded properly. This is not a problem with "squad_v2" dataset for e...
187
29
load_dataset("squad") doesn't work in 2.7.1 and 2.10.1 ### Describe the bug There is an issue that seems to be unique to the "squad" dataset, in which it cannot be loaded using standard methods. This issue is most quickly reproduced from the command line, using the HF examples to verify a dataset is loaded properl...
[ -1.249747633934021, -0.9587093591690063, -0.6873729228973389, 1.4481257200241089, -0.16937844455242157, -1.1766108274459839, 0.06997683644294739, -1.0514603853225708, 1.7328084707260132, -0.7514103055000305, 0.25581738352775574, -1.7040141820907593, -0.0076935249380767345, -0.4915046095848...
https://github.com/huggingface/datasets/issues/5768
load_dataset("squad") doesn't work in 2.7.1 and 2.10.1
Hi again, thanks for your help and insight Albert Villanova. It's all working now, so thank you for that. For the benefit of anyone else who ends up in this thread, I solved the problem by addressing Albert's advice: (1) Both Windows and Linux machine 1 (have internet access) and can now access the SQuAD dataset....
### Describe the bug There is an issue that seems to be unique to the "squad" dataset, in which it cannot be loaded using standard methods. This issue is most quickly reproduced from the command line, using the HF examples to verify a dataset is loaded properly. This is not a problem with "squad_v2" dataset for e...
187
272
load_dataset("squad") doesn't work in 2.7.1 and 2.10.1 ### Describe the bug There is an issue that seems to be unique to the "squad" dataset, in which it cannot be loaded using standard methods. This issue is most quickly reproduced from the command line, using the HF examples to verify a dataset is loaded properl...
[ -1.2961723804473877, -0.9696152210235596, -0.6804463267326355, 1.3996741771697998, -0.19085818529129028, -1.1812217235565186, 0.09888231754302979, -1.1031193733215332, 1.7116256952285767, -0.766923725605011, 0.21840974688529968, -1.687854290008545, 0.0072790589183568954, -0.483093768358230...
https://github.com/huggingface/datasets/issues/5766
Support custom feature types
Hi ! Interesting :) What kind of new types would you like to use ? Note that you can already implement your own decoding by using `set_transform` that can decode data on-the-fly when rows are accessed
### Feature request I think it would be nice to allow registering custom feature types with the 🤗 Datasets library. For example, allow to do something along the following lines: ``` from datasets.features import register_feature_type # this would be a new function @register_feature_type class CustomFeature...
189
36
Support custom feature types ### Feature request I think it would be nice to allow registering custom feature types with the 🤗 Datasets library. For example, allow to do something along the following lines: ``` from datasets.features import register_feature_type # this would be a new function @register_fe...
[ -1.1635470390319824, -0.9343589544296265, -0.8181957602500916, 1.486406922340393, -0.15031062066555023, -1.2779946327209473, 0.21437889337539673, -1.0857570171356201, 1.6582823991775513, -0.8129419684410095, 0.3232392370700836, -1.6623361110687256, 0.051158398389816284, -0.6794191598892212...
https://github.com/huggingface/datasets/issues/5766
Support custom feature types
An interesting proposal indeed. Pandas and Polars have the "extension API", so doing something similar on our side could be useful, too. However, this requires defining a common interface for the existing feature types before discussing the API/workflow for defining/sharing custom feature types, and this could take...
### Feature request I think it would be nice to allow registering custom feature types with the 🤗 Datasets library. For example, allow to do something along the following lines: ``` from datasets.features import register_feature_type # this would be a new function @register_feature_type class CustomFeature...
189
63
Support custom feature types ### Feature request I think it would be nice to allow registering custom feature types with the 🤗 Datasets library. For example, allow to do something along the following lines: ``` from datasets.features import register_feature_type # this would be a new function @register_fe...
[ -1.165695309638977, -0.9480094909667969, -0.8156073093414307, 1.4876782894134521, -0.14888717234134674, -1.2785828113555908, 0.21639160811901093, -1.0897376537322998, 1.6667289733886719, -0.8262074589729309, 0.3295639157295227, -1.6618900299072266, 0.037548378109931946, -0.6801649928092957...
https://github.com/huggingface/datasets/issues/5766
Support custom feature types
Thank you for your replies! @lhoestq I have a use case involving whole-slide images in digital pathology. These are very large images (potentially gigapixel scale), so standard image tools are not suitable. Essentially, encoding/decoding can be done from/to [`OpenSlide`](https://openslide.org/api/python/) objects. Thou...
### Feature request I think it would be nice to allow registering custom feature types with the 🤗 Datasets library. For example, allow to do something along the following lines: ``` from datasets.features import register_feature_type # this would be a new function @register_feature_type class CustomFeature...
189
168
Support custom feature types ### Feature request I think it would be nice to allow registering custom feature types with the 🤗 Datasets library. For example, allow to do something along the following lines: ``` from datasets.features import register_feature_type # this would be a new function @register_fe...
[ -1.1689321994781494, -0.9416799545288086, -0.8087755441665649, 1.4847126007080078, -0.1473194807767868, -1.2755950689315796, 0.21675023436546326, -1.0938944816589355, 1.6654192209243774, -0.8183121085166931, 0.3229815661907196, -1.6641901731491089, 0.03850048780441284, -0.6814858317375183,...
https://github.com/huggingface/datasets/issues/5765
ValueError: You should supply an encoding or a list of encodings to this method that includes input_ids, but you provided ['text']
You need to remove the `text` and `text_en` columns before passing the dataset to the `DataLoader` to avoid this error: ```python tokenized_datasets = tokenized_datasets.remove_columns(["text", "text_en"]) ```
### Describe the bug Following is my code that I am trying to run, but facing an error (have attached the whole error below): My code: ``` from collections import OrderedDict import warnings import flwr as fl import torch import numpy as np import random from torch.utils.data import DataLoader from...
190
26
ValueError: You should supply an encoding or a list of encodings to this method that includes input_ids, but you provided ['text'] ### Describe the bug Following is my code that I am trying to run, but facing an error (have attached the whole error below): My code: ``` from collections import OrderedDict imp...
[ -1.2584954500198364, -0.941353976726532, -0.6706098914146423, 1.5620760917663574, -0.12782131135463715, -1.0384528636932373, 0.11514334380626678, -1.174659252166748, 1.5971934795379639, -0.8362162113189697, 0.2784945070743561, -1.6470086574554443, 0.01891913264989853, -0.5115105509757996, ...
https://github.com/huggingface/datasets/issues/5765
ValueError: You should supply an encoding or a list of encodings to this method that includes input_ids, but you provided ['text']
Thanks @mariosasko. Now I am getting this error: ``` Traceback (most recent call last): File "client_2.py", line 138, in <module> main() File "client_2.py", line 134, in main fl.client.start_numpy_client(server_address="localhost:8080", client=IMDBClient()) File "/home/saurav/.local/lib/python3.8...
### Describe the bug Following is my code that I am trying to run, but facing an error (have attached the whole error below): My code: ``` from collections import OrderedDict import warnings import flwr as fl import torch import numpy as np import random from torch.utils.data import DataLoader from...
190
550
ValueError: You should supply an encoding or a list of encodings to this method that includes input_ids, but you provided ['text'] ### Describe the bug Following is my code that I am trying to run, but facing an error (have attached the whole error below): My code: ``` from collections import OrderedDict imp...
[ -1.2584954500198364, -0.941353976726532, -0.6706098914146423, 1.5620760917663574, -0.12782131135463715, -1.0384528636932373, 0.11514334380626678, -1.174659252166748, 1.5971934795379639, -0.8362162113189697, 0.2784945070743561, -1.6470086574554443, 0.01891913264989853, -0.5115105509757996, ...
https://github.com/huggingface/datasets/issues/5765
ValueError: You should supply an encoding or a list of encodings to this method that includes input_ids, but you provided ['text']
Please also remove/comment these lines: ```python tokenized_datasets = tokenized_datasets.remove_columns("attention_mask") tokenized_datasets = tokenized_datasets.remove_columns("input_ids") tokenized_datasets = tokenized_datasets.remove_columns("label") ```
### Describe the bug Following is my code that I am trying to run, but facing an error (have attached the whole error below): My code: ``` from collections import OrderedDict import warnings import flwr as fl import torch import numpy as np import random from torch.utils.data import DataLoader from...
190
16
ValueError: You should supply an encoding or a list of encodings to this method that includes input_ids, but you provided ['text'] ### Describe the bug Following is my code that I am trying to run, but facing an error (have attached the whole error below): My code: ``` from collections import OrderedDict imp...
[ -1.2584954500198364, -0.941353976726532, -0.6706098914146423, 1.5620760917663574, -0.12782131135463715, -1.0384528636932373, 0.11514334380626678, -1.174659252166748, 1.5971934795379639, -0.8362162113189697, 0.2784945070743561, -1.6470086574554443, 0.01891913264989853, -0.5115105509757996, ...
https://github.com/huggingface/datasets/issues/5765
ValueError: You should supply an encoding or a list of encodings to this method that includes input_ids, but you provided ['text']
Thanks @mariosasko . Now, I am trying out this [tutorial](https://flower.dev/docs/quickstart-huggingface.html) which basically trains distil-BERT with IMDB dataset (very similar to this [tutorial](https://huggingface.co/docs/transformers/main/tasks/sequence_classification)). But I don't know why my accuracy isn't in...
### Describe the bug Following is my code that I am trying to run, but facing an error (have attached the whole error below): My code: ``` from collections import OrderedDict import warnings import flwr as fl import torch import numpy as np import random from torch.utils.data import DataLoader from...
190
376
ValueError: You should supply an encoding or a list of encodings to this method that includes input_ids, but you provided ['text'] ### Describe the bug Following is my code that I am trying to run, but facing an error (have attached the whole error below): My code: ``` from collections import OrderedDict imp...
[ -1.2584954500198364, -0.941353976726532, -0.6706098914146423, 1.5620760917663574, -0.12782131135463715, -1.0384528636932373, 0.11514334380626678, -1.174659252166748, 1.5971934795379639, -0.8362162113189697, 0.2784945070743561, -1.6470086574554443, 0.01891913264989853, -0.5115105509757996, ...
https://github.com/huggingface/datasets/issues/5764
ConnectionError: Couldn't reach https://www.dropbox.com/s/zts98j4vkqtsns6/aclImdb_v2.tar?dl=1
Thanks for reporting, @sauravtii. Unfortunately, I'm not able to reproduce the issue: ```python In [1]: from datasets import load_dataset In [2]: ds = load_dataset("josianem/imdb") In [2]: ds Out[2]: DatasetDict({ train: Dataset({ features: ['text', 'label'], num_rows: 25799 })...
### Describe the bug I want to use this (https://huggingface.co/datasets/josianem/imdb) dataset therefore I am trying to load it using the following code: ``` dataset = load_dataset("josianem/imdb") ``` The dataset is not getting loaded and gives the error message as the following: ``` Traceback (most rece...
191
72
ConnectionError: Couldn't reach https://www.dropbox.com/s/zts98j4vkqtsns6/aclImdb_v2.tar?dl=1 ### Describe the bug I want to use this (https://huggingface.co/datasets/josianem/imdb) dataset therefore I am trying to load it using the following code: ``` dataset = load_dataset("josianem/imdb") ``` The dataset ...
[ -1.1990083456039429, -0.8942093253135681, -0.6647194027900696, 1.4132366180419922, -0.15078669786453247, -1.2496379613876343, 0.11945269256830215, -1.0314009189605713, 1.4859802722930908, -0.6882316470146179, 0.23124617338180542, -1.6536903381347656, -0.1239284798502922, -0.501595437526702...
https://github.com/huggingface/datasets/issues/5764
ConnectionError: Couldn't reach https://www.dropbox.com/s/zts98j4vkqtsns6/aclImdb_v2.tar?dl=1
Thanks @albertvillanova. I am facing another issue now ``` Traceback (most recent call last): File "sample.py", line 4, in <module> dataset = load_dataset("josianem/imdb") File "/home/saurav/.local/lib/python3.8/site-packages/datasets/load.py", line 1112, in load_dataset builder_instance.download_an...
### Describe the bug I want to use this (https://huggingface.co/datasets/josianem/imdb) dataset therefore I am trying to load it using the following code: ``` dataset = load_dataset("josianem/imdb") ``` The dataset is not getting loaded and gives the error message as the following: ``` Traceback (most rece...
191
99
ConnectionError: Couldn't reach https://www.dropbox.com/s/zts98j4vkqtsns6/aclImdb_v2.tar?dl=1 ### Describe the bug I want to use this (https://huggingface.co/datasets/josianem/imdb) dataset therefore I am trying to load it using the following code: ``` dataset = load_dataset("josianem/imdb") ``` The dataset ...
[ -1.1990083456039429, -0.8942093253135681, -0.6647194027900696, 1.4132366180419922, -0.15078669786453247, -1.2496379613876343, 0.11945269256830215, -1.0314009189605713, 1.4859802722930908, -0.6882316470146179, 0.23124617338180542, -1.6536903381347656, -0.1239284798502922, -0.501595437526702...
https://github.com/huggingface/datasets/issues/5764
ConnectionError: Couldn't reach https://www.dropbox.com/s/zts98j4vkqtsns6/aclImdb_v2.tar?dl=1
Your connection didn't work and you got an empty dataset (`num_bytes=0, num_examples=0`): ``` datasets.utils.info_utils.NonMatchingSplitsSizesError: [ { 'expected': SplitInfo(name='train', num_bytes=34501348, num_examples=25799, dataset_name='imdb'), 'recorded': SplitInfo(name='train', num_b...
### Describe the bug I want to use this (https://huggingface.co/datasets/josianem/imdb) dataset therefore I am trying to load it using the following code: ``` dataset = load_dataset("josianem/imdb") ``` The dataset is not getting loaded and gives the error message as the following: ``` Traceback (most rece...
191
145
ConnectionError: Couldn't reach https://www.dropbox.com/s/zts98j4vkqtsns6/aclImdb_v2.tar?dl=1 ### Describe the bug I want to use this (https://huggingface.co/datasets/josianem/imdb) dataset therefore I am trying to load it using the following code: ``` dataset = load_dataset("josianem/imdb") ``` The dataset ...
[ -1.1990083456039429, -0.8942093253135681, -0.6647194027900696, 1.4132366180419922, -0.15078669786453247, -1.2496379613876343, 0.11945269256830215, -1.0314009189605713, 1.4859802722930908, -0.6882316470146179, 0.23124617338180542, -1.6536903381347656, -0.1239284798502922, -0.501595437526702...
https://github.com/huggingface/datasets/issues/5764
ConnectionError: Couldn't reach https://www.dropbox.com/s/zts98j4vkqtsns6/aclImdb_v2.tar?dl=1
After pasting the link in the browser, it did start the download so it seems that the link is working. But even after including the `download_mode` in my code I am facing the same issue: Error: ``` Traceback (most recent call last): File "sample.py", line 4, in <module> dataset = load_dataset("josianem/imd...
### Describe the bug I want to use this (https://huggingface.co/datasets/josianem/imdb) dataset therefore I am trying to load it using the following code: ``` dataset = load_dataset("josianem/imdb") ``` The dataset is not getting loaded and gives the error message as the following: ``` Traceback (most rece...
191
148
ConnectionError: Couldn't reach https://www.dropbox.com/s/zts98j4vkqtsns6/aclImdb_v2.tar?dl=1 ### Describe the bug I want to use this (https://huggingface.co/datasets/josianem/imdb) dataset therefore I am trying to load it using the following code: ``` dataset = load_dataset("josianem/imdb") ``` The dataset ...
[ -1.1990083456039429, -0.8942093253135681, -0.6647194027900696, 1.4132366180419922, -0.15078669786453247, -1.2496379613876343, 0.11945269256830215, -1.0314009189605713, 1.4859802722930908, -0.6882316470146179, 0.23124617338180542, -1.6536903381347656, -0.1239284798502922, -0.501595437526702...
https://github.com/huggingface/datasets/issues/5764
ConnectionError: Couldn't reach https://www.dropbox.com/s/zts98j4vkqtsns6/aclImdb_v2.tar?dl=1
I have tried again to reproduce your issue without success: the dataset loads perfectly, both in my local machine and in a Colab notebook. - See: https://colab.research.google.com/drive/1dky3T0XGFuldggy22NNQQN-UqOFqvnuY?usp=sharing I think the cause maight be that you are using a very old version of `datasets`. Ple...
### Describe the bug I want to use this (https://huggingface.co/datasets/josianem/imdb) dataset therefore I am trying to load it using the following code: ``` dataset = load_dataset("josianem/imdb") ``` The dataset is not getting loaded and gives the error message as the following: ``` Traceback (most rece...
191
56
ConnectionError: Couldn't reach https://www.dropbox.com/s/zts98j4vkqtsns6/aclImdb_v2.tar?dl=1 ### Describe the bug I want to use this (https://huggingface.co/datasets/josianem/imdb) dataset therefore I am trying to load it using the following code: ``` dataset = load_dataset("josianem/imdb") ``` The dataset ...
[ -1.1990083456039429, -0.8942093253135681, -0.6647194027900696, 1.4132366180419922, -0.15078669786453247, -1.2496379613876343, 0.11945269256830215, -1.0314009189605713, 1.4859802722930908, -0.6882316470146179, 0.23124617338180542, -1.6536903381347656, -0.1239284798502922, -0.501595437526702...
https://github.com/huggingface/datasets/issues/5764
ConnectionError: Couldn't reach https://www.dropbox.com/s/zts98j4vkqtsns6/aclImdb_v2.tar?dl=1
That worked!! Thanks @albertvillanova : ) ``` Downloading builder script: 100%|███████| 4.20k/4.20k [00:00<00:00, 6.69MB/s] Downloading metadata: 100%|█████████████| 2.60k/2.60k [00:00<00:00, 3.41MB/s] Downloading readme: 100%|███████████████| 7.52k/7.52k [00:00<00:00, 12.6MB/s] Downloading and preparing dataset...
### Describe the bug I want to use this (https://huggingface.co/datasets/josianem/imdb) dataset therefore I am trying to load it using the following code: ``` dataset = load_dataset("josianem/imdb") ``` The dataset is not getting loaded and gives the error message as the following: ``` Traceback (most rece...
191
86
ConnectionError: Couldn't reach https://www.dropbox.com/s/zts98j4vkqtsns6/aclImdb_v2.tar?dl=1 ### Describe the bug I want to use this (https://huggingface.co/datasets/josianem/imdb) dataset therefore I am trying to load it using the following code: ``` dataset = load_dataset("josianem/imdb") ``` The dataset ...
[ -1.1990083456039429, -0.8942093253135681, -0.6647194027900696, 1.4132366180419922, -0.15078669786453247, -1.2496379613876343, 0.11945269256830215, -1.0314009189605713, 1.4859802722930908, -0.6882316470146179, 0.23124617338180542, -1.6536903381347656, -0.1239284798502922, -0.501595437526702...
https://github.com/huggingface/datasets/issues/5764
ConnectionError: Couldn't reach https://www.dropbox.com/s/zts98j4vkqtsns6/aclImdb_v2.tar?dl=1
That is because the cache got the "empty" download file the first time you tried and got the connection error. Then, once you no longer get the connection error, you need to refresh the cache by passing `download_mode="force_redownload"`.
### Describe the bug I want to use this (https://huggingface.co/datasets/josianem/imdb) dataset therefore I am trying to load it using the following code: ``` dataset = load_dataset("josianem/imdb") ``` The dataset is not getting loaded and gives the error message as the following: ``` Traceback (most rece...
191
38
ConnectionError: Couldn't reach https://www.dropbox.com/s/zts98j4vkqtsns6/aclImdb_v2.tar?dl=1 ### Describe the bug I want to use this (https://huggingface.co/datasets/josianem/imdb) dataset therefore I am trying to load it using the following code: ``` dataset = load_dataset("josianem/imdb") ``` The dataset ...
[ -1.1990083456039429, -0.8942093253135681, -0.6647194027900696, 1.4132366180419922, -0.15078669786453247, -1.2496379613876343, 0.11945269256830215, -1.0314009189605713, 1.4859802722930908, -0.6882316470146179, 0.23124617338180542, -1.6536903381347656, -0.1239284798502922, -0.501595437526702...
https://github.com/huggingface/datasets/issues/5762
Not able to load the pile
Thanks for reporting, @surya-narayanan. I see you already started a discussion about this on the Community tab of the corresponding dataset: https://huggingface.co/datasets/EleutherAI/the_pile/discussions/10 Let's continue the discussion there!
### Describe the bug Got this error when I am trying to load the pile dataset ``` TypeError: Couldn't cast array of type struct<file: string, id: string> to {'id': Value(dtype='string', id=None)} ``` ### Steps to reproduce the bug Please visit the following sample notebook https://colab.research.goo...
192
27
Not able to load the pile ### Describe the bug Got this error when I am trying to load the pile dataset ``` TypeError: Couldn't cast array of type struct<file: string, id: string> to {'id': Value(dtype='string', id=None)} ``` ### Steps to reproduce the bug Please visit the following sample notebook ...
[ -1.1503949165344238, -0.8827037811279297, -0.833561897277832, 1.488810658454895, -0.14794182777404785, -1.234551191329956, 0.10123256593942642, -0.9867702722549438, 1.6254383325576782, -0.7256696820259094, 0.34879013895988464, -1.631890058517456, 0.012324993498623371, -0.5837557315826416, ...
https://github.com/huggingface/datasets/issues/5761
One or several metadata.jsonl were found, but not in the same directory or in a parent directory
Also, when generated from a zip archive, the dataset contains only a few images. In my case, 20 versus 2000+ contained in the archive. The generation from folders works as expected.
### Describe the bug An attempt to generate a dataset from a zip archive using imagefolder and metadata.jsonl does not lead to the expected result. Tried all possible locations of the json file: the file in the archive is ignored (generated dataset contains only images), the file next to the archive like [here](http...
193
31
One or several metadata.jsonl were found, but not in the same directory or in a parent directory ### Describe the bug An attempt to generate a dataset from a zip archive using imagefolder and metadata.jsonl does not lead to the expected result. Tried all possible locations of the json file: the file in the archive...
[ -1.209661841392517, -0.8102579116821289, -0.6038259267807007, 1.490384817123413, 0.03481699898838997, -1.4131840467453003, 0.09134402871131897, -0.9125491976737976, 1.663573145866394, -0.9149445295333862, 0.3563386797904968, -1.6670163869857788, 0.13531334698200226, -0.7037384510040283, ...
https://github.com/huggingface/datasets/issues/5761
One or several metadata.jsonl were found, but not in the same directory or in a parent directory
Thanks for reporting, @blghtr. You should include the `metadata.jsonl` in your ZIP archives, at the root level directory. I agree that our documentation is not clear enough. Maybe we could improve it.
### Describe the bug An attempt to generate a dataset from a zip archive using imagefolder and metadata.jsonl does not lead to the expected result. Tried all possible locations of the json file: the file in the archive is ignored (generated dataset contains only images), the file next to the archive like [here](http...
193
32
One or several metadata.jsonl were found, but not in the same directory or in a parent directory ### Describe the bug An attempt to generate a dataset from a zip archive using imagefolder and metadata.jsonl does not lead to the expected result. Tried all possible locations of the json file: the file in the archive...
[ -1.209661841392517, -0.8102579116821289, -0.6038259267807007, 1.490384817123413, 0.03481699898838997, -1.4131840467453003, 0.09134402871131897, -0.9125491976737976, 1.663573145866394, -0.9149445295333862, 0.3563386797904968, -1.6670163869857788, 0.13531334698200226, -0.7037384510040283, ...
https://github.com/huggingface/datasets/issues/5761
One or several metadata.jsonl were found, but not in the same directory or in a parent directory
You can find a dummy dataset example here: https://huggingface.co/datasets/albertvillanova/tmp-imagefolder-metadata ``` tmp-imagefolder-metadata/ └── data/ ├── train.zip └── valid.zip ``` where, the directory structure within the `train.zip` archive is: ``` metadata.jsonl train/ ├── bharatanaty...
### Describe the bug An attempt to generate a dataset from a zip archive using imagefolder and metadata.jsonl does not lead to the expected result. Tried all possible locations of the json file: the file in the archive is ignored (generated dataset contains only images), the file next to the archive like [here](http...
193
54
One or several metadata.jsonl were found, but not in the same directory or in a parent directory ### Describe the bug An attempt to generate a dataset from a zip archive using imagefolder and metadata.jsonl does not lead to the expected result. Tried all possible locations of the json file: the file in the archive...
[ -1.209661841392517, -0.8102579116821289, -0.6038259267807007, 1.490384817123413, 0.03481699898838997, -1.4131840467453003, 0.09134402871131897, -0.9125491976737976, 1.663573145866394, -0.9149445295333862, 0.3563386797904968, -1.6670163869857788, 0.13531334698200226, -0.7037384510040283, ...
https://github.com/huggingface/datasets/issues/5760
Multi-image loading in Imagefolder dataset
Supporting this could be useful (I remember a use-case for this on the Hub). Do you agree @polinaeterna? Implementing this should be possible if we iterate over metadata files and build image/audio file paths instead of iterating over image/audio files and looking for the corresponding entries in metadata files.
### Feature request Extend the `imagefolder` dataloading script to support loading multiple images per dataset entry. This only really makes sense if a metadata file is present. Currently you can use the following format (example `metadata.jsonl`: ``` {'file_name': 'path_to_image.png', 'metadata': ...} ... `...
194
49
Multi-image loading in Imagefolder dataset ### Feature request Extend the `imagefolder` dataloading script to support loading multiple images per dataset entry. This only really makes sense if a metadata file is present. Currently you can use the following format (example `metadata.jsonl`: ``` {'file_name': ...
[ -1.186087727546692, -0.9723941087722778, -0.8205204606056213, 1.470719814300537, -0.2228822261095047, -1.3096250295639038, 0.17784889042377472, -1.1011343002319336, 1.7495099306106567, -0.9506685137748718, 0.3123093247413635, -1.6374276876449585, 0.0869799479842186, -0.6287729144096375, ...
https://github.com/huggingface/datasets/issues/5760
Multi-image loading in Imagefolder dataset
I've build a similar feature from scratch and would be interested to combine it with the datasets package. My solution works something like this: Interpret the first element of each column as a file path. If the path exists and is a file, (try to) load the files for the entire column. Thereby, one isn't restricted ...
### Feature request Extend the `imagefolder` dataloading script to support loading multiple images per dataset entry. This only really makes sense if a metadata file is present. Currently you can use the following format (example `metadata.jsonl`: ``` {'file_name': 'path_to_image.png', 'metadata': ...} ... `...
194
97
Multi-image loading in Imagefolder dataset ### Feature request Extend the `imagefolder` dataloading script to support loading multiple images per dataset entry. This only really makes sense if a metadata file is present. Currently you can use the following format (example `metadata.jsonl`: ``` {'file_name': ...
[ -1.213863492012024, -0.9794521331787109, -0.8510636687278748, 1.4789533615112305, -0.16551458835601807, -1.274858832359314, 0.11515790224075317, -1.1478337049484253, 1.7242285013198853, -0.8889589905738831, 0.2950459420681, -1.6864246129989624, 0.05266019329428673, -0.6685431003570557, -...
https://github.com/huggingface/datasets/issues/5759
Can I load in list of list of dict format?
Thanks for reporting, @LZY-the-boys. Could you please give more details about what is your intended dataset structure? What are the names of the columns and the value of each row? Currently, the JSON-Lines format is supported: - Each line correspond to one row of the dataset - Each line is composed of one JSON ...
### Feature request my jsonl dataset has following format: ``` [{'input':xxx, 'output':xxx},{'input:xxx,'output':xxx},...] [{'input':xxx, 'output':xxx},{'input:xxx,'output':xxx},...] ``` I try to use `datasets.load_dataset('json', data_files=path)` or `datasets.Dataset.from_json`, it raises ``` File "site-p...
195
74
Can I load in list of list of dict format? ### Feature request my jsonl dataset has following format: ``` [{'input':xxx, 'output':xxx},{'input:xxx,'output':xxx},...] [{'input':xxx, 'output':xxx},{'input:xxx,'output':xxx},...] ``` I try to use `datasets.load_dataset('json', data_files=path)` or `datasets.Data...
[ -1.2257397174835205, -0.9827357530593872, -0.6612416505813599, 1.4746675491333008, -0.14010222256183624, -1.2278847694396973, 0.164842426776886, -1.0968141555786133, 1.714120626449585, -0.8183811902999878, 0.18215544521808624, -1.7052286863327026, -0.008861989714205265, -0.5882065296173096...
https://github.com/huggingface/datasets/issues/5756
Calling shuffle on a IterableDataset with streaming=True, gives "ValueError: cannot reshape array"
Thanks, this appears to have fixed the issue. I've created a PR for the same change in the mnist dataset: https://huggingface.co/datasets/mnist/discussions/3/files
### Describe the bug When calling shuffle on a IterableDataset with streaming=True, I get the following error: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/administrator/Documents/Projects/huggingface/jax-diffusers-sprint-consistency-models/virtualenv/lib/python3.1...
196
21
Calling shuffle on a IterableDataset with streaming=True, gives "ValueError: cannot reshape array" ### Describe the bug When calling shuffle on a IterableDataset with streaming=True, I get the following error: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/administ...
[ -1.2316917181015015, -0.9483445882797241, -0.6746276617050171, 1.4856078624725342, -0.055223386734724045, -1.3221584558486938, 0.15637320280075073, -0.9741907119750977, 1.5275156497955322, -0.7414683699607849, 0.31699270009994507, -1.7013713121414185, -0.058053143322467804, -0.543770670890...
https://github.com/huggingface/datasets/issues/5753
[IterableDatasets] Add column followed by interleave datasets gives bogus outputs
Problem with the code snippet! Using global vars and functions was not a good idea with iterable datasets! If we update to: ```python from datasets import load_dataset original_dataset = load_dataset("librispeech_asr", "clean", split="validation", streaming=True) # now add a new column to our streaming datas...
### Describe the bug If we add a new column to our iterable dataset using the hack described in #5752, when we then interleave datasets the new column is pinned to one value. ### Steps to reproduce the bug What we're going to do here is: 1. Load an iterable dataset in streaming mode (`original_dataset`) 2. A...
198
235
[IterableDatasets] Add column followed by interleave datasets gives bogus outputs ### Describe the bug If we add a new column to our iterable dataset using the hack described in #5752, when we then interleave datasets the new column is pinned to one value. ### Steps to reproduce the bug What we're going to d...
[ -1.3051925897598267, -0.8824840784072876, -0.7891518473625183, 1.4508460760116577, -0.16551750898361206, -1.1660054922103882, 0.19871339201927185, -1.1297521591186523, 1.6660099029541016, -0.8249762058258057, 0.3997577428817749, -1.6987557411193848, 0.026242636144161224, -0.560241460800170...
https://github.com/huggingface/datasets/issues/5752
Streaming dataset looses `.feature` method after `.add_column`
I believe the issue resides in this line: https://github.com/huggingface/datasets/blob/7c3a9b057c476c40d157bd7a5d57f49066239df0/src/datasets/iterable_dataset.py#L1415 If we pass the **new** features of the dataset to the `.map` method we can return the features after adding a column, e.g.: ```python from datasets...
### Describe the bug After appending a new column to a streaming dataset using `.add_column`, we can no longer access the list of dataset features using the `.feature` method. ### Steps to reproduce the bug ```python from datasets import load_dataset original_dataset = load_dataset("librispeech_asr", "clean", sp...
199
133
Streaming dataset looses `.feature` method after `.add_column` ### Describe the bug After appending a new column to a streaming dataset using `.add_column`, we can no longer access the list of dataset features using the `.feature` method. ### Steps to reproduce the bug ```python from datasets import load_dataset ...
[ -1.1994818449020386, -0.7978154420852661, -0.6096169948577881, 1.4507285356521606, -0.018946077674627304, -1.4118489027023315, 0.13118764758110046, -0.8869804739952087, 1.7090446949005127, -0.9088021516799927, 0.3055391311645508, -1.7455086708068848, 0.031036552041769028, -0.67025351524353...
https://github.com/huggingface/datasets/issues/5750
Fail to create datasets from a generator when using Google Big Query
`from_generator` expects a generator function, not a generator object, so this should work: ```python from datasets import Dataset from google.cloud import bigquery client = bigquery.Client() def gen() # Perform a query. QUERY = ( 'SELECT name FROM `bigquery-public-data.usa_names.usa_1910_20...
### Describe the bug Creating a dataset from a generator using `Dataset.from_generator()` fails if the generator is the [Google Big Query Python client](https://cloud.google.com/python/docs/reference/bigquery/latest). The problem is that the Big Query client is not pickable. And the function `create_config_id` tries t...
200
70
Fail to create datasets from a generator when using Google Big Query ### Describe the bug Creating a dataset from a generator using `Dataset.from_generator()` fails if the generator is the [Google Big Query Python client](https://cloud.google.com/python/docs/reference/bigquery/latest). The problem is that the Big Qu...
[ -1.1602425575256348, -0.9704848527908325, -0.7141411900520325, 1.5880135297775269, -0.15210165083408356, -1.299296498298645, 0.14538878202438354, -1.081978678703308, 1.7068805694580078, -0.8078023791313171, 0.3324308395385742, -1.667130708694458, 0.09479494392871857, -0.5644509792327881, ...
https://github.com/huggingface/datasets/issues/5750
Fail to create datasets from a generator when using Google Big Query
@mariosasko your code was incomplete, so I tried to fix it: ```py from datasets import Dataset from google.cloud import bigquery client = bigquery.Client() def gen(): # Perform a query. QUERY = ( 'SELECT name FROM `bigquery-public-data.usa_names.usa_1910_2013` ' 'WHERE state = "T...
### Describe the bug Creating a dataset from a generator using `Dataset.from_generator()` fails if the generator is the [Google Big Query Python client](https://cloud.google.com/python/docs/reference/bigquery/latest). The problem is that the Big Query client is not pickable. And the function `create_config_id` tries t...
200
128
Fail to create datasets from a generator when using Google Big Query ### Describe the bug Creating a dataset from a generator using `Dataset.from_generator()` fails if the generator is the [Google Big Query Python client](https://cloud.google.com/python/docs/reference/bigquery/latest). The problem is that the Big Qu...
[ -1.1789183616638184, -0.9633180499076843, -0.7198936343193054, 1.59357488155365, -0.15438123047351837, -1.2759674787521362, 0.1383015364408493, -1.0713728666305542, 1.6924629211425781, -0.7986466288566589, 0.3237428367137909, -1.6632311344146729, 0.10667881369590759, -0.5385645031929016, ...
https://github.com/huggingface/datasets/issues/5750
Fail to create datasets from a generator when using Google Big Query
It does matter: this function expects a generator function, as stated in the docs. This should work: ```python from datasets import Dataset from google.cloud import bigquery def gen(): client = bigquery.Client() # Perform a query. QUERY = ( 'SELECT name FROM `bigquery-public-data.usa_na...
### Describe the bug Creating a dataset from a generator using `Dataset.from_generator()` fails if the generator is the [Google Big Query Python client](https://cloud.google.com/python/docs/reference/bigquery/latest). The problem is that the Big Query client is not pickable. And the function `create_config_id` tries t...
200
128
Fail to create datasets from a generator when using Google Big Query ### Describe the bug Creating a dataset from a generator using `Dataset.from_generator()` fails if the generator is the [Google Big Query Python client](https://cloud.google.com/python/docs/reference/bigquery/latest). The problem is that the Big Qu...
[ -1.1777536869049072, -0.9725047945976257, -0.7136372327804565, 1.5906951427459717, -0.15301071107387543, -1.295021653175354, 0.1304517537355423, -1.074754238128662, 1.7167811393737793, -0.806781530380249, 0.3186870217323303, -1.6626815795898438, 0.10338040441274643, -0.5449557304382324, ...
https://github.com/huggingface/datasets/issues/5750
Fail to create datasets from a generator when using Google Big Query
Thank you @mariosasko . Your last code is working indeed. Curiously, the important detail here was to wrap the client instantiation within the generator itself. If the line `client = bigquery.Client()` is moved outside, then the error is back. I see now also your point in regard to the generator being a generator fu...
### Describe the bug Creating a dataset from a generator using `Dataset.from_generator()` fails if the generator is the [Google Big Query Python client](https://cloud.google.com/python/docs/reference/bigquery/latest). The problem is that the Big Query client is not pickable. And the function `create_config_id` tries t...
200
62
Fail to create datasets from a generator when using Google Big Query ### Describe the bug Creating a dataset from a generator using `Dataset.from_generator()` fails if the generator is the [Google Big Query Python client](https://cloud.google.com/python/docs/reference/bigquery/latest). The problem is that the Big Qu...
[ -1.1811081171035767, -0.9616960287094116, -0.7690979838371277, 1.5323928594589233, -0.14209146797657013, -1.2693719863891602, 0.13528288900852203, -1.0998899936676025, 1.7323766946792603, -0.7927662134170532, 0.3175896108150482, -1.6636838912963867, 0.09437628090381622, -0.5398527979850769...
https://github.com/huggingface/datasets/issues/5749
AttributeError: 'Version' object has no attribute 'match'
I got the same error, and the official website for visual genome is down. Did you solve this problem?
### Describe the bug When I run from datasets import load_dataset data = load_dataset("visual_genome", 'region_descriptions_v1.2.0') AttributeError: 'Version' object has no attribute 'match' ### Steps to reproduce the bug from datasets import load_dataset data = load_dataset("visual_genome", 'region_descripti...
201
19
AttributeError: 'Version' object has no attribute 'match' ### Describe the bug When I run from datasets import load_dataset data = load_dataset("visual_genome", 'region_descriptions_v1.2.0') AttributeError: 'Version' object has no attribute 'match' ### Steps to reproduce the bug from datasets import load_dat...
[ -1.2199641466140747, -0.8849989175796509, -0.4521122872829437, 1.3732024431228638, -0.02820592187345028, -1.3224425315856934, 0.126606747508049, -0.8853461146354675, 1.5554863214492798, -0.8962793350219727, 0.21222303807735443, -1.7204601764678955, 0.05587225407361984, -0.6369990110397339,...
https://github.com/huggingface/datasets/issues/5749
AttributeError: 'Version' object has no attribute 'match'
Apart form data host server being down, there is an additional issue with the `datasets` library introduced by this PR: - #5238 I am working to fix it.
### Describe the bug When I run from datasets import load_dataset data = load_dataset("visual_genome", 'region_descriptions_v1.2.0') AttributeError: 'Version' object has no attribute 'match' ### Steps to reproduce the bug from datasets import load_dataset data = load_dataset("visual_genome", 'region_descripti...
201
28
AttributeError: 'Version' object has no attribute 'match' ### Describe the bug When I run from datasets import load_dataset data = load_dataset("visual_genome", 'region_descriptions_v1.2.0') AttributeError: 'Version' object has no attribute 'match' ### Steps to reproduce the bug from datasets import load_dat...
[ -1.2199641466140747, -0.8849989175796509, -0.4521122872829437, 1.3732024431228638, -0.02820592187345028, -1.3224425315856934, 0.126606747508049, -0.8853461146354675, 1.5554863214492798, -0.8962793350219727, 0.21222303807735443, -1.7204601764678955, 0.05587225407361984, -0.6369990110397339,...
https://github.com/huggingface/datasets/issues/5749
AttributeError: 'Version' object has no attribute 'match'
For the issue with their data host server being down, I have opened a discussion in the "Community" tab of the Hub dataset: https://huggingface.co/datasets/visual_genome/discussions/3 Let's continue the discussion there.
### Describe the bug When I run from datasets import load_dataset data = load_dataset("visual_genome", 'region_descriptions_v1.2.0') AttributeError: 'Version' object has no attribute 'match' ### Steps to reproduce the bug from datasets import load_dataset data = load_dataset("visual_genome", 'region_descripti...
201
29
AttributeError: 'Version' object has no attribute 'match' ### Describe the bug When I run from datasets import load_dataset data = load_dataset("visual_genome", 'region_descriptions_v1.2.0') AttributeError: 'Version' object has no attribute 'match' ### Steps to reproduce the bug from datasets import load_dat...
[ -1.2199641466140747, -0.8849989175796509, -0.4521122872829437, 1.3732024431228638, -0.02820592187345028, -1.3224425315856934, 0.126606747508049, -0.8853461146354675, 1.5554863214492798, -0.8962793350219727, 0.21222303807735443, -1.7204601764678955, 0.05587225407361984, -0.6369990110397339,...
https://github.com/huggingface/datasets/issues/5749
AttributeError: 'Version' object has no attribute 'match'
The authors just replied to us with their new URL: https://homes.cs.washington.edu/~ranjay/visualgenome/ We have fixed the datasets loading script, which is operative again.
### Describe the bug When I run from datasets import load_dataset data = load_dataset("visual_genome", 'region_descriptions_v1.2.0') AttributeError: 'Version' object has no attribute 'match' ### Steps to reproduce the bug from datasets import load_dataset data = load_dataset("visual_genome", 'region_descripti...
201
22
AttributeError: 'Version' object has no attribute 'match' ### Describe the bug When I run from datasets import load_dataset data = load_dataset("visual_genome", 'region_descriptions_v1.2.0') AttributeError: 'Version' object has no attribute 'match' ### Steps to reproduce the bug from datasets import load_dat...
[ -1.2199641466140747, -0.8849989175796509, -0.4521122872829437, 1.3732024431228638, -0.02820592187345028, -1.3224425315856934, 0.126606747508049, -0.8853461146354675, 1.5554863214492798, -0.8962793350219727, 0.21222303807735443, -1.7204601764678955, 0.05587225407361984, -0.6369990110397339,...
https://github.com/huggingface/datasets/issues/5744
[BUG] With Pandas 2.0.0, `load_dataset` raises `TypeError: read_csv() got an unexpected keyword argument 'mangle_dupe_cols'`
Thanks for reporting, @keyboardAnt. We haven't noticed any crash in our CI tests. Could you please indicate specifically the `load_dataset` command that crashes in your side, so that we can reproduce it?
The `load_dataset` function with Pandas `1.5.3` has no issue (just a FutureWarning) but crashes with Pandas `2.0.0`. For your convenience, I opened a draft Pull Request to fix it quickly: https://github.com/huggingface/datasets/pull/5745 --- * The FutureWarning mentioned above: ``` FutureWarning: the 'mangle_...
202
32
[BUG] With Pandas 2.0.0, `load_dataset` raises `TypeError: read_csv() got an unexpected keyword argument 'mangle_dupe_cols'` The `load_dataset` function with Pandas `1.5.3` has no issue (just a FutureWarning) but crashes with Pandas `2.0.0`. For your convenience, I opened a draft Pull Request to fix it quickly: http...
[ -1.1840198040008545, -0.9789693355560303, -0.7929209470748901, 1.5074223279953003, -0.11499737203121185, -1.2979925870895386, 0.13432368636131287, -1.077908992767334, 1.7249536514282227, -0.8257623314857483, 0.41408878564834595, -1.7120393514633179, -0.05658727139234543, -0.678351104259491...
https://github.com/huggingface/datasets/issues/5743
dataclass.py in virtual environment is overriding the stdlib module "dataclasses"
We no longer depend on `dataclasses` (for almost a year), so I don't think our package is the problematic one. I think it makes more sense to raise this issue in the `dataclasses` repo: https://github.com/ericvsmith/dataclasses.
### Describe the bug "e:\Krish_naik\FSDSRegression\venv\Lib\dataclasses.py" is overriding the stdlib module "dataclasses" ### Steps to reproduce the bug module issue ### Expected behavior overriding the stdlib module "dataclasses" ### Environment info VS code
203
35
dataclass.py in virtual environment is overriding the stdlib module "dataclasses" ### Describe the bug "e:\Krish_naik\FSDSRegression\venv\Lib\dataclasses.py" is overriding the stdlib module "dataclasses" ### Steps to reproduce the bug module issue ### Expected behavior overriding the stdlib module "dataclasse...
[ -1.0500757694244385, -0.9146837592124939, -0.8437395691871643, 1.5728400945663452, -0.12189023196697235, -1.3173366785049438, 0.2661341428756714, -1.0739164352416992, 1.6791114807128906, -0.7407525777816772, 0.2066497504711151, -1.699449062347412, -0.02530619129538536, -0.4475930333137512,...
https://github.com/huggingface/datasets/issues/5739
weird result during dataset split when data path starts with `/data`
hi! I think you can run python from `/data/train/raw/` directory and load dataset as `load_dataset("code_contests")` to mitigate this issue as a workaround. @ericxsun Do you want to open a PR to fix the regex? As you already found the solution :)
### Describe the bug The regex defined here https://github.com/huggingface/datasets/blob/f2607935c4e45c70c44fcb698db0363ca7ba83d4/src/datasets/utils/py_utils.py#L158 will cause a weird result during dataset split when data path starts with `/data` ### Steps to reproduce the bug 1. clone dataset into local path ...
204
41
weird result during dataset split when data path starts with `/data` ### Describe the bug The regex defined here https://github.com/huggingface/datasets/blob/f2607935c4e45c70c44fcb698db0363ca7ba83d4/src/datasets/utils/py_utils.py#L158 will cause a weird result during dataset split when data path starts with `/da...
[ -1.219397783279419, -0.8116105198860168, -0.7386140823364258, 1.5036342144012451, -0.010847043246030807, -1.2460169792175293, 0.045154087245464325, -1.0038526058197021, 1.6462818384170532, -0.7914738059043884, 0.2931199073791504, -1.767613172531128, -0.10710494220256805, -0.636674106121063...
https://github.com/huggingface/datasets/issues/5739
weird result during dataset split when data path starts with `/data`
> hi! I think you can run python from `/data/train/raw/` directory and load dataset as `load_dataset("code_contests")` to mitigate this issue as a workaround. @ericxsun Do you want to open a PR to fix the regex? As you already found the solution :) Sure, please see https://github.com/huggingface/datasets/pull/5748 ...
### Describe the bug The regex defined here https://github.com/huggingface/datasets/blob/f2607935c4e45c70c44fcb698db0363ca7ba83d4/src/datasets/utils/py_utils.py#L158 will cause a weird result during dataset split when data path starts with `/data` ### Steps to reproduce the bug 1. clone dataset into local path ...
204
47
weird result during dataset split when data path starts with `/data` ### Describe the bug The regex defined here https://github.com/huggingface/datasets/blob/f2607935c4e45c70c44fcb698db0363ca7ba83d4/src/datasets/utils/py_utils.py#L158 will cause a weird result during dataset split when data path starts with `/da...
[ -1.219397783279419, -0.8116105198860168, -0.7386140823364258, 1.5036342144012451, -0.010847043246030807, -1.2460169792175293, 0.045154087245464325, -1.0038526058197021, 1.6462818384170532, -0.7914738059043884, 0.2931199073791504, -1.767613172531128, -0.10710494220256805, -0.636674106121063...
https://github.com/huggingface/datasets/issues/5739
weird result during dataset split when data path starts with `/data`
I think `string_to_dict` is ok, and that the issue is that it gets `'/data2/train/raw/code_contests/data/test-00000-of-00001-9c49eeff30aacaa8.parquet'` as input instead of `'data/test-00000-of-00001-9c49eeff30aacaa8.parquet'`. The path should be relative to the directory being loaded by `load_dataset`
### Describe the bug The regex defined here https://github.com/huggingface/datasets/blob/f2607935c4e45c70c44fcb698db0363ca7ba83d4/src/datasets/utils/py_utils.py#L158 will cause a weird result during dataset split when data path starts with `/data` ### Steps to reproduce the bug 1. clone dataset into local path ...
204
31
weird result during dataset split when data path starts with `/data` ### Describe the bug The regex defined here https://github.com/huggingface/datasets/blob/f2607935c4e45c70c44fcb698db0363ca7ba83d4/src/datasets/utils/py_utils.py#L158 will cause a weird result during dataset split when data path starts with `/da...
[ -1.219397783279419, -0.8116105198860168, -0.7386140823364258, 1.5036342144012451, -0.010847043246030807, -1.2460169792175293, 0.045154087245464325, -1.0038526058197021, 1.6462818384170532, -0.7914738059043884, 0.2931199073791504, -1.767613172531128, -0.10710494220256805, -0.636674106121063...
https://github.com/huggingface/datasets/issues/5738
load_dataset("text","dataset.txt") loads the wrong dataset!
You need to provide a text file as `data_files`, not as a configuration: ```python my_dataset = load_dataset("text", data_files="TextFile.txt") ``` Otherwise, since `data_files` is `None`, it picks up Colab's sample datasets from the `content` dir.
### Describe the bug I am trying to load my own custom text dataset using the load_dataset function. My dataset is a bunch of ordered text, think along the lines of shakespeare plays. However, after I load the dataset and I inspect it, the dataset is a table with a bunch of latitude and longitude values! What in th...
205
34
load_dataset("text","dataset.txt") loads the wrong dataset! ### Describe the bug I am trying to load my own custom text dataset using the load_dataset function. My dataset is a bunch of ordered text, think along the lines of shakespeare plays. However, after I load the dataset and I inspect it, the dataset is a ta...
[ -1.1189857721328735, -0.9436991810798645, -0.8247067928314209, 1.3786360025405884, -0.22442679107189178, -1.3861899375915527, 0.18883627653121948, -1.1409183740615845, 1.6936867237091064, -0.9340497255325317, 0.2550179362297058, -1.7659624814987183, 0.0692157968878746, -0.5596188306808472,...
https://github.com/huggingface/datasets/issues/5737
ClassLabel Error
Hi, you can use the `cast_column` function to change the feature type from a `Value(int64)` to `ClassLabel`: ```py dataset = dataset.cast_column("label", ClassLabel(names=["label_1", "label_2", "label_3"])) print(dataset.features) {'text': Value(dtype='string', id=None), 'label': ClassLabel(names=['label_1', 'l...
### Describe the bug I still getting the error "call() takes 1 positional argument but 2 were given" even after ensuring that the value being passed to the label object is a single value and that the ClassLabel object has been created with the correct number of label classes ### Steps to reproduce the bug from...
206
34
ClassLabel Error ### Describe the bug I still getting the error "call() takes 1 positional argument but 2 were given" even after ensuring that the value being passed to the label object is a single value and that the ClassLabel object has been created with the correct number of label classes ### Steps to repro...
[ -1.243262767791748, -0.9444183707237244, -0.7507571578025818, 1.6136642694473267, -0.2208191305398941, -1.0991207361221313, 0.14698971807956696, -1.1070612668991089, 1.6098380088806152, -0.7835369110107422, 0.24456560611724854, -1.648578405380249, -0.012350648641586304, -0.6137617826461792...
https://github.com/huggingface/datasets/issues/5736
FORCE_REDOWNLOAD raises "Directory not empty" exception on second run
Hi ! I couldn't reproduce your issue :/ It seems that `shutil.rmtree` failed. It is supposed to work even if the directory is not empty, but you still end up with `OSError: [Errno 39] Directory not empty:`. Can you make sure another process is not using this directory at the same time ?
### Describe the bug Running `load_dataset(..., download_mode=datasets.DownloadMode.FORCE_REDOWNLOAD)` twice raises a `Directory not empty` exception on the second run. ### Steps to reproduce the bug I cannot test this on datasets v2.11.0 due to #5711, but this happens in v2.10.1. 1. Set up a script `my_dataset.p...
207
53
FORCE_REDOWNLOAD raises "Directory not empty" exception on second run ### Describe the bug Running `load_dataset(..., download_mode=datasets.DownloadMode.FORCE_REDOWNLOAD)` twice raises a `Directory not empty` exception on the second run. ### Steps to reproduce the bug I cannot test this on datasets v2.11.0 due to...
[ -1.1953952312469482, -0.929840087890625, -0.665449321269989, 1.4092156887054443, -0.14482204616069794, -1.2387173175811768, 0.15087050199508667, -1.0500991344451904, 1.6761659383773804, -0.7755241990089417, 0.21376854181289673, -1.6455949544906616, -0.08541421592235565, -0.4852448105812073...
https://github.com/huggingface/datasets/issues/5732
Enwik8 should support the standard split
The Enwik8 pipeline is not present in this codebase, and is hosted elsewhere. I have opened a PR [there](https://huggingface.co/datasets/enwik8/discussions/4) instead.
### Feature request The HuggingFace Datasets library currently supports two BuilderConfigs for Enwik8. One config yields individual lines as examples, while the other config yields the entire dataset as a single example. Both support only a monolithic split: it is all grouped as "train". The HuggingFace Datasets l...
208
20
Enwik8 should support the standard split ### Feature request The HuggingFace Datasets library currently supports two BuilderConfigs for Enwik8. One config yields individual lines as examples, while the other config yields the entire dataset as a single example. Both support only a monolithic split: it is all grouped...
[ -1.2371957302093506, -0.936003565788269, -0.7482637166976929, 1.3958410024642944, -0.1406141221523285, -1.2569221258163452, 0.13435989618301392, -1.0947506427764893, 1.6611647605895996, -0.7288448214530945, 0.2676408588886261, -1.7059106826782227, -0.012029415927827358, -0.5493984222412109...
https://github.com/huggingface/datasets/issues/5727
load_dataset fails with FileNotFound error on Windows
Hi! Can you please paste the entire error stack trace, not only the last few lines?
### Describe the bug Although I can import and run the datasets library in a Colab environment, I cannot successfully load any data on my own machine (Windows 10) despite following the install steps: (1) create conda environment (2) activate environment (3) install with: ``conda` install -c huggingface -c conda-...
209
16
load_dataset fails with FileNotFound error on Windows ### Describe the bug Although I can import and run the datasets library in a Colab environment, I cannot successfully load any data on my own machine (Windows 10) despite following the install steps: (1) create conda environment (2) activate environment (3)...
[ -1.2770172357559204, -0.9197495579719543, -0.7580211758613586, 1.4451946020126343, -0.17076341807842255, -1.3406909704208374, 0.10580836981534958, -1.0527589321136475, 1.7266324758529663, -0.8303958773612976, 0.23863640427589417, -1.6874346733093262, 0.08473846316337585, -0.602720558643341...
https://github.com/huggingface/datasets/issues/5727
load_dataset fails with FileNotFound error on Windows
`----> 1 dataset = datasets.load_dataset("glue", "ax") File ~\anaconda3\envs\huggingface\Lib\site-packages\datasets\load.py:1767, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision...
### Describe the bug Although I can import and run the datasets library in a Colab environment, I cannot successfully load any data on my own machine (Windows 10) despite following the install steps: (1) create conda environment (2) activate environment (3) install with: ``conda` install -c huggingface -c conda-...
209
217
load_dataset fails with FileNotFound error on Windows ### Describe the bug Although I can import and run the datasets library in a Colab environment, I cannot successfully load any data on my own machine (Windows 10) despite following the install steps: (1) create conda environment (2) activate environment (3)...
[ -1.2770172357559204, -0.9197495579719543, -0.7580211758613586, 1.4451946020126343, -0.17076341807842255, -1.3406909704208374, 0.10580836981534958, -1.0527589321136475, 1.7266324758529663, -0.8303958773612976, 0.23863640427589417, -1.6874346733093262, 0.08473846316337585, -0.602720558643341...
https://github.com/huggingface/datasets/issues/5727
load_dataset fails with FileNotFound error on Windows
Okay, this is the issue: ``` FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\...\\.cache\\huggingface' ``` I don't remember seeing this error before. I guess it could happen in a multi-process environment if one of the processes deletes the `datasets` cache as the othe...
### Describe the bug Although I can import and run the datasets library in a Colab environment, I cannot successfully load any data on my own machine (Windows 10) despite following the install steps: (1) create conda environment (2) activate environment (3) install with: ``conda` install -c huggingface -c conda-...
209
80
load_dataset fails with FileNotFound error on Windows ### Describe the bug Although I can import and run the datasets library in a Colab environment, I cannot successfully load any data on my own machine (Windows 10) despite following the install steps: (1) create conda environment (2) activate environment (3)...
[ -1.2770172357559204, -0.9197495579719543, -0.7580211758613586, 1.4451946020126343, -0.17076341807842255, -1.3406909704208374, 0.10580836981534958, -1.0527589321136475, 1.7266324758529663, -0.8303958773612976, 0.23863640427589417, -1.6874346733093262, 0.08473846316337585, -0.602720558643341...
https://github.com/huggingface/datasets/issues/5725
How to limit the number of examples in dataset, for testing?
Hi! You can use the `nrows` parameter for this: ```python data = load_dataset("json", data_files=data_path, nrows=10) ```
### Describe the bug I am using this command: `data = load_dataset("json", data_files=data_path)` However, I want to add a parameter, to limit the number of loaded examples to be 10, for development purposes, but can't find this simple parameter. ### Steps to reproduce the bug In the description. ### Expected beh...
211
16
How to limit the number of examples in dataset, for testing? ### Describe the bug I am using this command: `data = load_dataset("json", data_files=data_path)` However, I want to add a parameter, to limit the number of loaded examples to be 10, for development purposes, but can't find this simple parameter. ### St...
[ -1.1022915840148926, -0.8567841649055481, -0.7513408660888672, 1.6503745317459106, -0.1348848044872284, -1.2660845518112183, 0.22829993069171906, -1.094260573387146, 1.6975762844085693, -0.8379931449890137, 0.28831642866134644, -1.6608378887176514, 0.04450902342796326, -0.6675934195518494,...
https://github.com/huggingface/datasets/issues/5725
How to limit the number of examples in dataset, for testing?
I misread the format in which the dataset is stored - the `nrows` parameter works for CSV, but not JSON. This means the only option is first to create a DataFrame and then convert it to a Dataset object: ```python import pandas as pd from datasets import Dataset df = pd.read_json(data_path, lines=True, nrows=...
### Describe the bug I am using this command: `data = load_dataset("json", data_files=data_path)` However, I want to add a parameter, to limit the number of loaded examples to be 10, for development purposes, but can't find this simple parameter. ### Steps to reproduce the bug In the description. ### Expected beh...
211
57
How to limit the number of examples in dataset, for testing? ### Describe the bug I am using this command: `data = load_dataset("json", data_files=data_path)` However, I want to add a parameter, to limit the number of loaded examples to be 10, for development purposes, but can't find this simple parameter. ### St...
[ -1.1809309720993042, -0.9155998826026917, -0.7503301501274109, 1.5849159955978394, -0.13664761185646057, -1.3292261362075806, 0.1778264343738556, -1.117719054222107, 1.717626929283142, -0.9138863682746887, 0.2740040719509125, -1.7142506837844849, 0.055442702025175095, -0.6459029316902161, ...
https://github.com/huggingface/datasets/issues/5724
Error after shuffling streaming IterableDatasets with downloaded dataset
Moving `"en"` to the end of the path instead of passing it as a config name should fix the error: ```python import datasets dataset = datasets.load_dataset('/path/to/your/data/dir/en', streaming=True, split='train') dataset = dataset.shuffle(buffer_size=10_000, seed=42) next(iter(dataset)) ``` PS: https://gith...
### Describe the bug I downloaded the C4 dataset, and used streaming IterableDatasets to read it. Everything went normal until I used `dataset = dataset.shuffle(seed=42, buffer_size=10_000)` to shuffle the dataset. Shuffled dataset will throw the following error when it is used by `next(iter(dataset))`: ``` File "/d...
212
54
Error after shuffling streaming IterableDatasets with downloaded dataset ### Describe the bug I downloaded the C4 dataset, and used streaming IterableDatasets to read it. Everything went normal until I used `dataset = dataset.shuffle(seed=42, buffer_size=10_000)` to shuffle the dataset. Shuffled dataset will throw t...
[ -1.2737857103347778, -0.9381715655326843, -0.6803872585296631, 1.3376641273498535, -0.13045163452625275, -1.3006811141967773, 0.20212818682193756, -1.04757821559906, 1.5604774951934814, -0.7111883163452148, 0.159285768866539, -1.6583572626113892, -0.1482614427804947, -0.43704476952552795, ...
https://github.com/huggingface/datasets/issues/5722
Distributed Training Error on Customized Dataset
Hmm the error doesn't seem related to data loading. Regarding `split_dataset_by_node`: it's generally used to split an iterable dataset (e.g. when streaming) in pytorch DDP. It's not needed if you use a regular dataset since the pytorch DataLoader already assigns a subset of the dataset indices to each node.
Hi guys, recently I tried to use `datasets` to train a dual encoder. I finish my own datasets according to the nice [tutorial](https://huggingface.co/docs/datasets/v2.11.0/en/dataset_script) Here are my code: ```python class RetrivalDataset(datasets.GeneratorBasedBuilder): """CrossEncoder dataset.""" B...
213
49
Distributed Training Error on Customized Dataset Hi guys, recently I tried to use `datasets` to train a dual encoder. I finish my own datasets according to the nice [tutorial](https://huggingface.co/docs/datasets/v2.11.0/en/dataset_script) Here are my code: ```python class RetrivalDataset(datasets.GeneratorBased...
[ -1.3063890933990479, -1.014308214187622, -0.6957640647888184, 1.4547462463378906, -0.24241700768470764, -1.0963528156280518, 0.19008687138557434, -1.122454285621643, 1.6499240398406982, -0.7355639338493347, 0.380498468875885, -1.6156622171401978, 0.0129916463047266, -0.5391196012496948, ...
https://github.com/huggingface/datasets/issues/5720
Streaming IterableDatasets do not work with torch DataLoaders
I'm experiencing the same problem that @jlehrer1. I was able to reproduce it with a very small example: ```py from datasets import Dataset, load_dataset, load_dataset_builder from torch.utils.data import DataLoader def my_gen(): for i in range(1, 4): yield {"a": i} # Saving the dataset as a p...
### Describe the bug When using streaming datasets set up with train/val split using `.skip()` and `.take()`, the following error occurs when iterating over a torch dataloader: ``` File "/Users/julian/miniconda3/envs/sims/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 363, in __iter__ self....
214
129
Streaming IterableDatasets do not work with torch DataLoaders ### Describe the bug When using streaming datasets set up with train/val split using `.skip()` and `.take()`, the following error occurs when iterating over a torch dataloader: ``` File "/Users/julian/miniconda3/envs/sims/lib/python3.9/site-packages/t...
[ -1.178139328956604, -0.9114153981208801, -0.7017797827720642, 1.5412392616271973, -0.1086544394493103, -1.2789701223373413, 0.12293124943971634, -0.9090158939361572, 1.4955908060073853, -0.6685280799865723, 0.22464752197265625, -1.588659644126892, -0.19427348673343658, -0.49374836683273315...
https://github.com/huggingface/datasets/issues/5720
Streaming IterableDatasets do not work with torch DataLoaders
I cannot reproduce this error, not even with your MRE @ivanprado (your env appears to be the same as Colab's, and your code runs there without issues).
### Describe the bug When using streaming datasets set up with train/val split using `.skip()` and `.take()`, the following error occurs when iterating over a torch dataloader: ``` File "/Users/julian/miniconda3/envs/sims/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 363, in __iter__ self....
214
27
Streaming IterableDatasets do not work with torch DataLoaders ### Describe the bug When using streaming datasets set up with train/val split using `.skip()` and `.take()`, the following error occurs when iterating over a torch dataloader: ``` File "/Users/julian/miniconda3/envs/sims/lib/python3.9/site-packages/t...
[ -1.178139328956604, -0.9114153981208801, -0.7017797827720642, 1.5412392616271973, -0.1086544394493103, -1.2789701223373413, 0.12293124943971634, -0.9090158939361572, 1.4955908060073853, -0.6685280799865723, 0.22464752197265625, -1.588659644126892, -0.19427348673343658, -0.49374836683273315...
https://github.com/huggingface/datasets/issues/5720
Streaming IterableDatasets do not work with torch DataLoaders
@mariosasko you are right, it works on Colab. I digged deeper and found that the problem arises when the multiprocessing method is set to be `spawn`. This code reproduces the problem in Colab: ```py from datasets import Dataset, load_dataset, load_dataset_builder from torch.utils.data import DataLoader import mul...
### Describe the bug When using streaming datasets set up with train/val split using `.skip()` and `.take()`, the following error occurs when iterating over a torch dataloader: ``` File "/Users/julian/miniconda3/envs/sims/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 363, in __iter__ self....
214
124
Streaming IterableDatasets do not work with torch DataLoaders ### Describe the bug When using streaming datasets set up with train/val split using `.skip()` and `.take()`, the following error occurs when iterating over a torch dataloader: ``` File "/Users/julian/miniconda3/envs/sims/lib/python3.9/site-packages/t...
[ -1.178139328956604, -0.9114153981208801, -0.7017797827720642, 1.5412392616271973, -0.1086544394493103, -1.2789701223373413, 0.12293124943971634, -0.9090158939361572, 1.4955908060073853, -0.6685280799865723, 0.22464752197265625, -1.588659644126892, -0.19427348673343658, -0.49374836683273315...
https://github.com/huggingface/datasets/issues/5720
Streaming IterableDatasets do not work with torch DataLoaders
So is there a way to fix this by changing the `mp` method? This is blocking any usage of the `datasets` library for me
### Describe the bug When using streaming datasets set up with train/val split using `.skip()` and `.take()`, the following error occurs when iterating over a torch dataloader: ``` File "/Users/julian/miniconda3/envs/sims/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 363, in __iter__ self....
214
24
Streaming IterableDatasets do not work with torch DataLoaders ### Describe the bug When using streaming datasets set up with train/val split using `.skip()` and `.take()`, the following error occurs when iterating over a torch dataloader: ``` File "/Users/julian/miniconda3/envs/sims/lib/python3.9/site-packages/t...
[ -1.178139328956604, -0.9114153981208801, -0.7017797827720642, 1.5412392616271973, -0.1086544394493103, -1.2789701223373413, 0.12293124943971634, -0.9090158939361572, 1.4955908060073853, -0.6685280799865723, 0.22464752197265625, -1.588659644126892, -0.19427348673343658, -0.49374836683273315...
https://github.com/huggingface/datasets/issues/5720
Streaming IterableDatasets do not work with torch DataLoaders
@jlehrer1 can you try adding `mp.set_start_method('fork')` at the beginning of your code? Maybe this helps you. Keep us posted.
### Describe the bug When using streaming datasets set up with train/val split using `.skip()` and `.take()`, the following error occurs when iterating over a torch dataloader: ``` File "/Users/julian/miniconda3/envs/sims/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 363, in __iter__ self....
214
19
Streaming IterableDatasets do not work with torch DataLoaders ### Describe the bug When using streaming datasets set up with train/val split using `.skip()` and `.take()`, the following error occurs when iterating over a torch dataloader: ``` File "/Users/julian/miniconda3/envs/sims/lib/python3.9/site-packages/t...
[ -1.178139328956604, -0.9114153981208801, -0.7017797827720642, 1.5412392616271973, -0.1086544394493103, -1.2789701223373413, 0.12293124943971634, -0.9090158939361572, 1.4955908060073853, -0.6685280799865723, 0.22464752197265625, -1.588659644126892, -0.19427348673343658, -0.49374836683273315...
https://github.com/huggingface/datasets/issues/5719
Array2D feature creates a list of list instead of a numpy array
Hi! You need to set the format to `np` before indexing the dataset to get NumPy arrays: ```python features = Features(dict(seq=Array2D((2,2), 'float32'))) ds = Dataset.from_dict(dict(seq=[np.random.rand(2,2)]), features=features) ds.set_format("np") a = ds[0]['seq'] ``` > I think it should not be the ex...
### Describe the bug I'm not sure if this is expected behavior or not. When I create a 2D array using `Array2D`, the data has list type instead of numpy array. I think it should not be the expected behavior especially when I feed a numpy array as input to the data creation function. Why is it converting my array int...
215
172
Array2D feature creates a list of list instead of a numpy array ### Describe the bug I'm not sure if this is expected behavior or not. When I create a 2D array using `Array2D`, the data has list type instead of numpy array. I think it should not be the expected behavior especially when I feed a numpy array as inpu...
[ -1.2951023578643799, -0.891772449016571, -0.74828040599823, 1.4550156593322754, -0.13182206451892853, -1.254961609840393, 0.11482946574687958, -1.0367920398712158, 1.7142430543899536, -0.8507708311080933, 0.3687160313129425, -1.6596955060958862, 0.19670423865318298, -0.649299144744873, -...
https://github.com/huggingface/datasets/issues/5719
Array2D feature creates a list of list instead of a numpy array
Current behavior when indexing the dataset: - Using `Array((2,2))` returns a list of lists. - Using `Array((None,2))` returns a numpy array. Don't you think this is kind of unexpected behavior from end-user perspective? As a user, I expect that when I use `Array2D`, the behavior needs to be consistent even if I ...
### Describe the bug I'm not sure if this is expected behavior or not. When I create a 2D array using `Array2D`, the data has list type instead of numpy array. I think it should not be the expected behavior especially when I feed a numpy array as input to the data creation function. Why is it converting my array int...
215
152
Array2D feature creates a list of list instead of a numpy array ### Describe the bug I'm not sure if this is expected behavior or not. When I create a 2D array using `Array2D`, the data has list type instead of numpy array. I think it should not be the expected behavior especially when I feed a numpy array as inpu...
[ -1.3034080266952515, -0.8863217234611511, -0.7366203665733337, 1.4487640857696533, -0.12153633683919907, -1.2546308040618896, 0.11706940084695816, -1.0130683183670044, 1.7305867671966553, -0.8401386141777039, 0.36504673957824707, -1.6523691415786743, 0.18636450171470642, -0.655825853347778...
https://github.com/huggingface/datasets/issues/5717
Errror when saving to disk a dataset of images
Looks like as long as the number of shards makes a batch lower than 1000 images it works. In my training set I have 40K images. If I use `num_shards=40` (batch of 1000 images) I get the error, but if I update it to `num_shards=50` (batch of 800 images) it works. I will be happy to share my dataset privately if it ca...
### Describe the bug Hello! I have an issue when I try to save on disk my dataset of images. The error I get is: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 1442, in save_...
216
67
Errror when saving to disk a dataset of images ### Describe the bug Hello! I have an issue when I try to save on disk my dataset of images. The error I get is: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-package...
[ -1.1648489236831665, -0.8666452765464783, -0.726670503616333, 1.4068650007247925, -0.13274896144866943, -1.3223906755447388, 0.05514451488852501, -1.0130778551101685, 1.4621919393539429, -0.6920582056045532, 0.15534962713718414, -1.6286884546279907, -0.1294914335012436, -0.4892106950283050...
https://github.com/huggingface/datasets/issues/5717
Errror when saving to disk a dataset of images
Hi! I didn't manage to reproduce this behavior, so sharing the dataset with us would help a lot. > My dataset is around 50K images, is this error might be due to a bad image? This shouldn't be the case as we save raw data to disk without decoding it.
### Describe the bug Hello! I have an issue when I try to save on disk my dataset of images. The error I get is: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 1442, in save_...
216
50
Errror when saving to disk a dataset of images ### Describe the bug Hello! I have an issue when I try to save on disk my dataset of images. The error I get is: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-package...
[ -1.1648489236831665, -0.8666452765464783, -0.726670503616333, 1.4068650007247925, -0.13274896144866943, -1.3223906755447388, 0.05514451488852501, -1.0130778551101685, 1.4621919393539429, -0.6920582056045532, 0.15534962713718414, -1.6286884546279907, -0.1294914335012436, -0.4892106950283050...
https://github.com/huggingface/datasets/issues/5717
Errror when saving to disk a dataset of images
OK, thanks! The dataset is currently hosted on a gcs bucket. How would you like to proceed for sharing the link?
### Describe the bug Hello! I have an issue when I try to save on disk my dataset of images. The error I get is: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 1442, in save_...
216
21
Errror when saving to disk a dataset of images ### Describe the bug Hello! I have an issue when I try to save on disk my dataset of images. The error I get is: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jplu/miniconda3/envs/image-xp/lib/python3.10/site-package...
[ -1.1648489236831665, -0.8666452765464783, -0.726670503616333, 1.4068650007247925, -0.13274896144866943, -1.3223906755447388, 0.05514451488852501, -1.0130778551101685, 1.4621919393539429, -0.6920582056045532, 0.15534962713718414, -1.6286884546279907, -0.1294914335012436, -0.4892106950283050...