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/6113
Hi! This should be fixed in the latest (patch) release (run `pip install -U datasets` to install it). This behavior was due to a bug in our authentication logic.
load_dataset() fails with streamlit caching inside docker
### Describe the bug When calling `load_dataset` in a streamlit application running within a docker container, get a failure with the error message: EmptyDatasetError: The directory at hf://datasets/fetch-rewards/inc-rings-2000@bea27cf60842b3641eae418f38864a2ec4cde684 doesn't contain any data files Traceback: Fil...
29
load_dataset() fails with streamlit caching inside docker ### Describe the bug When calling `load_dataset` in a streamlit application running within a docker container, get a failure with the error message: EmptyDatasetError: The directory at hf://datasets/fetch-rewards/inc-rings-2000@bea27cf60842b3641eae418f3886...
[ -0.4902493357658386, 0.21815185248851776, -0.10225380957126617, 0.3766001760959625, 0.24528191983699799, 0.0007976144552230835, 0.6295652389526367, 0.18384715914726257, 0.11621171236038208, 0.029357101768255234, 0.008320800960063934, 0.06578747183084488, 0.059611160308122635, 0.12017628550...
https://github.com/huggingface/datasets/issues/6112
Thanks for reporting! This is a bug in converting the `ArrayXD` types to YAML. It will be fixed soon.
yaml error using push_to_hub with generated README.md
### Describe the bug When I construct a dataset with the following features: ``` features = Features( { "pixel_values": Array3D(dtype="float64", shape=(3, 224, 224)), "input_ids": Sequence(feature=Value(dtype="int64")), "attention_mask": Sequence(Value(dtype="int64")), "token...
19
yaml error using push_to_hub with generated README.md ### Describe the bug When I construct a dataset with the following features: ``` features = Features( { "pixel_values": Array3D(dtype="float64", shape=(3, 224, 224)), "input_ids": Sequence(feature=Value(dtype="int64")), "attentio...
[ -0.14145323634147644, -0.6504641175270081, 0.16394361853599548, 0.21164977550506592, 0.35897690057754517, 0.14997635781764984, 0.37134379148483276, 0.23591384291648865, 0.14923766255378723, -0.15944093465805054, 0.16326947510242462, 0.03520447760820389, -0.10284475982189178, 0.337714880704...
https://github.com/huggingface/datasets/issues/6111
This should work: `load_dataset("path/to/downloaded_repo")` `load_from_disk` is intended to be used on directories created with `Dataset.save_to_disk` or `DatasetDict.save_to_disk`
raise FileNotFoundError("Directory {dataset_path} is neither a `Dataset` directory nor a `DatasetDict` directory." )
### Describe the bug For researchers in some countries or regions, it is usually the case that the download ability of `load_dataset` is disabled due to the complex network environment. People in these regions often prefer to use git clone or other programming tricks to manually download the files to the disk (for exa...
17
raise FileNotFoundError("Directory {dataset_path} is neither a `Dataset` directory nor a `DatasetDict` directory." ) ### Describe the bug For researchers in some countries or regions, it is usually the case that the download ability of `load_dataset` is disabled due to the complex network environment. People in thes...
[ -0.2685803771018982, -0.06441403180360794, 0.07613176852464676, 0.36047497391700745, 0.04826785624027252, -0.09567469358444214, 0.10725240409374237, 0.23474422097206116, 0.24625685811042786, 0.1420275866985321, -0.15977632999420166, 0.08738145232200623, 0.020607292652130127, 0.106175467371...
https://github.com/huggingface/datasets/issues/6111
> This should work: `load_dataset("path/to/downloaded_repo")` > > `load_from_disk` is intended to be used on directories created with `Dataset.save_to_disk` or `DatasetDict.save_to_disk` Thanks for your help. This works.
raise FileNotFoundError("Directory {dataset_path} is neither a `Dataset` directory nor a `DatasetDict` directory." )
### Describe the bug For researchers in some countries or regions, it is usually the case that the download ability of `load_dataset` is disabled due to the complex network environment. People in these regions often prefer to use git clone or other programming tricks to manually download the files to the disk (for exa...
26
raise FileNotFoundError("Directory {dataset_path} is neither a `Dataset` directory nor a `DatasetDict` directory." ) ### Describe the bug For researchers in some countries or regions, it is usually the case that the download ability of `load_dataset` is disabled due to the complex network environment. People in thes...
[ -0.2685803771018982, -0.06441403180360794, 0.07613176852464676, 0.36047497391700745, 0.04826785624027252, -0.09567469358444214, 0.10725240409374237, 0.23474422097206116, 0.24625685811042786, 0.1420275866985321, -0.15977632999420166, 0.08738145232200623, 0.020607292652130127, 0.106175467371...
https://github.com/huggingface/datasets/issues/6110
This is expected behavior. You must provide `cache_file_name` when performing `.map` on an in-memory dataset for the result to be cached.
[BUG] Dataset initialized from in-memory data does not create cache.
### Describe the bug `Dataset` initialized from in-memory data (dictionary in my case, haven't tested with other types) does not create cache when processed with the `map` method, unlike `Dataset` initialized by other methods such as `load_dataset`. ### Steps to reproduce the bug ```python # below code was ru...
21
[BUG] Dataset initialized from in-memory data does not create cache. ### Describe the bug `Dataset` initialized from in-memory data (dictionary in my case, haven't tested with other types) does not create cache when processed with the `map` method, unlike `Dataset` initialized by other methods such as `load_datase...
[ -0.08459498733282089, -0.3960629403591156, 0.030023247003555298, 0.37451669573783875, 0.3451509177684784, 0.14292441308498383, 0.039096251130104065, 0.28264227509498596, 0.20719891786575317, 0.004734143614768982, -0.0554051473736763, 0.5577744245529175, 0.06757719069719315, -0.212675720453...
https://github.com/huggingface/datasets/issues/6109
Thanks for reporting, @610v4nn1. Indeed, the source data files are no longer available. We have contacted the authors of the dataset and they report that Amazon has decided to stop distributing the multilingual reviews dataset. We are adding a notification about this issue to the dataset card. See: https://hug...
Problems in downloading Amazon reviews from HF
### Describe the bug I have a script downloading `amazon_reviews_multi`. When the download starts, I get ``` Downloading data files: 0%| | 0/1 [00:00<?, ?it/s] Downloading data: 243B [00:00, 1.43MB/s] Downloading data files: 100%|██████████| 1/1 [00:01<00:00, 1.54s/it] Extracting data files: 100%...
49
Problems in downloading Amazon reviews from HF ### Describe the bug I have a script downloading `amazon_reviews_multi`. When the download starts, I get ``` Downloading data files: 0%| | 0/1 [00:00<?, ?it/s] Downloading data: 243B [00:00, 1.43MB/s] Downloading data files: 100%|██████████| 1/1 [00:...
[ -0.29059678316116333, -0.1834934800863266, -0.09265191853046417, 0.35295364260673523, 0.05249357968568802, 0.12003567814826965, 0.03875169903039932, 0.39338797330856323, 0.084026038646698, 0.16796791553497314, -0.14502131938934326, -0.6513493657112122, 0.15460199117660522, 0.09386534243822...
https://github.com/huggingface/datasets/issues/6108
Yesterday I waited for more than 12 hours to make sure it was really **stuck** instead of proceeding too slow.
Loading local datasets got strangely stuck
### Describe the bug I try to use `load_dataset()` to load several local `.jsonl` files as a dataset. Every line of these files is a json structure only containing one key `text` (yeah it is a dataset for NLP model). The code snippet is as: ```python ds = load_dataset("json", data_files=LIST_OF_FILE_PATHS, num_proc=...
20
Loading local datasets got strangely stuck ### Describe the bug I try to use `load_dataset()` to load several local `.jsonl` files as a dataset. Every line of these files is a json structure only containing one key `text` (yeah it is a dataset for NLP model). The code snippet is as: ```python ds = load_dataset("js...
[ -0.24503090977668762, -0.018570467829704285, -0.02903907559812069, 0.2270108461380005, -0.018362440168857574, 0.05931895971298218, 0.2687035799026489, 0.23350246250629425, 0.12182816863059998, 0.18180540204048157, 0.0590432733297348, 0.5354204773902893, -0.11318369209766388, -0.09281224012...
https://github.com/huggingface/datasets/issues/6108
I've had similar weird issues with `load_dataset` as well. Not multiple files, but dataset is quite big, about 50G.
Loading local datasets got strangely stuck
### Describe the bug I try to use `load_dataset()` to load several local `.jsonl` files as a dataset. Every line of these files is a json structure only containing one key `text` (yeah it is a dataset for NLP model). The code snippet is as: ```python ds = load_dataset("json", data_files=LIST_OF_FILE_PATHS, num_proc=...
19
Loading local datasets got strangely stuck ### Describe the bug I try to use `load_dataset()` to load several local `.jsonl` files as a dataset. Every line of these files is a json structure only containing one key `text` (yeah it is a dataset for NLP model). The code snippet is as: ```python ds = load_dataset("js...
[ -0.24503090977668762, -0.018570467829704285, -0.02903907559812069, 0.2270108461380005, -0.018362440168857574, 0.05931895971298218, 0.2687035799026489, 0.23350246250629425, 0.12182816863059998, 0.18180540204048157, 0.0590432733297348, 0.5354204773902893, -0.11318369209766388, -0.09281224012...
https://github.com/huggingface/datasets/issues/6108
We use a generic multiprocessing code, so there is little we can do about this - unfortunately, turning off multiprocessing seems to be the only solution. Multithreading would make our code easier to maintain and (most likely) avoid issues such as this one, but we cannot use it until the GIL is dropped (no-GIL Python s...
Loading local datasets got strangely stuck
### Describe the bug I try to use `load_dataset()` to load several local `.jsonl` files as a dataset. Every line of these files is a json structure only containing one key `text` (yeah it is a dataset for NLP model). The code snippet is as: ```python ds = load_dataset("json", data_files=LIST_OF_FILE_PATHS, num_proc=...
67
Loading local datasets got strangely stuck ### Describe the bug I try to use `load_dataset()` to load several local `.jsonl` files as a dataset. Every line of these files is a json structure only containing one key `text` (yeah it is a dataset for NLP model). The code snippet is as: ```python ds = load_dataset("js...
[ -0.24503090977668762, -0.018570467829704285, -0.02903907559812069, 0.2270108461380005, -0.018362440168857574, 0.05931895971298218, 0.2687035799026489, 0.23350246250629425, 0.12182816863059998, 0.18180540204048157, 0.0590432733297348, 0.5354204773902893, -0.11318369209766388, -0.09281224012...
https://github.com/huggingface/datasets/issues/6108
The problem seems to be the `Generating train split`. Is it possible to avoid that? I have a dataset saved, just want to load it but somehow running into issues with that again.
Loading local datasets got strangely stuck
### Describe the bug I try to use `load_dataset()` to load several local `.jsonl` files as a dataset. Every line of these files is a json structure only containing one key `text` (yeah it is a dataset for NLP model). The code snippet is as: ```python ds = load_dataset("json", data_files=LIST_OF_FILE_PATHS, num_proc=...
33
Loading local datasets got strangely stuck ### Describe the bug I try to use `load_dataset()` to load several local `.jsonl` files as a dataset. Every line of these files is a json structure only containing one key `text` (yeah it is a dataset for NLP model). The code snippet is as: ```python ds = load_dataset("js...
[ -0.24503090977668762, -0.018570467829704285, -0.02903907559812069, 0.2270108461380005, -0.018362440168857574, 0.05931895971298218, 0.2687035799026489, 0.23350246250629425, 0.12182816863059998, 0.18180540204048157, 0.0590432733297348, 0.5354204773902893, -0.11318369209766388, -0.09281224012...
https://github.com/huggingface/datasets/issues/6108
Hey guys, recently I ran into this problem again and I spent one whole day trying to locate the problem. Finally I found the problem seems to be with `pyarrow`'s json parser, and it seems a long-existing problem. Similar issue can be found in #2181. Anyway, my solution is to adjust the `load_dataset`'s parameter `chunk...
Loading local datasets got strangely stuck
### Describe the bug I try to use `load_dataset()` to load several local `.jsonl` files as a dataset. Every line of these files is a json structure only containing one key `text` (yeah it is a dataset for NLP model). The code snippet is as: ```python ds = load_dataset("json", data_files=LIST_OF_FILE_PATHS, num_proc=...
128
Loading local datasets got strangely stuck ### Describe the bug I try to use `load_dataset()` to load several local `.jsonl` files as a dataset. Every line of these files is a json structure only containing one key `text` (yeah it is a dataset for NLP model). The code snippet is as: ```python ds = load_dataset("js...
[ -0.24503090977668762, -0.018570467829704285, -0.02903907559812069, 0.2270108461380005, -0.018362440168857574, 0.05931895971298218, 0.2687035799026489, 0.23350246250629425, 0.12182816863059998, 0.18180540204048157, 0.0590432733297348, 0.5354204773902893, -0.11318369209766388, -0.09281224012...
https://github.com/huggingface/datasets/issues/6106
Hi! We use PyArrow to read JSON files, and PyArrow doesn't allow different value types in the same column. #5776 should address this. In the meantime, you can combine `Dataset.from_generator` with the above code to cast the values to the same type.
load local json_file as dataset
### Describe the bug I tried to load local json file as dataset but failed to parsing json file because some columns are 'float' type. ### Steps to reproduce the bug 1. load json file with certain columns are 'float' type. For example `data = load_data("json", data_files=JSON_PATH)` 2. Then, the error will be trigg...
42
load local json_file as dataset ### Describe the bug I tried to load local json file as dataset but failed to parsing json file because some columns are 'float' type. ### Steps to reproduce the bug 1. load json file with certain columns are 'float' type. For example `data = load_data("json", data_files=JSON_PATH)`...
[ -0.208848237991333, 0.06968754529953003, -0.03522949293255806, 0.17629344761371613, 0.434946209192276, 0.08668085932731628, 0.3508772552013397, 0.6542973518371582, 0.14965468645095825, 0.050333864986896515, -0.15788719058036804, 0.867743730545044, 0.11829949170351028, 0.10017549246549606, ...
https://github.com/huggingface/datasets/issues/6099
Seems like the problem isn't with the library, but the dataset itself hosted on AWS S3. Its [homepage](https://s3.amazonaws.com/amazon-reviews-pds/readme.html) returns an `AccessDenied` XML response, which is the same thing you get if you try to log the `record` that triggers the exception ```python try: ex...
How do i get "amazon_us_reviews
### Feature request I have been trying to load 'amazon_us_dataset" but unable to do so. `amazon_us_reviews = load_dataset('amazon_us_reviews')` `print(amazon_us_reviews)` > [ValueError: Config name is missing. Please pick one among the available configs: ['Wireless_v1_00', 'Watches_v1_00', 'Video_Games_v1...
67
How do i get "amazon_us_reviews ### Feature request I have been trying to load 'amazon_us_dataset" but unable to do so. `amazon_us_reviews = load_dataset('amazon_us_reviews')` `print(amazon_us_reviews)` > [ValueError: Config name is missing. Please pick one among the available configs: ['Wireless_v1_00'...
[ -0.046608902513980865, -0.2530131936073303, -0.28236865997314453, 0.24994568526744843, 0.29547378420829773, 0.42686212062835693, 0.3098292648792267, 0.08909308910369873, -0.06656547635793686, 0.20722495019435883, 0.0757707953453064, 0.04079410061240196, 0.20352010428905487, 0.3681925535202...
https://github.com/huggingface/datasets/issues/6099
I have figured it out. there was an option of **parquet formated files** i downloaded some from there.
How do i get "amazon_us_reviews
### Feature request I have been trying to load 'amazon_us_dataset" but unable to do so. `amazon_us_reviews = load_dataset('amazon_us_reviews')` `print(amazon_us_reviews)` > [ValueError: Config name is missing. Please pick one among the available configs: ['Wireless_v1_00', 'Watches_v1_00', 'Video_Games_v1...
18
How do i get "amazon_us_reviews ### Feature request I have been trying to load 'amazon_us_dataset" but unable to do so. `amazon_us_reviews = load_dataset('amazon_us_reviews')` `print(amazon_us_reviews)` > [ValueError: Config name is missing. Please pick one among the available configs: ['Wireless_v1_00'...
[ -0.046608902513980865, -0.2530131936073303, -0.28236865997314453, 0.24994568526744843, 0.29547378420829773, 0.42686212062835693, 0.3098292648792267, 0.08909308910369873, -0.06656547635793686, 0.20722495019435883, 0.0757707953453064, 0.04079410061240196, 0.20352010428905487, 0.3681925535202...
https://github.com/huggingface/datasets/issues/6099
Thanks for reporting, @IqraBaluch. We contacted the authors and unfortunately they reported that Amazon has decided to stop distributing this dataset.
How do i get "amazon_us_reviews
### Feature request I have been trying to load 'amazon_us_dataset" but unable to do so. `amazon_us_reviews = load_dataset('amazon_us_reviews')` `print(amazon_us_reviews)` > [ValueError: Config name is missing. Please pick one among the available configs: ['Wireless_v1_00', 'Watches_v1_00', 'Video_Games_v1...
21
How do i get "amazon_us_reviews ### Feature request I have been trying to load 'amazon_us_dataset" but unable to do so. `amazon_us_reviews = load_dataset('amazon_us_reviews')` `print(amazon_us_reviews)` > [ValueError: Config name is missing. Please pick one among the available configs: ['Wireless_v1_00'...
[ -0.046608902513980865, -0.2530131936073303, -0.28236865997314453, 0.24994568526744843, 0.29547378420829773, 0.42686212062835693, 0.3098292648792267, 0.08909308910369873, -0.06656547635793686, 0.20722495019435883, 0.0757707953453064, 0.04079410061240196, 0.20352010428905487, 0.3681925535202...
https://github.com/huggingface/datasets/issues/6099
I noticed that some book data is missing, we can only get Books_v1_02 data. Is there any way we can get the Books_v1_00 and Books_v1_01? Really appreciate !!!
How do i get "amazon_us_reviews
### Feature request I have been trying to load 'amazon_us_dataset" but unable to do so. `amazon_us_reviews = load_dataset('amazon_us_reviews')` `print(amazon_us_reviews)` > [ValueError: Config name is missing. Please pick one among the available configs: ['Wireless_v1_00', 'Watches_v1_00', 'Video_Games_v1...
28
How do i get "amazon_us_reviews ### Feature request I have been trying to load 'amazon_us_dataset" but unable to do so. `amazon_us_reviews = load_dataset('amazon_us_reviews')` `print(amazon_us_reviews)` > [ValueError: Config name is missing. Please pick one among the available configs: ['Wireless_v1_00'...
[ -0.046608902513980865, -0.2530131936073303, -0.28236865997314453, 0.24994568526744843, 0.29547378420829773, 0.42686212062835693, 0.3098292648792267, 0.08909308910369873, -0.06656547635793686, 0.20722495019435883, 0.0757707953453064, 0.04079410061240196, 0.20352010428905487, 0.3681925535202...
https://github.com/huggingface/datasets/issues/6099
@albertvillanova will this dataset be retired given the data are no longer hosted on S3? What is done in cases such as these?
How do i get "amazon_us_reviews
### Feature request I have been trying to load 'amazon_us_dataset" but unable to do so. `amazon_us_reviews = load_dataset('amazon_us_reviews')` `print(amazon_us_reviews)` > [ValueError: Config name is missing. Please pick one among the available configs: ['Wireless_v1_00', 'Watches_v1_00', 'Video_Games_v1...
23
How do i get "amazon_us_reviews ### Feature request I have been trying to load 'amazon_us_dataset" but unable to do so. `amazon_us_reviews = load_dataset('amazon_us_reviews')` `print(amazon_us_reviews)` > [ValueError: Config name is missing. Please pick one among the available configs: ['Wireless_v1_00'...
[ -0.046608902513980865, -0.2530131936073303, -0.28236865997314453, 0.24994568526744843, 0.29547378420829773, 0.42686212062835693, 0.3098292648792267, 0.08909308910369873, -0.06656547635793686, 0.20722495019435883, 0.0757707953453064, 0.04079410061240196, 0.20352010428905487, 0.3681925535202...
https://github.com/huggingface/datasets/issues/6089
We could add a "threads" parallel backend to `datasets.parallel.parallel_backend` to support downloading with threads but note that `download_and_extract` also decompresses archives, and this is a CPU-intensive task, which is not ideal for (Python) threads (good for IO-intensive tasks).
AssertionError: daemonic processes are not allowed to have children
### Describe the bug When I load_dataset with num_proc > 0 in a deamon process, I got an error: ```python File "/Users/codingl2k1/Work/datasets/src/datasets/download/download_manager.py", line 564, in download_and_extract return self.extract(self.download(url_or_urls)) ^^^^^^^^^^^^^^^^^ File "/Users...
38
AssertionError: daemonic processes are not allowed to have children ### Describe the bug When I load_dataset with num_proc > 0 in a deamon process, I got an error: ```python File "/Users/codingl2k1/Work/datasets/src/datasets/download/download_manager.py", line 564, in download_and_extract return self.extr...
[ -0.5046079158782959, -0.41358479857444763, -0.1501489281654358, 0.4784198999404907, 0.13185861706733704, -0.0063525959849357605, 0.2230970561504364, -0.05357125774025917, -0.024778857827186584, 0.07532692700624466, 0.1387217491865158, 0.24004274606704712, -0.2916397452354431, -0.1224174201...
https://github.com/huggingface/datasets/issues/6089
> We could add a "threads" parallel backend to `datasets.parallel.parallel_backend` to support downloading with threads but note that `download_and_extract` also decompresses archives, and this is a CPU-intensive task, which is not ideal for (Python) threads (good for IO-intensive tasks). Great! Download takes more ...
AssertionError: daemonic processes are not allowed to have children
### Describe the bug When I load_dataset with num_proc > 0 in a deamon process, I got an error: ```python File "/Users/codingl2k1/Work/datasets/src/datasets/download/download_manager.py", line 564, in download_and_extract return self.extract(self.download(url_or_urls)) ^^^^^^^^^^^^^^^^^ File "/Users...
58
AssertionError: daemonic processes are not allowed to have children ### Describe the bug When I load_dataset with num_proc > 0 in a deamon process, I got an error: ```python File "/Users/codingl2k1/Work/datasets/src/datasets/download/download_manager.py", line 564, in download_and_extract return self.extr...
[ -0.5046079158782959, -0.41358479857444763, -0.1501489281654358, 0.4784198999404907, 0.13185861706733704, -0.0063525959849357605, 0.2230970561504364, -0.05357125774025917, -0.024778857827186584, 0.07532692700624466, 0.1387217491865158, 0.24004274606704712, -0.2916397452354431, -0.1224174201...
https://github.com/huggingface/datasets/issues/6086
I'm assuming this should just cover `to_csv`, `to_parquet`, and `to_json`, right? As `to_list` and `to_dict` just return Python objects, `to_pandas` returns a `pandas.DataFrame` and `to_sql` just inserts into a SQL DB, is that right?
Support `fsspec` in `Dataset.to_<format>` methods
Supporting this should be fairly easy. Requested on the forum [here](https://discuss.huggingface.co/t/how-can-i-convert-a-loaded-dataset-in-to-a-parquet-file-and-save-it-to-the-s3/48353).
34
Support `fsspec` in `Dataset.to_<format>` methods Supporting this should be fairly easy. Requested on the forum [here](https://discuss.huggingface.co/t/how-can-i-convert-a-loaded-dataset-in-to-a-parquet-file-and-save-it-to-the-s3/48353). I'm assuming this should just cover `to_csv`, `to_parquet`, and `to_json`, ...
[ -0.228164941072464, -0.20701052248477936, -0.07345094531774521, 0.013687949627637863, 0.31308770179748535, -0.09484119713306427, -0.029511384665966034, 0.19544221460819244, -0.05052853375673294, -0.05537755787372589, -0.1205410361289978, 0.4630902111530304, 0.013808682560920715, 0.91582494...
https://github.com/huggingface/datasets/issues/6079
When the process starts to hang, can you interrupt it with CTRL + C and paste the error stack trace here?
Iterating over DataLoader based on HF datasets is stuck forever
### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is working for python 3.6 based conda environment seamlessly. What shou...
21
Iterating over DataLoader based on HF datasets is stuck forever ### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is wo...
[ -0.12034130841493607, -0.06106951832771301, -0.053946372121572495, 0.2993975579738617, -0.007555797230452299, 0.1387968510389328, 0.3968624174594879, 0.2260725498199463, -0.03234650194644928, 0.242258220911026, 0.014716260135173798, 0.3595844805240631, -0.005156952887773514, 0.190136134624...
https://github.com/huggingface/datasets/issues/6079
Thanks @mariosasko for your prompt response, here's the stack trace: ``` KeyboardInterrupt Traceback (most recent call last) Cell In[12], line 4 2 t = time.time() 3 iter_ = 0 ----> 4 for batch in train_dataloader: 5 #batch_proc = streaming_obj.collect_streaming_dat...
Iterating over DataLoader based on HF datasets is stuck forever
### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is working for python 3.6 based conda environment seamlessly. What shou...
308
Iterating over DataLoader based on HF datasets is stuck forever ### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is wo...
[ -0.11611773073673248, -0.08128432929515839, -0.03265766799449921, 0.27752193808555603, 0.00524074025452137, 0.10193176567554474, 0.417864590883255, 0.2360875904560089, -0.058897536247968674, 0.2419946938753128, 0.03315392881631851, 0.31277602910995483, -0.008137278258800507, 0.181409314274...
https://github.com/huggingface/datasets/issues/6079
Update: If i let it run, it eventually fails with: ``` RuntimeError Traceback (most recent call last) Cell In[16], line 4 2 t = time.time() 3 iter_ = 0 ----> 4 for batch in train_dataloader: 5 #batch_proc = streaming_obj.collect_streaming_data_batch(batch) ...
Iterating over DataLoader based on HF datasets is stuck forever
### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is working for python 3.6 based conda environment seamlessly. What shou...
416
Iterating over DataLoader based on HF datasets is stuck forever ### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is wo...
[ -0.1563844233751297, -0.04011835157871246, -0.02611197903752327, 0.2762729823589325, 0.002015233039855957, 0.09724314510822296, 0.42567208409309387, 0.24761492013931274, -0.07167746126651764, 0.219465970993042, 0.021227151155471802, 0.3324207663536072, -0.023974724113941193, 0.189560532569...
https://github.com/huggingface/datasets/issues/6079
PyTorch tensors cannot store `Decimal` objects. Casting the column with decimals to `float` should fix the issue.
Iterating over DataLoader based on HF datasets is stuck forever
### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is working for python 3.6 based conda environment seamlessly. What shou...
17
Iterating over DataLoader based on HF datasets is stuck forever ### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is wo...
[ -0.09444306790828705, -0.06475421041250229, -0.029098311439156532, 0.34477677941322327, 0.047911591827869415, 0.09503510594367981, 0.4583494961261749, 0.25571954250335693, -0.07225597649812698, 0.282741904258728, -0.01944710873067379, 0.35102689266204834, -0.0015755146741867065, 0.12524184...
https://github.com/huggingface/datasets/issues/6079
I already have cast in collate_fn, in which I perform .astype(float) for each numerical field. On the same instance, I installed a conda env with python 3.6, and this works well. Sample: ``` def streaming_data_collate_fn(batch): df = pd.DataFrame.from_dict(batch) feat_vals = torch.FloatTensor(np.nan_t...
Iterating over DataLoader based on HF datasets is stuck forever
### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is working for python 3.6 based conda environment seamlessly. What shou...
42
Iterating over DataLoader based on HF datasets is stuck forever ### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is wo...
[ -0.06654298305511475, -0.020897045731544495, -0.018205072730779648, 0.25953370332717896, 0.08013052493333817, 0.0900518000125885, 0.4737333357334137, 0.2349279224872589, -0.06655073910951614, 0.24055343866348267, -0.01982254534959793, 0.34102046489715576, 0.035222698003053665, 0.1359448134...
https://github.com/huggingface/datasets/issues/6079
`collate_fn` is applied after the `torch` formatting step, so I think the only option when working with an `IterableDataset` is to remove the `with_format` call and perform the conversion from Python values to PyTorch tensors in `collate_fn`. The standard `Dataset` supports `with_format("numpy")`, which should make thi...
Iterating over DataLoader based on HF datasets is stuck forever
### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is working for python 3.6 based conda environment seamlessly. What shou...
48
Iterating over DataLoader based on HF datasets is stuck forever ### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is wo...
[ -0.09866748005151749, -0.05150717496871948, -0.006096921861171722, 0.2537921965122223, 0.03468204289674759, 0.1238858550786972, 0.5064867734909058, 0.27355968952178955, -0.14257553219795227, 0.21018093824386597, -0.02429894730448723, 0.3711855709552765, 0.0008320845663547516, 0.13665905594...
https://github.com/huggingface/datasets/issues/6079
Thanks! Python 3.10 conda-env: After replacing with_format("torch") with with_format("numpy"), the error went away. However, it was still taking over 2 minutes to load a very small batch of 64 samples with num_workers set to 32. Once I removed with_format call altogether, it is finishing in 11 seconds. Python 3.6 ...
Iterating over DataLoader based on HF datasets is stuck forever
### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is working for python 3.6 based conda environment seamlessly. What shou...
83
Iterating over DataLoader based on HF datasets is stuck forever ### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is wo...
[ -0.08759461343288422, -0.05146850645542145, -0.00822087749838829, 0.26277241110801697, 0.07494092732667923, 0.03287142515182495, 0.5292817950248718, 0.29862678050994873, -0.16207538545131683, 0.18641164898872375, -0.04850514233112335, 0.4207500219345093, -0.007070278748869896, 0.0817492306...
https://github.com/huggingface/datasets/issues/6079
Can you share the `datasets` and `torch` versions installed in these conda envs? > Once I removed with_format call altogether, it is finishing in 11 seconds. Hmm, that's surprising. What are your dataset's `.features`?
Iterating over DataLoader based on HF datasets is stuck forever
### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is working for python 3.6 based conda environment seamlessly. What shou...
34
Iterating over DataLoader based on HF datasets is stuck forever ### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is wo...
[ -0.09469501674175262, -0.07855117321014404, -0.025267386808991432, 0.28239768743515015, -0.003546716645359993, 0.10885149240493774, 0.4346688985824585, 0.2694898247718811, -0.06672896444797516, 0.20156945288181305, -0.0014986991882324219, 0.3665720820426941, -0.001992490142583847, 0.199856...
https://github.com/huggingface/datasets/issues/6079
Python 3.6: datasets.__version__ 2.4.0 torch.__version__ 1.10.1+cu102 Python 3.10: datasets.__version__ 2.14.0 torch.__version__ 2.0.0 Anonymized features are of the form (subset shown here): { 'string_feature_i': Value(dtype='string', id=None), 'numerical_feature_i': Value(dtype='decimal128(38, 0)', id=N...
Iterating over DataLoader based on HF datasets is stuck forever
### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is working for python 3.6 based conda environment seamlessly. What shou...
46
Iterating over DataLoader based on HF datasets is stuck forever ### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is wo...
[ -0.10414484143257141, -0.06336086988449097, -0.03020922653377056, 0.28839194774627686, 0.007552174851298332, 0.10713686048984528, 0.4424210488796234, 0.23903489112854004, -0.07540041953325272, 0.2319258153438568, 0.0046028196811676025, 0.3868003189563751, 0.022636670619249344, 0.1640197038...
https://github.com/huggingface/datasets/issues/6079
One more thing, in python 3.10 based kernel, interestingly increasing num_workers seem to be increasing the runtime of iterating I was trying out. In python 3.10 kernel execution, I do not even see multiple CPU cores spiking unlike in 3.6. 512 batch size on 32 workers executes in 2.4 seconds on python 3.6 kernel, wh...
Iterating over DataLoader based on HF datasets is stuck forever
### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is working for python 3.6 based conda environment seamlessly. What shou...
61
Iterating over DataLoader based on HF datasets is stuck forever ### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is wo...
[ -0.16187193989753723, -0.116234689950943, -0.050730470567941666, 0.24418914318084717, -0.04789000749588013, 0.04484958201646805, 0.5003331899642944, 0.24632829427719116, -0.09249991178512573, 0.25677382946014404, 0.011409658938646317, 0.46527740359306335, -0.0470215380191803, 0.14862203598...
https://github.com/huggingface/datasets/issues/6079
**Update**: It seems the latency part is more of a multiprocessing issue with torch and some host specific issue, and I had to scourge through relevant pytorch issues, when I stumbled across these threads: 1. https://github.com/pytorch/pytorch/issues/102494 2. https://github.com/pytorch/pytorch/issues/102269 3. http...
Iterating over DataLoader based on HF datasets is stuck forever
### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is working for python 3.6 based conda environment seamlessly. What shou...
87
Iterating over DataLoader based on HF datasets is stuck forever ### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is wo...
[ -0.12823417782783508, -0.16303879022598267, -0.033234819769859314, 0.22006091475486755, -0.08479107916355133, 0.04496645927429199, 0.4441736936569214, 0.23284724354743958, -0.08224606513977051, 0.19713343679904938, 0.04701315611600876, 0.3833542466163635, 0.02022908255457878, -0.0033660531...
https://github.com/huggingface/datasets/issues/6079
I'm facing a similar situation in the local VS Code. Datasets version 2.14.4 Torch 2.0.1+cu118 Same code runs without issues in Colab ``` from datasets import load_dataset dataset = load_dataset("Supermaxman/esa-hubble", streaming=True) sample = next(iter(dataset["train"])) ``` is stuck for minutes....
Iterating over DataLoader based on HF datasets is stuck forever
### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is working for python 3.6 based conda environment seamlessly. What shou...
155
Iterating over DataLoader based on HF datasets is stuck forever ### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is wo...
[ -0.15123410522937775, -0.032595306634902954, -0.028455058112740517, 0.23572960495948792, -0.027845654636621475, 0.07383497804403305, 0.37743887305259705, 0.20796850323677063, -0.021897830069065094, 0.3850677013397217, -0.012812208384275436, 0.352201372385025, -0.008928308263421059, 0.16393...
https://github.com/huggingface/datasets/issues/6079
@osanseviero I assume the `self._sslobj.read(len, buffer)` line comes from the built-in `ssl` module, so this probably has something to do with your network. Please open a new issue with the full stack trace in case you haven't resolved this yet.
Iterating over DataLoader based on HF datasets is stuck forever
### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is working for python 3.6 based conda environment seamlessly. What shou...
40
Iterating over DataLoader based on HF datasets is stuck forever ### Describe the bug I am using Amazon Sagemaker notebook (Amazon Linux 2) with python 3.10 based Conda environment. I have a dataset in parquet format locally. When I try to iterate over it, the loader is stuck forever. Note that the same code is wo...
[ -0.08103133738040924, -0.013380050659179688, -0.03669363260269165, 0.27100300788879395, -0.03732560575008392, 0.08859400451183319, 0.4580969214439392, 0.205763578414917, -0.0007538571953773499, 0.2618662714958191, 0.038513414561748505, 0.2988518178462982, 0.03217682987451553, 0.21014851331...
https://github.com/huggingface/datasets/issues/6078
Currently, it's not possible to efficiently resume streaming after an error. Eventually, we plan to support this for Parquet (see https://github.com/huggingface/datasets/issues/5380).
resume_download with streaming=True
### Describe the bug I used: ``` dataset = load_dataset( "oscar-corpus/OSCAR-2201", token=True, language="fr", streaming=True, split="train" ) ``` Unfortunately, the server had a problem during the training process. I saved the step my training stopped at. But how can I resume download f...
21
resume_download with streaming=True ### Describe the bug I used: ``` dataset = load_dataset( "oscar-corpus/OSCAR-2201", token=True, language="fr", streaming=True, split="train" ) ``` Unfortunately, the server had a problem during the training process. I saved the step my training stoppe...
[ -0.496049702167511, -0.22135448455810547, 0.094222292304039, 0.041804246604442596, 0.2625918984413147, -0.0770002156496048, -0.1220308393239975, -0.01835372857749462, 0.01003071665763855, 0.11760888993740082, 0.050583288073539734, 0.10911040008068085, 0.029635723680257797, 0.39785844087600...
https://github.com/huggingface/datasets/issues/6077
The `MAX_MAP_BATCH_SIZE = 1_000_000_000` hack is bad as it loads the entire dataset into RAM when performing `.map`. Instead, it's best to use `.iter(batch_size)` to iterate over the data batches and compute `mean` for each column. (`stddev` can be computed in another pass). Also, these arrays are big, so it makes s...
Mapping gets stuck at 99%
### Describe the bug Hi ! I'm currently working with a large (~150GB) unnormalized dataset at work. The dataset is available on a read-only filesystem internally, and I use a [loading script](https://huggingface.co/docs/datasets/dataset_script) to retreive it. I want to normalize the features of the dataset, ...
62
Mapping gets stuck at 99% ### Describe the bug Hi ! I'm currently working with a large (~150GB) unnormalized dataset at work. The dataset is available on a read-only filesystem internally, and I use a [loading script](https://huggingface.co/docs/datasets/dataset_script) to retreive it. I want to normalize t...
[ -0.23888099193572998, -0.4203942120075226, 0.11454978585243225, 0.01367790624499321, 0.38200873136520386, -0.02695149928331375, -0.09978479146957397, 0.28061017394065857, 0.28092217445373535, 0.42724764347076416, -0.14177890121936798, 0.3004530966281891, 0.17234152555465698, -0.09254380315...
https://github.com/huggingface/datasets/issues/6077
Hi @mariosasko ! I agree, it's an ugly hack, but it was convenient since the resulting `mean_std` could be cached by the library. For my large dataset (which doesn't fit in RAM), I'm actually using something similar to what you suggested. I got rid of the first mapping in the above scripts and replaced it with an it...
Mapping gets stuck at 99%
### Describe the bug Hi ! I'm currently working with a large (~150GB) unnormalized dataset at work. The dataset is available on a read-only filesystem internally, and I use a [loading script](https://huggingface.co/docs/datasets/dataset_script) to retreive it. I want to normalize the features of the dataset, ...
67
Mapping gets stuck at 99% ### Describe the bug Hi ! I'm currently working with a large (~150GB) unnormalized dataset at work. The dataset is available on a read-only filesystem internally, and I use a [loading script](https://huggingface.co/docs/datasets/dataset_script) to retreive it. I want to normalize t...
[ -0.23888099193572998, -0.4203942120075226, 0.11454978585243225, 0.01367790624499321, 0.38200873136520386, -0.02695149928331375, -0.09978479146957397, 0.28061017394065857, 0.28092217445373535, 0.42724764347076416, -0.14177890121936798, 0.3004530966281891, 0.17234152555465698, -0.09254380315...
https://github.com/huggingface/datasets/issues/6077
Have you tried to reduce `batch_size`/`writer_batch_size` in the 2nd `.map`? Also, can you interrupt the process when it gets stuck and share the error stack trace?
Mapping gets stuck at 99%
### Describe the bug Hi ! I'm currently working with a large (~150GB) unnormalized dataset at work. The dataset is available on a read-only filesystem internally, and I use a [loading script](https://huggingface.co/docs/datasets/dataset_script) to retreive it. I want to normalize the features of the dataset, ...
26
Mapping gets stuck at 99% ### Describe the bug Hi ! I'm currently working with a large (~150GB) unnormalized dataset at work. The dataset is available on a read-only filesystem internally, and I use a [loading script](https://huggingface.co/docs/datasets/dataset_script) to retreive it. I want to normalize t...
[ -0.23888099193572998, -0.4203942120075226, 0.11454978585243225, 0.01367790624499321, 0.38200873136520386, -0.02695149928331375, -0.09978479146957397, 0.28061017394065857, 0.28092217445373535, 0.42724764347076416, -0.14177890121936798, 0.3004530966281891, 0.17234152555465698, -0.09254380315...
https://github.com/huggingface/datasets/issues/6077
I think `batch_size/writer_batch_size` is already at its lowest in the 2nd `.map` since `batched=False` implies `batch_size=1` and `len(ds) = 1000 = writer_batch_size`. Here is also a bunch of stack traces when I interrupted the process: <details> <summary>stack trace 1</summary> ```python (pyg)[d623204@ro...
Mapping gets stuck at 99%
### Describe the bug Hi ! I'm currently working with a large (~150GB) unnormalized dataset at work. The dataset is available on a read-only filesystem internally, and I use a [loading script](https://huggingface.co/docs/datasets/dataset_script) to retreive it. I want to normalize the features of the dataset, ...
1,454
Mapping gets stuck at 99% ### Describe the bug Hi ! I'm currently working with a large (~150GB) unnormalized dataset at work. The dataset is available on a read-only filesystem internally, and I use a [loading script](https://huggingface.co/docs/datasets/dataset_script) to retreive it. I want to normalize t...
[ -0.23888099193572998, -0.4203942120075226, 0.11454978585243225, 0.01367790624499321, 0.38200873136520386, -0.02695149928331375, -0.09978479146957397, 0.28061017394065857, 0.28092217445373535, 0.42724764347076416, -0.14177890121936798, 0.3004530966281891, 0.17234152555465698, -0.09254380315...
https://github.com/huggingface/datasets/issues/6075
This code behaves as expected on my local machine or in Colab. Which version of `soundfile` do you have installed? MP3 requires `soundfile>=0.12.1`.
Error loading music files using `load_dataset`
### Describe the bug I tried to load a music file using `datasets.load_dataset()` from the repository - https://huggingface.co/datasets/susnato/pop2piano_real_music_test I got the following error - ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/susnato/anaconda3/en...
23
Error loading music files using `load_dataset` ### Describe the bug I tried to load a music file using `datasets.load_dataset()` from the repository - https://huggingface.co/datasets/susnato/pop2piano_real_music_test I got the following error - ``` Traceback (most recent call last): File "<stdin>", line 1...
[ -0.23908644914627075, 0.018336132168769836, -0.09103650599718094, 0.4606196880340576, 0.40761128067970276, -0.08961315453052521, 0.20931857824325562, 0.24716609716415405, -0.10778579115867615, 0.07141637057065964, -0.30748721957206726, 0.44494470953941345, -0.031737320125103, -0.1055335700...
https://github.com/huggingface/datasets/issues/6073
Version 2.3.2 is over one year old, so please use the latest release (2.14.0) to get the expected behavior. Version 2.3.2 does not contain some fixes we made to fix resolving hidden files/directories (starting with a dot).
version2.3.2 load_dataset()data_files can't include .xxxx in path
### Describe the bug First, I cd workdir. Then, I just use load_dataset("json", data_file={"train":"/a/b/c/.d/train/train.json", "test":"/a/b/c/.d/train/test.json"}) that couldn't work and <FileNotFoundError: Unable to find '/a/b/c/.d/train/train.jsonl' at /a/b/c/.d/> And I debug, it is fine in version2.1.2...
37
version2.3.2 load_dataset()data_files can't include .xxxx in path ### Describe the bug First, I cd workdir. Then, I just use load_dataset("json", data_file={"train":"/a/b/c/.d/train/train.json", "test":"/a/b/c/.d/train/test.json"}) that couldn't work and <FileNotFoundError: Unable to find '/a/b/c/.d/train/tr...
[ -0.0716601088643074, 0.4233098328113556, -0.057822637259960175, 0.46117934584617615, 0.17863152921199799, 0.13693568110466003, 0.22761712968349457, 0.3537435233592987, 0.06425778567790985, -0.1593811959028244, 0.18695884943008423, 0.5130402445793152, -0.099225252866745, 0.10764174908399582...
https://github.com/huggingface/datasets/issues/6071
Hi ! Thanks for reporting, I opened a PR to fix this What filesystem are you using ?
storage_options provided to load_dataset not fully piping through since datasets 2.14.0
### Describe the bug Since the latest release of `datasets` (`2.14.0`), custom filesystem `storage_options` passed to `load_dataset()` do not seem to propagate through all the way - leading to problems if loading data files that need those options to be set. I think this is because of the new `_prepare_path_and_sto...
18
storage_options provided to load_dataset not fully piping through since datasets 2.14.0 ### Describe the bug Since the latest release of `datasets` (`2.14.0`), custom filesystem `storage_options` passed to `load_dataset()` do not seem to propagate through all the way - leading to problems if loading data files that ...
[ -0.1529044508934021, -0.011342138051986694, -0.003598034381866455, 0.16890102624893188, 0.15709836781024933, -0.12320005893707275, 0.09978201240301132, 0.070525623857975, -0.21031856536865234, -0.010081648826599121, -0.05347316339612007, 0.3284134566783905, -0.016893036663532257, 0.2652384...
https://github.com/huggingface/datasets/issues/6071
Hi @lhoestq ! Thank you so much 🙌 It's a bit of a custom setup, but in practice I am using a [pyarrow.fs.S3FileSystem](https://arrow.apache.org/docs/python/generated/pyarrow.fs.S3FileSystem.html) (wrapped in a `fsspec.implementations.arrow.ArrowFSWrapper` [to make it](https://arrow.apache.org/docs/python/filesyste...
storage_options provided to load_dataset not fully piping through since datasets 2.14.0
### Describe the bug Since the latest release of `datasets` (`2.14.0`), custom filesystem `storage_options` passed to `load_dataset()` do not seem to propagate through all the way - leading to problems if loading data files that need those options to be set. I think this is because of the new `_prepare_path_and_sto...
86
storage_options provided to load_dataset not fully piping through since datasets 2.14.0 ### Describe the bug Since the latest release of `datasets` (`2.14.0`), custom filesystem `storage_options` passed to `load_dataset()` do not seem to propagate through all the way - leading to problems if loading data files that ...
[ -0.1529044508934021, -0.011342138051986694, -0.003598034381866455, 0.16890102624893188, 0.15709836781024933, -0.12320005893707275, 0.09978201240301132, 0.070525623857975, -0.21031856536865234, -0.010081648826599121, -0.05347316339612007, 0.3284134566783905, -0.016893036663532257, 0.2652384...
https://github.com/huggingface/datasets/issues/6069
You can list the dataset's columns with `ds.column_names` before `.map` to check whether the dataset has an `image` column. If it doesn't, then this is a bug. Otherwise, please paste the line with the `.map` call.
KeyError: dataset has no key "image"
### Describe the bug I've loaded a local image dataset with: `ds = laod_dataset("imagefolder", data_dir=path-to-data)` And defined a transform to process the data, following the Datasets docs. However, I get a keyError error, indicating there's no "image" key in my dataset. When I printed out the example_batch ...
36
KeyError: dataset has no key "image" ### Describe the bug I've loaded a local image dataset with: `ds = laod_dataset("imagefolder", data_dir=path-to-data)` And defined a transform to process the data, following the Datasets docs. However, I get a keyError error, indicating there's no "image" key in my dataset...
[ -0.3240119218826294, -0.15878307819366455, -0.011707816272974014, 0.1274954080581665, 0.21714580059051514, 0.11436038464307785, 0.432375967502594, 0.18996256589889526, 0.2058950513601303, 0.12764695286750793, 0.33117371797561646, 0.3584793508052826, -0.33052605390548706, 0.0216779559850692...
https://github.com/huggingface/datasets/issues/6069
This is the piece of code I am running: ``` data_transforms = utils.get_data_augmentation(args) image_dataset = utils.load_image_dataset(args.dataset) def resize(examples): examples["pixel_values"] = [image.convert("RGB").resize((300, 300)) for image in examples["image"]] return examples def preproce...
KeyError: dataset has no key "image"
### Describe the bug I've loaded a local image dataset with: `ds = laod_dataset("imagefolder", data_dir=path-to-data)` And defined a transform to process the data, following the Datasets docs. However, I get a keyError error, indicating there's no "image" key in my dataset. When I printed out the example_batch ...
1,035
KeyError: dataset has no key "image" ### Describe the bug I've loaded a local image dataset with: `ds = laod_dataset("imagefolder", data_dir=path-to-data)` And defined a transform to process the data, following the Datasets docs. However, I get a keyError error, indicating there's no "image" key in my dataset...
[ -0.22105160355567932, -0.056508734822273254, -0.06058565527200699, 0.10834148526191711, 0.2632569968700409, 0.15307189524173737, 0.472417950630188, 0.21166539192199707, 0.12338018417358398, 0.16673409938812256, 0.29630032181739807, 0.3156073987483978, -0.3349745273590088, 0.090061090886592...
https://github.com/huggingface/datasets/issues/6069
The `remove_columns=["image"]` argument in the `.map` call removes the `image` column from the output, so drop this argument to preserve it.
KeyError: dataset has no key "image"
### Describe the bug I've loaded a local image dataset with: `ds = laod_dataset("imagefolder", data_dir=path-to-data)` And defined a transform to process the data, following the Datasets docs. However, I get a keyError error, indicating there's no "image" key in my dataset. When I printed out the example_batch ...
21
KeyError: dataset has no key "image" ### Describe the bug I've loaded a local image dataset with: `ds = laod_dataset("imagefolder", data_dir=path-to-data)` And defined a transform to process the data, following the Datasets docs. However, I get a keyError error, indicating there's no "image" key in my dataset...
[ -0.31539613008499146, -0.10617195814847946, -0.01786615699529648, 0.12197798490524292, 0.21011821925640106, 0.11844329535961151, 0.4634912610054016, 0.20816512405872345, 0.21189382672309875, 0.12302294373512268, 0.30953657627105713, 0.37598663568496704, -0.3384241461753845, 0.0183960646390...
https://github.com/huggingface/datasets/issues/6069
The problem is not with the removal of the image key. The bug is why only the labels are sent to be process, instead of all the featues or dictionary keys. P.S. I just dropped the removal argument as you've suggested, but that didn't solve the problem, because only the labels are being sent to be processed
KeyError: dataset has no key "image"
### Describe the bug I've loaded a local image dataset with: `ds = laod_dataset("imagefolder", data_dir=path-to-data)` And defined a transform to process the data, following the Datasets docs. However, I get a keyError error, indicating there's no "image" key in my dataset. When I printed out the example_batch ...
57
KeyError: dataset has no key "image" ### Describe the bug I've loaded a local image dataset with: `ds = laod_dataset("imagefolder", data_dir=path-to-data)` And defined a transform to process the data, following the Datasets docs. However, I get a keyError error, indicating there's no "image" key in my dataset...
[ -0.1723867654800415, -0.16476085782051086, -0.010105539113283157, 0.16590513288974762, 0.178179532289505, 0.11070188879966736, 0.40471309423446655, 0.22504006326198578, 0.1649189293384552, 0.19509558379650116, 0.314413845539093, 0.38263121247291565, -0.33293986320495605, 0.0664065629243850...
https://github.com/huggingface/datasets/issues/6069
All the `image_dataset.column_names` after the `map` call should also be present in `preprocess_train `/`preprocess_val` unless (input) `columns` in `set_transform` are specified. If that's not the case, we need a full reproducer (not snippets) with the environment info.
KeyError: dataset has no key "image"
### Describe the bug I've loaded a local image dataset with: `ds = laod_dataset("imagefolder", data_dir=path-to-data)` And defined a transform to process the data, following the Datasets docs. However, I get a keyError error, indicating there's no "image" key in my dataset. When I printed out the example_batch ...
37
KeyError: dataset has no key "image" ### Describe the bug I've loaded a local image dataset with: `ds = laod_dataset("imagefolder", data_dir=path-to-data)` And defined a transform to process the data, following the Datasets docs. However, I get a keyError error, indicating there's no "image" key in my dataset...
[ -0.3361893892288208, -0.09481370449066162, -0.013615399599075317, 0.11722663044929504, 0.2425265610218048, 0.10842374712228775, 0.46977174282073975, 0.20008452236652374, 0.19682937860488892, 0.1282196193933487, 0.32837414741516113, 0.384207546710968, -0.3407841920852661, 0.0330336391925811...
https://github.com/huggingface/datasets/issues/6069
I have resolved the error after including a collate function as indicated in the Quick Start session of the Datasets docs.: Here is what I did: ``` data_transforms = utils.get_data_augmentation(args) image_dataset = utils.load_image_dataset(args.dataset) def preprocess_train(example_batch): example_batch[...
KeyError: dataset has no key "image"
### Describe the bug I've loaded a local image dataset with: `ds = laod_dataset("imagefolder", data_dir=path-to-data)` And defined a transform to process the data, following the Datasets docs. However, I get a keyError error, indicating there's no "image" key in my dataset. When I printed out the example_batch ...
139
KeyError: dataset has no key "image" ### Describe the bug I've loaded a local image dataset with: `ds = laod_dataset("imagefolder", data_dir=path-to-data)` And defined a transform to process the data, following the Datasets docs. However, I get a keyError error, indicating there's no "image" key in my dataset...
[ -0.1899322271347046, -0.05999256670475006, -0.016740359365940094, 0.15395542979240417, 0.3059038519859314, 0.22089700400829315, 0.5759841203689575, 0.20979957282543182, -0.0695992112159729, 0.17101135849952698, 0.22148257493972778, 0.31010574102401733, -0.31011998653411865, 0.0187273025512...
https://github.com/huggingface/datasets/issues/6066
Hi ! I opened https://github.com/huggingface/datasets/pull/6067 to add the missing `_lock` We'll do a patch release soon, but feel free to install `datasets` from source in the meantime
AttributeError: '_tqdm_cls' object has no attribute '_lock'
### Describe the bug ```python File "/Users/codingl2k1/.pyenv/versions/3.11.4/lib/python3.11/site-packages/datasets/load.py", line 1034, in get_module data_files = DataFilesDict.from_patterns( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/codingl2k1/.pyenv/versions/3.11.4/lib/python3.11/site-p...
27
AttributeError: '_tqdm_cls' object has no attribute '_lock' ### Describe the bug ```python File "/Users/codingl2k1/.pyenv/versions/3.11.4/lib/python3.11/site-packages/datasets/load.py", line 1034, in get_module data_files = DataFilesDict.from_patterns( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "...
[ -0.17624372243881226, -0.28966182470321655, -0.08112587034702301, 0.21007463335990906, 0.2333376258611679, -0.10606662184000015, 0.34196195006370544, 0.3747367858886719, -0.07112034410238266, 0.04517202824354172, -0.0528116337954998, 0.36341848969459534, -0.1971302181482315, 0.045730821788...
https://github.com/huggingface/datasets/issues/6066
I have tested the latest main, it does not work. I add more logs to reproduce this issue, it looks like a multi threading bug: ```python @contextmanager def ensure_lock(tqdm_class, lock_name=""): """get (create if necessary) and then restore `tqdm_class`'s lock""" import os import threading ...
AttributeError: '_tqdm_cls' object has no attribute '_lock'
### Describe the bug ```python File "/Users/codingl2k1/.pyenv/versions/3.11.4/lib/python3.11/site-packages/datasets/load.py", line 1034, in get_module data_files = DataFilesDict.from_patterns( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/codingl2k1/.pyenv/versions/3.11.4/lib/python3.11/site-p...
184
AttributeError: '_tqdm_cls' object has no attribute '_lock' ### Describe the bug ```python File "/Users/codingl2k1/.pyenv/versions/3.11.4/lib/python3.11/site-packages/datasets/load.py", line 1034, in get_module data_files = DataFilesDict.from_patterns( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "...
[ -0.17624372243881226, -0.28966182470321655, -0.08112587034702301, 0.21007463335990906, 0.2333376258611679, -0.10606662184000015, 0.34196195006370544, 0.3747367858886719, -0.07112034410238266, 0.04517202824354172, -0.0528116337954998, 0.36341848969459534, -0.1971302181482315, 0.045730821788...
https://github.com/huggingface/datasets/issues/6066
Maybe it is a bug of tqdm? I think simply use `try ... except AttributeError ...` wraps `del tqdm_class._lock` should work.
AttributeError: '_tqdm_cls' object has no attribute '_lock'
### Describe the bug ```python File "/Users/codingl2k1/.pyenv/versions/3.11.4/lib/python3.11/site-packages/datasets/load.py", line 1034, in get_module data_files = DataFilesDict.from_patterns( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/codingl2k1/.pyenv/versions/3.11.4/lib/python3.11/site-p...
21
AttributeError: '_tqdm_cls' object has no attribute '_lock' ### Describe the bug ```python File "/Users/codingl2k1/.pyenv/versions/3.11.4/lib/python3.11/site-packages/datasets/load.py", line 1034, in get_module data_files = DataFilesDict.from_patterns( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "...
[ -0.17624372243881226, -0.28966182470321655, -0.08112587034702301, 0.21007463335990906, 0.2333376258611679, -0.10606662184000015, 0.34196195006370544, 0.3747367858886719, -0.07112034410238266, 0.04517202824354172, -0.0528116337954998, 0.36341848969459534, -0.1971302181482315, 0.045730821788...
https://github.com/huggingface/datasets/issues/6066
Yes it looks like a bug on their end indeed, do you want to open a PR on tqdm ? Let me see if I can find a workaround in the meantime
AttributeError: '_tqdm_cls' object has no attribute '_lock'
### Describe the bug ```python File "/Users/codingl2k1/.pyenv/versions/3.11.4/lib/python3.11/site-packages/datasets/load.py", line 1034, in get_module data_files = DataFilesDict.from_patterns( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/codingl2k1/.pyenv/versions/3.11.4/lib/python3.11/site-p...
32
AttributeError: '_tqdm_cls' object has no attribute '_lock' ### Describe the bug ```python File "/Users/codingl2k1/.pyenv/versions/3.11.4/lib/python3.11/site-packages/datasets/load.py", line 1034, in get_module data_files = DataFilesDict.from_patterns( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "...
[ -0.17624372243881226, -0.28966182470321655, -0.08112587034702301, 0.21007463335990906, 0.2333376258611679, -0.10606662184000015, 0.34196195006370544, 0.3747367858886719, -0.07112034410238266, 0.04517202824354172, -0.0528116337954998, 0.36341848969459534, -0.1971302181482315, 0.045730821788...
https://github.com/huggingface/datasets/issues/6060
Sorry for asking a duplicate question about `num_proc`, I searched the forum and find the solution. But I still can't make the trick with `torch.distributed.barrier()` to only map at the main process work. The [post on forum]( https://discuss.huggingface.co/t/slow-processing-with-map-when-using-deepspeed-or-fairscal...
Dataset.map() execute twice when in PyTorch DDP mode
### Describe the bug I use `torchrun --standalone --nproc_per_node=2 train.py` to start training. And write the code following the [docs](https://huggingface.co/docs/datasets/process#distributed-usage). The trick about using `torch.distributed.barrier()` to only execute map at the main process doesn't always work. W...
40
Dataset.map() execute twice when in PyTorch DDP mode ### Describe the bug I use `torchrun --standalone --nproc_per_node=2 train.py` to start training. And write the code following the [docs](https://huggingface.co/docs/datasets/process#distributed-usage). The trick about using `torch.distributed.barrier()` to only...
[ -0.32103100419044495, -0.7901483178138733, 0.07416713982820511, 0.4760359823703766, 0.19198887050151825, -0.20305119454860687, 0.333636999130249, -0.06287026405334473, 0.28612929582595825, 0.10324004292488098, 0.0988529622554779, 0.42667683959007263, 0.10860054194927216, -0.270735114812850...
https://github.com/huggingface/datasets/issues/6060
If it does the `map` twice then it means the hash of your map function is not some same between your two processes. Can you make sure your map functions have the same hash in different processes ? ```python from datasets.fingerprint import Hasher print(Hasher.hash(lambda x: cut_reorder_keys(x, num_stations_li...
Dataset.map() execute twice when in PyTorch DDP mode
### Describe the bug I use `torchrun --standalone --nproc_per_node=2 train.py` to start training. And write the code following the [docs](https://huggingface.co/docs/datasets/process#distributed-usage). The trick about using `torch.distributed.barrier()` to only execute map at the main process doesn't always work. W...
95
Dataset.map() execute twice when in PyTorch DDP mode ### Describe the bug I use `torchrun --standalone --nproc_per_node=2 train.py` to start training. And write the code following the [docs](https://huggingface.co/docs/datasets/process#distributed-usage). The trick about using `torch.distributed.barrier()` to only...
[ -0.32103100419044495, -0.7901483178138733, 0.07416713982820511, 0.4760359823703766, 0.19198887050151825, -0.20305119454860687, 0.333636999130249, -0.06287026405334473, 0.28612929582595825, 0.10324004292488098, 0.0988529622554779, 0.42667683959007263, 0.10860054194927216, -0.270735114812850...
https://github.com/huggingface/datasets/issues/6060
Thanks for help! I find the fingerprint between processes don't have same hash: ``` Rank 0: Gpu 0 cut_reorder_keys fingerprint c7f47f40e9a67657 Rank 0: Gpu 0 random_shift fingerprint 240a0ce79831e7d4 Rank 1: Gpu 1 cut_reorder_keys fingerprint 20edd3d9cf284001 Rank 1: Gpu 1 random_shift fingerprint 819f7c1c18e773...
Dataset.map() execute twice when in PyTorch DDP mode
### Describe the bug I use `torchrun --standalone --nproc_per_node=2 train.py` to start training. And write the code following the [docs](https://huggingface.co/docs/datasets/process#distributed-usage). The trick about using `torch.distributed.barrier()` to only execute map at the main process doesn't always work. W...
90
Dataset.map() execute twice when in PyTorch DDP mode ### Describe the bug I use `torchrun --standalone --nproc_per_node=2 train.py` to start training. And write the code following the [docs](https://huggingface.co/docs/datasets/process#distributed-usage). The trick about using `torch.distributed.barrier()` to only...
[ -0.32103100419044495, -0.7901483178138733, 0.07416713982820511, 0.4760359823703766, 0.19198887050151825, -0.20305119454860687, 0.333636999130249, -0.06287026405334473, 0.28612929582595825, 0.10324004292488098, 0.0988529622554779, 0.42667683959007263, 0.10860054194927216, -0.270735114812850...
https://github.com/huggingface/datasets/issues/6060
I finally figure it out. The fingerprint of the function will change if other key-value pairs change in `args` even the `args.num_stations_list` is not changed. ```python lambda x: cut_reorder_keys(x, num_stations_list=args.num_stations_list, is_pad=True, is_train=True) ``` My `args` contains the key `rank` whi...
Dataset.map() execute twice when in PyTorch DDP mode
### Describe the bug I use `torchrun --standalone --nproc_per_node=2 train.py` to start training. And write the code following the [docs](https://huggingface.co/docs/datasets/process#distributed-usage). The trick about using `torch.distributed.barrier()` to only execute map at the main process doesn't always work. W...
86
Dataset.map() execute twice when in PyTorch DDP mode ### Describe the bug I use `torchrun --standalone --nproc_per_node=2 train.py` to start training. And write the code following the [docs](https://huggingface.co/docs/datasets/process#distributed-usage). The trick about using `torch.distributed.barrier()` to only...
[ -0.32103100419044495, -0.7901483178138733, 0.07416713982820511, 0.4760359823703766, 0.19198887050151825, -0.20305119454860687, 0.333636999130249, -0.06287026405334473, 0.28612929582595825, 0.10324004292488098, 0.0988529622554779, 0.42667683959007263, 0.10860054194927216, -0.270735114812850...
https://github.com/huggingface/datasets/issues/6058
This can also mean one of the files was not downloaded correctly. We log an erroneous file's name before raising the reader's error, so this is how you can find the problematic file. Then, you should delete it and call `load_dataset` again. (I checked all the uploaded files, and they seem to be valid Parquet file...
laion-coco download error
### Describe the bug The full trace: ``` /home/bian/anaconda3/envs/sd/lib/python3.10/site-packages/datasets/load.py:1744: FutureWarning: 'ignore_verifications' was de precated in favor of 'verification_mode' in version 2.9.1 and will be removed in 3.0.0. You can remove this warning by passing 'verification_mode=no...
67
laion-coco download error ### Describe the bug The full trace: ``` /home/bian/anaconda3/envs/sd/lib/python3.10/site-packages/datasets/load.py:1744: FutureWarning: 'ignore_verifications' was de precated in favor of 'verification_mode' in version 2.9.1 and will be removed in 3.0.0. You can remove this warning by p...
[ -0.15487776696681976, -0.20536863803863525, 0.004702802747488022, 0.28530481457710266, 0.23897713422775269, -0.14961321651935577, -0.010635366663336754, 0.2726270854473114, -0.08417070657014847, -0.0020769834518432617, -0.060449421405792236, 0.6115534901618958, -0.060624439269304276, 0.309...
https://github.com/huggingface/datasets/issues/6057
Hi! It's hard to explain this behavior without more information. Can you profile the slower version with the following code ```python import cProfile, pstats from datasets import load_dataset with cProfile.Profile() as profiler: ds = load_dataset(...) stats = pstats.Stats(profiler).sort_stats("cumtime"...
Why is the speed difference of gen example so big?
```python def _generate_examples(self, metadata_path, images_dir, conditioning_images_dir): with open(metadata_path, 'r') as file: metadata = json.load(file) for idx, item in enumerate(metadata): image_path = item.get('image_path') text_content = item.get('tex...
44
Why is the speed difference of gen example so big? ```python def _generate_examples(self, metadata_path, images_dir, conditioning_images_dir): with open(metadata_path, 'r') as file: metadata = json.load(file) for idx, item in enumerate(metadata): image_path = item.get('i...
[ -0.20529882609844208, -0.3432773947715759, -0.09249883890151978, 0.2385820597410202, 0.2068561315536499, 0.049263812601566315, 0.26420408487319946, 0.32078856229782104, -0.2661501467227936, 0.2926473617553711, 0.5328456163406372, 0.21491041779518127, -0.043615199625492096, 0.10802309215068...
https://github.com/huggingface/datasets/issues/6051
Hi! `_select_contiguous` fetches a (zero-copy) slice of the dataset's Arrow table to build a shard, so I don't think this part is the problem. To me, the issue seems to be the step where we embed external image files' bytes (a lot of file reads). You can use `.map` with multiprocessing to perform this step before `push...
Skipping shard in the remote repo and resume upload
### Describe the bug For some reason when I try to resume the upload of my dataset, it is very slow to reach the index of the shard from which to resume the uploading. From my understanding, the problem is in this part of the code: arrow_dataset.py ```python for index, shard in logging.tqdm( enume...
111
Skipping shard in the remote repo and resume upload ### Describe the bug For some reason when I try to resume the upload of my dataset, it is very slow to reach the index of the shard from which to resume the uploading. From my understanding, the problem is in this part of the code: arrow_dataset.py ```python...
[ -0.37916725873947144, 0.050338298082351685, 0.09748844802379608, -0.04825657233595848, 0.0023998524993658066, -0.2192309945821762, 0.3753833770751953, 0.14875097572803497, -0.31085875630378723, 0.21819648146629333, 0.3058130443096161, 0.35616397857666016, 0.168587327003479, -0.149909019470...
https://github.com/huggingface/datasets/issues/6051
Hi, thanks, this solution saves some time. But can't we avoid embedding all external image files bytes with each push, skipping the images that have already been pushed into the repo? Edit: Ok I missed the part of cache it manually on the disk the first time, this solves the problem. Thank you
Skipping shard in the remote repo and resume upload
### Describe the bug For some reason when I try to resume the upload of my dataset, it is very slow to reach the index of the shard from which to resume the uploading. From my understanding, the problem is in this part of the code: arrow_dataset.py ```python for index, shard in logging.tqdm( enume...
53
Skipping shard in the remote repo and resume upload ### Describe the bug For some reason when I try to resume the upload of my dataset, it is very slow to reach the index of the shard from which to resume the uploading. From my understanding, the problem is in this part of the code: arrow_dataset.py ```python...
[ -0.3249988257884979, -0.07473849505186081, 0.0636654794216156, 0.043887339532375336, 0.06393709778785706, -0.15074089169502258, 0.41193485260009766, 0.19467419385910034, -0.2961759567260742, 0.24161314964294434, 0.26046231389045715, 0.25967612862586975, 0.14979708194732666, -0.140339121222...
https://github.com/huggingface/datasets/issues/6048
The `audiofolder` loader is not available in version `2.3.2`, hence the error. Please run the `pip install -U datasets` command to update the `datasets` installation to make `load_dataset("audiofolder", ...)` work.
when i use datasets.load_dataset, i encounter the http connect error!
### Describe the bug `common_voice_test = load_dataset("audiofolder", data_dir="./dataset/",cache_dir="./cache",split=datasets.Split.TEST)` when i run the code above, i got the error as below: -------------------------------------------- ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/...
30
when i use datasets.load_dataset, i encounter the http connect error! ### Describe the bug `common_voice_test = load_dataset("audiofolder", data_dir="./dataset/",cache_dir="./cache",split=datasets.Split.TEST)` when i run the code above, i got the error as below: -------------------------------------------- Connec...
[ -0.47941577434539795, 0.1300177127122879, 0.04848112910985947, 0.24561111629009247, 0.19157904386520386, 0.01985028386116028, 0.06988286972045898, 0.007370714098215103, -0.1016228049993515, 0.028838418424129486, -0.2577299177646637, 0.01850464567542076, 0.1683361828327179, -0.1597466170787...
https://github.com/huggingface/datasets/issues/6046
You can reply "#self-assign" to this issue to automatically get assigned to it :) Let me know if you have any questions or if I can help
Support proxy and user-agent in fsspec calls
Since we switched to the new HfFileSystem we no longer apply user's proxy and user-agent. Using the HTTP_PROXY and HTTPS_PROXY environment variables works though since we use aiohttp to call the HF Hub. This can be implemented in `_prepare_single_hop_path_and_storage_options`. Though ideally the `HfFileSystem`...
27
Support proxy and user-agent in fsspec calls Since we switched to the new HfFileSystem we no longer apply user's proxy and user-agent. Using the HTTP_PROXY and HTTPS_PROXY environment variables works though since we use aiohttp to call the HF Hub. This can be implemented in `_prepare_single_hop_path_and_storage...
[ -0.2932550609111786, -0.21538400650024414, -0.03676239401102066, -0.3464750051498413, 0.17299112677574158, -0.43857520818710327, 0.18761730194091797, -0.01703154668211937, 0.47794869542121887, 0.343362033367157, -0.4074530005455017, 0.04429791495203972, 0.2771555781364441, 0.41758576035499...
https://github.com/huggingface/datasets/issues/6046
Actually i am quite new to figure it out how everything goes and done > You can reply "#self-assign" to this issue to automatically get assigned to it :) > Let me know if you have any questions or if I can help when i wrote #self-assign it automatically got converted to some number is it correct or i have done ...
Support proxy and user-agent in fsspec calls
Since we switched to the new HfFileSystem we no longer apply user's proxy and user-agent. Using the HTTP_PROXY and HTTPS_PROXY environment variables works though since we use aiohttp to call the HF Hub. This can be implemented in `_prepare_single_hop_path_and_storage_options`. Though ideally the `HfFileSystem`...
80
Support proxy and user-agent in fsspec calls Since we switched to the new HfFileSystem we no longer apply user's proxy and user-agent. Using the HTTP_PROXY and HTTPS_PROXY environment variables works though since we use aiohttp to call the HF Hub. This can be implemented in `_prepare_single_hop_path_and_storage...
[ -0.18757732212543488, -0.25471335649490356, -0.026860706508159637, -0.33133217692375183, 0.18308435380458832, -0.46210718154907227, 0.10263780504465103, -0.0518229678273201, 0.47567886114120483, 0.31738150119781494, -0.39469096064567566, 0.12045934796333313, 0.2528075873851776, 0.486655354...
https://github.com/huggingface/datasets/issues/6046
Ah yea github tries to replace the #self-assign with an issue link. I guess you can try to copy-paste instead to see if it works Anyway let me assign you manually
Support proxy and user-agent in fsspec calls
Since we switched to the new HfFileSystem we no longer apply user's proxy and user-agent. Using the HTTP_PROXY and HTTPS_PROXY environment variables works though since we use aiohttp to call the HF Hub. This can be implemented in `_prepare_single_hop_path_and_storage_options`. Though ideally the `HfFileSystem`...
31
Support proxy and user-agent in fsspec calls Since we switched to the new HfFileSystem we no longer apply user's proxy and user-agent. Using the HTTP_PROXY and HTTPS_PROXY environment variables works though since we use aiohttp to call the HF Hub. This can be implemented in `_prepare_single_hop_path_and_storage...
[ -0.21246172487735748, -0.12840954959392548, -0.012975260615348816, -0.4304368495941162, 0.32901328802108765, -0.3642611503601074, 0.2749650478363037, -0.04147215932607651, 0.4883716106414795, 0.3668379783630371, -0.45113515853881836, 0.20567217469215393, 0.22914642095565796, 0.426966786384...
https://github.com/huggingface/datasets/issues/6046
thanks a lot @lhoestq ! though i have a very lil idea of the issue, i am new. as i said before, but gonna try my best shot to do it. can you please suggest some tips or anything from your side, how basically we approach it will be really helpfull. Will try my best!
Support proxy and user-agent in fsspec calls
Since we switched to the new HfFileSystem we no longer apply user's proxy and user-agent. Using the HTTP_PROXY and HTTPS_PROXY environment variables works though since we use aiohttp to call the HF Hub. This can be implemented in `_prepare_single_hop_path_and_storage_options`. Though ideally the `HfFileSystem`...
55
Support proxy and user-agent in fsspec calls Since we switched to the new HfFileSystem we no longer apply user's proxy and user-agent. Using the HTTP_PROXY and HTTPS_PROXY environment variables works though since we use aiohttp to call the HF Hub. This can be implemented in `_prepare_single_hop_path_and_storage...
[ -0.1989521086215973, -0.22095397114753723, -0.009241923689842224, -0.2762700617313385, 0.25704318284988403, -0.4781002998352051, 0.06524592638015747, 0.011893544346094131, 0.4420257806777954, 0.2897850573062897, -0.4086255133152008, 0.09876810014247894, 0.2533799707889557, 0.43592154979705...
https://github.com/huggingface/datasets/issues/6046
The HfFileSystem from the `huggingface_hub` package can already read the HTTP_PROXY and HTTPS_PROXY environment variables. So the remaining thing missing is the `user_agent` that the user may include in a `DownloadConfig` object. The user agent can be used for regular http calls but also calls to the HfFileSystem. -...
Support proxy and user-agent in fsspec calls
Since we switched to the new HfFileSystem we no longer apply user's proxy and user-agent. Using the HTTP_PROXY and HTTPS_PROXY environment variables works though since we use aiohttp to call the HF Hub. This can be implemented in `_prepare_single_hop_path_and_storage_options`. Though ideally the `HfFileSystem`...
86
Support proxy and user-agent in fsspec calls Since we switched to the new HfFileSystem we no longer apply user's proxy and user-agent. Using the HTTP_PROXY and HTTPS_PROXY environment variables works though since we use aiohttp to call the HF Hub. This can be implemented in `_prepare_single_hop_path_and_storage...
[ -0.15255115926265717, -0.35849153995513916, -0.01634177193045616, -0.18941760063171387, 0.29788413643836975, -0.33972498774528503, 0.009545538574457169, -0.01874988153576851, 0.4224053919315338, 0.19645893573760986, -0.579752504825592, 0.03939490765333176, 0.04456962272524834, 0.5652250051...
https://github.com/huggingface/datasets/issues/6043
Hello @exs-avianello, I have reproduced the bug successfully and have understood the problem. But I am confused regarding this part of the statement, "`pandas.DataFrame.to_csv` is always called with a buf-like `path_or_buf`". Can you please elaborate on it? Thanks!
Compression kwargs have no effect when saving datasets as csv
### Describe the bug Attempting to save a dataset as a compressed csv file, the compression kwargs provided to `.to_csv()` that get piped to panda's `pandas.DataFrame.to_csv` do not have any effect - resulting in the dataset not getting compressed. A warning is raised if explicitly providing a `compression` kwarg, ...
38
Compression kwargs have no effect when saving datasets as csv ### Describe the bug Attempting to save a dataset as a compressed csv file, the compression kwargs provided to `.to_csv()` that get piped to panda's `pandas.DataFrame.to_csv` do not have any effect - resulting in the dataset not getting compressed. A w...
[ -0.13724341988563538, 0.02748793363571167, -0.0180482380092144, -0.14137500524520874, 0.33309558033943176, 0.2379491776227951, 0.31833237409591675, 0.3750106394290924, -0.13855519890785217, 0.20809561014175415, 0.17708688974380493, 0.2951294481754303, -0.058476340025663376, -0.053729876875...
https://github.com/huggingface/datasets/issues/6043
Hi @aryanxk02 ! Sure, what I actually meant is that when passing a path-like `path_or_buf` here https://github.com/huggingface/datasets/blob/14f6edd9222e577dccb962ed5338b79b73502fa5/src/datasets/arrow_dataset.py#L4708-L4714 it gets converted to a file object behind the scenes here https://github.com/huggingfa...
Compression kwargs have no effect when saving datasets as csv
### Describe the bug Attempting to save a dataset as a compressed csv file, the compression kwargs provided to `.to_csv()` that get piped to panda's `pandas.DataFrame.to_csv` do not have any effect - resulting in the dataset not getting compressed. A warning is raised if explicitly providing a `compression` kwarg, ...
52
Compression kwargs have no effect when saving datasets as csv ### Describe the bug Attempting to save a dataset as a compressed csv file, the compression kwargs provided to `.to_csv()` that get piped to panda's `pandas.DataFrame.to_csv` do not have any effect - resulting in the dataset not getting compressed. A w...
[ -0.13724341988563538, 0.02748793363571167, -0.0180482380092144, -0.14137500524520874, 0.33309558033943176, 0.2379491776227951, 0.31833237409591675, 0.3750106394290924, -0.13855519890785217, 0.20809561014175415, 0.17708688974380493, 0.2951294481754303, -0.058476340025663376, -0.053729876875...
https://github.com/huggingface/datasets/issues/6043
@exs-avianello When `path_or_buf` is set to None, the `to_csv()` method will return the CSV data as a string instead of saving it to a file. Hence the compression doesn't take place. I think setting `path_or_buf=self.path_or_buf` should work. What you say?
Compression kwargs have no effect when saving datasets as csv
### Describe the bug Attempting to save a dataset as a compressed csv file, the compression kwargs provided to `.to_csv()` that get piped to panda's `pandas.DataFrame.to_csv` do not have any effect - resulting in the dataset not getting compressed. A warning is raised if explicitly providing a `compression` kwarg, ...
40
Compression kwargs have no effect when saving datasets as csv ### Describe the bug Attempting to save a dataset as a compressed csv file, the compression kwargs provided to `.to_csv()` that get piped to panda's `pandas.DataFrame.to_csv` do not have any effect - resulting in the dataset not getting compressed. A w...
[ -0.13724341988563538, 0.02748793363571167, -0.0180482380092144, -0.14137500524520874, 0.33309558033943176, 0.2379491776227951, 0.31833237409591675, 0.3750106394290924, -0.13855519890785217, 0.20809561014175415, 0.17708688974380493, 0.2951294481754303, -0.058476340025663376, -0.053729876875...
https://github.com/huggingface/datasets/issues/6038
Instead of writing the loading script, you can use the built-in loader to [load JSON files](https://huggingface.co/docs/datasets/loading#json): ```python from datasets import load_dataset ds = load_dataset("json", data_files={"train": os.path.join(data_dir["train"]), "dev": os.path.join(data_dir["dev"])}) ```
File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py", line 992, in _download_and_prepare if str(split_generator.split_info.name).lower() == "all": AttributeError: 'str' object has no attribute 'split_info'. Did you mean: 'splitlines'?
Hi, I use the code below to load local file ``` def _split_generators(self, dl_manager): # TODO: This method is tasked with downloading/extracting the data and defining the splits depending on the configuration # If several configurations are possible (listed in BUILDER_CONFIGS), the configurati...
29
File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py", line 992, in _download_and_prepare if str(split_generator.split_info.name).lower() == "all": AttributeError: 'str' object has no attribute 'split_info'. Did you mean: 'splitlines'? Hi, I use the code below to load loca...
[ -0.4313151240348816, 0.14907023310661316, -0.037516966462135315, 0.40986818075180054, 0.3280503451824188, -0.0586542971432209, 0.4319402575492859, 0.40545201301574707, 0.09521973878145218, 0.3033096492290497, 0.20488500595092773, 0.1470300257205963, -0.10485415160655975, 0.1725998222827911...
https://github.com/huggingface/datasets/issues/6037
These docs are outdated (version 1.2.1 is over two years old). Please refer to [this](https://huggingface.co/docs/datasets/dataset_script) version instead. Initially, we hosted datasets in this repo, but now you can find them [on the HF Hub](https://huggingface.co/datasets) (e.g. the [`ag_news`](https://huggingface....
Documentation links to examples are broken
### Describe the bug The links at the bottom of [add_dataset](https://huggingface.co/docs/datasets/v1.2.1/add_dataset.html) to examples of specific datasets are all broken, for example - text classification: [ag_news](https://github.com/huggingface/datasets/blob/master/datasets/ag_news/ag_news.py) (original data ...
38
Documentation links to examples are broken ### Describe the bug The links at the bottom of [add_dataset](https://huggingface.co/docs/datasets/v1.2.1/add_dataset.html) to examples of specific datasets are all broken, for example - text classification: [ag_news](https://github.com/huggingface/datasets/blob/master...
[ 0.02381463348865509, -0.0986577719449997, 0.03794017806649208, 0.19491194188594818, 0.12027567625045776, 0.12439810484647751, 0.19488364458084106, 0.2199345976114273, 0.011479705572128296, 0.0528639554977417, -0.05578690394759178, 0.08662953972816467, -0.07946702837944031, 0.18708573281764...
https://github.com/huggingface/datasets/issues/6034
Even if a dataset is cached, we still make requests to check whether the cache is up-to-date. [This](https://huggingface.co/docs/datasets/v2.13.1/en/loading#offline) section in the docs explains how to avoid them and directly load the cached version.
load_dataset hangs on WSL
### Describe the bug load_dataset simply hangs. It happens once every ~5 times, and interestingly hangs for a multiple of 5 minutes (hangs for 5/10/15 minutes). Using the profiler in PyCharm shows that it spends the time at <method 'connect' of '_socket.socket' objects>. However, a local cache is available so I am not...
33
load_dataset hangs on WSL ### Describe the bug load_dataset simply hangs. It happens once every ~5 times, and interestingly hangs for a multiple of 5 minutes (hangs for 5/10/15 minutes). Using the profiler in PyCharm shows that it spends the time at <method 'connect' of '_socket.socket' objects>. However, a local ca...
[ -0.342157244682312, -0.17921330034732819, 0.04200541973114014, 0.13595989346504211, 0.22275732457637787, 0.20644865930080414, 0.5331807136535645, -0.05518855154514313, 0.7224944233894348, 0.03790527209639549, 0.12820672988891602, 0.10376733541488647, 0.30889615416526794, 0.1409708559513092...
https://github.com/huggingface/datasets/issues/6034
Thanks - that works! However it doesn't resolve the original issue (but I am not sure if it is a WSL problem)
load_dataset hangs on WSL
### Describe the bug load_dataset simply hangs. It happens once every ~5 times, and interestingly hangs for a multiple of 5 minutes (hangs for 5/10/15 minutes). Using the profiler in PyCharm shows that it spends the time at <method 'connect' of '_socket.socket' objects>. However, a local cache is available so I am not...
22
load_dataset hangs on WSL ### Describe the bug load_dataset simply hangs. It happens once every ~5 times, and interestingly hangs for a multiple of 5 minutes (hangs for 5/10/15 minutes). Using the profiler in PyCharm shows that it spends the time at <method 'connect' of '_socket.socket' objects>. However, a local ca...
[ -0.307853102684021, -0.13641469180583954, 0.03494182229042053, 0.10264703631401062, 0.2216137796640396, 0.19913902878761292, 0.540233314037323, -0.03955627977848053, 0.7148920297622681, -0.0008790940046310425, 0.1685943901538849, 0.16317255795001984, 0.29545485973358154, 0.0640801042318344...
https://github.com/huggingface/datasets/issues/6034
We use `requests` to make HTTP requests (and `aiohttp` in the streaming mode), so I don't think we can provide much help regarding the socket issue (it probably has something to do with WSL).
load_dataset hangs on WSL
### Describe the bug load_dataset simply hangs. It happens once every ~5 times, and interestingly hangs for a multiple of 5 minutes (hangs for 5/10/15 minutes). Using the profiler in PyCharm shows that it spends the time at <method 'connect' of '_socket.socket' objects>. However, a local cache is available so I am not...
34
load_dataset hangs on WSL ### Describe the bug load_dataset simply hangs. It happens once every ~5 times, and interestingly hangs for a multiple of 5 minutes (hangs for 5/10/15 minutes). Using the profiler in PyCharm shows that it spends the time at <method 'connect' of '_socket.socket' objects>. However, a local ca...
[ -0.3236703872680664, -0.14067848026752472, 0.03590355068445206, 0.10654625296592712, 0.2100633829832077, 0.18540340662002563, 0.5049698352813721, -0.015269273892045021, 0.680539608001709, 0.01739092916250229, 0.11338993906974792, 0.1414891928434372, 0.34116098284721375, 0.03577309101819992...
https://github.com/huggingface/datasets/issues/6032
`HfApi` comes from the `huggingface_hub` package. You can use [this](https://huggingface.co/docs/huggingface_hub/v0.16.3/en/package_reference/utilities#huggingface_hub.configure_http_backend) utility to change the `huggingface_hub`'s `Session` proxies (see the example). We plan to implement https://github.com/huggin...
DownloadConfig.proxies not work when load_dataset_builder calling HfApi.dataset_info
### Describe the bug ```python download_config = DownloadConfig(proxies={'https': '<my proxy>'}) builder = load_dataset_builder(..., download_config=download_config) ``` But, when getting the dataset_info from HfApi, the http requests not using the proxies. ### Steps to reproduce the bug 1. Setup proxies i...
32
DownloadConfig.proxies not work when load_dataset_builder calling HfApi.dataset_info ### Describe the bug ```python download_config = DownloadConfig(proxies={'https': '<my proxy>'}) builder = load_dataset_builder(..., download_config=download_config) ``` But, when getting the dataset_info from HfApi, the htt...
[ -0.21935899555683136, -0.31487172842025757, 0.06531688570976257, 0.3223292827606201, 0.29418638348579407, -0.199843630194664, 0.2187996506690979, -0.05764598771929741, -0.08462776243686676, -0.013216584920883179, -0.3229537308216095, -0.06118042767047882, 0.42318788170814514, 0.36726835370...
https://github.com/huggingface/datasets/issues/6032
@mariosasko are you saying if I do the following: ``` def backend_factory() -> requests.Session: session = requests.Session() session.proxies = { "https": "127.0.0.1:8887", "http": "127.0.0.1:8887", } session.verify = "/etc/ssl/certs/ca-certificates.crt" return session ...
DownloadConfig.proxies not work when load_dataset_builder calling HfApi.dataset_info
### Describe the bug ```python download_config = DownloadConfig(proxies={'https': '<my proxy>'}) builder = load_dataset_builder(..., download_config=download_config) ``` But, when getting the dataset_info from HfApi, the http requests not using the proxies. ### Steps to reproduce the bug 1. Setup proxies i...
199
DownloadConfig.proxies not work when load_dataset_builder calling HfApi.dataset_info ### Describe the bug ```python download_config = DownloadConfig(proxies={'https': '<my proxy>'}) builder = load_dataset_builder(..., download_config=download_config) ``` But, when getting the dataset_info from HfApi, the htt...
[ -0.2879653573036194, -0.09048756211996078, 0.062012672424316406, 0.29357796907424927, 0.23151016235351562, -0.19603273272514343, 0.475433349609375, -0.017514346167445183, -0.19411398470401764, -0.08183425664901733, -0.21388950943946838, -0.08288490772247314, 0.5092027187347412, 0.134078919...
https://github.com/huggingface/datasets/issues/6032
`huggingface_hub.configure_http_backend` works for `transformers` because they only use the `huggingface_hub` lib for downloads. Our download logic is a bit more complex (e.g., we also support downloading non-Hub files), so we are not aligned with them yet. In the meantime, it's best to use the env vars.
DownloadConfig.proxies not work when load_dataset_builder calling HfApi.dataset_info
### Describe the bug ```python download_config = DownloadConfig(proxies={'https': '<my proxy>'}) builder = load_dataset_builder(..., download_config=download_config) ``` But, when getting the dataset_info from HfApi, the http requests not using the proxies. ### Steps to reproduce the bug 1. Setup proxies i...
46
DownloadConfig.proxies not work when load_dataset_builder calling HfApi.dataset_info ### Describe the bug ```python download_config = DownloadConfig(proxies={'https': '<my proxy>'}) builder = load_dataset_builder(..., download_config=download_config) ``` But, when getting the dataset_info from HfApi, the htt...
[ -0.27186834812164307, -0.31287357211112976, 0.07217457890510559, 0.2777330279350281, 0.2889355719089508, -0.19712388515472412, 0.2673001289367676, -0.08293803036212921, -0.08512282371520996, -0.010375790297985077, -0.326313316822052, -0.0373648926615715, 0.4374721050262451, 0.3451578021049...
https://github.com/huggingface/datasets/issues/6032
@mariosasko I fully understand that the logic for dataset is different. I see 2 issues with the current implementation of the env variables: - having the same https_proxy/http_prox/no_proxy env variables for all tools is not good in some case. For example I have 2 differents proxy server. In 2019 we had discussion w...
DownloadConfig.proxies not work when load_dataset_builder calling HfApi.dataset_info
### Describe the bug ```python download_config = DownloadConfig(proxies={'https': '<my proxy>'}) builder = load_dataset_builder(..., download_config=download_config) ``` But, when getting the dataset_info from HfApi, the http requests not using the proxies. ### Steps to reproduce the bug 1. Setup proxies i...
146
DownloadConfig.proxies not work when load_dataset_builder calling HfApi.dataset_info ### Describe the bug ```python download_config = DownloadConfig(proxies={'https': '<my proxy>'}) builder = load_dataset_builder(..., download_config=download_config) ``` But, when getting the dataset_info from HfApi, the htt...
[ -0.27245229482650757, -0.19546957314014435, 0.02785228192806244, 0.20180106163024902, 0.23760920763015747, -0.28152066469192505, 0.5187767744064331, 0.051726020872592926, -0.04137340188026428, 0.0696803405880928, -0.17300471663475037, 0.11520993709564209, 0.4824944734573364, 0.236843019723...
https://github.com/huggingface/datasets/issues/6025
I've opened a PR with a fix. In the meantime, you can avoid the error by deleting `task_templates` with `dataset.info.task_templates = None` before the `interleave_datasets` call. `
Using a dataset for a use other than it was intended for.
### Describe the bug Hi, I want to use the rotten tomatoes dataset but for a task other than classification, but when I interleave the dataset, it throws ```'ValueError: Column label is not present in features.'```. It seems that the label_col must be there in the dataset for some reason? Here is the full stacktra...
27
Using a dataset for a use other than it was intended for. ### Describe the bug Hi, I want to use the rotten tomatoes dataset but for a task other than classification, but when I interleave the dataset, it throws ```'ValueError: Column label is not present in features.'```. It seems that the label_col must be there i...
[ 0.04401043802499771, 0.10518953204154968, 0.042100902646780014, 0.2711704671382904, 0.41534680128097534, 0.40644603967666626, 0.6712472438812256, 0.12305937707424164, 0.37308967113494873, 0.13794034719467163, -0.25589993596076965, 0.2542686462402344, 0.011830978095531464, 0.316799581050872...
https://github.com/huggingface/datasets/issues/6020
This scenario currently requires explicitly passing the target features (to avoid the error): ```python import datasets ... features = dataset.features features["output"] = = [{"test": datasets.Value("int64")}] test2 = dataset.map(lambda row, idx: test_func(row, idx), with_indices=True, num_proc=32, features...
Inconsistent "The features can't be aligned" error when combining map, multiprocessing, and variable length outputs
### Describe the bug I'm using a dataset with map and multiprocessing to run a function that returned a variable length list of outputs. This output list may be empty. Normally this is handled fine, but there is an edge case that crops up when using multiprocessing. In some cases, an empty list result ends up in a dat...
36
Inconsistent "The features can't be aligned" error when combining map, multiprocessing, and variable length outputs ### Describe the bug I'm using a dataset with map and multiprocessing to run a function that returned a variable length list of outputs. This output list may be empty. Normally this is handled fine, bu...
[ -0.22299067676067352, -0.33570733666419983, -0.059271086007356644, 0.18832027912139893, 0.16204114258289337, -0.18797782063484192, 0.49852344393730164, 0.06349801272153854, -0.009108811616897583, 0.079771026968956, 0.35652121901512146, 0.23856398463249207, -0.0017629396170377731, 0.2790445...
https://github.com/huggingface/datasets/issues/6020
I just encountered the same error in the same situation (multiprocessing with variable length outputs). The funny (or dangerous?) thing is, that this error only showed up when testing with a small test dataset (16 examples, ValueError with `num_proc` >1) but the same code works fine for the full dataset (~70k exampl...
Inconsistent "The features can't be aligned" error when combining map, multiprocessing, and variable length outputs
### Describe the bug I'm using a dataset with map and multiprocessing to run a function that returned a variable length list of outputs. This output list may be empty. Normally this is handled fine, but there is an edge case that crops up when using multiprocessing. In some cases, an empty list result ends up in a dat...
100
Inconsistent "The features can't be aligned" error when combining map, multiprocessing, and variable length outputs ### Describe the bug I'm using a dataset with map and multiprocessing to run a function that returned a variable length list of outputs. This output list may be empty. Normally this is handled fine, bu...
[ -0.22299067676067352, -0.33570733666419983, -0.059271086007356644, 0.18832027912139893, 0.16204114258289337, -0.18797782063484192, 0.49852344393730164, 0.06349801272153854, -0.009108811616897583, 0.079771026968956, 0.35652121901512146, 0.23856398463249207, -0.0017629396170377731, 0.2790445...
https://github.com/huggingface/datasets/issues/6014
Hi ! The huggingface/dataset-viewer code was not maintained anymore because we switched to a new dataset viewer that is deployed available for each dataset the Hugging Face website. What are you using this old repository for ?
Request to Share/Update Dataset Viewer Code
Overview: The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute. Request: I k...
37
Request to Share/Update Dataset Viewer Code Overview: The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of docu...
[ -0.1857638657093048, 0.04342028498649597, -0.05034692957997322, 0.3463643789291382, 0.06275570392608643, 0.13257735967636108, 0.10639771819114685, 0.3743211627006531, -0.0635615810751915, 0.173007071018219, -0.20122423768043518, 0.15556125342845917, -0.08831072598695755, 0.1680248379707336...
https://github.com/huggingface/datasets/issues/6014
I think these parts are outdated: * https://github.com/huggingface/datasets-viewer/blob/8efad8eae313a891f713469983bf4c744786f26e/run.py#L126-L131 * https://github.com/huggingface/datasets-viewer/blob/8efad8eae313a891f713469983bf4c744786f26e/run.py#L145-L150 To make the viewer work, the first one should be replac...
Request to Share/Update Dataset Viewer Code
Overview: The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute. Request: I k...
87
Request to Share/Update Dataset Viewer Code Overview: The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of docu...
[ -0.25805866718292236, -0.015304967761039734, -0.02590104378759861, 0.3342154026031494, 0.14130829274654388, 0.1742892563343048, 0.17373070120811462, 0.4034424424171448, -0.04206851124763489, 0.14834603667259216, -0.16766893863677979, 0.22764688730239868, -0.14093910157680511, 0.20683681964...
https://github.com/huggingface/datasets/issues/6014
> The dataset viewer on the Hugging Face website is incredibly useful @mariosasko i think @lilyorlilypad wants to run the new dataset-viewer, not the old one
Request to Share/Update Dataset Viewer Code
Overview: The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute. Request: I k...
26
Request to Share/Update Dataset Viewer Code Overview: The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of docu...
[ -0.2742135524749756, 0.07217845320701599, -0.06602172553539276, 0.331643283367157, 0.006425291299819946, 0.12299636006355286, 0.10355953127145767, 0.4018328785896301, -0.041862621903419495, 0.22050344944000244, -0.21187978982925415, 0.26414546370506287, -0.11946761608123779, 0.230278849601...
https://github.com/huggingface/datasets/issues/6014
> wants to run the new dataset-viewer, not the old one Thanks for the clarification for me. I do want to run the new dataset-viewer.
Request to Share/Update Dataset Viewer Code
Overview: The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute. Request: I k...
25
Request to Share/Update Dataset Viewer Code Overview: The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of docu...
[ -0.2614268362522125, 0.04871726036071777, -0.04760860279202461, 0.3212714195251465, -0.0047023119404911995, 0.13446806371212006, 0.09149372577667236, 0.36667561531066895, -0.02975161001086235, 0.21518786251544952, -0.2112337350845337, 0.23290081322193146, -0.12499379366636276, 0.2289771884...
https://github.com/huggingface/datasets/issues/6014
It should be possible to run it locally using the HF datasets-server API (docs [here](https://huggingface.co/docs/datasets-server)) but the front end part is not open source (yet ?) The back-end is open source though if you're interested: https://github.com/huggingface/datasets-server It automatically converts data...
Request to Share/Update Dataset Viewer Code
Overview: The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute. Request: I k...
54
Request to Share/Update Dataset Viewer Code Overview: The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of docu...
[ -0.30234646797180176, -0.03900596499443054, -0.02046775445342064, 0.2967483699321747, 0.009397516027092934, 0.13059890270233154, 0.04538210481405258, 0.38922378420829773, -0.012390416115522385, 0.1952628195285797, -0.29669731855392456, 0.22623896598815918, -0.15911421179771423, 0.382734477...
https://github.com/huggingface/datasets/issues/6014
the new frontend would probably be hard to open source, as is, as it's quite intertwined with the Hub's code. However, at some point it would be amazing to have a community-driven open source implementation of a frontend to datasets-server!
Request to Share/Update Dataset Viewer Code
Overview: The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute. Request: I k...
40
Request to Share/Update Dataset Viewer Code Overview: The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of docu...
[ -0.3248501121997833, -0.05922068655490875, -0.09017610549926758, 0.27208685874938965, -0.06077620014548302, 0.03568785637617111, 0.1505102664232254, 0.3401680290699005, 0.1280948519706726, 0.19909505546092987, -0.310796320438385, 0.23992449045181274, -0.18274036049842834, 0.426730871200561...
https://github.com/huggingface/datasets/issues/6014
For the frontend viewer, see https://github.com/huggingface/datasets/issues/6139. Also mentioned in https://github.com/huggingface/datasets-server/issues/213 and https://github.com/huggingface/datasets-server/issues/441 Closing as a duplicate of https://github.com/huggingface/datasets/issues/6139
Request to Share/Update Dataset Viewer Code
Overview: The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute. Request: I k...
18
Request to Share/Update Dataset Viewer Code Overview: The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of docu...
[ -0.23733460903167725, -0.07210084050893784, -0.057132452726364136, 0.3593696653842926, 0.11453050374984741, 0.13318656384944916, 0.10088930279016495, 0.3478478193283081, -0.07706047594547272, 0.18915918469429016, -0.18325158953666687, 0.21624279022216797, -0.1487388163805008, 0.31280735135...
https://github.com/huggingface/datasets/issues/6013
You can use the `remove_columns` parameter in `map` to avoid duplicating the columns (and save disk space) and then concatenate the original dataset with the map result: ```python from datasets import concatenate_datasets # dummy example ds_new = ds.map(lambda x: {"new_col": x["col"] + 2}, remove_columns=ds.column_...
[FR] `map` should reuse unchanged columns from the previous dataset to avoid disk usage
### Feature request Currently adding a new column with `map` will cause all the data in the dataset to be duplicated and stored/cached on the disk again. It should reuse unchanged columns. ### Motivation This allows having datasets with different columns but sharing some basic columns. Currently, these datasets wou...
93
[FR] `map` should reuse unchanged columns from the previous dataset to avoid disk usage ### Feature request Currently adding a new column with `map` will cause all the data in the dataset to be duplicated and stored/cached on the disk again. It should reuse unchanged columns. ### Motivation This allows having dat...
[ -0.23237107694149017, -0.2284434735774994, -0.17978745698928833, 0.044314831495285034, 0.08519665896892548, 0.35239219665527344, 0.17297399044036865, 0.5289419293403625, 0.36176013946533203, 0.08009135723114014, -0.216575026512146, 0.5258405804634094, 0.004911448806524277, 0.15665900707244...
https://github.com/huggingface/datasets/issues/6012
You can use `with_transform` to get a new dataset object. Support for lazy `map` has already been discussed [here](https://github.com/huggingface/datasets/issues/3385) a little bit. Personally, I'm not a fan, as this would make `map` even more complex.
[FR] Transform Chaining, Lazy Mapping
### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested. The API should look ...
35
[FR] Transform Chaining, Lazy Mapping ### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the datas...
[ -0.2477826476097107, -0.4162158966064453, -0.1703816056251526, -0.06715787947177887, -0.0025982828810811043, -0.03832286596298218, -0.03812398388981819, 0.406848281621933, 0.29438120126724243, 0.1818750500679016, -0.06886430084705353, 0.42894840240478516, -0.2255830466747284, 0.35840633511...
https://github.com/huggingface/datasets/issues/6012
> You can use `with_transform` to get a new dataset object. > > Support for lazy `map` has already been discussed [here](https://github.com/huggingface/datasets/issues/3385) a little bit. Personally, I'm not a fan, as this would make `map` even more complex. I read about IterableDataset, and it seems to have lazy...
[FR] Transform Chaining, Lazy Mapping
### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested. The API should look ...
71
[FR] Transform Chaining, Lazy Mapping ### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the datas...
[ -0.2746129035949707, -0.40563780069351196, -0.1270229071378708, -0.08347396552562714, 0.027343671768903732, 0.07320760190486908, -0.0010271789506077766, 0.3469206690788269, 0.15508490800857544, 0.04703827202320099, -0.1103539690375328, 0.33956676721572876, -0.29174119234085083, 0.275372833...
https://github.com/huggingface/datasets/issues/6012
> I read about IterableDataset, and it seems to have lazy mapping. But I can't figure out how to convert an IterableDataset into a normal one when needed. You must cache an `IterableDataset` to disk to load it as a `Dataset`. One way to do this is with `Dataset.from_generator`: ```python from functools import part...
[FR] Transform Chaining, Lazy Mapping
### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested. The API should look ...
92
[FR] Transform Chaining, Lazy Mapping ### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the datas...
[ -0.23495686054229736, -0.32557356357574463, -0.16109181940555573, -0.18144211173057556, 0.10616925358772278, 0.13453617691993713, 0.055798061192035675, 0.4533080458641052, 0.008160553872585297, -0.046478718519210815, 0.010550286620855331, 0.4062656760215759, -0.3834393322467804, 0.17144931...
https://github.com/huggingface/datasets/issues/6012
I wonder if it would be beneficial to have a dedicated method to do that ? Maybe a `.save_to_disk()` so that the user can reload the resulting dataset later ?
[FR] Transform Chaining, Lazy Mapping
### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested. The API should look ...
30
[FR] Transform Chaining, Lazy Mapping ### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the datas...
[ -0.13788457214832306, -0.2570563852787018, -0.1635575145483017, -0.29137471318244934, 0.0028412677347660065, 0.06371314823627472, -0.05337013304233551, 0.3641147315502167, 0.09568798542022705, 0.0788969174027443, 0.044697947800159454, 0.5188761949539185, -0.36936914920806885, 0.13355171680...
https://github.com/huggingface/datasets/issues/6012
> ```python > from functools import partial > from datasets import Dataset > > def gen_from_iterable_dataset(iterable_ds) > yield from iterable_ds > > ds = Dataset.from_generator(partial(gen_from_iterable_dataset, iterable_ds), features=iterable_ds.features}) > ``` @mariosasko With these complex mappin...
[FR] Transform Chaining, Lazy Mapping
### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested. The API should look ...
44
[FR] Transform Chaining, Lazy Mapping ### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the datas...
[ -0.006098143756389618, -0.4207122325897217, -0.15540720522403717, -0.06829299032688141, 0.06173661723732948, 0.19080397486686707, 0.02012314274907112, 0.40103286504745483, 0.13905248045921326, -0.034752048552036285, 0.12666434049606323, 0.2140544354915619, -0.35841625928878784, 0.161813527...
https://github.com/huggingface/datasets/issues/6012
The params passed to `Dataset.from_generator` will be used to compute the hash (`partial` encapsulates the `iterable_ds` value, so changing it will also change the hash)
[FR] Transform Chaining, Lazy Mapping
### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested. The API should look ...
25
[FR] Transform Chaining, Lazy Mapping ### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the datas...
[ -0.2502351701259613, -0.28470587730407715, -0.19874492287635803, -0.03752261772751808, 0.0846019983291626, -0.019080407917499542, 0.06320175528526306, 0.4058738350868225, 0.1536235213279724, 0.2261349856853485, 0.16613797843456268, 0.4546946883201599, -0.3608607351779938, 0.225989341735839...
https://github.com/huggingface/datasets/issues/6012
Hi, I think this feature would be very useful. I want to concatenate large datasets with heterogeneous columns. I dislike `map` since I don't want multiple copy of that datasets locally. I tried to use "set_transform" on each dataset to convert it to a standard features format, but `datasets.concatenate_datasets` ignor...
[FR] Transform Chaining, Lazy Mapping
### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested. The API should look ...
74
[FR] Transform Chaining, Lazy Mapping ### Feature request Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space. The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the datas...
[ -0.4485601782798767, -0.21093867719173431, 0.009916141629219055, -0.20319369435310364, -0.004091721028089523, 0.23192815482616425, 0.18682898581027985, 0.456773579120636, -0.055248141288757324, -0.09726309776306152, -0.2656952440738678, 0.2790479362010956, -0.03515258803963661, 0.085421457...
https://github.com/huggingface/datasets/issues/6011
Hi! You can do `ds.get_index("embeddings").faiss_index.metric_type` to get the metric type and then match the result with the FAISS metric [enum](https://github.com/facebookresearch/faiss/blob/43d86e30736ede853c384b24667fc3ab897d6ba9/faiss/MetricType.h#L22-L36) (should be L2).
Documentation: wiki_dpr Dataset has no metric_type for Faiss Index
### Describe the bug After loading `wiki_dpr` using: ```py ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train') print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None ``` the index does not have a defined `metric_type`. This is an issue because ...
23
Documentation: wiki_dpr Dataset has no metric_type for Faiss Index ### Describe the bug After loading `wiki_dpr` using: ```py ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train') print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None ``` the i...
[ -0.3627319037914276, -0.5373347997665405, 0.06526761502027512, 0.3944721817970276, 0.33478012681007385, 0.139950230717659, 0.33886921405792236, 0.3349672555923462, 0.38180649280548096, 0.33025017380714417, 0.13445734977722168, 0.23283353447914124, 0.18522217869758606, -0.14470714330673218,...
https://github.com/huggingface/datasets/issues/6011
Ah! Thank you for pointing this out. FYI: the enum indicates it's using the inner product. Using `torch.inner` or `torch.dot` still produces a discrepancy compared to the built-in score. I think this is because of the compression/quantization that occurs with the FAISS index.
Documentation: wiki_dpr Dataset has no metric_type for Faiss Index
### Describe the bug After loading `wiki_dpr` using: ```py ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train') print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None ``` the index does not have a defined `metric_type`. This is an issue because ...
43
Documentation: wiki_dpr Dataset has no metric_type for Faiss Index ### Describe the bug After loading `wiki_dpr` using: ```py ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train') print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None ``` the i...
[ -0.3627319037914276, -0.5373347997665405, 0.06526761502027512, 0.3944721817970276, 0.33478012681007385, 0.139950230717659, 0.33886921405792236, 0.3349672555923462, 0.38180649280548096, 0.33025017380714417, 0.13445734977722168, 0.23283353447914124, 0.18522217869758606, -0.14470714330673218,...
https://github.com/huggingface/datasets/issues/6010
Yes, feel free to work on this. You can check the PyArrow Table `__repr__` and Polars DataFrame `__repr__`/`_repr_html_` implementations for some pointers/ideas.
Improve `Dataset`'s string representation
Currently, `Dataset.__repr__` outputs a dataset's column names and the number of rows. We could improve it by printing its features and the first few rows. We should also implement `_repr_html_` to have a rich HTML representation in notebooks/Streamlit.
22
Improve `Dataset`'s string representation Currently, `Dataset.__repr__` outputs a dataset's column names and the number of rows. We could improve it by printing its features and the first few rows. We should also implement `_repr_html_` to have a rich HTML representation in notebooks/Streamlit. Yes, feel free to...
[ -0.2611526548862457, -0.06325697153806686, -0.13544954359531403, 0.1877852976322174, 0.4518061876296997, 0.06964315474033356, 0.07831280678510666, 0.4281670153141022, -0.2540845572948456, 0.060619812458753586, -0.21277019381523132, 0.42051470279693604, 0.17750614881515503, 0.28438004851341...
https://github.com/huggingface/datasets/issues/6010
@mariosasko are there any other similar issues that I could work on? I see this has been already solved.
Improve `Dataset`'s string representation
Currently, `Dataset.__repr__` outputs a dataset's column names and the number of rows. We could improve it by printing its features and the first few rows. We should also implement `_repr_html_` to have a rich HTML representation in notebooks/Streamlit.
19
Improve `Dataset`'s string representation Currently, `Dataset.__repr__` outputs a dataset's column names and the number of rows. We could improve it by printing its features and the first few rows. We should also implement `_repr_html_` to have a rich HTML representation in notebooks/Streamlit. @mariosasko are t...
[ -0.24637530744075775, -0.09395340830087662, -0.15906363725662231, 0.2803180515766144, 0.4878694415092468, 0.09331372380256653, 0.08115609735250473, 0.46818283200263977, -0.2016535997390747, 0.05637377128005028, 0.03029661625623703, 0.2372809499502182, 0.06472807377576828, 0.327731490135192...