html_url
stringlengths
51
51
comments
stringlengths
67
24.7k
title
stringlengths
6
280
body
stringlengths
51
36.2k
comment_length
int64
16
1.45k
text
stringlengths
190
38.3k
embeddings
list
https://github.com/huggingface/datasets/issues/5798
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...
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. ```python load_dataset(..., use_spark=True) ``` ### Motivation Further speed up ...
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...
[ -0.5912810564041138, -0.166444331407547, -0.27467963099479675, 0.046704962849617004, -0.0372835174202919, 0.011108189821243286, 0.41554296016693115, 0.29097071290016174, 0.2725381851196289, 0.12648449838161469, -0.0580955408513546, 0.5138408541679382, -0.09657572209835052, 0.44091361761093...
https://github.com/huggingface/datasets/issues/5798
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.
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. ```python load_dataset(..., use_spark=True) ``` ### Motivation Further speed up ...
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...
[ -0.44032394886016846, -0.35326239466667175, -0.26291581988334656, 0.15363097190856934, -0.07885220646858215, 0.00105227530002594, 0.3474459946155548, 0.23310305178165436, 0.2693675756454468, 0.03897140547633171, 0.1136862114071846, 0.5241246223449707, -0.06608068197965622, 0.54497939348220...
https://github.com/huggingface/datasets/issues/5798
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.
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. ```python load_dataset(..., use_spark=True) ``` ### Motivation Further speed up ...
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...
[ -0.5496347546577454, -0.3451996445655823, -0.29482370615005493, 0.17065832018852234, -0.09436344355344772, 0.07892078161239624, 0.38517698645591736, 0.23603278398513794, 0.3873416781425476, 0.07343711704015732, -0.09123784303665161, 0.541654109954834, -0.010543912649154663, 0.4567690789699...
https://github.com/huggingface/datasets/issues/5797
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.
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 will download all 52 subsets, sh...
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. ...
[ -0.06685242056846619, -0.5496715307235718, -0.03464435786008835, 0.6700536608695984, 0.27767282724380493, 0.1026126891374588, 0.35231417417526245, 0.06252647936344147, 0.01295839250087738, 0.11858697235584259, -0.3184036314487457, 0.27620506286621094, 0.1577237844467163, -0.005881138145923...
https://github.com/huggingface/datasets/issues/5797
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...
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 will download all 52 subsets, sh...
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. ...
[ -0.1830030381679535, -0.206563338637352, -0.04697946831583977, 0.5480949282646179, 0.21820707619190216, 0.08676287531852722, 0.48070839047431946, 0.09932515770196915, 0.12416321039199829, 0.07165084034204483, -0.10154447704553604, 0.3830937147140503, 0.06103039160370827, -0.059567153453826...
https://github.com/huggingface/datasets/issues/5791
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...
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? ### Motivation instead o...
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...
[ -0.09125569462776184, -0.09425428509712219, -0.08832672238349915, 0.17105510830879211, 0.0741666778922081, 0.09101897478103638, 0.263895183801651, 0.053446702659130096, -0.12248209118843079, 0.07831980288028717, -0.28911247849464417, 0.5830967426300049, -0.15723805129528046, 0.231783181428...
https://github.com/huggingface/datasets/issues/5791
This snippet is awesome! I know I probably should have gotten deeper in to the docs to find cast_column and set_transform, but perhaps a link ushering folks to that documentation or even this thread somewhere in https://huggingface.co/docs/datasets/image_load would be helpful? Thanks again for the snippet
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? ### Motivation instead o...
45
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...
[ -0.2690482437610626, -0.22079499065876007, -0.06014011800289154, 0.20733270049095154, 0.3892035484313965, 0.03304615616798401, 0.18951678276062012, 0.14724472165107727, 0.09366878867149353, -0.004289157688617706, -0.22632211446762085, 0.38841766119003296, -0.08246496319770813, 0.5795052647...
https://github.com/huggingface/datasets/issues/5791
Btw, we can close this issue as it should be addressed in Pillow rather than here.
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? ### Motivation instead o...
16
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...
[ -0.23112329840660095, -0.06182199716567993, -0.1187916100025177, 0.075553759932518, 0.055008143186569214, 0.11775311827659607, 0.25062820315361023, 0.24310708045959473, -0.12346241623163223, 0.020366374403238297, -0.12221197038888931, 0.4725615978240967, -0.08182340860366821, 0.36319288611...
https://github.com/huggingface/datasets/issues/5791
For sure, if image based stuff becomes a priority I think guiding folks to an image decoder section would be really helpful, but im just one dev :) and I know priorities gotta be balanced so no worries. Thanks again for the snippet, agreed we can close
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? ### Motivation instead o...
47
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...
[ -0.15254276990890503, 0.07172900438308716, -0.15877099335193634, 0.10493224114179611, 0.11246825754642487, 0.08468982577323914, 0.1971660852432251, 0.23639601469039917, -0.09306871891021729, 0.051802314817905426, -0.06518016755580902, 0.5075037479400635, -0.08832965791225433, 0.38290229439...
https://github.com/huggingface/datasets/issues/5786
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...
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 method `__call__`, and adding `reduce` helps to solve the problem. Howe...
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...
[ -0.09778323769569397, -0.3189750909805298, -0.0011930502951145172, 0.2662516236305237, 0.2876635789871216, -0.17286784946918488, 0.18067258596420288, 0.15307143330574036, 0.4758862853050232, 0.08115188777446747, -0.016057178378105164, 0.6568635702133179, -0.1272278130054474, -0.40125209093...
https://github.com/huggingface/datasets/issues/5786
@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...
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 method `__call__`, and adding `reduce` helps to solve the problem. Howe...
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...
[ -0.09778323769569397, -0.3189750909805298, -0.0011930502951145172, 0.2662516236305237, 0.2876635789871216, -0.17286784946918488, 0.18067258596420288, 0.15307143330574036, 0.4758862853050232, 0.08115188777446747, -0.016057178378105164, 0.6568635702133179, -0.1272278130054474, -0.40125209093...
https://github.com/huggingface/datasets/issues/5786
@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)
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 method `__call__`, and adding `reduce` helps to solve the problem. Howe...
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...
[ -0.09778323769569397, -0.3189750909805298, -0.0011930502951145172, 0.2662516236305237, 0.2876635789871216, -0.17286784946918488, 0.18067258596420288, 0.15307143330574036, 0.4758862853050232, 0.08115188777446747, -0.016057178378105164, 0.6568635702133179, -0.1272278130054474, -0.40125209093...
https://github.com/huggingface/datasets/issues/5786
@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...
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 method `__call__`, and adding `reduce` helps to solve the problem. Howe...
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...
[ -0.09778323769569397, -0.3189750909805298, -0.0011930502951145172, 0.2662516236305237, 0.2876635789871216, -0.17286784946918488, 0.18067258596420288, 0.15307143330574036, 0.4758862853050232, 0.08115188777446747, -0.016057178378105164, 0.6568635702133179, -0.1272278130054474, -0.40125209093...
https://github.com/huggingface/datasets/issues/5783
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)
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) ``` import datasets import re ds = datasets.lo...
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) ...
[ -0.051982492208480835, -0.4041005074977875, 0.039625491946935654, 0.47294285893440247, -0.07583805918693542, -0.14034049212932587, 0.4730936288833618, 0.07036614418029785, -0.31081461906433105, 0.12827281653881073, 0.3353617787361145, 0.36317771673202515, 0.036953557282686234, -0.022126913...
https://github.com/huggingface/datasets/issues/5783
@mariosasko How do I determine the optimal size of write_batch_size? My training is sometimes fast and sometimes slow. Is it because write_batch_size is too small? Each batch of the current dataloader should be the same size. I preprocessed the dataset using map
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) ``` import datasets import re ds = datasets.lo...
42
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) ...
[ -0.23163391649723053, -0.44801807403564453, 0.00698016956448555, 0.5094287395477295, -0.10499437898397446, -0.2033630907535553, 0.4088912606239319, 0.21802420914173126, -0.19072255492210388, 0.15474748611450195, 0.3902827203273773, -0.08839414268732071, -0.005192747339606285, 0.08182563632...
https://github.com/huggingface/datasets/issues/5783
@aihao2000 It's unlikely `writer_batch_size` is the problem. You can use the following code to profile the training loop (e.g., on a subset of data) and find slow parts: ```python import cProfile, pstats with cProfile.Profile() as profiler: ... # training loop code stats = pstats.Stats(profiler).sort_stats...
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) ``` import datasets import re ds = datasets.lo...
46
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) ...
[ -0.12684278190135956, -0.4592365622520447, 0.03784941881895065, 0.4480961561203003, -0.03673655167222023, -0.06961654126644135, 0.4423154294490814, 0.13392052054405212, -0.35404807329177856, 0.10731114447116852, 0.35320985317230225, 0.20398566126823425, 0.06323806941509247, -0.056840017437...
https://github.com/huggingface/datasets/issues/5783
@mariosasko Is the larger the num_proc of load_dataset within the number of cpu cores, the better? Then the num_proc of data_loader is the number of cpu cores/number of training processes
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) ``` import datasets import re ds = datasets.lo...
30
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) ...
[ -0.006848596036434174, -0.45052462816238403, -0.00009368360042572021, 0.46718233823776245, -0.03373904526233673, -0.10309705138206482, 0.4263171851634979, 0.1237684115767479, -0.23008352518081665, 0.12157027423381805, 0.34287646412849426, 0.296439528465271, 0.08448642492294312, -0.02518115...
https://github.com/huggingface/datasets/issues/5782
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...
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. ### Motivation - The SoundFile library, used in [features/audio.py](https://gith...
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...
[ -0.37373217940330505, 0.07107827067375183, -0.10752930492162704, -0.12114189565181732, 0.10390601307153702, -0.258517324924469, 0.5349103212356567, 0.24692317843437195, 0.048604682087898254, 0.3966282606124878, -0.5119902491569519, 0.14266866445541382, -0.3062678575515747, 0.19196441769599...
https://github.com/huggingface/datasets/issues/5782
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
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. ### Motivation - The SoundFile library, used in [features/audio.py](https://gith...
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...
[ -0.37373217940330505, 0.07107827067375183, -0.10752930492162704, -0.12114189565181732, 0.10390601307153702, -0.258517324924469, 0.5349103212356567, 0.24692317843437195, 0.048604682087898254, 0.3966282606124878, -0.5119902491569519, 0.14266866445541382, -0.3062678575515747, 0.19196441769599...
https://github.com/huggingface/datasets/issues/5781
It looks like an issue with your installation of scipy, can you try reinstalling it ?
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-darwin.so, 0x0002): Library not ...
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...
[ -0.0995519682765007, 0.1529461145401001, -0.03579659387469292, 0.6282527446746826, 0.24879217147827148, 0.003521047532558441, 0.4788861870765686, 0.2676067352294922, -0.3318800926208496, -0.20303790271282196, -0.2591601014137268, 0.47658172249794006, -0.15595141053199768, 0.141338557004928...
https://github.com/huggingface/datasets/issues/5778
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
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 description above. ### Expected b...
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...
[ -0.07361853122711182, -0.02407802641391754, -0.08289069682359695, 0.3006475269794464, 0.4270545542240143, -0.08511455357074738, 0.4338962733745575, 0.4926876425743103, 0.16474702954292297, 0.3397959768772125, 0.10446222126483917, 0.8128926753997803, -0.11228886246681213, 0.0935633927583694...
https://github.com/huggingface/datasets/issues/5777
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")
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 [collab with the error is here](https://colab.research.google.com/github/huggingface/notebooks/blob/ma...
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 ...
[ -0.2291666567325592, 0.13596121966838837, 0.016966447234153748, 0.1255396157503128, 0.23950935900211334, -0.1594688445329666, 0.23064634203910828, 0.03346320241689682, -0.04735599458217621, 0.33694255352020264, -0.27385422587394714, 0.015452004969120026, -0.19089925289154053, -0.1664018034...
https://github.com/huggingface/datasets/issues/5777
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...
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 [collab with the error is here](https://colab.research.google.com/github/huggingface/notebooks/blob/ma...
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 ...
[ -0.2291666567325592, 0.13596121966838837, 0.016966447234153748, 0.1255396157503128, 0.23950935900211334, -0.1594688445329666, 0.23064634203910828, 0.03346320241689682, -0.04735599458217621, 0.33694255352020264, -0.27385422587394714, 0.015452004969120026, -0.19089925289154053, -0.1664018034...
https://github.com/huggingface/datasets/issues/5777
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
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 [collab with the error is here](https://colab.research.google.com/github/huggingface/notebooks/blob/ma...
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 ...
[ -0.2291666567325592, 0.13596121966838837, 0.016966447234153748, 0.1255396157503128, 0.23950935900211334, -0.1594688445329666, 0.23064634203910828, 0.03346320241689682, -0.04735599458217621, 0.33694255352020264, -0.27385422587394714, 0.015452004969120026, -0.19089925289154053, -0.1664018034...
https://github.com/huggingface/datasets/issues/5777
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...
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 [collab with the error is here](https://colab.research.google.com/github/huggingface/notebooks/blob/ma...
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 ...
[ -0.2291666567325592, 0.13596121966838837, 0.016966447234153748, 0.1255396157503128, 0.23950935900211334, -0.1594688445329666, 0.23064634203910828, 0.03346320241689682, -0.04735599458217621, 0.33694255352020264, -0.27385422587394714, 0.015452004969120026, -0.19089925289154053, -0.1664018034...
https://github.com/huggingface/datasets/issues/5773
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`)?
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 learning rate scheduler.`
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...
[ -0.522157609462738, -0.19083084166049957, -0.08664260804653168, 0.16447564959526062, 0.3741040825843811, -0.05488339066505432, 0.21320584416389465, 0.06412778049707413, -0.08213943988084793, 0.35544633865356445, 0.3760342001914978, 0.14678063988685608, -0.43557193875312805, 0.3359974920749...
https://github.com/huggingface/datasets/issues/5773
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...
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 learning rate scheduler.`
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...
[ -0.46752703189849854, -0.20199625194072723, -0.03817889094352722, 0.20775702595710754, 0.47669774293899536, -0.052558980882167816, 0.4015348553657532, 0.12132513523101807, -0.22176145017147064, 0.29023417830467224, 0.11544169485569, 0.03432578966021538, -0.5872918367385864, 0.1363968849182...
https://github.com/huggingface/datasets/issues/5773
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...
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 learning rate scheduler.`
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...
[ -0.6050503253936768, -0.03692932426929474, -0.14598283171653748, 0.05500232055783272, 0.38665422797203064, -0.057564254850149155, 0.20488183200359344, 0.09926813840866089, -0.07949262112379074, 0.3206044137477875, 0.3287934362888336, 0.2035919427871704, -0.46700623631477356, 0.299037963151...
https://github.com/huggingface/datasets/issues/5773
``` 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...
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 learning rate scheduler.`
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...
[ -0.6036391258239746, -0.22139286994934082, -0.1419200897216797, 0.06833173334598541, 0.4781287610530853, 0.003932587802410126, 0.2760462164878845, 0.06601475924253464, -0.1648501604795456, 0.4750373959541321, 0.038059428334236145, 0.050733305513858795, -0.5506958365440369, 0.15972232818603...
https://github.com/huggingface/datasets/issues/5773
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`
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 learning rate scheduler.`
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...
[ -0.527402937412262, -0.20840904116630554, -0.1405806541442871, 0.0275887344032526, 0.40882408618927, -0.09522216022014618, 0.18307887017726898, 0.1347787231206894, -0.14450517296791077, 0.426193505525589, 0.24970772862434387, 0.06304583698511124, -0.4335055947303772, 0.36071711778640747, ...
https://github.com/huggingface/datasets/issues/5773
@albertvillanova I think @v-yunbin, myself, and others might be slightly confused about max_steps and how it differs from num_train_epochs.
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 learning rate scheduler.`
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...
[ -0.42442578077316284, -0.3594610095024109, -0.1555129885673523, 0.09776698052883148, 0.30486607551574707, -0.023437470197677612, 0.09157867729663849, -0.03601643815636635, -0.0023092851042747498, 0.31791478395462036, 0.404857873916626, 0.015599068254232407, -0.4500947594642639, 0.277899622...
https://github.com/huggingface/datasets/issues/5773
@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**.
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 learning rate scheduler.`
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...
[ -0.5346367359161377, -0.2838119864463806, -0.15404485166072845, 0.017284834757447243, 0.3721015453338623, -0.026162296533584595, 0.11708937585353851, 0.1397029310464859, -0.16365745663642883, 0.3835686445236206, 0.5001541972160339, 0.08532778918743134, -0.4400617480278015, 0.27056229114532...
https://github.com/huggingface/datasets/issues/5769
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 ...
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 caching. For some reason, this logic does no...
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...
[ -0.24836483597755432, -0.24730032682418823, 0.04029063880443573, 0.21145464479923248, 0.04805613309144974, -0.18448340892791748, 0.12182169407606125, 0.20901887118816376, 0.14491097629070282, 0.2306211292743683, -0.39203715324401855, 0.7446089386940002, 0.0173114612698555, 0.36103057861328...
https://github.com/huggingface/datasets/issues/5768
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...
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 properly. This is not a problem with "squad_v2" dataset for e...
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...
[ -0.14147433638572693, -0.1111864298582077, 0.11645541340112686, 0.20971336960792542, 0.1910736858844757, -0.010600008070468903, 0.44336479902267456, 0.10783032327890396, 0.12432239949703217, 0.08927089720964432, -0.15808814764022827, 0.47217845916748047, 0.09567844867706299, -0.08369425684...
https://github.com/huggingface/datasets/issues/5768
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...
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 properly. This is not a problem with "squad_v2" dataset for e...
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...
[ -0.06150738522410393, -0.12433319538831711, 0.11155229806900024, 0.1773647964000702, 0.16262215375900269, -0.03887700289487839, 0.4984908998012543, 0.1198122501373291, 0.22320544719696045, 0.08219501376152039, -0.03189168870449066, 0.39904990792274475, 0.15123838186264038, -0.1075939089059...
https://github.com/huggingface/datasets/issues/5768
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...
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 properly. This is not a problem with "squad_v2" dataset for e...
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...
[ -0.05922793596982956, -0.07069950550794601, 0.13119247555732727, 0.18312804400920868, 0.18544664978981018, -0.03411577641963959, 0.5674011707305908, 0.13328798115253448, 0.20841602981090546, 0.08103325963020325, -0.053071632981300354, 0.4445434808731079, 0.10887491703033447, -0.14544361829...
https://github.com/huggingface/datasets/issues/5768
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...
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 properly. This is not a problem with "squad_v2" dataset for e...
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...
[ -0.07878868281841278, -0.2868138253688812, 0.07885140180587769, 0.22139808535575867, 0.22745494544506073, 0.006268233060836792, 0.42688995599746704, 0.08101575076580048, 0.2393907755613327, 0.054690808057785034, -0.22609208524227142, 0.4112476706504822, 0.09105101227760315, -0.127557963132...
https://github.com/huggingface/datasets/issues/5768
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/
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 properly. This is not a problem with "squad_v2" dataset for e...
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...
[ -0.02963661402463913, -0.368111252784729, 0.10719997435808182, 0.22717875242233276, 0.23377501964569092, -0.011893749237060547, 0.4508305788040161, 0.10612426698207855, 0.2266709804534912, 0.049423523247241974, -0.1979769468307495, 0.33952516317367554, 0.08872051537036896, -0.0084431245923...
https://github.com/huggingface/datasets/issues/5768
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....
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 properly. This is not a problem with "squad_v2" dataset for e...
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...
[ -0.21133318543434143, -0.045081064105033875, 0.1208299845457077, 0.16353736817836761, 0.28210556507110596, -0.11948999762535095, 0.4114721715450287, 0.08792444318532944, 0.20600098371505737, 0.0734335258603096, -0.09240821748971939, 0.4762028455734253, 0.15384873747825623, -0.0604608282446...
https://github.com/huggingface/datasets/issues/5766
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
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_feature_type class CustomFeature...
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...
[ -0.1076527014374733, 0.13263635337352753, -0.09200724959373474, 0.027213267982006073, 0.21942318975925446, 0.03645549714565277, 0.31180626153945923, 0.30888277292251587, 0.09450874477624893, 0.01722479984164238, 0.0015231668949127197, 0.34734398126602173, -0.4834030568599701, 0.69621264934...
https://github.com/huggingface/datasets/issues/5766
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...
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_feature_type class CustomFeature...
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...
[ -0.10012442618608475, 0.10153527557849884, -0.09084055572748184, 0.03676633536815643, 0.31600290536880493, 0.04664631187915802, 0.39689522981643677, 0.3054334223270416, 0.15716344118118286, 0.01747256889939308, -0.0819954052567482, 0.42595556378364563, -0.3231666684150696, 0.76076668500900...
https://github.com/huggingface/datasets/issues/5766
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...
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_feature_type class CustomFeature...
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...
[ -0.1313193440437317, 0.12182304263114929, -0.08667328953742981, 0.05268140509724617, 0.24636176228523254, 0.03978772461414337, 0.31911927461624146, 0.30791687965393066, 0.1018514409661293, 0.037960585206747055, -0.01863536238670349, 0.36437463760375977, -0.4562287926673889, 0.7040204405784...
https://github.com/huggingface/datasets/issues/5765
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"]) ```
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 import warnings import flwr as fl import torch import numpy as np import random from torch.utils.data import DataLoader from...
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...
[ -0.22707095742225647, -0.15898144245147705, -0.05346143618226051, 0.1391603797674179, 0.5924882292747498, 0.03676106780767441, 0.6367816925048828, 0.27259331941604614, 0.05489131808280945, 0.40304070711135864, -0.13724076747894287, 0.38791391253471375, -0.16426730155944824, -0.314373165369...
https://github.com/huggingface/datasets/issues/5765
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...
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 import warnings import flwr as fl import torch import numpy as np import random from torch.utils.data import DataLoader from...
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...
[ -0.22707095742225647, -0.15898144245147705, -0.05346143618226051, 0.1391603797674179, 0.5924882292747498, 0.03676106780767441, 0.6367816925048828, 0.27259331941604614, 0.05489131808280945, 0.40304070711135864, -0.13724076747894287, 0.38791391253471375, -0.16426730155944824, -0.314373165369...
https://github.com/huggingface/datasets/issues/5765
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") ```
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 import warnings import flwr as fl import torch import numpy as np import random from torch.utils.data import DataLoader from...
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...
[ -0.22707095742225647, -0.15898144245147705, -0.05346143618226051, 0.1391603797674179, 0.5924882292747498, 0.03676106780767441, 0.6367816925048828, 0.27259331941604614, 0.05489131808280945, 0.40304070711135864, -0.13724076747894287, 0.38791391253471375, -0.16426730155944824, -0.314373165369...
https://github.com/huggingface/datasets/issues/5765
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...
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 import warnings import flwr as fl import torch import numpy as np import random from torch.utils.data import DataLoader from...
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...
[ -0.22707095742225647, -0.15898144245147705, -0.05346143618226051, 0.1391603797674179, 0.5924882292747498, 0.03676106780767441, 0.6367816925048828, 0.27259331941604614, 0.05489131808280945, 0.40304070711135864, -0.13724076747894287, 0.38791391253471375, -0.16426730155944824, -0.314373165369...
https://github.com/huggingface/datasets/issues/5764
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 })...
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 is not getting loaded and gives the error message as the following: ``` Traceback (most rece...
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 ...
[ -0.4342045187950134, -0.0925869271159172, -0.09273090958595276, 0.5126129984855652, 0.17861242592334747, 0.06114169955253601, 0.15243282914161682, 0.2641783356666565, 0.2611626386642456, 0.07067699730396271, -0.10803499072790146, 0.3297550082206726, 0.13071894645690918, 0.2889462113380432,...
https://github.com/huggingface/datasets/issues/5764
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...
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 is not getting loaded and gives the error message as the following: ``` Traceback (most rece...
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 ...
[ -0.4342045187950134, -0.0925869271159172, -0.09273090958595276, 0.5126129984855652, 0.17861242592334747, 0.06114169955253601, 0.15243282914161682, 0.2641783356666565, 0.2611626386642456, 0.07067699730396271, -0.10803499072790146, 0.3297550082206726, 0.13071894645690918, 0.2889462113380432,...
https://github.com/huggingface/datasets/issues/5764
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...
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 is not getting loaded and gives the error message as the following: ``` Traceback (most rece...
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 ...
[ -0.4342045187950134, -0.0925869271159172, -0.09273090958595276, 0.5126129984855652, 0.17861242592334747, 0.06114169955253601, 0.15243282914161682, 0.2641783356666565, 0.2611626386642456, 0.07067699730396271, -0.10803499072790146, 0.3297550082206726, 0.13071894645690918, 0.2889462113380432,...
https://github.com/huggingface/datasets/issues/5764
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...
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 is not getting loaded and gives the error message as the following: ``` Traceback (most rece...
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 ...
[ -0.4342045187950134, -0.0925869271159172, -0.09273090958595276, 0.5126129984855652, 0.17861242592334747, 0.06114169955253601, 0.15243282914161682, 0.2641783356666565, 0.2611626386642456, 0.07067699730396271, -0.10803499072790146, 0.3297550082206726, 0.13071894645690918, 0.2889462113380432,...
https://github.com/huggingface/datasets/issues/5764
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...
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 is not getting loaded and gives the error message as the following: ``` Traceback (most rece...
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 ...
[ -0.4342045187950134, -0.0925869271159172, -0.09273090958595276, 0.5126129984855652, 0.17861242592334747, 0.06114169955253601, 0.15243282914161682, 0.2641783356666565, 0.2611626386642456, 0.07067699730396271, -0.10803499072790146, 0.3297550082206726, 0.13071894645690918, 0.2889462113380432,...
https://github.com/huggingface/datasets/issues/5764
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...
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 is not getting loaded and gives the error message as the following: ``` Traceback (most rece...
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 ...
[ -0.4342045187950134, -0.0925869271159172, -0.09273090958595276, 0.5126129984855652, 0.17861242592334747, 0.06114169955253601, 0.15243282914161682, 0.2641783356666565, 0.2611626386642456, 0.07067699730396271, -0.10803499072790146, 0.3297550082206726, 0.13071894645690918, 0.2889462113380432,...
https://github.com/huggingface/datasets/issues/5764
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"`.
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 is not getting loaded and gives the error message as the following: ``` Traceback (most rece...
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 ...
[ -0.4342045187950134, -0.0925869271159172, -0.09273090958595276, 0.5126129984855652, 0.17861242592334747, 0.06114169955253601, 0.15243282914161682, 0.2641783356666565, 0.2611626386642456, 0.07067699730396271, -0.10803499072790146, 0.3297550082206726, 0.13071894645690918, 0.2889462113380432,...
https://github.com/huggingface/datasets/issues/5762
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!
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 https://colab.research.goo...
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 ...
[ -0.14698190987110138, -0.34604471921920776, 0.011125907301902771, 0.5978729724884033, 0.5030195713043213, 0.12426924705505371, 0.1668643206357956, 0.16048584878444672, 0.17309269309043884, -0.011461973190307617, -0.3375040888786316, 0.42514297366142273, -0.10572853684425354, 0.254465788602...
https://github.com/huggingface/datasets/issues/5761
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.
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 is ignored (generated dataset contains only images), the file next to the archive like [here](http...
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...
[ 0.0063481926918029785, 0.02177014946937561, 0.003071814775466919, 0.7927377223968506, -0.006188119761645794, 0.07700850069522858, 0.1289169043302536, 0.2964591383934021, -0.017772063612937927, 0.11702190339565277, 0.18320302665233612, 0.5142329335212708, -0.2491484135389328, -0.13864502310...
https://github.com/huggingface/datasets/issues/5761
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.
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 is ignored (generated dataset contains only images), the file next to the archive like [here](http...
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...
[ 0.0063481926918029785, 0.02177014946937561, 0.003071814775466919, 0.7927377223968506, -0.006188119761645794, 0.07700850069522858, 0.1289169043302536, 0.2964591383934021, -0.017772063612937927, 0.11702190339565277, 0.18320302665233612, 0.5142329335212708, -0.2491484135389328, -0.13864502310...
https://github.com/huggingface/datasets/issues/5761
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...
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 is ignored (generated dataset contains only images), the file next to the archive like [here](http...
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...
[ 0.0063481926918029785, 0.02177014946937561, 0.003071814775466919, 0.7927377223968506, -0.006188119761645794, 0.07700850069522858, 0.1289169043302536, 0.2964591383934021, -0.017772063612937927, 0.11702190339565277, 0.18320302665233612, 0.5142329335212708, -0.2491484135389328, -0.13864502310...
https://github.com/huggingface/datasets/issues/5760
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.
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': 'path_to_image.png', 'metadata': ...} ... `...
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': ...
[ -0.32815250754356384, 0.28350213170051575, -0.14983941614627838, 0.2693420350551605, 0.0037037041038274765, -0.018421150743961334, 0.4850492477416992, 0.17986856400966644, 0.3869134485721588, 0.19497497379779816, -0.13056352734565735, 0.3341748118400574, -0.47223758697509766, 0.11088322103...
https://github.com/huggingface/datasets/issues/5760
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 ...
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': 'path_to_image.png', 'metadata': ...} ... `...
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': ...
[ -0.28135037422180176, 0.34455224871635437, -0.11237320303916931, 0.22050783038139343, 0.035994820296764374, 0.12466489523649216, 0.5199511051177979, 0.30428287386894226, 0.49550026655197144, 0.09138574451208115, -0.06388944387435913, 0.33959248661994934, -0.3794679045677185, 0.256381452083...
https://github.com/huggingface/datasets/issues/5759
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 ...
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.Dataset.from_json`, it raises ``` File "site-p...
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...
[ -0.3445363938808441, -0.1746564656496048, -0.14360003173351288, 0.5329079031944275, 0.14330129325389862, 0.3087426722049713, 0.12361147999763489, 0.4864727854728699, 0.5251843333244324, -0.1500074565410614, -0.1594400703907013, 0.6687206029891968, -0.3528434634208679, 0.34140098094940186, ...
https://github.com/huggingface/datasets/issues/5756
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
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/administrator/Documents/Projects/huggingface/jax-diffusers-sprint-consistency-models/virtualenv/lib/python3.1...
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...
[ -0.08259496092796326, -0.31450343132019043, -0.025883890688419342, 0.20404884219169617, 0.3728506863117218, -0.042026594281196594, 0.23772695660591125, 0.07290518283843994, -0.3404311537742615, 0.43852028250694275, -0.14926981925964355, 0.4260514974594116, -0.1987188160419464, 0.1353710591...
https://github.com/huggingface/datasets/issues/5753
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...
[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 do here is: 1. Load an iterable dataset in streaming mode (`original_dataset`) 2. A...
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...
[ -0.11507052183151245, -0.17837277054786682, 0.034994907677173615, 0.11832471191883087, 0.1666976362466812, 0.13741260766983032, 0.3849218785762787, 0.18497334420681, 0.06469251215457916, 0.12903645634651184, -0.13880906999111176, 0.5539201498031616, 0.09769801795482635, 0.04437682777643204...
https://github.com/huggingface/datasets/issues/5752
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...
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 original_dataset = load_dataset("librispeech_asr", "clean", sp...
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 ...
[ -0.04294446483254433, -0.1640377640724182, -0.010875217616558075, -0.04881264269351959, 0.396542489528656, 0.23651453852653503, 0.3395603597164154, -0.006269645877182484, 0.15625685453414917, 0.03049561381340027, 0.10282491892576218, 0.39729106426239014, -0.19473698735237122, 0.38857021927...
https://github.com/huggingface/datasets/issues/5752
It seems that map will also cause this issue ### Steps to reproduce the bug ```python from datasets import load_dataset original_dataset = load_dataset("librispeech_asr", "clean", split="validation", streaming=True) print(original_dataset.features.keys()) def test(data): return data modified_dataset...
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 original_dataset = load_dataset("librispeech_asr", "clean", sp...
74
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 ...
[ -0.04294446483254433, -0.1640377640724182, -0.010875217616558075, -0.04881264269351959, 0.396542489528656, 0.23651453852653503, 0.3395603597164154, -0.006269645877182484, 0.15625685453414917, 0.03049561381340027, 0.10282491892576218, 0.39729106426239014, -0.19473698735237122, 0.38857021927...
https://github.com/huggingface/datasets/issues/5750
`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...
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 Query client is not pickable. And the function `create_config_id` tries t...
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...
[ -0.26841217279434204, 0.10827602446079254, 0.04360625892877579, 0.32818055152893066, 0.01671903394162655, -0.0813726931810379, 0.22551752626895905, 0.16309794783592224, 0.19760994613170624, 0.24006269872188568, 0.35184764862060547, 0.274338036775589, -0.2643771469593048, 0.2300550937652588...
https://github.com/huggingface/datasets/issues/5750
@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...
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 Query client is not pickable. And the function `create_config_id` tries t...
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...
[ -0.27556538581848145, 0.10176995396614075, 0.023528318852186203, 0.3146030604839325, 0.029008813202381134, -0.06387528777122498, 0.23672935366630554, 0.17986364662647247, 0.21328823268413544, 0.25452178716659546, 0.3336375951766968, 0.27794840931892395, -0.264303982257843, 0.24262216687202...
https://github.com/huggingface/datasets/issues/5750
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...
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 Query client is not pickable. And the function `create_config_id` tries t...
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...
[ -0.2612236440181732, 0.1188696026802063, 0.03804491460323334, 0.30534034967422485, 0.020163144916296005, -0.07264968752861023, 0.23761841654777527, 0.15740983188152313, 0.21236394345760345, 0.23176400363445282, 0.3501090705394745, 0.2762688994407654, -0.26403680443763733, 0.232787474989891...
https://github.com/huggingface/datasets/issues/5750
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...
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 Query client is not pickable. And the function `create_config_id` tries t...
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...
[ -0.26652318239212036, 0.13725778460502625, 0.03106006234884262, 0.28722265362739563, 0.03300163894891739, -0.087629534304142, 0.2441944181919098, 0.17209544777870178, 0.21294474601745605, 0.27725276350975037, 0.3305439054965973, 0.2740379273891449, -0.24410590529441833, 0.2754037082195282,...
https://github.com/huggingface/datasets/issues/5749
I got the same error, and the official website for visual genome is down. Did you solve this problem?
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_dataset data = load_dataset("visual_genome", 'region_descripti...
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...
[ -0.19554170966148376, 0.019373491406440735, 0.01434849202632904, 0.2700212299823761, 0.32112330198287964, 0.046529993414878845, 0.24270014464855194, 0.5838724970817566, 0.28396525979042053, 0.25258180499076843, 0.18423843383789062, 0.2591090202331543, 0.06297559291124344, 0.180583357810974...
https://github.com/huggingface/datasets/issues/5749
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.
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_dataset data = load_dataset("visual_genome", 'region_descripti...
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...
[ -0.19554170966148376, 0.019373491406440735, 0.01434849202632904, 0.2700212299823761, 0.32112330198287964, 0.046529993414878845, 0.24270014464855194, 0.5838724970817566, 0.28396525979042053, 0.25258180499076843, 0.18423843383789062, 0.2591090202331543, 0.06297559291124344, 0.180583357810974...
https://github.com/huggingface/datasets/issues/5749
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.
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_dataset data = load_dataset("visual_genome", 'region_descripti...
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...
[ -0.19554170966148376, 0.019373491406440735, 0.01434849202632904, 0.2700212299823761, 0.32112330198287964, 0.046529993414878845, 0.24270014464855194, 0.5838724970817566, 0.28396525979042053, 0.25258180499076843, 0.18423843383789062, 0.2591090202331543, 0.06297559291124344, 0.180583357810974...
https://github.com/huggingface/datasets/issues/5749
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.
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_dataset data = load_dataset("visual_genome", 'region_descripti...
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...
[ -0.19554170966148376, 0.019373491406440735, 0.01434849202632904, 0.2700212299823761, 0.32112330198287964, 0.046529993414878845, 0.24270014464855194, 0.5838724970817566, 0.28396525979042053, 0.25258180499076843, 0.18423843383789062, 0.2591090202331543, 0.06297559291124344, 0.180583357810974...
https://github.com/huggingface/datasets/issues/5744
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?
[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: https://github.com/huggingface/datasets/pull/5745 --- * The FutureWarning mentioned above: ``` FutureWarning: the 'mangle_...
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...
[ -0.11242857575416565, -0.06373906135559082, 0.06913965940475464, 0.2574194371700287, 0.2377796471118927, 0.20134049654006958, 0.4677693843841553, 0.23842857778072357, 0.28475335240364075, 0.050444185733795166, 0.025958240032196045, 0.1630541980266571, -0.16546288132667542, 0.31347987055778...
https://github.com/huggingface/datasets/issues/5743
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.
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 "dataclasses" ### Environment info VS code
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...
[ 0.015579409897327423, -0.22331739962100983, -0.0798734799027443, 0.20997966825962067, 0.5270578265190125, -0.17621904611587524, 0.31583866477012634, 0.07913129031658173, -0.3309014141559601, 0.25833940505981445, 0.40296804904937744, 0.2730787396430969, -0.17049920558929443, -0.048444394022...
https://github.com/huggingface/datasets/issues/5739
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 :)
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 `/data` ### Steps to reproduce the bug 1. clone dataset into local path ...
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...
[ -0.1913374364376068, -0.035746872425079346, -0.03948085755109787, 0.2577301859855652, 0.3165464997291565, -0.1170235350728035, 0.26577746868133545, 0.36108270287513733, -0.08732005208730698, 0.006909780204296112, -0.10704927146434784, 0.25627070665359497, -0.01029534824192524, 0.0113534256...
https://github.com/huggingface/datasets/issues/5739
> 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 ...
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 `/data` ### Steps to reproduce the bug 1. clone dataset into local path ...
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...
[ -0.1913374364376068, -0.035746872425079346, -0.03948085755109787, 0.2577301859855652, 0.3165464997291565, -0.1170235350728035, 0.26577746868133545, 0.36108270287513733, -0.08732005208730698, 0.006909780204296112, -0.10704927146434784, 0.25627070665359497, -0.01029534824192524, 0.0113534256...
https://github.com/huggingface/datasets/issues/5739
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`
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 `/data` ### Steps to reproduce the bug 1. clone dataset into local path ...
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...
[ -0.1913374364376068, -0.035746872425079346, -0.03948085755109787, 0.2577301859855652, 0.3165464997291565, -0.1170235350728035, 0.26577746868133545, 0.36108270287513733, -0.08732005208730698, 0.006909780204296112, -0.10704927146434784, 0.25627070665359497, -0.01029534824192524, 0.0113534256...
https://github.com/huggingface/datasets/issues/5738
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.
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 table with a bunch of latitude and longitude values! What in th...
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...
[ -0.11925823241472244, -0.08624438941478729, 0.04695247858762741, 0.664303183555603, -0.12008482217788696, 0.07227018475532532, 0.45189183950424194, -0.05691973865032196, 0.17160525918006897, 0.03284319490194321, -0.08789326250553131, 0.42411190271377563, -0.0665053203701973, 0.230731308460...
https://github.com/huggingface/datasets/issues/5737
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...
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 reproduce the bug from...
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...
[ 0.29180172085762024, -0.3111719787120819, 0.09513795375823975, 0.48123082518577576, 0.46933385729789734, -0.08403494954109192, 0.5703068971633911, 0.008758366107940674, -0.2298090010881424, 0.17299167811870575, 0.12227422744035721, 0.49433261156082153, -0.09853906184434891, 0.0449659526348...
https://github.com/huggingface/datasets/issues/5736
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 ?
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 #5711, but this happens in v2.10.1. 1. Set up a script `my_dataset.p...
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...
[ -0.16981777548789978, 0.2262328863143921, -0.030027145519852638, 0.40187662839889526, 0.1732892245054245, 0.005023099482059479, 0.4995902478694916, 0.09213702380657196, -0.06644544750452042, -0.10356898605823517, -0.008526850491762161, 0.1271989494562149, 0.12441286444664001, -0.0567063391...
https://github.com/huggingface/datasets/issues/5732
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.
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 as "train". The HuggingFace Datasets l...
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...
[ -0.3313150405883789, -0.14449968934059143, -0.0036493614315986633, 0.16411694884300232, 0.024416301399469376, -0.0013117045164108276, 0.5215281248092651, 0.46325474977493286, 0.15831592679023743, 0.22229424118995667, -0.147029846906662, -0.14948967099189758, -0.3204789161682129, 0.32197514...
https://github.com/huggingface/datasets/issues/5727
Hi! Can you please paste the entire error stack trace, not only the last few lines?
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) install with: ``conda` install -c huggingface -c conda-...
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)...
[ -0.3879677355289459, 0.18758141994476318, 0.05123184621334076, 0.42170268297195435, 0.19768838584423065, -0.07411590218544006, 0.5527178049087524, -0.004699838347733021, 0.19371165335178375, 0.09788034856319427, -0.30041980743408203, 0.22086188197135925, 0.14651095867156982, 0.140627473592...
https://github.com/huggingface/datasets/issues/5727
`----> 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...
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) install with: ``conda` install -c huggingface -c conda-...
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)...
[ -0.3879677355289459, 0.18758141994476318, 0.05123184621334076, 0.42170268297195435, 0.19768838584423065, -0.07411590218544006, 0.5527178049087524, -0.004699838347733021, 0.19371165335178375, 0.09788034856319427, -0.30041980743408203, 0.22086188197135925, 0.14651095867156982, 0.140627473592...
https://github.com/huggingface/datasets/issues/5727
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...
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) install with: ``conda` install -c huggingface -c conda-...
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)...
[ -0.3879677355289459, 0.18758141994476318, 0.05123184621334076, 0.42170268297195435, 0.19768838584423065, -0.07411590218544006, 0.5527178049087524, -0.004699838347733021, 0.19371165335178375, 0.09788034856319427, -0.30041980743408203, 0.22086188197135925, 0.14651095867156982, 0.140627473592...
https://github.com/huggingface/datasets/issues/5725
Hi! You can use the `nrows` parameter for this: ```python data = load_dataset("json", data_files=data_path, nrows=10) ```
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. ### Steps to reproduce the bug In the description. ### Expected beh...
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...
[ -0.09696656465530396, -0.15027594566345215, -0.1526530683040619, -0.13312135636806488, 0.14189982414245605, 0.058887213468551636, 0.4467536211013794, 0.45203396677970886, 0.004926532506942749, 0.3013802766799927, 0.5844478607177734, 0.23657768964767456, -0.15774200856685638, 0.034659959375...
https://github.com/huggingface/datasets/issues/5725
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=...
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. ### Steps to reproduce the bug In the description. ### Expected beh...
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...
[ -0.018296048045158386, -0.027276843786239624, -0.11304336786270142, -0.11859424412250519, 0.17070409655570984, 0.07331310212612152, 0.5478610992431641, 0.4776518642902374, 0.08311136811971664, 0.2449631690979004, 0.5989920496940613, 0.3104449212551117, -0.05715470761060715, 0.0231225565075...
https://github.com/huggingface/datasets/issues/5724
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...
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 the following error when it is used by `next(iter(dataset))`: ``` File "/d...
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...
[ -0.20790359377861023, -0.09794382750988007, -0.018992431461811066, 0.29914191365242004, 0.2917645573616028, 0.10431277751922607, 0.16898494958877563, 0.2264639139175415, -0.27683454751968384, 0.19730517268180847, -0.1995200216770172, 0.16217230260372162, -0.39054492115974426, 0.10089597851...
https://github.com/huggingface/datasets/issues/5722
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.
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.GeneratorBasedBuilder): """CrossEncoder dataset.""" B...
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...
[ -0.19576290249824524, -0.12930820882320404, 0.04221225529909134, 0.3095168173313141, 0.5364697575569153, -0.051189810037612915, 0.23426277935504913, 0.19125810265541077, 0.044005297124385834, 0.10703392326831818, -0.10220550000667572, 0.23422609269618988, -0.3720554709434509, 0.20775169134...
https://github.com/huggingface/datasets/issues/5720
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...
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/torch/utils/data/dataloader.py", line 363, in __iter__ self....
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...
[ -0.5225951075553894, -0.38292956352233887, 0.009423822164535522, 0.47212132811546326, 0.3441590964794159, 0.09382329136133194, 0.6252887845039368, 0.10292047262191772, -0.1920423060655594, 0.22818687558174133, -0.23222973942756653, 0.2899165749549866, -0.1994057297706604, -0.10757900029420...
https://github.com/huggingface/datasets/issues/5720
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).
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/torch/utils/data/dataloader.py", line 363, in __iter__ self....
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...
[ -0.5225951075553894, -0.38292956352233887, 0.009423822164535522, 0.47212132811546326, 0.3441590964794159, 0.09382329136133194, 0.6252887845039368, 0.10292047262191772, -0.1920423060655594, 0.22818687558174133, -0.23222973942756653, 0.2899165749549866, -0.1994057297706604, -0.10757900029420...
https://github.com/huggingface/datasets/issues/5720
@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...
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/torch/utils/data/dataloader.py", line 363, in __iter__ self....
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...
[ -0.5225951075553894, -0.38292956352233887, 0.009423822164535522, 0.47212132811546326, 0.3441590964794159, 0.09382329136133194, 0.6252887845039368, 0.10292047262191772, -0.1920423060655594, 0.22818687558174133, -0.23222973942756653, 0.2899165749549866, -0.1994057297706604, -0.10757900029420...
https://github.com/huggingface/datasets/issues/5720
So is there a way to fix this by changing the `mp` method? This is blocking any usage of the `datasets` library for me
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/torch/utils/data/dataloader.py", line 363, in __iter__ self....
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...
[ -0.5225951075553894, -0.38292956352233887, 0.009423822164535522, 0.47212132811546326, 0.3441590964794159, 0.09382329136133194, 0.6252887845039368, 0.10292047262191772, -0.1920423060655594, 0.22818687558174133, -0.23222973942756653, 0.2899165749549866, -0.1994057297706604, -0.10757900029420...
https://github.com/huggingface/datasets/issues/5720
@jlehrer1 can you try adding `mp.set_start_method('fork')` at the beginning of your code? Maybe this helps you. Keep us posted.
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/torch/utils/data/dataloader.py", line 363, in __iter__ self....
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...
[ -0.5225951075553894, -0.38292956352233887, 0.009423822164535522, 0.47212132811546326, 0.3441590964794159, 0.09382329136133194, 0.6252887845039368, 0.10292047262191772, -0.1920423060655594, 0.22818687558174133, -0.23222973942756653, 0.2899165749549866, -0.1994057297706604, -0.10757900029420...
https://github.com/huggingface/datasets/issues/5719
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...
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 input to the data creation function. Why is it converting my array int...
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...
[ 0.5075539946556091, -0.2641132175922394, -0.0844285637140274, 0.24246928095817566, 0.16535627841949463, 0.05181385576725006, 0.7122006416320801, 0.12073925137519836, 0.48243463039398193, -0.08385051041841507, -0.01496727392077446, 0.4592285752296448, -0.22559741139411926, 0.101641021668910...
https://github.com/huggingface/datasets/issues/5719
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 ...
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 input to the data creation function. Why is it converting my array int...
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...
[ 0.501378059387207, -0.2389650046825409, -0.07295355945825577, 0.2530471980571747, 0.14261548221111298, 0.06911535561084747, 0.7342240214347839, 0.12222082912921906, 0.5260216593742371, -0.07499207556247711, -0.039258770644664764, 0.47282424569129944, -0.212793231010437, 0.07334797829389572...
https://github.com/huggingface/datasets/issues/5717
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...
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-packages/datasets/arrow_dataset.py", line 1442, in save_...
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...
[ -0.07521145045757294, -0.44404372572898865, -0.10260006785392761, 0.3910185396671295, 0.4102981388568878, 0.2558813691139221, 0.09858540445566177, 0.14438162744045258, -0.23703399300575256, 0.16042831540107727, 0.12004079669713974, 0.2100370079278946, -0.37237343192100525, -0.1631561964750...
https://github.com/huggingface/datasets/issues/5717
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.
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-packages/datasets/arrow_dataset.py", line 1442, in save_...
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...
[ -0.07521145045757294, -0.44404372572898865, -0.10260006785392761, 0.3910185396671295, 0.4102981388568878, 0.2558813691139221, 0.09858540445566177, 0.14438162744045258, -0.23703399300575256, 0.16042831540107727, 0.12004079669713974, 0.2100370079278946, -0.37237343192100525, -0.1631561964750...
https://github.com/huggingface/datasets/issues/5717
OK, thanks! The dataset is currently hosted on a gcs bucket. How would you like to proceed for sharing the link?
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-packages/datasets/arrow_dataset.py", line 1442, in save_...
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...
[ -0.07521145045757294, -0.44404372572898865, -0.10260006785392761, 0.3910185396671295, 0.4102981388568878, 0.2558813691139221, 0.09858540445566177, 0.14438162744045258, -0.23703399300575256, 0.16042831540107727, 0.12004079669713974, 0.2100370079278946, -0.37237343192100525, -0.1631561964750...
https://github.com/huggingface/datasets/issues/5717
You could follow [this](https://cloud.google.com/storage/docs/collaboration#browser) procedure or upload the dataset to Google Drive (50K images is not that much unless high-res) and send me an email with the link.
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-packages/datasets/arrow_dataset.py", line 1442, in save_...
28
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...
[ -0.07521145045757294, -0.44404372572898865, -0.10260006785392761, 0.3910185396671295, 0.4102981388568878, 0.2558813691139221, 0.09858540445566177, 0.14438162744045258, -0.23703399300575256, 0.16042831540107727, 0.12004079669713974, 0.2100370079278946, -0.37237343192100525, -0.1631561964750...
https://github.com/huggingface/datasets/issues/5717
Thanks @jplu! I managed to reproduce the `TypeError` - it stems from [this](https://github.com/huggingface/datasets/blob/e3f4f124a1b118a5bfff5bae76b25a68aedbebbc/src/datasets/features/image.py#L258-L264) line, which can return a `ChunkedArray` (its mask is also chunked then, which Arrow does not allow) when the embedde...
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-packages/datasets/arrow_dataset.py", line 1442, in save_...
48
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...
[ -0.07521145045757294, -0.44404372572898865, -0.10260006785392761, 0.3910185396671295, 0.4102981388568878, 0.2558813691139221, 0.09858540445566177, 0.14438162744045258, -0.23703399300575256, 0.16042831540107727, 0.12004079669713974, 0.2100370079278946, -0.37237343192100525, -0.1631561964750...