html_url stringlengths 48 51 | title stringlengths 5 280 | comments stringlengths 63 51.8k | body stringlengths 0 36.2k ⌀ | comment_length int64 16 1.52k | text stringlengths 159 54.1k | embeddings listlengths 768 768 |
|---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/5422 | Datasets load error for saved github issues | Found this when searching for the same error, looks like based on #3965 it's just an issue with the data. I found that changing `df = pd.DataFrame.from_records(all_issues)` to `df = pd.DataFrame.from_records(all_issues).dropna(axis=1, how='all').drop(['milestone'], axis=1)` from the fetch_issues function fixed the issue.
The "milestone" column seemed to be problematic (only ~50 non null rows) and dropped any columns that were all null as well just in case. | ### Describe the bug
Loading a previously downloaded & saved dataset as described in the HuggingFace course:
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
Gives this error:
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
A work-around I found was to use streaming.
### Steps to reproduce the bug
Reproduce by executing the code provided:
https://huggingface.co/course/chapter5/5?fw=pt
From the heading:
'let’s create a function that can download all the issues from a GitHub repository'
### Expected behavior
No error
### Environment info
Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp).
**[EDIT]**
This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`)
```
Using custom data configuration default-950028611d2860c8
Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51...
Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s]
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s]
Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last):
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table
pa_table = table_cast(pa_table, self._schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast
return cast_table_to_schema(table, schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp>
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type timestamp[s] to null
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module>
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset
builder_instance.download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare
self._download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
Generating train split: 2619 examples [00:19, 7155.72 examples/s]
``` | 65 | Datasets load error for saved github issues
### Describe the bug
Loading a previously downloaded & saved dataset as described in the HuggingFace course:
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
Gives this error:
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
A work-around I found was to use streaming.
### Steps to reproduce the bug
Reproduce by executing the code provided:
https://huggingface.co/course/chapter5/5?fw=pt
From the heading:
'let’s create a function that can download all the issues from a GitHub repository'
### Expected behavior
No error
### Environment info
Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp).
**[EDIT]**
This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`)
```
Using custom data configuration default-950028611d2860c8
Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51...
Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s]
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s]
Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last):
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table
pa_table = table_cast(pa_table, self._schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast
return cast_table_to_schema(table, schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp>
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type timestamp[s] to null
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module>
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset
builder_instance.download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare
self._download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
Generating train split: 2619 examples [00:19, 7155.72 examples/s]
```
Found this when searching for the same error, looks like based on #3965 it's just an issue with the data. I found that changing `df = pd.DataFrame.from_records(all_issues)` to `df = pd.DataFrame.from_records(all_issues).dropna(axis=1, how='all').drop(['milestone'], axis=1)` from the fetch_issues function fixed the issue.
The "milestone" column seemed to be problematic (only ~50 non null rows) and dropped any columns that were all null as well just in case. | [
-0.4710150957107544,
0.07906512916088104,
0.059535037726163864,
0.4664856791496277,
0.22032460570335388,
0.09920280426740646,
0.3799690008163452,
0.2986510694026947,
0.09120248258113861,
-0.014517247676849365,
0.041823916137218475,
0.09861104935407639,
-0.28378358483314514,
0.18024848401546478,
0.02369016781449318,
-0.13746581971645355,
0.05341869965195656,
0.12191446125507355,
-0.07544931769371033,
0.25002288818359375,
-0.10295635461807251,
0.2531818151473999,
-0.22357182204723358,
-0.08464734256267548,
-0.2708287537097931,
-0.025525780394673347,
0.054685212671756744,
0.3749394714832306,
-0.010557318106293678,
-0.40976569056510925,
0.27910488843917847,
-0.037118006497621536,
0.026367206126451492,
0.6492112278938293,
-0.00012075250560883433,
0.15625952184200287,
0.3618277907371521,
-0.189560204744339,
-0.5131369233131409,
-0.14753328263759613,
-0.1677110344171524,
0.0008539948612451553,
0.05150127410888672,
-0.16494418680667877,
-0.23667141795158386,
0.18253576755523682,
-0.05174309015274048,
-0.39248010516166687,
0.5979457497596741,
0.5063511729240417,
0.148142009973526,
0.6537630558013916,
0.18979522585868835,
-0.07199627161026001,
0.25783368945121765,
0.1898990273475647,
-0.13888318836688995,
0.4292421340942383,
0.07501010596752167,
0.11377832293510437,
0.06625844538211823,
0.2724989354610443,
-0.06634990125894547,
-0.10827499628067017,
0.39812329411506653,
0.02122257649898529,
-0.13256603479385376,
-0.19404536485671997,
-0.12143302708864212,
0.1824284791946411,
0.2765694856643677,
-0.2729957699775696,
-0.493316650390625,
-0.5837548971176147,
0.04941359907388687,
-0.10022807121276855,
0.24763953685760498,
0.2650580108165741,
-0.18652668595314026,
0.20645977556705475,
-0.4778006970882416,
-0.08270129561424255,
-0.2502595782279968,
0.0036613494157791138,
0.42531296610832214,
-0.17101559042930603,
-0.25693756341934204,
0.13060401380062103,
-0.0962887704372406,
-0.04340263456106186,
-0.24059005081653595,
-0.27743619680404663,
-0.12200257182121277,
0.30824774503707886,
-0.20565609633922577,
-0.05657880753278732,
0.0728505551815033,
-0.07156803458929062,
0.25112059712409973,
0.1722176969051361,
-0.06515343487262726,
0.02900616265833378,
0.06986847519874573,
-0.030411213636398315,
0.4080553650856018,
0.18176385760307312,
0.07586324959993362,
0.02874964475631714,
0.22332923114299774,
0.3678697943687439,
0.06951509416103363,
-0.06710603088140488,
-0.03096722438931465,
0.050705164670944214,
-0.21029406785964966,
-0.15924522280693054,
0.4278433322906494,
-0.24701209366321564,
-0.30605587363243103,
0.16668394207954407,
-0.23548623919487,
-0.040937718003988266,
0.12534743547439575,
0.3848901391029358,
-0.170050248503685,
0.07377207279205322,
0.015366483479738235,
0.2095656394958496,
-0.18247056007385254,
-0.2798668146133423,
-0.25741878151893616,
-0.2404295951128006,
0.026105541735887527,
0.14199481904506683,
0.13576915860176086,
-0.5905315279960632,
0.30728012323379517,
0.1618921160697937,
-0.10440874099731445,
-0.19780109822750092,
-0.19078490138053894,
0.05615583434700966,
-0.06343594938516617,
0.3909296691417694,
-0.03632204979658127,
0.08320415765047073,
0.24364373087882996,
-0.3264555335044861,
-0.10491850227117538,
0.04689726233482361,
-0.09145095199346542,
-0.4455202519893646,
-0.10748015344142914,
0.12819531559944153,
-0.3193679451942444,
0.24109573662281036,
-0.5857294201850891,
0.2032507359981537,
0.2655174732208252,
-0.1589484065771103,
-0.0678890272974968,
0.05161384120583534,
-0.18980126082897186,
-0.1673014909029007,
0.3837369978427887,
0.5222494006156921,
-0.12518081068992615,
-0.35862430930137634,
-0.022541478276252747,
-0.3069389760494232,
0.016417115926742554,
0.14528264105319977,
-0.06198131665587425,
0.19296173751354218,
-0.21238744258880615,
0.07473480701446533,
-0.023920871317386627,
-0.025269895792007446,
-0.24318084120750427,
0.22580470144748688,
-0.13029557466506958,
0.3396966755390167,
-0.06413405388593674,
-0.015721431002020836,
0.27362480759620667,
-0.20227696001529694,
0.18575304746627808,
0.16702808439731598,
-0.16668269038200378,
0.13863396644592285,
-0.34703320264816284,
-0.23735952377319336,
-0.10490931570529938,
0.18546830117702484,
-0.09364679455757141,
0.28176218271255493,
0.02594173699617386,
0.16875234246253967,
0.1592182219028473,
-0.07335029542446136,
0.1880529522895813,
0.47125566005706787,
0.2186751514673233,
0.04246353358030319,
-0.1423347294330597,
-0.28257590532302856,
-0.7540937066078186,
0.2959003150463104,
0.2599126100540161,
0.18756505846977234,
-0.055514171719551086,
-0.11318711191415787,
-0.39627915620803833,
0.148609921336174,
-0.18907909095287323,
-0.14033323526382446,
-0.020623615011572838,
0.0873151570558548,
0.20489585399627686,
0.17420955002307892,
-0.2787225544452667,
0.5823856592178345,
-0.3830776512622833,
0.19699181616306305,
-0.4865703582763672,
0.35415568947792053,
-0.0385446771979332,
-0.2975667119026184,
0.17345863580703735,
0.14655275642871857,
0.09856440126895905,
-0.21574154496192932,
-0.08552692085504532,
0.4313356280326843,
-0.10947543382644653,
0.2146150916814804,
-0.18704256415367126,
-0.061639800667762756,
0.18928800523281097,
-0.11946536600589752,
-0.1445121169090271,
0.29352620244026184,
0.19465768337249756,
-0.03661034256219864,
-0.24168360233306885,
0.5297573804855347,
-0.08659380674362183,
0.11227358132600784,
-0.0639224424958229,
-0.03579722344875336,
0.15876054763793945,
0.11048398911952972,
-0.16625191271305084,
-0.2655973434448242,
0.17822737991809845,
-0.07219575345516205,
0.3827269375324249,
0.0009665451943874359,
-0.39090806245803833,
0.050951965153217316,
0.31724289059638977,
0.0394231341779232,
-0.21955657005310059,
0.26238736510276794,
-0.23541268706321716,
-0.21620827913284302,
0.09621983766555786,
0.2464313954114914,
0.3757237493991852,
0.10762155801057816,
-0.11301486194133759,
0.13989807665348053,
-0.106153704226017,
-0.06259608268737793,
0.228286013007164,
-0.06201201677322388,
0.09524371474981308,
0.1629069745540619,
-0.048402804881334305,
0.053720030933618546,
-0.26213064789772034,
0.02057432383298874,
-0.08415178954601288,
0.3441903293132782,
-0.6843589544296265,
-0.016046833246946335,
-0.09234452992677689,
-0.21559831500053406,
-0.14569838345050812,
0.00046013761311769485,
-0.36442142724990845,
-0.2601059675216675,
-0.11828868091106415,
0.35222917795181274,
-0.2164633721113205,
0.19175486266613007,
0.06163820996880531,
0.3338760733604431,
0.10552512109279633,
0.030539346858859062,
-0.3444615602493286,
-0.23550669848918915,
-0.23459270596504211,
-0.02430449239909649,
0.24320213496685028,
-0.07818304747343063,
0.28294745087623596,
-0.33926212787628174,
-0.28871434926986694,
-0.22487540543079376,
-0.1558300405740738,
0.10749362409114838,
-0.3402235507965088,
0.5670412182807922,
0.03128959238529205,
0.4133981466293335,
0.12277340888977051,
-0.21571289002895355,
0.32833003997802734,
-0.10754362493753433,
-0.40166833996772766,
-0.021240614354610443,
0.11864785104990005,
0.07198207825422287,
-0.2660396695137024,
-0.10599026829004288,
-0.03393255174160004,
-0.3536131680011749,
0.3357046842575073,
-0.10986769199371338,
0.10736978054046631,
0.28193211555480957,
0.14252841472625732,
0.2572067379951477,
-0.09576261043548584,
0.0549730509519577,
-0.11959713697433472,
-0.599755048751831,
0.12048792093992233,
-0.228473499417305,
-0.32017260789871216,
0.07496742904186249,
0.02903776988387108,
-0.05229729786515236,
0.1102556362748146,
-0.44346725940704346,
-0.07445394992828369,
0.08964697271585464,
0.10504110157489777,
0.002492554485797882,
-0.21113212406635284,
0.10598692297935486,
-0.015262112021446228,
0.061156101524829865,
-0.1928054690361023,
-0.3233874440193176,
0.0526704266667366,
-0.007030438631772995,
0.17757219076156616,
0.09964314103126526,
0.5407940149307251,
-0.12842002511024475,
0.7764057517051697,
0.6103956699371338,
-0.05036955699324608,
0.2803941071033478,
-0.251946359872818,
0.43508440256118774,
-0.27599650621414185,
-0.23476383090019226,
0.12442047148942947,
0.023042738437652588,
-0.04954878240823746,
0.16136817634105682,
0.13542596995830536,
0.1488121896982193,
-0.19075249135494232,
-0.02271508425474167,
-0.33737897872924805,
-0.31601762771606445,
-0.07928640395402908,
-0.1820306032896042,
0.2985343635082245,
0.06934966146945953,
0.1364256739616394,
0.012794002890586853,
-0.10508593916893005,
-0.19976294040679932,
0.2907159924507141,
0.17146217823028564,
-0.004622935317456722,
-0.28243324160575867,
0.3092584013938904,
-0.5356295704841614,
0.17256098985671997,
0.10804703086614609,
0.20270179212093353,
-0.07074221223592758,
-0.05392160639166832,
-0.00964038074016571,
-0.053729746490716934,
0.5436320304870605,
-0.05554192513227463,
0.2044299989938736,
0.1880374699831009,
-0.03846091404557228,
-0.5903502702713013,
0.03264098986983299,
0.09162141382694244,
0.1268557757139206,
0.20061692595481873,
0.6637795567512512,
-0.5139530897140503,
-0.2763478457927704,
0.248619943857193,
0.1979115754365921,
0.013273488730192184,
0.00417931005358696,
-0.17807458341121674,
-0.1737672984600067,
-0.2988329529762268,
0.069007508456707,
0.10277602821588516,
0.31568095088005066,
-0.03972060978412628,
0.13194571435451508,
-0.09170167148113251,
0.1904798448085785,
-0.1022440493106842,
-0.027351897209882736,
0.44098567962646484,
-0.11639685183763504,
0.5029733180999756,
0.19052036106586456,
-0.18056179583072662,
0.29990994930267334,
0.7375673651695251,
0.12129122018814087,
-0.2579021453857422,
-0.038160428404808044,
0.11998607218265533,
-0.022154338657855988,
0.4536016583442688,
0.037467580288648605,
-0.09226828068494797,
0.4712859094142914,
0.2990803122520447,
-0.4449567496776581,
0.19291651248931885,
0.20879317820072174,
-0.1328776329755783,
-0.24103641510009766,
-0.4633826017379761,
0.2269277274608612,
-0.021604176610708237,
0.14879046380519867,
0.3531491756439209,
0.18047025799751282,
-0.14992386102676392,
0.03867987170815468,
-0.10337517410516739,
0.7988141775131226,
-0.008143976330757141,
0.26936009526252747,
0.5667595863342285,
-0.3033931255340576,
0.25504428148269653,
0.06843177229166031,
-0.03759347274899483,
-0.40955817699432373,
0.041588347405195236,
0.01566837914288044,
-0.06280156224966049,
0.1202865019440651,
0.08684392273426056,
-0.16109813749790192,
0.1288905143737793,
0.11581306159496307,
0.5223597288131714,
-0.08650971204042435,
0.02110002189874649,
-0.19122089445590973,
-0.1691100001335144,
-0.597387433052063,
0.10978516936302185,
-0.27334320545196533,
0.16338136792182922,
0.017969103530049324,
-0.08311944454908371,
-0.17737635970115662,
-0.27986085414886475,
-0.6108459234237671,
0.2165704071521759,
-0.08006324619054794,
-0.0021618660539388657,
0.13502220809459686,
-0.3413681983947754,
-0.03681357204914093,
0.13210941851139069,
0.1700543463230133,
-0.03929365053772926,
-0.23494526743888855,
0.18415232002735138,
-0.37828463315963745,
0.042690977454185486,
-0.03258126229047775,
0.05479396879673004,
0.26734620332717896,
-0.09042142331600189,
0.02180815488100052,
-0.10008852928876877,
-0.46101829409599304,
-0.27980154752731323,
0.17110994458198547,
0.13169579207897186,
-0.3908904194831848,
-0.21135465800762177,
-0.3004835844039917,
0.09631256014108658,
0.249923974275589,
-0.4295208752155304,
0.0771661251783371,
0.08317254483699799,
0.001472030533477664,
-0.029644399881362915,
-0.1501171737909317,
-0.3371743857860565,
-0.17628973722457886,
0.6996058225631714,
-0.20662394165992737,
0.05694393813610077,
0.5159640312194824,
0.21232037246227264,
-0.058095477521419525,
-0.15069085359573364,
0.2013435661792755,
0.22733502089977264,
-0.7285991907119751,
0.4037943184375763,
-0.13236422836780548,
0.13110573589801788,
-0.04556962847709656,
0.3855845332145691,
0.12127524614334106,
-0.15415138006210327,
0.1443333923816681,
-0.2410263866186142,
-0.3101571500301361,
0.18457677960395813,
-0.070338174700737,
0.2513830363750458,
0.270295649766922,
0.10203363001346588,
-0.03496366739273071,
-0.1294597089290619,
-0.25515007972717285,
0.058281511068344116,
-0.39033323526382446,
0.10257670283317566,
0.30302920937538147,
-0.02322205901145935,
0.40260300040245056,
-0.2488381266593933,
0.025436056777834892,
0.034875061362981796,
-0.2772950232028961,
-0.10933464765548706,
-0.22464917600154877,
0.13704971969127655,
0.03377922251820564,
-0.14627507328987122,
-0.0740741714835167,
-0.003795091062784195,
-0.2764021158218384,
-0.1134752407670021,
0.34578272700309753,
0.24251243472099304,
0.02936854213476181,
0.0004338044673204422,
0.21882247924804688,
0.21560561656951904,
-0.13411134481430054,
0.026871059089899063,
-0.04448205232620239,
0.3514642119407654,
-0.04203617200255394,
0.1929512470960617,
-0.18828019499778748,
-0.0641360729932785,
-0.18381862342357635,
0.2321184277534485,
0.04664383828639984,
-0.03546823561191559,
0.47323259711265564,
-0.4008561372756958,
-0.019676504656672478,
0.22133523225784302,
0.34019148349761963,
0.3618514835834503,
-0.20424827933311462,
-0.03444105386734009,
0.06952781230211258,
0.06266377121210098,
-0.08455561101436615,
0.02031436190009117,
0.1804070919752121,
-0.04732669144868851,
-0.0629875510931015,
0.1145872101187706,
0.03640731796622276,
0.08584246039390564,
-0.0351928249001503,
0.21072015166282654,
0.5775513648986816,
0.16190902888774872,
0.31874585151672363,
0.21615222096443176,
-0.011864736676216125,
0.15059883892536163,
-0.013450952246785164,
0.1125761866569519,
0.3454400897026062,
0.0014117136597633362,
-0.1349445879459381,
0.05958843231201172,
-0.06458193808794022,
0.28901341557502747,
0.014996767044067383,
-0.3909645974636078,
-0.10718932747840881,
0.1761271357536316,
-0.28594502806663513,
0.14075039327144623,
0.04950511455535889,
0.5517999529838562,
-0.38735878467559814,
-0.2041415125131607,
-0.0958382710814476,
0.25274062156677246,
-0.08020644634962082,
0.000054924748837947845,
-0.11744601279497147,
-0.17026855051517487,
-0.12922954559326172,
0.15814150869846344,
-0.16648471355438232,
-0.010736778378486633,
0.2588706612586975,
0.03455125167965889,
-0.03932102024555206,
-0.4313390552997589,
0.022208821028470993,
0.2907595634460449,
0.15998154878616333,
-0.1903262585401535,
0.3252948820590973,
0.26577824354171753,
-0.09352424740791321,
0.21821095049381256,
0.379281610250473,
0.6300908923149109,
0.06740862131118774,
0.20235054194927216,
0.019340384751558304,
0.22638623416423798,
-0.021847721189260483,
0.06703200191259384,
0.2577468752861023,
0.16068020462989807,
0.00008205696940422058,
0.33549243211746216,
0.08515045046806335,
-0.1007281094789505,
0.009932514280080795,
-0.03329922631382942,
0.3402625620365143,
-0.30160069465637207,
0.27865520119667053,
-0.3910883963108063,
-0.10177236795425415,
-0.11397586762905121,
-0.051369212567806244,
-0.12958265841007233,
0.1622609794139862,
0.17722256481647491,
0.098089300096035,
0.07020414620637894,
-0.11736191064119339,
0.06292615085840225,
0.04868491739034653,
0.6603038311004639,
0.3783593475818634,
-0.06754446774721146,
-0.19771148264408112,
-0.43100643157958984,
-0.6669738292694092,
-0.11719740182161331,
-0.13711246848106384,
0.25901779532432556,
0.2541532516479492,
0.1274634152650833,
-0.02068977802991867,
0.1233287826180458,
0.06567972898483276,
-0.3689911365509033,
-0.06679732352495193,
0.06043580546975136,
-0.2554960548877716,
-0.08794905245304108,
0.03324210271239281,
-0.05801495909690857,
0.05541164427995682,
-0.2442149817943573,
0.2499694526195526,
-0.027928486466407776,
-0.0731578916311264,
0.10527726262807846,
0.11150729656219482,
-0.09685234725475311,
-0.41939324140548706,
0.3021272122859955,
-0.04910378158092499,
-0.06560026109218597,
-0.02698960341513157,
-0.36334508657455444,
-0.27452877163887024,
-0.22744354605674744,
-0.1761534959077835,
0.1650976836681366,
-0.19308479130268097,
0.6510999202728271,
-0.22150272130966187,
-0.02466907724738121,
-0.34624236822128296,
0.16149333119392395,
0.1547941416501999,
0.09203051775693893,
-0.21108365058898926,
0.17863811552524567,
-0.2431105375289917,
0.2337968498468399,
0.17578117549419403,
0.12056784331798553,
-0.09241436421871185,
0.3693394958972931,
-0.2831079065799713,
-0.2887561619281769,
0.547147274017334,
-0.14137068390846252,
-0.07126519083976746,
0.1583806872367859,
0.04386146366596222,
0.22981330752372742,
-0.3831351399421692,
-0.7105954885482788,
0.13267678022384644,
0.39288127422332764,
-0.19102269411087036,
-0.20504648983478546,
0.0822456032037735,
-0.10183346271514893,
0.011967208236455917,
0.03757890686392784,
0.1754949986934662,
0.06469011306762695,
-0.182908833026886,
0.3985804617404938,
-0.17636391520500183
] |
https://github.com/huggingface/datasets/issues/5422 | Datasets load error for saved github issues | I have this same issue. I saved a dataset to disk and now I can't load it. | ### Describe the bug
Loading a previously downloaded & saved dataset as described in the HuggingFace course:
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
Gives this error:
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
A work-around I found was to use streaming.
### Steps to reproduce the bug
Reproduce by executing the code provided:
https://huggingface.co/course/chapter5/5?fw=pt
From the heading:
'let’s create a function that can download all the issues from a GitHub repository'
### Expected behavior
No error
### Environment info
Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp).
**[EDIT]**
This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`)
```
Using custom data configuration default-950028611d2860c8
Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51...
Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s]
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s]
Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last):
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table
pa_table = table_cast(pa_table, self._schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast
return cast_table_to_schema(table, schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp>
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type timestamp[s] to null
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module>
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset
builder_instance.download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare
self._download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
Generating train split: 2619 examples [00:19, 7155.72 examples/s]
``` | 17 | Datasets load error for saved github issues
### Describe the bug
Loading a previously downloaded & saved dataset as described in the HuggingFace course:
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
Gives this error:
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
A work-around I found was to use streaming.
### Steps to reproduce the bug
Reproduce by executing the code provided:
https://huggingface.co/course/chapter5/5?fw=pt
From the heading:
'let’s create a function that can download all the issues from a GitHub repository'
### Expected behavior
No error
### Environment info
Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp).
**[EDIT]**
This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`)
```
Using custom data configuration default-950028611d2860c8
Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51...
Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s]
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s]
Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last):
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table
pa_table = table_cast(pa_table, self._schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast
return cast_table_to_schema(table, schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp>
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type timestamp[s] to null
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module>
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset
builder_instance.download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare
self._download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
Generating train split: 2619 examples [00:19, 7155.72 examples/s]
```
I have this same issue. I saved a dataset to disk and now I can't load it. | [
-0.4710150957107544,
0.07906512916088104,
0.059535037726163864,
0.4664856791496277,
0.22032460570335388,
0.09920280426740646,
0.3799690008163452,
0.2986510694026947,
0.09120248258113861,
-0.014517247676849365,
0.041823916137218475,
0.09861104935407639,
-0.28378358483314514,
0.18024848401546478,
0.02369016781449318,
-0.13746581971645355,
0.05341869965195656,
0.12191446125507355,
-0.07544931769371033,
0.25002288818359375,
-0.10295635461807251,
0.2531818151473999,
-0.22357182204723358,
-0.08464734256267548,
-0.2708287537097931,
-0.025525780394673347,
0.054685212671756744,
0.3749394714832306,
-0.010557318106293678,
-0.40976569056510925,
0.27910488843917847,
-0.037118006497621536,
0.026367206126451492,
0.6492112278938293,
-0.00012075250560883433,
0.15625952184200287,
0.3618277907371521,
-0.189560204744339,
-0.5131369233131409,
-0.14753328263759613,
-0.1677110344171524,
0.0008539948612451553,
0.05150127410888672,
-0.16494418680667877,
-0.23667141795158386,
0.18253576755523682,
-0.05174309015274048,
-0.39248010516166687,
0.5979457497596741,
0.5063511729240417,
0.148142009973526,
0.6537630558013916,
0.18979522585868835,
-0.07199627161026001,
0.25783368945121765,
0.1898990273475647,
-0.13888318836688995,
0.4292421340942383,
0.07501010596752167,
0.11377832293510437,
0.06625844538211823,
0.2724989354610443,
-0.06634990125894547,
-0.10827499628067017,
0.39812329411506653,
0.02122257649898529,
-0.13256603479385376,
-0.19404536485671997,
-0.12143302708864212,
0.1824284791946411,
0.2765694856643677,
-0.2729957699775696,
-0.493316650390625,
-0.5837548971176147,
0.04941359907388687,
-0.10022807121276855,
0.24763953685760498,
0.2650580108165741,
-0.18652668595314026,
0.20645977556705475,
-0.4778006970882416,
-0.08270129561424255,
-0.2502595782279968,
0.0036613494157791138,
0.42531296610832214,
-0.17101559042930603,
-0.25693756341934204,
0.13060401380062103,
-0.0962887704372406,
-0.04340263456106186,
-0.24059005081653595,
-0.27743619680404663,
-0.12200257182121277,
0.30824774503707886,
-0.20565609633922577,
-0.05657880753278732,
0.0728505551815033,
-0.07156803458929062,
0.25112059712409973,
0.1722176969051361,
-0.06515343487262726,
0.02900616265833378,
0.06986847519874573,
-0.030411213636398315,
0.4080553650856018,
0.18176385760307312,
0.07586324959993362,
0.02874964475631714,
0.22332923114299774,
0.3678697943687439,
0.06951509416103363,
-0.06710603088140488,
-0.03096722438931465,
0.050705164670944214,
-0.21029406785964966,
-0.15924522280693054,
0.4278433322906494,
-0.24701209366321564,
-0.30605587363243103,
0.16668394207954407,
-0.23548623919487,
-0.040937718003988266,
0.12534743547439575,
0.3848901391029358,
-0.170050248503685,
0.07377207279205322,
0.015366483479738235,
0.2095656394958496,
-0.18247056007385254,
-0.2798668146133423,
-0.25741878151893616,
-0.2404295951128006,
0.026105541735887527,
0.14199481904506683,
0.13576915860176086,
-0.5905315279960632,
0.30728012323379517,
0.1618921160697937,
-0.10440874099731445,
-0.19780109822750092,
-0.19078490138053894,
0.05615583434700966,
-0.06343594938516617,
0.3909296691417694,
-0.03632204979658127,
0.08320415765047073,
0.24364373087882996,
-0.3264555335044861,
-0.10491850227117538,
0.04689726233482361,
-0.09145095199346542,
-0.4455202519893646,
-0.10748015344142914,
0.12819531559944153,
-0.3193679451942444,
0.24109573662281036,
-0.5857294201850891,
0.2032507359981537,
0.2655174732208252,
-0.1589484065771103,
-0.0678890272974968,
0.05161384120583534,
-0.18980126082897186,
-0.1673014909029007,
0.3837369978427887,
0.5222494006156921,
-0.12518081068992615,
-0.35862430930137634,
-0.022541478276252747,
-0.3069389760494232,
0.016417115926742554,
0.14528264105319977,
-0.06198131665587425,
0.19296173751354218,
-0.21238744258880615,
0.07473480701446533,
-0.023920871317386627,
-0.025269895792007446,
-0.24318084120750427,
0.22580470144748688,
-0.13029557466506958,
0.3396966755390167,
-0.06413405388593674,
-0.015721431002020836,
0.27362480759620667,
-0.20227696001529694,
0.18575304746627808,
0.16702808439731598,
-0.16668269038200378,
0.13863396644592285,
-0.34703320264816284,
-0.23735952377319336,
-0.10490931570529938,
0.18546830117702484,
-0.09364679455757141,
0.28176218271255493,
0.02594173699617386,
0.16875234246253967,
0.1592182219028473,
-0.07335029542446136,
0.1880529522895813,
0.47125566005706787,
0.2186751514673233,
0.04246353358030319,
-0.1423347294330597,
-0.28257590532302856,
-0.7540937066078186,
0.2959003150463104,
0.2599126100540161,
0.18756505846977234,
-0.055514171719551086,
-0.11318711191415787,
-0.39627915620803833,
0.148609921336174,
-0.18907909095287323,
-0.14033323526382446,
-0.020623615011572838,
0.0873151570558548,
0.20489585399627686,
0.17420955002307892,
-0.2787225544452667,
0.5823856592178345,
-0.3830776512622833,
0.19699181616306305,
-0.4865703582763672,
0.35415568947792053,
-0.0385446771979332,
-0.2975667119026184,
0.17345863580703735,
0.14655275642871857,
0.09856440126895905,
-0.21574154496192932,
-0.08552692085504532,
0.4313356280326843,
-0.10947543382644653,
0.2146150916814804,
-0.18704256415367126,
-0.061639800667762756,
0.18928800523281097,
-0.11946536600589752,
-0.1445121169090271,
0.29352620244026184,
0.19465768337249756,
-0.03661034256219864,
-0.24168360233306885,
0.5297573804855347,
-0.08659380674362183,
0.11227358132600784,
-0.0639224424958229,
-0.03579722344875336,
0.15876054763793945,
0.11048398911952972,
-0.16625191271305084,
-0.2655973434448242,
0.17822737991809845,
-0.07219575345516205,
0.3827269375324249,
0.0009665451943874359,
-0.39090806245803833,
0.050951965153217316,
0.31724289059638977,
0.0394231341779232,
-0.21955657005310059,
0.26238736510276794,
-0.23541268706321716,
-0.21620827913284302,
0.09621983766555786,
0.2464313954114914,
0.3757237493991852,
0.10762155801057816,
-0.11301486194133759,
0.13989807665348053,
-0.106153704226017,
-0.06259608268737793,
0.228286013007164,
-0.06201201677322388,
0.09524371474981308,
0.1629069745540619,
-0.048402804881334305,
0.053720030933618546,
-0.26213064789772034,
0.02057432383298874,
-0.08415178954601288,
0.3441903293132782,
-0.6843589544296265,
-0.016046833246946335,
-0.09234452992677689,
-0.21559831500053406,
-0.14569838345050812,
0.00046013761311769485,
-0.36442142724990845,
-0.2601059675216675,
-0.11828868091106415,
0.35222917795181274,
-0.2164633721113205,
0.19175486266613007,
0.06163820996880531,
0.3338760733604431,
0.10552512109279633,
0.030539346858859062,
-0.3444615602493286,
-0.23550669848918915,
-0.23459270596504211,
-0.02430449239909649,
0.24320213496685028,
-0.07818304747343063,
0.28294745087623596,
-0.33926212787628174,
-0.28871434926986694,
-0.22487540543079376,
-0.1558300405740738,
0.10749362409114838,
-0.3402235507965088,
0.5670412182807922,
0.03128959238529205,
0.4133981466293335,
0.12277340888977051,
-0.21571289002895355,
0.32833003997802734,
-0.10754362493753433,
-0.40166833996772766,
-0.021240614354610443,
0.11864785104990005,
0.07198207825422287,
-0.2660396695137024,
-0.10599026829004288,
-0.03393255174160004,
-0.3536131680011749,
0.3357046842575073,
-0.10986769199371338,
0.10736978054046631,
0.28193211555480957,
0.14252841472625732,
0.2572067379951477,
-0.09576261043548584,
0.0549730509519577,
-0.11959713697433472,
-0.599755048751831,
0.12048792093992233,
-0.228473499417305,
-0.32017260789871216,
0.07496742904186249,
0.02903776988387108,
-0.05229729786515236,
0.1102556362748146,
-0.44346725940704346,
-0.07445394992828369,
0.08964697271585464,
0.10504110157489777,
0.002492554485797882,
-0.21113212406635284,
0.10598692297935486,
-0.015262112021446228,
0.061156101524829865,
-0.1928054690361023,
-0.3233874440193176,
0.0526704266667366,
-0.007030438631772995,
0.17757219076156616,
0.09964314103126526,
0.5407940149307251,
-0.12842002511024475,
0.7764057517051697,
0.6103956699371338,
-0.05036955699324608,
0.2803941071033478,
-0.251946359872818,
0.43508440256118774,
-0.27599650621414185,
-0.23476383090019226,
0.12442047148942947,
0.023042738437652588,
-0.04954878240823746,
0.16136817634105682,
0.13542596995830536,
0.1488121896982193,
-0.19075249135494232,
-0.02271508425474167,
-0.33737897872924805,
-0.31601762771606445,
-0.07928640395402908,
-0.1820306032896042,
0.2985343635082245,
0.06934966146945953,
0.1364256739616394,
0.012794002890586853,
-0.10508593916893005,
-0.19976294040679932,
0.2907159924507141,
0.17146217823028564,
-0.004622935317456722,
-0.28243324160575867,
0.3092584013938904,
-0.5356295704841614,
0.17256098985671997,
0.10804703086614609,
0.20270179212093353,
-0.07074221223592758,
-0.05392160639166832,
-0.00964038074016571,
-0.053729746490716934,
0.5436320304870605,
-0.05554192513227463,
0.2044299989938736,
0.1880374699831009,
-0.03846091404557228,
-0.5903502702713013,
0.03264098986983299,
0.09162141382694244,
0.1268557757139206,
0.20061692595481873,
0.6637795567512512,
-0.5139530897140503,
-0.2763478457927704,
0.248619943857193,
0.1979115754365921,
0.013273488730192184,
0.00417931005358696,
-0.17807458341121674,
-0.1737672984600067,
-0.2988329529762268,
0.069007508456707,
0.10277602821588516,
0.31568095088005066,
-0.03972060978412628,
0.13194571435451508,
-0.09170167148113251,
0.1904798448085785,
-0.1022440493106842,
-0.027351897209882736,
0.44098567962646484,
-0.11639685183763504,
0.5029733180999756,
0.19052036106586456,
-0.18056179583072662,
0.29990994930267334,
0.7375673651695251,
0.12129122018814087,
-0.2579021453857422,
-0.038160428404808044,
0.11998607218265533,
-0.022154338657855988,
0.4536016583442688,
0.037467580288648605,
-0.09226828068494797,
0.4712859094142914,
0.2990803122520447,
-0.4449567496776581,
0.19291651248931885,
0.20879317820072174,
-0.1328776329755783,
-0.24103641510009766,
-0.4633826017379761,
0.2269277274608612,
-0.021604176610708237,
0.14879046380519867,
0.3531491756439209,
0.18047025799751282,
-0.14992386102676392,
0.03867987170815468,
-0.10337517410516739,
0.7988141775131226,
-0.008143976330757141,
0.26936009526252747,
0.5667595863342285,
-0.3033931255340576,
0.25504428148269653,
0.06843177229166031,
-0.03759347274899483,
-0.40955817699432373,
0.041588347405195236,
0.01566837914288044,
-0.06280156224966049,
0.1202865019440651,
0.08684392273426056,
-0.16109813749790192,
0.1288905143737793,
0.11581306159496307,
0.5223597288131714,
-0.08650971204042435,
0.02110002189874649,
-0.19122089445590973,
-0.1691100001335144,
-0.597387433052063,
0.10978516936302185,
-0.27334320545196533,
0.16338136792182922,
0.017969103530049324,
-0.08311944454908371,
-0.17737635970115662,
-0.27986085414886475,
-0.6108459234237671,
0.2165704071521759,
-0.08006324619054794,
-0.0021618660539388657,
0.13502220809459686,
-0.3413681983947754,
-0.03681357204914093,
0.13210941851139069,
0.1700543463230133,
-0.03929365053772926,
-0.23494526743888855,
0.18415232002735138,
-0.37828463315963745,
0.042690977454185486,
-0.03258126229047775,
0.05479396879673004,
0.26734620332717896,
-0.09042142331600189,
0.02180815488100052,
-0.10008852928876877,
-0.46101829409599304,
-0.27980154752731323,
0.17110994458198547,
0.13169579207897186,
-0.3908904194831848,
-0.21135465800762177,
-0.3004835844039917,
0.09631256014108658,
0.249923974275589,
-0.4295208752155304,
0.0771661251783371,
0.08317254483699799,
0.001472030533477664,
-0.029644399881362915,
-0.1501171737909317,
-0.3371743857860565,
-0.17628973722457886,
0.6996058225631714,
-0.20662394165992737,
0.05694393813610077,
0.5159640312194824,
0.21232037246227264,
-0.058095477521419525,
-0.15069085359573364,
0.2013435661792755,
0.22733502089977264,
-0.7285991907119751,
0.4037943184375763,
-0.13236422836780548,
0.13110573589801788,
-0.04556962847709656,
0.3855845332145691,
0.12127524614334106,
-0.15415138006210327,
0.1443333923816681,
-0.2410263866186142,
-0.3101571500301361,
0.18457677960395813,
-0.070338174700737,
0.2513830363750458,
0.270295649766922,
0.10203363001346588,
-0.03496366739273071,
-0.1294597089290619,
-0.25515007972717285,
0.058281511068344116,
-0.39033323526382446,
0.10257670283317566,
0.30302920937538147,
-0.02322205901145935,
0.40260300040245056,
-0.2488381266593933,
0.025436056777834892,
0.034875061362981796,
-0.2772950232028961,
-0.10933464765548706,
-0.22464917600154877,
0.13704971969127655,
0.03377922251820564,
-0.14627507328987122,
-0.0740741714835167,
-0.003795091062784195,
-0.2764021158218384,
-0.1134752407670021,
0.34578272700309753,
0.24251243472099304,
0.02936854213476181,
0.0004338044673204422,
0.21882247924804688,
0.21560561656951904,
-0.13411134481430054,
0.026871059089899063,
-0.04448205232620239,
0.3514642119407654,
-0.04203617200255394,
0.1929512470960617,
-0.18828019499778748,
-0.0641360729932785,
-0.18381862342357635,
0.2321184277534485,
0.04664383828639984,
-0.03546823561191559,
0.47323259711265564,
-0.4008561372756958,
-0.019676504656672478,
0.22133523225784302,
0.34019148349761963,
0.3618514835834503,
-0.20424827933311462,
-0.03444105386734009,
0.06952781230211258,
0.06266377121210098,
-0.08455561101436615,
0.02031436190009117,
0.1804070919752121,
-0.04732669144868851,
-0.0629875510931015,
0.1145872101187706,
0.03640731796622276,
0.08584246039390564,
-0.0351928249001503,
0.21072015166282654,
0.5775513648986816,
0.16190902888774872,
0.31874585151672363,
0.21615222096443176,
-0.011864736676216125,
0.15059883892536163,
-0.013450952246785164,
0.1125761866569519,
0.3454400897026062,
0.0014117136597633362,
-0.1349445879459381,
0.05958843231201172,
-0.06458193808794022,
0.28901341557502747,
0.014996767044067383,
-0.3909645974636078,
-0.10718932747840881,
0.1761271357536316,
-0.28594502806663513,
0.14075039327144623,
0.04950511455535889,
0.5517999529838562,
-0.38735878467559814,
-0.2041415125131607,
-0.0958382710814476,
0.25274062156677246,
-0.08020644634962082,
0.000054924748837947845,
-0.11744601279497147,
-0.17026855051517487,
-0.12922954559326172,
0.15814150869846344,
-0.16648471355438232,
-0.010736778378486633,
0.2588706612586975,
0.03455125167965889,
-0.03932102024555206,
-0.4313390552997589,
0.022208821028470993,
0.2907595634460449,
0.15998154878616333,
-0.1903262585401535,
0.3252948820590973,
0.26577824354171753,
-0.09352424740791321,
0.21821095049381256,
0.379281610250473,
0.6300908923149109,
0.06740862131118774,
0.20235054194927216,
0.019340384751558304,
0.22638623416423798,
-0.021847721189260483,
0.06703200191259384,
0.2577468752861023,
0.16068020462989807,
0.00008205696940422058,
0.33549243211746216,
0.08515045046806335,
-0.1007281094789505,
0.009932514280080795,
-0.03329922631382942,
0.3402625620365143,
-0.30160069465637207,
0.27865520119667053,
-0.3910883963108063,
-0.10177236795425415,
-0.11397586762905121,
-0.051369212567806244,
-0.12958265841007233,
0.1622609794139862,
0.17722256481647491,
0.098089300096035,
0.07020414620637894,
-0.11736191064119339,
0.06292615085840225,
0.04868491739034653,
0.6603038311004639,
0.3783593475818634,
-0.06754446774721146,
-0.19771148264408112,
-0.43100643157958984,
-0.6669738292694092,
-0.11719740182161331,
-0.13711246848106384,
0.25901779532432556,
0.2541532516479492,
0.1274634152650833,
-0.02068977802991867,
0.1233287826180458,
0.06567972898483276,
-0.3689911365509033,
-0.06679732352495193,
0.06043580546975136,
-0.2554960548877716,
-0.08794905245304108,
0.03324210271239281,
-0.05801495909690857,
0.05541164427995682,
-0.2442149817943573,
0.2499694526195526,
-0.027928486466407776,
-0.0731578916311264,
0.10527726262807846,
0.11150729656219482,
-0.09685234725475311,
-0.41939324140548706,
0.3021272122859955,
-0.04910378158092499,
-0.06560026109218597,
-0.02698960341513157,
-0.36334508657455444,
-0.27452877163887024,
-0.22744354605674744,
-0.1761534959077835,
0.1650976836681366,
-0.19308479130268097,
0.6510999202728271,
-0.22150272130966187,
-0.02466907724738121,
-0.34624236822128296,
0.16149333119392395,
0.1547941416501999,
0.09203051775693893,
-0.21108365058898926,
0.17863811552524567,
-0.2431105375289917,
0.2337968498468399,
0.17578117549419403,
0.12056784331798553,
-0.09241436421871185,
0.3693394958972931,
-0.2831079065799713,
-0.2887561619281769,
0.547147274017334,
-0.14137068390846252,
-0.07126519083976746,
0.1583806872367859,
0.04386146366596222,
0.22981330752372742,
-0.3831351399421692,
-0.7105954885482788,
0.13267678022384644,
0.39288127422332764,
-0.19102269411087036,
-0.20504648983478546,
0.0822456032037735,
-0.10183346271514893,
0.011967208236455917,
0.03757890686392784,
0.1754949986934662,
0.06469011306762695,
-0.182908833026886,
0.3985804617404938,
-0.17636391520500183
] |
https://github.com/huggingface/datasets/issues/5422 | Datasets load error for saved github issues | Hi @folterj , I faced same issue while creating `issues_dataset` (https://huggingface.co/learn/nlp-course/chapter5/5?fw=pt). The fix which worked for me was loading the *.jsonl file as pd.read_json and then converting it into a Dataset using datasets API.
```
import pandas as pd
df=pd.read_json("datasets-issues.jsonl", lines=True)
df.head()
from datasets import Dataset
issues_dataset = Dataset.from_pandas(df)
issues_dataset
sample = issues_dataset.shuffle(seed=666).select(range(3))
sample[0]
``` | ### Describe the bug
Loading a previously downloaded & saved dataset as described in the HuggingFace course:
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
Gives this error:
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
A work-around I found was to use streaming.
### Steps to reproduce the bug
Reproduce by executing the code provided:
https://huggingface.co/course/chapter5/5?fw=pt
From the heading:
'let’s create a function that can download all the issues from a GitHub repository'
### Expected behavior
No error
### Environment info
Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp).
**[EDIT]**
This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`)
```
Using custom data configuration default-950028611d2860c8
Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51...
Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s]
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s]
Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last):
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table
pa_table = table_cast(pa_table, self._schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast
return cast_table_to_schema(table, schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp>
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type timestamp[s] to null
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module>
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset
builder_instance.download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare
self._download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
Generating train split: 2619 examples [00:19, 7155.72 examples/s]
``` | 55 | Datasets load error for saved github issues
### Describe the bug
Loading a previously downloaded & saved dataset as described in the HuggingFace course:
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
Gives this error:
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
A work-around I found was to use streaming.
### Steps to reproduce the bug
Reproduce by executing the code provided:
https://huggingface.co/course/chapter5/5?fw=pt
From the heading:
'let’s create a function that can download all the issues from a GitHub repository'
### Expected behavior
No error
### Environment info
Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp).
**[EDIT]**
This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`)
```
Using custom data configuration default-950028611d2860c8
Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51...
Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s]
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s]
Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last):
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table
pa_table = table_cast(pa_table, self._schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast
return cast_table_to_schema(table, schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp>
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type timestamp[s] to null
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module>
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset
builder_instance.download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare
self._download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
Generating train split: 2619 examples [00:19, 7155.72 examples/s]
```
Hi @folterj , I faced same issue while creating `issues_dataset` (https://huggingface.co/learn/nlp-course/chapter5/5?fw=pt). The fix which worked for me was loading the *.jsonl file as pd.read_json and then converting it into a Dataset using datasets API.
```
import pandas as pd
df=pd.read_json("datasets-issues.jsonl", lines=True)
df.head()
from datasets import Dataset
issues_dataset = Dataset.from_pandas(df)
issues_dataset
sample = issues_dataset.shuffle(seed=666).select(range(3))
sample[0]
``` | [
-0.4710150957107544,
0.07906512916088104,
0.059535037726163864,
0.4664856791496277,
0.22032460570335388,
0.09920280426740646,
0.3799690008163452,
0.2986510694026947,
0.09120248258113861,
-0.014517247676849365,
0.041823916137218475,
0.09861104935407639,
-0.28378358483314514,
0.18024848401546478,
0.02369016781449318,
-0.13746581971645355,
0.05341869965195656,
0.12191446125507355,
-0.07544931769371033,
0.25002288818359375,
-0.10295635461807251,
0.2531818151473999,
-0.22357182204723358,
-0.08464734256267548,
-0.2708287537097931,
-0.025525780394673347,
0.054685212671756744,
0.3749394714832306,
-0.010557318106293678,
-0.40976569056510925,
0.27910488843917847,
-0.037118006497621536,
0.026367206126451492,
0.6492112278938293,
-0.00012075250560883433,
0.15625952184200287,
0.3618277907371521,
-0.189560204744339,
-0.5131369233131409,
-0.14753328263759613,
-0.1677110344171524,
0.0008539948612451553,
0.05150127410888672,
-0.16494418680667877,
-0.23667141795158386,
0.18253576755523682,
-0.05174309015274048,
-0.39248010516166687,
0.5979457497596741,
0.5063511729240417,
0.148142009973526,
0.6537630558013916,
0.18979522585868835,
-0.07199627161026001,
0.25783368945121765,
0.1898990273475647,
-0.13888318836688995,
0.4292421340942383,
0.07501010596752167,
0.11377832293510437,
0.06625844538211823,
0.2724989354610443,
-0.06634990125894547,
-0.10827499628067017,
0.39812329411506653,
0.02122257649898529,
-0.13256603479385376,
-0.19404536485671997,
-0.12143302708864212,
0.1824284791946411,
0.2765694856643677,
-0.2729957699775696,
-0.493316650390625,
-0.5837548971176147,
0.04941359907388687,
-0.10022807121276855,
0.24763953685760498,
0.2650580108165741,
-0.18652668595314026,
0.20645977556705475,
-0.4778006970882416,
-0.08270129561424255,
-0.2502595782279968,
0.0036613494157791138,
0.42531296610832214,
-0.17101559042930603,
-0.25693756341934204,
0.13060401380062103,
-0.0962887704372406,
-0.04340263456106186,
-0.24059005081653595,
-0.27743619680404663,
-0.12200257182121277,
0.30824774503707886,
-0.20565609633922577,
-0.05657880753278732,
0.0728505551815033,
-0.07156803458929062,
0.25112059712409973,
0.1722176969051361,
-0.06515343487262726,
0.02900616265833378,
0.06986847519874573,
-0.030411213636398315,
0.4080553650856018,
0.18176385760307312,
0.07586324959993362,
0.02874964475631714,
0.22332923114299774,
0.3678697943687439,
0.06951509416103363,
-0.06710603088140488,
-0.03096722438931465,
0.050705164670944214,
-0.21029406785964966,
-0.15924522280693054,
0.4278433322906494,
-0.24701209366321564,
-0.30605587363243103,
0.16668394207954407,
-0.23548623919487,
-0.040937718003988266,
0.12534743547439575,
0.3848901391029358,
-0.170050248503685,
0.07377207279205322,
0.015366483479738235,
0.2095656394958496,
-0.18247056007385254,
-0.2798668146133423,
-0.25741878151893616,
-0.2404295951128006,
0.026105541735887527,
0.14199481904506683,
0.13576915860176086,
-0.5905315279960632,
0.30728012323379517,
0.1618921160697937,
-0.10440874099731445,
-0.19780109822750092,
-0.19078490138053894,
0.05615583434700966,
-0.06343594938516617,
0.3909296691417694,
-0.03632204979658127,
0.08320415765047073,
0.24364373087882996,
-0.3264555335044861,
-0.10491850227117538,
0.04689726233482361,
-0.09145095199346542,
-0.4455202519893646,
-0.10748015344142914,
0.12819531559944153,
-0.3193679451942444,
0.24109573662281036,
-0.5857294201850891,
0.2032507359981537,
0.2655174732208252,
-0.1589484065771103,
-0.0678890272974968,
0.05161384120583534,
-0.18980126082897186,
-0.1673014909029007,
0.3837369978427887,
0.5222494006156921,
-0.12518081068992615,
-0.35862430930137634,
-0.022541478276252747,
-0.3069389760494232,
0.016417115926742554,
0.14528264105319977,
-0.06198131665587425,
0.19296173751354218,
-0.21238744258880615,
0.07473480701446533,
-0.023920871317386627,
-0.025269895792007446,
-0.24318084120750427,
0.22580470144748688,
-0.13029557466506958,
0.3396966755390167,
-0.06413405388593674,
-0.015721431002020836,
0.27362480759620667,
-0.20227696001529694,
0.18575304746627808,
0.16702808439731598,
-0.16668269038200378,
0.13863396644592285,
-0.34703320264816284,
-0.23735952377319336,
-0.10490931570529938,
0.18546830117702484,
-0.09364679455757141,
0.28176218271255493,
0.02594173699617386,
0.16875234246253967,
0.1592182219028473,
-0.07335029542446136,
0.1880529522895813,
0.47125566005706787,
0.2186751514673233,
0.04246353358030319,
-0.1423347294330597,
-0.28257590532302856,
-0.7540937066078186,
0.2959003150463104,
0.2599126100540161,
0.18756505846977234,
-0.055514171719551086,
-0.11318711191415787,
-0.39627915620803833,
0.148609921336174,
-0.18907909095287323,
-0.14033323526382446,
-0.020623615011572838,
0.0873151570558548,
0.20489585399627686,
0.17420955002307892,
-0.2787225544452667,
0.5823856592178345,
-0.3830776512622833,
0.19699181616306305,
-0.4865703582763672,
0.35415568947792053,
-0.0385446771979332,
-0.2975667119026184,
0.17345863580703735,
0.14655275642871857,
0.09856440126895905,
-0.21574154496192932,
-0.08552692085504532,
0.4313356280326843,
-0.10947543382644653,
0.2146150916814804,
-0.18704256415367126,
-0.061639800667762756,
0.18928800523281097,
-0.11946536600589752,
-0.1445121169090271,
0.29352620244026184,
0.19465768337249756,
-0.03661034256219864,
-0.24168360233306885,
0.5297573804855347,
-0.08659380674362183,
0.11227358132600784,
-0.0639224424958229,
-0.03579722344875336,
0.15876054763793945,
0.11048398911952972,
-0.16625191271305084,
-0.2655973434448242,
0.17822737991809845,
-0.07219575345516205,
0.3827269375324249,
0.0009665451943874359,
-0.39090806245803833,
0.050951965153217316,
0.31724289059638977,
0.0394231341779232,
-0.21955657005310059,
0.26238736510276794,
-0.23541268706321716,
-0.21620827913284302,
0.09621983766555786,
0.2464313954114914,
0.3757237493991852,
0.10762155801057816,
-0.11301486194133759,
0.13989807665348053,
-0.106153704226017,
-0.06259608268737793,
0.228286013007164,
-0.06201201677322388,
0.09524371474981308,
0.1629069745540619,
-0.048402804881334305,
0.053720030933618546,
-0.26213064789772034,
0.02057432383298874,
-0.08415178954601288,
0.3441903293132782,
-0.6843589544296265,
-0.016046833246946335,
-0.09234452992677689,
-0.21559831500053406,
-0.14569838345050812,
0.00046013761311769485,
-0.36442142724990845,
-0.2601059675216675,
-0.11828868091106415,
0.35222917795181274,
-0.2164633721113205,
0.19175486266613007,
0.06163820996880531,
0.3338760733604431,
0.10552512109279633,
0.030539346858859062,
-0.3444615602493286,
-0.23550669848918915,
-0.23459270596504211,
-0.02430449239909649,
0.24320213496685028,
-0.07818304747343063,
0.28294745087623596,
-0.33926212787628174,
-0.28871434926986694,
-0.22487540543079376,
-0.1558300405740738,
0.10749362409114838,
-0.3402235507965088,
0.5670412182807922,
0.03128959238529205,
0.4133981466293335,
0.12277340888977051,
-0.21571289002895355,
0.32833003997802734,
-0.10754362493753433,
-0.40166833996772766,
-0.021240614354610443,
0.11864785104990005,
0.07198207825422287,
-0.2660396695137024,
-0.10599026829004288,
-0.03393255174160004,
-0.3536131680011749,
0.3357046842575073,
-0.10986769199371338,
0.10736978054046631,
0.28193211555480957,
0.14252841472625732,
0.2572067379951477,
-0.09576261043548584,
0.0549730509519577,
-0.11959713697433472,
-0.599755048751831,
0.12048792093992233,
-0.228473499417305,
-0.32017260789871216,
0.07496742904186249,
0.02903776988387108,
-0.05229729786515236,
0.1102556362748146,
-0.44346725940704346,
-0.07445394992828369,
0.08964697271585464,
0.10504110157489777,
0.002492554485797882,
-0.21113212406635284,
0.10598692297935486,
-0.015262112021446228,
0.061156101524829865,
-0.1928054690361023,
-0.3233874440193176,
0.0526704266667366,
-0.007030438631772995,
0.17757219076156616,
0.09964314103126526,
0.5407940149307251,
-0.12842002511024475,
0.7764057517051697,
0.6103956699371338,
-0.05036955699324608,
0.2803941071033478,
-0.251946359872818,
0.43508440256118774,
-0.27599650621414185,
-0.23476383090019226,
0.12442047148942947,
0.023042738437652588,
-0.04954878240823746,
0.16136817634105682,
0.13542596995830536,
0.1488121896982193,
-0.19075249135494232,
-0.02271508425474167,
-0.33737897872924805,
-0.31601762771606445,
-0.07928640395402908,
-0.1820306032896042,
0.2985343635082245,
0.06934966146945953,
0.1364256739616394,
0.012794002890586853,
-0.10508593916893005,
-0.19976294040679932,
0.2907159924507141,
0.17146217823028564,
-0.004622935317456722,
-0.28243324160575867,
0.3092584013938904,
-0.5356295704841614,
0.17256098985671997,
0.10804703086614609,
0.20270179212093353,
-0.07074221223592758,
-0.05392160639166832,
-0.00964038074016571,
-0.053729746490716934,
0.5436320304870605,
-0.05554192513227463,
0.2044299989938736,
0.1880374699831009,
-0.03846091404557228,
-0.5903502702713013,
0.03264098986983299,
0.09162141382694244,
0.1268557757139206,
0.20061692595481873,
0.6637795567512512,
-0.5139530897140503,
-0.2763478457927704,
0.248619943857193,
0.1979115754365921,
0.013273488730192184,
0.00417931005358696,
-0.17807458341121674,
-0.1737672984600067,
-0.2988329529762268,
0.069007508456707,
0.10277602821588516,
0.31568095088005066,
-0.03972060978412628,
0.13194571435451508,
-0.09170167148113251,
0.1904798448085785,
-0.1022440493106842,
-0.027351897209882736,
0.44098567962646484,
-0.11639685183763504,
0.5029733180999756,
0.19052036106586456,
-0.18056179583072662,
0.29990994930267334,
0.7375673651695251,
0.12129122018814087,
-0.2579021453857422,
-0.038160428404808044,
0.11998607218265533,
-0.022154338657855988,
0.4536016583442688,
0.037467580288648605,
-0.09226828068494797,
0.4712859094142914,
0.2990803122520447,
-0.4449567496776581,
0.19291651248931885,
0.20879317820072174,
-0.1328776329755783,
-0.24103641510009766,
-0.4633826017379761,
0.2269277274608612,
-0.021604176610708237,
0.14879046380519867,
0.3531491756439209,
0.18047025799751282,
-0.14992386102676392,
0.03867987170815468,
-0.10337517410516739,
0.7988141775131226,
-0.008143976330757141,
0.26936009526252747,
0.5667595863342285,
-0.3033931255340576,
0.25504428148269653,
0.06843177229166031,
-0.03759347274899483,
-0.40955817699432373,
0.041588347405195236,
0.01566837914288044,
-0.06280156224966049,
0.1202865019440651,
0.08684392273426056,
-0.16109813749790192,
0.1288905143737793,
0.11581306159496307,
0.5223597288131714,
-0.08650971204042435,
0.02110002189874649,
-0.19122089445590973,
-0.1691100001335144,
-0.597387433052063,
0.10978516936302185,
-0.27334320545196533,
0.16338136792182922,
0.017969103530049324,
-0.08311944454908371,
-0.17737635970115662,
-0.27986085414886475,
-0.6108459234237671,
0.2165704071521759,
-0.08006324619054794,
-0.0021618660539388657,
0.13502220809459686,
-0.3413681983947754,
-0.03681357204914093,
0.13210941851139069,
0.1700543463230133,
-0.03929365053772926,
-0.23494526743888855,
0.18415232002735138,
-0.37828463315963745,
0.042690977454185486,
-0.03258126229047775,
0.05479396879673004,
0.26734620332717896,
-0.09042142331600189,
0.02180815488100052,
-0.10008852928876877,
-0.46101829409599304,
-0.27980154752731323,
0.17110994458198547,
0.13169579207897186,
-0.3908904194831848,
-0.21135465800762177,
-0.3004835844039917,
0.09631256014108658,
0.249923974275589,
-0.4295208752155304,
0.0771661251783371,
0.08317254483699799,
0.001472030533477664,
-0.029644399881362915,
-0.1501171737909317,
-0.3371743857860565,
-0.17628973722457886,
0.6996058225631714,
-0.20662394165992737,
0.05694393813610077,
0.5159640312194824,
0.21232037246227264,
-0.058095477521419525,
-0.15069085359573364,
0.2013435661792755,
0.22733502089977264,
-0.7285991907119751,
0.4037943184375763,
-0.13236422836780548,
0.13110573589801788,
-0.04556962847709656,
0.3855845332145691,
0.12127524614334106,
-0.15415138006210327,
0.1443333923816681,
-0.2410263866186142,
-0.3101571500301361,
0.18457677960395813,
-0.070338174700737,
0.2513830363750458,
0.270295649766922,
0.10203363001346588,
-0.03496366739273071,
-0.1294597089290619,
-0.25515007972717285,
0.058281511068344116,
-0.39033323526382446,
0.10257670283317566,
0.30302920937538147,
-0.02322205901145935,
0.40260300040245056,
-0.2488381266593933,
0.025436056777834892,
0.034875061362981796,
-0.2772950232028961,
-0.10933464765548706,
-0.22464917600154877,
0.13704971969127655,
0.03377922251820564,
-0.14627507328987122,
-0.0740741714835167,
-0.003795091062784195,
-0.2764021158218384,
-0.1134752407670021,
0.34578272700309753,
0.24251243472099304,
0.02936854213476181,
0.0004338044673204422,
0.21882247924804688,
0.21560561656951904,
-0.13411134481430054,
0.026871059089899063,
-0.04448205232620239,
0.3514642119407654,
-0.04203617200255394,
0.1929512470960617,
-0.18828019499778748,
-0.0641360729932785,
-0.18381862342357635,
0.2321184277534485,
0.04664383828639984,
-0.03546823561191559,
0.47323259711265564,
-0.4008561372756958,
-0.019676504656672478,
0.22133523225784302,
0.34019148349761963,
0.3618514835834503,
-0.20424827933311462,
-0.03444105386734009,
0.06952781230211258,
0.06266377121210098,
-0.08455561101436615,
0.02031436190009117,
0.1804070919752121,
-0.04732669144868851,
-0.0629875510931015,
0.1145872101187706,
0.03640731796622276,
0.08584246039390564,
-0.0351928249001503,
0.21072015166282654,
0.5775513648986816,
0.16190902888774872,
0.31874585151672363,
0.21615222096443176,
-0.011864736676216125,
0.15059883892536163,
-0.013450952246785164,
0.1125761866569519,
0.3454400897026062,
0.0014117136597633362,
-0.1349445879459381,
0.05958843231201172,
-0.06458193808794022,
0.28901341557502747,
0.014996767044067383,
-0.3909645974636078,
-0.10718932747840881,
0.1761271357536316,
-0.28594502806663513,
0.14075039327144623,
0.04950511455535889,
0.5517999529838562,
-0.38735878467559814,
-0.2041415125131607,
-0.0958382710814476,
0.25274062156677246,
-0.08020644634962082,
0.000054924748837947845,
-0.11744601279497147,
-0.17026855051517487,
-0.12922954559326172,
0.15814150869846344,
-0.16648471355438232,
-0.010736778378486633,
0.2588706612586975,
0.03455125167965889,
-0.03932102024555206,
-0.4313390552997589,
0.022208821028470993,
0.2907595634460449,
0.15998154878616333,
-0.1903262585401535,
0.3252948820590973,
0.26577824354171753,
-0.09352424740791321,
0.21821095049381256,
0.379281610250473,
0.6300908923149109,
0.06740862131118774,
0.20235054194927216,
0.019340384751558304,
0.22638623416423798,
-0.021847721189260483,
0.06703200191259384,
0.2577468752861023,
0.16068020462989807,
0.00008205696940422058,
0.33549243211746216,
0.08515045046806335,
-0.1007281094789505,
0.009932514280080795,
-0.03329922631382942,
0.3402625620365143,
-0.30160069465637207,
0.27865520119667053,
-0.3910883963108063,
-0.10177236795425415,
-0.11397586762905121,
-0.051369212567806244,
-0.12958265841007233,
0.1622609794139862,
0.17722256481647491,
0.098089300096035,
0.07020414620637894,
-0.11736191064119339,
0.06292615085840225,
0.04868491739034653,
0.6603038311004639,
0.3783593475818634,
-0.06754446774721146,
-0.19771148264408112,
-0.43100643157958984,
-0.6669738292694092,
-0.11719740182161331,
-0.13711246848106384,
0.25901779532432556,
0.2541532516479492,
0.1274634152650833,
-0.02068977802991867,
0.1233287826180458,
0.06567972898483276,
-0.3689911365509033,
-0.06679732352495193,
0.06043580546975136,
-0.2554960548877716,
-0.08794905245304108,
0.03324210271239281,
-0.05801495909690857,
0.05541164427995682,
-0.2442149817943573,
0.2499694526195526,
-0.027928486466407776,
-0.0731578916311264,
0.10527726262807846,
0.11150729656219482,
-0.09685234725475311,
-0.41939324140548706,
0.3021272122859955,
-0.04910378158092499,
-0.06560026109218597,
-0.02698960341513157,
-0.36334508657455444,
-0.27452877163887024,
-0.22744354605674744,
-0.1761534959077835,
0.1650976836681366,
-0.19308479130268097,
0.6510999202728271,
-0.22150272130966187,
-0.02466907724738121,
-0.34624236822128296,
0.16149333119392395,
0.1547941416501999,
0.09203051775693893,
-0.21108365058898926,
0.17863811552524567,
-0.2431105375289917,
0.2337968498468399,
0.17578117549419403,
0.12056784331798553,
-0.09241436421871185,
0.3693394958972931,
-0.2831079065799713,
-0.2887561619281769,
0.547147274017334,
-0.14137068390846252,
-0.07126519083976746,
0.1583806872367859,
0.04386146366596222,
0.22981330752372742,
-0.3831351399421692,
-0.7105954885482788,
0.13267678022384644,
0.39288127422332764,
-0.19102269411087036,
-0.20504648983478546,
0.0822456032037735,
-0.10183346271514893,
0.011967208236455917,
0.03757890686392784,
0.1754949986934662,
0.06469011306762695,
-0.182908833026886,
0.3985804617404938,
-0.17636391520500183
] |
https://github.com/huggingface/datasets/issues/5422 | Datasets load error for saved github issues | I understand some work-around suggestions would be to not use load_dataset(), and instead using a different API function. Another alternative would be using the same function using streaming, as I had already suggested in my original post.
However, the fact remains that there is an issue in this function as reported. | ### Describe the bug
Loading a previously downloaded & saved dataset as described in the HuggingFace course:
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
Gives this error:
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
A work-around I found was to use streaming.
### Steps to reproduce the bug
Reproduce by executing the code provided:
https://huggingface.co/course/chapter5/5?fw=pt
From the heading:
'let’s create a function that can download all the issues from a GitHub repository'
### Expected behavior
No error
### Environment info
Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp).
**[EDIT]**
This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`)
```
Using custom data configuration default-950028611d2860c8
Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51...
Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s]
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s]
Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last):
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table
pa_table = table_cast(pa_table, self._schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast
return cast_table_to_schema(table, schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp>
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type timestamp[s] to null
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module>
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset
builder_instance.download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare
self._download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
Generating train split: 2619 examples [00:19, 7155.72 examples/s]
``` | 51 | Datasets load error for saved github issues
### Describe the bug
Loading a previously downloaded & saved dataset as described in the HuggingFace course:
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
Gives this error:
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
A work-around I found was to use streaming.
### Steps to reproduce the bug
Reproduce by executing the code provided:
https://huggingface.co/course/chapter5/5?fw=pt
From the heading:
'let’s create a function that can download all the issues from a GitHub repository'
### Expected behavior
No error
### Environment info
Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp).
**[EDIT]**
This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`)
```
Using custom data configuration default-950028611d2860c8
Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51...
Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s]
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s]
Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last):
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table
pa_table = table_cast(pa_table, self._schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast
return cast_table_to_schema(table, schema)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp>
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp>
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp>
arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()]
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper
return func(array, *args, **kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type timestamp[s] to null
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module>
issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train")
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset
builder_instance.download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare
self._download_and_prepare(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
Generating train split: 2619 examples [00:19, 7155.72 examples/s]
```
I understand some work-around suggestions would be to not use load_dataset(), and instead using a different API function. Another alternative would be using the same function using streaming, as I had already suggested in my original post.
However, the fact remains that there is an issue in this function as reported. | [
-0.4710150957107544,
0.07906512916088104,
0.059535037726163864,
0.4664856791496277,
0.22032460570335388,
0.09920280426740646,
0.3799690008163452,
0.2986510694026947,
0.09120248258113861,
-0.014517247676849365,
0.041823916137218475,
0.09861104935407639,
-0.28378358483314514,
0.18024848401546478,
0.02369016781449318,
-0.13746581971645355,
0.05341869965195656,
0.12191446125507355,
-0.07544931769371033,
0.25002288818359375,
-0.10295635461807251,
0.2531818151473999,
-0.22357182204723358,
-0.08464734256267548,
-0.2708287537097931,
-0.025525780394673347,
0.054685212671756744,
0.3749394714832306,
-0.010557318106293678,
-0.40976569056510925,
0.27910488843917847,
-0.037118006497621536,
0.026367206126451492,
0.6492112278938293,
-0.00012075250560883433,
0.15625952184200287,
0.3618277907371521,
-0.189560204744339,
-0.5131369233131409,
-0.14753328263759613,
-0.1677110344171524,
0.0008539948612451553,
0.05150127410888672,
-0.16494418680667877,
-0.23667141795158386,
0.18253576755523682,
-0.05174309015274048,
-0.39248010516166687,
0.5979457497596741,
0.5063511729240417,
0.148142009973526,
0.6537630558013916,
0.18979522585868835,
-0.07199627161026001,
0.25783368945121765,
0.1898990273475647,
-0.13888318836688995,
0.4292421340942383,
0.07501010596752167,
0.11377832293510437,
0.06625844538211823,
0.2724989354610443,
-0.06634990125894547,
-0.10827499628067017,
0.39812329411506653,
0.02122257649898529,
-0.13256603479385376,
-0.19404536485671997,
-0.12143302708864212,
0.1824284791946411,
0.2765694856643677,
-0.2729957699775696,
-0.493316650390625,
-0.5837548971176147,
0.04941359907388687,
-0.10022807121276855,
0.24763953685760498,
0.2650580108165741,
-0.18652668595314026,
0.20645977556705475,
-0.4778006970882416,
-0.08270129561424255,
-0.2502595782279968,
0.0036613494157791138,
0.42531296610832214,
-0.17101559042930603,
-0.25693756341934204,
0.13060401380062103,
-0.0962887704372406,
-0.04340263456106186,
-0.24059005081653595,
-0.27743619680404663,
-0.12200257182121277,
0.30824774503707886,
-0.20565609633922577,
-0.05657880753278732,
0.0728505551815033,
-0.07156803458929062,
0.25112059712409973,
0.1722176969051361,
-0.06515343487262726,
0.02900616265833378,
0.06986847519874573,
-0.030411213636398315,
0.4080553650856018,
0.18176385760307312,
0.07586324959993362,
0.02874964475631714,
0.22332923114299774,
0.3678697943687439,
0.06951509416103363,
-0.06710603088140488,
-0.03096722438931465,
0.050705164670944214,
-0.21029406785964966,
-0.15924522280693054,
0.4278433322906494,
-0.24701209366321564,
-0.30605587363243103,
0.16668394207954407,
-0.23548623919487,
-0.040937718003988266,
0.12534743547439575,
0.3848901391029358,
-0.170050248503685,
0.07377207279205322,
0.015366483479738235,
0.2095656394958496,
-0.18247056007385254,
-0.2798668146133423,
-0.25741878151893616,
-0.2404295951128006,
0.026105541735887527,
0.14199481904506683,
0.13576915860176086,
-0.5905315279960632,
0.30728012323379517,
0.1618921160697937,
-0.10440874099731445,
-0.19780109822750092,
-0.19078490138053894,
0.05615583434700966,
-0.06343594938516617,
0.3909296691417694,
-0.03632204979658127,
0.08320415765047073,
0.24364373087882996,
-0.3264555335044861,
-0.10491850227117538,
0.04689726233482361,
-0.09145095199346542,
-0.4455202519893646,
-0.10748015344142914,
0.12819531559944153,
-0.3193679451942444,
0.24109573662281036,
-0.5857294201850891,
0.2032507359981537,
0.2655174732208252,
-0.1589484065771103,
-0.0678890272974968,
0.05161384120583534,
-0.18980126082897186,
-0.1673014909029007,
0.3837369978427887,
0.5222494006156921,
-0.12518081068992615,
-0.35862430930137634,
-0.022541478276252747,
-0.3069389760494232,
0.016417115926742554,
0.14528264105319977,
-0.06198131665587425,
0.19296173751354218,
-0.21238744258880615,
0.07473480701446533,
-0.023920871317386627,
-0.025269895792007446,
-0.24318084120750427,
0.22580470144748688,
-0.13029557466506958,
0.3396966755390167,
-0.06413405388593674,
-0.015721431002020836,
0.27362480759620667,
-0.20227696001529694,
0.18575304746627808,
0.16702808439731598,
-0.16668269038200378,
0.13863396644592285,
-0.34703320264816284,
-0.23735952377319336,
-0.10490931570529938,
0.18546830117702484,
-0.09364679455757141,
0.28176218271255493,
0.02594173699617386,
0.16875234246253967,
0.1592182219028473,
-0.07335029542446136,
0.1880529522895813,
0.47125566005706787,
0.2186751514673233,
0.04246353358030319,
-0.1423347294330597,
-0.28257590532302856,
-0.7540937066078186,
0.2959003150463104,
0.2599126100540161,
0.18756505846977234,
-0.055514171719551086,
-0.11318711191415787,
-0.39627915620803833,
0.148609921336174,
-0.18907909095287323,
-0.14033323526382446,
-0.020623615011572838,
0.0873151570558548,
0.20489585399627686,
0.17420955002307892,
-0.2787225544452667,
0.5823856592178345,
-0.3830776512622833,
0.19699181616306305,
-0.4865703582763672,
0.35415568947792053,
-0.0385446771979332,
-0.2975667119026184,
0.17345863580703735,
0.14655275642871857,
0.09856440126895905,
-0.21574154496192932,
-0.08552692085504532,
0.4313356280326843,
-0.10947543382644653,
0.2146150916814804,
-0.18704256415367126,
-0.061639800667762756,
0.18928800523281097,
-0.11946536600589752,
-0.1445121169090271,
0.29352620244026184,
0.19465768337249756,
-0.03661034256219864,
-0.24168360233306885,
0.5297573804855347,
-0.08659380674362183,
0.11227358132600784,
-0.0639224424958229,
-0.03579722344875336,
0.15876054763793945,
0.11048398911952972,
-0.16625191271305084,
-0.2655973434448242,
0.17822737991809845,
-0.07219575345516205,
0.3827269375324249,
0.0009665451943874359,
-0.39090806245803833,
0.050951965153217316,
0.31724289059638977,
0.0394231341779232,
-0.21955657005310059,
0.26238736510276794,
-0.23541268706321716,
-0.21620827913284302,
0.09621983766555786,
0.2464313954114914,
0.3757237493991852,
0.10762155801057816,
-0.11301486194133759,
0.13989807665348053,
-0.106153704226017,
-0.06259608268737793,
0.228286013007164,
-0.06201201677322388,
0.09524371474981308,
0.1629069745540619,
-0.048402804881334305,
0.053720030933618546,
-0.26213064789772034,
0.02057432383298874,
-0.08415178954601288,
0.3441903293132782,
-0.6843589544296265,
-0.016046833246946335,
-0.09234452992677689,
-0.21559831500053406,
-0.14569838345050812,
0.00046013761311769485,
-0.36442142724990845,
-0.2601059675216675,
-0.11828868091106415,
0.35222917795181274,
-0.2164633721113205,
0.19175486266613007,
0.06163820996880531,
0.3338760733604431,
0.10552512109279633,
0.030539346858859062,
-0.3444615602493286,
-0.23550669848918915,
-0.23459270596504211,
-0.02430449239909649,
0.24320213496685028,
-0.07818304747343063,
0.28294745087623596,
-0.33926212787628174,
-0.28871434926986694,
-0.22487540543079376,
-0.1558300405740738,
0.10749362409114838,
-0.3402235507965088,
0.5670412182807922,
0.03128959238529205,
0.4133981466293335,
0.12277340888977051,
-0.21571289002895355,
0.32833003997802734,
-0.10754362493753433,
-0.40166833996772766,
-0.021240614354610443,
0.11864785104990005,
0.07198207825422287,
-0.2660396695137024,
-0.10599026829004288,
-0.03393255174160004,
-0.3536131680011749,
0.3357046842575073,
-0.10986769199371338,
0.10736978054046631,
0.28193211555480957,
0.14252841472625732,
0.2572067379951477,
-0.09576261043548584,
0.0549730509519577,
-0.11959713697433472,
-0.599755048751831,
0.12048792093992233,
-0.228473499417305,
-0.32017260789871216,
0.07496742904186249,
0.02903776988387108,
-0.05229729786515236,
0.1102556362748146,
-0.44346725940704346,
-0.07445394992828369,
0.08964697271585464,
0.10504110157489777,
0.002492554485797882,
-0.21113212406635284,
0.10598692297935486,
-0.015262112021446228,
0.061156101524829865,
-0.1928054690361023,
-0.3233874440193176,
0.0526704266667366,
-0.007030438631772995,
0.17757219076156616,
0.09964314103126526,
0.5407940149307251,
-0.12842002511024475,
0.7764057517051697,
0.6103956699371338,
-0.05036955699324608,
0.2803941071033478,
-0.251946359872818,
0.43508440256118774,
-0.27599650621414185,
-0.23476383090019226,
0.12442047148942947,
0.023042738437652588,
-0.04954878240823746,
0.16136817634105682,
0.13542596995830536,
0.1488121896982193,
-0.19075249135494232,
-0.02271508425474167,
-0.33737897872924805,
-0.31601762771606445,
-0.07928640395402908,
-0.1820306032896042,
0.2985343635082245,
0.06934966146945953,
0.1364256739616394,
0.012794002890586853,
-0.10508593916893005,
-0.19976294040679932,
0.2907159924507141,
0.17146217823028564,
-0.004622935317456722,
-0.28243324160575867,
0.3092584013938904,
-0.5356295704841614,
0.17256098985671997,
0.10804703086614609,
0.20270179212093353,
-0.07074221223592758,
-0.05392160639166832,
-0.00964038074016571,
-0.053729746490716934,
0.5436320304870605,
-0.05554192513227463,
0.2044299989938736,
0.1880374699831009,
-0.03846091404557228,
-0.5903502702713013,
0.03264098986983299,
0.09162141382694244,
0.1268557757139206,
0.20061692595481873,
0.6637795567512512,
-0.5139530897140503,
-0.2763478457927704,
0.248619943857193,
0.1979115754365921,
0.013273488730192184,
0.00417931005358696,
-0.17807458341121674,
-0.1737672984600067,
-0.2988329529762268,
0.069007508456707,
0.10277602821588516,
0.31568095088005066,
-0.03972060978412628,
0.13194571435451508,
-0.09170167148113251,
0.1904798448085785,
-0.1022440493106842,
-0.027351897209882736,
0.44098567962646484,
-0.11639685183763504,
0.5029733180999756,
0.19052036106586456,
-0.18056179583072662,
0.29990994930267334,
0.7375673651695251,
0.12129122018814087,
-0.2579021453857422,
-0.038160428404808044,
0.11998607218265533,
-0.022154338657855988,
0.4536016583442688,
0.037467580288648605,
-0.09226828068494797,
0.4712859094142914,
0.2990803122520447,
-0.4449567496776581,
0.19291651248931885,
0.20879317820072174,
-0.1328776329755783,
-0.24103641510009766,
-0.4633826017379761,
0.2269277274608612,
-0.021604176610708237,
0.14879046380519867,
0.3531491756439209,
0.18047025799751282,
-0.14992386102676392,
0.03867987170815468,
-0.10337517410516739,
0.7988141775131226,
-0.008143976330757141,
0.26936009526252747,
0.5667595863342285,
-0.3033931255340576,
0.25504428148269653,
0.06843177229166031,
-0.03759347274899483,
-0.40955817699432373,
0.041588347405195236,
0.01566837914288044,
-0.06280156224966049,
0.1202865019440651,
0.08684392273426056,
-0.16109813749790192,
0.1288905143737793,
0.11581306159496307,
0.5223597288131714,
-0.08650971204042435,
0.02110002189874649,
-0.19122089445590973,
-0.1691100001335144,
-0.597387433052063,
0.10978516936302185,
-0.27334320545196533,
0.16338136792182922,
0.017969103530049324,
-0.08311944454908371,
-0.17737635970115662,
-0.27986085414886475,
-0.6108459234237671,
0.2165704071521759,
-0.08006324619054794,
-0.0021618660539388657,
0.13502220809459686,
-0.3413681983947754,
-0.03681357204914093,
0.13210941851139069,
0.1700543463230133,
-0.03929365053772926,
-0.23494526743888855,
0.18415232002735138,
-0.37828463315963745,
0.042690977454185486,
-0.03258126229047775,
0.05479396879673004,
0.26734620332717896,
-0.09042142331600189,
0.02180815488100052,
-0.10008852928876877,
-0.46101829409599304,
-0.27980154752731323,
0.17110994458198547,
0.13169579207897186,
-0.3908904194831848,
-0.21135465800762177,
-0.3004835844039917,
0.09631256014108658,
0.249923974275589,
-0.4295208752155304,
0.0771661251783371,
0.08317254483699799,
0.001472030533477664,
-0.029644399881362915,
-0.1501171737909317,
-0.3371743857860565,
-0.17628973722457886,
0.6996058225631714,
-0.20662394165992737,
0.05694393813610077,
0.5159640312194824,
0.21232037246227264,
-0.058095477521419525,
-0.15069085359573364,
0.2013435661792755,
0.22733502089977264,
-0.7285991907119751,
0.4037943184375763,
-0.13236422836780548,
0.13110573589801788,
-0.04556962847709656,
0.3855845332145691,
0.12127524614334106,
-0.15415138006210327,
0.1443333923816681,
-0.2410263866186142,
-0.3101571500301361,
0.18457677960395813,
-0.070338174700737,
0.2513830363750458,
0.270295649766922,
0.10203363001346588,
-0.03496366739273071,
-0.1294597089290619,
-0.25515007972717285,
0.058281511068344116,
-0.39033323526382446,
0.10257670283317566,
0.30302920937538147,
-0.02322205901145935,
0.40260300040245056,
-0.2488381266593933,
0.025436056777834892,
0.034875061362981796,
-0.2772950232028961,
-0.10933464765548706,
-0.22464917600154877,
0.13704971969127655,
0.03377922251820564,
-0.14627507328987122,
-0.0740741714835167,
-0.003795091062784195,
-0.2764021158218384,
-0.1134752407670021,
0.34578272700309753,
0.24251243472099304,
0.02936854213476181,
0.0004338044673204422,
0.21882247924804688,
0.21560561656951904,
-0.13411134481430054,
0.026871059089899063,
-0.04448205232620239,
0.3514642119407654,
-0.04203617200255394,
0.1929512470960617,
-0.18828019499778748,
-0.0641360729932785,
-0.18381862342357635,
0.2321184277534485,
0.04664383828639984,
-0.03546823561191559,
0.47323259711265564,
-0.4008561372756958,
-0.019676504656672478,
0.22133523225784302,
0.34019148349761963,
0.3618514835834503,
-0.20424827933311462,
-0.03444105386734009,
0.06952781230211258,
0.06266377121210098,
-0.08455561101436615,
0.02031436190009117,
0.1804070919752121,
-0.04732669144868851,
-0.0629875510931015,
0.1145872101187706,
0.03640731796622276,
0.08584246039390564,
-0.0351928249001503,
0.21072015166282654,
0.5775513648986816,
0.16190902888774872,
0.31874585151672363,
0.21615222096443176,
-0.011864736676216125,
0.15059883892536163,
-0.013450952246785164,
0.1125761866569519,
0.3454400897026062,
0.0014117136597633362,
-0.1349445879459381,
0.05958843231201172,
-0.06458193808794022,
0.28901341557502747,
0.014996767044067383,
-0.3909645974636078,
-0.10718932747840881,
0.1761271357536316,
-0.28594502806663513,
0.14075039327144623,
0.04950511455535889,
0.5517999529838562,
-0.38735878467559814,
-0.2041415125131607,
-0.0958382710814476,
0.25274062156677246,
-0.08020644634962082,
0.000054924748837947845,
-0.11744601279497147,
-0.17026855051517487,
-0.12922954559326172,
0.15814150869846344,
-0.16648471355438232,
-0.010736778378486633,
0.2588706612586975,
0.03455125167965889,
-0.03932102024555206,
-0.4313390552997589,
0.022208821028470993,
0.2907595634460449,
0.15998154878616333,
-0.1903262585401535,
0.3252948820590973,
0.26577824354171753,
-0.09352424740791321,
0.21821095049381256,
0.379281610250473,
0.6300908923149109,
0.06740862131118774,
0.20235054194927216,
0.019340384751558304,
0.22638623416423798,
-0.021847721189260483,
0.06703200191259384,
0.2577468752861023,
0.16068020462989807,
0.00008205696940422058,
0.33549243211746216,
0.08515045046806335,
-0.1007281094789505,
0.009932514280080795,
-0.03329922631382942,
0.3402625620365143,
-0.30160069465637207,
0.27865520119667053,
-0.3910883963108063,
-0.10177236795425415,
-0.11397586762905121,
-0.051369212567806244,
-0.12958265841007233,
0.1622609794139862,
0.17722256481647491,
0.098089300096035,
0.07020414620637894,
-0.11736191064119339,
0.06292615085840225,
0.04868491739034653,
0.6603038311004639,
0.3783593475818634,
-0.06754446774721146,
-0.19771148264408112,
-0.43100643157958984,
-0.6669738292694092,
-0.11719740182161331,
-0.13711246848106384,
0.25901779532432556,
0.2541532516479492,
0.1274634152650833,
-0.02068977802991867,
0.1233287826180458,
0.06567972898483276,
-0.3689911365509033,
-0.06679732352495193,
0.06043580546975136,
-0.2554960548877716,
-0.08794905245304108,
0.03324210271239281,
-0.05801495909690857,
0.05541164427995682,
-0.2442149817943573,
0.2499694526195526,
-0.027928486466407776,
-0.0731578916311264,
0.10527726262807846,
0.11150729656219482,
-0.09685234725475311,
-0.41939324140548706,
0.3021272122859955,
-0.04910378158092499,
-0.06560026109218597,
-0.02698960341513157,
-0.36334508657455444,
-0.27452877163887024,
-0.22744354605674744,
-0.1761534959077835,
0.1650976836681366,
-0.19308479130268097,
0.6510999202728271,
-0.22150272130966187,
-0.02466907724738121,
-0.34624236822128296,
0.16149333119392395,
0.1547941416501999,
0.09203051775693893,
-0.21108365058898926,
0.17863811552524567,
-0.2431105375289917,
0.2337968498468399,
0.17578117549419403,
0.12056784331798553,
-0.09241436421871185,
0.3693394958972931,
-0.2831079065799713,
-0.2887561619281769,
0.547147274017334,
-0.14137068390846252,
-0.07126519083976746,
0.1583806872367859,
0.04386146366596222,
0.22981330752372742,
-0.3831351399421692,
-0.7105954885482788,
0.13267678022384644,
0.39288127422332764,
-0.19102269411087036,
-0.20504648983478546,
0.0822456032037735,
-0.10183346271514893,
0.011967208236455917,
0.03757890686392784,
0.1754949986934662,
0.06469011306762695,
-0.182908833026886,
0.3985804617404938,
-0.17636391520500183
] |
https://github.com/huggingface/datasets/issues/5421 | Support case-insensitive Hub dataset name in load_dataset | Closing as case-insensitivity should be only for URL redirection on the Hub. In the APIs, we will only support the canonical name (https://github.com/huggingface/moon-landing/pull/2399#issuecomment-1382085611) | ### Feature request
The dataset name on the Hub is case-insensitive (see https://github.com/huggingface/moon-landing/pull/2399, internal issue), i.e., https://huggingface.co/datasets/GLUE redirects to https://huggingface.co/datasets/glue.
Ideally, we could load the glue dataset using the following:
```
from datasets import load_dataset
load_dataset('GLUE', 'cola')
```
It breaks because the loading script `GLUE.py` does not exist (`glue.py` should be selected instead).
Minor additional comment: in other cases without a loading script, we can load the dataset, but the automatically generated config name depends on the casing:
- `load_dataset('severo/danish-wit')` generates the config name `severo--danish-wit-e6fda5b070deb133`, while
- `load_dataset('severo/danish-WIT')` generates the config name `severo--danish-WIT-e6fda5b070deb133`
### Motivation
To follow the same UX on the Hub and in the datasets library.
### Your contribution
... | 23 | Support case-insensitive Hub dataset name in load_dataset
### Feature request
The dataset name on the Hub is case-insensitive (see https://github.com/huggingface/moon-landing/pull/2399, internal issue), i.e., https://huggingface.co/datasets/GLUE redirects to https://huggingface.co/datasets/glue.
Ideally, we could load the glue dataset using the following:
```
from datasets import load_dataset
load_dataset('GLUE', 'cola')
```
It breaks because the loading script `GLUE.py` does not exist (`glue.py` should be selected instead).
Minor additional comment: in other cases without a loading script, we can load the dataset, but the automatically generated config name depends on the casing:
- `load_dataset('severo/danish-wit')` generates the config name `severo--danish-wit-e6fda5b070deb133`, while
- `load_dataset('severo/danish-WIT')` generates the config name `severo--danish-WIT-e6fda5b070deb133`
### Motivation
To follow the same UX on the Hub and in the datasets library.
### Your contribution
...
Closing as case-insensitivity should be only for URL redirection on the Hub. In the APIs, we will only support the canonical name (https://github.com/huggingface/moon-landing/pull/2399#issuecomment-1382085611) | [
-0.060381487011909485,
-0.33880066871643066,
-0.0036617759615182877,
0.09023267030715942,
0.22566431760787964,
0.06747224181890488,
0.33013951778411865,
0.22485342621803284,
0.24623435735702515,
0.25057321786880493,
-0.3075138330459595,
0.303022176027298,
0.052757613360881805,
0.2618841528892517,
0.13723009824752808,
0.11628583073616028,
0.03642250597476959,
-0.06654360890388489,
0.015942443162202835,
0.0867692232131958,
-0.07145512849092484,
0.17410960793495178,
-0.0717633068561554,
0.21485842764377594,
-0.060004424303770065,
0.2669960558414459,
0.12224620580673218,
0.33655986189842224,
-0.28365418314933777,
-0.3706147074699402,
0.46882200241088867,
0.5569330453872681,
0.015579216182231903,
0.1117456704378128,
-0.00011047572479583323,
0.051236316561698914,
0.5271067023277283,
-0.10630708187818527,
-0.18105584383010864,
-0.20190902054309845,
-0.22258344292640686,
-0.07188285142183304,
-0.002147349063307047,
-0.12367567420005798,
-0.2325069010257721,
0.39440223574638367,
0.12349947541952133,
0.045515961945056915,
0.15014933049678802,
-0.04242996126413345,
0.18190550804138184,
0.33373409509658813,
-0.12218025326728821,
-0.030279085040092468,
0.006557457149028778,
0.1635003685951233,
-0.1772875189781189,
0.37383225560188293,
0.26064833998680115,
-0.0832386240363121,
-0.17557722330093384,
0.2180866003036499,
-0.011443175375461578,
-0.05456835404038429,
-0.07142528146505356,
-0.03048614040017128,
-0.20038899779319763,
0.04493771865963936,
0.010294446721673012,
0.45727071166038513,
0.1425001621246338,
-0.6069674491882324,
-0.5134118795394897,
-0.3229410946369171,
0.2075800746679306,
-0.06519854813814163,
0.32023561000823975,
-0.08959738910198212,
0.0704612135887146,
0.20263084769248962,
0.16518719494342804,
-0.327217161655426,
-0.18138828873634338,
0.0052501484751701355,
0.057676076889038086,
0.40570372343063354,
-0.16279473900794983,
0.062322117388248444,
0.0406046137213707,
-0.2686625123023987,
0.22370699048042297,
-0.16218732297420502,
0.09636770188808441,
-0.09367809444665909,
-0.2917182743549347,
-0.05257263779640198,
-0.0786806270480156,
0.5824207663536072,
0.3339744210243225,
0.0467635877430439,
0.10339784622192383,
0.3847618103027344,
-0.08234638720750809,
0.24976390600204468,
-0.1575344204902649,
0.11556556820869446,
0.4258856177330017,
-0.09216132014989853,
0.34151691198349,
0.2240425944328308,
0.009395208209753036,
0.16025444865226746,
-0.29380568861961365,
-0.1826106607913971,
-0.5559881329536438,
-0.2159232795238495,
0.3465215563774109,
0.0010654628276824951,
-0.2148536592721939,
-0.3136475086212158,
0.19031235575675964,
0.17758019268512726,
0.15086732804775238,
0.3320101499557495,
0.12299928069114685,
0.24098506569862366,
-0.13073253631591797,
0.30695849657058716,
-0.14519143104553223,
-0.010493011213839054,
-0.17786505818367004,
0.002267574891448021,
-0.1566881239414215,
0.2242080569267273,
0.18969616293907166,
-0.05021211877465248,
0.031230831518769264,
-0.13887156546115875,
0.06937994062900543,
-0.05985280126333237,
-0.16768106818199158,
0.26934629678726196,
0.009157039225101471,
-0.05524519458413124,
0.038508858531713486,
0.1301884651184082,
-0.10152551531791687,
-0.578589916229248,
-0.1683659851551056,
-0.034956641495227814,
-0.37205830216407776,
-0.17862333357334137,
-0.14522503316402435,
0.13178667426109314,
-0.5084955096244812,
-0.06320451945066452,
-0.2649383246898651,
0.12613753974437714,
-0.29912424087524414,
-0.1280062347650528,
0.006552405655384064,
0.13077977299690247,
-0.02237047627568245,
-0.1289650797843933,
0.2649976313114166,
0.4651838541030884,
-0.09090080112218857,
-0.2851555347442627,
-0.0295708030462265,
-0.16992123425006866,
-0.17596662044525146,
-0.10287588834762573,
-0.050594255328178406,
-0.25201669335365295,
-0.3505898416042328,
0.2564850449562073,
0.1655583381652832,
-0.7223524451255798,
-0.4311792552471161,
-0.11427173018455505,
-0.31754404306411743,
0.1604621410369873,
0.26246368885040283,
0.053122181445360184,
-0.25612524151802063,
0.036937907338142395,
0.1492433249950409,
0.31767910718917847,
0.12984409928321838,
-0.021688269451260567,
-0.08296459913253784,
-0.38078773021698,
0.12337727844715118,
0.3192874789237976,
-0.20196659862995148,
-0.01895754784345627,
0.06420838832855225,
0.1485334038734436,
0.5158905386924744,
-0.04314422234892845,
0.09108443558216095,
0.1684979945421219,
0.05379480496048927,
0.021109163761138916,
0.05823392793536186,
-0.05004143342375755,
-0.43920058012008667,
0.34725216031074524,
-0.012652784585952759,
0.2276023030281067,
-0.2660074830055237,
-0.283772349357605,
-0.1780593991279602,
-0.21927499771118164,
-0.297415554523468,
0.18032881617546082,
0.18043822050094604,
0.22077833116054535,
-0.07400698959827423,
-0.0610380545258522,
-0.11823555827140808,
0.3826507329940796,
0.005693273618817329,
0.3684275448322296,
-0.6029043793678284,
0.31474781036376953,
0.16483204066753387,
-0.08104614168405533,
0.08328892290592194,
0.1924481987953186,
0.13359025120735168,
-0.13276593387126923,
0.0915151908993721,
0.42485561966896057,
0.1490287482738495,
0.7120468616485596,
0.32188358902931213,
0.09323012083768845,
0.1604021191596985,
-0.059497155249118805,
0.0071250684559345245,
-0.24985326826572418,
0.012598670087754726,
0.06488413363695145,
-0.00979703664779663,
0.41004347801208496,
0.009532120078802109,
0.3211522400379181,
0.04017201066017151,
-0.06696004420518875,
0.10413916409015656,
-0.11665354669094086,
-0.46249863505363464,
-0.36807093024253845,
0.006041843444108963,
-0.15836553275585175,
0.3850057125091553,
-0.18392890691757202,
-0.038395386189222336,
-0.15334653854370117,
0.17165157198905945,
-0.03473866730928421,
0.2111741304397583,
0.020937390625476837,
-0.34791094064712524,
0.1088913306593895,
0.2799876630306244,
0.11146190762519836,
0.13560594618320465,
0.2545444369316101,
-0.09735341370105743,
0.21604983508586884,
0.07502387464046478,
-0.18578648567199707,
0.18530341982841492,
0.2157384604215622,
-0.09930582344532013,
-0.05855391174554825,
0.1822492629289627,
-0.208890900015831,
-0.5306353569030762,
-0.07331204414367676,
0.05482958257198334,
-0.37447601556777954,
-0.4300632178783417,
-0.21541285514831543,
-0.2970898747444153,
-0.24803251028060913,
-0.28586915135383606,
-0.2045561671257019,
-0.4243816137313843,
-0.25585368275642395,
-0.04531029611825943,
0.2208871841430664,
-0.1768283247947693,
0.22590580582618713,
0.34659624099731445,
0.30908697843551636,
-0.09582237154245377,
-0.5125879645347595,
-0.2539045214653015,
-0.24654532968997955,
0.19475483894348145,
0.06922540068626404,
-0.12152542173862457,
0.054666176438331604,
0.15719930827617645,
-0.21321207284927368,
0.19975565373897552,
-0.27886366844177246,
-0.5489655137062073,
0.20957593619823456,
-0.07477078586816788,
0.04835078865289688,
0.29158884286880493,
-0.12205320596694946,
0.2623663544654846,
-0.06684315204620361,
0.25672873854637146,
0.05178479105234146,
0.12952342629432678,
-0.009840178303420544,
0.08814553171396255,
0.10670585930347443,
-0.02313966676592827,
0.023938193917274475,
-0.31981661915779114,
-0.5101155042648315,
0.18885201215744019,
-0.0635591596364975,
-0.010236240923404694,
-0.09788709133863449,
-0.2093108594417572,
0.05552385374903679,
-0.22214403748512268,
-0.16208861768245697,
-0.2167883813381195,
-0.2968114912509918,
0.19061459600925446,
-0.3398207426071167,
-0.025834713131189346,
-0.2347097098827362,
0.033601079136133194,
0.415743887424469,
-0.2842501401901245,
-0.1548265516757965,
-0.659885823726654,
0.01022166758775711,
0.1596977263689041,
0.270211786031723,
0.14619854092597961,
0.16973671317100525,
0.24306146800518036,
-0.03387471288442612,
-0.13432443141937256,
-0.4521300196647644,
-0.009937681257724762,
0.2608896493911743,
0.03937482833862305,
0.29442062973976135,
-0.2597793936729431,
-0.005592502653598785,
0.048708513379096985,
0.08917497098445892,
0.06098482012748718,
0.47693145275115967,
-0.012183012440800667,
0.4343264400959015,
0.0597895011305809,
0.05599571764469147,
0.10224787145853043,
0.006064847111701965,
0.2962871789932251,
0.36728769540786743,
0.2573719322681427,
0.07503722608089447,
-0.3396534025669098,
-0.4005793333053589,
-0.11424099653959274,
-0.4608899652957916,
-0.08370199054479599,
-0.12810663878917694,
-0.32491692900657654,
0.22528594732284546,
-0.12058936059474945,
-0.27962031960487366,
-0.18542161583900452,
0.3111599087715149,
0.13819248974323273,
0.14905738830566406,
-0.011803068220615387,
-0.1011519804596901,
-0.1325490027666092,
-0.43092942237854004,
0.3034743070602417,
0.00792664848268032,
0.16223226487636566,
0.0883847028017044,
-0.04670483618974686,
-0.012472182512283325,
0.20648327469825745,
0.61388099193573,
-0.49945640563964844,
0.3204237222671509,
-0.021074317395687103,
0.1152944415807724,
-0.6027982831001282,
0.021829400211572647,
-0.10515919327735901,
0.03411050885915756,
-0.09534353017807007,
0.5376158952713013,
-0.26262366771698,
-0.2750694751739502,
-0.06515070796012878,
0.19231411814689636,
0.030772414058446884,
-0.2075185924768448,
-0.10641442239284515,
-0.19201385974884033,
-0.43684282898902893,
0.019406668841838837,
0.04086754471063614,
0.13012981414794922,
0.01737602800130844,
-0.1640627235174179,
-0.055192820727825165,
-0.23586073517799377,
0.07702826708555222,
0.3686918616294861,
0.1736302375793457,
0.06806914508342743,
-0.07856136560440063,
0.2862371802330017,
0.2864706516265869,
0.011255189776420593,
0.6151257157325745,
-0.16636067628860474,
-0.43960267305374146,
-0.015051774680614471,
0.1849725991487503,
0.10425995290279388,
0.46927857398986816,
0.09412438422441483,
0.22683170437812805,
0.09454207867383957,
0.1314714252948761,
-0.7252185940742493,
0.2567296326160431,
0.02974696084856987,
0.2358861118555069,
-0.43478134274482727,
0.01952427811920643,
0.4744844436645508,
-0.06846323609352112,
-0.2875344753265381,
0.24801020324230194,
0.8726370930671692,
-0.6649402379989624,
0.5349587202072144,
-0.2576667368412018,
1.0059453248977661,
-0.01126270741224289,
0.013567354530096054,
0.04508846998214722,
-0.2513442039489746,
0.4732660949230194,
-0.03315245360136032,
0.05714311823248863,
-0.23727615177631378,
-0.16061033308506012,
0.03938157111406326,
-0.03529027849435806,
0.16653123497962952,
0.34254980087280273,
-0.1294575333595276,
0.32753580808639526,
0.031590960919857025,
0.42709484696388245,
0.07593856751918793,
0.47286760807037354,
-0.18680676817893982,
-0.36491355299949646,
-0.3165229856967926,
0.09447978436946869,
0.04812632501125336,
0.22026456892490387,
0.03963518515229225,
-0.004051888361573219,
0.12521740794181824,
-0.16761194169521332,
-0.05108644440770149,
0.09361034631729126,
-0.36914268136024475,
-0.10916319489479065,
-0.27814486622810364,
0.03639291226863861,
0.21595275402069092,
0.19511589407920837,
0.292158305644989,
0.38305726647377014,
-0.29895490407943726,
0.4509105980396271,
0.013781368732452393,
0.06804350763559341,
-0.026944996789097786,
-0.16504481434822083,
0.1270628720521927,
0.0789562240242958,
-0.2320462167263031,
-0.28604188561439514,
0.22969219088554382,
-0.1787347048521042,
0.08968034386634827,
-0.12672394514083862,
0.1083318293094635,
-0.23306678235530853,
-0.10987667739391327,
-0.16789913177490234,
0.05460294708609581,
-0.23901662230491638,
0.11151619255542755,
-0.0642041563987732,
-0.21017153561115265,
0.05728153884410858,
0.25202322006225586,
-0.28102976083755493,
-0.019823122769594193,
0.48588916659355164,
-0.16213980317115784,
-0.17082160711288452,
0.011880321428179741,
-0.11154484748840332,
-0.1209612637758255,
-0.09870991110801697,
-0.07353196293115616,
0.3201868236064911,
-0.36392727494239807,
0.021317820996046066,
0.18487276136875153,
-0.3376697897911072,
-0.08757282048463821,
-0.30592310428619385,
0.04812130331993103,
0.11035075783729553,
-0.18030624091625214,
-0.27043622732162476,
0.048788025975227356,
0.3201266825199127,
0.002445455640554428,
0.21130888164043427,
0.25879690051078796,
-0.05349722132086754,
-0.09886230528354645,
-0.08265981078147888,
-0.34743526577949524,
0.20110297203063965,
-0.1749098300933838,
0.031669747084379196,
0.0774158462882042,
0.170179545879364,
0.22509267926216125,
-0.265340656042099,
0.17819955945014954,
0.12513044476509094,
-0.13875772058963776,
-0.18485477566719055,
-0.2960410416126251,
0.1309492141008377,
-0.13107743859291077,
0.20238547027111053,
-0.02005927637219429,
-0.15894261002540588,
0.09319135546684265,
-0.28523409366607666,
0.5488601326942444,
0.28992095589637756,
0.04044801741838455,
0.06316478550434113,
0.10333189368247986,
0.010819301009178162,
-0.13525846600532532,
0.25672659277915955,
0.027040529996156693,
0.30622708797454834,
0.1579607129096985,
0.18774983286857605,
-0.35145410895347595,
0.03951501101255417,
0.3502642512321472,
0.2626788318157196,
0.3841373920440674,
0.08127661049365997,
0.05486515536904335,
0.0559798888862133,
-0.3876669406890869,
0.08897309750318527,
0.2958032488822937,
0.19097255170345306,
-0.2725584805011749,
-0.26600030064582825,
0.1287723183631897,
0.18480029702186584,
-0.1671857237815857,
-0.1067260354757309,
0.1794165074825287,
-0.36571845412254333,
0.3924468457698822,
0.29396936297416687,
0.27732595801353455,
0.1558869481086731,
-0.1396966427564621,
-0.1447044163942337,
0.6338990330696106,
0.039965178817510605,
0.11949743330478668,
0.15586936473846436,
-0.15954351425170898,
0.03665008768439293,
0.16397619247436523,
0.0969841331243515,
0.15310272574424744,
0.33405327796936035,
-0.017285242676734924,
0.47426584362983704,
0.006573313847184181,
0.2749945819377899,
0.34200915694236755,
0.10131566226482391,
0.05157093331217766,
0.12192904949188232,
-0.16044911742210388,
0.11456679552793503,
-0.15252463519573212,
0.3589358627796173,
-0.3094339966773987,
-0.020732617005705833,
-0.04685181379318237,
-0.18281129002571106,
0.06554054468870163,
-0.42793774604797363,
0.03022560477256775,
-0.08678819984197617,
-0.3126674294471741,
-0.08439378440380096,
-0.11302603781223297,
-0.27183258533477783,
0.1400689035654068,
0.006078831851482391,
0.30153048038482666,
-0.18261116743087769,
-0.1589048206806183,
0.185678631067276,
0.23481866717338562,
-0.18136554956436157,
0.31010565161705017,
0.14290276169776917,
-0.004472672939300537,
0.20625773072242737,
0.12992019951343536,
0.35962894558906555,
-0.32613539695739746,
0.05230167135596275,
-0.09855320304632187,
-0.01794486865401268,
-0.00790286622941494,
-0.09926575422286987,
-0.01660347357392311,
0.12077732384204865,
0.0657987892627716,
0.3206213414669037,
0.2676388621330261,
-0.09151363372802734,
-0.4442753195762634,
0.10157966613769531,
-0.020857062190771103,
-0.041576627641916275,
0.138545960187912,
-0.11884158849716187,
0.07027285546064377,
-0.403662770986557,
-0.029225915670394897,
-0.3402038514614105,
0.13490712642669678,
0.423254132270813,
-0.1425725668668747,
0.06709274649620056,
0.04145222529768944,
0.08987633883953094,
0.26196321845054626,
0.540931224822998,
0.05987808480858803,
-0.02445555478334427,
-0.08742927014827728,
-0.230482280254364,
-0.4303590953350067,
0.26170292496681213,
0.3900838792324066,
0.08845585584640503,
0.09848082810640335,
-0.1874731183052063,
0.13027027249336243,
0.07669158279895782,
-0.2490268498659134,
0.055771615356206894,
0.018967289477586746,
-0.25495442748069763,
-0.1120024174451828,
0.07924281060695648,
0.19138136506080627,
0.09547118097543716,
0.17399317026138306,
-0.3043982684612274,
0.07089807093143463,
0.08479400724172592,
-0.10458356887102127,
-0.20850491523742676,
0.354641854763031,
0.09410755336284637,
-0.3790739178657532,
0.4790441393852234,
0.08580692112445831,
0.2240932732820511,
-0.25741046667099,
-0.15765373408794403,
-0.37749162316322327,
-0.4545123875141144,
-0.4085777997970581,
0.05529522895812988,
-0.10578496754169464,
0.12968772649765015,
-0.009392737410962582,
-0.3112018406391144,
-0.0929953008890152,
0.024860050529241562,
-0.04909544438123703,
0.24498270452022552,
-0.05235666036605835,
0.056208185851573944,
-0.0037606991827487946,
0.19585566222667694,
-0.1522514373064041,
0.14090342819690704,
0.05997941642999649,
0.1559845209121704,
0.07773484289646149,
-0.5914257168769836,
0.5750176906585693,
0.11841363459825516,
-0.20667298138141632,
0.13329730927944183,
0.42892298102378845,
-0.06344934552907944,
-0.07004138827323914,
-0.5690573453903198,
0.24554315209388733,
0.13504357635974884,
0.21777239441871643,
-0.21719595789909363,
0.37460795044898987,
-0.025282401591539383,
0.029364701360464096,
-0.15343596041202545,
-0.2590946853160858,
0.36200833320617676,
-0.20540866255760193,
-0.13954317569732666,
-0.22058194875717163
] |
https://github.com/huggingface/datasets/issues/5419 | label_column='labels' in datasets.TextClassification and 'label' or 'label_ids' in transformers.DataColator | Hi! Thanks for pointing out this inconsistency. Changing the default value at this point is probably not worth it, considering we've started discussing the state of the task API internally - we will most likely deprecate the current one and replace it with a more robust solution that relies on the `train_eval_index` field stored in the YAML section of the dataset cards. | ### Describe the bug
When preparing a dataset for a task using `datasets.TextClassification`, the output feature is named `labels`. When preparing the trainer using the `transformers.DataCollator` the default column name is `label` if binary or `label_ids` if multi-class problem.
It is required to rename the column accordingly to the expected name : `label` or `label_ids`
### Steps to reproduce the bug
```python
from datasets import TextClassification, AutoTokenized, DataCollatorWithPadding
ds_prepared = my_dataset.prepare_for_task(TextClassification(text_column='TEXT', label_column='MY_LABEL_COLUMN_1_OR_0'))
print(ds_prepared)
tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased")
ds_tokenized = ds_prepared.map(lambda x: tokenizer(x['text'], truncation=True), batched=True)
print(ds_tokenized)
data_collator = DataCollatorWithPadding(tokenizer=tokenizer, return_tensors="tf")
tf_data = model.prepare_tf_dataset(ds_tokenized, shuffle=True, batch_size=16, collate_fn=data_collator)
print(tf_data)
```
### Expected behavior
Without renaming the the column, the target column is not in the final tf_data since it is not in the column name expected by the data_collator.
To correct this, we have to rename the column:
```python
ds_prepared = my_dataset.prepare_for_task(TextClassification(text_column='TEXT', label_column='MY_LABEL_COLUMN_1_OR_0')).rename_column('labels', 'label')
```
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.6
- PyArrow version: 10.0.1
- Pandas version: 1.5.2
- `transformers` version: 4.26.0.dev0
- Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.11.1
- PyTorch version (GPU?): not installed (NA)
- Tensorflow version (GPU?): 2.11.0 (True)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in> | 62 | label_column='labels' in datasets.TextClassification and 'label' or 'label_ids' in transformers.DataColator
### Describe the bug
When preparing a dataset for a task using `datasets.TextClassification`, the output feature is named `labels`. When preparing the trainer using the `transformers.DataCollator` the default column name is `label` if binary or `label_ids` if multi-class problem.
It is required to rename the column accordingly to the expected name : `label` or `label_ids`
### Steps to reproduce the bug
```python
from datasets import TextClassification, AutoTokenized, DataCollatorWithPadding
ds_prepared = my_dataset.prepare_for_task(TextClassification(text_column='TEXT', label_column='MY_LABEL_COLUMN_1_OR_0'))
print(ds_prepared)
tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased")
ds_tokenized = ds_prepared.map(lambda x: tokenizer(x['text'], truncation=True), batched=True)
print(ds_tokenized)
data_collator = DataCollatorWithPadding(tokenizer=tokenizer, return_tensors="tf")
tf_data = model.prepare_tf_dataset(ds_tokenized, shuffle=True, batch_size=16, collate_fn=data_collator)
print(tf_data)
```
### Expected behavior
Without renaming the the column, the target column is not in the final tf_data since it is not in the column name expected by the data_collator.
To correct this, we have to rename the column:
```python
ds_prepared = my_dataset.prepare_for_task(TextClassification(text_column='TEXT', label_column='MY_LABEL_COLUMN_1_OR_0')).rename_column('labels', 'label')
```
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.6
- PyArrow version: 10.0.1
- Pandas version: 1.5.2
- `transformers` version: 4.26.0.dev0
- Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.11.1
- PyTorch version (GPU?): not installed (NA)
- Tensorflow version (GPU?): 2.11.0 (True)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>
Hi! Thanks for pointing out this inconsistency. Changing the default value at this point is probably not worth it, considering we've started discussing the state of the task API internally - we will most likely deprecate the current one and replace it with a more robust solution that relies on the `train_eval_index` field stored in the YAML section of the dataset cards. | [
-0.09878388047218323,
-0.028300918638706207,
0.08245208859443665,
0.17236316204071045,
0.5925770401954651,
0.16195064783096313,
0.8654405474662781,
0.14585192501544952,
-0.3619146943092346,
0.3564334511756897,
0.07374385744333267,
0.6325087547302246,
-0.12174087017774582,
0.024712728336453438,
-0.02857830375432968,
-0.19205987453460693,
-0.022380270063877106,
0.12868817150592804,
-0.0020419657230377197,
-0.09749874472618103,
-0.19111871719360352,
0.056639060378074646,
-0.20205387473106384,
0.29761719703674316,
-0.5943378210067749,
-0.027610136196017265,
0.0822877362370491,
-0.27364581823349,
0.08751332759857178,
-0.322448194026947,
0.2684440612792969,
0.20469485223293304,
0.060547687113285065,
0.49583733081817627,
-0.00011288461973890662,
-0.07139421999454498,
0.20973268151283264,
0.062452733516693115,
-0.25282275676727295,
-0.30544620752334595,
0.04770874232053757,
-0.02334582433104515,
0.09601173549890518,
-0.422691285610199,
-0.1356131136417389,
0.037157315760850906,
0.026184991002082825,
0.16443705558776855,
-0.1215813159942627,
0.10350800305604935,
0.20663943886756897,
0.15116840600967407,
0.05902257189154625,
0.14380931854248047,
-0.003123946487903595,
0.014732725918293,
-0.29796111583709717,
-0.009952835738658905,
-0.15399284660816193,
0.05975322425365448,
0.06318459659814835,
0.4179323613643646,
0.10270370543003082,
0.10310091078281403,
0.11771532893180847,
0.44545745849609375,
0.06450952589511871,
-0.09287610650062561,
0.2905426323413849,
0.1447499692440033,
0.6715041995048523,
-0.26278403401374817,
-0.31931501626968384,
-0.15384669601917267,
0.04607255011796951,
-0.41180649399757385,
0.29353219270706177,
-0.08203212916851044,
0.10883946716785431,
0.03877013921737671,
0.0396387055516243,
0.18434084951877594,
-0.06759710609912872,
-0.09175769984722137,
-0.34234175086021423,
0.7081360816955566,
-0.12076491117477417,
0.2919890582561493,
-0.1985204666852951,
-0.16737590730190277,
0.45119601488113403,
-0.1717463582754135,
0.14957408607006073,
0.24520285427570343,
-0.4172377586364746,
-0.27131208777427673,
-0.1164364442229271,
-0.4753827154636383,
-0.18134307861328125,
-0.05101437121629715,
-0.15758971869945526,
-0.04312092810869217,
0.1284722238779068,
-0.04229438304901123,
0.13234387338161469,
0.2340615689754486,
0.12784115970134735,
0.7834054827690125,
0.1520337462425232,
0.10990618169307709,
-0.2900348901748657,
-0.16447892785072327,
-0.15532758831977844,
0.05543461814522743,
0.6299203634262085,
0.007354747503995895,
0.08803989738225937,
-0.04787778854370117,
-0.2503322958946228,
0.0012931106612086296,
0.03450177609920502,
0.08703310787677765,
0.14681927859783173,
0.2821793258190155,
-0.08934799581766129,
0.4118409752845764,
-0.06853402405977249,
0.02269386686384678,
0.11514996737241745,
0.06414023786783218,
-0.21175812184810638,
-0.12193088233470917,
-0.19675859808921814,
0.00654495507478714,
0.06650450825691223,
0.19782398641109467,
0.0445062518119812,
0.008645049296319485,
-0.13154400885105133,
-0.3301081955432892,
-0.07477813959121704,
-0.21079017221927643,
-0.03548308461904526,
0.15077316761016846,
-0.20821630954742432,
0.39504560828208923,
0.05780975520610809,
-0.2870217561721802,
-0.0062256306409835815,
0.16252826154232025,
-0.24708396196365356,
-0.11228179931640625,
-0.14092883467674255,
0.23280833661556244,
0.313096821308136,
-0.09141756594181061,
0.02424733340740204,
0.20017552375793457,
0.576944887638092,
0.10795384645462036,
0.03648192435503006,
-0.2275824397802353,
-0.06761080026626587,
-0.10352664440870285,
-0.09333168715238571,
-0.02234596014022827,
-0.21185043454170227,
-0.2580784559249878,
0.04595605656504631,
0.09065720438957214,
0.2797437012195587,
0.0670916736125946,
-0.07294350862503052,
0.16661930084228516,
0.046379126608371735,
-0.052064452320337296,
0.3078140318393707,
-0.4252309203147888,
-0.27933239936828613,
-0.03118778020143509,
-0.2726251482963562,
0.2744857966899872,
0.2020363211631775,
-0.10104028880596161,
-0.053646743297576904,
0.018939513713121414,
0.24322880804538727,
0.1016085296869278,
-0.08709882199764252,
0.2075292021036148,
-0.2038913369178772,
-0.10420921444892883,
0.33211565017700195,
0.2035226970911026,
0.15510007739067078,
0.1457407921552658,
-0.24268826842308044,
0.23950417339801788,
0.14377142488956451,
-0.1323678344488144,
0.06127045303583145,
0.07311840355396271,
0.041450731456279755,
0.19952328503131866,
0.06441903114318848,
-0.0705241933465004,
-0.3675154745578766,
0.08106086403131485,
0.14092698693275452,
0.039317067712545395,
-0.3259812593460083,
-0.41812169551849365,
-0.08622201532125473,
-0.09210823476314545,
-0.23976929485797882,
-0.09318013489246368,
0.1775115728378296,
0.2562609314918518,
-0.1836516112089157,
-0.2604442834854126,
-0.21867604553699493,
0.32029807567596436,
-0.2488822042942047,
0.2924008369445801,
-0.0739269107580185,
0.06304735690355301,
0.03694181144237518,
-0.06102736294269562,
-0.3898006081581116,
0.20995789766311646,
0.15932819247245789,
0.007866224274039268,
-0.1667255163192749,
0.45316508412361145,
-0.09945652633905411,
-0.1916198581457138,
-0.3082547187805176,
0.16288098692893982,
0.11945831030607224,
-0.14193521440029144,
-0.25658416748046875,
-0.0695178359746933,
0.07074747234582901,
-0.00863463431596756,
-0.06724461168050766,
0.28486502170562744,
-0.011449813842773438,
0.14704741537570953,
-0.15439414978027344,
-0.09131801873445511,
0.19803591072559357,
-0.10058954358100891,
-0.16227421164512634,
-0.1139318197965622,
-0.19572453200817108,
-0.21435344219207764,
0.27287745475769043,
0.03801975026726723,
-0.42638352513313293,
0.14464926719665527,
0.6266319155693054,
-0.07931394129991531,
-0.04208986461162567,
0.04690832272171974,
-0.155739426612854,
0.12377188354730606,
-0.22281114757061005,
0.16245493292808533,
0.3924490213394165,
0.05209603160619736,
-0.17197857797145844,
-0.1373431533575058,
-0.26566559076309204,
-0.10437166690826416,
0.17702634632587433,
0.12488184124231339,
0.007520950865000486,
0.1706327199935913,
0.24031484127044678,
0.11481642723083496,
-0.24599656462669373,
-0.2202730029821396,
0.2603487968444824,
0.2027418315410614,
-0.2452097088098526,
0.15671710669994354,
-0.15690606832504272,
-0.02251981943845749,
-0.2951033413410187,
0.061293166130781174,
0.07931946963071823,
-0.17881543934345245,
-0.07313109934329987,
0.3114584684371948,
-0.09768269956111908,
0.2645283639431,
0.269879549741745,
0.11853350698947906,
0.10181096196174622,
0.004399305209517479,
-0.02541317418217659,
-0.16104698181152344,
-0.24367907643318176,
0.08779333531856537,
-0.3162374198436737,
-0.4179949462413788,
-0.0055520739406347275,
-0.12108173966407776,
-0.061676014214754105,
-0.12150243669748306,
-0.35565832257270813,
0.17322462797164917,
-0.24217171967029572,
0.0809318795800209,
0.0367497056722641,
-0.043071553111076355,
-0.216225728392601,
-0.29703620076179504,
0.14105281233787537,
0.01695690117776394,
0.13660134375095367,
0.008636761456727982,
0.16369463503360748,
-0.057208627462387085,
-0.07905326783657074,
-0.3023567497730255,
-0.3327118158340454,
-0.07706144452095032,
-0.11510100960731506,
-0.16628998517990112,
0.020461447536945343,
0.5023379325866699,
-0.37531140446662903,
-0.023721057921648026,
0.2505355775356293,
0.06053335219621658,
-0.3716248571872711,
-0.07621900737285614,
0.28010836243629456,
-0.14275290071964264,
-0.1259775161743164,
-0.2527461051940918,
-0.15514762699604034,
0.2443714141845703,
-0.14465609192848206,
-0.08559402823448181,
-0.012817754410207272,
-0.1648682951927185,
0.1276203840970993,
-0.016188405454158783,
0.2210220843553543,
0.24479955434799194,
0.2101527750492096,
0.0013697035610675812,
-0.13238506019115448,
-0.1934802532196045,
0.0486445277929306,
0.1204848513007164,
0.2394794523715973,
-0.11964397877454758,
0.23690953850746155,
0.00020576640963554382,
0.4411717653274536,
-0.021212657913565636,
-0.3239082098007202,
0.010382715612649918,
-0.10816343873739243,
0.02559705451130867,
-0.04577033966779709,
-0.271725058555603,
0.010330627672374249,
-0.04261660575866699,
0.08221644163131714,
0.26986998319625854,
-0.23316431045532227,
-0.19831018149852753,
0.10281874239444733,
0.5270803570747375,
-0.17097482085227966,
-0.38556429743766785,
0.025234857574105263,
-0.1764206439256668,
0.2568413317203522,
0.2738325893878937,
0.10129941254854202,
-0.3142843246459961,
-0.22118905186653137,
-0.06637027859687805,
0.1660275161266327,
-0.2927324175834656,
-0.15437327325344086,
-0.35445842146873474,
-0.17246529459953308,
-0.2605782151222229,
-0.04501888155937195,
0.17716647684574127,
0.38574618101119995,
0.09838917851448059,
0.020268317312002182,
0.075975701212883,
0.2039264440536499,
0.6470690369606018,
-0.280394971370697,
-0.055275849997997284,
0.26291170716285706,
0.02594856172800064,
0.17539772391319275,
-0.3537599444389343,
-0.3917001783847809,
-0.13001784682273865,
-0.13833525776863098,
0.44449570775032043,
-0.24300497770309448,
-0.2777419686317444,
0.37102335691452026,
-0.046958502382040024,
-0.20554684102535248,
-0.13715656101703644,
-0.30955755710601807,
-0.06725495308637619,
0.049244046211242676,
0.15813609957695007,
0.18253107368946075,
0.515651285648346,
-0.29361218214035034,
-0.09171608835458755,
-0.12031087279319763,
-0.14243485033512115,
0.061077095568180084,
0.3288087844848633,
0.10353828221559525,
0.15711872279644012,
0.16088366508483887,
0.11764786392450333,
0.10640556365251541,
-0.02245996706187725,
0.1702841818332672,
-0.10315696895122528,
-0.6589722633361816,
0.3374267518520355,
-0.24080410599708557,
0.16605593264102936,
0.11258137226104736,
-0.04053499549627304,
0.33589673042297363,
-0.37468886375427246,
0.29223018884658813,
-0.00414991844445467,
0.18892405927181244,
0.43081504106521606,
0.24552986025810242,
-0.5849118828773499,
-0.3924005925655365,
0.3886275887489319,
0.12008284032344818,
-0.10092105716466904,
0.2835685908794403,
-0.003352828323841095,
-0.5408922433853149,
0.2954556345939636,
-0.004005655646324158,
0.7679331302642822,
-0.0883997231721878,
0.022818008437752724,
-0.02044043317437172,
-0.2887606918811798,
0.5776322484016418,
-0.325157105922699,
0.32274574041366577,
-0.37249478697776794,
-0.4720717966556549,
0.0518278107047081,
0.13249586522579193,
0.11140662431716919,
0.4056708812713623,
-0.23353324830532074,
0.35019001364707947,
-0.31882917881011963,
0.38504812121391296,
0.06606419384479523,
0.10354450345039368,
0.19217462837696075,
-0.5066481232643127,
0.002566508948802948,
0.0799674540758133,
-0.0921134203672409,
0.1799258142709732,
-0.12985001504421234,
0.2647992968559265,
0.07498595118522644,
-0.14635521173477173,
-0.17633846402168274,
0.04526358097791672,
-0.10293149203062057,
0.15926916897296906,
0.30554524064064026,
-0.06032589077949524,
0.11715076863765717,
0.07258293777704239,
0.6927273869514465,
0.31671521067619324,
0.08162691444158554,
0.21787016093730927,
-0.02449420839548111,
0.5636076927185059,
0.04248480498790741,
0.06297268718481064,
0.4354500472545624,
0.1890857219696045,
-0.06479031592607498,
0.05109410732984543,
-0.05488394573330879,
-0.0554194375872612,
-0.02930113673210144,
-0.2748097777366638,
0.31531357765197754,
-0.44299066066741943,
0.3068554103374481,
-0.026336081326007843,
0.1621839702129364,
-0.3917730450630188,
0.1520586609840393,
-0.2518838047981262,
-0.263774573802948,
0.13495343923568726,
-0.09129513800144196,
-0.3027491569519043,
-0.08363863825798035,
0.29818692803382874,
0.3503437936306,
0.05533996969461441,
0.3548707962036133,
-0.1640234738588333,
-0.07664825022220612,
-0.13307911157608032,
0.21952670812606812,
0.2683776915073395,
-0.49827608466148376,
0.23037390410900116,
0.0018822930287569761,
-0.2811836004257202,
0.09477006644010544,
0.3730113208293915,
0.03999164327979088,
0.3466978967189789,
-0.29023477435112,
0.027197517454624176,
-0.45008230209350586,
-0.004283979535102844,
0.12916861474514008,
0.12465091049671173,
0.011049587279558182,
0.6032772660255432,
-0.15847621858119965,
0.058840177953243256,
-0.322165846824646,
-0.17586228251457214,
-0.2745916247367859,
0.3612814247608185,
0.10204877704381943,
-0.1364629864692688,
-0.03708234429359436,
-0.030822111293673515,
0.2847574055194855,
0.17106856405735016,
0.2508339285850525,
-0.28381749987602234,
-0.4268157184123993,
0.11206791549921036,
0.2728765904903412,
0.11688806861639023,
-0.25437620282173157,
-0.0031479131430387497,
-0.0821562111377716,
-0.19343671202659607,
0.4414037764072418,
0.01729743182659149,
0.16602188348770142,
0.3710218369960785,
-0.3741476833820343,
0.39762768149375916,
-0.15666398406028748,
-0.22794020175933838,
-0.023503363132476807,
-0.08342635631561279,
0.17250069975852966,
0.1704133152961731,
-0.06956207007169724,
0.060023754835128784,
-0.4924916625022888,
0.019137311726808548,
-0.00764872133731842,
0.11506616324186325,
0.016448207199573517,
-0.46100372076034546,
-0.06641221791505814,
0.10618727654218674,
-0.11383653432130814,
0.1890891194343567,
-0.18362267315387726,
-0.567388653755188,
0.22666555643081665,
0.25010424852371216,
-0.11163697391748428,
-0.20363764464855194,
-0.3000152111053467,
-0.06736887991428375,
0.0842081606388092,
0.2752237617969513,
-0.011435799300670624,
0.18958550691604614,
0.08015019446611404,
0.015536796301603317,
0.533913791179657,
-0.21264992654323578,
0.3563506603240967,
0.6365780830383301,
-0.0675867348909378,
0.34602609276771545,
0.5576490759849548,
0.13735997676849365,
-0.06833552569150925,
0.4271451234817505,
0.24591848254203796,
0.012980591505765915,
-0.12442567199468613,
0.0027565062046051025,
0.013063699007034302,
0.12778730690479279,
-0.2291523963212967,
0.009842649102210999,
-0.3283305764198303,
0.26622122526168823,
-0.04907648265361786,
-0.17651602625846863,
-0.5454317331314087,
-0.28628668189048767,
-0.16009186208248138,
-0.05817989632487297,
-0.3572540581226349,
-0.35114315152168274,
-0.014066457748413086,
-0.046380799263715744,
-0.21251511573791504,
-0.11437658965587616,
-0.2387659251689911,
0.09853684902191162,
0.18827120959758759,
-0.2166801542043686,
-0.1308538168668747,
-0.41262727975845337,
-0.0957220122218132,
0.3712961673736572,
0.4447037875652313,
-0.17111313343048096,
0.30766767263412476,
-0.08154281973838806,
-0.01659213751554489,
0.030249785631895065,
0.16679427027702332,
-0.08371751010417938,
0.0924183651804924,
0.28175607323646545,
-0.3107511103153229,
-0.034939225763082504,
-0.13890257477760315,
0.21300655603408813,
0.07476994395256042,
0.0870770588517189,
-0.06892918050289154,
0.09516826272010803,
0.14203739166259766,
-0.17958931624889374,
0.09329058974981308,
0.2749789357185364,
0.19426947832107544,
-0.2799711525440216,
0.3422715961933136,
0.10970645397901535,
-0.06972923874855042,
0.13923607766628265,
0.07332254201173782,
-0.25158122181892395,
-0.006277813576161861,
0.32594627141952515,
0.07107468694448471,
0.15098243951797485,
-0.06428836286067963,
0.0888628363609314,
0.30800479650497437,
0.2252480834722519,
0.19038748741149902,
-0.4128277003765106,
-0.23496568202972412,
-0.01922350376844406,
-0.2001948356628418,
0.2663978934288025,
0.18070100247859955,
-0.26356813311576843,
0.1064557284116745,
-0.0005711223930120468,
-0.009193085134029388,
-0.147242933511734,
-0.04168696701526642,
-0.16174325346946716,
0.09138001501560211,
0.17161282896995544,
-0.1558026224374771,
-0.12780119478702545,
-0.13935326039791107,
0.1440097987651825,
0.029440831393003464,
-0.3252267837524414,
0.02464243397116661,
0.2704716920852661,
0.016608648002147675,
-0.19458109140396118,
0.24979239702224731,
0.10125543177127838,
-0.3441859185695648,
0.25859230756759644,
-0.05334257334470749,
0.2999156713485718,
-0.06146935373544693,
0.09231866896152496,
-0.06510108709335327,
-0.2822032868862152,
-0.36171016097068787,
0.13211028277873993,
0.1446356326341629,
0.47394225001335144,
0.2542627155780792,
0.2601170241832733,
-0.09669573605060577,
-0.1418944001197815,
0.25726163387298584,
0.07591476291418076,
-0.204463392496109,
0.24087315797805786,
-0.0034999847412109375,
0.03866659849882126,
0.17838041484355927,
0.33221861720085144,
0.11038990318775177,
0.2014506608247757,
-0.15481369197368622,
-0.679522693157196,
0.4488374590873718,
-0.20128537714481354,
-0.6450573801994324,
-0.12197183072566986,
0.22358408570289612,
0.20328101515769958,
-0.0016666501760482788,
-0.4823888838291168,
0.012790270149707794,
0.28156617283821106,
-0.22944405674934387,
-0.543701171875,
0.14594198763370514,
0.22910112142562866,
0.16228796541690826,
-0.09833569824695587,
0.2258104383945465,
-0.0029868707060813904,
0.03510593622922897,
-0.010210525244474411,
-0.23735712468624115
] |
https://github.com/huggingface/datasets/issues/5419 | label_column='labels' in datasets.TextClassification and 'label' or 'label_ids' in transformers.DataColator | The task templates API has been deprecated (will be removed in version 3.0), so I'm closing this issue. | ### Describe the bug
When preparing a dataset for a task using `datasets.TextClassification`, the output feature is named `labels`. When preparing the trainer using the `transformers.DataCollator` the default column name is `label` if binary or `label_ids` if multi-class problem.
It is required to rename the column accordingly to the expected name : `label` or `label_ids`
### Steps to reproduce the bug
```python
from datasets import TextClassification, AutoTokenized, DataCollatorWithPadding
ds_prepared = my_dataset.prepare_for_task(TextClassification(text_column='TEXT', label_column='MY_LABEL_COLUMN_1_OR_0'))
print(ds_prepared)
tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased")
ds_tokenized = ds_prepared.map(lambda x: tokenizer(x['text'], truncation=True), batched=True)
print(ds_tokenized)
data_collator = DataCollatorWithPadding(tokenizer=tokenizer, return_tensors="tf")
tf_data = model.prepare_tf_dataset(ds_tokenized, shuffle=True, batch_size=16, collate_fn=data_collator)
print(tf_data)
```
### Expected behavior
Without renaming the the column, the target column is not in the final tf_data since it is not in the column name expected by the data_collator.
To correct this, we have to rename the column:
```python
ds_prepared = my_dataset.prepare_for_task(TextClassification(text_column='TEXT', label_column='MY_LABEL_COLUMN_1_OR_0')).rename_column('labels', 'label')
```
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.6
- PyArrow version: 10.0.1
- Pandas version: 1.5.2
- `transformers` version: 4.26.0.dev0
- Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.11.1
- PyTorch version (GPU?): not installed (NA)
- Tensorflow version (GPU?): 2.11.0 (True)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in> | 18 | label_column='labels' in datasets.TextClassification and 'label' or 'label_ids' in transformers.DataColator
### Describe the bug
When preparing a dataset for a task using `datasets.TextClassification`, the output feature is named `labels`. When preparing the trainer using the `transformers.DataCollator` the default column name is `label` if binary or `label_ids` if multi-class problem.
It is required to rename the column accordingly to the expected name : `label` or `label_ids`
### Steps to reproduce the bug
```python
from datasets import TextClassification, AutoTokenized, DataCollatorWithPadding
ds_prepared = my_dataset.prepare_for_task(TextClassification(text_column='TEXT', label_column='MY_LABEL_COLUMN_1_OR_0'))
print(ds_prepared)
tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased")
ds_tokenized = ds_prepared.map(lambda x: tokenizer(x['text'], truncation=True), batched=True)
print(ds_tokenized)
data_collator = DataCollatorWithPadding(tokenizer=tokenizer, return_tensors="tf")
tf_data = model.prepare_tf_dataset(ds_tokenized, shuffle=True, batch_size=16, collate_fn=data_collator)
print(tf_data)
```
### Expected behavior
Without renaming the the column, the target column is not in the final tf_data since it is not in the column name expected by the data_collator.
To correct this, we have to rename the column:
```python
ds_prepared = my_dataset.prepare_for_task(TextClassification(text_column='TEXT', label_column='MY_LABEL_COLUMN_1_OR_0')).rename_column('labels', 'label')
```
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.6
- PyArrow version: 10.0.1
- Pandas version: 1.5.2
- `transformers` version: 4.26.0.dev0
- Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.11.1
- PyTorch version (GPU?): not installed (NA)
- Tensorflow version (GPU?): 2.11.0 (True)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>
The task templates API has been deprecated (will be removed in version 3.0), so I'm closing this issue. | [
-0.09878388047218323,
-0.028300918638706207,
0.08245208859443665,
0.17236316204071045,
0.5925770401954651,
0.16195064783096313,
0.8654405474662781,
0.14585192501544952,
-0.3619146943092346,
0.3564334511756897,
0.07374385744333267,
0.6325087547302246,
-0.12174087017774582,
0.024712728336453438,
-0.02857830375432968,
-0.19205987453460693,
-0.022380270063877106,
0.12868817150592804,
-0.0020419657230377197,
-0.09749874472618103,
-0.19111871719360352,
0.056639060378074646,
-0.20205387473106384,
0.29761719703674316,
-0.5943378210067749,
-0.027610136196017265,
0.0822877362370491,
-0.27364581823349,
0.08751332759857178,
-0.322448194026947,
0.2684440612792969,
0.20469485223293304,
0.060547687113285065,
0.49583733081817627,
-0.00011288461973890662,
-0.07139421999454498,
0.20973268151283264,
0.062452733516693115,
-0.25282275676727295,
-0.30544620752334595,
0.04770874232053757,
-0.02334582433104515,
0.09601173549890518,
-0.422691285610199,
-0.1356131136417389,
0.037157315760850906,
0.026184991002082825,
0.16443705558776855,
-0.1215813159942627,
0.10350800305604935,
0.20663943886756897,
0.15116840600967407,
0.05902257189154625,
0.14380931854248047,
-0.003123946487903595,
0.014732725918293,
-0.29796111583709717,
-0.009952835738658905,
-0.15399284660816193,
0.05975322425365448,
0.06318459659814835,
0.4179323613643646,
0.10270370543003082,
0.10310091078281403,
0.11771532893180847,
0.44545745849609375,
0.06450952589511871,
-0.09287610650062561,
0.2905426323413849,
0.1447499692440033,
0.6715041995048523,
-0.26278403401374817,
-0.31931501626968384,
-0.15384669601917267,
0.04607255011796951,
-0.41180649399757385,
0.29353219270706177,
-0.08203212916851044,
0.10883946716785431,
0.03877013921737671,
0.0396387055516243,
0.18434084951877594,
-0.06759710609912872,
-0.09175769984722137,
-0.34234175086021423,
0.7081360816955566,
-0.12076491117477417,
0.2919890582561493,
-0.1985204666852951,
-0.16737590730190277,
0.45119601488113403,
-0.1717463582754135,
0.14957408607006073,
0.24520285427570343,
-0.4172377586364746,
-0.27131208777427673,
-0.1164364442229271,
-0.4753827154636383,
-0.18134307861328125,
-0.05101437121629715,
-0.15758971869945526,
-0.04312092810869217,
0.1284722238779068,
-0.04229438304901123,
0.13234387338161469,
0.2340615689754486,
0.12784115970134735,
0.7834054827690125,
0.1520337462425232,
0.10990618169307709,
-0.2900348901748657,
-0.16447892785072327,
-0.15532758831977844,
0.05543461814522743,
0.6299203634262085,
0.007354747503995895,
0.08803989738225937,
-0.04787778854370117,
-0.2503322958946228,
0.0012931106612086296,
0.03450177609920502,
0.08703310787677765,
0.14681927859783173,
0.2821793258190155,
-0.08934799581766129,
0.4118409752845764,
-0.06853402405977249,
0.02269386686384678,
0.11514996737241745,
0.06414023786783218,
-0.21175812184810638,
-0.12193088233470917,
-0.19675859808921814,
0.00654495507478714,
0.06650450825691223,
0.19782398641109467,
0.0445062518119812,
0.008645049296319485,
-0.13154400885105133,
-0.3301081955432892,
-0.07477813959121704,
-0.21079017221927643,
-0.03548308461904526,
0.15077316761016846,
-0.20821630954742432,
0.39504560828208923,
0.05780975520610809,
-0.2870217561721802,
-0.0062256306409835815,
0.16252826154232025,
-0.24708396196365356,
-0.11228179931640625,
-0.14092883467674255,
0.23280833661556244,
0.313096821308136,
-0.09141756594181061,
0.02424733340740204,
0.20017552375793457,
0.576944887638092,
0.10795384645462036,
0.03648192435503006,
-0.2275824397802353,
-0.06761080026626587,
-0.10352664440870285,
-0.09333168715238571,
-0.02234596014022827,
-0.21185043454170227,
-0.2580784559249878,
0.04595605656504631,
0.09065720438957214,
0.2797437012195587,
0.0670916736125946,
-0.07294350862503052,
0.16661930084228516,
0.046379126608371735,
-0.052064452320337296,
0.3078140318393707,
-0.4252309203147888,
-0.27933239936828613,
-0.03118778020143509,
-0.2726251482963562,
0.2744857966899872,
0.2020363211631775,
-0.10104028880596161,
-0.053646743297576904,
0.018939513713121414,
0.24322880804538727,
0.1016085296869278,
-0.08709882199764252,
0.2075292021036148,
-0.2038913369178772,
-0.10420921444892883,
0.33211565017700195,
0.2035226970911026,
0.15510007739067078,
0.1457407921552658,
-0.24268826842308044,
0.23950417339801788,
0.14377142488956451,
-0.1323678344488144,
0.06127045303583145,
0.07311840355396271,
0.041450731456279755,
0.19952328503131866,
0.06441903114318848,
-0.0705241933465004,
-0.3675154745578766,
0.08106086403131485,
0.14092698693275452,
0.039317067712545395,
-0.3259812593460083,
-0.41812169551849365,
-0.08622201532125473,
-0.09210823476314545,
-0.23976929485797882,
-0.09318013489246368,
0.1775115728378296,
0.2562609314918518,
-0.1836516112089157,
-0.2604442834854126,
-0.21867604553699493,
0.32029807567596436,
-0.2488822042942047,
0.2924008369445801,
-0.0739269107580185,
0.06304735690355301,
0.03694181144237518,
-0.06102736294269562,
-0.3898006081581116,
0.20995789766311646,
0.15932819247245789,
0.007866224274039268,
-0.1667255163192749,
0.45316508412361145,
-0.09945652633905411,
-0.1916198581457138,
-0.3082547187805176,
0.16288098692893982,
0.11945831030607224,
-0.14193521440029144,
-0.25658416748046875,
-0.0695178359746933,
0.07074747234582901,
-0.00863463431596756,
-0.06724461168050766,
0.28486502170562744,
-0.011449813842773438,
0.14704741537570953,
-0.15439414978027344,
-0.09131801873445511,
0.19803591072559357,
-0.10058954358100891,
-0.16227421164512634,
-0.1139318197965622,
-0.19572453200817108,
-0.21435344219207764,
0.27287745475769043,
0.03801975026726723,
-0.42638352513313293,
0.14464926719665527,
0.6266319155693054,
-0.07931394129991531,
-0.04208986461162567,
0.04690832272171974,
-0.155739426612854,
0.12377188354730606,
-0.22281114757061005,
0.16245493292808533,
0.3924490213394165,
0.05209603160619736,
-0.17197857797145844,
-0.1373431533575058,
-0.26566559076309204,
-0.10437166690826416,
0.17702634632587433,
0.12488184124231339,
0.007520950865000486,
0.1706327199935913,
0.24031484127044678,
0.11481642723083496,
-0.24599656462669373,
-0.2202730029821396,
0.2603487968444824,
0.2027418315410614,
-0.2452097088098526,
0.15671710669994354,
-0.15690606832504272,
-0.02251981943845749,
-0.2951033413410187,
0.061293166130781174,
0.07931946963071823,
-0.17881543934345245,
-0.07313109934329987,
0.3114584684371948,
-0.09768269956111908,
0.2645283639431,
0.269879549741745,
0.11853350698947906,
0.10181096196174622,
0.004399305209517479,
-0.02541317418217659,
-0.16104698181152344,
-0.24367907643318176,
0.08779333531856537,
-0.3162374198436737,
-0.4179949462413788,
-0.0055520739406347275,
-0.12108173966407776,
-0.061676014214754105,
-0.12150243669748306,
-0.35565832257270813,
0.17322462797164917,
-0.24217171967029572,
0.0809318795800209,
0.0367497056722641,
-0.043071553111076355,
-0.216225728392601,
-0.29703620076179504,
0.14105281233787537,
0.01695690117776394,
0.13660134375095367,
0.008636761456727982,
0.16369463503360748,
-0.057208627462387085,
-0.07905326783657074,
-0.3023567497730255,
-0.3327118158340454,
-0.07706144452095032,
-0.11510100960731506,
-0.16628998517990112,
0.020461447536945343,
0.5023379325866699,
-0.37531140446662903,
-0.023721057921648026,
0.2505355775356293,
0.06053335219621658,
-0.3716248571872711,
-0.07621900737285614,
0.28010836243629456,
-0.14275290071964264,
-0.1259775161743164,
-0.2527461051940918,
-0.15514762699604034,
0.2443714141845703,
-0.14465609192848206,
-0.08559402823448181,
-0.012817754410207272,
-0.1648682951927185,
0.1276203840970993,
-0.016188405454158783,
0.2210220843553543,
0.24479955434799194,
0.2101527750492096,
0.0013697035610675812,
-0.13238506019115448,
-0.1934802532196045,
0.0486445277929306,
0.1204848513007164,
0.2394794523715973,
-0.11964397877454758,
0.23690953850746155,
0.00020576640963554382,
0.4411717653274536,
-0.021212657913565636,
-0.3239082098007202,
0.010382715612649918,
-0.10816343873739243,
0.02559705451130867,
-0.04577033966779709,
-0.271725058555603,
0.010330627672374249,
-0.04261660575866699,
0.08221644163131714,
0.26986998319625854,
-0.23316431045532227,
-0.19831018149852753,
0.10281874239444733,
0.5270803570747375,
-0.17097482085227966,
-0.38556429743766785,
0.025234857574105263,
-0.1764206439256668,
0.2568413317203522,
0.2738325893878937,
0.10129941254854202,
-0.3142843246459961,
-0.22118905186653137,
-0.06637027859687805,
0.1660275161266327,
-0.2927324175834656,
-0.15437327325344086,
-0.35445842146873474,
-0.17246529459953308,
-0.2605782151222229,
-0.04501888155937195,
0.17716647684574127,
0.38574618101119995,
0.09838917851448059,
0.020268317312002182,
0.075975701212883,
0.2039264440536499,
0.6470690369606018,
-0.280394971370697,
-0.055275849997997284,
0.26291170716285706,
0.02594856172800064,
0.17539772391319275,
-0.3537599444389343,
-0.3917001783847809,
-0.13001784682273865,
-0.13833525776863098,
0.44449570775032043,
-0.24300497770309448,
-0.2777419686317444,
0.37102335691452026,
-0.046958502382040024,
-0.20554684102535248,
-0.13715656101703644,
-0.30955755710601807,
-0.06725495308637619,
0.049244046211242676,
0.15813609957695007,
0.18253107368946075,
0.515651285648346,
-0.29361218214035034,
-0.09171608835458755,
-0.12031087279319763,
-0.14243485033512115,
0.061077095568180084,
0.3288087844848633,
0.10353828221559525,
0.15711872279644012,
0.16088366508483887,
0.11764786392450333,
0.10640556365251541,
-0.02245996706187725,
0.1702841818332672,
-0.10315696895122528,
-0.6589722633361816,
0.3374267518520355,
-0.24080410599708557,
0.16605593264102936,
0.11258137226104736,
-0.04053499549627304,
0.33589673042297363,
-0.37468886375427246,
0.29223018884658813,
-0.00414991844445467,
0.18892405927181244,
0.43081504106521606,
0.24552986025810242,
-0.5849118828773499,
-0.3924005925655365,
0.3886275887489319,
0.12008284032344818,
-0.10092105716466904,
0.2835685908794403,
-0.003352828323841095,
-0.5408922433853149,
0.2954556345939636,
-0.004005655646324158,
0.7679331302642822,
-0.0883997231721878,
0.022818008437752724,
-0.02044043317437172,
-0.2887606918811798,
0.5776322484016418,
-0.325157105922699,
0.32274574041366577,
-0.37249478697776794,
-0.4720717966556549,
0.0518278107047081,
0.13249586522579193,
0.11140662431716919,
0.4056708812713623,
-0.23353324830532074,
0.35019001364707947,
-0.31882917881011963,
0.38504812121391296,
0.06606419384479523,
0.10354450345039368,
0.19217462837696075,
-0.5066481232643127,
0.002566508948802948,
0.0799674540758133,
-0.0921134203672409,
0.1799258142709732,
-0.12985001504421234,
0.2647992968559265,
0.07498595118522644,
-0.14635521173477173,
-0.17633846402168274,
0.04526358097791672,
-0.10293149203062057,
0.15926916897296906,
0.30554524064064026,
-0.06032589077949524,
0.11715076863765717,
0.07258293777704239,
0.6927273869514465,
0.31671521067619324,
0.08162691444158554,
0.21787016093730927,
-0.02449420839548111,
0.5636076927185059,
0.04248480498790741,
0.06297268718481064,
0.4354500472545624,
0.1890857219696045,
-0.06479031592607498,
0.05109410732984543,
-0.05488394573330879,
-0.0554194375872612,
-0.02930113673210144,
-0.2748097777366638,
0.31531357765197754,
-0.44299066066741943,
0.3068554103374481,
-0.026336081326007843,
0.1621839702129364,
-0.3917730450630188,
0.1520586609840393,
-0.2518838047981262,
-0.263774573802948,
0.13495343923568726,
-0.09129513800144196,
-0.3027491569519043,
-0.08363863825798035,
0.29818692803382874,
0.3503437936306,
0.05533996969461441,
0.3548707962036133,
-0.1640234738588333,
-0.07664825022220612,
-0.13307911157608032,
0.21952670812606812,
0.2683776915073395,
-0.49827608466148376,
0.23037390410900116,
0.0018822930287569761,
-0.2811836004257202,
0.09477006644010544,
0.3730113208293915,
0.03999164327979088,
0.3466978967189789,
-0.29023477435112,
0.027197517454624176,
-0.45008230209350586,
-0.004283979535102844,
0.12916861474514008,
0.12465091049671173,
0.011049587279558182,
0.6032772660255432,
-0.15847621858119965,
0.058840177953243256,
-0.322165846824646,
-0.17586228251457214,
-0.2745916247367859,
0.3612814247608185,
0.10204877704381943,
-0.1364629864692688,
-0.03708234429359436,
-0.030822111293673515,
0.2847574055194855,
0.17106856405735016,
0.2508339285850525,
-0.28381749987602234,
-0.4268157184123993,
0.11206791549921036,
0.2728765904903412,
0.11688806861639023,
-0.25437620282173157,
-0.0031479131430387497,
-0.0821562111377716,
-0.19343671202659607,
0.4414037764072418,
0.01729743182659149,
0.16602188348770142,
0.3710218369960785,
-0.3741476833820343,
0.39762768149375916,
-0.15666398406028748,
-0.22794020175933838,
-0.023503363132476807,
-0.08342635631561279,
0.17250069975852966,
0.1704133152961731,
-0.06956207007169724,
0.060023754835128784,
-0.4924916625022888,
0.019137311726808548,
-0.00764872133731842,
0.11506616324186325,
0.016448207199573517,
-0.46100372076034546,
-0.06641221791505814,
0.10618727654218674,
-0.11383653432130814,
0.1890891194343567,
-0.18362267315387726,
-0.567388653755188,
0.22666555643081665,
0.25010424852371216,
-0.11163697391748428,
-0.20363764464855194,
-0.3000152111053467,
-0.06736887991428375,
0.0842081606388092,
0.2752237617969513,
-0.011435799300670624,
0.18958550691604614,
0.08015019446611404,
0.015536796301603317,
0.533913791179657,
-0.21264992654323578,
0.3563506603240967,
0.6365780830383301,
-0.0675867348909378,
0.34602609276771545,
0.5576490759849548,
0.13735997676849365,
-0.06833552569150925,
0.4271451234817505,
0.24591848254203796,
0.012980591505765915,
-0.12442567199468613,
0.0027565062046051025,
0.013063699007034302,
0.12778730690479279,
-0.2291523963212967,
0.009842649102210999,
-0.3283305764198303,
0.26622122526168823,
-0.04907648265361786,
-0.17651602625846863,
-0.5454317331314087,
-0.28628668189048767,
-0.16009186208248138,
-0.05817989632487297,
-0.3572540581226349,
-0.35114315152168274,
-0.014066457748413086,
-0.046380799263715744,
-0.21251511573791504,
-0.11437658965587616,
-0.2387659251689911,
0.09853684902191162,
0.18827120959758759,
-0.2166801542043686,
-0.1308538168668747,
-0.41262727975845337,
-0.0957220122218132,
0.3712961673736572,
0.4447037875652313,
-0.17111313343048096,
0.30766767263412476,
-0.08154281973838806,
-0.01659213751554489,
0.030249785631895065,
0.16679427027702332,
-0.08371751010417938,
0.0924183651804924,
0.28175607323646545,
-0.3107511103153229,
-0.034939225763082504,
-0.13890257477760315,
0.21300655603408813,
0.07476994395256042,
0.0870770588517189,
-0.06892918050289154,
0.09516826272010803,
0.14203739166259766,
-0.17958931624889374,
0.09329058974981308,
0.2749789357185364,
0.19426947832107544,
-0.2799711525440216,
0.3422715961933136,
0.10970645397901535,
-0.06972923874855042,
0.13923607766628265,
0.07332254201173782,
-0.25158122181892395,
-0.006277813576161861,
0.32594627141952515,
0.07107468694448471,
0.15098243951797485,
-0.06428836286067963,
0.0888628363609314,
0.30800479650497437,
0.2252480834722519,
0.19038748741149902,
-0.4128277003765106,
-0.23496568202972412,
-0.01922350376844406,
-0.2001948356628418,
0.2663978934288025,
0.18070100247859955,
-0.26356813311576843,
0.1064557284116745,
-0.0005711223930120468,
-0.009193085134029388,
-0.147242933511734,
-0.04168696701526642,
-0.16174325346946716,
0.09138001501560211,
0.17161282896995544,
-0.1558026224374771,
-0.12780119478702545,
-0.13935326039791107,
0.1440097987651825,
0.029440831393003464,
-0.3252267837524414,
0.02464243397116661,
0.2704716920852661,
0.016608648002147675,
-0.19458109140396118,
0.24979239702224731,
0.10125543177127838,
-0.3441859185695648,
0.25859230756759644,
-0.05334257334470749,
0.2999156713485718,
-0.06146935373544693,
0.09231866896152496,
-0.06510108709335327,
-0.2822032868862152,
-0.36171016097068787,
0.13211028277873993,
0.1446356326341629,
0.47394225001335144,
0.2542627155780792,
0.2601170241832733,
-0.09669573605060577,
-0.1418944001197815,
0.25726163387298584,
0.07591476291418076,
-0.204463392496109,
0.24087315797805786,
-0.0034999847412109375,
0.03866659849882126,
0.17838041484355927,
0.33221861720085144,
0.11038990318775177,
0.2014506608247757,
-0.15481369197368622,
-0.679522693157196,
0.4488374590873718,
-0.20128537714481354,
-0.6450573801994324,
-0.12197183072566986,
0.22358408570289612,
0.20328101515769958,
-0.0016666501760482788,
-0.4823888838291168,
0.012790270149707794,
0.28156617283821106,
-0.22944405674934387,
-0.543701171875,
0.14594198763370514,
0.22910112142562866,
0.16228796541690826,
-0.09833569824695587,
0.2258104383945465,
-0.0029868707060813904,
0.03510593622922897,
-0.010210525244474411,
-0.23735712468624115
] |
https://github.com/huggingface/datasets/issues/5418 | Add ProgressBar for `to_parquet` | Thanks for your proposal, @zanussbaum. Yes, I agree that would definitely be a nice feature to have! | ### Feature request
Add a progress bar for `Dataset.to_parquet`, similar to how `to_json` works.
### Motivation
It's a bit frustrating to not know how long a dataset will take to write to file and if it's stuck or not without a progress bar
### Your contribution
Sure I can help if needed | 17 | Add ProgressBar for `to_parquet`
### Feature request
Add a progress bar for `Dataset.to_parquet`, similar to how `to_json` works.
### Motivation
It's a bit frustrating to not know how long a dataset will take to write to file and if it's stuck or not without a progress bar
### Your contribution
Sure I can help if needed
Thanks for your proposal, @zanussbaum. Yes, I agree that would definitely be a nice feature to have! | [
-0.23243588209152222,
0.22826921939849854,
-0.20800244808197021,
-0.17253246903419495,
0.033992551267147064,
0.06189555674791336,
0.049627821892499924,
0.3795413374900818,
-0.256448894739151,
0.23588132858276367,
0.578978419303894,
0.4618098735809326,
-0.047420524060726166,
0.6257507801055908,
0.23467010259628296,
0.04258716478943825,
0.27505940198898315,
0.17099937796592712,
0.313753604888916,
0.17018556594848633,
-0.10802952200174332,
0.06352315843105316,
0.16765041649341583,
-0.020915314555168152,
0.20235513150691986,
-0.06299185007810593,
-0.07317833602428436,
-0.16512280702590942,
-0.2605176866054535,
-0.6388731002807617,
0.07724382728338242,
0.24572548270225525,
-0.10104575753211975,
0.12989093363285065,
-0.00011019842349924147,
-0.26635634899139404,
0.5398945212364197,
0.05240266025066376,
-0.300056129693985,
-0.19357334077358246,
-0.22899854183197021,
-0.7581552863121033,
0.36835166811943054,
-0.2992761433124542,
-0.06562737375497818,
-0.24949349462985992,
0.1974506676197052,
-0.2910292148590088,
0.13509207963943481,
0.001699395477771759,
0.21509036421775818,
-0.0019632335752248764,
-0.05925600603222847,
-0.099056176841259,
0.680855929851532,
0.356986403465271,
-0.38703998923301697,
-0.1540660560131073,
0.6221802234649658,
-0.016897669062018394,
-0.04888441413640976,
0.3066926598548889,
0.19326388835906982,
-0.2965560257434845,
0.2203293740749359,
0.10691741108894348,
0.17510628700256348,
-0.15326805412769318,
-0.13929644227027893,
0.09784561395645142,
0.5638036727905273,
-0.3105759024620056,
-0.2965996563434601,
-0.3686213493347168,
-0.010903135873377323,
-0.26414844393730164,
-0.16676130890846252,
0.1878586858510971,
0.0940646231174469,
0.02161284163594246,
-0.24143356084823608,
-0.3396407663822174,
-0.21128404140472412,
0.01870695874094963,
0.15985073149204254,
-0.08693751692771912,
-0.14511451125144958,
-0.040869489312171936,
-0.19381026923656464,
0.11493879556655884,
-0.10905097424983978,
-0.10069466382265091,
-0.14106951653957367,
0.04227467626333237,
-0.3592456877231598,
-0.4188303053379059,
0.15292870998382568,
0.09024940431118011,
0.16729480028152466,
0.45316392183303833,
-0.07712943106889725,
0.028143469244241714,
0.06567785143852234,
0.10578009486198425,
0.3296627700328827,
-0.4097229540348053,
0.27774733304977417,
-0.41008415818214417,
0.2969302535057068,
-0.09450048208236694,
0.07738740742206573,
-0.07699264585971832,
0.4310205578804016,
0.06474512815475464,
0.3287930190563202,
0.07652726769447327,
0.3004574179649353,
-0.40400201082229614,
0.1747623234987259,
0.3523952066898346,
0.36909446120262146,
-0.13971790671348572,
-0.14531362056732178,
0.15867415070533752,
0.05335736274719238,
-0.1631614863872528,
-0.14012829959392548,
0.17723938822746277,
0.26681846380233765,
-0.12430938333272934,
-0.10270988941192627,
0.0053323302417993546,
-0.2277742475271225,
0.20854826271533966,
-0.009758174419403076,
0.07162214070558548,
-0.1413624882698059,
0.17694556713104248,
-0.041085243225097656,
0.19520150125026703,
0.44001641869544983,
-0.05505811795592308,
0.06689074635505676,
-0.13456125557422638,
-0.21410582959651947,
0.015936052426695824,
0.11959247291088104,
-0.055034227669239044,
-0.5877025127410889,
0.28260764479637146,
-0.007067553699016571,
-0.12219196557998657,
-0.26176631450653076,
0.17622137069702148,
-0.1669047325849533,
-0.22509777545928955,
-0.5332074761390686,
0.5702821016311646,
-0.13109949231147766,
-0.057033780962228775,
0.03467698395252228,
0.13959115743637085,
-0.2241467833518982,
-0.1489172726869583,
-0.10239209234714508,
0.17191407084465027,
-0.3595881760120392,
-0.01671576499938965,
-0.08548489958047867,
-0.19055956602096558,
0.1529906839132309,
-0.08270964026451111,
0.028947873041033745,
0.004880115389823914,
0.12060284614562988,
0.20888669788837433,
0.5531563758850098,
0.13876597583293915,
0.06005163490772247,
0.13330575823783875,
-0.2546444237232208,
-0.13479073345661163,
0.2817724943161011,
0.17793232202529907,
0.43806806206703186,
-0.09122901409864426,
-0.23687481880187988,
0.17384405434131622,
-0.20223747193813324,
-0.017677048221230507,
-0.2559835910797119,
-0.18406744301319122,
0.1724308878183365,
0.4128539264202118,
-0.18463443219661713,
-0.035188913345336914,
0.272920697927475,
-0.32556331157684326,
0.28854644298553467,
-0.1258249580860138,
0.23637615144252777,
0.0015913024544715881,
0.4527752995491028,
-0.006031423807144165,
-0.17398257553577423,
-0.3266342878341675,
-0.10048840194940567,
0.047421492636203766,
0.16197316348552704,
-0.06577591598033905,
0.2094285786151886,
-0.14616262912750244,
-0.03562949597835541,
0.1351042240858078,
0.014270972460508347,
0.09109137207269669,
0.1104852557182312,
-0.04145105928182602,
-0.10388362407684326,
0.16140063107013702,
-0.4229397475719452,
0.1531829982995987,
-0.42997804284095764,
-0.055099282413721085,
-0.006863437592983246,
0.4845617413520813,
0.2113076001405716,
-0.40212076902389526,
0.12598957121372223,
0.13226404786109924,
0.012935701757669449,
-0.0459582693874836,
0.16749230027198792,
-0.022074490785598755,
0.04482351988554001,
0.3081498146057129,
0.34864407777786255,
0.22516514360904694,
-0.017898866906762123,
0.055699024349451065,
-0.0017255637794733047,
-0.06770043075084686,
-0.24754969775676727,
-0.006318133324384689,
-0.42689308524131775,
0.09846176952123642,
0.2649764120578766,
0.4100273549556732,
-0.015295568853616714,
-0.2071274220943451,
0.11341875791549683,
0.14895617961883545,
-0.21837443113327026,
0.09355573356151581,
0.08834609389305115,
0.23410850763320923,
-0.2214413285255432,
-0.5190732479095459,
-0.34747985005378723,
0.4067329168319702,
0.7324632406234741,
0.1858065128326416,
-0.020665578544139862,
0.5205806493759155,
0.2606666088104248,
-0.12707208096981049,
0.1358359456062317,
0.06777851283550262,
0.1508987694978714,
0.321106880903244,
0.18541863560676575,
-0.04635170102119446,
0.09875515848398209,
-0.16006337106227875,
-0.011310860514640808,
-0.03833824396133423,
-0.14522986114025116,
0.020230352878570557,
0.3030502498149872,
-0.008159133605659008,
-0.09748946130275726,
-0.33925655484199524,
-0.30763348937034607,
-0.03436475992202759,
-0.0010081082582473755,
-0.06865331530570984,
0.009773986414074898,
-0.06482397764921188,
-0.07850154489278793,
0.2450413852930069,
0.02274133451282978,
-0.4092269539833069,
0.24432912468910217,
0.22880467772483826,
-0.21084187924861908,
-0.016315247863531113,
-0.029758675023913383,
0.5461374521255493,
-0.2803330421447754,
0.13746465742588043,
-0.4990420639514923,
-0.43870455026626587,
0.025943294167518616,
0.18652655184268951,
-0.04217603802680969,
-0.08500512689352036,
0.6017793416976929,
0.028418706730008125,
0.48348402976989746,
-0.6368736028671265,
-0.4487327039241791,
-0.14129877090454102,
-0.07838448882102966,
0.13326619565486908,
0.08317099511623383,
0.3031449317932129,
0.08411578088998795,
-0.08883900940418243,
0.0955180898308754,
-0.0409330278635025,
-0.17927193641662598,
-0.2679598927497864,
-0.015411291271448135,
0.05862843245267868,
0.0443749763071537,
0.043901227414608,
-0.3278273344039917,
-0.39170244336128235,
0.5818964242935181,
0.1660548448562622,
-0.03164961189031601,
-0.40856266021728516,
-0.2219766527414322,
0.10256469994783401,
-0.12370938062667847,
0.17356549203395844,
0.10141515731811523,
-0.5541709661483765,
0.251865953207016,
-0.18473036587238312,
-0.09620711207389832,
0.14709624648094177,
0.2225458174943924,
-0.11933791637420654,
-0.12888304889202118,
-0.49743080139160156,
-0.14741456508636475,
-0.2301061898469925,
0.01902417466044426,
-0.23773404955863953,
-0.06814722716808319,
0.1499805748462677,
0.2592376470565796,
-0.19369879364967346,
0.09919487684965134,
-0.5055556893348694,
-0.017612658441066742,
0.3864135146141052,
0.04430868849158287,
-0.3035605251789093,
0.2744359076023102,
0.017163395881652832,
0.3368801474571228,
-0.05415956303477287,
-0.017527353018522263,
0.4532947838306427,
0.12096436321735382,
0.24209189414978027,
-0.27522432804107666,
-0.18878744542598724,
-0.06897733360528946,
-0.1608981192111969,
-0.17228053510189056,
0.10168758779764175,
-0.004319719970226288,
-0.17922039330005646,
0.026646703481674194,
-0.2643877863883972,
0.043012239038944244,
-0.11743615567684174,
-0.060257069766521454,
0.0970030277967453,
0.016831696033477783,
-0.21578839421272278,
-0.11780229210853577,
0.00944073311984539,
-0.07214716821908951,
0.09588049352169037,
0.48613929748535156,
0.3034915328025818,
-0.15814469754695892,
-0.24259471893310547,
-0.12500271201133728,
-0.2906371057033539,
0.12912797927856445,
-0.09299818426370621,
-0.3263660967350006,
-0.32480835914611816,
-0.11114425957202911,
-0.05053304135799408,
-0.17947332561016083,
0.5443428158760071,
-0.20058026909828186,
-0.04953976720571518,
0.18145009875297546,
0.040199145674705505,
-0.028847593814134598,
0.010359439998865128,
0.19242103397846222,
0.14665792882442474,
0.14062759280204773,
0.7546248435974121,
-0.276574969291687,
0.08335993438959122,
0.22225046157836914,
0.13924993574619293,
-0.07195469737052917,
-0.2664373815059662,
-0.2529822885990143,
0.13152530789375305,
-0.29303622245788574,
0.36813727021217346,
0.010734820738434792,
0.029845235869288445,
0.03654614835977554,
-0.502659261226654,
-0.05017346888780594,
-0.14658281207084656,
-0.24610935151576996,
-0.02915097400546074,
0.01054115779697895,
-0.0680825263261795,
0.20043878257274628,
-0.3484728932380676,
0.20976176857948303,
-0.0946708396077156,
0.054685186594724655,
0.0014772005379199982,
-0.2414950132369995,
0.21942657232284546,
-0.2678084373474121,
0.5196678042411804,
0.3263999819755554,
0.22107267379760742,
0.6483410596847534,
-0.10274302214384079,
0.3430314064025879,
-0.2133491486310959,
0.00998297706246376,
0.022198140621185303,
-0.1213843822479248,
-0.2871512472629547,
-0.2826119363307953,
0.5306742787361145,
-0.15330368280410767,
0.029950127005577087,
0.19209277629852295,
0.3288109302520752,
-0.012920493260025978,
0.05504255369305611,
0.08959218859672546,
1.1634591817855835,
-0.3472830057144165,
0.16199171543121338,
-0.18789169192314148,
-0.6918071508407593,
0.49529793858528137,
-0.4202166795730591,
-0.037356335669755936,
-0.32012468576431274,
-0.23914210498332977,
-0.011696184054017067,
-0.20864802598953247,
0.09757372736930847,
0.2660330533981323,
-0.3337792456150055,
0.09261291474103928,
0.15335744619369507,
0.1338123232126236,
-0.17686571180820465,
0.47765523195266724,
0.009967442601919174,
-0.17601774632930756,
-0.5657005906105042,
0.23719683289527893,
0.022753801196813583,
-0.17356370389461517,
-0.15655457973480225,
-0.24521146714687347,
0.07410185039043427,
0.21645967662334442,
-0.2685984969139099,
0.050760671496391296,
0.41479453444480896,
-0.04114363715052605,
-0.18186356127262115,
-0.554961085319519,
0.2064511477947235,
-0.2614278793334961,
0.3500588536262512,
0.27975648641586304,
-0.23940327763557434,
0.07506044209003448,
-0.1294502317905426,
0.2134290635585785,
0.0331757627427578,
-0.001576561015099287,
0.14472758769989014,
-0.2761230766773224,
-0.06636618077754974,
0.36962762475013733,
-0.11336416006088257,
-0.5567446947097778,
-0.13009247183799744,
0.11142925918102264,
0.38058561086654663,
-0.03607580438256264,
0.04196101054549217,
0.19774794578552246,
-0.032145485281944275,
-0.23373985290527344,
0.18606601655483246,
0.3226717710494995,
-0.024933505803346634,
0.0883328840136528,
-0.1309603899717331,
-0.051522620022296906,
-0.22711049020290375,
-0.008025430142879486,
-0.2730616331100464,
-0.02086133137345314,
0.15017521381378174,
0.20488573610782623,
-0.2731921076774597,
-0.2475128173828125,
0.03556211292743683,
0.43792062997817993,
-0.012118365615606308,
0.028976280242204666,
-0.058273062109947205,
0.11336548626422882,
0.040730539709329605,
0.0074860453605651855,
-0.04350089281797409,
-0.12818023562431335,
-0.09886348992586136,
-0.17836299538612366,
-0.29403817653656006,
0.007930286228656769,
-0.018144793808460236,
0.30446431040763855,
0.0021688826382160187,
-0.008492723107337952,
-0.07287653535604477,
-0.3480788469314575,
-0.32958000898361206,
-0.13978257775306702,
-0.2710390090942383,
0.12127900123596191,
0.6063413619995117,
0.06236455589532852,
-0.22347284853458405,
-0.07660262286663055,
0.02815556712448597,
-0.0971655398607254,
-0.10212544351816177,
-0.232852041721344,
0.07104198634624481,
0.08773761987686157,
-0.027447417378425598,
0.40988075733184814,
-0.12272482365369797,
0.13235199451446533,
-0.109232097864151,
0.007306917104870081,
-0.0029763169586658478,
-0.2457183599472046,
-0.10697956383228302,
-0.043958939611911774,
0.32294562458992004,
0.09152787923812866,
-0.1604619026184082,
-0.11857189238071442,
0.19320262968540192,
0.19697192311286926,
-0.21597599983215332,
0.12720942497253418,
-0.062192849814891815,
0.1052766889333725,
0.15099018812179565,
0.21258440613746643,
0.2928488850593567,
0.29589951038360596,
0.10856564342975616,
0.23842953145503998,
-0.11627772450447083,
0.16676579415798187,
0.29754114151000977,
0.29802435636520386,
0.010975279845297337,
-0.10051213204860687,
0.20190677046775818,
0.2543783187866211,
0.10181330144405365,
0.05787035822868347,
0.3166964650154114,
-0.13513445854187012,
-0.07148949801921844,
-0.03119804710149765,
-0.14289268851280212,
0.46454471349716187,
0.08176811039447784,
0.22550871968269348,
0.2654440402984619,
-0.20423834025859833,
0.11376163363456726,
-0.048989299684762955,
0.06229567900300026,
0.12202003598213196,
0.2527100741863251,
0.24357131123542786,
0.09834349155426025,
0.15915098786354065,
0.22908377647399902,
0.4565368592739105,
0.4746096730232239,
0.0675860345363617,
0.00036069750785827637,
0.3769371807575226,
0.028290914371609688,
0.16003623604774475,
0.4246377944946289,
0.011087067425251007,
0.4720716178417206,
0.12558618187904358,
0.28232502937316895,
-0.28917330503463745,
-0.27576783299446106,
0.19495519995689392,
0.22839832305908203,
0.08517645299434662,
0.3029206693172455,
-0.20631669461727142,
0.01643388718366623,
-0.035126231610774994,
-0.1523253172636032,
0.17357981204986572,
-0.17691224813461304,
0.02511993795633316,
0.5405075550079346,
-0.03503058850765228,
0.14548054337501526,
-0.0702691450715065,
0.471353143453598,
-0.08492622524499893,
-0.20374637842178345,
-0.09352108836174011,
-0.12730802595615387,
-0.0029903389513492584,
0.04018072411417961,
-0.09421311318874359,
0.34279853105545044,
-0.08619245886802673,
0.07117843627929688,
-0.0839192122220993,
-0.07428537309169769,
0.009808551520109177,
0.13259735703468323,
-0.050358012318611145,
-0.031073864549398422,
0.272368460893631,
0.19110436737537384,
-0.12243951112031937,
0.326289564371109,
0.05267257243394852,
-0.12480613589286804,
-0.5263408422470093,
0.1992252767086029,
0.32724809646606445,
-0.389215886592865,
0.06891785562038422,
-0.10070917755365372,
-0.123160719871521,
-0.21382831037044525,
0.06033001467585564,
0.01736747846007347,
-0.18487241864204407,
-0.052528224885463715,
0.12627814710140228,
0.03937632963061333,
0.2582475543022156,
0.025105666369199753,
0.07792776077985764,
-0.27294260263442993,
-0.2242397665977478,
-0.3669922649860382,
-0.09337496012449265,
0.05804929509758949,
-0.07701293379068375,
0.05145682021975517,
0.24554432928562164,
0.09514553844928741,
0.39265596866607666,
0.13510529696941376,
-0.08966273814439774,
-0.4305872321128845,
-0.00503123551607132,
-0.37642836570739746,
-0.19933469593524933,
0.4689391255378723,
-0.14136375486850739,
-0.061508771032094955,
0.1677812933921814,
0.12204819917678833,
0.10068894922733307,
0.08591298013925552,
-0.0911095067858696,
-0.21380361914634705,
-0.016701852902770042,
-0.17747128009796143,
0.45223766565322876,
-0.15013274550437927,
-0.013805478811264038,
-0.0654299408197403,
-0.2858342230319977,
0.10940995067358017,
-0.2951138913631439,
-0.062272023409605026,
0.4513676166534424,
-0.34584683179855347,
0.33701077103614807,
-0.037170179188251495,
0.19656771421432495,
-0.190231055021286,
-0.10859028995037079,
-0.11427011340856552,
0.06854235380887985,
0.07560978829860687,
-0.10054056346416473,
0.40468829870224,
0.13207648694515228,
-0.24329504370689392,
-0.2538917362689972,
0.10036735981702805,
0.2698689103126526,
-0.2060888111591339,
0.03494591265916824,
0.0951036736369133,
-0.02316657081246376,
-0.40932899713516235,
0.05044351518154144,
0.10508355498313904,
0.07327736914157867,
0.20413804054260254,
-0.3631208539009094,
-0.2637917399406433,
0.2768685817718506,
-0.08650007098913193,
0.04754583165049553,
0.5330055952072144,
0.05039382353425026,
-0.14152191579341888,
-0.11475911736488342,
-0.11650075018405914,
0.13717453181743622,
0.1791994273662567,
-0.3424223065376282,
-0.4834456443786621
] |
https://github.com/huggingface/datasets/issues/5418 | Add ProgressBar for `to_parquet` | That would be awesome ! You can comment `#self-assign` to assign you to this issue and open a PR :) Will be happy to review | ### Feature request
Add a progress bar for `Dataset.to_parquet`, similar to how `to_json` works.
### Motivation
It's a bit frustrating to not know how long a dataset will take to write to file and if it's stuck or not without a progress bar
### Your contribution
Sure I can help if needed | 25 | Add ProgressBar for `to_parquet`
### Feature request
Add a progress bar for `Dataset.to_parquet`, similar to how `to_json` works.
### Motivation
It's a bit frustrating to not know how long a dataset will take to write to file and if it's stuck or not without a progress bar
### Your contribution
Sure I can help if needed
That would be awesome ! You can comment `#self-assign` to assign you to this issue and open a PR :) Will be happy to review | [
-0.20450875163078308,
0.1920316517353058,
-0.21544012427330017,
-0.09467759728431702,
0.01625113934278488,
0.02099350094795227,
0.008307348936796188,
0.3782069683074951,
-0.21084432303905487,
0.172104611992836,
0.5207964777946472,
0.4878308176994324,
0.036368031054735184,
0.5576764941215515,
0.12505793571472168,
0.05043010786175728,
0.2787291705608368,
0.12286067754030228,
0.2644549012184143,
0.10743243992328644,
-0.15306033194065094,
0.06749608367681503,
0.08472155034542084,
-0.033267125487327576,
0.18050634860992432,
-0.10530636459589005,
-0.0686526671051979,
-0.1089831069111824,
-0.338510662317276,
-0.6562941074371338,
0.08313437551259995,
0.2571345269680023,
-0.11109267175197601,
0.18807007372379303,
-0.00010586954158497974,
-0.3018385171890259,
0.559076189994812,
0.05633208900690079,
-0.2716236710548401,
-0.19970278441905975,
-0.25697994232177734,
-0.677508533000946,
0.3832291066646576,
-0.2824941575527191,
-0.030884379521012306,
-0.26045742630958557,
0.18938148021697998,
-0.2042582929134369,
0.2314494550228119,
0.059313345700502396,
0.26481184363365173,
0.012885186821222305,
0.04918249323964119,
-0.14508168399333954,
0.652907133102417,
0.31852206587791443,
-0.39612454175949097,
-0.1232968270778656,
0.6524069309234619,
-0.06149192899465561,
-0.09309983998537064,
0.3369285464286804,
0.2248285412788391,
-0.2781403362751007,
0.2885420024394989,
0.0465322844684124,
0.15316161513328552,
-0.231134295463562,
-0.11049304157495499,
0.0045297592878341675,
0.5696819424629211,
-0.23687690496444702,
-0.25777193903923035,
-0.2613730728626251,
-0.012917148880660534,
-0.25119251012802124,
-0.08578404039144516,
0.12531961500644684,
0.09823858737945557,
-0.023437853902578354,
-0.24447891116142273,
-0.26231932640075684,
-0.21295955777168274,
-0.060480937361717224,
0.1377471685409546,
-0.03470124304294586,
-0.13121335208415985,
-0.05531427264213562,
-0.17373590171337128,
0.04630670323967934,
-0.10856159776449203,
-0.029901966452598572,
-0.13751013576984406,
0.04316919296979904,
-0.38800495862960815,
-0.34198206663131714,
0.270315021276474,
0.10964051634073257,
0.15279164910316467,
0.418457567691803,
-0.07261192798614502,
0.06813802570104599,
0.07049016654491425,
0.07966731488704681,
0.29924532771110535,
-0.3063543438911438,
0.31216323375701904,
-0.354844331741333,
0.30629414319992065,
-0.0035346681252121925,
0.0184968039393425,
-0.07065998762845993,
0.3850918412208557,
-0.019565802067518234,
0.30100253224372864,
0.07322743535041809,
0.27826666831970215,
-0.4743610620498657,
0.15377222001552582,
0.3746969401836395,
0.3654082715511322,
-0.1435498595237732,
-0.15939489006996155,
0.22672581672668457,
0.037099674344062805,
-0.12270521372556686,
-0.14266875386238098,
0.14320072531700134,
0.12317322939634323,
-0.10076141357421875,
-0.1448855847120285,
0.013202422298491001,
-0.2892233431339264,
0.11647255718708038,
-0.013848848640918732,
0.14025649428367615,
-0.12728247046470642,
0.20840634405612946,
-0.047825396060943604,
0.16421478986740112,
0.3772984743118286,
-0.12225519120693207,
0.030547194182872772,
-0.08642993867397308,
-0.1892779916524887,
0.01612347550690174,
0.0814393013715744,
-0.1029646173119545,
-0.5101639032363892,
0.2661186754703522,
0.011891290545463562,
-0.11516569554805756,
-0.24226908385753632,
0.2388259321451187,
-0.12142505496740341,
-0.20228199660778046,
-0.45385631918907166,
0.5406695604324341,
-0.12820816040039062,
-0.033405981957912445,
0.013409443199634552,
0.07137438654899597,
-0.0964389443397522,
-0.20687495172023773,
-0.03503555804491043,
0.19395317137241364,
-0.34420114755630493,
0.0208822563290596,
-0.07812556624412537,
-0.16064877808094025,
0.19152042269706726,
0.02049105241894722,
0.035138875246047974,
-0.008562982082366943,
0.14565803110599518,
0.21763478219509125,
0.5187851786613464,
0.08042280375957489,
0.049659132957458496,
0.14210039377212524,
-0.22722594439983368,
-0.1460258513689041,
0.2460637092590332,
0.09191925823688507,
0.43538132309913635,
-0.07148392498493195,
-0.17462483048439026,
0.158711239695549,
-0.18638208508491516,
-0.014995969831943512,
-0.37212976813316345,
-0.09566940367221832,
0.09779089689254761,
0.3884391486644745,
-0.15792809426784515,
-0.10948457568883896,
0.25996091961860657,
-0.33401933312416077,
0.2763615846633911,
-0.14524158835411072,
0.20488479733467102,
0.0580841526389122,
0.5045225024223328,
-0.04573919624090195,
-0.1348375678062439,
-0.25278565287590027,
-0.16403928399085999,
0.062394119799137115,
0.08398155868053436,
0.002370402216911316,
0.11747519671916962,
-0.1291622817516327,
-0.09675353765487671,
0.15531621873378754,
-0.0170690156519413,
0.0029955189675092697,
0.15427131950855255,
-0.032102070748806,
-0.11106188595294952,
0.13837413489818573,
-0.39781996607780457,
0.14739049971103668,
-0.4596865475177765,
0.01412065327167511,
-0.05338424816727638,
0.3985939919948578,
0.12773726880550385,
-0.4527529180049896,
0.20821550488471985,
0.09782294929027557,
0.07653465121984482,
-0.04969673976302147,
0.11537560075521469,
0.019235510379076004,
0.04461930692195892,
0.34209954738616943,
0.3206325173377991,
0.1720789223909378,
-0.004502078518271446,
-0.008625879883766174,
-0.020132029429078102,
-0.10652473568916321,
-0.18088512122631073,
-0.0005583763122558594,
-0.45116594433784485,
0.06591272354125977,
0.1730838567018509,
0.39931169152259827,
0.01155979186296463,
-0.1988535076379776,
0.11504532396793365,
0.07641837000846863,
-0.16821132600307465,
0.1326857954263687,
0.12210589647293091,
0.21034371852874756,
-0.22615207731723785,
-0.4179697036743164,
-0.37105485796928406,
0.4655854403972626,
0.7122946381568909,
0.15153048932552338,
-0.0810789093375206,
0.546014666557312,
0.27708354592323303,
-0.2219603955745697,
0.09587614238262177,
0.09137043356895447,
0.06593827158212662,
0.3326084315776825,
0.18190254271030426,
-0.10175549238920212,
0.05638714134693146,
-0.19267231225967407,
0.014680840075016022,
-0.06986169517040253,
-0.19216036796569824,
0.08935198187828064,
0.3219932019710541,
0.008885741233825684,
-0.08297362923622131,
-0.25785839557647705,
-0.27893519401550293,
0.06633900851011276,
0.009806543588638306,
-0.11492554843425751,
-0.004283333197236061,
-0.016196515411138535,
-0.0489286445081234,
0.24024136364459991,
-0.0061400532722473145,
-0.41690319776535034,
0.24294225871562958,
0.18838545680046082,
-0.23182520270347595,
-0.007450127974152565,
0.027918972074985504,
0.45703861117362976,
-0.26595208048820496,
0.2567598223686218,
-0.5280297994613647,
-0.47210758924484253,
0.013102160766720772,
0.21670587360858917,
-0.004650070797652006,
-0.012301401235163212,
0.5441489815711975,
-0.017412902787327766,
0.3958895802497864,
-0.5815008282661438,
-0.4329160451889038,
-0.16019360721111298,
-0.10140490531921387,
0.16078278422355652,
0.08590778708457947,
0.2932794690132141,
0.03689594566822052,
-0.14313985407352448,
0.15091371536254883,
-0.058379217982292175,
-0.14522850513458252,
-0.2783881425857544,
-0.014526454731822014,
0.03536276891827583,
0.023721158504486084,
-0.07853438705205917,
-0.2571679949760437,
-0.4821523427963257,
0.5797294974327087,
0.17935699224472046,
0.012786317616701126,
-0.36733925342559814,
-0.19538074731826782,
0.10532043129205704,
-0.11158473789691925,
0.2249031662940979,
0.09347402304410934,
-0.5423513650894165,
0.3111467957496643,
-0.17668560147285461,
-0.18555033206939697,
0.16683445870876312,
0.24216197431087494,
-0.0963580459356308,
-0.10988277941942215,
-0.45856159925460815,
-0.14497047662734985,
-0.2775985598564148,
0.0023725703358650208,
-0.18520310521125793,
-0.013402314856648445,
0.1759137362241745,
0.2520851492881775,
-0.27996188402175903,
0.07995710521936417,
-0.534399688243866,
0.00011711567640304565,
0.3744654953479767,
0.13811442255973816,
-0.2960372865200043,
0.3097184896469116,
-0.011187976226210594,
0.3957265615463257,
-0.050166912376880646,
0.049908172339200974,
0.43672093749046326,
0.2072417289018631,
0.2215415984392166,
-0.28870150446891785,
-0.22269967198371887,
-0.03034033812582493,
-0.1727285087108612,
-0.1472036987543106,
0.09169640392065048,
-0.013993095606565475,
-0.19010134041309357,
0.019459232687950134,
-0.24547970294952393,
0.02028762549161911,
-0.14122620224952698,
-0.012267587706446648,
0.1850498765707016,
0.063371442258358,
-0.20818771421909332,
-0.10952158272266388,
0.004566892981529236,
-0.022449027746915817,
0.04835968092083931,
0.4306933283805847,
0.3048115670681,
-0.1988919973373413,
-0.2116180658340454,
-0.06262976676225662,
-0.34196358919143677,
0.13661795854568481,
-0.15075238049030304,
-0.30290958285331726,
-0.3323177397251129,
-0.1619851291179657,
0.0036040619015693665,
-0.25994402170181274,
0.5359763503074646,
-0.19348089396953583,
-0.057343386113643646,
0.2509058117866516,
0.03866783529520035,
-0.020436910912394524,
0.011467400938272476,
0.0962786078453064,
0.15246322751045227,
0.19624270498752594,
0.6601138114929199,
-0.3174431622028351,
-0.015194128267467022,
0.20761534571647644,
0.041967395693063736,
-0.03991151601076126,
-0.2235497534275055,
-0.19677428901195526,
0.07438007742166519,
-0.2700033485889435,
0.3740726411342621,
0.06397559493780136,
0.046897489577531815,
0.02930820733308792,
-0.43374308943748474,
-0.034037619829177856,
-0.11783146858215332,
-0.16548703610897064,
0.018314611166715622,
0.056734349578619,
-0.12316560000181198,
0.17537766695022583,
-0.3146425783634186,
0.21033340692520142,
-0.03618676960468292,
0.07362291216850281,
-0.06062204763293266,
-0.15345999598503113,
0.2216048538684845,
-0.29152435064315796,
0.4498031437397003,
0.3443893790245056,
0.21132487058639526,
0.5970525145530701,
-0.10612323880195618,
0.45456254482269287,
-0.24049821496009827,
0.03290144354104996,
0.06946883350610733,
-0.11578304320573807,
-0.2596469223499298,
-0.25190022587776184,
0.4504207670688629,
-0.1387835144996643,
-0.026908375322818756,
0.1531009078025818,
0.32712632417678833,
-0.04535602778196335,
0.15976190567016602,
0.08702404797077179,
1.1649696826934814,
-0.3077070713043213,
0.10043797641992569,
-0.13343194127082825,
-0.6491802334785461,
0.4582945704460144,
-0.4117175340652466,
-0.03735791891813278,
-0.31538552045822144,
-0.20773330330848694,
0.033589914441108704,
-0.18844389915466309,
0.08650699257850647,
0.19504715502262115,
-0.37445175647735596,
0.09978307783603668,
0.11618384718894958,
0.13029097020626068,
-0.18847773969173431,
0.46869105100631714,
0.011072034016251564,
-0.1662372648715973,
-0.5521658062934875,
0.2724391520023346,
-0.000077810138463974,
-0.19602185487747192,
-0.15198922157287598,
-0.26041287183761597,
0.060693997889757156,
0.17497047781944275,
-0.2366705685853958,
0.09731590002775192,
0.37393712997436523,
-0.033592645078897476,
-0.15122967958450317,
-0.517021656036377,
0.23922666907310486,
-0.27399104833602905,
0.32130181789398193,
0.20653221011161804,
-0.21001937985420227,
0.12977540493011475,
-0.11224650591611862,
0.18093271553516388,
0.006025958806276321,
-0.009928119368851185,
0.1791025698184967,
-0.29244381189346313,
-0.11895846575498581,
0.256491482257843,
-0.15319082140922546,
-0.4549573063850403,
-0.13561296463012695,
0.07566970586776733,
0.31947261095046997,
-0.04788239672780037,
-0.032605454325675964,
0.15395843982696533,
-0.09502290189266205,
-0.23774747550487518,
0.23659545183181763,
0.3028731942176819,
-0.04976821318268776,
0.1653987318277359,
-0.12275546789169312,
-0.03454211354255676,
-0.23029474914073944,
0.054577864706516266,
-0.23831456899642944,
0.016551580280065536,
0.14948531985282898,
0.24360938370227814,
-0.30929285287857056,
-0.3141297399997711,
-0.0005005002021789551,
0.46709126234054565,
-0.05527110397815704,
0.07763669639825821,
-0.07928293943405151,
0.06754308938980103,
0.07444839924573898,
0.07957163453102112,
-0.008880052715539932,
-0.14846232533454895,
-0.07275061309337616,
-0.1489175409078598,
-0.3144914209842682,
0.07593042403459549,
-0.019092116504907608,
0.23778827488422394,
-0.07193717360496521,
0.012128209695219994,
0.024196406826376915,
-0.19254659116268158,
-0.40452104806900024,
-0.1168641671538353,
-0.3617493212223053,
0.13102924823760986,
0.5681028366088867,
-0.0926387682557106,
-0.16221652925014496,
-0.0781034380197525,
0.09587222337722778,
-0.07130790501832962,
-0.13608983159065247,
-0.2874537408351898,
0.06622886657714844,
0.07307814806699753,
-0.04680187255144119,
0.3649761378765106,
-0.12848630547523499,
0.08054093271493912,
-0.09359556436538696,
0.05664416775107384,
0.014785699546337128,
-0.2641069293022156,
-0.08459724485874176,
-0.04767061024904251,
0.268361896276474,
0.15532076358795166,
-0.15610714256763458,
-0.11112222075462341,
0.2384827584028244,
0.17459270358085632,
-0.2537350654602051,
0.09133918583393097,
-0.10994671285152435,
0.05547645688056946,
0.2078273743391037,
0.19426575303077698,
0.2162943184375763,
0.3090868294239044,
0.08288272470235825,
0.2323969006538391,
-0.15552960336208344,
0.12804193794727325,
0.3372231423854828,
0.3298877477645874,
0.02518553100526333,
-0.1447013020515442,
0.21025696396827698,
0.2961932122707367,
0.07385370880365372,
0.08193182945251465,
0.2928076386451721,
-0.16432932019233704,
-0.030574748292565346,
-0.06051559001207352,
-0.09043441712856293,
0.4008505344390869,
0.016101300716400146,
0.308917760848999,
0.31250354647636414,
-0.21100862324237823,
0.05009832978248596,
-0.10503138601779938,
0.01429789885878563,
0.09769027680158615,
0.2746966481208801,
0.22438213229179382,
0.09981146454811096,
0.22169901430606842,
0.24182739853858948,
0.4411192536354065,
0.45988860726356506,
0.16065648198127747,
0.0007738620042800903,
0.3434317111968994,
0.1193309873342514,
0.2147039771080017,
0.426321417093277,
-0.007476046681404114,
0.4506601095199585,
0.11810468882322311,
0.24074701964855194,
-0.3295854926109314,
-0.23743848502635956,
0.22031791508197784,
0.1838940978050232,
0.03908969834446907,
0.25687384605407715,
-0.2888789474964142,
-0.0850590318441391,
-0.03967822343111038,
-0.19832156598567963,
0.2310933768749237,
-0.13327361643314362,
0.03124774992465973,
0.5078195929527283,
-0.07616431266069412,
0.0761764720082283,
-0.10359389334917068,
0.515857994556427,
-0.0595562607049942,
-0.12228333204984665,
-0.030353426933288574,
-0.0815204381942749,
-0.05608623847365379,
0.11926918476819992,
0.024999696761369705,
0.34941917657852173,
-0.1473444551229477,
0.06796075403690338,
-0.039856187999248505,
-0.11430618166923523,
0.028212059289216995,
0.18064026534557343,
-0.043527260422706604,
-0.015908613801002502,
0.24048034846782684,
0.23693925142288208,
-0.2032751441001892,
0.29724204540252686,
0.039007604122161865,
-0.14946913719177246,
-0.4312628507614136,
0.18268993496894836,
0.3557535707950592,
-0.40593844652175903,
0.11874214559793472,
-0.15226930379867554,
-0.22941073775291443,
-0.20125839114189148,
0.060457177460193634,
0.009816535748541355,
-0.17021775245666504,
-0.11870350688695908,
0.15393231809139252,
0.04682265222072601,
0.33119338750839233,
0.02628285065293312,
0.03533858060836792,
-0.2578476667404175,
-0.29226213693618774,
-0.48001304268836975,
-0.10684908181428909,
0.054173365235328674,
-0.08071041852235794,
0.08898577094078064,
0.2831851541996002,
0.07480333745479584,
0.3089176416397095,
0.19570639729499817,
-0.044967785477638245,
-0.4091579020023346,
0.02118266373872757,
-0.4128512740135193,
-0.03667652979493141,
0.45324254035949707,
-0.15208333730697632,
-0.037883512675762177,
0.14191731810569763,
0.19394341111183167,
0.06852949410676956,
0.16195467114448547,
-0.05338764935731888,
-0.2598174214363098,
0.09293253719806671,
-0.1422082483768463,
0.3910832107067108,
-0.09416680783033371,
-0.005336731672286987,
-0.10003135353326797,
-0.30580711364746094,
0.10807972401380539,
-0.30967164039611816,
-0.04204357787966728,
0.43656986951828003,
-0.3087548613548279,
0.40329062938690186,
-0.018546778708696365,
0.14595408737659454,
-0.18878011405467987,
-0.09332457929849625,
-0.1728902906179428,
0.06246187910437584,
0.03733307868242264,
-0.07651057839393616,
0.4796369671821594,
0.04603360965847969,
-0.23669999837875366,
-0.17717677354812622,
0.11170251667499542,
0.24348212778568268,
-0.3140079975128174,
-0.06953717768192291,
0.16184332966804504,
-0.05896696075797081,
-0.41295287013053894,
0.08479174226522446,
0.12128648161888123,
0.09537968039512634,
0.1968460977077484,
-0.4231836497783661,
-0.24222517013549805,
0.21833328902721405,
-0.07249003648757935,
-0.09726670384407043,
0.5177722573280334,
0.03498345986008644,
-0.16714151203632355,
-0.09951430559158325,
-0.09711943566799164,
0.16511908173561096,
0.11759898066520691,
-0.3199307918548584,
-0.434720516204834
] |
https://github.com/huggingface/datasets/issues/5414 | Sharding error with Multilingual LibriSpeech | Thanks for reporting, @Nithin-Holla.
This is a known issue for multiple datasets and we are investigating it:
- See e.g.: https://huggingface.co/datasets/ami/discussions/3 | ### Describe the bug
Loading the German Multilingual LibriSpeech dataset results in a RuntimeError regarding sharding with the following stacktrace:
```
Downloading and preparing dataset multilingual_librispeech/german to /home/nithin/datadrive/cache/huggingface/datasets/facebook___multilingual_librispeech/german/2.1.0/1904af50f57a5c370c9364cc337699cfe496d4e9edcae6648a96be23086362d0...
Downloading data files: 100%
3/3 [00:00<00:00, 107.23it/s]
Downloading data files: 100%
1/1 [00:00<00:00, 35.08it/s]
Downloading data files: 100%
6/6 [00:00<00:00, 303.36it/s]
Downloading data files: 100%
3/3 [00:00<00:00, 130.37it/s]
Downloading data files: 100%
1049/1049 [00:00<00:00, 4491.40it/s]
Downloading data files: 100%
37/37 [00:00<00:00, 1096.78it/s]
Downloading data files: 100%
40/40 [00:00<00:00, 1003.93it/s]
Extracting data files: 100%
3/3 [00:11<00:00, 2.62s/it]
Generating train split:
469942/0 [34:13<00:00, 273.21 examples/s]
Output exceeds the size limit. Open the full output data in a text editor
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-14-74fa6d092bdc> in <module>
----> 1 mls = load_dataset(MLS_DATASET,
2 LANGUAGE,
3 cache_dir="~/datadrive/cache/huggingface/datasets",
4 ignore_verifications=True)
/anaconda/envs/py38_default/lib/python3.8/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, **config_kwargs)
1755
1756 # Download and prepare data
-> 1757 builder_instance.download_and_prepare(
1758 download_config=download_config,
1759 download_mode=download_mode,
/anaconda/envs/py38_default/lib/python3.8/site-packages/datasets/builder.py in download_and_prepare(self, output_dir, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs)
858 if num_proc is not None:
859 prepare_split_kwargs["num_proc"] = num_proc
--> 860 self._download_and_prepare(
861 dl_manager=dl_manager,
862 verify_infos=verify_infos,
/anaconda/envs/py38_default/lib/python3.8/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_splits_kwargs)
1609
1610 def _download_and_prepare(self, dl_manager, verify_infos, **prepare_splits_kwargs):
...
RuntimeError: Sharding is ambiguous for this dataset: we found several data sources lists of different lengths, and we don't know over which list we should parallelize:
- key audio_archives has length 1049
- key local_extracted_archive has length 1049
- key limited_ids_paths has length 1
To fix this, check the 'gen_kwargs' and make sure to use lists only for data sources, and use tuples otherwise. In the end there should only be one single list, or several lists with the same length.
```
### Steps to reproduce the bug
Here is the code to reproduce it:
```python
from datasets import load_dataset
MLS_DATASET = "facebook/multilingual_librispeech"
LANGUAGE = "german"
mls = load_dataset(MLS_DATASET,
LANGUAGE,
cache_dir="~/datadrive/cache/huggingface/datasets",
ignore_verifications=True)
```
### Expected behavior
The expected behaviour is that the dataset is successfully loaded.
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.4.0-1094-azure-x86_64-with-glibc2.10
- Python version: 3.8.8
- PyArrow version: 10.0.1
- Pandas version: 1.2.4 | 21 | Sharding error with Multilingual LibriSpeech
### Describe the bug
Loading the German Multilingual LibriSpeech dataset results in a RuntimeError regarding sharding with the following stacktrace:
```
Downloading and preparing dataset multilingual_librispeech/german to /home/nithin/datadrive/cache/huggingface/datasets/facebook___multilingual_librispeech/german/2.1.0/1904af50f57a5c370c9364cc337699cfe496d4e9edcae6648a96be23086362d0...
Downloading data files: 100%
3/3 [00:00<00:00, 107.23it/s]
Downloading data files: 100%
1/1 [00:00<00:00, 35.08it/s]
Downloading data files: 100%
6/6 [00:00<00:00, 303.36it/s]
Downloading data files: 100%
3/3 [00:00<00:00, 130.37it/s]
Downloading data files: 100%
1049/1049 [00:00<00:00, 4491.40it/s]
Downloading data files: 100%
37/37 [00:00<00:00, 1096.78it/s]
Downloading data files: 100%
40/40 [00:00<00:00, 1003.93it/s]
Extracting data files: 100%
3/3 [00:11<00:00, 2.62s/it]
Generating train split:
469942/0 [34:13<00:00, 273.21 examples/s]
Output exceeds the size limit. Open the full output data in a text editor
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-14-74fa6d092bdc> in <module>
----> 1 mls = load_dataset(MLS_DATASET,
2 LANGUAGE,
3 cache_dir="~/datadrive/cache/huggingface/datasets",
4 ignore_verifications=True)
/anaconda/envs/py38_default/lib/python3.8/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, **config_kwargs)
1755
1756 # Download and prepare data
-> 1757 builder_instance.download_and_prepare(
1758 download_config=download_config,
1759 download_mode=download_mode,
/anaconda/envs/py38_default/lib/python3.8/site-packages/datasets/builder.py in download_and_prepare(self, output_dir, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs)
858 if num_proc is not None:
859 prepare_split_kwargs["num_proc"] = num_proc
--> 860 self._download_and_prepare(
861 dl_manager=dl_manager,
862 verify_infos=verify_infos,
/anaconda/envs/py38_default/lib/python3.8/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_splits_kwargs)
1609
1610 def _download_and_prepare(self, dl_manager, verify_infos, **prepare_splits_kwargs):
...
RuntimeError: Sharding is ambiguous for this dataset: we found several data sources lists of different lengths, and we don't know over which list we should parallelize:
- key audio_archives has length 1049
- key local_extracted_archive has length 1049
- key limited_ids_paths has length 1
To fix this, check the 'gen_kwargs' and make sure to use lists only for data sources, and use tuples otherwise. In the end there should only be one single list, or several lists with the same length.
```
### Steps to reproduce the bug
Here is the code to reproduce it:
```python
from datasets import load_dataset
MLS_DATASET = "facebook/multilingual_librispeech"
LANGUAGE = "german"
mls = load_dataset(MLS_DATASET,
LANGUAGE,
cache_dir="~/datadrive/cache/huggingface/datasets",
ignore_verifications=True)
```
### Expected behavior
The expected behaviour is that the dataset is successfully loaded.
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.4.0-1094-azure-x86_64-with-glibc2.10
- Python version: 3.8.8
- PyArrow version: 10.0.1
- Pandas version: 1.2.4
Thanks for reporting, @Nithin-Holla.
This is a known issue for multiple datasets and we are investigating it:
- See e.g.: https://huggingface.co/datasets/ami/discussions/3 | [
-0.3553851246833801,
-0.14403824508190155,
0.00005336478352546692,
0.5673322081565857,
0.06083439290523529,
-0.1562197506427765,
0.609243631362915,
0.18272939324378967,
-0.19708792865276337,
0.07945094257593155,
0.14631296694278717,
-0.5302384495735168,
-0.2096387892961502,
0.201295867562294,
0.09497150778770447,
-0.46869054436683655,
-0.10204150527715683,
-0.18830719590187073,
-0.19575461745262146,
0.0004152916371822357,
-0.012258145958185196,
0.3850859999656677,
-0.1047203317284584,
-0.02055835723876953,
-0.2299635112285614,
-0.023346660658717155,
-0.12415973842144012,
0.4752528667449951,
-0.006209731101989746,
0.06649961322546005,
0.14152221381664276,
-0.45372286438941956,
0.039500679820775986,
0.3407248854637146,
-0.00011138779518660158,
-0.1592511534690857,
0.2606121897697449,
-0.10223080962896347,
0.10226398706436157,
-0.1902822107076645,
-0.21029791235923767,
-0.14625763893127441,
-0.38231006264686584,
-0.21308058500289917,
0.16378971934318542,
0.5907265543937683,
-0.12178102135658264,
-0.21279707551002502,
0.12152910977602005,
0.15507301688194275,
0.2258908599615097,
0.034508585929870605,
0.061552610248327255,
0.1511821448802948,
0.5518603920936584,
-0.31265002489089966,
-0.1411513239145279,
0.11183544993400574,
-0.08253121376037598,
-0.024460110813379288,
-0.3819895088672638,
0.3105391263961792,
0.1591390073299408,
-0.18707385659217834,
-0.427839994430542,
-0.008221150375902653,
-0.08637087792158127,
-0.16202577948570251,
0.195871502161026,
0.4427543580532074,
-0.2942947745323181,
-0.013570014387369156,
-0.08152682334184647,
-0.07834143191576004,
-0.1461692899465561,
-0.42924150824546814,
0.4679591953754425,
0.46037283539772034,
-0.19732148945331573,
-0.03594290092587471,
-0.05558400601148605,
-0.23034125566482544,
-0.12868204712867737,
0.17664401233196259,
-0.07057849317789078,
0.31071189045906067,
0.023597687482833862,
0.1580938696861267,
0.28637269139289856,
-0.21220232546329498,
-0.09539299458265305,
-0.030040938407182693,
-0.16225296258926392,
0.013055689632892609,
-0.23303528130054474,
0.09381236135959625,
-0.005817607045173645,
0.2226307988166809,
0.2884899079799652,
0.0732119157910347,
0.24215209484100342,
0.18221387267112732,
0.07542364299297333,
0.18230551481246948,
0.04308381676673889,
0.010722918435931206,
-0.017856016755104065,
0.028907079249620438,
0.13389214873313904,
0.09670907258987427,
0.1119176596403122,
0.01370583102107048,
0.125802680850029,
-0.5072500109672546,
-0.2683059573173523,
0.31503403186798096,
-0.016351746395230293,
-0.18436086177825928,
0.022310106083750725,
0.3042762875556946,
-0.35717031359672546,
0.038035403937101364,
0.23696525394916534,
0.1987173855304718,
0.06428923457860947,
-0.1274222433567047,
-0.02044239267706871,
0.08265039324760437,
-0.3278360664844513,
-0.3568764626979828,
-0.23907789587974548,
0.24613156914710999,
-0.42398694157600403,
-0.1293088048696518,
0.0635479986667633,
0.06944030523300171,
0.07523132860660553,
-0.1411295086145401,
0.11247707903385162,
-0.11087087541818619,
-0.062116511166095734,
-0.3472372889518738,
0.30859148502349854,
0.1800496131181717,
-0.1447087824344635,
-0.16144834458827972,
0.07887168228626251,
-0.23635418713092804,
-0.07830970734357834,
0.1669480949640274,
-0.0641571506857872,
-0.3189556300640106,
-0.24585287272930145,
0.162139892578125,
-0.11857607215642929,
0.259965717792511,
-0.13211405277252197,
0.17721985280513763,
0.6111288070678711,
-0.185744971036911,
0.13441866636276245,
-0.3302016258239746,
-0.3355872929096222,
-0.11569909006357193,
0.19628183543682098,
0.4012982249259949,
-0.19045233726501465,
-0.05407952517271042,
-0.17394958436489105,
-0.14296270906925201,
0.763736367225647,
0.45120829343795776,
-0.16896629333496094,
-0.1110583171248436,
-0.3114059269428253,
0.8331649899482727,
0.5002878904342651,
0.06347836554050446,
-0.2840953767299652,
0.20211823284626007,
-0.295198917388916,
0.3335484266281128,
0.0795200988650322,
0.15087947249412537,
0.15709908306598663,
0.07050694525241852,
-0.1372852921485901,
0.501634418964386,
-0.13123761117458344,
0.04765109717845917,
-0.40830081701278687,
-0.1362038105726242,
-0.03290771692991257,
-0.06704932451248169,
0.2674766778945923,
-0.36465808749198914,
0.37389451265335083,
0.34656140208244324,
0.19222626090049744,
-0.17155471444129944,
0.3628758192062378,
0.17463941872119904,
-0.010534610599279404,
0.10883692651987076,
-0.19908902049064636,
-0.29955369234085083,
-0.26542365550994873,
0.0829181894659996,
-0.1659100502729416,
0.4570006728172302,
-0.14866994321346283,
0.03553033620119095,
0.15073317289352417,
-0.09419328719377518,
-0.11047151684761047,
-0.04374803230166435,
0.061060234904289246,
0.10359378159046173,
-0.2137097418308258,
0.0009339675307273865,
0.19143198430538177,
0.20960848033428192,
-0.18870382010936737,
0.011669430881738663,
-0.5598101615905762,
0.3052158057689667,
-0.36375200748443604,
-0.3611045181751251,
-0.11158709973096848,
0.2338027060031891,
-0.079299695789814,
-0.153962641954422,
-0.1549030840396881,
0.3847116529941559,
-0.0168310459703207,
-0.04408454895019531,
0.020454050973057747,
0.22638988494873047,
0.2285630702972412,
0.06739862263202667,
0.06686948239803314,
-0.07229362428188324,
-0.19965937733650208,
-0.09170056134462357,
0.0014663971960544586,
0.26490187644958496,
0.08448701351881027,
0.08883817493915558,
0.019677966833114624,
-0.006658029742538929,
0.24534761905670166,
-0.11110447347164154,
-0.033102937042713165,
-0.4900321066379547,
0.3614455461502075,
-0.24530775845050812,
-0.17388851940631866,
-0.06267785280942917,
-0.4240008592605591,
-0.18735912442207336,
0.628767728805542,
0.12093061208724976,
0.21079781651496887,
0.12208149582147598,
0.16939586400985718,
-0.030267350375652313,
0.3559958040714264,
0.42050597071647644,
0.2056540846824646,
-0.028587553650140762,
0.36564141511917114,
0.03403480723500252,
0.16134056448936462,
-0.29555732011795044,
0.11853695660829544,
-0.09789220988750458,
0.12641358375549316,
0.31227773427963257,
-0.004731656517833471,
0.11155912280082703,
-0.4591519236564636,
-0.3208783268928528,
-0.06505317240953445,
0.1636071354150772,
-0.29017898440361023,
0.09085971862077713,
-0.4097723066806793,
-0.25231391191482544,
-0.33166980743408203,
-0.10585470497608185,
-0.5156548023223877,
-0.23863664269447327,
-0.022531189024448395,
0.13541094958782196,
-0.2848063111305237,
0.15647383034229279,
0.2780328094959259,
0.04297645390033722,
0.18625269830226898,
0.008683274500072002,
-0.0522984080016613,
0.01705295406281948,
-0.5373182892799377,
0.08210384845733643,
0.5507690906524658,
0.11121945828199387,
0.1497288942337036,
-0.09365487843751907,
-0.13420161604881287,
-0.3497754633426666,
-0.5205245614051819,
0.10691267251968384,
-0.08062892407178879,
0.2308932989835739,
0.18447160720825195,
0.011397354304790497,
-0.28149211406707764,
-0.3345947265625,
0.3140973150730133,
0.10917970538139343,
-0.24384956061840057,
0.3455435037612915,
0.20939534902572632,
0.26405978202819824,
-0.15326955914497375,
-0.07662995904684067,
0.01320158876478672,
-0.3845032751560211,
0.2362315058708191,
-0.14071547985076904,
0.22450226545333862,
-0.22203238308429718,
0.15533031523227692,
-0.0396735705435276,
-0.20502349734306335,
0.08161868900060654,
-0.08572625368833542,
-0.24848735332489014,
0.04591473191976547,
-0.24967516958713531,
-0.35016798973083496,
-0.06024656817317009,
0.30257511138916016,
0.327971488237381,
0.268582284450531,
-0.5833420753479004,
0.08587127923965454,
-0.01371794007718563,
0.1847015917301178,
-0.14002929627895355,
-0.2158087193965912,
0.30399125814437866,
0.09784326702356339,
-0.040995243936777115,
0.0445810928940773,
0.08781808614730835,
0.048713911324739456,
-0.2169373333454132,
0.34134534001350403,
0.01974411867558956,
0.4584343731403351,
0.6529603004455566,
0.6446534991264343,
0.13543899357318878,
0.01475222036242485,
0.29301732778549194,
0.2910960614681244,
-0.11902251839637756,
-0.2927086651325226,
-0.28690508008003235,
0.21874967217445374,
-0.09881606698036194,
0.04987240582704544,
0.23982028663158417,
-0.04663460701704025,
-0.26418536901474,
-0.01739870198071003,
-0.12094448506832123,
-0.18276044726371765,
-0.4520680606365204,
0.49958664178848267,
-0.239823579788208,
0.1985989511013031,
-0.14847493171691895,
-0.1473887860774994,
0.1284025013446808,
-0.22921738028526306,
0.04987519606947899,
0.20127464830875397,
-0.2189803421497345,
0.02886321395635605,
0.1656489074230194,
-0.05078338086605072,
-0.3551281690597534,
0.3352942168712616,
0.33889782428741455,
0.4240129888057709,
-0.4333592355251312,
-0.2851315438747406,
0.008966892957687378,
-0.10451880842447281,
0.21611154079437256,
-0.2139224410057068,
0.16891533136367798,
0.09715794026851654,
-0.1421283781528473,
0.06273583322763443,
0.002599243074655533,
-0.23601168394088745,
0.21473971009254456,
0.7283767461776733,
0.16301292181015015,
-0.4176468849182129,
0.047789067029953,
0.4372180998325348,
0.18246202170848846,
-0.026997443288564682,
0.09684459120035172,
-0.14862197637557983,
-0.027536358684301376,
-0.40510034561157227,
0.2120613008737564,
-0.09762692451477051,
0.39669153094291687,
0.13155189156532288,
-0.041954945772886276,
0.23527969419956207,
-0.13669374585151672,
-0.056492879986763,
-0.030240382999181747,
-0.18122386932373047,
-0.044754981994628906,
-0.013072621077299118,
-0.42732664942741394,
0.016802571713924408,
0.1704956293106079,
0.2545814514160156,
0.08550647646188736,
-0.14583517611026764,
0.11764080077409744,
-0.02026960626244545,
-0.009119980037212372,
0.24038970470428467,
-0.02420986443758011,
-0.05733565241098404,
0.38647574186325073,
0.294452428817749,
0.0623784139752388,
0.20060238242149353,
0.22366954386234283,
0.3993072509765625,
-0.26870793104171753,
0.027936508879065514,
0.0930347740650177,
0.0027854498475790024,
0.045159712433815,
0.2086622267961502,
-0.09814442694187164,
-0.4284004867076874,
0.3498556613922119,
0.09868836402893066,
0.9732614159584045,
-0.09008309245109558,
0.2017856240272522,
0.0004693698137998581,
0.1671512871980667,
-0.17845503985881805,
-0.058457281440496445,
0.19353705644607544,
-0.17179633677005768,
-0.04894288629293442,
0.027897773310542107,
0.057064931839704514,
0.3583754897117615,
0.12476332485675812,
-0.05457345023751259,
-0.042045727372169495,
-0.012717850506305695,
0.1031012237071991,
-0.11169444769620895,
0.3433433771133423,
-0.22078195214271545,
-0.24134421348571777,
0.20154835283756256,
0.11382955312728882,
-0.130323588848114,
0.0628424733877182,
-0.15398478507995605,
-0.1005711629986763,
0.01721837744116783,
-0.13682737946510315,
-0.47683095932006836,
0.2388639748096466,
-0.4205288589000702,
0.3418691158294678,
-0.46982595324516296,
-0.48317891359329224,
0.05702074244618416,
0.047578006982803345,
-0.07550209760665894,
0.13495197892189026,
0.026679260656237602,
0.12998174130916595,
0.25936058163642883,
-0.17276035249233246,
0.1992860585451126,
-0.16153760254383087,
0.22013844549655914,
-0.1368706226348877,
-0.07131172716617584,
-0.050769150257110596,
0.11926938593387604,
-0.33586424589157104,
0.11846107244491577,
0.09524810314178467,
0.09115491807460785,
-0.16695676743984222,
0.16445189714431763,
0.11849165707826614,
-0.14503838121891022,
-0.18639443814754486,
0.14043845236301422,
0.08795003592967987,
-0.2651907801628113,
-0.017856843769550323,
0.01990070380270481,
-0.1321769654750824,
-0.20330621302127838,
0.42919838428497314,
0.07491438835859299,
0.03635318577289581,
0.25748759508132935,
0.36420127749443054,
-0.24585674703121185,
-0.2448054552078247,
0.07312106341123581,
-0.04902041703462601,
-0.4230269193649292,
-0.10886746644973755,
-0.33634623885154724,
-0.058965593576431274,
-0.18910321593284607,
0.26788151264190674,
0.32330322265625,
0.20654252171516418,
-0.0805828720331192,
-0.4366646707057953,
-0.010228564031422138,
0.3596757650375366,
-0.12483885884284973,
0.13669227063655853,
-0.18450674414634705,
0.4376233220100403,
-0.15361157059669495,
0.19892176985740662,
-0.29078876972198486,
0.13350602984428406,
-0.2774984538555145,
0.1598668098449707,
0.45213454961776733,
-0.09481450170278549,
0.21321512758731842,
0.20607590675354004,
0.08341390639543533,
0.1747085452079773,
-0.09052009880542755,
-0.16084882616996765,
0.06596255302429199,
0.06626642495393753,
0.03122662380337715,
-0.09755998104810715,
-0.10983594506978989,
-0.1465650051832199,
0.005933597683906555,
-0.17749576270580292,
0.16070283949375153,
0.13017570972442627,
-0.13059478998184204,
-0.042110975831747055,
0.18246763944625854,
0.25769585371017456,
0.1406666338443756,
0.12392549961805344,
-0.2932377755641937,
0.13792386651039124,
-0.06623195111751556,
0.291867196559906,
0.12869992852210999,
-0.08348396420478821,
0.2004404515028,
0.09290925413370132,
0.053296349942684174,
0.08570563793182373,
0.284178763628006,
-0.12491920590400696,
-0.17340664565563202,
0.12270338833332062,
0.2702254354953766,
0.038562484085559845,
-0.12073680758476257,
-0.31963443756103516,
0.13159099221229553,
0.23052680492401123,
-0.048610784113407135,
-0.12069176137447357,
0.18313439190387726,
-0.19059675931930542,
0.018123280256986618,
0.26503831148147583,
0.09851838648319244,
0.030599094927310944,
0.028425991535186768,
0.142131507396698,
0.07948724180459976,
-0.3187243342399597,
0.0684124231338501,
-0.06547525525093079,
-0.5365458726882935,
0.2168053239583969,
0.15780842304229736,
-0.07821308076381683,
0.23109763860702515,
0.28148555755615234,
-0.156963050365448,
0.2570560574531555,
0.03273671865463257,
0.27385902404785156,
-0.11929889768362045,
-0.5962079167366028,
-0.22219137847423553,
0.18182942271232605,
0.11282167583703995,
0.19112789630889893,
-0.1067328006029129,
0.5509486198425293,
0.08347442746162415,
-0.19157597422599792,
-0.2449338436126709,
0.37512174248695374,
-0.25641322135925293,
0.07859906554222107,
-0.25005269050598145,
0.036625973880290985,
-0.29175204038619995,
0.12879474461078644,
0.02020256221294403,
0.2961217164993286,
0.5034111142158508,
0.24779681861400604,
-0.15329128503799438,
0.05636961758136749,
-0.266946941614151,
-0.052499957382678986,
-0.16809508204460144,
-0.457533597946167,
0.42868778109550476,
0.38741958141326904,
-0.10738115012645721,
-0.2582536041736603,
0.14453275501728058,
0.39482319355010986,
0.21702443063259125,
0.2222023904323578,
-0.024757910519838333,
-0.05287890508770943,
0.15140117704868317,
-0.3541816174983978,
0.45163214206695557,
0.4033670425415039,
0.5559317469596863,
0.3375745117664337,
0.05446654558181763,
-0.22106947004795074,
0.12632425129413605,
0.3610159158706665,
0.09549790620803833,
-0.08557344973087311,
-0.014635585248470306,
-0.23904234170913696,
-0.0147303007543087,
-0.3072027862071991,
-0.04840222746133804,
-0.44664353132247925,
0.09391991794109344,
0.5377393364906311,
-0.324531614780426,
0.1490163803100586,
0.02238192781805992,
0.05382419377565384,
0.30728691816329956,
0.4522819519042969,
0.18760335445404053,
0.02588891237974167,
-0.3046763837337494,
-0.34535425901412964,
-0.36703336238861084,
0.23883309960365295,
-0.28999242186546326,
0.38172969222068787,
-0.4143717586994171,
0.46448275446891785,
-0.14270809292793274,
0.2285514771938324,
0.014295578002929688,
-0.3360517621040344,
-0.24688149988651276,
0.1482900083065033,
-0.15278293192386627,
0.0851619690656662,
0.18820637464523315,
-0.29916179180145264,
0.02437300607562065,
-0.3652501702308655,
0.35111796855926514,
0.09431985020637512,
0.04506535828113556,
-0.021141432225704193,
-0.3607276678085327,
-0.08890825510025024,
0.027706708759069443,
0.22862893342971802,
0.3468250632286072,
0.20834915339946747,
-0.1232105940580368,
-0.17955709993839264,
-0.26387497782707214,
-0.31576859951019287,
0.01251992303878069,
0.4008503258228302,
-0.03547399118542671,
0.4317508637905121,
-0.02049173414707184,
0.11413973569869995,
-0.2793828845024109,
0.4347861707210541,
-0.11946907639503479,
0.08589987456798553,
-0.04210226610302925,
-0.016711261123418808,
0.2092377245426178,
0.06313648819923401,
0.07990653067827225,
0.4414496421813965,
0.00867188349366188,
-0.06985434889793396,
-0.2007674276828766,
-0.4889970123767853,
0.4124141335487366,
-0.23511117696762085,
-0.03692535310983658,
-0.04696488380432129,
0.09963428229093552,
0.12114173173904419,
0.064626544713974,
-0.516726553440094,
-0.2057609111070633,
0.18577638268470764,
0.1124136671423912,
-0.2939663529396057,
0.17521105706691742,
-0.07120457291603088,
-0.3393332362174988,
-0.04758477583527565,
-0.11782091856002808,
0.13060259819030762,
-0.5889579057693481,
0.29557380080223083,
-0.29165518283843994
] |
https://github.com/huggingface/datasets/issues/5413 | concatenate_datasets fails when two dataset with shards > 1 and unequal shard numbers | Hi ! Thanks for reporting :)
I managed to reproduce the hub using
```python
from datasets import concatenate_datasets, Dataset, load_from_disk
Dataset.from_dict({"a": range(9)}).save_to_disk("tmp/ds1")
ds1 = load_from_disk("tmp/ds1")
ds1 = concatenate_datasets([ds1, ds1])
Dataset.from_dict({"b": range(6)}).save_to_disk("tmp/ds2")
ds2 = load_from_disk("tmp/ds2")
ds2 = concatenate_datasets([ds2, ds2, ds2])
concatenate_datasets([ds1, ds2], axis=1)
```
and I get
```python
Traceback (most recent call last):
File "test.py", line 98, in <module>
dds = concatenate_datasets([ds1, ds2], axis=1)
File "/Users/.../datasets/combine.py", line 182, in concatenate_datasets
return _concatenate_map_style_datasets(dsets, info=info, split=split, axis=axis)
File "/Users/.../datasets/arrow_dataset.py", line 5499, in _concatenate_map_style_datasets
table = concat_tables([dset._data for dset in dsets], axis=axis)
File "/Users/.../datasets/table.py", line 1778, in concat_tables
return ConcatenationTable.from_tables(tables, axis=axis)
File "/Users/.../datasets/table.py", line 1483, in from_tables
blocks = _extend_blocks(blocks, table_blocks, axis=axis)
File "/Users/.../datasets/table.py", line 1477, in _extend_blocks
result[i].extend(row_blocks)
IndexError: list index out of range
```
It appears to happen when the two datasets have a number of shards that is not the same | ### Describe the bug
When using `concatenate_datasets([dataset1, dataset2], axis = 1)` to concatenate two datasets with shards > 1, it fails:
```
File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/combine.py", line 182, in concatenate_datasets
return _concatenate_map_style_datasets(dsets, info=info, split=split, axis=axis)
File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 5499, in _concatenate_map_style_datasets
table = concat_tables([dset._data for dset in dsets], axis=axis)
File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/table.py", line 1778, in concat_tables
return ConcatenationTable.from_tables(tables, axis=axis)
File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/table.py", line 1483, in from_tables
blocks = _extend_blocks(blocks, table_blocks, axis=axis)
File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/table.py", line 1477, in _extend_blocks
result[i].extend(row_blocks)
IndexError: list index out of range
```
### Steps to reproduce the bug
dataset = concatenate_datasets([dataset1, dataset2], axis = 1)
### Expected behavior
The datasets are correctly concatenated.
### Environment info
datasets==2.8.0 | 140 | concatenate_datasets fails when two dataset with shards > 1 and unequal shard numbers
### Describe the bug
When using `concatenate_datasets([dataset1, dataset2], axis = 1)` to concatenate two datasets with shards > 1, it fails:
```
File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/combine.py", line 182, in concatenate_datasets
return _concatenate_map_style_datasets(dsets, info=info, split=split, axis=axis)
File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 5499, in _concatenate_map_style_datasets
table = concat_tables([dset._data for dset in dsets], axis=axis)
File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/table.py", line 1778, in concat_tables
return ConcatenationTable.from_tables(tables, axis=axis)
File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/table.py", line 1483, in from_tables
blocks = _extend_blocks(blocks, table_blocks, axis=axis)
File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/table.py", line 1477, in _extend_blocks
result[i].extend(row_blocks)
IndexError: list index out of range
```
### Steps to reproduce the bug
dataset = concatenate_datasets([dataset1, dataset2], axis = 1)
### Expected behavior
The datasets are correctly concatenated.
### Environment info
datasets==2.8.0
Hi ! Thanks for reporting :)
I managed to reproduce the hub using
```python
from datasets import concatenate_datasets, Dataset, load_from_disk
Dataset.from_dict({"a": range(9)}).save_to_disk("tmp/ds1")
ds1 = load_from_disk("tmp/ds1")
ds1 = concatenate_datasets([ds1, ds1])
Dataset.from_dict({"b": range(6)}).save_to_disk("tmp/ds2")
ds2 = load_from_disk("tmp/ds2")
ds2 = concatenate_datasets([ds2, ds2, ds2])
concatenate_datasets([ds1, ds2], axis=1)
```
and I get
```python
Traceback (most recent call last):
File "test.py", line 98, in <module>
dds = concatenate_datasets([ds1, ds2], axis=1)
File "/Users/.../datasets/combine.py", line 182, in concatenate_datasets
return _concatenate_map_style_datasets(dsets, info=info, split=split, axis=axis)
File "/Users/.../datasets/arrow_dataset.py", line 5499, in _concatenate_map_style_datasets
table = concat_tables([dset._data for dset in dsets], axis=axis)
File "/Users/.../datasets/table.py", line 1778, in concat_tables
return ConcatenationTable.from_tables(tables, axis=axis)
File "/Users/.../datasets/table.py", line 1483, in from_tables
blocks = _extend_blocks(blocks, table_blocks, axis=axis)
File "/Users/.../datasets/table.py", line 1477, in _extend_blocks
result[i].extend(row_blocks)
IndexError: list index out of range
```
It appears to happen when the two datasets have a number of shards that is not the same | [
-0.39682039618492126,
0.01500767469406128,
-0.05729880928993225,
0.3943527340888977,
-0.054824359714984894,
0.023786716163158417,
0.37211254239082336,
0.38663947582244873,
-0.3439653813838959,
0.11458081007003784,
-0.028211763128638268,
0.1879979521036148,
0.10284203290939331,
0.2812712788581848,
-0.41775763034820557,
-0.28439080715179443,
0.09628459811210632,
0.15349018573760986,
-0.2803846299648285,
0.25396591424942017,
-0.2590717077255249,
0.14149270951747894,
-0.33529824018478394,
-0.17559833824634552,
-0.2410910725593567,
0.48892199993133545,
-0.23486138880252838,
0.237608402967453,
0.06441715359687805,
-0.1722600758075714,
0.46226707100868225,
0.09602278470993042,
0.13727888464927673,
0.44053834676742554,
-0.00011275300494162366,
0.05684766173362732,
0.25187569856643677,
-0.07776308059692383,
-0.26734015345573425,
-0.3451076149940491,
-0.6787954568862915,
-0.37797027826309204,
-0.265217125415802,
-0.14793767035007477,
0.079097218811512,
-0.1796524077653885,
-0.3444857895374298,
-0.20218013226985931,
0.23667295277118683,
0.178586944937706,
0.15991853177547455,
0.09387309104204178,
0.44394874572753906,
-0.2976512610912323,
0.27079468965530396,
-0.1815502792596817,
-0.11071284860372543,
-0.21017007529735565,
-0.07406936585903168,
0.2022918462753296,
0.24900895357131958,
0.19305987656116486,
-0.09242630749940872,
-0.15845057368278503,
-0.2473999559879303,
0.11481993645429611,
-0.023860633373260498,
-0.3298707604408264,
0.16063062846660614,
0.14475208520889282,
0.045709867030382156,
-0.3278314173221588,
-0.3973281979560852,
-0.10612940788269043,
0.007179541047662497,
-0.15054059028625488,
0.01981170102953911,
0.020144104957580566,
0.10439574718475342,
0.18821071088314056,
-0.22279150784015656,
0.10197979211807251,
-0.16714611649513245,
0.19501811265945435,
-0.07145372033119202,
0.35324791073799133,
0.0952010303735733,
0.2155207395553589,
0.10445360839366913,
-0.32375216484069824,
0.18114127218723297,
-0.27240312099456787,
-0.374447226524353,
0.016410332173109055,
-0.8417195081710815,
-0.12376894801855087,
0.11695539951324463,
-0.2769816517829895,
0.34990519285202026,
0.20731082558631897,
-0.042850639671087265,
0.08671985566616058,
0.11544731259346008,
0.10221798717975616,
0.05381790176033974,
0.15875431895256042,
0.2852969467639923,
0.4121732711791992,
-0.16216067969799042,
-0.0075157578103244305,
0.1822846233844757,
0.17885029315948486,
0.05174657702445984,
-0.632842481136322,
-0.2326793521642685,
0.099186971783638,
0.17556646466255188,
-0.1221441924571991,
-0.18161329627037048,
0.14173781871795654,
-0.2747410833835602,
0.06309612095355988,
0.0957077145576477,
0.0772550031542778,
0.094024658203125,
0.08728274703025818,
-0.1093050017952919,
0.34221625328063965,
0.22631770372390747,
-0.19345998764038086,
-0.2507050037384033,
-0.017288774251937866,
0.019665677100419998,
-0.01930115558207035,
0.1326606273651123,
-0.3227264881134033,
-0.20145121216773987,
0.15937773883342743,
0.16237467527389526,
0.2008945792913437,
-0.001637900248169899,
-0.25934675335884094,
0.2848784327507019,
0.22898420691490173,
0.03407646343111992,
-0.2601315975189209,
0.08136478066444397,
-0.18581964075565338,
0.0800129845738411,
0.10951032489538193,
-0.3495227098464966,
-0.24433881044387817,
-0.3936464786529541,
0.17420634627342224,
-0.010307598859071732,
0.3893361985683441,
-0.18031519651412964,
0.13959042727947235,
0.43708086013793945,
-0.0674930140376091,
-0.1708686351776123,
-0.19406291842460632,
-0.1700332760810852,
-0.3051389753818512,
0.45276233553886414,
0.2961151599884033,
-0.17516842484474182,
0.38547587394714355,
0.12607890367507935,
0.10241624712944031,
0.1294245421886444,
0.19062966108322144,
-0.3006010353565216,
-0.2490302324295044,
-0.34550052881240845,
0.33015716075897217,
0.48641079664230347,
-0.12604010105133057,
-0.3484150171279907,
0.15106795728206635,
-0.2643571197986603,
-0.10995810478925705,
0.3385302424430847,
-0.2577859163284302,
0.14164796471595764,
-0.14196452498435974,
0.25552934408187866,
0.28655678033828735,
-0.06694330275058746,
-0.31008651852607727,
-0.18840067088603973,
-0.15699025988578796,
0.21474173665046692,
-0.019319899380207062,
0.0706707090139389,
0.007122814655303955,
0.29738494753837585,
-0.4032154083251953,
0.2738097906112671,
-0.09119580686092377,
0.19931353628635406,
0.1948532611131668,
0.01836344599723816,
-0.2458159476518631,
0.10779127478599548,
-0.008981086313724518,
-0.23740872740745544,
0.13693609833717346,
-0.145326167345047,
-0.026546724140644073,
-0.17180566489696503,
-0.08601035177707672,
0.03783430904150009,
-0.011216669343411922,
-0.125819593667984,
0.11866112053394318,
0.20168331265449524,
-0.03947009891271591,
0.18525420129299164,
-0.26650628447532654,
0.16110718250274658,
0.1851155012845993,
-0.18008750677108765,
-0.1758095622062683,
-0.38958147168159485,
0.4420863091945648,
-0.08847133070230484,
-0.1760454773902893,
-0.04731946438550949,
0.23691701889038086,
0.21661019325256348,
-0.18940070271492004,
-0.07577197253704071,
0.4942570924758911,
-0.17011147737503052,
-0.1952735036611557,
0.14504499733448029,
-0.21898223459720612,
-0.08550779521465302,
-0.0003504045307636261,
-0.16437993943691254,
-0.18665103614330292,
-0.16055706143379211,
-0.03283366933465004,
-0.04171820729970932,
0.47568410634994507,
-0.05859491601586342,
0.32464420795440674,
-0.01830436661839485,
0.02244093455374241,
0.2186330407857895,
-0.06134794279932976,
0.020235387608408928,
-0.3993338942527771,
0.01734781265258789,
0.21232913434505463,
-0.16057340800762177,
0.15539611876010895,
-0.053805530071258545,
0.28951171040534973,
0.14635752141475677,
0.11599276959896088,
0.026660684496164322,
-0.0390571653842926,
0.03204268589615822,
0.006507068872451782,
0.23742462694644928,
0.3948265016078949,
0.5761575102806091,
0.35753878951072693,
-0.09982648491859436,
-0.07536331564188004,
-0.16698595881462097,
-0.20221908390522003,
0.08418285846710205,
0.03434254601597786,
-0.07166913896799088,
0.3908584415912628,
0.3255176842212677,
-0.09756544977426529,
0.1305420994758606,
-0.5422242879867554,
-0.003771458752453327,
0.07140291482210159,
-0.29711127281188965,
0.006113128736615181,
-0.31384411454200745,
-0.013705726712942123,
-0.2732642590999603,
-0.24881552159786224,
-0.1742391735315323,
-0.37044912576675415,
-0.2867072820663452,
0.2387949377298355,
-0.1927073746919632,
0.31528690457344055,
0.034211497753858566,
-0.3408390283584595,
0.14434073865413666,
-0.05366098880767822,
-0.01800922304391861,
0.1487826406955719,
0.00283123180270195,
0.044944215565919876,
0.18690629303455353,
-0.05124844238162041,
0.023590052500367165,
-0.1307874321937561,
0.06688795238733292,
-0.19153569638729095,
-0.23524487018585205,
0.07284749299287796,
-0.2992877960205078,
0.08302417397499084,
0.15327411890029907,
-0.05591392517089844,
-0.29682332277297974,
-0.2716580629348755,
0.19619479775428772,
0.5780670046806335,
0.053245387971401215,
0.5678450465202332,
0.06485145539045334,
-0.17345431447029114,
-0.19167131185531616,
-0.24519503116607666,
-0.1733543425798416,
-0.44089141488075256,
0.01620427519083023,
-0.020881930366158485,
0.16493681073188782,
0.1947002112865448,
0.4727325737476349,
0.023257263004779816,
-0.08177704364061356,
0.12904737889766693,
-0.10045197606086731,
-0.0582447275519371,
0.46241942048072815,
-0.10343269258737564,
-0.24197955429553986,
-0.12345583736896515,
-0.10861065983772278,
0.12678346037864685,
0.41093146800994873,
-0.026994794607162476,
0.18807363510131836,
-0.06212516874074936,
0.17163601517677307,
-0.2802872061729431,
0.11498872190713882,
0.3855060636997223,
0.4283546507358551,
-0.09901439398527145,
-0.07859382033348083,
0.2841780185699463,
0.21744567155838013,
-0.024739626795053482,
0.12079715728759766,
0.0564594641327858,
0.15892013907432556,
0.023907098919153214,
0.2851100564002991,
0.4632023870944977,
-0.2275918871164322,
0.38610273599624634,
0.17288276553153992,
0.3459080755710602,
0.049814727157354355,
-0.346434623003006,
-0.08249859511852264,
0.21138815581798553,
0.20339971780776978,
-0.06895282864570618,
-0.040976472198963165,
0.21850453317165375,
-0.2697893977165222,
-0.11046773195266724,
0.00803450495004654,
-0.17516836524009705,
0.062115393579006195,
-0.14427733421325684,
0.2969699501991272,
-0.035274311900138855,
0.07639560848474503,
-0.1965881586074829,
0.0028466014191508293,
-0.26252415776252747,
0.08640085160732269,
-0.11918414384126663,
0.016397662460803986,
-0.10498839616775513,
-0.30336621403694153,
-0.21529129147529602,
0.37585121393203735,
0.32462871074676514,
0.6501341462135315,
0.2164895087480545,
-0.1286110132932663,
-0.3786848783493042,
0.04480063542723656,
0.5881617069244385,
-0.34666478633880615,
-0.26661187410354614,
0.19260209798812866,
0.21422496438026428,
-0.3558867573738098,
-0.19428472220897675,
0.02355169877409935,
0.48565876483917236,
0.007025245577096939,
0.6730439066886902,
-0.2763451933860779,
-0.02306213043630123,
0.3534691631793976,
0.4089150130748749,
0.11166216433048248,
-0.15288937091827393,
-0.20840901136398315,
0.09875407069921494,
-0.32670602202415466,
-0.2234003245830536,
-0.04503247141838074,
0.4031050205230713,
-0.3503849506378174,
-0.25477901101112366,
-0.26558464765548706,
-0.5698069334030151,
0.08373230695724487,
0.16100378334522247,
0.43534454703330994,
-0.1445157825946808,
0.370371013879776,
-0.28620582818984985,
-0.006952293217182159,
0.4830232560634613,
0.4167877435684204,
0.19289256632328033,
-0.29358217120170593,
-0.05722309648990631,
-0.10112999379634857,
0.21025806665420532,
-0.015400081872940063,
-0.39311498403549194,
0.1134265661239624,
-0.45738276839256287,
0.158269464969635,
0.1595616489648819,
-0.22835560142993927,
0.17389969527721405,
0.07820384949445724,
-0.5075327754020691,
-0.12297889590263367,
0.24609306454658508,
-0.019447086378932,
-0.0801537036895752,
0.385861873626709,
0.05596737563610077,
-0.3117426037788391,
0.32590484619140625,
-0.18195655941963196,
0.8217546343803406,
0.31913238763809204,
-0.07133214175701141,
-0.12317415326833725,
0.19992049038410187,
0.3853933811187744,
0.2950948476791382,
0.12463415414094925,
-0.21817269921302795,
-0.307304322719574,
-0.08063230663537979,
-0.381409615278244,
0.10394273698329926,
0.15078017115592957,
-0.45091015100479126,
0.30321985483169556,
-0.3537072539329529,
0.1291913241147995,
-0.012553742155432701,
0.1576111763715744,
0.10277687013149261,
-0.11619254946708679,
-0.2289465069770813,
0.061630941927433014,
0.20141775906085968,
-0.45547783374786377,
0.0045375823974609375,
-0.1292405128479004,
-0.34687328338623047,
-0.14606638252735138,
-0.10579214245080948,
0.39702436327934265,
-0.10699083656072617,
0.5832719802856445,
0.09370221197605133,
-0.5337641835212708,
0.15045268833637238,
0.11582490801811218,
0.13885730504989624,
0.17879919707775116,
-0.15115492045879364,
-0.19198213517665863,
0.10966528952121735,
-0.019491735845804214,
0.1329382061958313,
-0.274563729763031,
0.22803226113319397,
0.255390465259552,
-0.2649487555027008,
0.10512460023164749,
0.29674115777015686,
-0.15867823362350464,
-0.33671772480010986,
0.128952294588089,
-0.20507128536701202,
-0.2859404683113098,
0.010879449546337128,
0.06429286301136017,
-0.18581317365169525,
-0.24223926663398743,
0.10463915765285492,
0.1781046986579895,
-0.13508543372154236,
0.10576668381690979,
-0.08175317943096161,
-0.3931869864463806,
-0.09043571352958679,
0.5823943614959717,
0.09073729813098907,
0.2520281672477722,
0.17886923253536224,
0.07619370520114899,
-0.038058940321207047,
-0.06693794578313828,
-0.03184502199292183,
-0.10192220658063889,
-0.47401225566864014,
-0.08368265628814697,
-0.26497501134872437,
0.0867433100938797,
-0.04997502639889717,
0.18972700834274292,
0.25525230169296265,
0.24567949771881104,
0.057036835700273514,
-0.33534562587738037,
-0.0943639948964119,
0.03428558260202408,
0.00811854749917984,
0.17528767883777618,
-0.2529400587081909,
0.2605113089084625,
-0.19585655629634857,
0.03331134468317032,
-0.29128557443618774,
-0.0937592163681984,
-0.12226047366857529,
0.1643337607383728,
-0.08202902227640152,
-0.031332142651081085,
-0.10619990527629852,
-0.24186058342456818,
0.1468784213066101,
0.15249189734458923,
-0.17485666275024414,
-0.19238942861557007,
-0.020554831251502037,
0.0851883813738823,
0.15888389945030212,
-0.12104592472314835,
-0.511419415473938,
-0.09817639738321304,
-0.09212714433670044,
-0.21826672554016113,
0.02887449413537979,
0.07969766855239868,
-0.1541978269815445,
-0.10796766728162766,
0.32637158036231995,
0.015626966953277588,
0.027636677026748657,
0.17512759566307068,
-0.07183709740638733,
0.18121255934238434,
-0.30253860354423523,
0.4288271963596344,
0.026331976056098938,
-0.10402630269527435,
-0.3382224440574646,
0.13381297886371613,
0.046998701989650726,
-0.02666456252336502,
0.10806255042552948,
-0.29541969299316406,
-0.16505171358585358,
0.06238624453544617,
0.503342866897583,
0.3708229660987854,
-0.029086565598845482,
-0.1249484047293663,
0.042454805225133896,
0.21986611187458038,
-0.142661914229393,
-0.2396201193332672,
0.14359423518180847,
0.3188321590423584,
0.08498461544513702,
0.12725310027599335,
0.08115905523300171,
-0.22885197401046753,
-0.012035265564918518,
0.23580962419509888,
0.13637277483940125,
0.033616431057453156,
0.06853854656219482,
0.32142603397369385,
0.13053597509860992,
0.09811244904994965,
0.10006099939346313,
-0.0650913417339325,
0.3745845854282379,
0.26325201988220215,
-0.11850922554731369,
0.5760409235954285,
0.2440771758556366,
-0.15146498382091522,
0.11892687529325485,
-0.23399901390075684,
0.1431688368320465,
0.08179490268230438,
-0.08460023999214172,
0.0887020155787468,
0.06760118901729584,
0.39935219287872314,
-0.19145305454730988,
-0.08289015293121338,
-0.029673883691430092,
0.02777525782585144,
-0.14567294716835022,
-0.0308893620967865,
0.09266415238380432,
-0.2338360846042633,
-0.24314190447330475,
-0.19936680793762207,
0.28434082865715027,
0.10937349498271942,
0.5797284841537476,
-0.030155211687088013,
0.04055281728506088,
-0.0709819421172142,
0.2603526711463928,
0.41795000433921814,
0.05024119094014168,
-0.30934837460517883,
0.09326723963022232,
0.6114588379859924,
-0.1466340869665146,
0.14668233692646027,
0.10576670616865158,
0.6195505857467651,
0.36304229497909546,
0.08983522653579712,
-0.1327439397573471,
0.13302378356456757,
-0.12909576296806335,
-0.1688975989818573,
0.10642052441835403,
-0.2541065812110901,
-0.2740439176559448,
0.39784884452819824,
0.22617171704769135,
-0.12065457552671432,
-0.05346502736210823,
0.22794365882873535,
0.10875220596790314,
-0.4718806743621826,
0.2946127653121948,
-0.152981236577034,
-0.3629195988178253,
0.20171962678432465,
-0.022366143763065338,
-0.27098169922828674,
-0.09946731477975845,
0.5209209322929382,
-0.07130572944879532,
0.06272436678409576,
-0.08462730795145035,
0.09470918774604797,
0.15901626646518707,
0.40581294894218445,
0.11820871382951736,
0.21325302124023438,
-0.37772971391677856,
-0.19438676536083221,
-0.2658429741859436,
0.18254269659519196,
-0.09758873283863068,
0.11089274287223816,
0.017399568110704422,
0.27302148938179016,
0.011772222816944122,
0.23377108573913574,
0.3495582640171051,
0.10901474207639694,
-0.012794003821909428,
0.10338611900806427,
-0.38551053404808044,
-0.13621211051940918,
0.13634926080703735,
-0.3333526849746704,
0.1063946783542633,
-0.4088572859764099,
0.43065840005874634,
-0.0637631043791771,
0.1527668535709381,
-0.3215401768684387,
0.07384662330150604,
0.5388938784599304,
-0.12773767113685608,
0.3578028380870819,
0.28188371658325195,
0.3034178614616394,
-0.2771269381046295,
0.009246384724974632,
-0.2221057116985321,
-0.2607329785823822,
-0.1788666844367981,
0.2905293405056,
-0.014552287757396698,
0.0868949145078659,
-0.3151802718639374,
-0.37522751092910767,
0.05747498571872711,
0.09640907496213913,
0.08275306224822998,
0.26971420645713806,
-0.17348797619342804,
0.26191458106040955,
-0.035128526389598846,
0.06453697383403778,
-0.14794647693634033,
0.1985454559326172,
0.13934668898582458,
0.5154719948768616,
0.19253887236118317,
-0.6438592076301575,
0.3039960563182831,
-0.12509912252426147,
-0.3105204403400421,
-0.14880508184432983,
-0.12457345426082611,
-0.017551608383655548,
-0.018623990938067436,
-0.3000640869140625,
-0.13694888353347778,
0.35090410709381104,
0.22862398624420166,
-0.17678041756153107,
0.22793911397457123,
0.08070318400859833,
0.0034073591232299805,
0.05566532537341118,
0.06014961749315262,
0.027889439836144447,
-0.3344423770904541,
0.15390054881572723,
-0.08207015693187714
] |
https://github.com/huggingface/datasets/issues/5412 | load_dataset() cannot find dataset_info.json with multiple training runs in parallel | Hi ! It fails because the dataset is already being prepared by your first run. I'd encourage you to prepare your dataset before using it for multiple trainings.
You can also specify another cache directory by passing `cache_dir=` to `load_dataset()`. | ### Describe the bug
I have a custom local dataset in JSON form. I am trying to do multiple training runs in parallel. The first training run runs with no issue. However, when I start another run on another GPU, the following code throws this error.
If there is a workaround to ignore the cache I think that would solve my problem too.
I am using datasets version 2.8.0.
### Steps to reproduce the bug
1. Start training run of GPU 0 loading dataset from
```
load_dataset(
"json",
data_files=tr_dataset_path,
split=f"train",
download_mode="force_redownload",
)
```
2. While GPU 0 is training, start an identical run on GPU 1. GPU 1 will produce the following error:
```
Traceback (most recent call last):
File "/local-scratch1/data/mt/code/qq/train.py", line 198, in <module>
main()
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/local-scratch1/data/mt/code/qq/train.py", line 113, in main
load_dataset(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1734, in load_dataset
builder_instance = load_dataset_builder(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1518, in load_dataset_builder
builder_instance: DatasetBuilder = builder_cls(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/builder.py", line 366, in __init__
self.info = DatasetInfo.from_directory(self._cache_dir)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/info.py", line 313, in from_directory
with fs.open(path_join(dataset_info_dir, config.DATASET_INFO_FILENAME), "r", encoding="utf-8") as f:
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1094, in open
self.open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open
f = self._open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open
return LocalFileOpener(path, mode, fs=self, **kwargs)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__
self._open()
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open
self.f = open(self.path, mode=self.mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.cache/huggingface/datasets/json/default-43d06a4aedb25e6d/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51/dataset_info.json'
```
### Expected behavior
Expected behavior: 2nd GPU training run should run the same as 1st GPU training run.
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.8.0
- Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.10
- Python version: 3.8.15
- PyArrow version: 9.0.0
- Pandas version: 1.5.2 | 40 | load_dataset() cannot find dataset_info.json with multiple training runs in parallel
### Describe the bug
I have a custom local dataset in JSON form. I am trying to do multiple training runs in parallel. The first training run runs with no issue. However, when I start another run on another GPU, the following code throws this error.
If there is a workaround to ignore the cache I think that would solve my problem too.
I am using datasets version 2.8.0.
### Steps to reproduce the bug
1. Start training run of GPU 0 loading dataset from
```
load_dataset(
"json",
data_files=tr_dataset_path,
split=f"train",
download_mode="force_redownload",
)
```
2. While GPU 0 is training, start an identical run on GPU 1. GPU 1 will produce the following error:
```
Traceback (most recent call last):
File "/local-scratch1/data/mt/code/qq/train.py", line 198, in <module>
main()
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/local-scratch1/data/mt/code/qq/train.py", line 113, in main
load_dataset(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1734, in load_dataset
builder_instance = load_dataset_builder(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1518, in load_dataset_builder
builder_instance: DatasetBuilder = builder_cls(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/builder.py", line 366, in __init__
self.info = DatasetInfo.from_directory(self._cache_dir)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/info.py", line 313, in from_directory
with fs.open(path_join(dataset_info_dir, config.DATASET_INFO_FILENAME), "r", encoding="utf-8") as f:
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1094, in open
self.open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open
f = self._open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open
return LocalFileOpener(path, mode, fs=self, **kwargs)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__
self._open()
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open
self.f = open(self.path, mode=self.mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.cache/huggingface/datasets/json/default-43d06a4aedb25e6d/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51/dataset_info.json'
```
### Expected behavior
Expected behavior: 2nd GPU training run should run the same as 1st GPU training run.
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.8.0
- Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.10
- Python version: 3.8.15
- PyArrow version: 9.0.0
- Pandas version: 1.5.2
Hi ! It fails because the dataset is already being prepared by your first run. I'd encourage you to prepare your dataset before using it for multiple trainings.
You can also specify another cache directory by passing `cache_dir=` to `load_dataset()`. | [
-0.3174046277999878,
0.0906004011631012,
0.043627116829156876,
0.5405644774436951,
0.07730000466108322,
0.2994084656238556,
0.48144441843032837,
0.43623343110084534,
0.18919509649276733,
-0.04075530171394348,
0.250057190656662,
0.18446266651153564,
0.13980749249458313,
-0.10856341570615768,
-0.0409931056201458,
-0.207407146692276,
-0.008269175887107849,
0.0028028488159179688,
0.4058806300163269,
-0.0216684490442276,
-0.2612115740776062,
0.2574078440666199,
-0.12853491306304932,
0.02649618312716484,
-0.4109917879104614,
-0.11950772255659103,
-0.019806448370218277,
0.21162086725234985,
0.2659262418746948,
-0.39340531826019287,
0.2371617704629898,
-0.09330783784389496,
0.20046953856945038,
0.6234452724456787,
-0.00011928070307476446,
0.2615399956703186,
0.192063108086586,
-0.10501746088266373,
-0.3209552466869354,
-0.227874293923378,
-0.24937736988067627,
0.0369689017534256,
0.17692741751670837,
-0.2605346143245697,
-0.3424197733402252,
-0.25237783789634705,
-0.12779122591018677,
-0.6818832159042358,
0.14761796593666077,
0.025206711143255234,
0.14716893434524536,
0.1453924924135208,
-0.23962366580963135,
-0.21671831607818604,
0.06494458019733429,
0.15667122602462769,
-0.11631111055612564,
0.021288247779011726,
0.08401085436344147,
-0.279802531003952,
0.04135793074965477,
0.5517554879188538,
-0.05373911187052727,
0.2836616635322571,
0.013187739998102188,
-0.002024322748184204,
-0.042244717478752136,
0.12931744754314423,
0.06807833909988403,
-0.045059144496917725,
0.4955967962741852,
-0.3562161326408386,
-0.26322153210639954,
-0.45000797510147095,
-0.018695726990699768,
-0.23133841156959534,
0.23595348000526428,
0.31243404746055603,
-0.1761956810951233,
0.13568244874477386,
-0.2553471624851227,
-0.03371844440698624,
0.04089769721031189,
0.03636214882135391,
0.37212666869163513,
0.08426535129547119,
0.050474390387535095,
0.32930073142051697,
0.0991649478673935,
0.18410883843898773,
0.25614044070243835,
-0.0873115137219429,
0.12513747811317444,
-0.009230292402207851,
-0.6009680032730103,
0.15582667291164398,
0.0765623226761818,
-0.4981938302516937,
0.014027506113052368,
0.09646698832511902,
0.3566739857196808,
-0.12429482489824295,
0.058003511279821396,
0.2940894365310669,
0.1528533548116684,
0.1942756623029709,
-0.06801251322031021,
0.22734233736991882,
0.05678572505712509,
0.06301400810480118,
-0.29610028862953186,
-0.04622437059879303,
-0.11420467495918274,
-0.10929498821496964,
-0.10264696180820465,
0.06785960495471954,
0.10799464583396912,
-0.04031631350517273,
-0.2083159238100052,
0.026672203093767166,
-0.3802473843097687,
-0.08188939839601517,
0.25494900345802307,
0.25648391246795654,
0.03068089485168457,
0.3509567379951477,
0.055085837841033936,
0.033086925745010376,
-0.2580394744873047,
-0.21700555086135864,
-0.3022080659866333,
0.0047788918018341064,
-0.011661347001791,
0.1474396139383316,
0.302793025970459,
0.01631133072078228,
0.4361708164215088,
-0.015465491451323032,
-0.14176210761070251,
-0.22553399205207825,
0.41421547532081604,
-0.3506627380847931,
-0.047964923083782196,
0.26028895378112793,
-0.04407298564910889,
0.15418721735477448,
0.2305261492729187,
0.06592956185340881,
-0.18612602353096008,
0.21321046352386475,
-0.38798728585243225,
-0.5612810254096985,
0.11615006625652313,
0.05822204798460007,
-0.02100735902786255,
0.09020747244358063,
-0.008301228284835815,
0.14399246871471405,
0.38686662912368774,
-0.16520361602306366,
0.0883561223745346,
-0.07417763024568558,
-0.4549815356731415,
-0.2346513867378235,
0.16790810227394104,
0.586801290512085,
-0.4159819781780243,
-0.0552331916987896,
0.13106127083301544,
-0.08335450291633606,
-0.12811020016670227,
0.4383392632007599,
-0.39713793992996216,
0.3259427547454834,
-0.31617259979248047,
0.05434887111186981,
0.13675343990325928,
-0.6813419461250305,
-0.30179956555366516,
0.3279638886451721,
-0.2582881450653076,
0.12431737035512924,
0.1432967185974121,
0.07365656644105911,
-0.04938259720802307,
0.05129006505012512,
0.46839019656181335,
0.37751305103302,
-0.12165258824825287,
0.0034356918185949326,
-0.20442557334899902,
-0.1872781217098236,
0.25741326808929443,
0.3591834008693695,
0.013387814164161682,
-0.03568034619092941,
-0.11654212325811386,
-0.05547420680522919,
0.26431530714035034,
-0.04786263778805733,
0.050384581089019775,
0.2726386785507202,
0.02403365448117256,
-0.021859735250473022,
0.16698390245437622,
0.24576342105865479,
-0.46483349800109863,
0.30524083971977234,
-0.003800373524427414,
-0.22684797644615173,
-0.07143710553646088,
-0.019398467615246773,
0.07686268538236618,
-0.07055015861988068,
-0.4165920615196228,
-0.13035576045513153,
0.034492455422878265,
0.2252597063779831,
0.06481373310089111,
0.06652076542377472,
-0.15525196492671967,
0.602091908454895,
-0.22068776190280914,
0.018081648275256157,
-0.33559074997901917,
0.07673158496618271,
0.09353197365999222,
0.029155272990465164,
-0.13950049877166748,
0.019146379083395004,
0.2489408552646637,
-0.1766989380121231,
-0.1652543842792511,
0.3446524143218994,
0.17175370454788208,
0.03749202936887741,
0.10566369444131851,
-0.010273054242134094,
0.0560741052031517,
0.10405083000659943,
0.01612233743071556,
0.22442835569381714,
-0.019630463793873787,
-0.2747427821159363,
-0.14555016160011292,
0.3275516927242279,
0.0762355700135231,
0.13335585594177246,
-0.1996723860502243,
-0.12626832723617554,
0.3267636299133301,
-0.1032916009426117,
0.014857124537229538,
-0.018873795866966248,
0.19565454125404358,
0.1755368858575821,
0.45909300446510315,
-0.10077442228794098,
-0.6368587613105774,
0.13011474907398224,
0.3487493395805359,
0.22682610154151917,
0.06201248988509178,
-0.07392050325870514,
0.08524961024522781,
0.048787638545036316,
0.2366180121898651,
0.39786863327026367,
0.6255086660385132,
0.1429750770330429,
0.05344751104712486,
0.21037408709526062,
-0.05730017274618149,
-0.111351877450943,
-0.10114190727472305,
-0.02676919847726822,
0.32573002576828003,
0.15983441472053528,
0.2826700508594513,
-0.07037896662950516,
-0.17031633853912354,
-0.29299017786979675,
0.42875075340270996,
0.2042635828256607,
-0.14230361580848694,
0.2723310589790344,
-0.41521570086479187,
0.06758549064397812,
-0.42390188574790955,
-0.05829797312617302,
-0.05150948837399483,
-0.04283258318901062,
0.05369500443339348,
0.28817880153656006,
-0.13555334508419037,
0.24872197210788727,
-0.24810822308063507,
0.44581884145736694,
0.104859858751297,
-0.47266721725463867,
0.04135653376579285,
-0.18739216029644012,
-0.28177106380462646,
-0.11712963879108429,
0.35018956661224365,
-0.06188056617975235,
0.18568187952041626,
-0.04349146783351898,
-0.19312073290348053,
-0.03257818520069122,
-0.005276426672935486,
0.08841152489185333,
0.12583361566066742,
-0.12495096027851105,
-0.1284799724817276,
-0.004302643239498138,
-0.15643054246902466,
-0.1978708952665329,
0.30465763807296753,
-0.18898449838161469,
-0.15442468225955963,
-0.12026092410087585,
0.04302310571074486,
0.05218061804771423,
-0.09352932870388031,
-0.4966222941875458,
-0.3209013342857361,
-0.2745482921600342,
0.40548354387283325,
-0.08517567068338394,
0.15151074528694153,
0.08562856912612915,
0.1713193655014038,
0.14521123468875885,
0.09623032808303833,
-0.06115441024303436,
-0.3209024667739868,
-0.6478179693222046,
0.016212906688451767,
-0.40735360980033875,
-0.008974622935056686,
0.17096255719661713,
0.1200331598520279,
0.22027437388896942,
0.1716953068971634,
-0.5838252902030945,
0.11096076667308807,
0.225717231631279,
0.03890272602438927,
-0.23311224579811096,
-0.19050483405590057,
0.47704437375068665,
-0.18031497299671173,
0.06474317610263824,
-0.18878158926963806,
-0.2799719274044037,
0.29258644580841064,
-0.0779886394739151,
0.26329678297042847,
0.08196787536144257,
0.3746786117553711,
0.24258679151535034,
0.6122786402702332,
0.26353809237480164,
0.010437346994876862,
0.06504091620445251,
0.08147666603326797,
0.0975361317396164,
-0.22476118803024292,
-0.19413277506828308,
-0.060985419899225235,
-0.14699652791023254,
-0.35113972425460815,
-0.028690233826637268,
-0.039524611085653305,
-0.25428667664527893,
-0.31896501779556274,
-0.14406171441078186,
-0.09423469007015228,
-0.10558705031871796,
0.05682916194200516,
-0.23226556181907654,
0.2958487272262573,
0.07198676466941833,
0.18760782480239868,
-0.3227809965610504,
0.17022666335105896,
-0.009473099373281002,
0.09622649103403091,
0.11033142358064651,
0.18924106657505035,
-0.4994698762893677,
-0.03261053189635277,
-0.07170162349939346,
0.31953978538513184,
-0.04096314311027527,
0.5968883633613586,
-0.18636125326156616,
0.03599651902914047,
0.06738846004009247,
-0.061626750975847244,
0.6348072290420532,
-0.32290318608283997,
0.038909561932086945,
0.11556760966777802,
-0.3706192374229431,
-0.16221342980861664,
-0.31311875581741333,
0.16827161610126495,
0.2948508560657501,
0.0608028881251812,
0.4120383858680725,
-0.00746491551399231,
-0.16878803074359894,
0.2584493160247803,
-0.09463982284069061,
-0.09720045328140259,
-0.3551150858402252,
-0.23017102479934692,
-0.1563575565814972,
-0.2291642725467682,
0.20493760704994202,
0.03672555088996887,
0.21649721264839172,
-0.10889917612075806,
0.034710150212049484,
-0.08795686811208725,
0.17018359899520874,
-0.06419917941093445,
-0.03915166109800339,
0.24122971296310425,
0.09103813022375107,
0.29056409001350403,
0.5308736562728882,
0.06508836150169373,
0.3338575065135956,
0.5281208753585815,
0.15734829008579254,
-0.3254031240940094,
0.24197593331336975,
0.12388370931148529,
0.04864288493990898,
0.3357313275337219,
-0.04195304960012436,
0.1529131531715393,
0.18138010799884796,
-0.12660525739192963,
-0.1359182745218277,
-0.021940719336271286,
0.015719693154096603,
-0.16330617666244507,
-0.1901654303073883,
-0.5915167331695557,
0.32189297676086426,
0.12676118314266205,
0.04180020093917847,
0.49447646737098694,
-0.726313591003418,
-0.09011878073215485,
0.2504437565803528,
-0.09654366225004196,
0.6326221227645874,
-0.06940145790576935,
0.08797962963581085,
0.20901665091514587,
-0.3688858151435852,
0.21974466741085052,
-0.577440619468689,
0.4220707416534424,
-0.2954139709472656,
-0.08352875709533691,
-0.011781599372625351,
-0.24610699713230133,
0.1635187268257141,
0.3575030565261841,
0.1095743477344513,
0.17938649654388428,
0.035137392580509186,
0.2340269833803177,
-0.06478562206029892,
0.15702280402183533,
0.2225164920091629,
-0.2662520706653595,
-0.45315802097320557,
0.05960926413536072,
-0.18205149471759796,
0.2170465886592865,
-0.103335440158844,
-0.21652904152870178,
-0.05418478325009346,
-0.1885535567998886,
-0.05661682412028313,
0.16018801927566528,
-0.2992211580276489,
0.4672740697860718,
0.10217174887657166,
-0.4669879674911499,
-0.09137795865535736,
0.06282065063714981,
0.3779307007789612,
-0.1730518639087677,
-0.278737872838974,
0.07268686592578888,
-0.11243901401758194,
-0.03562196344137192,
-0.28596022725105286,
-0.22805342078208923,
0.19032658636569977,
0.05862846225500107,
-0.3062308430671692,
-0.0010784342885017395,
-0.24324725568294525,
-0.5753126740455627,
0.0368926078081131,
0.21195848286151886,
-0.12746016681194305,
0.22570070624351501,
-0.177059143781662,
0.15798360109329224,
0.18966512382030487,
-0.18214906752109528,
0.059005025774240494,
0.1269354224205017,
-0.27074486017227173,
0.04549422487616539,
-0.3132767081260681,
-0.11884826421737671,
-0.012365400791168213,
0.5545284748077393,
0.20662754774093628,
-0.06328153610229492,
0.4369467794895172,
0.3819408714771271,
0.0040461160242557526,
-0.15424007177352905,
-0.035045936703681946,
0.372979998588562,
-0.08039480447769165,
0.07534725219011307,
-0.2944275140762329,
0.1338668316602707,
0.14579468965530396,
-0.1364968866109848,
-0.01387423649430275,
0.047525644302368164,
0.2047768086194992,
-0.326751172542572,
-0.49465516209602356,
0.16252358257770538,
-0.20133672654628754,
0.0832892432808876,
0.4162394404411316,
0.2919579744338989,
0.04881076514720917,
0.20319697260856628,
-0.21263907849788666,
0.23452278971672058,
-0.2910153567790985,
0.0179302878677845,
-0.008013436570763588,
0.0842987447977066,
0.11819077283143997,
0.21945799887180328,
-0.03684956207871437,
0.17860358953475952,
-0.19241690635681152,
-0.08996719121932983,
-0.03341616317629814,
0.14064523577690125,
-0.02163470908999443,
0.3085578680038452,
-0.0445929616689682,
-0.43214553594589233,
-0.16491448879241943,
0.06940780580043793,
0.19707588851451874,
0.303954154253006,
-0.04840158671140671,
0.23391973972320557,
-0.13086345791816711,
0.008876927196979523,
-0.08915010094642639,
0.1434294879436493,
-0.06501151621341705,
-0.005485475063323975,
0.12656784057617188,
0.12007326632738113,
-0.031925901770591736,
0.2069111168384552,
-0.4129042625427246,
-0.1346234381198883,
-0.16019810736179352,
0.18424758315086365,
0.048980358988046646,
-0.589381992816925,
-0.011107828468084335,
0.08999542891979218,
0.29214027523994446,
0.045984044671058655,
-0.26292112469673157,
-0.10432937741279602,
0.18640127778053284,
0.09166451543569565,
-0.26897501945495605,
-0.32014021277427673,
0.5495879054069519,
0.19354310631752014,
-0.0796588659286499,
0.39116546511650085,
0.47354546189308167,
-0.04724019020795822,
-0.059226229786872864,
0.3569733798503876,
0.4423520565032959,
-0.3505401611328125,
0.34868481755256653,
0.0968066155910492,
0.003941897302865982,
-0.008067507296800613,
0.030685219913721085,
0.236899271607399,
0.20546743273735046,
0.5000792145729065,
-0.04682973772287369,
0.15559087693691254,
0.2514185309410095,
-0.09325937926769257,
-0.2518969774246216,
-0.6364417672157288,
-0.0026148036122322083,
0.2291266918182373,
-0.059241026639938354,
0.006359335035085678,
-0.4620490074157715,
0.340090274810791,
-0.11025064438581467,
-0.15684854984283447,
-0.22865144908428192,
0.12884271144866943,
-0.308922678232193,
0.032272811979055405,
-0.14202821254730225,
-0.1808878481388092,
0.09797635674476624,
0.12548986077308655,
0.13894131779670715,
0.16286903619766235,
0.5176304578781128,
-0.14292068779468536,
-0.16546021401882172,
-0.19566981494426727,
0.061424531042575836,
0.5079642534255981,
-0.0328386053442955,
-0.3860783576965332,
0.21653997898101807,
0.04308333247900009,
-0.4306727945804596,
-0.05235705152153969,
0.1640043407678604,
0.3211933374404907,
0.3099084794521332,
0.049498070031404495,
-0.07738523930311203,
0.03471427410840988,
0.11061215400695801,
-0.02386249601840973,
0.10558125376701355,
0.17657434940338135,
-0.19349583983421326,
0.37939873337745667,
-0.01513645052909851,
0.03950785472989082,
0.4401082992553711,
0.2328493595123291,
0.20027963817119598,
-0.43917936086654663,
-0.035249434411525726,
-0.17121808230876923,
0.049933791160583496,
0.02645793743431568,
0.1986565738916397,
-0.21190938353538513,
-0.0858929380774498,
0.5764269828796387,
0.20288150012493134,
0.15354198217391968,
-0.008760195225477219,
0.02254287526011467,
-0.2668808698654175,
0.4640393555164337,
-0.011102225631475449,
-0.3162091374397278,
-0.4586986303329468,
-0.22390498220920563,
-0.6046576499938965,
0.18429255485534668,
-0.4933386445045471,
0.2885443866252899,
0.2295895218849182,
0.2830564081668854,
0.13097622990608215,
-0.03909345716238022,
0.0035866498947143555,
-0.23765254020690918,
0.08299511671066284,
0.399177610874176,
-0.4149516224861145,
-0.16821642220020294,
-0.2597823143005371,
0.007476923055946827,
0.36345067620277405,
-0.2874995470046997,
0.11492756754159927,
0.03285573422908783,
-0.07718060165643692,
-0.17819902300834656,
-0.014425665140151978,
0.14418715238571167,
-0.06644538044929504,
0.3873118758201599,
-0.010491481050848961,
0.2724665403366089,
0.2643935978412628,
0.04326976090669632,
-0.31881648302078247,
-0.1773862987756729,
-0.15844778716564178,
0.31093671917915344,
-0.02992444857954979,
0.5050094127655029,
-0.4576062560081482,
0.02469652332365513,
-0.4293226897716522,
0.025272926315665245,
0.07312117516994476,
-0.11164817214012146,
-0.05788902938365936,
0.2050996869802475,
-0.15463244915008545,
0.4019119441509247,
0.3288961350917816,
0.2617925703525543,
0.05381215736269951,
0.19779762625694275,
-0.4652794599533081,
-0.07841702550649643,
0.4244210720062256,
-0.3362322449684143,
-0.31551122665405273,
-0.09939291328191757,
0.21380895376205444,
-0.15311431884765625,
0.020983150228857994,
-0.47478187084198,
0.06157249957323074,
0.3000349700450897,
-0.07487613707780838,
-0.139108806848526,
0.189982607960701,
-0.05292130634188652,
-0.06479627639055252,
0.09709006547927856,
-0.18062466382980347,
-0.05418712645769119,
-0.20981544256210327,
0.05786072090268135,
-0.2323138564825058
] |
https://github.com/huggingface/datasets/issues/5412 | load_dataset() cannot find dataset_info.json with multiple training runs in parallel | Thank you! What do you mean by prepare it beforehand? I am unclear how to conduct dataset preparation outside of using the `load_dataset` function. | ### Describe the bug
I have a custom local dataset in JSON form. I am trying to do multiple training runs in parallel. The first training run runs with no issue. However, when I start another run on another GPU, the following code throws this error.
If there is a workaround to ignore the cache I think that would solve my problem too.
I am using datasets version 2.8.0.
### Steps to reproduce the bug
1. Start training run of GPU 0 loading dataset from
```
load_dataset(
"json",
data_files=tr_dataset_path,
split=f"train",
download_mode="force_redownload",
)
```
2. While GPU 0 is training, start an identical run on GPU 1. GPU 1 will produce the following error:
```
Traceback (most recent call last):
File "/local-scratch1/data/mt/code/qq/train.py", line 198, in <module>
main()
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/local-scratch1/data/mt/code/qq/train.py", line 113, in main
load_dataset(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1734, in load_dataset
builder_instance = load_dataset_builder(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1518, in load_dataset_builder
builder_instance: DatasetBuilder = builder_cls(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/builder.py", line 366, in __init__
self.info = DatasetInfo.from_directory(self._cache_dir)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/info.py", line 313, in from_directory
with fs.open(path_join(dataset_info_dir, config.DATASET_INFO_FILENAME), "r", encoding="utf-8") as f:
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1094, in open
self.open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open
f = self._open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open
return LocalFileOpener(path, mode, fs=self, **kwargs)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__
self._open()
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open
self.f = open(self.path, mode=self.mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.cache/huggingface/datasets/json/default-43d06a4aedb25e6d/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51/dataset_info.json'
```
### Expected behavior
Expected behavior: 2nd GPU training run should run the same as 1st GPU training run.
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.8.0
- Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.10
- Python version: 3.8.15
- PyArrow version: 9.0.0
- Pandas version: 1.5.2 | 24 | load_dataset() cannot find dataset_info.json with multiple training runs in parallel
### Describe the bug
I have a custom local dataset in JSON form. I am trying to do multiple training runs in parallel. The first training run runs with no issue. However, when I start another run on another GPU, the following code throws this error.
If there is a workaround to ignore the cache I think that would solve my problem too.
I am using datasets version 2.8.0.
### Steps to reproduce the bug
1. Start training run of GPU 0 loading dataset from
```
load_dataset(
"json",
data_files=tr_dataset_path,
split=f"train",
download_mode="force_redownload",
)
```
2. While GPU 0 is training, start an identical run on GPU 1. GPU 1 will produce the following error:
```
Traceback (most recent call last):
File "/local-scratch1/data/mt/code/qq/train.py", line 198, in <module>
main()
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/local-scratch1/data/mt/code/qq/train.py", line 113, in main
load_dataset(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1734, in load_dataset
builder_instance = load_dataset_builder(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1518, in load_dataset_builder
builder_instance: DatasetBuilder = builder_cls(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/builder.py", line 366, in __init__
self.info = DatasetInfo.from_directory(self._cache_dir)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/info.py", line 313, in from_directory
with fs.open(path_join(dataset_info_dir, config.DATASET_INFO_FILENAME), "r", encoding="utf-8") as f:
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1094, in open
self.open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open
f = self._open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open
return LocalFileOpener(path, mode, fs=self, **kwargs)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__
self._open()
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open
self.f = open(self.path, mode=self.mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.cache/huggingface/datasets/json/default-43d06a4aedb25e6d/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51/dataset_info.json'
```
### Expected behavior
Expected behavior: 2nd GPU training run should run the same as 1st GPU training run.
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.8.0
- Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.10
- Python version: 3.8.15
- PyArrow version: 9.0.0
- Pandas version: 1.5.2
Thank you! What do you mean by prepare it beforehand? I am unclear how to conduct dataset preparation outside of using the `load_dataset` function. | [
-0.3174046277999878,
0.0906004011631012,
0.043627116829156876,
0.5405644774436951,
0.07730000466108322,
0.2994084656238556,
0.48144441843032837,
0.43623343110084534,
0.18919509649276733,
-0.04075530171394348,
0.250057190656662,
0.18446266651153564,
0.13980749249458313,
-0.10856341570615768,
-0.0409931056201458,
-0.207407146692276,
-0.008269175887107849,
0.0028028488159179688,
0.4058806300163269,
-0.0216684490442276,
-0.2612115740776062,
0.2574078440666199,
-0.12853491306304932,
0.02649618312716484,
-0.4109917879104614,
-0.11950772255659103,
-0.019806448370218277,
0.21162086725234985,
0.2659262418746948,
-0.39340531826019287,
0.2371617704629898,
-0.09330783784389496,
0.20046953856945038,
0.6234452724456787,
-0.00011928070307476446,
0.2615399956703186,
0.192063108086586,
-0.10501746088266373,
-0.3209552466869354,
-0.227874293923378,
-0.24937736988067627,
0.0369689017534256,
0.17692741751670837,
-0.2605346143245697,
-0.3424197733402252,
-0.25237783789634705,
-0.12779122591018677,
-0.6818832159042358,
0.14761796593666077,
0.025206711143255234,
0.14716893434524536,
0.1453924924135208,
-0.23962366580963135,
-0.21671831607818604,
0.06494458019733429,
0.15667122602462769,
-0.11631111055612564,
0.021288247779011726,
0.08401085436344147,
-0.279802531003952,
0.04135793074965477,
0.5517554879188538,
-0.05373911187052727,
0.2836616635322571,
0.013187739998102188,
-0.002024322748184204,
-0.042244717478752136,
0.12931744754314423,
0.06807833909988403,
-0.045059144496917725,
0.4955967962741852,
-0.3562161326408386,
-0.26322153210639954,
-0.45000797510147095,
-0.018695726990699768,
-0.23133841156959534,
0.23595348000526428,
0.31243404746055603,
-0.1761956810951233,
0.13568244874477386,
-0.2553471624851227,
-0.03371844440698624,
0.04089769721031189,
0.03636214882135391,
0.37212666869163513,
0.08426535129547119,
0.050474390387535095,
0.32930073142051697,
0.0991649478673935,
0.18410883843898773,
0.25614044070243835,
-0.0873115137219429,
0.12513747811317444,
-0.009230292402207851,
-0.6009680032730103,
0.15582667291164398,
0.0765623226761818,
-0.4981938302516937,
0.014027506113052368,
0.09646698832511902,
0.3566739857196808,
-0.12429482489824295,
0.058003511279821396,
0.2940894365310669,
0.1528533548116684,
0.1942756623029709,
-0.06801251322031021,
0.22734233736991882,
0.05678572505712509,
0.06301400810480118,
-0.29610028862953186,
-0.04622437059879303,
-0.11420467495918274,
-0.10929498821496964,
-0.10264696180820465,
0.06785960495471954,
0.10799464583396912,
-0.04031631350517273,
-0.2083159238100052,
0.026672203093767166,
-0.3802473843097687,
-0.08188939839601517,
0.25494900345802307,
0.25648391246795654,
0.03068089485168457,
0.3509567379951477,
0.055085837841033936,
0.033086925745010376,
-0.2580394744873047,
-0.21700555086135864,
-0.3022080659866333,
0.0047788918018341064,
-0.011661347001791,
0.1474396139383316,
0.302793025970459,
0.01631133072078228,
0.4361708164215088,
-0.015465491451323032,
-0.14176210761070251,
-0.22553399205207825,
0.41421547532081604,
-0.3506627380847931,
-0.047964923083782196,
0.26028895378112793,
-0.04407298564910889,
0.15418721735477448,
0.2305261492729187,
0.06592956185340881,
-0.18612602353096008,
0.21321046352386475,
-0.38798728585243225,
-0.5612810254096985,
0.11615006625652313,
0.05822204798460007,
-0.02100735902786255,
0.09020747244358063,
-0.008301228284835815,
0.14399246871471405,
0.38686662912368774,
-0.16520361602306366,
0.0883561223745346,
-0.07417763024568558,
-0.4549815356731415,
-0.2346513867378235,
0.16790810227394104,
0.586801290512085,
-0.4159819781780243,
-0.0552331916987896,
0.13106127083301544,
-0.08335450291633606,
-0.12811020016670227,
0.4383392632007599,
-0.39713793992996216,
0.3259427547454834,
-0.31617259979248047,
0.05434887111186981,
0.13675343990325928,
-0.6813419461250305,
-0.30179956555366516,
0.3279638886451721,
-0.2582881450653076,
0.12431737035512924,
0.1432967185974121,
0.07365656644105911,
-0.04938259720802307,
0.05129006505012512,
0.46839019656181335,
0.37751305103302,
-0.12165258824825287,
0.0034356918185949326,
-0.20442557334899902,
-0.1872781217098236,
0.25741326808929443,
0.3591834008693695,
0.013387814164161682,
-0.03568034619092941,
-0.11654212325811386,
-0.05547420680522919,
0.26431530714035034,
-0.04786263778805733,
0.050384581089019775,
0.2726386785507202,
0.02403365448117256,
-0.021859735250473022,
0.16698390245437622,
0.24576342105865479,
-0.46483349800109863,
0.30524083971977234,
-0.003800373524427414,
-0.22684797644615173,
-0.07143710553646088,
-0.019398467615246773,
0.07686268538236618,
-0.07055015861988068,
-0.4165920615196228,
-0.13035576045513153,
0.034492455422878265,
0.2252597063779831,
0.06481373310089111,
0.06652076542377472,
-0.15525196492671967,
0.602091908454895,
-0.22068776190280914,
0.018081648275256157,
-0.33559074997901917,
0.07673158496618271,
0.09353197365999222,
0.029155272990465164,
-0.13950049877166748,
0.019146379083395004,
0.2489408552646637,
-0.1766989380121231,
-0.1652543842792511,
0.3446524143218994,
0.17175370454788208,
0.03749202936887741,
0.10566369444131851,
-0.010273054242134094,
0.0560741052031517,
0.10405083000659943,
0.01612233743071556,
0.22442835569381714,
-0.019630463793873787,
-0.2747427821159363,
-0.14555016160011292,
0.3275516927242279,
0.0762355700135231,
0.13335585594177246,
-0.1996723860502243,
-0.12626832723617554,
0.3267636299133301,
-0.1032916009426117,
0.014857124537229538,
-0.018873795866966248,
0.19565454125404358,
0.1755368858575821,
0.45909300446510315,
-0.10077442228794098,
-0.6368587613105774,
0.13011474907398224,
0.3487493395805359,
0.22682610154151917,
0.06201248988509178,
-0.07392050325870514,
0.08524961024522781,
0.048787638545036316,
0.2366180121898651,
0.39786863327026367,
0.6255086660385132,
0.1429750770330429,
0.05344751104712486,
0.21037408709526062,
-0.05730017274618149,
-0.111351877450943,
-0.10114190727472305,
-0.02676919847726822,
0.32573002576828003,
0.15983441472053528,
0.2826700508594513,
-0.07037896662950516,
-0.17031633853912354,
-0.29299017786979675,
0.42875075340270996,
0.2042635828256607,
-0.14230361580848694,
0.2723310589790344,
-0.41521570086479187,
0.06758549064397812,
-0.42390188574790955,
-0.05829797312617302,
-0.05150948837399483,
-0.04283258318901062,
0.05369500443339348,
0.28817880153656006,
-0.13555334508419037,
0.24872197210788727,
-0.24810822308063507,
0.44581884145736694,
0.104859858751297,
-0.47266721725463867,
0.04135653376579285,
-0.18739216029644012,
-0.28177106380462646,
-0.11712963879108429,
0.35018956661224365,
-0.06188056617975235,
0.18568187952041626,
-0.04349146783351898,
-0.19312073290348053,
-0.03257818520069122,
-0.005276426672935486,
0.08841152489185333,
0.12583361566066742,
-0.12495096027851105,
-0.1284799724817276,
-0.004302643239498138,
-0.15643054246902466,
-0.1978708952665329,
0.30465763807296753,
-0.18898449838161469,
-0.15442468225955963,
-0.12026092410087585,
0.04302310571074486,
0.05218061804771423,
-0.09352932870388031,
-0.4966222941875458,
-0.3209013342857361,
-0.2745482921600342,
0.40548354387283325,
-0.08517567068338394,
0.15151074528694153,
0.08562856912612915,
0.1713193655014038,
0.14521123468875885,
0.09623032808303833,
-0.06115441024303436,
-0.3209024667739868,
-0.6478179693222046,
0.016212906688451767,
-0.40735360980033875,
-0.008974622935056686,
0.17096255719661713,
0.1200331598520279,
0.22027437388896942,
0.1716953068971634,
-0.5838252902030945,
0.11096076667308807,
0.225717231631279,
0.03890272602438927,
-0.23311224579811096,
-0.19050483405590057,
0.47704437375068665,
-0.18031497299671173,
0.06474317610263824,
-0.18878158926963806,
-0.2799719274044037,
0.29258644580841064,
-0.0779886394739151,
0.26329678297042847,
0.08196787536144257,
0.3746786117553711,
0.24258679151535034,
0.6122786402702332,
0.26353809237480164,
0.010437346994876862,
0.06504091620445251,
0.08147666603326797,
0.0975361317396164,
-0.22476118803024292,
-0.19413277506828308,
-0.060985419899225235,
-0.14699652791023254,
-0.35113972425460815,
-0.028690233826637268,
-0.039524611085653305,
-0.25428667664527893,
-0.31896501779556274,
-0.14406171441078186,
-0.09423469007015228,
-0.10558705031871796,
0.05682916194200516,
-0.23226556181907654,
0.2958487272262573,
0.07198676466941833,
0.18760782480239868,
-0.3227809965610504,
0.17022666335105896,
-0.009473099373281002,
0.09622649103403091,
0.11033142358064651,
0.18924106657505035,
-0.4994698762893677,
-0.03261053189635277,
-0.07170162349939346,
0.31953978538513184,
-0.04096314311027527,
0.5968883633613586,
-0.18636125326156616,
0.03599651902914047,
0.06738846004009247,
-0.061626750975847244,
0.6348072290420532,
-0.32290318608283997,
0.038909561932086945,
0.11556760966777802,
-0.3706192374229431,
-0.16221342980861664,
-0.31311875581741333,
0.16827161610126495,
0.2948508560657501,
0.0608028881251812,
0.4120383858680725,
-0.00746491551399231,
-0.16878803074359894,
0.2584493160247803,
-0.09463982284069061,
-0.09720045328140259,
-0.3551150858402252,
-0.23017102479934692,
-0.1563575565814972,
-0.2291642725467682,
0.20493760704994202,
0.03672555088996887,
0.21649721264839172,
-0.10889917612075806,
0.034710150212049484,
-0.08795686811208725,
0.17018359899520874,
-0.06419917941093445,
-0.03915166109800339,
0.24122971296310425,
0.09103813022375107,
0.29056409001350403,
0.5308736562728882,
0.06508836150169373,
0.3338575065135956,
0.5281208753585815,
0.15734829008579254,
-0.3254031240940094,
0.24197593331336975,
0.12388370931148529,
0.04864288493990898,
0.3357313275337219,
-0.04195304960012436,
0.1529131531715393,
0.18138010799884796,
-0.12660525739192963,
-0.1359182745218277,
-0.021940719336271286,
0.015719693154096603,
-0.16330617666244507,
-0.1901654303073883,
-0.5915167331695557,
0.32189297676086426,
0.12676118314266205,
0.04180020093917847,
0.49447646737098694,
-0.726313591003418,
-0.09011878073215485,
0.2504437565803528,
-0.09654366225004196,
0.6326221227645874,
-0.06940145790576935,
0.08797962963581085,
0.20901665091514587,
-0.3688858151435852,
0.21974466741085052,
-0.577440619468689,
0.4220707416534424,
-0.2954139709472656,
-0.08352875709533691,
-0.011781599372625351,
-0.24610699713230133,
0.1635187268257141,
0.3575030565261841,
0.1095743477344513,
0.17938649654388428,
0.035137392580509186,
0.2340269833803177,
-0.06478562206029892,
0.15702280402183533,
0.2225164920091629,
-0.2662520706653595,
-0.45315802097320557,
0.05960926413536072,
-0.18205149471759796,
0.2170465886592865,
-0.103335440158844,
-0.21652904152870178,
-0.05418478325009346,
-0.1885535567998886,
-0.05661682412028313,
0.16018801927566528,
-0.2992211580276489,
0.4672740697860718,
0.10217174887657166,
-0.4669879674911499,
-0.09137795865535736,
0.06282065063714981,
0.3779307007789612,
-0.1730518639087677,
-0.278737872838974,
0.07268686592578888,
-0.11243901401758194,
-0.03562196344137192,
-0.28596022725105286,
-0.22805342078208923,
0.19032658636569977,
0.05862846225500107,
-0.3062308430671692,
-0.0010784342885017395,
-0.24324725568294525,
-0.5753126740455627,
0.0368926078081131,
0.21195848286151886,
-0.12746016681194305,
0.22570070624351501,
-0.177059143781662,
0.15798360109329224,
0.18966512382030487,
-0.18214906752109528,
0.059005025774240494,
0.1269354224205017,
-0.27074486017227173,
0.04549422487616539,
-0.3132767081260681,
-0.11884826421737671,
-0.012365400791168213,
0.5545284748077393,
0.20662754774093628,
-0.06328153610229492,
0.4369467794895172,
0.3819408714771271,
0.0040461160242557526,
-0.15424007177352905,
-0.035045936703681946,
0.372979998588562,
-0.08039480447769165,
0.07534725219011307,
-0.2944275140762329,
0.1338668316602707,
0.14579468965530396,
-0.1364968866109848,
-0.01387423649430275,
0.047525644302368164,
0.2047768086194992,
-0.326751172542572,
-0.49465516209602356,
0.16252358257770538,
-0.20133672654628754,
0.0832892432808876,
0.4162394404411316,
0.2919579744338989,
0.04881076514720917,
0.20319697260856628,
-0.21263907849788666,
0.23452278971672058,
-0.2910153567790985,
0.0179302878677845,
-0.008013436570763588,
0.0842987447977066,
0.11819077283143997,
0.21945799887180328,
-0.03684956207871437,
0.17860358953475952,
-0.19241690635681152,
-0.08996719121932983,
-0.03341616317629814,
0.14064523577690125,
-0.02163470908999443,
0.3085578680038452,
-0.0445929616689682,
-0.43214553594589233,
-0.16491448879241943,
0.06940780580043793,
0.19707588851451874,
0.303954154253006,
-0.04840158671140671,
0.23391973972320557,
-0.13086345791816711,
0.008876927196979523,
-0.08915010094642639,
0.1434294879436493,
-0.06501151621341705,
-0.005485475063323975,
0.12656784057617188,
0.12007326632738113,
-0.031925901770591736,
0.2069111168384552,
-0.4129042625427246,
-0.1346234381198883,
-0.16019810736179352,
0.18424758315086365,
0.048980358988046646,
-0.589381992816925,
-0.011107828468084335,
0.08999542891979218,
0.29214027523994446,
0.045984044671058655,
-0.26292112469673157,
-0.10432937741279602,
0.18640127778053284,
0.09166451543569565,
-0.26897501945495605,
-0.32014021277427673,
0.5495879054069519,
0.19354310631752014,
-0.0796588659286499,
0.39116546511650085,
0.47354546189308167,
-0.04724019020795822,
-0.059226229786872864,
0.3569733798503876,
0.4423520565032959,
-0.3505401611328125,
0.34868481755256653,
0.0968066155910492,
0.003941897302865982,
-0.008067507296800613,
0.030685219913721085,
0.236899271607399,
0.20546743273735046,
0.5000792145729065,
-0.04682973772287369,
0.15559087693691254,
0.2514185309410095,
-0.09325937926769257,
-0.2518969774246216,
-0.6364417672157288,
-0.0026148036122322083,
0.2291266918182373,
-0.059241026639938354,
0.006359335035085678,
-0.4620490074157715,
0.340090274810791,
-0.11025064438581467,
-0.15684854984283447,
-0.22865144908428192,
0.12884271144866943,
-0.308922678232193,
0.032272811979055405,
-0.14202821254730225,
-0.1808878481388092,
0.09797635674476624,
0.12548986077308655,
0.13894131779670715,
0.16286903619766235,
0.5176304578781128,
-0.14292068779468536,
-0.16546021401882172,
-0.19566981494426727,
0.061424531042575836,
0.5079642534255981,
-0.0328386053442955,
-0.3860783576965332,
0.21653997898101807,
0.04308333247900009,
-0.4306727945804596,
-0.05235705152153969,
0.1640043407678604,
0.3211933374404907,
0.3099084794521332,
0.049498070031404495,
-0.07738523930311203,
0.03471427410840988,
0.11061215400695801,
-0.02386249601840973,
0.10558125376701355,
0.17657434940338135,
-0.19349583983421326,
0.37939873337745667,
-0.01513645052909851,
0.03950785472989082,
0.4401082992553711,
0.2328493595123291,
0.20027963817119598,
-0.43917936086654663,
-0.035249434411525726,
-0.17121808230876923,
0.049933791160583496,
0.02645793743431568,
0.1986565738916397,
-0.21190938353538513,
-0.0858929380774498,
0.5764269828796387,
0.20288150012493134,
0.15354198217391968,
-0.008760195225477219,
0.02254287526011467,
-0.2668808698654175,
0.4640393555164337,
-0.011102225631475449,
-0.3162091374397278,
-0.4586986303329468,
-0.22390498220920563,
-0.6046576499938965,
0.18429255485534668,
-0.4933386445045471,
0.2885443866252899,
0.2295895218849182,
0.2830564081668854,
0.13097622990608215,
-0.03909345716238022,
0.0035866498947143555,
-0.23765254020690918,
0.08299511671066284,
0.399177610874176,
-0.4149516224861145,
-0.16821642220020294,
-0.2597823143005371,
0.007476923055946827,
0.36345067620277405,
-0.2874995470046997,
0.11492756754159927,
0.03285573422908783,
-0.07718060165643692,
-0.17819902300834656,
-0.014425665140151978,
0.14418715238571167,
-0.06644538044929504,
0.3873118758201599,
-0.010491481050848961,
0.2724665403366089,
0.2643935978412628,
0.04326976090669632,
-0.31881648302078247,
-0.1773862987756729,
-0.15844778716564178,
0.31093671917915344,
-0.02992444857954979,
0.5050094127655029,
-0.4576062560081482,
0.02469652332365513,
-0.4293226897716522,
0.025272926315665245,
0.07312117516994476,
-0.11164817214012146,
-0.05788902938365936,
0.2050996869802475,
-0.15463244915008545,
0.4019119441509247,
0.3288961350917816,
0.2617925703525543,
0.05381215736269951,
0.19779762625694275,
-0.4652794599533081,
-0.07841702550649643,
0.4244210720062256,
-0.3362322449684143,
-0.31551122665405273,
-0.09939291328191757,
0.21380895376205444,
-0.15311431884765625,
0.020983150228857994,
-0.47478187084198,
0.06157249957323074,
0.3000349700450897,
-0.07487613707780838,
-0.139108806848526,
0.189982607960701,
-0.05292130634188652,
-0.06479627639055252,
0.09709006547927856,
-0.18062466382980347,
-0.05418712645769119,
-0.20981544256210327,
0.05786072090268135,
-0.2323138564825058
] |
https://github.com/huggingface/datasets/issues/5412 | load_dataset() cannot find dataset_info.json with multiple training runs in parallel | You can have a separate script that does load_dataset + map + save_to_disk to save your prepared dataset somewhere. Then in your training script you can reload the dataset with load_from_disk | ### Describe the bug
I have a custom local dataset in JSON form. I am trying to do multiple training runs in parallel. The first training run runs with no issue. However, when I start another run on another GPU, the following code throws this error.
If there is a workaround to ignore the cache I think that would solve my problem too.
I am using datasets version 2.8.0.
### Steps to reproduce the bug
1. Start training run of GPU 0 loading dataset from
```
load_dataset(
"json",
data_files=tr_dataset_path,
split=f"train",
download_mode="force_redownload",
)
```
2. While GPU 0 is training, start an identical run on GPU 1. GPU 1 will produce the following error:
```
Traceback (most recent call last):
File "/local-scratch1/data/mt/code/qq/train.py", line 198, in <module>
main()
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/local-scratch1/data/mt/code/qq/train.py", line 113, in main
load_dataset(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1734, in load_dataset
builder_instance = load_dataset_builder(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1518, in load_dataset_builder
builder_instance: DatasetBuilder = builder_cls(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/builder.py", line 366, in __init__
self.info = DatasetInfo.from_directory(self._cache_dir)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/info.py", line 313, in from_directory
with fs.open(path_join(dataset_info_dir, config.DATASET_INFO_FILENAME), "r", encoding="utf-8") as f:
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1094, in open
self.open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open
f = self._open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open
return LocalFileOpener(path, mode, fs=self, **kwargs)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__
self._open()
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open
self.f = open(self.path, mode=self.mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.cache/huggingface/datasets/json/default-43d06a4aedb25e6d/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51/dataset_info.json'
```
### Expected behavior
Expected behavior: 2nd GPU training run should run the same as 1st GPU training run.
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.8.0
- Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.10
- Python version: 3.8.15
- PyArrow version: 9.0.0
- Pandas version: 1.5.2 | 31 | load_dataset() cannot find dataset_info.json with multiple training runs in parallel
### Describe the bug
I have a custom local dataset in JSON form. I am trying to do multiple training runs in parallel. The first training run runs with no issue. However, when I start another run on another GPU, the following code throws this error.
If there is a workaround to ignore the cache I think that would solve my problem too.
I am using datasets version 2.8.0.
### Steps to reproduce the bug
1. Start training run of GPU 0 loading dataset from
```
load_dataset(
"json",
data_files=tr_dataset_path,
split=f"train",
download_mode="force_redownload",
)
```
2. While GPU 0 is training, start an identical run on GPU 1. GPU 1 will produce the following error:
```
Traceback (most recent call last):
File "/local-scratch1/data/mt/code/qq/train.py", line 198, in <module>
main()
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/local-scratch1/data/mt/code/qq/train.py", line 113, in main
load_dataset(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1734, in load_dataset
builder_instance = load_dataset_builder(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1518, in load_dataset_builder
builder_instance: DatasetBuilder = builder_cls(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/builder.py", line 366, in __init__
self.info = DatasetInfo.from_directory(self._cache_dir)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/info.py", line 313, in from_directory
with fs.open(path_join(dataset_info_dir, config.DATASET_INFO_FILENAME), "r", encoding="utf-8") as f:
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1094, in open
self.open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open
f = self._open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open
return LocalFileOpener(path, mode, fs=self, **kwargs)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__
self._open()
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open
self.f = open(self.path, mode=self.mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.cache/huggingface/datasets/json/default-43d06a4aedb25e6d/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51/dataset_info.json'
```
### Expected behavior
Expected behavior: 2nd GPU training run should run the same as 1st GPU training run.
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.8.0
- Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.10
- Python version: 3.8.15
- PyArrow version: 9.0.0
- Pandas version: 1.5.2
You can have a separate script that does load_dataset + map + save_to_disk to save your prepared dataset somewhere. Then in your training script you can reload the dataset with load_from_disk | [
-0.3174046277999878,
0.0906004011631012,
0.043627116829156876,
0.5405644774436951,
0.07730000466108322,
0.2994084656238556,
0.48144441843032837,
0.43623343110084534,
0.18919509649276733,
-0.04075530171394348,
0.250057190656662,
0.18446266651153564,
0.13980749249458313,
-0.10856341570615768,
-0.0409931056201458,
-0.207407146692276,
-0.008269175887107849,
0.0028028488159179688,
0.4058806300163269,
-0.0216684490442276,
-0.2612115740776062,
0.2574078440666199,
-0.12853491306304932,
0.02649618312716484,
-0.4109917879104614,
-0.11950772255659103,
-0.019806448370218277,
0.21162086725234985,
0.2659262418746948,
-0.39340531826019287,
0.2371617704629898,
-0.09330783784389496,
0.20046953856945038,
0.6234452724456787,
-0.00011928070307476446,
0.2615399956703186,
0.192063108086586,
-0.10501746088266373,
-0.3209552466869354,
-0.227874293923378,
-0.24937736988067627,
0.0369689017534256,
0.17692741751670837,
-0.2605346143245697,
-0.3424197733402252,
-0.25237783789634705,
-0.12779122591018677,
-0.6818832159042358,
0.14761796593666077,
0.025206711143255234,
0.14716893434524536,
0.1453924924135208,
-0.23962366580963135,
-0.21671831607818604,
0.06494458019733429,
0.15667122602462769,
-0.11631111055612564,
0.021288247779011726,
0.08401085436344147,
-0.279802531003952,
0.04135793074965477,
0.5517554879188538,
-0.05373911187052727,
0.2836616635322571,
0.013187739998102188,
-0.002024322748184204,
-0.042244717478752136,
0.12931744754314423,
0.06807833909988403,
-0.045059144496917725,
0.4955967962741852,
-0.3562161326408386,
-0.26322153210639954,
-0.45000797510147095,
-0.018695726990699768,
-0.23133841156959534,
0.23595348000526428,
0.31243404746055603,
-0.1761956810951233,
0.13568244874477386,
-0.2553471624851227,
-0.03371844440698624,
0.04089769721031189,
0.03636214882135391,
0.37212666869163513,
0.08426535129547119,
0.050474390387535095,
0.32930073142051697,
0.0991649478673935,
0.18410883843898773,
0.25614044070243835,
-0.0873115137219429,
0.12513747811317444,
-0.009230292402207851,
-0.6009680032730103,
0.15582667291164398,
0.0765623226761818,
-0.4981938302516937,
0.014027506113052368,
0.09646698832511902,
0.3566739857196808,
-0.12429482489824295,
0.058003511279821396,
0.2940894365310669,
0.1528533548116684,
0.1942756623029709,
-0.06801251322031021,
0.22734233736991882,
0.05678572505712509,
0.06301400810480118,
-0.29610028862953186,
-0.04622437059879303,
-0.11420467495918274,
-0.10929498821496964,
-0.10264696180820465,
0.06785960495471954,
0.10799464583396912,
-0.04031631350517273,
-0.2083159238100052,
0.026672203093767166,
-0.3802473843097687,
-0.08188939839601517,
0.25494900345802307,
0.25648391246795654,
0.03068089485168457,
0.3509567379951477,
0.055085837841033936,
0.033086925745010376,
-0.2580394744873047,
-0.21700555086135864,
-0.3022080659866333,
0.0047788918018341064,
-0.011661347001791,
0.1474396139383316,
0.302793025970459,
0.01631133072078228,
0.4361708164215088,
-0.015465491451323032,
-0.14176210761070251,
-0.22553399205207825,
0.41421547532081604,
-0.3506627380847931,
-0.047964923083782196,
0.26028895378112793,
-0.04407298564910889,
0.15418721735477448,
0.2305261492729187,
0.06592956185340881,
-0.18612602353096008,
0.21321046352386475,
-0.38798728585243225,
-0.5612810254096985,
0.11615006625652313,
0.05822204798460007,
-0.02100735902786255,
0.09020747244358063,
-0.008301228284835815,
0.14399246871471405,
0.38686662912368774,
-0.16520361602306366,
0.0883561223745346,
-0.07417763024568558,
-0.4549815356731415,
-0.2346513867378235,
0.16790810227394104,
0.586801290512085,
-0.4159819781780243,
-0.0552331916987896,
0.13106127083301544,
-0.08335450291633606,
-0.12811020016670227,
0.4383392632007599,
-0.39713793992996216,
0.3259427547454834,
-0.31617259979248047,
0.05434887111186981,
0.13675343990325928,
-0.6813419461250305,
-0.30179956555366516,
0.3279638886451721,
-0.2582881450653076,
0.12431737035512924,
0.1432967185974121,
0.07365656644105911,
-0.04938259720802307,
0.05129006505012512,
0.46839019656181335,
0.37751305103302,
-0.12165258824825287,
0.0034356918185949326,
-0.20442557334899902,
-0.1872781217098236,
0.25741326808929443,
0.3591834008693695,
0.013387814164161682,
-0.03568034619092941,
-0.11654212325811386,
-0.05547420680522919,
0.26431530714035034,
-0.04786263778805733,
0.050384581089019775,
0.2726386785507202,
0.02403365448117256,
-0.021859735250473022,
0.16698390245437622,
0.24576342105865479,
-0.46483349800109863,
0.30524083971977234,
-0.003800373524427414,
-0.22684797644615173,
-0.07143710553646088,
-0.019398467615246773,
0.07686268538236618,
-0.07055015861988068,
-0.4165920615196228,
-0.13035576045513153,
0.034492455422878265,
0.2252597063779831,
0.06481373310089111,
0.06652076542377472,
-0.15525196492671967,
0.602091908454895,
-0.22068776190280914,
0.018081648275256157,
-0.33559074997901917,
0.07673158496618271,
0.09353197365999222,
0.029155272990465164,
-0.13950049877166748,
0.019146379083395004,
0.2489408552646637,
-0.1766989380121231,
-0.1652543842792511,
0.3446524143218994,
0.17175370454788208,
0.03749202936887741,
0.10566369444131851,
-0.010273054242134094,
0.0560741052031517,
0.10405083000659943,
0.01612233743071556,
0.22442835569381714,
-0.019630463793873787,
-0.2747427821159363,
-0.14555016160011292,
0.3275516927242279,
0.0762355700135231,
0.13335585594177246,
-0.1996723860502243,
-0.12626832723617554,
0.3267636299133301,
-0.1032916009426117,
0.014857124537229538,
-0.018873795866966248,
0.19565454125404358,
0.1755368858575821,
0.45909300446510315,
-0.10077442228794098,
-0.6368587613105774,
0.13011474907398224,
0.3487493395805359,
0.22682610154151917,
0.06201248988509178,
-0.07392050325870514,
0.08524961024522781,
0.048787638545036316,
0.2366180121898651,
0.39786863327026367,
0.6255086660385132,
0.1429750770330429,
0.05344751104712486,
0.21037408709526062,
-0.05730017274618149,
-0.111351877450943,
-0.10114190727472305,
-0.02676919847726822,
0.32573002576828003,
0.15983441472053528,
0.2826700508594513,
-0.07037896662950516,
-0.17031633853912354,
-0.29299017786979675,
0.42875075340270996,
0.2042635828256607,
-0.14230361580848694,
0.2723310589790344,
-0.41521570086479187,
0.06758549064397812,
-0.42390188574790955,
-0.05829797312617302,
-0.05150948837399483,
-0.04283258318901062,
0.05369500443339348,
0.28817880153656006,
-0.13555334508419037,
0.24872197210788727,
-0.24810822308063507,
0.44581884145736694,
0.104859858751297,
-0.47266721725463867,
0.04135653376579285,
-0.18739216029644012,
-0.28177106380462646,
-0.11712963879108429,
0.35018956661224365,
-0.06188056617975235,
0.18568187952041626,
-0.04349146783351898,
-0.19312073290348053,
-0.03257818520069122,
-0.005276426672935486,
0.08841152489185333,
0.12583361566066742,
-0.12495096027851105,
-0.1284799724817276,
-0.004302643239498138,
-0.15643054246902466,
-0.1978708952665329,
0.30465763807296753,
-0.18898449838161469,
-0.15442468225955963,
-0.12026092410087585,
0.04302310571074486,
0.05218061804771423,
-0.09352932870388031,
-0.4966222941875458,
-0.3209013342857361,
-0.2745482921600342,
0.40548354387283325,
-0.08517567068338394,
0.15151074528694153,
0.08562856912612915,
0.1713193655014038,
0.14521123468875885,
0.09623032808303833,
-0.06115441024303436,
-0.3209024667739868,
-0.6478179693222046,
0.016212906688451767,
-0.40735360980033875,
-0.008974622935056686,
0.17096255719661713,
0.1200331598520279,
0.22027437388896942,
0.1716953068971634,
-0.5838252902030945,
0.11096076667308807,
0.225717231631279,
0.03890272602438927,
-0.23311224579811096,
-0.19050483405590057,
0.47704437375068665,
-0.18031497299671173,
0.06474317610263824,
-0.18878158926963806,
-0.2799719274044037,
0.29258644580841064,
-0.0779886394739151,
0.26329678297042847,
0.08196787536144257,
0.3746786117553711,
0.24258679151535034,
0.6122786402702332,
0.26353809237480164,
0.010437346994876862,
0.06504091620445251,
0.08147666603326797,
0.0975361317396164,
-0.22476118803024292,
-0.19413277506828308,
-0.060985419899225235,
-0.14699652791023254,
-0.35113972425460815,
-0.028690233826637268,
-0.039524611085653305,
-0.25428667664527893,
-0.31896501779556274,
-0.14406171441078186,
-0.09423469007015228,
-0.10558705031871796,
0.05682916194200516,
-0.23226556181907654,
0.2958487272262573,
0.07198676466941833,
0.18760782480239868,
-0.3227809965610504,
0.17022666335105896,
-0.009473099373281002,
0.09622649103403091,
0.11033142358064651,
0.18924106657505035,
-0.4994698762893677,
-0.03261053189635277,
-0.07170162349939346,
0.31953978538513184,
-0.04096314311027527,
0.5968883633613586,
-0.18636125326156616,
0.03599651902914047,
0.06738846004009247,
-0.061626750975847244,
0.6348072290420532,
-0.32290318608283997,
0.038909561932086945,
0.11556760966777802,
-0.3706192374229431,
-0.16221342980861664,
-0.31311875581741333,
0.16827161610126495,
0.2948508560657501,
0.0608028881251812,
0.4120383858680725,
-0.00746491551399231,
-0.16878803074359894,
0.2584493160247803,
-0.09463982284069061,
-0.09720045328140259,
-0.3551150858402252,
-0.23017102479934692,
-0.1563575565814972,
-0.2291642725467682,
0.20493760704994202,
0.03672555088996887,
0.21649721264839172,
-0.10889917612075806,
0.034710150212049484,
-0.08795686811208725,
0.17018359899520874,
-0.06419917941093445,
-0.03915166109800339,
0.24122971296310425,
0.09103813022375107,
0.29056409001350403,
0.5308736562728882,
0.06508836150169373,
0.3338575065135956,
0.5281208753585815,
0.15734829008579254,
-0.3254031240940094,
0.24197593331336975,
0.12388370931148529,
0.04864288493990898,
0.3357313275337219,
-0.04195304960012436,
0.1529131531715393,
0.18138010799884796,
-0.12660525739192963,
-0.1359182745218277,
-0.021940719336271286,
0.015719693154096603,
-0.16330617666244507,
-0.1901654303073883,
-0.5915167331695557,
0.32189297676086426,
0.12676118314266205,
0.04180020093917847,
0.49447646737098694,
-0.726313591003418,
-0.09011878073215485,
0.2504437565803528,
-0.09654366225004196,
0.6326221227645874,
-0.06940145790576935,
0.08797962963581085,
0.20901665091514587,
-0.3688858151435852,
0.21974466741085052,
-0.577440619468689,
0.4220707416534424,
-0.2954139709472656,
-0.08352875709533691,
-0.011781599372625351,
-0.24610699713230133,
0.1635187268257141,
0.3575030565261841,
0.1095743477344513,
0.17938649654388428,
0.035137392580509186,
0.2340269833803177,
-0.06478562206029892,
0.15702280402183533,
0.2225164920091629,
-0.2662520706653595,
-0.45315802097320557,
0.05960926413536072,
-0.18205149471759796,
0.2170465886592865,
-0.103335440158844,
-0.21652904152870178,
-0.05418478325009346,
-0.1885535567998886,
-0.05661682412028313,
0.16018801927566528,
-0.2992211580276489,
0.4672740697860718,
0.10217174887657166,
-0.4669879674911499,
-0.09137795865535736,
0.06282065063714981,
0.3779307007789612,
-0.1730518639087677,
-0.278737872838974,
0.07268686592578888,
-0.11243901401758194,
-0.03562196344137192,
-0.28596022725105286,
-0.22805342078208923,
0.19032658636569977,
0.05862846225500107,
-0.3062308430671692,
-0.0010784342885017395,
-0.24324725568294525,
-0.5753126740455627,
0.0368926078081131,
0.21195848286151886,
-0.12746016681194305,
0.22570070624351501,
-0.177059143781662,
0.15798360109329224,
0.18966512382030487,
-0.18214906752109528,
0.059005025774240494,
0.1269354224205017,
-0.27074486017227173,
0.04549422487616539,
-0.3132767081260681,
-0.11884826421737671,
-0.012365400791168213,
0.5545284748077393,
0.20662754774093628,
-0.06328153610229492,
0.4369467794895172,
0.3819408714771271,
0.0040461160242557526,
-0.15424007177352905,
-0.035045936703681946,
0.372979998588562,
-0.08039480447769165,
0.07534725219011307,
-0.2944275140762329,
0.1338668316602707,
0.14579468965530396,
-0.1364968866109848,
-0.01387423649430275,
0.047525644302368164,
0.2047768086194992,
-0.326751172542572,
-0.49465516209602356,
0.16252358257770538,
-0.20133672654628754,
0.0832892432808876,
0.4162394404411316,
0.2919579744338989,
0.04881076514720917,
0.20319697260856628,
-0.21263907849788666,
0.23452278971672058,
-0.2910153567790985,
0.0179302878677845,
-0.008013436570763588,
0.0842987447977066,
0.11819077283143997,
0.21945799887180328,
-0.03684956207871437,
0.17860358953475952,
-0.19241690635681152,
-0.08996719121932983,
-0.03341616317629814,
0.14064523577690125,
-0.02163470908999443,
0.3085578680038452,
-0.0445929616689682,
-0.43214553594589233,
-0.16491448879241943,
0.06940780580043793,
0.19707588851451874,
0.303954154253006,
-0.04840158671140671,
0.23391973972320557,
-0.13086345791816711,
0.008876927196979523,
-0.08915010094642639,
0.1434294879436493,
-0.06501151621341705,
-0.005485475063323975,
0.12656784057617188,
0.12007326632738113,
-0.031925901770591736,
0.2069111168384552,
-0.4129042625427246,
-0.1346234381198883,
-0.16019810736179352,
0.18424758315086365,
0.048980358988046646,
-0.589381992816925,
-0.011107828468084335,
0.08999542891979218,
0.29214027523994446,
0.045984044671058655,
-0.26292112469673157,
-0.10432937741279602,
0.18640127778053284,
0.09166451543569565,
-0.26897501945495605,
-0.32014021277427673,
0.5495879054069519,
0.19354310631752014,
-0.0796588659286499,
0.39116546511650085,
0.47354546189308167,
-0.04724019020795822,
-0.059226229786872864,
0.3569733798503876,
0.4423520565032959,
-0.3505401611328125,
0.34868481755256653,
0.0968066155910492,
0.003941897302865982,
-0.008067507296800613,
0.030685219913721085,
0.236899271607399,
0.20546743273735046,
0.5000792145729065,
-0.04682973772287369,
0.15559087693691254,
0.2514185309410095,
-0.09325937926769257,
-0.2518969774246216,
-0.6364417672157288,
-0.0026148036122322083,
0.2291266918182373,
-0.059241026639938354,
0.006359335035085678,
-0.4620490074157715,
0.340090274810791,
-0.11025064438581467,
-0.15684854984283447,
-0.22865144908428192,
0.12884271144866943,
-0.308922678232193,
0.032272811979055405,
-0.14202821254730225,
-0.1808878481388092,
0.09797635674476624,
0.12548986077308655,
0.13894131779670715,
0.16286903619766235,
0.5176304578781128,
-0.14292068779468536,
-0.16546021401882172,
-0.19566981494426727,
0.061424531042575836,
0.5079642534255981,
-0.0328386053442955,
-0.3860783576965332,
0.21653997898101807,
0.04308333247900009,
-0.4306727945804596,
-0.05235705152153969,
0.1640043407678604,
0.3211933374404907,
0.3099084794521332,
0.049498070031404495,
-0.07738523930311203,
0.03471427410840988,
0.11061215400695801,
-0.02386249601840973,
0.10558125376701355,
0.17657434940338135,
-0.19349583983421326,
0.37939873337745667,
-0.01513645052909851,
0.03950785472989082,
0.4401082992553711,
0.2328493595123291,
0.20027963817119598,
-0.43917936086654663,
-0.035249434411525726,
-0.17121808230876923,
0.049933791160583496,
0.02645793743431568,
0.1986565738916397,
-0.21190938353538513,
-0.0858929380774498,
0.5764269828796387,
0.20288150012493134,
0.15354198217391968,
-0.008760195225477219,
0.02254287526011467,
-0.2668808698654175,
0.4640393555164337,
-0.011102225631475449,
-0.3162091374397278,
-0.4586986303329468,
-0.22390498220920563,
-0.6046576499938965,
0.18429255485534668,
-0.4933386445045471,
0.2885443866252899,
0.2295895218849182,
0.2830564081668854,
0.13097622990608215,
-0.03909345716238022,
0.0035866498947143555,
-0.23765254020690918,
0.08299511671066284,
0.399177610874176,
-0.4149516224861145,
-0.16821642220020294,
-0.2597823143005371,
0.007476923055946827,
0.36345067620277405,
-0.2874995470046997,
0.11492756754159927,
0.03285573422908783,
-0.07718060165643692,
-0.17819902300834656,
-0.014425665140151978,
0.14418715238571167,
-0.06644538044929504,
0.3873118758201599,
-0.010491481050848961,
0.2724665403366089,
0.2643935978412628,
0.04326976090669632,
-0.31881648302078247,
-0.1773862987756729,
-0.15844778716564178,
0.31093671917915344,
-0.02992444857954979,
0.5050094127655029,
-0.4576062560081482,
0.02469652332365513,
-0.4293226897716522,
0.025272926315665245,
0.07312117516994476,
-0.11164817214012146,
-0.05788902938365936,
0.2050996869802475,
-0.15463244915008545,
0.4019119441509247,
0.3288961350917816,
0.2617925703525543,
0.05381215736269951,
0.19779762625694275,
-0.4652794599533081,
-0.07841702550649643,
0.4244210720062256,
-0.3362322449684143,
-0.31551122665405273,
-0.09939291328191757,
0.21380895376205444,
-0.15311431884765625,
0.020983150228857994,
-0.47478187084198,
0.06157249957323074,
0.3000349700450897,
-0.07487613707780838,
-0.139108806848526,
0.189982607960701,
-0.05292130634188652,
-0.06479627639055252,
0.09709006547927856,
-0.18062466382980347,
-0.05418712645769119,
-0.20981544256210327,
0.05786072090268135,
-0.2323138564825058
] |
https://github.com/huggingface/datasets/issues/5412 | load_dataset() cannot find dataset_info.json with multiple training runs in parallel | Thank you! I believe I was running additional map steps after loading, resulting in the cache conflict. | ### Describe the bug
I have a custom local dataset in JSON form. I am trying to do multiple training runs in parallel. The first training run runs with no issue. However, when I start another run on another GPU, the following code throws this error.
If there is a workaround to ignore the cache I think that would solve my problem too.
I am using datasets version 2.8.0.
### Steps to reproduce the bug
1. Start training run of GPU 0 loading dataset from
```
load_dataset(
"json",
data_files=tr_dataset_path,
split=f"train",
download_mode="force_redownload",
)
```
2. While GPU 0 is training, start an identical run on GPU 1. GPU 1 will produce the following error:
```
Traceback (most recent call last):
File "/local-scratch1/data/mt/code/qq/train.py", line 198, in <module>
main()
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/local-scratch1/data/mt/code/qq/train.py", line 113, in main
load_dataset(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1734, in load_dataset
builder_instance = load_dataset_builder(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1518, in load_dataset_builder
builder_instance: DatasetBuilder = builder_cls(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/builder.py", line 366, in __init__
self.info = DatasetInfo.from_directory(self._cache_dir)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/info.py", line 313, in from_directory
with fs.open(path_join(dataset_info_dir, config.DATASET_INFO_FILENAME), "r", encoding="utf-8") as f:
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1094, in open
self.open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open
f = self._open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open
return LocalFileOpener(path, mode, fs=self, **kwargs)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__
self._open()
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open
self.f = open(self.path, mode=self.mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.cache/huggingface/datasets/json/default-43d06a4aedb25e6d/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51/dataset_info.json'
```
### Expected behavior
Expected behavior: 2nd GPU training run should run the same as 1st GPU training run.
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.8.0
- Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.10
- Python version: 3.8.15
- PyArrow version: 9.0.0
- Pandas version: 1.5.2 | 17 | load_dataset() cannot find dataset_info.json with multiple training runs in parallel
### Describe the bug
I have a custom local dataset in JSON form. I am trying to do multiple training runs in parallel. The first training run runs with no issue. However, when I start another run on another GPU, the following code throws this error.
If there is a workaround to ignore the cache I think that would solve my problem too.
I am using datasets version 2.8.0.
### Steps to reproduce the bug
1. Start training run of GPU 0 loading dataset from
```
load_dataset(
"json",
data_files=tr_dataset_path,
split=f"train",
download_mode="force_redownload",
)
```
2. While GPU 0 is training, start an identical run on GPU 1. GPU 1 will produce the following error:
```
Traceback (most recent call last):
File "/local-scratch1/data/mt/code/qq/train.py", line 198, in <module>
main()
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/local-scratch1/data/mt/code/qq/train.py", line 113, in main
load_dataset(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1734, in load_dataset
builder_instance = load_dataset_builder(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1518, in load_dataset_builder
builder_instance: DatasetBuilder = builder_cls(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/builder.py", line 366, in __init__
self.info = DatasetInfo.from_directory(self._cache_dir)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/info.py", line 313, in from_directory
with fs.open(path_join(dataset_info_dir, config.DATASET_INFO_FILENAME), "r", encoding="utf-8") as f:
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1094, in open
self.open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open
f = self._open(
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open
return LocalFileOpener(path, mode, fs=self, **kwargs)
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__
self._open()
File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open
self.f = open(self.path, mode=self.mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.cache/huggingface/datasets/json/default-43d06a4aedb25e6d/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51/dataset_info.json'
```
### Expected behavior
Expected behavior: 2nd GPU training run should run the same as 1st GPU training run.
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.8.0
- Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.10
- Python version: 3.8.15
- PyArrow version: 9.0.0
- Pandas version: 1.5.2
Thank you! I believe I was running additional map steps after loading, resulting in the cache conflict. | [
-0.3174046277999878,
0.0906004011631012,
0.043627116829156876,
0.5405644774436951,
0.07730000466108322,
0.2994084656238556,
0.48144441843032837,
0.43623343110084534,
0.18919509649276733,
-0.04075530171394348,
0.250057190656662,
0.18446266651153564,
0.13980749249458313,
-0.10856341570615768,
-0.0409931056201458,
-0.207407146692276,
-0.008269175887107849,
0.0028028488159179688,
0.4058806300163269,
-0.0216684490442276,
-0.2612115740776062,
0.2574078440666199,
-0.12853491306304932,
0.02649618312716484,
-0.4109917879104614,
-0.11950772255659103,
-0.019806448370218277,
0.21162086725234985,
0.2659262418746948,
-0.39340531826019287,
0.2371617704629898,
-0.09330783784389496,
0.20046953856945038,
0.6234452724456787,
-0.00011928070307476446,
0.2615399956703186,
0.192063108086586,
-0.10501746088266373,
-0.3209552466869354,
-0.227874293923378,
-0.24937736988067627,
0.0369689017534256,
0.17692741751670837,
-0.2605346143245697,
-0.3424197733402252,
-0.25237783789634705,
-0.12779122591018677,
-0.6818832159042358,
0.14761796593666077,
0.025206711143255234,
0.14716893434524536,
0.1453924924135208,
-0.23962366580963135,
-0.21671831607818604,
0.06494458019733429,
0.15667122602462769,
-0.11631111055612564,
0.021288247779011726,
0.08401085436344147,
-0.279802531003952,
0.04135793074965477,
0.5517554879188538,
-0.05373911187052727,
0.2836616635322571,
0.013187739998102188,
-0.002024322748184204,
-0.042244717478752136,
0.12931744754314423,
0.06807833909988403,
-0.045059144496917725,
0.4955967962741852,
-0.3562161326408386,
-0.26322153210639954,
-0.45000797510147095,
-0.018695726990699768,
-0.23133841156959534,
0.23595348000526428,
0.31243404746055603,
-0.1761956810951233,
0.13568244874477386,
-0.2553471624851227,
-0.03371844440698624,
0.04089769721031189,
0.03636214882135391,
0.37212666869163513,
0.08426535129547119,
0.050474390387535095,
0.32930073142051697,
0.0991649478673935,
0.18410883843898773,
0.25614044070243835,
-0.0873115137219429,
0.12513747811317444,
-0.009230292402207851,
-0.6009680032730103,
0.15582667291164398,
0.0765623226761818,
-0.4981938302516937,
0.014027506113052368,
0.09646698832511902,
0.3566739857196808,
-0.12429482489824295,
0.058003511279821396,
0.2940894365310669,
0.1528533548116684,
0.1942756623029709,
-0.06801251322031021,
0.22734233736991882,
0.05678572505712509,
0.06301400810480118,
-0.29610028862953186,
-0.04622437059879303,
-0.11420467495918274,
-0.10929498821496964,
-0.10264696180820465,
0.06785960495471954,
0.10799464583396912,
-0.04031631350517273,
-0.2083159238100052,
0.026672203093767166,
-0.3802473843097687,
-0.08188939839601517,
0.25494900345802307,
0.25648391246795654,
0.03068089485168457,
0.3509567379951477,
0.055085837841033936,
0.033086925745010376,
-0.2580394744873047,
-0.21700555086135864,
-0.3022080659866333,
0.0047788918018341064,
-0.011661347001791,
0.1474396139383316,
0.302793025970459,
0.01631133072078228,
0.4361708164215088,
-0.015465491451323032,
-0.14176210761070251,
-0.22553399205207825,
0.41421547532081604,
-0.3506627380847931,
-0.047964923083782196,
0.26028895378112793,
-0.04407298564910889,
0.15418721735477448,
0.2305261492729187,
0.06592956185340881,
-0.18612602353096008,
0.21321046352386475,
-0.38798728585243225,
-0.5612810254096985,
0.11615006625652313,
0.05822204798460007,
-0.02100735902786255,
0.09020747244358063,
-0.008301228284835815,
0.14399246871471405,
0.38686662912368774,
-0.16520361602306366,
0.0883561223745346,
-0.07417763024568558,
-0.4549815356731415,
-0.2346513867378235,
0.16790810227394104,
0.586801290512085,
-0.4159819781780243,
-0.0552331916987896,
0.13106127083301544,
-0.08335450291633606,
-0.12811020016670227,
0.4383392632007599,
-0.39713793992996216,
0.3259427547454834,
-0.31617259979248047,
0.05434887111186981,
0.13675343990325928,
-0.6813419461250305,
-0.30179956555366516,
0.3279638886451721,
-0.2582881450653076,
0.12431737035512924,
0.1432967185974121,
0.07365656644105911,
-0.04938259720802307,
0.05129006505012512,
0.46839019656181335,
0.37751305103302,
-0.12165258824825287,
0.0034356918185949326,
-0.20442557334899902,
-0.1872781217098236,
0.25741326808929443,
0.3591834008693695,
0.013387814164161682,
-0.03568034619092941,
-0.11654212325811386,
-0.05547420680522919,
0.26431530714035034,
-0.04786263778805733,
0.050384581089019775,
0.2726386785507202,
0.02403365448117256,
-0.021859735250473022,
0.16698390245437622,
0.24576342105865479,
-0.46483349800109863,
0.30524083971977234,
-0.003800373524427414,
-0.22684797644615173,
-0.07143710553646088,
-0.019398467615246773,
0.07686268538236618,
-0.07055015861988068,
-0.4165920615196228,
-0.13035576045513153,
0.034492455422878265,
0.2252597063779831,
0.06481373310089111,
0.06652076542377472,
-0.15525196492671967,
0.602091908454895,
-0.22068776190280914,
0.018081648275256157,
-0.33559074997901917,
0.07673158496618271,
0.09353197365999222,
0.029155272990465164,
-0.13950049877166748,
0.019146379083395004,
0.2489408552646637,
-0.1766989380121231,
-0.1652543842792511,
0.3446524143218994,
0.17175370454788208,
0.03749202936887741,
0.10566369444131851,
-0.010273054242134094,
0.0560741052031517,
0.10405083000659943,
0.01612233743071556,
0.22442835569381714,
-0.019630463793873787,
-0.2747427821159363,
-0.14555016160011292,
0.3275516927242279,
0.0762355700135231,
0.13335585594177246,
-0.1996723860502243,
-0.12626832723617554,
0.3267636299133301,
-0.1032916009426117,
0.014857124537229538,
-0.018873795866966248,
0.19565454125404358,
0.1755368858575821,
0.45909300446510315,
-0.10077442228794098,
-0.6368587613105774,
0.13011474907398224,
0.3487493395805359,
0.22682610154151917,
0.06201248988509178,
-0.07392050325870514,
0.08524961024522781,
0.048787638545036316,
0.2366180121898651,
0.39786863327026367,
0.6255086660385132,
0.1429750770330429,
0.05344751104712486,
0.21037408709526062,
-0.05730017274618149,
-0.111351877450943,
-0.10114190727472305,
-0.02676919847726822,
0.32573002576828003,
0.15983441472053528,
0.2826700508594513,
-0.07037896662950516,
-0.17031633853912354,
-0.29299017786979675,
0.42875075340270996,
0.2042635828256607,
-0.14230361580848694,
0.2723310589790344,
-0.41521570086479187,
0.06758549064397812,
-0.42390188574790955,
-0.05829797312617302,
-0.05150948837399483,
-0.04283258318901062,
0.05369500443339348,
0.28817880153656006,
-0.13555334508419037,
0.24872197210788727,
-0.24810822308063507,
0.44581884145736694,
0.104859858751297,
-0.47266721725463867,
0.04135653376579285,
-0.18739216029644012,
-0.28177106380462646,
-0.11712963879108429,
0.35018956661224365,
-0.06188056617975235,
0.18568187952041626,
-0.04349146783351898,
-0.19312073290348053,
-0.03257818520069122,
-0.005276426672935486,
0.08841152489185333,
0.12583361566066742,
-0.12495096027851105,
-0.1284799724817276,
-0.004302643239498138,
-0.15643054246902466,
-0.1978708952665329,
0.30465763807296753,
-0.18898449838161469,
-0.15442468225955963,
-0.12026092410087585,
0.04302310571074486,
0.05218061804771423,
-0.09352932870388031,
-0.4966222941875458,
-0.3209013342857361,
-0.2745482921600342,
0.40548354387283325,
-0.08517567068338394,
0.15151074528694153,
0.08562856912612915,
0.1713193655014038,
0.14521123468875885,
0.09623032808303833,
-0.06115441024303436,
-0.3209024667739868,
-0.6478179693222046,
0.016212906688451767,
-0.40735360980033875,
-0.008974622935056686,
0.17096255719661713,
0.1200331598520279,
0.22027437388896942,
0.1716953068971634,
-0.5838252902030945,
0.11096076667308807,
0.225717231631279,
0.03890272602438927,
-0.23311224579811096,
-0.19050483405590057,
0.47704437375068665,
-0.18031497299671173,
0.06474317610263824,
-0.18878158926963806,
-0.2799719274044037,
0.29258644580841064,
-0.0779886394739151,
0.26329678297042847,
0.08196787536144257,
0.3746786117553711,
0.24258679151535034,
0.6122786402702332,
0.26353809237480164,
0.010437346994876862,
0.06504091620445251,
0.08147666603326797,
0.0975361317396164,
-0.22476118803024292,
-0.19413277506828308,
-0.060985419899225235,
-0.14699652791023254,
-0.35113972425460815,
-0.028690233826637268,
-0.039524611085653305,
-0.25428667664527893,
-0.31896501779556274,
-0.14406171441078186,
-0.09423469007015228,
-0.10558705031871796,
0.05682916194200516,
-0.23226556181907654,
0.2958487272262573,
0.07198676466941833,
0.18760782480239868,
-0.3227809965610504,
0.17022666335105896,
-0.009473099373281002,
0.09622649103403091,
0.11033142358064651,
0.18924106657505035,
-0.4994698762893677,
-0.03261053189635277,
-0.07170162349939346,
0.31953978538513184,
-0.04096314311027527,
0.5968883633613586,
-0.18636125326156616,
0.03599651902914047,
0.06738846004009247,
-0.061626750975847244,
0.6348072290420532,
-0.32290318608283997,
0.038909561932086945,
0.11556760966777802,
-0.3706192374229431,
-0.16221342980861664,
-0.31311875581741333,
0.16827161610126495,
0.2948508560657501,
0.0608028881251812,
0.4120383858680725,
-0.00746491551399231,
-0.16878803074359894,
0.2584493160247803,
-0.09463982284069061,
-0.09720045328140259,
-0.3551150858402252,
-0.23017102479934692,
-0.1563575565814972,
-0.2291642725467682,
0.20493760704994202,
0.03672555088996887,
0.21649721264839172,
-0.10889917612075806,
0.034710150212049484,
-0.08795686811208725,
0.17018359899520874,
-0.06419917941093445,
-0.03915166109800339,
0.24122971296310425,
0.09103813022375107,
0.29056409001350403,
0.5308736562728882,
0.06508836150169373,
0.3338575065135956,
0.5281208753585815,
0.15734829008579254,
-0.3254031240940094,
0.24197593331336975,
0.12388370931148529,
0.04864288493990898,
0.3357313275337219,
-0.04195304960012436,
0.1529131531715393,
0.18138010799884796,
-0.12660525739192963,
-0.1359182745218277,
-0.021940719336271286,
0.015719693154096603,
-0.16330617666244507,
-0.1901654303073883,
-0.5915167331695557,
0.32189297676086426,
0.12676118314266205,
0.04180020093917847,
0.49447646737098694,
-0.726313591003418,
-0.09011878073215485,
0.2504437565803528,
-0.09654366225004196,
0.6326221227645874,
-0.06940145790576935,
0.08797962963581085,
0.20901665091514587,
-0.3688858151435852,
0.21974466741085052,
-0.577440619468689,
0.4220707416534424,
-0.2954139709472656,
-0.08352875709533691,
-0.011781599372625351,
-0.24610699713230133,
0.1635187268257141,
0.3575030565261841,
0.1095743477344513,
0.17938649654388428,
0.035137392580509186,
0.2340269833803177,
-0.06478562206029892,
0.15702280402183533,
0.2225164920091629,
-0.2662520706653595,
-0.45315802097320557,
0.05960926413536072,
-0.18205149471759796,
0.2170465886592865,
-0.103335440158844,
-0.21652904152870178,
-0.05418478325009346,
-0.1885535567998886,
-0.05661682412028313,
0.16018801927566528,
-0.2992211580276489,
0.4672740697860718,
0.10217174887657166,
-0.4669879674911499,
-0.09137795865535736,
0.06282065063714981,
0.3779307007789612,
-0.1730518639087677,
-0.278737872838974,
0.07268686592578888,
-0.11243901401758194,
-0.03562196344137192,
-0.28596022725105286,
-0.22805342078208923,
0.19032658636569977,
0.05862846225500107,
-0.3062308430671692,
-0.0010784342885017395,
-0.24324725568294525,
-0.5753126740455627,
0.0368926078081131,
0.21195848286151886,
-0.12746016681194305,
0.22570070624351501,
-0.177059143781662,
0.15798360109329224,
0.18966512382030487,
-0.18214906752109528,
0.059005025774240494,
0.1269354224205017,
-0.27074486017227173,
0.04549422487616539,
-0.3132767081260681,
-0.11884826421737671,
-0.012365400791168213,
0.5545284748077393,
0.20662754774093628,
-0.06328153610229492,
0.4369467794895172,
0.3819408714771271,
0.0040461160242557526,
-0.15424007177352905,
-0.035045936703681946,
0.372979998588562,
-0.08039480447769165,
0.07534725219011307,
-0.2944275140762329,
0.1338668316602707,
0.14579468965530396,
-0.1364968866109848,
-0.01387423649430275,
0.047525644302368164,
0.2047768086194992,
-0.326751172542572,
-0.49465516209602356,
0.16252358257770538,
-0.20133672654628754,
0.0832892432808876,
0.4162394404411316,
0.2919579744338989,
0.04881076514720917,
0.20319697260856628,
-0.21263907849788666,
0.23452278971672058,
-0.2910153567790985,
0.0179302878677845,
-0.008013436570763588,
0.0842987447977066,
0.11819077283143997,
0.21945799887180328,
-0.03684956207871437,
0.17860358953475952,
-0.19241690635681152,
-0.08996719121932983,
-0.03341616317629814,
0.14064523577690125,
-0.02163470908999443,
0.3085578680038452,
-0.0445929616689682,
-0.43214553594589233,
-0.16491448879241943,
0.06940780580043793,
0.19707588851451874,
0.303954154253006,
-0.04840158671140671,
0.23391973972320557,
-0.13086345791816711,
0.008876927196979523,
-0.08915010094642639,
0.1434294879436493,
-0.06501151621341705,
-0.005485475063323975,
0.12656784057617188,
0.12007326632738113,
-0.031925901770591736,
0.2069111168384552,
-0.4129042625427246,
-0.1346234381198883,
-0.16019810736179352,
0.18424758315086365,
0.048980358988046646,
-0.589381992816925,
-0.011107828468084335,
0.08999542891979218,
0.29214027523994446,
0.045984044671058655,
-0.26292112469673157,
-0.10432937741279602,
0.18640127778053284,
0.09166451543569565,
-0.26897501945495605,
-0.32014021277427673,
0.5495879054069519,
0.19354310631752014,
-0.0796588659286499,
0.39116546511650085,
0.47354546189308167,
-0.04724019020795822,
-0.059226229786872864,
0.3569733798503876,
0.4423520565032959,
-0.3505401611328125,
0.34868481755256653,
0.0968066155910492,
0.003941897302865982,
-0.008067507296800613,
0.030685219913721085,
0.236899271607399,
0.20546743273735046,
0.5000792145729065,
-0.04682973772287369,
0.15559087693691254,
0.2514185309410095,
-0.09325937926769257,
-0.2518969774246216,
-0.6364417672157288,
-0.0026148036122322083,
0.2291266918182373,
-0.059241026639938354,
0.006359335035085678,
-0.4620490074157715,
0.340090274810791,
-0.11025064438581467,
-0.15684854984283447,
-0.22865144908428192,
0.12884271144866943,
-0.308922678232193,
0.032272811979055405,
-0.14202821254730225,
-0.1808878481388092,
0.09797635674476624,
0.12548986077308655,
0.13894131779670715,
0.16286903619766235,
0.5176304578781128,
-0.14292068779468536,
-0.16546021401882172,
-0.19566981494426727,
0.061424531042575836,
0.5079642534255981,
-0.0328386053442955,
-0.3860783576965332,
0.21653997898101807,
0.04308333247900009,
-0.4306727945804596,
-0.05235705152153969,
0.1640043407678604,
0.3211933374404907,
0.3099084794521332,
0.049498070031404495,
-0.07738523930311203,
0.03471427410840988,
0.11061215400695801,
-0.02386249601840973,
0.10558125376701355,
0.17657434940338135,
-0.19349583983421326,
0.37939873337745667,
-0.01513645052909851,
0.03950785472989082,
0.4401082992553711,
0.2328493595123291,
0.20027963817119598,
-0.43917936086654663,
-0.035249434411525726,
-0.17121808230876923,
0.049933791160583496,
0.02645793743431568,
0.1986565738916397,
-0.21190938353538513,
-0.0858929380774498,
0.5764269828796387,
0.20288150012493134,
0.15354198217391968,
-0.008760195225477219,
0.02254287526011467,
-0.2668808698654175,
0.4640393555164337,
-0.011102225631475449,
-0.3162091374397278,
-0.4586986303329468,
-0.22390498220920563,
-0.6046576499938965,
0.18429255485534668,
-0.4933386445045471,
0.2885443866252899,
0.2295895218849182,
0.2830564081668854,
0.13097622990608215,
-0.03909345716238022,
0.0035866498947143555,
-0.23765254020690918,
0.08299511671066284,
0.399177610874176,
-0.4149516224861145,
-0.16821642220020294,
-0.2597823143005371,
0.007476923055946827,
0.36345067620277405,
-0.2874995470046997,
0.11492756754159927,
0.03285573422908783,
-0.07718060165643692,
-0.17819902300834656,
-0.014425665140151978,
0.14418715238571167,
-0.06644538044929504,
0.3873118758201599,
-0.010491481050848961,
0.2724665403366089,
0.2643935978412628,
0.04326976090669632,
-0.31881648302078247,
-0.1773862987756729,
-0.15844778716564178,
0.31093671917915344,
-0.02992444857954979,
0.5050094127655029,
-0.4576062560081482,
0.02469652332365513,
-0.4293226897716522,
0.025272926315665245,
0.07312117516994476,
-0.11164817214012146,
-0.05788902938365936,
0.2050996869802475,
-0.15463244915008545,
0.4019119441509247,
0.3288961350917816,
0.2617925703525543,
0.05381215736269951,
0.19779762625694275,
-0.4652794599533081,
-0.07841702550649643,
0.4244210720062256,
-0.3362322449684143,
-0.31551122665405273,
-0.09939291328191757,
0.21380895376205444,
-0.15311431884765625,
0.020983150228857994,
-0.47478187084198,
0.06157249957323074,
0.3000349700450897,
-0.07487613707780838,
-0.139108806848526,
0.189982607960701,
-0.05292130634188652,
-0.06479627639055252,
0.09709006547927856,
-0.18062466382980347,
-0.05418712645769119,
-0.20981544256210327,
0.05786072090268135,
-0.2323138564825058
] |
https://github.com/huggingface/datasets/issues/5408 | dataset map function could not be hash properly | Hi ! On macos I tried with
- py 3.9.11
- datasets 2.8.0
- transformers 4.25.1
- dill 0.3.4
and I was able to hash `prepare_dataset` correctly:
```python
from datasets.fingerprint import Hasher
Hasher.hash(prepare_dataset)
```
What version of transformers do you have ? Can you try to call `Hasher.hash` on the the tokenizer and the feature extractor to see which one can't be hashed ? | ### Describe the bug
I follow the [blog post](https://huggingface.co/blog/fine-tune-whisper#building-a-demo) to finetune a Cantonese transcribe model.
When using map function to prepare dataset, following warning pop out:
`common_voice = common_voice.map(prepare_dataset,
remove_columns=common_voice.column_names["train"], num_proc=1)`
> Parameter 'function'=<function prepare_dataset at 0x000001D1D9D79A60> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
I read https://github.com/huggingface/datasets/issues/4521 and https://github.com/huggingface/datasets/issues/3178 but cannot solve the issue.
### Steps to reproduce the bug
```python
from datasets import load_dataset, DatasetDict
common_voice = DatasetDict()
common_voice["train"] = load_dataset("mozilla-foundation/common_voice_11_0", "zh-HK",
split="train+validation")
common_voice["test"] = load_dataset("mozilla-foundation/common_voice_11_0", "zh-HK",
split="test")
common_voice = common_voice.remove_columns(["accent", "age", "client_id", "down_votes", "gender", "locale", "path", "segment", "up_votes"])
from transformers import WhisperFeatureExtractor, WhisperTokenizer, WhisperProcessor
feature_extractor = WhisperFeatureExtractor.from_pretrained("openai/whisper-small")
tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-small", language="chinese", task="transcribe")
processor = WhisperProcessor.from_pretrained("openai/whisper-small", language="chinese", task="transcribe")
from datasets import Audio
common_voice = common_voice.cast_column("audio", Audio(sampling_rate=16000))
def prepare_dataset(batch):
# load and resample audio data from 48 to 16kHz
audio = batch["audio"]
# compute log-Mel input features from input audio array
batch["input_features"] = feature_extractor(audio["array"],
sampling_rate=audio["sampling_rate"]).input_features[0]
# encode target text to label ids
batch["labels"] = tokenizer(batch["sentence"]).input_ids
return batch
common_voice = common_voice.map(prepare_dataset,
remove_columns=common_voice.column_names["train"], num_proc=1)
```
### Expected behavior
Should be no warning shown.
### Environment info
- `datasets` version: 2.7.0
- Platform: Windows-10-10.0.19045-SP0
- Python version: 3.9.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5
- dill version: 0.3.4
- multiprocess version: 0.70.12.2 | 64 | dataset map function could not be hash properly
### Describe the bug
I follow the [blog post](https://huggingface.co/blog/fine-tune-whisper#building-a-demo) to finetune a Cantonese transcribe model.
When using map function to prepare dataset, following warning pop out:
`common_voice = common_voice.map(prepare_dataset,
remove_columns=common_voice.column_names["train"], num_proc=1)`
> Parameter 'function'=<function prepare_dataset at 0x000001D1D9D79A60> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
I read https://github.com/huggingface/datasets/issues/4521 and https://github.com/huggingface/datasets/issues/3178 but cannot solve the issue.
### Steps to reproduce the bug
```python
from datasets import load_dataset, DatasetDict
common_voice = DatasetDict()
common_voice["train"] = load_dataset("mozilla-foundation/common_voice_11_0", "zh-HK",
split="train+validation")
common_voice["test"] = load_dataset("mozilla-foundation/common_voice_11_0", "zh-HK",
split="test")
common_voice = common_voice.remove_columns(["accent", "age", "client_id", "down_votes", "gender", "locale", "path", "segment", "up_votes"])
from transformers import WhisperFeatureExtractor, WhisperTokenizer, WhisperProcessor
feature_extractor = WhisperFeatureExtractor.from_pretrained("openai/whisper-small")
tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-small", language="chinese", task="transcribe")
processor = WhisperProcessor.from_pretrained("openai/whisper-small", language="chinese", task="transcribe")
from datasets import Audio
common_voice = common_voice.cast_column("audio", Audio(sampling_rate=16000))
def prepare_dataset(batch):
# load and resample audio data from 48 to 16kHz
audio = batch["audio"]
# compute log-Mel input features from input audio array
batch["input_features"] = feature_extractor(audio["array"],
sampling_rate=audio["sampling_rate"]).input_features[0]
# encode target text to label ids
batch["labels"] = tokenizer(batch["sentence"]).input_ids
return batch
common_voice = common_voice.map(prepare_dataset,
remove_columns=common_voice.column_names["train"], num_proc=1)
```
### Expected behavior
Should be no warning shown.
### Environment info
- `datasets` version: 2.7.0
- Platform: Windows-10-10.0.19045-SP0
- Python version: 3.9.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5
- dill version: 0.3.4
- multiprocess version: 0.70.12.2
Hi ! On macos I tried with
- py 3.9.11
- datasets 2.8.0
- transformers 4.25.1
- dill 0.3.4
and I was able to hash `prepare_dataset` correctly:
```python
from datasets.fingerprint import Hasher
Hasher.hash(prepare_dataset)
```
What version of transformers do you have ? Can you try to call `Hasher.hash` on the the tokenizer and the feature extractor to see which one can't be hashed ? | [
-0.053247835487127304,
-0.17688889801502228,
0.10579632222652435,
0.10368242859840393,
0.3758312463760376,
0.08446512371301651,
0.18014320731163025,
0.17695252597332,
-0.1404319405555725,
0.05729922652244568,
-0.16413289308547974,
0.23005767166614532,
-0.2356150597333908,
-0.03130513057112694,
0.12169486284255981,
0.016214560717344284,
0.17958298325538635,
-0.011437982320785522,
-0.1457614302635193,
-0.2940596342086792,
-0.19908446073532104,
0.03986372798681259,
-0.2627815008163452,
0.14090441167354584,
-0.2647057771682739,
-0.30959078669548035,
0.03170976787805557,
-0.08633964508771896,
-0.2387150675058365,
-0.10445939004421234,
0.19360189139842987,
0.05265141278505325,
-0.0889047384262085,
0.1875387728214264,
-0.00012281749513931572,
0.18677060306072235,
0.37595659494400024,
-0.30517080426216125,
0.14347556233406067,
-0.310512900352478,
-0.2491529881954193,
0.10382051020860672,
-0.3151603043079376,
0.013360150158405304,
-0.10770233720541,
0.1060924157500267,
-0.11675605177879333,
-0.3524548411369324,
0.5720986723899841,
0.25376471877098083,
0.09155668318271637,
0.058237820863723755,
0.19278481602668762,
0.2657914459705353,
0.3267866373062134,
-0.04350220412015915,
-0.23311562836170197,
0.35932084918022156,
-0.038446903228759766,
-0.15750926733016968,
-0.11454623192548752,
0.5052323341369629,
-0.0945354700088501,
-0.3381332457065582,
0.190644770860672,
0.1037667766213417,
-0.06666881591081619,
-0.5319275856018066,
0.059427596628665924,
0.1339930295944214,
-0.05894627422094345,
-0.4700622260570526,
-0.2955808639526367,
-0.03676518797874451,
-0.17833364009857178,
-0.2693132162094116,
0.47927892208099365,
-0.08913771063089371,
0.1784406453371048,
0.22684073448181152,
-0.5252280235290527,
-0.04829031601548195,
0.2480100393295288,
0.13188143074512482,
0.450071781873703,
-0.013446666300296783,
-0.06297969818115234,
0.14204126596450806,
0.22322200238704681,
-0.3258340358734131,
-0.09510834515094757,
-0.1209564208984375,
-0.08637022972106934,
0.4544493854045868,
-0.34654703736305237,
-0.1580887734889984,
0.15646985173225403,
0.07784475386142731,
0.4004264771938324,
-0.10439459979534149,
0.006658940576016903,
0.20274049043655396,
-0.18369171023368835,
-0.06170126795768738,
0.19808155298233032,
0.25005683302879333,
0.15920424461364746,
0.22266577184200287,
-0.04326161742210388,
-0.017463281750679016,
0.09235258400440216,
0.02305731177330017,
0.34420445561408997,
-0.04086671024560928,
0.04421522840857506,
0.1946735680103302,
0.16492360830307007,
-0.2170274406671524,
-0.019653119146823883,
0.171844944357872,
-0.46924635767936707,
-0.15656167268753052,
-0.048985179513692856,
0.2741836607456207,
0.1454915851354599,
-0.15587735176086426,
-0.04098951444029808,
0.1767781674861908,
-0.02145678922533989,
-0.04176237806677818,
-0.19179145991802216,
-0.0027914997190237045,
-0.30187758803367615,
0.3051968514919281,
-0.062172070145606995,
-0.1621558517217636,
0.2415763884782791,
0.12803661823272705,
0.08654237538576126,
-0.14320695400238037,
-0.24895653128623962,
-0.22700437903404236,
0.3515816628932953,
0.09983120858669281,
-0.25219491124153137,
0.04214474558830261,
-0.02127530798316002,
-0.06022953242063522,
-0.12736079096794128,
-0.09658221155405045,
-0.31980100274086,
-0.34887540340423584,
0.17353731393814087,
0.009749108925461769,
-0.02359987050294876,
0.3143296241760254,
-0.20627987384796143,
0.35820627212524414,
0.4312412738800049,
-0.08686954528093338,
0.06991001963615417,
-0.061004966497421265,
-0.33145639300346375,
-0.05051492899656296,
0.24588432908058167,
0.46863842010498047,
0.12908044457435608,
-0.22341524064540863,
0.061871934682130814,
-0.11298379302024841,
0.2554723918437958,
0.4205891788005829,
-0.06858712434768677,
-0.009133413434028625,
-0.32261598110198975,
0.47576218843460083,
0.34795472025871277,
-0.29198113083839417,
-0.5824059247970581,
0.23385396599769592,
-0.15382900834083557,
0.14610855281352997,
-0.12697052955627441,
-0.1546841412782669,
0.11447340250015259,
-0.24783563613891602,
0.22717884182929993,
-0.020447716116905212,
-0.00448659248650074,
0.17228728532791138,
-0.32542547583580017,
-0.25250566005706787,
0.23273712396621704,
-0.2878202497959137,
-0.213820680975914,
0.2694758474826813,
0.12980899214744568,
0.19160783290863037,
0.41550692915916443,
0.06197032704949379,
0.2480602115392685,
0.04179349169135094,
0.16709858179092407,
-0.1768251210451126,
-0.041172921657562256,
0.012906037271022797,
-0.4271714687347412,
0.07842936366796494,
0.014648601412773132,
0.20062169432640076,
-0.4088711142539978,
-0.03606601431965828,
0.10080023109912872,
-0.11375802755355835,
-0.25991392135620117,
0.010823367163538933,
-0.041241928935050964,
-0.1339452862739563,
0.2695278823375702,
0.1859617680311203,
-0.15587377548217773,
0.06345527619123459,
-0.3786185085773468,
-0.13118816912174225,
-0.3894762396812439,
0.13455361127853394,
-0.10804811865091324,
-0.1199796199798584,
0.2209199070930481,
0.25589993596076965,
0.31651440262794495,
-0.11319989711046219,
-0.19993674755096436,
0.4361112415790558,
-0.3552950918674469,
0.11103472113609314,
-0.2938271462917328,
0.2753737270832062,
0.26556605100631714,
-0.5593367218971252,
0.05993318557739258,
-0.08315905928611755,
0.04702446609735489,
-0.01962403580546379,
-0.037565238773822784,
0.3259863257408142,
0.24660353362560272,
0.02872651070356369,
-0.21251103281974792,
0.0371999517083168,
0.08478900045156479,
-0.11479032039642334,
-0.2280125766992569,
-0.428029328584671,
0.02812332659959793,
-0.4989241659641266,
0.48793357610702515,
0.14864018559455872,
0.10958006978034973,
-0.20414671301841736,
0.7780514359474182,
0.019169654697179794,
0.3305533230304718,
0.08118009567260742,
0.018733955919742584,
-0.2507060468196869,
-0.06123226135969162,
0.13983501493930817,
0.2338634878396988,
-0.11056914180517197,
-0.11380131542682648,
0.2430088371038437,
0.0059225065633654594,
0.024380460381507874,
0.13805577158927917,
-0.15689043700695038,
0.08912631124258041,
0.2848184406757355,
0.10068728029727936,
0.09831263870000839,
-0.5083445906639099,
0.09378756582736969,
0.16159012913703918,
0.26010483503341675,
-0.40400367975234985,
-0.2524096369743347,
-0.3456331193447113,
0.40593522787094116,
-0.1522209495306015,
0.014895861968398094,
-0.18532291054725647,
-0.11901821941137314,
-0.10117575526237488,
-0.2791420519351959,
-0.15304413437843323,
0.4528658092021942,
0.034158844500780106,
-0.11248759925365448,
0.1894957572221756,
-0.023253878578543663,
-0.39810577034950256,
-0.059191908687353134,
-0.06562132388353348,
-0.11569224298000336,
0.040322668850421906,
-0.293879896402359,
-0.000206800177693367,
-0.041380904614925385,
-0.3823391795158386,
-0.20986837148666382,
-0.2227526307106018,
0.2495562732219696,
-0.2663724422454834,
0.03632001206278801,
0.0012741535902023315,
-0.17948441207408905,
-0.11793889105319977,
-0.23131567239761353,
0.28174889087677,
-0.1455051451921463,
-0.3156639337539673,
0.0408325232565403,
0.02395705133676529,
-0.13361944258213043,
-0.1195182204246521,
-0.39681360125541687,
-0.1786615252494812,
-0.11935903131961823,
0.2338588386774063,
-0.501717746257782,
0.03951817378401756,
0.34684059023857117,
0.0727081298828125,
-0.11567497253417969,
-0.6424579620361328,
-0.06700854748487473,
-0.4374898076057434,
-0.47124865651130676,
0.4434758424758911,
-0.09257045388221741,
-0.29617273807525635,
-0.09494927525520325,
0.04935260862112045,
-0.04549446329474449,
0.28263652324676514,
-0.30925095081329346,
0.028291910886764526,
0.01795458048582077,
-0.1430967152118683,
0.16334310173988342,
-0.0031036846339702606,
0.09476196765899658,
0.147285595536232,
0.1794118732213974,
-0.08222591876983643,
-0.4449382722377777,
0.1313243955373764,
0.17016735672950745,
0.4230273962020874,
0.3341086506843567,
0.8156642317771912,
-0.03846266493201256,
0.8212663531303406,
0.4776149392127991,
-0.1859791874885559,
0.2967079281806946,
-0.018228260800242424,
0.0017550215125083923,
0.0871920958161354,
-0.258762001991272,
0.33319491147994995,
0.15841425955295563,
0.2158687561750412,
0.12827572226524353,
-0.1957801878452301,
-0.17267471551895142,
-0.0033203214406967163,
-0.09134373068809509,
-0.31609395146369934,
-0.3441038429737091,
0.1668439656496048,
-0.3697488009929657,
0.3607299327850342,
0.10350027680397034,
0.22111791372299194,
0.22907356917858124,
-0.13331514596939087,
0.4488484561443329,
-0.13621068000793457,
0.4505164623260498,
0.010903814807534218,
-0.2691165804862976,
0.016805456951260567,
-0.3157563805580139,
0.13074307143688202,
0.18424569070339203,
0.6146768927574158,
-0.23481856286525726,
-0.06194014102220535,
-0.19484256207942963,
0.1337185651063919,
0.5289412140846252,
-0.3603854477405548,
0.29454201459884644,
-0.2373126745223999,
0.08802185952663422,
0.11272760480642319,
-0.0751413106918335,
0.06729669868946075,
0.31740060448646545,
-0.16129393875598907,
0.32774606347084045,
-0.3119587004184723,
0.10264831781387329,
0.15382762253284454,
0.008656891994178295,
-0.14030659198760986,
0.09827880561351776,
-0.18097783625125885,
-0.1857321858406067,
-0.3194841146469116,
0.15603891015052795,
-0.02574010193347931,
0.0718807578086853,
-0.01669423282146454,
0.0034579336643218994,
0.42695239186286926,
-0.04757688194513321,
0.11390488594770432,
0.10826404392719269,
0.3879997134208679,
0.2815220355987549,
0.4102652370929718,
0.25084272027015686,
0.065894216299057,
0.04236094653606415,
0.5089277029037476,
0.027963075786828995,
-0.27148544788360596,
-0.09887825697660446,
-0.10924569517374039,
0.16191701591014862,
0.3606959581375122,
0.00690438412129879,
0.002960190176963806,
0.5050283670425415,
0.08126751333475113,
-0.11901833862066269,
-0.3088785409927368,
0.5236358046531677,
-0.04477105662226677,
-0.41524988412857056,
-0.2330569624900818,
0.6178497672080994,
0.1361556053161621,
-0.13491231203079224,
-0.008605320006608963,
-0.0607948899269104,
-0.32770752906799316,
0.5190516710281372,
0.05497181788086891,
1.1407692432403564,
-0.09033823013305664,
-0.24830904603004456,
-0.06758199632167816,
0.19066627323627472,
0.06478413939476013,
-0.5239486694335938,
-0.09258811920881271,
-0.1430537849664688,
-0.19599086046218872,
-0.047659434378147125,
-0.04231002554297447,
0.04768120124936104,
0.22228498756885529,
-0.2521381676197052,
0.14250339567661285,
0.051297128200531006,
0.20790238678455353,
-0.06235543638467789,
-0.13860207796096802,
-0.009529804810881615,
-0.16012313961982727,
0.07200673222541809,
0.017880350351333618,
0.14929309487342834,
0.20642392337322235,
0.00941758044064045,
-0.1552799940109253,
-0.01878443732857704,
-0.3898438811302185,
-0.3396531939506531,
0.2983351945877075,
-0.3458532392978668,
0.00632026232779026,
0.14829625189304352,
-0.11030958592891693,
0.37008172273635864,
0.060842808336019516,
0.06984619051218033,
0.13891029357910156,
-0.12661853432655334,
0.2204362154006958,
0.47433948516845703,
0.17914226651191711,
0.03073674999177456,
0.05521562695503235,
0.02599242888391018,
0.01346353068947792,
-0.07637141644954681,
0.054974209517240524,
-0.12321196496486664,
-0.13846638798713684,
-0.5252799987792969,
0.00373908132314682,
-0.04385332018136978,
-0.17872056365013123,
-0.10046112537384033,
0.16783423721790314,
0.07101278007030487,
-0.14019235968589783,
0.03778969869017601,
0.22592607140541077,
-0.23986274003982544,
0.14326342940330505,
-0.06611655652523041,
-0.22832968831062317,
0.012127047404646873,
0.4958438575267792,
-0.024931199848651886,
0.06626120954751968,
0.36493250727653503,
-0.024402949959039688,
-0.1724122315645218,
-0.06211358681321144,
-0.25750553607940674,
0.092852883040905,
-0.46178895235061646,
0.05694924294948578,
-0.1072152778506279,
0.03301696479320526,
-0.3842187523841858,
0.4892939031124115,
0.012737195938825607,
0.01738804206252098,
0.10889644920825958,
-0.2281699776649475,
-0.24463960528373718,
0.3281877040863037,
0.12363407015800476,
0.1587410718202591,
-0.3487456142902374,
0.5086026191711426,
0.09767121076583862,
0.4114748239517212,
-0.22757844626903534,
-0.04460832476615906,
-0.007885482162237167,
0.2622421979904175,
0.31158632040023804,
0.2286492884159088,
0.12317933142185211,
-0.18221817910671234,
-0.02439008094370365,
0.35840195417404175,
-0.2263861447572708,
-0.0134990643709898,
-0.11029361188411713,
0.1676524132490158,
0.14824292063713074,
0.0762820616364479,
-0.12655119597911835,
-0.03458486124873161,
0.15460634231567383,
-0.3123026192188263,
0.0633692592382431,
0.2735491991043091,
0.20172061026096344,
0.23243911564350128,
0.1555781215429306,
-0.1995304524898529,
0.0022322461009025574,
-0.20662350952625275,
-0.16040685772895813,
0.02017156034708023,
-0.06146901473402977,
-0.06610625982284546,
-0.06413837522268295,
-0.105584517121315,
0.1505298763513565,
-0.07456738501787186,
-0.05763755738735199,
0.13073834776878357,
0.34453085064888,
0.04483332112431526,
-0.10137585550546646,
0.5169341564178467,
0.19341619312763214,
0.17046308517456055,
-0.4451453685760498,
-0.312202513217926,
0.1315433382987976,
0.06963086128234863,
-0.24571219086647034,
-0.1385851353406906,
0.21825744211673737,
0.10596340894699097,
-0.04185940697789192,
0.03611677139997482,
0.0016134567558765411,
-0.039360180497169495,
-0.1363968700170517,
-0.0651545375585556,
0.20697133243083954,
-0.5545641779899597,
0.1602460741996765,
0.36058539152145386,
-0.05436861887574196,
0.2296900451183319,
0.435213178396225,
-0.2754571735858917,
0.17712810635566711,
0.5239404439926147,
-0.18416810035705566,
0.1785285770893097,
-0.0627601146697998,
0.3886150121688843,
-0.09268353134393692,
-0.46756991744041443,
0.07215677201747894,
0.27077534794807434,
-0.35384616255760193,
0.32099536061286926,
0.08055713772773743,
0.2992987036705017,
0.23783668875694275,
-0.09850156307220459,
-0.022883513942360878,
0.3325061798095703,
-0.1745721399784088,
-0.16879746317863464,
0.09162893891334534,
-0.16531667113304138,
-0.3659377694129944,
0.15390004217624664,
-0.07975868880748749,
0.07802687585353851,
1.029133677482605,
0.21689526736736298,
-0.1890590339899063,
0.14168140292167664,
-0.41917404532432556,
0.2078956663608551,
0.3166007697582245,
-0.3122033178806305,
0.24178458750247955,
0.05465849116444588,
-0.3020894527435303,
-0.03141215071082115,
0.4015161991119385,
0.23389436304569244,
0.17688731849193573,
0.2250000536441803,
0.4241723418235779,
0.21773865818977356,
0.009801046922802925,
0.003573395311832428,
0.6167240142822266,
0.32914969325065613,
-0.1086166501045227,
-0.022139346227049828,
0.010210700333118439,
-0.12031206488609314,
0.047793880105018616,
0.08429975062608719,
0.42228516936302185,
0.005867195315659046,
0.4568958580493927,
-0.21809989213943481,
-0.11087711155414581,
-0.22365546226501465,
0.06816937029361725,
-0.2212289273738861,
0.04711443930864334,
0.4304807782173157,
0.025495490059256554,
0.2561750113964081,
-0.26515868306159973,
0.04102061688899994,
0.2898792326450348,
0.36424872279167175,
0.45511311292648315,
-0.17721673846244812,
-0.42688313126564026,
-0.07942207157611847,
-0.6400274634361267,
0.0929160863161087,
-0.03096313402056694,
0.3294796347618103,
-0.19464154541492462,
0.11417470872402191,
0.30292049050331116,
0.2630297541618347,
-0.09425514936447144,
-0.22039532661437988,
-0.31339338421821594,
0.07282201945781708,
-0.0904313325881958,
0.0723542720079422,
-0.4540957808494568,
0.3004070818424225,
0.18954788148403168,
-0.2887299358844757,
0.3972121775150299,
0.16371886432170868,
-0.07648962736129761,
-0.24750162661075592,
-0.04206952080130577,
-0.1485930234193802,
-0.3135983943939209,
0.7741941809654236,
0.3611166179180145,
0.11540965735912323,
-0.3270852565765381,
-0.06848343461751938,
-0.33254241943359375,
-0.09038489311933517,
0.050805479288101196,
0.11478409916162491,
0.03958451375365257,
0.37031447887420654,
-0.029093952849507332,
-0.07278279960155487,
-0.43691587448120117,
-0.01207012590020895,
-0.08922384679317474,
-0.022438988089561462,
-0.37093836069107056,
0.18160365521907806,
-0.04245226830244064,
-0.17745879292488098,
-0.07077896595001221,
0.48606225848197937,
-0.05390077084302902,
0.2257758378982544,
-0.26174166798591614,
-0.4145830273628235,
0.5517231225967407,
-0.32673710584640503,
-0.06672213971614838,
0.009186118841171265,
0.18498703837394714,
-0.027838870882987976,
-0.3468402922153473,
-0.7997642159461975,
0.07129677385091782,
0.18923276662826538,
-0.01581982523202896,
-0.20726796984672546,
-0.019281800836324692,
0.17803950607776642,
0.05716288462281227,
-0.07221496850252151,
0.5012377500534058,
0.03975624218583107,
-0.35385459661483765,
0.3150794804096222,
-0.24640649557113647
] |
https://github.com/huggingface/datasets/issues/5408 | dataset map function could not be hash properly | Thanks for your prompt reply.
I update datasets version to 2.8.0 and the warning is gong. | ### Describe the bug
I follow the [blog post](https://huggingface.co/blog/fine-tune-whisper#building-a-demo) to finetune a Cantonese transcribe model.
When using map function to prepare dataset, following warning pop out:
`common_voice = common_voice.map(prepare_dataset,
remove_columns=common_voice.column_names["train"], num_proc=1)`
> Parameter 'function'=<function prepare_dataset at 0x000001D1D9D79A60> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
I read https://github.com/huggingface/datasets/issues/4521 and https://github.com/huggingface/datasets/issues/3178 but cannot solve the issue.
### Steps to reproduce the bug
```python
from datasets import load_dataset, DatasetDict
common_voice = DatasetDict()
common_voice["train"] = load_dataset("mozilla-foundation/common_voice_11_0", "zh-HK",
split="train+validation")
common_voice["test"] = load_dataset("mozilla-foundation/common_voice_11_0", "zh-HK",
split="test")
common_voice = common_voice.remove_columns(["accent", "age", "client_id", "down_votes", "gender", "locale", "path", "segment", "up_votes"])
from transformers import WhisperFeatureExtractor, WhisperTokenizer, WhisperProcessor
feature_extractor = WhisperFeatureExtractor.from_pretrained("openai/whisper-small")
tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-small", language="chinese", task="transcribe")
processor = WhisperProcessor.from_pretrained("openai/whisper-small", language="chinese", task="transcribe")
from datasets import Audio
common_voice = common_voice.cast_column("audio", Audio(sampling_rate=16000))
def prepare_dataset(batch):
# load and resample audio data from 48 to 16kHz
audio = batch["audio"]
# compute log-Mel input features from input audio array
batch["input_features"] = feature_extractor(audio["array"],
sampling_rate=audio["sampling_rate"]).input_features[0]
# encode target text to label ids
batch["labels"] = tokenizer(batch["sentence"]).input_ids
return batch
common_voice = common_voice.map(prepare_dataset,
remove_columns=common_voice.column_names["train"], num_proc=1)
```
### Expected behavior
Should be no warning shown.
### Environment info
- `datasets` version: 2.7.0
- Platform: Windows-10-10.0.19045-SP0
- Python version: 3.9.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5
- dill version: 0.3.4
- multiprocess version: 0.70.12.2 | 16 | dataset map function could not be hash properly
### Describe the bug
I follow the [blog post](https://huggingface.co/blog/fine-tune-whisper#building-a-demo) to finetune a Cantonese transcribe model.
When using map function to prepare dataset, following warning pop out:
`common_voice = common_voice.map(prepare_dataset,
remove_columns=common_voice.column_names["train"], num_proc=1)`
> Parameter 'function'=<function prepare_dataset at 0x000001D1D9D79A60> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
I read https://github.com/huggingface/datasets/issues/4521 and https://github.com/huggingface/datasets/issues/3178 but cannot solve the issue.
### Steps to reproduce the bug
```python
from datasets import load_dataset, DatasetDict
common_voice = DatasetDict()
common_voice["train"] = load_dataset("mozilla-foundation/common_voice_11_0", "zh-HK",
split="train+validation")
common_voice["test"] = load_dataset("mozilla-foundation/common_voice_11_0", "zh-HK",
split="test")
common_voice = common_voice.remove_columns(["accent", "age", "client_id", "down_votes", "gender", "locale", "path", "segment", "up_votes"])
from transformers import WhisperFeatureExtractor, WhisperTokenizer, WhisperProcessor
feature_extractor = WhisperFeatureExtractor.from_pretrained("openai/whisper-small")
tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-small", language="chinese", task="transcribe")
processor = WhisperProcessor.from_pretrained("openai/whisper-small", language="chinese", task="transcribe")
from datasets import Audio
common_voice = common_voice.cast_column("audio", Audio(sampling_rate=16000))
def prepare_dataset(batch):
# load and resample audio data from 48 to 16kHz
audio = batch["audio"]
# compute log-Mel input features from input audio array
batch["input_features"] = feature_extractor(audio["array"],
sampling_rate=audio["sampling_rate"]).input_features[0]
# encode target text to label ids
batch["labels"] = tokenizer(batch["sentence"]).input_ids
return batch
common_voice = common_voice.map(prepare_dataset,
remove_columns=common_voice.column_names["train"], num_proc=1)
```
### Expected behavior
Should be no warning shown.
### Environment info
- `datasets` version: 2.7.0
- Platform: Windows-10-10.0.19045-SP0
- Python version: 3.9.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5
- dill version: 0.3.4
- multiprocess version: 0.70.12.2
Thanks for your prompt reply.
I update datasets version to 2.8.0 and the warning is gong. | [
-0.053247835487127304,
-0.17688889801502228,
0.10579632222652435,
0.10368242859840393,
0.3758312463760376,
0.08446512371301651,
0.18014320731163025,
0.17695252597332,
-0.1404319405555725,
0.05729922652244568,
-0.16413289308547974,
0.23005767166614532,
-0.2356150597333908,
-0.03130513057112694,
0.12169486284255981,
0.016214560717344284,
0.17958298325538635,
-0.011437982320785522,
-0.1457614302635193,
-0.2940596342086792,
-0.19908446073532104,
0.03986372798681259,
-0.2627815008163452,
0.14090441167354584,
-0.2647057771682739,
-0.30959078669548035,
0.03170976787805557,
-0.08633964508771896,
-0.2387150675058365,
-0.10445939004421234,
0.19360189139842987,
0.05265141278505325,
-0.0889047384262085,
0.1875387728214264,
-0.00012281749513931572,
0.18677060306072235,
0.37595659494400024,
-0.30517080426216125,
0.14347556233406067,
-0.310512900352478,
-0.2491529881954193,
0.10382051020860672,
-0.3151603043079376,
0.013360150158405304,
-0.10770233720541,
0.1060924157500267,
-0.11675605177879333,
-0.3524548411369324,
0.5720986723899841,
0.25376471877098083,
0.09155668318271637,
0.058237820863723755,
0.19278481602668762,
0.2657914459705353,
0.3267866373062134,
-0.04350220412015915,
-0.23311562836170197,
0.35932084918022156,
-0.038446903228759766,
-0.15750926733016968,
-0.11454623192548752,
0.5052323341369629,
-0.0945354700088501,
-0.3381332457065582,
0.190644770860672,
0.1037667766213417,
-0.06666881591081619,
-0.5319275856018066,
0.059427596628665924,
0.1339930295944214,
-0.05894627422094345,
-0.4700622260570526,
-0.2955808639526367,
-0.03676518797874451,
-0.17833364009857178,
-0.2693132162094116,
0.47927892208099365,
-0.08913771063089371,
0.1784406453371048,
0.22684073448181152,
-0.5252280235290527,
-0.04829031601548195,
0.2480100393295288,
0.13188143074512482,
0.450071781873703,
-0.013446666300296783,
-0.06297969818115234,
0.14204126596450806,
0.22322200238704681,
-0.3258340358734131,
-0.09510834515094757,
-0.1209564208984375,
-0.08637022972106934,
0.4544493854045868,
-0.34654703736305237,
-0.1580887734889984,
0.15646985173225403,
0.07784475386142731,
0.4004264771938324,
-0.10439459979534149,
0.006658940576016903,
0.20274049043655396,
-0.18369171023368835,
-0.06170126795768738,
0.19808155298233032,
0.25005683302879333,
0.15920424461364746,
0.22266577184200287,
-0.04326161742210388,
-0.017463281750679016,
0.09235258400440216,
0.02305731177330017,
0.34420445561408997,
-0.04086671024560928,
0.04421522840857506,
0.1946735680103302,
0.16492360830307007,
-0.2170274406671524,
-0.019653119146823883,
0.171844944357872,
-0.46924635767936707,
-0.15656167268753052,
-0.048985179513692856,
0.2741836607456207,
0.1454915851354599,
-0.15587735176086426,
-0.04098951444029808,
0.1767781674861908,
-0.02145678922533989,
-0.04176237806677818,
-0.19179145991802216,
-0.0027914997190237045,
-0.30187758803367615,
0.3051968514919281,
-0.062172070145606995,
-0.1621558517217636,
0.2415763884782791,
0.12803661823272705,
0.08654237538576126,
-0.14320695400238037,
-0.24895653128623962,
-0.22700437903404236,
0.3515816628932953,
0.09983120858669281,
-0.25219491124153137,
0.04214474558830261,
-0.02127530798316002,
-0.06022953242063522,
-0.12736079096794128,
-0.09658221155405045,
-0.31980100274086,
-0.34887540340423584,
0.17353731393814087,
0.009749108925461769,
-0.02359987050294876,
0.3143296241760254,
-0.20627987384796143,
0.35820627212524414,
0.4312412738800049,
-0.08686954528093338,
0.06991001963615417,
-0.061004966497421265,
-0.33145639300346375,
-0.05051492899656296,
0.24588432908058167,
0.46863842010498047,
0.12908044457435608,
-0.22341524064540863,
0.061871934682130814,
-0.11298379302024841,
0.2554723918437958,
0.4205891788005829,
-0.06858712434768677,
-0.009133413434028625,
-0.32261598110198975,
0.47576218843460083,
0.34795472025871277,
-0.29198113083839417,
-0.5824059247970581,
0.23385396599769592,
-0.15382900834083557,
0.14610855281352997,
-0.12697052955627441,
-0.1546841412782669,
0.11447340250015259,
-0.24783563613891602,
0.22717884182929993,
-0.020447716116905212,
-0.00448659248650074,
0.17228728532791138,
-0.32542547583580017,
-0.25250566005706787,
0.23273712396621704,
-0.2878202497959137,
-0.213820680975914,
0.2694758474826813,
0.12980899214744568,
0.19160783290863037,
0.41550692915916443,
0.06197032704949379,
0.2480602115392685,
0.04179349169135094,
0.16709858179092407,
-0.1768251210451126,
-0.041172921657562256,
0.012906037271022797,
-0.4271714687347412,
0.07842936366796494,
0.014648601412773132,
0.20062169432640076,
-0.4088711142539978,
-0.03606601431965828,
0.10080023109912872,
-0.11375802755355835,
-0.25991392135620117,
0.010823367163538933,
-0.041241928935050964,
-0.1339452862739563,
0.2695278823375702,
0.1859617680311203,
-0.15587377548217773,
0.06345527619123459,
-0.3786185085773468,
-0.13118816912174225,
-0.3894762396812439,
0.13455361127853394,
-0.10804811865091324,
-0.1199796199798584,
0.2209199070930481,
0.25589993596076965,
0.31651440262794495,
-0.11319989711046219,
-0.19993674755096436,
0.4361112415790558,
-0.3552950918674469,
0.11103472113609314,
-0.2938271462917328,
0.2753737270832062,
0.26556605100631714,
-0.5593367218971252,
0.05993318557739258,
-0.08315905928611755,
0.04702446609735489,
-0.01962403580546379,
-0.037565238773822784,
0.3259863257408142,
0.24660353362560272,
0.02872651070356369,
-0.21251103281974792,
0.0371999517083168,
0.08478900045156479,
-0.11479032039642334,
-0.2280125766992569,
-0.428029328584671,
0.02812332659959793,
-0.4989241659641266,
0.48793357610702515,
0.14864018559455872,
0.10958006978034973,
-0.20414671301841736,
0.7780514359474182,
0.019169654697179794,
0.3305533230304718,
0.08118009567260742,
0.018733955919742584,
-0.2507060468196869,
-0.06123226135969162,
0.13983501493930817,
0.2338634878396988,
-0.11056914180517197,
-0.11380131542682648,
0.2430088371038437,
0.0059225065633654594,
0.024380460381507874,
0.13805577158927917,
-0.15689043700695038,
0.08912631124258041,
0.2848184406757355,
0.10068728029727936,
0.09831263870000839,
-0.5083445906639099,
0.09378756582736969,
0.16159012913703918,
0.26010483503341675,
-0.40400367975234985,
-0.2524096369743347,
-0.3456331193447113,
0.40593522787094116,
-0.1522209495306015,
0.014895861968398094,
-0.18532291054725647,
-0.11901821941137314,
-0.10117575526237488,
-0.2791420519351959,
-0.15304413437843323,
0.4528658092021942,
0.034158844500780106,
-0.11248759925365448,
0.1894957572221756,
-0.023253878578543663,
-0.39810577034950256,
-0.059191908687353134,
-0.06562132388353348,
-0.11569224298000336,
0.040322668850421906,
-0.293879896402359,
-0.000206800177693367,
-0.041380904614925385,
-0.3823391795158386,
-0.20986837148666382,
-0.2227526307106018,
0.2495562732219696,
-0.2663724422454834,
0.03632001206278801,
0.0012741535902023315,
-0.17948441207408905,
-0.11793889105319977,
-0.23131567239761353,
0.28174889087677,
-0.1455051451921463,
-0.3156639337539673,
0.0408325232565403,
0.02395705133676529,
-0.13361944258213043,
-0.1195182204246521,
-0.39681360125541687,
-0.1786615252494812,
-0.11935903131961823,
0.2338588386774063,
-0.501717746257782,
0.03951817378401756,
0.34684059023857117,
0.0727081298828125,
-0.11567497253417969,
-0.6424579620361328,
-0.06700854748487473,
-0.4374898076057434,
-0.47124865651130676,
0.4434758424758911,
-0.09257045388221741,
-0.29617273807525635,
-0.09494927525520325,
0.04935260862112045,
-0.04549446329474449,
0.28263652324676514,
-0.30925095081329346,
0.028291910886764526,
0.01795458048582077,
-0.1430967152118683,
0.16334310173988342,
-0.0031036846339702606,
0.09476196765899658,
0.147285595536232,
0.1794118732213974,
-0.08222591876983643,
-0.4449382722377777,
0.1313243955373764,
0.17016735672950745,
0.4230273962020874,
0.3341086506843567,
0.8156642317771912,
-0.03846266493201256,
0.8212663531303406,
0.4776149392127991,
-0.1859791874885559,
0.2967079281806946,
-0.018228260800242424,
0.0017550215125083923,
0.0871920958161354,
-0.258762001991272,
0.33319491147994995,
0.15841425955295563,
0.2158687561750412,
0.12827572226524353,
-0.1957801878452301,
-0.17267471551895142,
-0.0033203214406967163,
-0.09134373068809509,
-0.31609395146369934,
-0.3441038429737091,
0.1668439656496048,
-0.3697488009929657,
0.3607299327850342,
0.10350027680397034,
0.22111791372299194,
0.22907356917858124,
-0.13331514596939087,
0.4488484561443329,
-0.13621068000793457,
0.4505164623260498,
0.010903814807534218,
-0.2691165804862976,
0.016805456951260567,
-0.3157563805580139,
0.13074307143688202,
0.18424569070339203,
0.6146768927574158,
-0.23481856286525726,
-0.06194014102220535,
-0.19484256207942963,
0.1337185651063919,
0.5289412140846252,
-0.3603854477405548,
0.29454201459884644,
-0.2373126745223999,
0.08802185952663422,
0.11272760480642319,
-0.0751413106918335,
0.06729669868946075,
0.31740060448646545,
-0.16129393875598907,
0.32774606347084045,
-0.3119587004184723,
0.10264831781387329,
0.15382762253284454,
0.008656891994178295,
-0.14030659198760986,
0.09827880561351776,
-0.18097783625125885,
-0.1857321858406067,
-0.3194841146469116,
0.15603891015052795,
-0.02574010193347931,
0.0718807578086853,
-0.01669423282146454,
0.0034579336643218994,
0.42695239186286926,
-0.04757688194513321,
0.11390488594770432,
0.10826404392719269,
0.3879997134208679,
0.2815220355987549,
0.4102652370929718,
0.25084272027015686,
0.065894216299057,
0.04236094653606415,
0.5089277029037476,
0.027963075786828995,
-0.27148544788360596,
-0.09887825697660446,
-0.10924569517374039,
0.16191701591014862,
0.3606959581375122,
0.00690438412129879,
0.002960190176963806,
0.5050283670425415,
0.08126751333475113,
-0.11901833862066269,
-0.3088785409927368,
0.5236358046531677,
-0.04477105662226677,
-0.41524988412857056,
-0.2330569624900818,
0.6178497672080994,
0.1361556053161621,
-0.13491231203079224,
-0.008605320006608963,
-0.0607948899269104,
-0.32770752906799316,
0.5190516710281372,
0.05497181788086891,
1.1407692432403564,
-0.09033823013305664,
-0.24830904603004456,
-0.06758199632167816,
0.19066627323627472,
0.06478413939476013,
-0.5239486694335938,
-0.09258811920881271,
-0.1430537849664688,
-0.19599086046218872,
-0.047659434378147125,
-0.04231002554297447,
0.04768120124936104,
0.22228498756885529,
-0.2521381676197052,
0.14250339567661285,
0.051297128200531006,
0.20790238678455353,
-0.06235543638467789,
-0.13860207796096802,
-0.009529804810881615,
-0.16012313961982727,
0.07200673222541809,
0.017880350351333618,
0.14929309487342834,
0.20642392337322235,
0.00941758044064045,
-0.1552799940109253,
-0.01878443732857704,
-0.3898438811302185,
-0.3396531939506531,
0.2983351945877075,
-0.3458532392978668,
0.00632026232779026,
0.14829625189304352,
-0.11030958592891693,
0.37008172273635864,
0.060842808336019516,
0.06984619051218033,
0.13891029357910156,
-0.12661853432655334,
0.2204362154006958,
0.47433948516845703,
0.17914226651191711,
0.03073674999177456,
0.05521562695503235,
0.02599242888391018,
0.01346353068947792,
-0.07637141644954681,
0.054974209517240524,
-0.12321196496486664,
-0.13846638798713684,
-0.5252799987792969,
0.00373908132314682,
-0.04385332018136978,
-0.17872056365013123,
-0.10046112537384033,
0.16783423721790314,
0.07101278007030487,
-0.14019235968589783,
0.03778969869017601,
0.22592607140541077,
-0.23986274003982544,
0.14326342940330505,
-0.06611655652523041,
-0.22832968831062317,
0.012127047404646873,
0.4958438575267792,
-0.024931199848651886,
0.06626120954751968,
0.36493250727653503,
-0.024402949959039688,
-0.1724122315645218,
-0.06211358681321144,
-0.25750553607940674,
0.092852883040905,
-0.46178895235061646,
0.05694924294948578,
-0.1072152778506279,
0.03301696479320526,
-0.3842187523841858,
0.4892939031124115,
0.012737195938825607,
0.01738804206252098,
0.10889644920825958,
-0.2281699776649475,
-0.24463960528373718,
0.3281877040863037,
0.12363407015800476,
0.1587410718202591,
-0.3487456142902374,
0.5086026191711426,
0.09767121076583862,
0.4114748239517212,
-0.22757844626903534,
-0.04460832476615906,
-0.007885482162237167,
0.2622421979904175,
0.31158632040023804,
0.2286492884159088,
0.12317933142185211,
-0.18221817910671234,
-0.02439008094370365,
0.35840195417404175,
-0.2263861447572708,
-0.0134990643709898,
-0.11029361188411713,
0.1676524132490158,
0.14824292063713074,
0.0762820616364479,
-0.12655119597911835,
-0.03458486124873161,
0.15460634231567383,
-0.3123026192188263,
0.0633692592382431,
0.2735491991043091,
0.20172061026096344,
0.23243911564350128,
0.1555781215429306,
-0.1995304524898529,
0.0022322461009025574,
-0.20662350952625275,
-0.16040685772895813,
0.02017156034708023,
-0.06146901473402977,
-0.06610625982284546,
-0.06413837522268295,
-0.105584517121315,
0.1505298763513565,
-0.07456738501787186,
-0.05763755738735199,
0.13073834776878357,
0.34453085064888,
0.04483332112431526,
-0.10137585550546646,
0.5169341564178467,
0.19341619312763214,
0.17046308517456055,
-0.4451453685760498,
-0.312202513217926,
0.1315433382987976,
0.06963086128234863,
-0.24571219086647034,
-0.1385851353406906,
0.21825744211673737,
0.10596340894699097,
-0.04185940697789192,
0.03611677139997482,
0.0016134567558765411,
-0.039360180497169495,
-0.1363968700170517,
-0.0651545375585556,
0.20697133243083954,
-0.5545641779899597,
0.1602460741996765,
0.36058539152145386,
-0.05436861887574196,
0.2296900451183319,
0.435213178396225,
-0.2754571735858917,
0.17712810635566711,
0.5239404439926147,
-0.18416810035705566,
0.1785285770893097,
-0.0627601146697998,
0.3886150121688843,
-0.09268353134393692,
-0.46756991744041443,
0.07215677201747894,
0.27077534794807434,
-0.35384616255760193,
0.32099536061286926,
0.08055713772773743,
0.2992987036705017,
0.23783668875694275,
-0.09850156307220459,
-0.022883513942360878,
0.3325061798095703,
-0.1745721399784088,
-0.16879746317863464,
0.09162893891334534,
-0.16531667113304138,
-0.3659377694129944,
0.15390004217624664,
-0.07975868880748749,
0.07802687585353851,
1.029133677482605,
0.21689526736736298,
-0.1890590339899063,
0.14168140292167664,
-0.41917404532432556,
0.2078956663608551,
0.3166007697582245,
-0.3122033178806305,
0.24178458750247955,
0.05465849116444588,
-0.3020894527435303,
-0.03141215071082115,
0.4015161991119385,
0.23389436304569244,
0.17688731849193573,
0.2250000536441803,
0.4241723418235779,
0.21773865818977356,
0.009801046922802925,
0.003573395311832428,
0.6167240142822266,
0.32914969325065613,
-0.1086166501045227,
-0.022139346227049828,
0.010210700333118439,
-0.12031206488609314,
0.047793880105018616,
0.08429975062608719,
0.42228516936302185,
0.005867195315659046,
0.4568958580493927,
-0.21809989213943481,
-0.11087711155414581,
-0.22365546226501465,
0.06816937029361725,
-0.2212289273738861,
0.04711443930864334,
0.4304807782173157,
0.025495490059256554,
0.2561750113964081,
-0.26515868306159973,
0.04102061688899994,
0.2898792326450348,
0.36424872279167175,
0.45511311292648315,
-0.17721673846244812,
-0.42688313126564026,
-0.07942207157611847,
-0.6400274634361267,
0.0929160863161087,
-0.03096313402056694,
0.3294796347618103,
-0.19464154541492462,
0.11417470872402191,
0.30292049050331116,
0.2630297541618347,
-0.09425514936447144,
-0.22039532661437988,
-0.31339338421821594,
0.07282201945781708,
-0.0904313325881958,
0.0723542720079422,
-0.4540957808494568,
0.3004070818424225,
0.18954788148403168,
-0.2887299358844757,
0.3972121775150299,
0.16371886432170868,
-0.07648962736129761,
-0.24750162661075592,
-0.04206952080130577,
-0.1485930234193802,
-0.3135983943939209,
0.7741941809654236,
0.3611166179180145,
0.11540965735912323,
-0.3270852565765381,
-0.06848343461751938,
-0.33254241943359375,
-0.09038489311933517,
0.050805479288101196,
0.11478409916162491,
0.03958451375365257,
0.37031447887420654,
-0.029093952849507332,
-0.07278279960155487,
-0.43691587448120117,
-0.01207012590020895,
-0.08922384679317474,
-0.022438988089561462,
-0.37093836069107056,
0.18160365521907806,
-0.04245226830244064,
-0.17745879292488098,
-0.07077896595001221,
0.48606225848197937,
-0.05390077084302902,
0.2257758378982544,
-0.26174166798591614,
-0.4145830273628235,
0.5517231225967407,
-0.32673710584640503,
-0.06672213971614838,
0.009186118841171265,
0.18498703837394714,
-0.027838870882987976,
-0.3468402922153473,
-0.7997642159461975,
0.07129677385091782,
0.18923276662826538,
-0.01581982523202896,
-0.20726796984672546,
-0.019281800836324692,
0.17803950607776642,
0.05716288462281227,
-0.07221496850252151,
0.5012377500534058,
0.03975624218583107,
-0.35385459661483765,
0.3150794804096222,
-0.24640649557113647
] |
https://github.com/huggingface/datasets/issues/5406 | [2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str` | Hi ! I just tested locally and or colab and it works fine for 2.9 on `sst2`.
Also the code that is shown in your stack trace is not present in the 2.9 source code - so I'm wondering how you installed `datasets` that could cause this ? (you can check by searching for `[0:{label_ids[-1] + 1}]` in the [2.9 codebase](https://github.dev/huggingface/datasets/tree/b5672a956d5de864e6f5550e493527d962d6ae55) - it doesn't find anything)
Anyway you can try uninstalling `datasets` and install it again | `datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience. | 76 | [2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
Hi ! I just tested locally and or colab and it works fine for 2.9 on `sst2`.
Also the code that is shown in your stack trace is not present in the 2.9 source code - so I'm wondering how you installed `datasets` that could cause this ? (you can check by searching for `[0:{label_ids[-1] + 1}]` in the [2.9 codebase](https://github.dev/huggingface/datasets/tree/b5672a956d5de864e6f5550e493527d962d6ae55) - it doesn't find anything)
Anyway you can try uninstalling `datasets` and install it again | [
-0.22732402384281158,
-0.24561384320259094,
0.0452948622405529,
0.20780964195728302,
0.19920183718204498,
0.035199858248233795,
0.14738135039806366,
0.23253269493579865,
-0.048499349504709244,
0.101356640458107,
-0.26889654994010925,
0.2893787622451782,
-0.015856217592954636,
0.4024370014667511,
-0.2525285482406616,
0.046144038438797,
-0.06603812426328659,
0.1810886263847351,
-0.15307781100273132,
0.169447124004364,
-0.22640003263950348,
0.49557456374168396,
-0.2522451877593994,
0.11436314880847931,
-0.40673908591270447,
0.14760738611221313,
0.025906534865498543,
0.3865712285041809,
-0.2507999539375305,
-0.3629717230796814,
0.3306470811367035,
0.0525260865688324,
0.2063959240913391,
0.5964468121528625,
-0.0001135825805249624,
-0.054118841886520386,
0.2954314947128296,
-0.055516548454761505,
-0.43982261419296265,
-0.3790290951728821,
0.14387059211730957,
-0.0031885122880339622,
0.37436172366142273,
0.024638772010803223,
-0.056509800255298615,
-0.06700611859560013,
0.0409751832485199,
-0.07020348310470581,
0.2923600673675537,
0.22612494230270386,
0.22253333032131195,
0.38777783513069153,
0.3046455383300781,
-0.3229125738143921,
-0.14462050795555115,
0.36213839054107666,
-0.12478052079677582,
0.2357134222984314,
-0.031160101294517517,
0.08854653686285019,
0.1633790135383606,
0.25993600487709045,
0.011519255116581917,
-0.12220440804958344,
0.40761324763298035,
0.27001509070396423,
-0.18582963943481445,
-0.508981466293335,
0.25701138377189636,
0.24736905097961426,
0.22566136717796326,
-0.21738991141319275,
-0.47746509313583374,
-0.24512672424316406,
0.045577313750982285,
-0.019426165148615837,
0.2771829068660736,
-0.01759203150868416,
-0.1063314825296402,
0.15059992671012878,
-0.3157934546470642,
-0.20799358189105988,
-0.048669785261154175,
-0.0237315371632576,
0.008438803255558014,
0.07252311706542969,
-0.3103513717651367,
0.020491059869527817,
0.302399605512619,
-0.3852788209915161,
-0.10345202684402466,
0.1809082329273224,
-0.2717468738555908,
-0.005697981454432011,
-0.1379011571407318,
0.03732505440711975,
-0.0717434361577034,
-0.004283629357814789,
-0.007056914269924164,
-0.1506805717945099,
-0.13597552478313446,
0.202894926071167,
-0.20421114563941956,
0.060658540576696396,
0.14205631613731384,
0.1951587200164795,
0.29247379302978516,
0.17113097012043,
0.2937348484992981,
0.1723017692565918,
0.2578175365924835,
-0.1516035795211792,
-0.0727916955947876,
-0.013911496847867966,
-0.16424374282360077,
-0.1840084195137024,
0.3000496029853821,
-0.09840371459722519,
-0.16023731231689453,
0.04042355716228485,
0.06397122144699097,
0.07803099602460861,
0.08067146688699722,
0.32743141055107117,
-0.10179177671670914,
0.08508560806512833,
0.3477463126182556,
0.15606263279914856,
0.07771455496549606,
0.04665617644786835,
-0.14285004138946533,
0.023130863904953003,
-0.09997156262397766,
-0.043256066739559174,
0.10805919766426086,
-0.5788499116897583,
0.04972486197948456,
0.26343095302581787,
0.4281575679779053,
0.07850909233093262,
-0.5376158356666565,
0.1054707020521164,
0.20051977038383484,
0.24820764362812042,
0.045129258185625076,
0.17936252057552338,
0.2053511142730713,
-0.3539971113204956,
-0.05646193027496338,
-0.13881328701972961,
-0.498557448387146,
-0.15257252752780914,
-0.5773808360099792,
0.14279839396476746,
0.026093941181898117,
0.015433771535754204,
-0.3293185830116272,
0.08431737124919891,
-0.007928527891635895,
-0.25052762031555176,
-0.014480501413345337,
-0.2571074962615967,
-0.07606059312820435,
-0.10861127823591232,
0.39808380603790283,
0.413573682308197,
-0.3106497526168823,
-0.2090122401714325,
0.08386126160621643,
0.046850889921188354,
0.08380348235368729,
0.22471477091312408,
-0.03814522549510002,
-0.14904186129570007,
-0.515366792678833,
0.20132069289684296,
0.10578809678554535,
-0.34402477741241455,
-0.06511983275413513,
0.12485948204994202,
-0.013615541160106659,
0.09668965637683868,
-0.03474342077970505,
-0.16713197529315948,
-0.017401957884430885,
0.08267304301261902,
0.18756860494613647,
-0.08308380842208862,
0.1549120545387268,
-0.04395993798971176,
-0.19434376060962677,
-0.21666523814201355,
-0.0487433597445488,
0.03741363808512688,
-0.03794508054852486,
0.1539900302886963,
-0.07327941805124283,
0.10472742468118668,
0.11189468950033188,
-0.0754079818725586,
0.12611177563667297,
0.1930033564567566,
0.2544703483581543,
0.3061733841896057,
0.10401979833841324,
-0.15479594469070435,
-0.36701253056526184,
0.12336429208517075,
0.1345275491476059,
0.34869617223739624,
-0.15844614803791046,
-0.18295468389987946,
-0.10092242062091827,
-0.0755927562713623,
-0.12363108992576599,
-0.16112098097801208,
0.13250288367271423,
0.12036348879337311,
0.10617293417453766,
0.0493856705725193,
-0.2786765992641449,
0.3801708519458771,
0.08418884128332138,
0.2394115924835205,
-0.41465961933135986,
0.28505250811576843,
-0.046093448996543884,
-0.31354960799217224,
-0.02561647817492485,
0.18773788213729858,
0.12140805274248123,
-0.044662896543741226,
-0.015620382502675056,
0.5854909420013428,
-0.2725489139556885,
0.18341851234436035,
-0.11916666477918625,
-0.01607254147529602,
0.21411553025245667,
0.042025137692689896,
-0.20662914216518402,
-0.02695917710661888,
0.004448513500392437,
-0.003338359296321869,
-0.043363578617572784,
0.18653765320777893,
-0.07033610343933105,
0.26416993141174316,
0.2546188235282898,
0.06369198858737946,
0.122161865234375,
-0.01596849039196968,
-0.21175116300582886,
-0.40789133310317993,
0.10942529141902924,
-0.2294338345527649,
-0.08475813269615173,
0.037007853388786316,
-0.4485178291797638,
0.14557605981826782,
0.5901978611946106,
0.22124531865119934,
0.06499141454696655,
0.4336656332015991,
-0.28650200366973877,
0.07504857331514359,
-0.06434856355190277,
-0.06892194598913193,
0.20844480395317078,
0.13502568006515503,
-0.05301983281970024,
0.23783615231513977,
0.03586277365684509,
-0.20085428655147552,
0.16338294744491577,
0.24560591578483582,
-0.18784089386463165,
0.23353978991508484,
0.2607937157154083,
0.2305297702550888,
-0.19622042775154114,
-0.16531790792942047,
-0.36216509342193604,
0.01996607519686222,
-0.499826043844223,
0.00045930221676826477,
-0.3994160592556,
-0.19541332125663757,
0.0471356138586998,
-0.3941251337528229,
-0.37219488620758057,
-0.1658596396446228,
-0.1117449700832367,
0.3568752110004425,
0.05255202576518059,
0.07987947762012482,
0.0791461169719696,
0.18782860040664673,
0.007502356544137001,
-0.04929603636264801,
-0.2481529861688614,
0.0604662224650383,
-0.1235259398818016,
0.05027718469500542,
-0.004417991265654564,
-0.07381781190633774,
0.04471122473478317,
-0.42325684428215027,
-0.01604055054485798,
-0.22531233727931976,
-0.468064546585083,
0.2656024694442749,
-0.3261612057685852,
0.20632562041282654,
0.42206859588623047,
0.18019089102745056,
-0.27495646476745605,
-0.33691179752349854,
0.3609306514263153,
-0.1644326001405716,
-0.20084543526172638,
0.12979300320148468,
0.04104234650731087,
-0.1843429058790207,
-0.45085635781288147,
-0.05361137539148331,
-0.08343955129384995,
-0.4787459373474121,
0.5435789823532104,
0.022252514958381653,
0.06565319001674652,
0.35045716166496277,
0.04247043654322624,
0.18194706737995148,
-0.23652496933937073,
0.23684820532798767,
-0.18081966042518616,
-0.35460036993026733,
0.30392250418663025,
-0.2082258015871048,
-0.25222355127334595,
0.12611624598503113,
0.21813131868839264,
0.10406568646430969,
-0.4550769329071045,
-0.3031719923019409,
-0.5676015019416809,
-0.3005865514278412,
0.25823503732681274,
-0.08474890887737274,
0.17172019183635712,
0.23083336651325226,
0.13702096045017242,
-0.17706194519996643,
-0.01772409677505493,
-0.32995569705963135,
0.19779127836227417,
0.02207028493285179,
0.00531383603811264,
0.11840217560529709,
0.27170538902282715,
-0.12411530315876007,
0.06986957043409348,
0.35372909903526306,
-0.025702867656946182,
0.25703442096710205,
-0.11987710744142532,
0.6450183391571045,
-0.4069414436817169,
-0.550219714641571,
-0.008007602766156197,
-0.06722994148731232,
0.13504405319690704,
0.24256911873817444,
-0.005581265315413475,
0.5858826041221619,
-0.31753432750701904,
0.09175381064414978,
-0.18494164943695068,
-0.2689293920993805,
-0.14363065361976624,
0.3768448829650879,
0.003908231854438782,
-0.1457759290933609,
0.10478290170431137,
0.05831248685717583,
-0.20971646904945374,
0.12363594770431519,
0.30388355255126953,
0.06411288678646088,
0.04449683427810669,
-0.4296523332595825,
-0.09073367714881897,
-0.4168144464492798,
0.38845574855804443,
0.034111957997083664,
0.4255013167858124,
-0.18423965573310852,
-0.13506820797920227,
-0.04733273386955261,
0.06893766671419144,
0.5761073231697083,
0.13854941725730896,
-0.23263593018054962,
0.12733258306980133,
-0.2753327488899231,
-0.46648305654525757,
-0.05506715923547745,
-0.13790960609912872,
0.12725509703159332,
0.5134891867637634,
0.6437414884567261,
-0.2898082733154297,
-0.20809097588062286,
0.23416785895824432,
0.03609364479780197,
0.007305480539798737,
0.08501550555229187,
-0.31584540009498596,
-0.18426313996315002,
-0.22234706580638885,
-0.22509530186653137,
0.16306699812412262,
0.3825170397758484,
-0.07485818862915039,
0.048606131225824356,
-0.053133755922317505,
-0.42751967906951904,
0.29967445135116577,
0.15964415669441223,
0.4603790044784546,
0.04372108727693558,
0.11097712814807892,
0.2991267442703247,
0.031986650079488754,
0.41616496443748474,
0.6781184077262878,
-0.0773075670003891,
-0.5525686740875244,
0.22508057951927185,
-0.0004075039178133011,
0.13509328663349152,
0.21935734152793884,
-0.21648746728897095,
0.23368367552757263,
-0.029828786849975586,
0.3559703826904297,
-0.37262845039367676,
0.12947097420692444,
0.3266495168209076,
0.030281290411949158,
-0.3471319377422333,
-0.10850945860147476,
0.2118508219718933,
-0.019766712561249733,
0.11430051922798157,
-0.006247345358133316,
0.5309963226318359,
-0.3514569401741028,
-0.014800826087594032,
-0.11332245916128159,
0.9417503476142883,
0.2907733917236328,
0.07950635254383087,
0.07977095991373062,
0.06883672624826431,
0.5728248357772827,
0.23657430708408356,
0.0030396049842238426,
-0.29695871472358704,
-0.2238483428955078,
-0.04699403792619705,
-0.0250073429197073,
0.0465063601732254,
-0.3583107590675354,
-0.5440574884414673,
0.11485151946544647,
-0.1953859031200409,
0.11972841620445251,
-0.07346096634864807,
0.2594940960407257,
-0.20840045809745789,
-0.2838455140590668,
-0.24635976552963257,
0.1497413069009781,
-0.07896479964256287,
0.12968765199184418,
0.14679285883903503,
-0.09565402567386627,
-0.09175129234790802,
-0.22258301079273224,
-0.5031365156173706,
0.060072317719459534,
-0.1346355378627777,
0.02980104088783264,
0.43921777606010437,
-0.12052130699157715,
0.09651914238929749,
0.05977573245763779,
0.5986778140068054,
0.2319236546754837,
-0.30435478687286377,
-0.042866822332143784,
-0.26642075181007385,
-0.02122339978814125,
-0.0588570311665535,
0.12696994841098785,
0.11278480291366577,
0.017539631575345993,
0.07578722387552261,
0.07965733110904694,
0.0759771540760994,
0.04778461903333664,
-0.19422496855258942,
-0.002688385546207428,
-0.08470918238162994,
-0.4260961413383484,
-0.05882973223924637,
-0.25920379161834717,
0.09284371137619019,
-0.2674560844898224,
0.06576891243457794,
0.03217143192887306,
0.021600743755698204,
-0.09496475011110306,
0.2806946039199829,
-0.4101952016353607,
-0.11507114768028259,
0.472234845161438,
-0.3390839695930481,
-0.08169630169868469,
0.42808008193969727,
0.2474166303873062,
-0.25254249572753906,
0.0204157717525959,
0.17121073603630066,
0.12600351870059967,
-0.42913195490837097,
0.2902566194534302,
0.28431621193885803,
-0.06374633312225342,
0.1094653382897377,
0.5876678824424744,
0.08477382361888885,
0.10496233403682709,
-0.20371311902999878,
-0.23713237047195435,
-0.23192548751831055,
0.1919594407081604,
-0.0866832584142685,
0.1905190497636795,
0.04072060436010361,
0.12112733721733093,
0.03540205955505371,
-0.09564392268657684,
-0.3317417502403259,
0.06189776211977005,
-0.34772297739982605,
-0.008459817618131638,
0.23511449992656708,
-0.13831186294555664,
0.365384578704834,
-0.1524508148431778,
0.06355579197406769,
0.32116979360580444,
-0.09852327406406403,
-0.12197349220514297,
-0.1879308968782425,
0.11056676506996155,
0.028821788728237152,
-0.1359267681837082,
-0.18606378138065338,
0.07721153646707535,
0.019682077690958977,
-0.2833395004272461,
0.2481881082057953,
0.36292850971221924,
-0.0552508682012558,
0.3031623959541321,
-0.031219903379678726,
-0.06880199164152145,
0.21590082347393036,
0.15838128328323364,
0.14050346612930298,
0.3853724002838135,
-0.01292013842612505,
0.11309956759214401,
-0.38580286502838135,
-0.003746330738067627,
0.21656356751918793,
0.3179593086242676,
0.16767518222332,
-0.1206040307879448,
-0.01985742896795273,
-0.2168719619512558,
-0.008585888892412186,
-0.10707937180995941,
0.44560179114341736,
0.4121575951576233,
-0.08256543427705765,
-0.18515115976333618,
0.1753937304019928,
0.1413370966911316,
-0.08449342846870422,
-0.06255028396844864,
-0.038948092609643936,
0.12541641294956207,
-0.04126831144094467,
0.20171821117401123,
-0.021821148693561554,
-0.08296679705381393,
0.0007709190249443054,
0.21409723162651062,
0.412320613861084,
0.03361143171787262,
0.15099838376045227,
0.17131654918193817,
-0.23240892589092255,
0.08349425345659256,
0.35323673486709595,
0.022191770374774933,
0.05316733568906784,
0.2775753140449524,
-0.38230419158935547,
0.2654918432235718,
0.03575480729341507,
0.140438511967659,
0.2939470410346985,
-0.23483802378177643,
0.07234922796487808,
-0.003688231110572815,
0.0436757430434227,
0.051440030336380005,
-0.06236550211906433,
0.4983026087284088,
-0.5298482775688171,
-0.2772916257381439,
-0.11725544929504395,
0.165252223610878,
-0.27662158012390137,
-0.15218357741832733,
0.16748911142349243,
-0.2586124539375305,
-0.1293395459651947,
0.020334213972091675,
0.005544524639844894,
-0.06339961290359497,
0.21273231506347656,
-0.042940184473991394,
0.0019178688526153564,
-0.4840601682662964,
-0.36204102635383606,
-0.013295173645019531,
0.1250312477350235,
-0.14267058670520782,
0.16217617690563202,
0.4988839030265808,
-0.11493644118309021,
0.23869024217128754,
0.5516087412834167,
0.7556684017181396,
0.3300068974494934,
0.16301262378692627,
-0.0036772415041923523,
-0.11091044545173645,
-0.00774533674120903,
0.08852578699588776,
0.16640661656856537,
0.016176968812942505,
-0.11953474581241608,
0.20278936624526978,
0.21891508996486664,
-0.19099503755569458,
0.07091842591762543,
-0.35175904631614685,
0.46733030676841736,
-0.3535386919975281,
0.2854756712913513,
-0.1927276849746704,
0.019993387162685394,
0.005489218980073929,
-0.09794021397829056,
-0.33812758326530457,
-0.32232797145843506,
0.3682882487773895,
0.004791640676558018,
-0.007120284251868725,
-0.30330464243888855,
0.10488297045230865,
0.2867550849914551,
0.530138373374939,
0.5048598647117615,
0.12425187230110168,
-0.06582027673721313,
-0.09067501127719879,
-0.31245651841163635,
0.016378819942474365,
0.30157554149627686,
-0.057703759521245956,
-0.070363849401474,
-0.03135793283581734,
0.02227671444416046,
0.10745412111282349,
0.1618122160434723,
-0.12653405964374542,
0.018709547817707062,
-0.06728289276361465,
-0.2648502290248871,
0.25954824686050415,
0.09614799171686172,
-0.17659509181976318,
0.21811401844024658,
-0.03964722901582718,
0.37005284428596497,
-0.3742961287498474,
0.01304277777671814,
-0.0642578974366188,
0.2205485701560974,
-0.13171856105327606,
-0.14510086178779602,
0.2825499176979065,
0.2663708031177521,
0.18857848644256592,
-0.2011210322380066,
-0.2751260995864868,
-0.18535840511322021,
-0.434892863035202,
-0.1841188222169876,
0.3594587743282318,
-0.03605622425675392,
0.4955427944660187,
-0.3092159330844879,
-0.2900036573410034,
-0.3537624478340149,
0.2190912812948227,
-0.03025919757783413,
0.062462642788887024,
-0.27619174122810364,
0.20918899774551392,
0.01639632135629654,
-0.1572442501783371,
0.15733246505260468,
0.20928362011909485,
0.09561334550380707,
0.1612570732831955,
-0.09335941821336746,
-0.6488565802574158,
0.6218552589416504,
-0.09534811973571777,
-0.24547581374645233,
-0.15413470566272736,
0.05188243091106415,
0.2534991502761841,
-0.3101581633090973,
-0.7799072265625,
-0.06987036764621735,
0.1796131283044815,
0.1558133065700531,
-0.22673232853412628,
0.1767551451921463,
-0.3454245924949646,
-0.03324912488460541,
-0.29770782589912415,
0.27842438220977783,
0.42059168219566345,
-0.17876403033733368,
0.28913891315460205,
-0.05964438617229462
] |
https://github.com/huggingface/datasets/issues/5406 | [2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str` | For what it's worth, I've also gotten this error on 2.9.0, and I've tried uninstalling an reinstalling

I'm very new to this package (I was following this tutorial: https://huggingface.co/docs/transformers/training), so there's a good chance I was doing something wrong 😅 but thought I'd pass along the feedback | `datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience. | 54 | [2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
For what it's worth, I've also gotten this error on 2.9.0, and I've tried uninstalling an reinstalling

I'm very new to this package (I was following this tutorial: https://huggingface.co/docs/transformers/training), so there's a good chance I was doing something wrong 😅 but thought I'd pass along the feedback | [
-0.1898443102836609,
-0.14905883371829987,
0.05108942463994026,
0.13530972599983215,
0.32842183113098145,
0.0752311572432518,
0.16571544110774994,
0.21379104256629944,
-0.18478959798812866,
0.10597962141036987,
-0.24782639741897583,
0.09155081957578659,
-0.16757497191429138,
0.2841528058052063,
-0.21928000450134277,
-0.15667876601219177,
-0.014493167400360107,
0.11537295579910278,
-0.1381133496761322,
0.1482362151145935,
-0.19176079332828522,
0.37726834416389465,
-0.2807117700576782,
0.09723471105098724,
-0.4662483036518097,
0.1334809511899948,
0.08734072744846344,
0.2675802409648895,
-0.27053916454315186,
-0.39770665764808655,
0.4263380765914917,
0.043772485107183456,
0.20541247725486755,
0.45669087767601013,
-0.00012103596236556768,
-0.005495227873325348,
0.3293078541755676,
0.00182420015335083,
-0.4420207440853119,
-0.4426533579826355,
0.1343144178390503,
-0.06735304743051529,
0.2637072503566742,
0.14982172846794128,
0.11468309909105301,
-0.2168135941028595,
0.09433750808238983,
-0.01739370822906494,
0.2908802628517151,
0.4046294689178467,
0.16465041041374207,
0.4250297248363495,
0.43651238083839417,
-0.34678223729133606,
-0.12077596038579941,
0.4289841651916504,
-0.05838654935359955,
0.19875837862491608,
0.014747746288776398,
0.05369787663221359,
-0.006873674690723419,
0.2451178878545761,
0.002208644524216652,
-0.2272225171327591,
0.2991699278354645,
0.1951097697019577,
-0.16917014122009277,
-0.504738450050354,
0.15258276462554932,
0.1585908830165863,
0.25313159823417664,
-0.09469897300004959,
-0.5644163489341736,
-0.282907634973526,
0.047907255589962006,
-0.006202017888426781,
0.2546021044254303,
0.02350393496453762,
-0.09455211460590363,
0.1820945143699646,
-0.4369830787181854,
-0.2613663673400879,
-0.10445290803909302,
0.08576145768165588,
-0.10493242740631104,
0.049235399812459946,
-0.3008492887020111,
0.030727185308933258,
0.3235442042350769,
-0.39042121171951294,
0.01185086090117693,
0.1558065116405487,
-0.17016510665416718,
0.057414308190345764,
-0.08167272806167603,
-0.031550124287605286,
-0.2290072739124298,
-0.11767645925283432,
0.11013377457857132,
-0.12109076976776123,
-0.29981696605682373,
0.09912635385990143,
-0.2819429039955139,
-0.018067799508571625,
0.13300365209579468,
0.11127682030200958,
0.24703317880630493,
0.26154547929763794,
0.19203270971775055,
0.1556372344493866,
0.3511214852333069,
-0.0351734384894371,
-0.05243207514286041,
-0.03444240987300873,
-0.15586309134960175,
-0.1781712770462036,
0.21577668190002441,
-0.06415398418903351,
-0.13375547528266907,
0.16043514013290405,
0.03190960735082626,
-0.020906146615743637,
0.046569257974624634,
0.18168014287948608,
-0.13443197309970856,
0.2624535858631134,
0.3034529685974121,
0.278091698884964,
0.1745903342962265,
-0.04987035319209099,
-0.08987114578485489,
0.0956973284482956,
-0.1462170034646988,
-0.06628082692623138,
0.09355902671813965,
-0.4578295350074768,
-0.03621383756399155,
0.32202664017677307,
0.35315799713134766,
0.05690247565507889,
-0.4747471809387207,
0.13078860938549042,
0.06255795806646347,
0.32005780935287476,
-0.17395399510860443,
0.26292070746421814,
0.18763339519500732,
-0.30421456694602966,
-0.10485467314720154,
-0.1094500944018364,
-0.47328758239746094,
-0.1992555558681488,
-0.5823027491569519,
0.08808846771717072,
-0.007113542407751083,
-0.06986072659492493,
-0.2790312170982361,
0.05560982599854469,
-0.006597407162189484,
-0.24460667371749878,
-0.058720387518405914,
-0.23455898463726044,
0.052628327161073685,
-0.14863833785057068,
0.2981310486793518,
0.3192232847213745,
-0.17261900007724762,
-0.29701220989227295,
0.08081255108118057,
0.10972470045089722,
0.12327229976654053,
0.22231735289096832,
-0.1323077231645584,
-0.0873333141207695,
-0.43784892559051514,
0.055702194571495056,
0.17256692051887512,
-0.3734515309333801,
-0.09860999882221222,
0.12853674590587616,
0.026454277336597443,
0.17737634479999542,
-0.07021733373403549,
-0.16094714403152466,
-0.07417889684438705,
0.0836009755730629,
0.3439107835292816,
0.06213024631142616,
-0.018902065232396126,
-0.13970674574375153,
-0.1297159194946289,
-0.3300814628601074,
0.14039447903633118,
0.11585286259651184,
0.17170903086662292,
0.3103238642215729,
-0.13719746470451355,
0.2422330230474472,
0.20460176467895508,
-0.05337148532271385,
0.08718661218881607,
0.3056901693344116,
0.0803060531616211,
0.19017747044563293,
-0.02872285060584545,
-0.2443515658378601,
-0.49074786901474,
0.06887099146842957,
0.12265747785568237,
0.3348744809627533,
-0.2639966607093811,
-0.09454170614480972,
-0.10887983441352844,
-0.11452903598546982,
-0.023291368037462234,
-0.14485490322113037,
0.05264899134635925,
0.021146073937416077,
0.08196300268173218,
0.07968635857105255,
-0.2851372957229614,
0.6017137765884399,
-0.10552453994750977,
0.3251819908618927,
-0.3908190131187439,
0.331042617559433,
-0.05575913190841675,
-0.16853725910186768,
-0.07377506792545319,
0.11835241317749023,
0.1043093279004097,
-0.09753687679767609,
-0.02057502046227455,
0.5396209359169006,
-0.19547392427921295,
0.041904374957084656,
-0.06928456574678421,
0.0764511227607727,
0.2272311896085739,
0.055088337510824203,
-0.22540807723999023,
-0.07893268764019012,
-0.10029635578393936,
-0.026535514742136,
-0.16689768433570862,
0.1665000468492508,
0.018298519775271416,
0.32434433698654175,
0.23263348639011383,
0.2677621841430664,
0.20873510837554932,
0.009897623211145401,
-0.3622606694698334,
-0.33787208795547485,
0.07630036771297455,
-0.22125041484832764,
-0.08274537324905396,
0.08672679215669632,
-0.468250036239624,
-0.18188828229904175,
0.5984174609184265,
0.10834632813930511,
-0.0025636255741119385,
0.5385376811027527,
-0.28917068243026733,
0.13118380308151245,
-0.09932287037372589,
0.05445287004113197,
0.2645021080970764,
0.09204084426164627,
-0.08243091404438019,
0.2007685750722885,
-0.030271470546722412,
-0.06762486696243286,
0.1413039118051529,
0.3081211447715759,
-0.10103748738765717,
0.1989038586616516,
0.19786949455738068,
0.2893438935279846,
-0.21021372079849243,
-0.21752406656742096,
-0.29208773374557495,
0.06309159100055695,
-0.4493151009082794,
0.049646735191345215,
-0.3362185060977936,
-0.045467082411050797,
-0.0662604346871376,
-0.4624067544937134,
-0.5822471380233765,
-0.258547306060791,
-0.26416611671447754,
0.31056714057922363,
0.06588476896286011,
0.08690734207630157,
0.005750630050897598,
0.17734774947166443,
0.05144786089658737,
-0.1569661647081375,
-0.19278660416603088,
0.2404874861240387,
-0.08716171234846115,
-0.025888606905937195,
0.016571011394262314,
-0.29845312237739563,
0.007037585601210594,
-0.5214829444885254,
-0.002435309812426567,
-0.2215586155653,
-0.448985755443573,
0.2175758332014084,
-0.2664293050765991,
0.16266798973083496,
0.46574652194976807,
0.16666637361049652,
-0.18114998936653137,
-0.34909576177597046,
0.34615257382392883,
-0.1658385545015335,
-0.11505010724067688,
0.13212577998638153,
0.06883075833320618,
0.04019072279334068,
-0.2767717242240906,
-0.171006977558136,
-0.2266676276922226,
-0.4507748782634735,
0.48261475563049316,
-0.01964554749429226,
0.03741659224033356,
0.6032160520553589,
0.07510440796613693,
0.12257614731788635,
-0.2519134283065796,
0.19721993803977966,
-0.16230645775794983,
-0.295349657535553,
0.388381689786911,
-0.09334680438041687,
-0.2764112949371338,
-0.01412786915898323,
0.10489882528781891,
0.046014413237571716,
-0.15517424046993256,
-0.18850862979888916,
-0.34644415974617004,
-0.281449556350708,
0.17414307594299316,
-0.15140415728092194,
0.1836838573217392,
0.30831652879714966,
0.15563592314720154,
-0.08765057474374771,
0.11602496355772018,
-0.1646382361650467,
0.04358268156647682,
0.09601031988859177,
0.19268417358398438,
0.061605680733919144,
0.16811230778694153,
-0.050860676914453506,
0.13062259554862976,
0.2514469623565674,
-0.12718459963798523,
0.1529778689146042,
-0.06119105964899063,
0.6169486045837402,
-0.34481316804885864,
-0.5696563720703125,
-0.13605129718780518,
-0.1755160689353943,
0.15409016609191895,
-0.03899681568145752,
-0.015542127192020416,
0.5336676239967346,
-0.1981145590543747,
0.09445534646511078,
-0.06954510509967804,
-0.2730867862701416,
0.03084694966673851,
0.1800275444984436,
0.11223125457763672,
-0.06792367994785309,
0.07599332183599472,
-0.03489850461483002,
-0.13767188787460327,
0.087880939245224,
0.38279157876968384,
0.038598839193582535,
0.06033167615532875,
-0.33509260416030884,
-0.011944353580474854,
-0.4219283163547516,
0.28412896394729614,
0.11441011726856232,
0.5654716491699219,
-0.06166033819317818,
-0.025555912405252457,
-0.11634320020675659,
0.17330150306224823,
0.6485146284103394,
0.020833225920796394,
-0.4175863265991211,
0.1779768019914627,
-0.21520721912384033,
-0.415878027677536,
-0.10623955726623535,
-0.13166460394859314,
0.11278863996267319,
0.459728866815567,
0.7233715057373047,
-0.1443919539451599,
-0.3250606954097748,
0.3847520351409912,
0.11368539184331894,
0.0200570710003376,
0.13431018590927124,
-0.1681777834892273,
-0.11844903975725174,
-0.278815895318985,
-0.18128830194473267,
0.24739192426204681,
0.43973106145858765,
0.013889210298657417,
0.09502753615379333,
-0.08833920210599899,
-0.33799436688423157,
0.3548239469528198,
-0.0977562963962555,
0.39112231135368347,
0.06727209687232971,
-0.021676264703273773,
0.29841139912605286,
0.022374287247657776,
0.3478638231754303,
0.448058545589447,
-0.019003864377737045,
-0.39395833015441895,
0.2049441635608673,
0.052937161177396774,
0.3099854290485382,
0.2232627272605896,
-0.17581573128700256,
0.19171449542045593,
-0.01753895729780197,
0.37076234817504883,
-0.4061200022697449,
0.25466400384902954,
0.5014803409576416,
-0.0437798835337162,
-0.5952858924865723,
-0.245793417096138,
0.2965115010738373,
0.060321565717458725,
0.13159622251987457,
0.14268726110458374,
0.5759367942810059,
-0.3086055815219879,
0.006429998204112053,
-0.025547288358211517,
0.9485666155815125,
0.21604204177856445,
0.2357538640499115,
-0.0023159701377153397,
0.0024825260043144226,
0.6270376443862915,
0.07879161834716797,
0.10467403382062912,
-0.22380989789962769,
-0.19316022098064423,
-0.17380572855472565,
-0.12877705693244934,
0.18626780807971954,
-0.34712129831314087,
-0.46165919303894043,
0.1612105816602707,
-0.2458007037639618,
0.13709525763988495,
-0.012717271223664284,
0.23772940039634705,
-0.27789196372032166,
-0.33345910906791687,
-0.20973721146583557,
0.05032408982515335,
-0.1281425654888153,
0.23480506241321564,
0.18686312437057495,
-0.1335946023464203,
-0.07833738625049591,
-0.29365378618240356,
-0.5652066469192505,
0.0017512328922748566,
0.0686415433883667,
0.13323426246643066,
0.5030466914176941,
-0.05901951342821121,
0.14349982142448425,
0.07500973343849182,
0.5497244000434875,
0.18179602921009064,
-0.18035168945789337,
-0.07870915532112122,
-0.45577073097229004,
-0.0352594330906868,
-0.028001731261610985,
0.14204955101013184,
0.1900133639574051,
0.16520416736602783,
0.09221207350492477,
0.05997972562909126,
-0.026798110455274582,
-0.06511186063289642,
-0.24088165163993835,
-0.05090677738189697,
-0.05541864037513733,
-0.5212353467941284,
0.011089904233813286,
-0.26247677206993103,
0.06699405610561371,
-0.2768297493457794,
0.03644001483917236,
0.04655664414167404,
-0.020313328132033348,
-0.11295395344495773,
0.2674066424369812,
-0.32617130875587463,
-0.1475694179534912,
0.4944499433040619,
-0.131259948015213,
-0.18561120331287384,
0.4317700266838074,
0.2067819982767105,
-0.16443610191345215,
0.013345040380954742,
0.17904943227767944,
0.30797645449638367,
-0.493766188621521,
0.3064979612827301,
0.10652826726436615,
-0.10551304370164871,
-0.04215182363986969,
0.5352705717086792,
0.19060568511486053,
0.130987286567688,
-0.145610973238945,
-0.2836112976074219,
-0.49168336391448975,
0.22891826927661896,
-0.09315334260463715,
0.18133112788200378,
-0.02319321408867836,
0.11938749253749847,
0.06430058926343918,
-0.10613992810249329,
-0.24588479101657867,
-0.0200873501598835,
-0.3636648654937744,
-0.00774763897061348,
0.18371330201625824,
-0.22634375095367432,
0.4529010057449341,
-0.23261752724647522,
0.036302246153354645,
0.23824132978916168,
-0.0639074519276619,
-0.013235403224825859,
-0.2859004735946655,
0.12896037101745605,
0.07839958369731903,
-0.07422401010990143,
-0.02493705227971077,
0.07671814411878586,
0.060385603457689285,
-0.1943933218717575,
0.1070215106010437,
0.41850411891937256,
0.06868210434913635,
0.34666720032691956,
-0.10766655206680298,
-0.04558563232421875,
0.2323300689458847,
0.05185103416442871,
0.16250568628311157,
0.3724346160888672,
0.05741472169756889,
0.1091923862695694,
-0.3039742410182953,
-0.026235025376081467,
0.005256227683275938,
0.3405039608478546,
0.1577935516834259,
-0.2774810492992401,
0.08764150738716125,
-0.32552045583724976,
-0.0664406418800354,
-0.04296092316508293,
0.4563751518726349,
0.48209336400032043,
-0.17268435657024384,
-0.0646548941731453,
0.1528211534023285,
0.09286785870790482,
-0.0616498701274395,
-0.23090118169784546,
-0.00023978203535079956,
0.08851511031389236,
-0.11875426769256592,
0.21007387340068817,
-0.023295840248465538,
-0.00962790846824646,
0.08960799872875214,
0.25273847579956055,
0.40458953380584717,
0.002410825341939926,
0.2493431121110916,
0.27068907022476196,
-0.05053114891052246,
0.04437452554702759,
0.4283192455768585,
0.1177385002374649,
0.06994873285293579,
0.29605478048324585,
-0.3573315143585205,
0.22305744886398315,
-0.15344473719596863,
0.021535169333219528,
0.2934718430042267,
-0.20190773904323578,
0.003384757786989212,
0.07656227797269821,
0.09431896358728409,
0.053590163588523865,
-0.1002996563911438,
0.4658689498901367,
-0.4169541597366333,
-0.30547159910202026,
-0.11413770169019699,
0.06885356456041336,
-0.2936483323574066,
-0.14678339660167694,
0.29006144404411316,
-0.24246230721473694,
-0.25484079122543335,
-0.026377372443675995,
0.033087704330682755,
-0.13252755999565125,
0.4549318850040436,
-0.08243027329444885,
0.014650903642177582,
-0.5120570659637451,
-0.24040928483009338,
0.0766536295413971,
0.09717224538326263,
-0.23191888630390167,
0.0822424441576004,
0.44486868381500244,
-0.16448910534381866,
0.24528510868549347,
0.4286009669303894,
0.7724022269248962,
0.33044949173927307,
0.2048587054014206,
0.06815984100103378,
-0.1314174085855484,
-0.04433774575591087,
0.17090317606925964,
0.27270975708961487,
0.02124859392642975,
-0.033569302409887314,
0.22265636920928955,
0.17010170221328735,
-0.15986938774585724,
0.17036491632461548,
-0.3559187352657318,
0.3353976905345917,
-0.3632688522338867,
0.4579143822193146,
-0.14230193197727203,
-0.02007509395480156,
0.00283094123005867,
-0.012387707829475403,
-0.34282225370407104,
-0.26634758710861206,
0.3695385158061981,
0.10450811684131622,
0.04588410258293152,
-0.17886191606521606,
0.06267202645540237,
0.3209572732448578,
0.5129381418228149,
0.6161301732063293,
0.07923267036676407,
-0.17566700279712677,
-0.13413788378238678,
-0.3914915919303894,
-0.09638134390115738,
0.2568172812461853,
0.08897180110216141,
0.08861274272203445,
-0.1029713973402977,
0.014271818101406097,
0.1135300025343895,
0.14370876550674438,
-0.08688974380493164,
-0.11918863654136658,
-0.08073653280735016,
-0.16935700178146362,
0.20253582298755646,
0.183790385723114,
-0.06638515740633011,
0.11284632980823517,
0.006747763603925705,
0.45645812153816223,
-0.1678050011396408,
-0.04013393074274063,
-0.11015968024730682,
0.22784098982810974,
-0.04876607283949852,
-0.17782926559448242,
0.12919101119041443,
0.25197383761405945,
0.23936247825622559,
-0.16072729229927063,
-0.363775372505188,
-0.2578880190849304,
-0.37997472286224365,
-0.11525169759988785,
0.286298543214798,
-0.08282314240932465,
0.6156250238418579,
-0.34456542134284973,
-0.19614437222480774,
-0.44202765822410583,
0.1549283266067505,
-0.04616554081439972,
0.016646254807710648,
-0.35466641187667847,
0.3450044095516205,
0.053720615804195404,
-0.1121290847659111,
0.19838212430477142,
0.22956395149230957,
0.10248056799173355,
0.18022918701171875,
-0.12844744324684143,
-0.6353249549865723,
0.596875786781311,
-0.1253461390733719,
-0.42336350679397583,
-0.1367214471101761,
-0.05808345973491669,
0.3527536690235138,
-0.2636309266090393,
-0.8850889205932617,
-0.1082470566034317,
0.13973818719387054,
0.09093314409255981,
-0.22953490912914276,
0.10046617686748505,
-0.152012899518013,
-0.11383146792650223,
-0.19893503189086914,
0.3980153203010559,
0.25432756543159485,
-0.16490957140922546,
0.31528210639953613,
-0.06993287801742554
] |
https://github.com/huggingface/datasets/issues/5406 | [2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str` | @ntrpnr @mtwichel Did you install `datasets` with conda ?
I suspect that `datasets` 2.9 on conda still have this issue for some reason. When I install `datasets` with `pip` I don't have this error. | `datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience. | 34 | [2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
@ntrpnr @mtwichel Did you install `datasets` with conda ?
I suspect that `datasets` 2.9 on conda still have this issue for some reason. When I install `datasets` with `pip` I don't have this error. | [
-0.2978602647781372,
-0.10467936098575592,
-0.012508518993854523,
0.14362940192222595,
0.25562524795532227,
0.1102101132273674,
0.1326507180929184,
0.299350768327713,
-0.15901434421539307,
0.21375145018100739,
-0.2765698730945587,
0.2294270247220993,
-0.012035674415528774,
0.28797948360443115,
-0.3212038576602936,
-0.06757882982492447,
0.00558067113161087,
0.15745291113853455,
-0.07246604561805725,
0.1610361486673355,
-0.23489265143871307,
0.37598916888237,
-0.2944245934486389,
0.1177406907081604,
-0.3699403405189514,
0.10577363520860672,
0.10031510889530182,
0.34509575366973877,
-0.285440593957901,
-0.39428141713142395,
0.36535897850990295,
0.0283866748213768,
0.2306838184595108,
0.4799220561981201,
-0.00011370932043064386,
-0.05774721875786781,
0.4246785044670105,
-0.009995750151574612,
-0.5394559502601624,
-0.4474465250968933,
0.11013812571763992,
-0.10267996788024902,
0.3491883873939514,
0.04755666106939316,
0.12177132815122604,
-0.22000372409820557,
0.12625351548194885,
-0.15895456075668335,
0.11822348833084106,
0.3295183479785919,
0.20663826167583466,
0.3341844379901886,
0.38204365968704224,
-0.44389641284942627,
-0.1344892978668213,
0.3509736657142639,
-0.07670924812555313,
0.1628451943397522,
0.04761097580194473,
0.12431906163692474,
0.13375340402126312,
0.25654298067092896,
-0.08760808408260345,
-0.15050892531871796,
0.1960010528564453,
0.21291254460811615,
-0.14139363169670105,
-0.5455644130706787,
0.17171749472618103,
0.1906532347202301,
0.3419089913368225,
-0.19770997762680054,
-0.5022633075714111,
-0.18707424402236938,
0.0934256985783577,
-0.03120804950594902,
0.1770426332950592,
0.08135418593883514,
-0.15884019434452057,
0.19105499982833862,
-0.33857542276382446,
-0.16517572104930878,
-0.031055383384227753,
0.12982283532619476,
-0.0628940537571907,
-0.014768168330192566,
-0.22192373871803284,
0.04023178294301033,
0.2596064805984497,
-0.3813514709472656,
0.019483111798763275,
0.1347004920244217,
-0.2752457559108734,
-0.05455305799841881,
-0.07893125712871552,
0.07993751764297485,
-0.20840734243392944,
0.004384562373161316,
0.08971424400806427,
-0.05279276520013809,
-0.24798981845378876,
0.15687307715415955,
-0.25119665265083313,
0.09181307256221771,
0.1432380974292755,
0.051210734993219376,
0.3073708415031433,
0.26377877593040466,
0.28564250469207764,
0.08066429197788239,
0.29322493076324463,
-0.13076063990592957,
-0.07116561383008957,
-0.06745894998311996,
-0.09671139717102051,
-0.16417819261550903,
0.27022087574005127,
-0.027062848210334778,
-0.24014398455619812,
0.10095992684364319,
0.07912274450063705,
-0.010539162904024124,
0.05403896048665047,
0.2958708107471466,
-0.20560742914676666,
0.17236095666885376,
0.32782232761383057,
0.31892138719558716,
0.2123064547777176,
-0.03023892641067505,
-0.11993569880723953,
0.033917758613824844,
0.008105259388685226,
-0.12831272184848785,
0.14309871196746826,
-0.5668475031852722,
0.01113002561032772,
0.33720895648002625,
0.4360807538032532,
0.06849709898233414,
-0.39869949221611023,
0.07521291077136993,
0.07416155189275742,
0.33518487215042114,
0.0683060735464096,
0.16878129541873932,
0.2074517458677292,
-0.35744935274124146,
-0.0710504949092865,
-0.018634535372257233,
-0.4521123766899109,
-0.20007646083831787,
-0.6522979140281677,
0.14624442160129547,
0.13699890673160553,
-0.02724183350801468,
-0.26975715160369873,
-0.0864839255809784,
-0.0009564384818077087,
-0.2867346704006195,
-0.13466694951057434,
-0.2457069307565689,
0.1989460289478302,
-0.15188480913639069,
0.25293242931365967,
0.3298279345035553,
-0.22003374993801117,
-0.0942663848400116,
-0.001091671409085393,
0.06835456192493439,
0.12769386172294617,
0.18887361884117126,
-0.04596336558461189,
-0.18824714422225952,
-0.4490188658237457,
0.07552856206893921,
0.28525933623313904,
-0.47658011317253113,
-0.0893305242061615,
0.10371022671461105,
0.05944083631038666,
0.09773600846529007,
-0.00015690922737121582,
-0.06747236102819443,
-0.03420406952500343,
0.11434295773506165,
0.3456546664237976,
0.019496774300932884,
0.039678607136011124,
-0.11029317229986191,
-0.11879141628742218,
-0.2147718071937561,
0.0813731849193573,
0.09010514616966248,
-0.01071082055568695,
0.2661908268928528,
0.01778338849544525,
-0.0012760646641254425,
0.1992027759552002,
-0.024201180785894394,
0.0562121719121933,
0.15745609998703003,
0.15180841088294983,
0.20795999467372894,
0.016375832259655,
-0.2183336615562439,
-0.4404589533805847,
0.004065707325935364,
0.1820601224899292,
0.2811075448989868,
-0.18383397161960602,
-0.18124915659427643,
-0.11825598776340485,
-0.05505470186471939,
-0.042174022644758224,
-0.05123799666762352,
0.13031892478466034,
0.07966769486665726,
0.08550001680850983,
0.06856155395507812,
-0.32059115171432495,
0.5501217246055603,
-0.06111564859747887,
0.26373594999313354,
-0.3827241361141205,
0.21061772108078003,
-0.1327298879623413,
-0.1825183480978012,
-0.05504786968231201,
0.13459013402462006,
0.10101138055324554,
0.03690456598997116,
-0.014598403126001358,
0.5532885789871216,
-0.11368531733751297,
0.035210296511650085,
-0.06843991577625275,
-0.12402425706386566,
0.19115151464939117,
0.0993957370519638,
-0.14911265671253204,
-0.09179241955280304,
-0.036945559084415436,
0.012236304581165314,
-0.14067426323890686,
0.12205208837985992,
0.00945764034986496,
0.3137751519680023,
0.24551226198673248,
0.24769213795661926,
0.34027498960494995,
0.06790642440319061,
-0.2935526967048645,
-0.49514469504356384,
0.15731099247932434,
-0.16389845311641693,
-0.059602245688438416,
0.02931717038154602,
-0.5178423523902893,
-0.03683488816022873,
0.547385573387146,
0.12816645205020905,
0.11313469707965851,
0.5248337388038635,
-0.2536967396736145,
0.18756824731826782,
-0.0764140635728836,
0.021853480488061905,
0.24816706776618958,
0.1699972301721573,
-0.09780120849609375,
0.1512192189693451,
-0.014224194921553135,
-0.1864517778158188,
0.15478235483169556,
0.25420382618904114,
-0.10733136534690857,
0.22516968846321106,
0.278003454208374,
0.24350504577159882,
-0.17327556014060974,
-0.2837802469730377,
-0.37559574842453003,
0.01496834121644497,
-0.4057243764400482,
-0.05428372323513031,
-0.4414225220680237,
-0.06180000305175781,
0.11415505409240723,
-0.5857635140419006,
-0.43394723534584045,
-0.29087066650390625,
-0.22067813575267792,
0.3635117709636688,
0.10648825764656067,
0.0862169861793518,
-0.03327133506536484,
0.11259970813989639,
-0.012152476236224174,
-0.12873023748397827,
-0.2023395597934723,
0.15623538196086884,
-0.10299991816282272,
0.04223198816180229,
-0.0024669449776411057,
-0.17200423777103424,
0.14492031931877136,
-0.5667642951011658,
0.09586270153522491,
-0.2788121700286865,
-0.41501545906066895,
0.18239380419254303,
-0.22114776074886322,
0.27649152278900146,
0.45340996980667114,
0.16433750092983246,
-0.11340081691741943,
-0.3327915072441101,
0.35892438888549805,
-0.03486790135502815,
-0.152251198887825,
0.1839505285024643,
0.08284888416528702,
-0.18286454677581787,
-0.3011277914047241,
-0.17319655418395996,
-0.29672834277153015,
-0.5459851026535034,
0.4694613218307495,
0.06402029097080231,
0.0831761509180069,
0.36459627747535706,
0.0934276357293129,
0.10036527365446091,
-0.13973437249660492,
0.2727375328540802,
-0.17824122309684753,
-0.26711395382881165,
0.3618164360523224,
-0.2550983130931854,
-0.26419663429260254,
0.05316885933279991,
0.17371846735477448,
0.07141254842281342,
-0.22287599742412567,
-0.22796769440174103,
-0.37892788648605347,
-0.2529238164424896,
0.32539114356040955,
-0.016974128782749176,
0.14525213837623596,
0.25317373871803284,
0.21189998090267181,
-0.15914073586463928,
0.05982847511768341,
-0.18672598898410797,
0.06932616233825684,
0.029838157817721367,
0.07282602787017822,
0.09561216086149216,
0.23618248105049133,
-0.15737061202526093,
-0.0743602067232132,
0.3546220660209656,
-0.061764512211084366,
0.2915240526199341,
-0.09591120481491089,
0.6443648338317871,
-0.4590650498867035,
-0.5533392429351807,
-0.19780011475086212,
-0.13373196125030518,
0.17141824960708618,
-0.013049744069576263,
-0.03361283615231514,
0.4652012884616852,
-0.29931190609931946,
0.04374222084879875,
-0.14498354494571686,
-0.1920061707496643,
-0.08863348513841629,
0.18002665042877197,
0.033380355685949326,
-0.0946960598230362,
0.06907138973474503,
-0.0007035695016384125,
-0.16100099682807922,
0.021828163415193558,
0.40183788537979126,
0.03652193769812584,
-0.04835440590977669,
-0.3591304123401642,
-0.09140332788228989,
-0.40001440048217773,
0.41747647523880005,
0.11330041289329529,
0.4945605397224426,
-0.09539767354726791,
-0.06565354019403458,
-0.12812815606594086,
0.19079087674617767,
0.6437506675720215,
-0.02790340594947338,
-0.44715696573257446,
0.18899434804916382,
-0.07923606038093567,
-0.4593374729156494,
-0.0023120343685150146,
-0.08714517951011658,
0.21364039182662964,
0.4469749331474304,
0.7047725915908813,
-0.16981837153434753,
-0.23802083730697632,
0.33824795484542847,
0.17262281477451324,
0.011837657541036606,
0.05941000208258629,
-0.21095746755599976,
-0.1588030755519867,
-0.339392751455307,
-0.24936506152153015,
0.16875138878822327,
0.43165746331214905,
-0.055995047092437744,
-0.07157324999570847,
-0.19086849689483643,
-0.312438040971756,
0.3526023030281067,
-0.025109250098466873,
0.47802114486694336,
-0.04869777336716652,
0.08358445763587952,
0.14635421335697174,
0.12210516631603241,
0.5104678273200989,
0.504897952079773,
-0.11840702593326569,
-0.4420560598373413,
0.15458324551582336,
-0.0850294902920723,
0.3102981746196747,
0.10875435173511505,
-0.19176585972309113,
0.13639959692955017,
-0.07607294619083405,
0.3546062707901001,
-0.3533446788787842,
0.11942454427480698,
0.40152254700660706,
-0.014430586248636246,
-0.5568296909332275,
-0.2781446874141693,
0.26618531346321106,
0.09596110880374908,
0.12732063233852386,
0.20722313225269318,
0.4417141079902649,
-0.28100162744522095,
-0.0008205566555261612,
0.009118117392063141,
0.8874435424804688,
0.21561722457408905,
0.1001753956079483,
-0.005001898854970932,
0.013950489461421967,
0.4453449249267578,
0.1295226812362671,
0.04747302830219269,
-0.2971145808696747,
-0.20785203576087952,
-0.14526642858982086,
-0.07229480147361755,
0.16848516464233398,
-0.36762046813964844,
-0.5359318852424622,
0.14460642635822296,
-0.37251538038253784,
-0.04018653556704521,
-0.02540522627532482,
0.2583443522453308,
-0.3978447914123535,
-0.3484356105327606,
-0.18336321413516998,
0.12518014013767242,
-0.04393966495990753,
0.107405886054039,
0.1820683777332306,
-0.018043892458081245,
-0.13354086875915527,
-0.2644570767879486,
-0.5378623008728027,
0.030971035361289978,
0.03360806033015251,
0.1392160952091217,
0.33754539489746094,
-0.1634126603603363,
-0.009817124344408512,
0.17033140361309052,
0.5299220085144043,
0.2343842089176178,
-0.11946339905261993,
-0.07451120018959045,
-0.32481181621551514,
-0.14530223608016968,
0.020240556448698044,
0.09911531209945679,
0.10116414725780487,
0.04594990611076355,
-0.007955506443977356,
0.09312479197978973,
0.029211122542619705,
-0.04943977668881416,
-0.17772391438484192,
0.06313750147819519,
-0.016270607709884644,
-0.471810907125473,
-0.148997962474823,
-0.33211785554885864,
0.021446656435728073,
-0.2849377393722534,
0.07995717227458954,
0.03838134929537773,
0.04918532073497772,
-0.06292878836393356,
0.23140011727809906,
-0.3661765456199646,
-0.17389598488807678,
0.4137403070926666,
-0.15487033128738403,
-0.14402037858963013,
0.43281233310699463,
0.2031709998846054,
-0.259986937046051,
-0.034537315368652344,
0.16614702343940735,
0.17765435576438904,
-0.3337613046169281,
0.30254697799682617,
0.2001340240240097,
-0.07508496940135956,
0.05047643184661865,
0.4604519009590149,
0.03858423978090286,
0.12575845420360565,
-0.20601403713226318,
-0.37361225485801697,
-0.3373997211456299,
0.21934674680233002,
-0.09765306115150452,
0.18547311425209045,
0.03894669562578201,
0.027168728411197662,
0.06399644166231155,
-0.11319847404956818,
-0.3083389103412628,
-0.025301292538642883,
-0.3326980769634247,
0.05141942948102951,
0.1567077487707138,
-0.06637191772460938,
0.3791167140007019,
-0.1513962298631668,
0.10880470275878906,
0.2601661682128906,
0.002912997268140316,
-0.11487922072410583,
-0.1868574023246765,
0.10846138745546341,
-0.01354692131280899,
-0.06179928779602051,
-0.056439802050590515,
0.012136217206716537,
-0.019809577614068985,
-0.2585621774196625,
0.040635909885168076,
0.351477712392807,
-0.04639154672622681,
0.2674604654312134,
-0.07939799129962921,
-0.06390266865491867,
0.24303732812404633,
0.13119125366210938,
0.11689683794975281,
0.33758842945098877,
-0.12912338972091675,
0.09973935782909393,
-0.33240750432014465,
-0.030168984085321426,
0.1409950703382492,
0.23505401611328125,
0.13437263667583466,
-0.15701422095298767,
0.10916045308113098,
-0.25688374042510986,
0.0026004724204540253,
0.038404371589422226,
0.43699973821640015,
0.4404059648513794,
-0.12248080223798752,
-0.027004070580005646,
0.1593078374862671,
0.15966036915779114,
-0.06595318019390106,
-0.23818565905094147,
0.021168267354369164,
0.06192846968770027,
-0.11964474618434906,
0.1973487138748169,
-0.0570785328745842,
-0.037859413772821426,
-0.023519016802310944,
0.14827275276184082,
0.40789908170700073,
-0.10076998174190521,
0.2425639033317566,
0.2779526114463806,
-0.04551438242197037,
0.07503163814544678,
0.374796599149704,
0.1631409078836441,
0.11077880859375,
0.4158671498298645,
-0.43890315294265747,
0.2557496726512909,
0.0883864164352417,
0.025720257312059402,
0.2808610498905182,
-0.2660069167613983,
0.19504468142986298,
0.005129709839820862,
0.08595802634954453,
0.026154864579439163,
-0.00982077419757843,
0.3939436078071594,
-0.45721402764320374,
-0.159102201461792,
-0.19648075103759766,
0.05524887144565582,
-0.24593695998191833,
-0.14059127867221832,
0.16263635456562042,
-0.243440181016922,
-0.13792739808559418,
-0.04896943271160126,
0.0375162735581398,
-0.07955607771873474,
0.312389075756073,
-0.01608065515756607,
0.08581160753965378,
-0.583145797252655,
-0.19225406646728516,
0.005965724587440491,
0.12106432020664215,
-0.24870513379573822,
0.07383395731449127,
0.5161096453666687,
-0.09367258846759796,
0.27889713644981384,
0.4303455948829651,
0.8931592702865601,
0.48798227310180664,
0.13325002789497375,
0.08444296568632126,
-0.1943313628435135,
-0.10885809361934662,
0.0969051793217659,
0.25206878781318665,
0.04107879102230072,
-0.03311410918831825,
0.18543776869773865,
0.2527587413787842,
-0.1810997724533081,
0.15743488073349,
-0.27122762799263,
0.4224338233470917,
-0.3183925151824951,
0.35120919346809387,
-0.13863183557987213,
-0.07262668758630753,
-0.009946819394826889,
-0.10057941824197769,
-0.36606594920158386,
-0.25201094150543213,
0.4765872061252594,
0.011549455113708973,
-0.015588799491524696,
-0.2568671703338623,
0.10900034010410309,
0.2812155485153198,
0.4677252471446991,
0.5478272438049316,
0.16305887699127197,
-0.1387072205543518,
-0.13149738311767578,
-0.3155291676521301,
-0.03577397018671036,
0.20038659870624542,
-0.0049273185431957245,
0.027514781802892685,
-0.03685575723648071,
-0.015497170388698578,
0.19103629887104034,
0.2089042067527771,
-0.016949132084846497,
-0.04807974025607109,
0.01639970764517784,
-0.18242916464805603,
0.1318311244249344,
0.2086522877216339,
-0.14865104854106903,
0.12771078944206238,
-0.10510152578353882,
0.3677804470062256,
-0.3014397621154785,
0.011162843555212021,
-0.1142401397228241,
0.20902672410011292,
0.07952255010604858,
-0.12860503792762756,
0.2504919171333313,
0.30129531025886536,
0.29200392961502075,
-0.21855556964874268,
-0.35167527198791504,
-0.17185157537460327,
-0.3985849916934967,
-0.15066877007484436,
0.3486992418766022,
-0.005463242530822754,
0.4748098850250244,
-0.391979843378067,
-0.26928237080574036,
-0.3662422299385071,
0.31724071502685547,
-0.045656122267246246,
0.0645153596997261,
-0.2585296630859375,
0.24322912096977234,
0.08417581766843796,
-0.20133903622627258,
0.13082928955554962,
0.1564941704273224,
0.15630000829696655,
0.26385754346847534,
-0.03087383508682251,
-0.6793535351753235,
0.5380778312683105,
-0.06460268050432205,
-0.34407976269721985,
-0.17844341695308685,
-0.049981892108917236,
0.2894941568374634,
-0.22445552051067352,
-0.7719188332557678,
-0.05816496163606644,
0.1981072574853897,
0.07798558473587036,
-0.18390962481498718,
0.10714444518089294,
-0.15136079490184784,
-0.0610092431306839,
-0.2504758834838867,
0.35147443413734436,
0.3020802140235901,
-0.1875077337026596,
0.2933119833469391,
-0.04913516342639923
] |
https://github.com/huggingface/datasets/issues/5406 | [2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str` | > @ntrpnr @mtwichel Did you install datasets with conda ?
I did yeah, I wonder if that's the issue | `datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience. | 19 | [2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
> @ntrpnr @mtwichel Did you install datasets with conda ?
I did yeah, I wonder if that's the issue | [
-0.2563302218914032,
-0.20079022645950317,
-0.027708543464541435,
0.15215763449668884,
0.26354342699050903,
0.06652147322893143,
0.12212345004081726,
0.3263581097126007,
-0.093695268034935,
0.19993674755096436,
-0.2873542606830597,
0.2094787359237671,
-0.020035702735185623,
0.293765664100647,
-0.2636425793170929,
-0.0604947954416275,
-0.007028505206108093,
0.12218193709850311,
-0.055779263377189636,
0.1137121170759201,
-0.23229002952575684,
0.39998406171798706,
-0.26150354743003845,
0.11461852490901947,
-0.40197351574897766,
0.1046934425830841,
0.07173053175210953,
0.37034204602241516,
-0.2660575211048126,
-0.37518611550331116,
0.3283854126930237,
0.0290047749876976,
0.17112794518470764,
0.4076578915119171,
-0.00010858651512535289,
-0.06771509349346161,
0.44835031032562256,
0.0029200222343206406,
-0.47213220596313477,
-0.4082527756690979,
0.1835501790046692,
-0.03466283529996872,
0.3604128360748291,
0.07713078707456589,
0.04896222800016403,
-0.15333807468414307,
0.1378592699766159,
-0.14384564757347107,
0.1615447998046875,
0.31230539083480835,
0.2619144916534424,
0.36920544505119324,
0.349141389131546,
-0.4306100010871887,
-0.0934932753443718,
0.31101179122924805,
-0.11342571675777435,
0.1961236298084259,
0.094110406935215,
0.062094978988170624,
0.07326290756464005,
0.2808847427368164,
-0.018988125026226044,
-0.1692003458738327,
0.20811939239501953,
0.22530511021614075,
-0.07485980540513992,
-0.5253961086273193,
0.14185792207717896,
0.18839046359062195,
0.23963701725006104,
-0.1521703600883484,
-0.44545695185661316,
-0.1925225853919983,
0.07509809732437134,
-0.08121507614850998,
0.19148026406764984,
0.0542711466550827,
-0.14533641934394836,
0.17001935839653015,
-0.3605697751045227,
-0.18432527780532837,
0.0023968368768692017,
0.10167962312698364,
-0.06987597048282623,
-0.022701650857925415,
-0.2287796586751938,
0.021582387387752533,
0.2779802083969116,
-0.35844355821609497,
0.009774657897651196,
0.21081788837909698,
-0.2838822901248932,
-0.03872288018465042,
-0.08663634955883026,
0.0562848225235939,
-0.08764290064573288,
0.05028489977121353,
0.10489945858716965,
-0.00505458191037178,
-0.3001386523246765,
0.18476495146751404,
-0.2641551196575165,
0.07025903463363647,
0.1344154328107834,
0.09520174562931061,
0.2583603262901306,
0.21157681941986084,
0.31672608852386475,
0.08044862747192383,
0.2533600330352783,
-0.13528677821159363,
-0.04052881523966789,
-0.062053579837083817,
-0.10576879978179932,
-0.1671689748764038,
0.2561948895454407,
-0.05936219170689583,
-0.2272346019744873,
0.08613107353448868,
0.06357306241989136,
0.0375259593129158,
0.03788459300994873,
0.3549031913280487,
-0.1793212890625,
0.13041716814041138,
0.32572561502456665,
0.318881094455719,
0.16106554865837097,
-0.029738135635852814,
-0.1791447401046753,
0.0221438929438591,
-0.022030826658010483,
-0.06770732253789902,
0.1490338146686554,
-0.5012798309326172,
0.08262495696544647,
0.32503774762153625,
0.479192852973938,
0.03622503578662872,
-0.37812539935112,
0.0946556031703949,
0.050386007875204086,
0.3297789990901947,
0.06034500524401665,
0.1577608436346054,
0.22248061001300812,
-0.3280871510505676,
-0.04457930102944374,
-0.04441268742084503,
-0.3861714005470276,
-0.1895771324634552,
-0.6000891327857971,
0.1954783946275711,
0.13125823438167572,
-0.015360917896032333,
-0.237264484167099,
-0.0948001891374588,
-0.03787762671709061,
-0.22806040942668915,
-0.13933199644088745,
-0.2247871607542038,
0.13307154178619385,
-0.12144285440444946,
0.25647151470184326,
0.3518505096435547,
-0.16667985916137695,
-0.10572284460067749,
0.022835176438093185,
0.03756174445152283,
0.07289587706327438,
0.19964833557605743,
-0.07414983212947845,
-0.23522478342056274,
-0.5065824389457703,
0.10388283431529999,
0.19409099221229553,
-0.4785652756690979,
-0.09871673583984375,
0.07746290415525436,
0.030162908136844635,
0.09080846607685089,
-0.04229911416769028,
-0.055059485137462616,
-0.053473830223083496,
0.11973237246274948,
0.3559297025203705,
-0.014240864664316177,
0.050347186625003815,
-0.05121516436338425,
-0.20484882593154907,
-0.20790308713912964,
0.006697699427604675,
0.10993067920207977,
0.00008504465222358704,
0.23385798931121826,
-0.012984447181224823,
-0.060218457132577896,
0.2440052330493927,
0.0019061453640460968,
0.05095110088586807,
0.1947474479675293,
0.17428375780582428,
0.2097335159778595,
0.01442955993115902,
-0.1908092200756073,
-0.39732104539871216,
0.035009533166885376,
0.16777905821800232,
0.31089502573013306,
-0.11907878518104553,
-0.18555061519145966,
-0.15119969844818115,
-0.07297675311565399,
-0.08033497631549835,
-0.13085071742534637,
0.17832612991333008,
0.06381842494010925,
0.09999687969684601,
0.0830002874135971,
-0.29888632893562317,
0.5705813765525818,
-0.06509777903556824,
0.2628031373023987,
-0.39252015948295593,
0.22349973022937775,
-0.18122586607933044,
-0.1691131442785263,
-0.03530462458729744,
0.10149045288562775,
0.1408374011516571,
0.03722993656992912,
-0.012823572382330894,
0.5583446025848389,
-0.09612077474594116,
0.07834131270647049,
-0.06175166368484497,
-0.15679068863391876,
0.20808102190494537,
0.051575612276792526,
-0.1422508955001831,
-0.07815545797348022,
-0.06977785378694534,
-0.026309248059988022,
-0.12921616435050964,
0.14862708747386932,
0.013872381299734116,
0.2744429409503937,
0.26723581552505493,
0.2480851709842682,
0.33218830823898315,
0.02420513704419136,
-0.30010899901390076,
-0.48856744170188904,
0.13585194945335388,
-0.13510319590568542,
-0.035884831100702286,
0.010320404544472694,
-0.5328381061553955,
0.021189190447330475,
0.5396524667739868,
0.13439200818538666,
0.08199136704206467,
0.49702030420303345,
-0.2884680926799774,
0.18046638369560242,
-0.07129489630460739,
0.05168209597468376,
0.2543014883995056,
0.19712820649147034,
-0.12115268409252167,
0.17653869092464447,
-0.03610370680689812,
-0.196210578083992,
0.15001513063907623,
0.20228463411331177,
-0.07841452211141586,
0.19006633758544922,
0.306169718503952,
0.172169029712677,
-0.2487812340259552,
-0.2577648162841797,
-0.37675315141677856,
0.01018235832452774,
-0.3978043794631958,
-0.07129944115877151,
-0.38789159059524536,
-0.04602699354290962,
0.11209551990032196,
-0.5508233308792114,
-0.4145488739013672,
-0.30582061409950256,
-0.12936349213123322,
0.393088161945343,
0.0948505848646164,
0.09615100175142288,
-0.020573602989315987,
0.12228734791278839,
-0.04109565168619156,
-0.07202325761318207,
-0.2289665788412094,
0.13071919977664948,
-0.08700204640626907,
0.078096404671669,
-0.0015180455520749092,
-0.1750165820121765,
0.18193858861923218,
-0.5604477524757385,
0.04566638916730881,
-0.2800746262073517,
-0.4302605092525482,
0.1938195675611496,
-0.23570893704891205,
0.27623406052589417,
0.40890219807624817,
0.17420196533203125,
-0.16609592735767365,
-0.29448020458221436,
0.3857022523880005,
-0.10279014706611633,
-0.2109101563692093,
0.11948353052139282,
0.10947413742542267,
-0.1828029900789261,
-0.3426993787288666,
-0.17064207792282104,
-0.2550639808177948,
-0.5164982676506042,
0.4865742325782776,
0.09413844347000122,
0.07281225174665451,
0.39095014333724976,
0.06189568713307381,
0.12266533076763153,
-0.1290915310382843,
0.22734837234020233,
-0.2240959256887436,
-0.28939205408096313,
0.33239468932151794,
-0.3183061480522156,
-0.29685431718826294,
0.06434282660484314,
0.16939951479434967,
0.062016069889068604,
-0.2664627432823181,
-0.2441684454679489,
-0.42266425490379333,
-0.28099966049194336,
0.297620952129364,
0.000429302453994751,
0.10309039801359177,
0.24654141068458557,
0.18855933845043182,
-0.19362859427928925,
0.051728494465351105,
-0.18765048682689667,
0.07516296207904816,
0.041014865040779114,
0.09572635591030121,
0.035000987350940704,
0.21283823251724243,
-0.18303680419921875,
-0.02040276676416397,
0.3071835935115814,
-0.009640306234359741,
0.2887077033519745,
-0.13826437294483185,
0.6133028864860535,
-0.4670027792453766,
-0.5278946161270142,
-0.1403401494026184,
-0.11735206842422485,
0.1427440345287323,
0.010111294686794281,
0.006299267522990704,
0.4014117121696472,
-0.27729207277297974,
0.045483481138944626,
-0.14615526795387268,
-0.20562811195850372,
-0.12000761926174164,
0.19666361808776855,
0.002755381166934967,
-0.08387362211942673,
0.08631791919469833,
0.036408666521310806,
-0.17694860696792603,
0.058732371777296066,
0.33630120754241943,
0.04287409782409668,
-0.11382590234279633,
-0.3160143494606018,
-0.021800803020596504,
-0.4063960909843445,
0.3627878427505493,
0.06370086967945099,
0.3668895959854126,
-0.10956427454948425,
-0.12227494269609451,
-0.04590366780757904,
0.14533497393131256,
0.6799132227897644,
-0.01347973383963108,
-0.4142533540725708,
0.18272168934345245,
-0.12063096463680267,
-0.4731380343437195,
0.007116429507732391,
-0.10005063563585281,
0.16950778663158417,
0.4629690647125244,
0.7062416672706604,
-0.15269899368286133,
-0.218363955616951,
0.3145153820514679,
0.14348873496055603,
-0.0039529018104076385,
0.051351793110370636,
-0.2505856156349182,
-0.15332840383052826,
-0.33195924758911133,
-0.2129594385623932,
0.17274333536624908,
0.3839849531650543,
-0.06707140058279037,
-0.11580373346805573,
-0.14917077124118805,
-0.3228340148925781,
0.3274538218975067,
0.03607911989092827,
0.5032223463058472,
-0.07423184812068939,
0.10322825610637665,
0.19314822554588318,
0.15519267320632935,
0.4649260938167572,
0.486104279756546,
-0.11935190856456757,
-0.3692820966243744,
0.16233649849891663,
-0.09214715659618378,
0.2524033188819885,
0.15470492839813232,
-0.15565341711044312,
0.11229544132947922,
-0.12715782225131989,
0.36882781982421875,
-0.2956799864768982,
0.10235278308391571,
0.3848513960838318,
-0.0017671515233814716,
-0.4536838233470917,
-0.2098221629858017,
0.22507163882255554,
0.049558740109205246,
0.11597734689712524,
0.21753928065299988,
0.5184243321418762,
-0.23688055574893951,
0.04632672667503357,
-0.031337231397628784,
0.9286998510360718,
0.21722449362277985,
0.10460099577903748,
0.00907759927213192,
-0.005563188344240189,
0.3943074643611908,
0.12596160173416138,
0.08742830902338028,
-0.32331383228302,
-0.2068488746881485,
-0.08713147789239883,
-0.014456722885370255,
0.11622782051563263,
-0.37378358840942383,
-0.48900508880615234,
0.10125665366649628,
-0.32742050290107727,
-0.0817725658416748,
-0.06989777833223343,
0.24571028351783752,
-0.40410497784614563,
-0.32419687509536743,
-0.17071375250816345,
0.1892741471529007,
-0.015750162303447723,
0.159464031457901,
0.17747703194618225,
-0.03816501796245575,
-0.13374069333076477,
-0.2349843680858612,
-0.5097821950912476,
0.05176776647567749,
0.016490517184138298,
0.11633551865816116,
0.35120531916618347,
-0.14859317243099213,
-0.04081705957651138,
0.16373299062252045,
0.5137590765953064,
0.20261240005493164,
-0.16610287129878998,
0.0037733055651187897,
-0.28825753927230835,
-0.12965688109397888,
0.02383803203701973,
0.07155712693929672,
0.08021121472120285,
0.0004673600196838379,
-0.07817405462265015,
0.08296911418437958,
0.06570947915315628,
-0.04657408967614174,
-0.18833845853805542,
0.05926431715488434,
-0.02962753176689148,
-0.4117680788040161,
-0.1569424420595169,
-0.3115817606449127,
0.0050872936844825745,
-0.31893783807754517,
0.13885441422462463,
-0.001231260597705841,
0.04567306116223335,
-0.08442572504281998,
0.3065486550331116,
-0.3608272671699524,
-0.15289868414402008,
0.41787075996398926,
-0.21760371327400208,
-0.12326450645923615,
0.4000434875488281,
0.22601626813411713,
-0.27661558985710144,
-0.07979446649551392,
0.14844158291816711,
0.19403652846813202,
-0.328368604183197,
0.2725435495376587,
0.2073419988155365,
-0.061456434428691864,
0.06823968142271042,
0.4628741145133972,
0.03718845918774605,
0.15596941113471985,
-0.18377552926540375,
-0.33808431029319763,
-0.37029048800468445,
0.21960118412971497,
-0.1266942024230957,
0.20007994771003723,
0.011122547090053558,
0.026890400797128677,
0.09379416704177856,
-0.09622377157211304,
-0.3711763620376587,
-0.01073128916323185,
-0.3560400605201721,
0.028235619887709618,
0.14663422107696533,
-0.08284556120634079,
0.41054826974868774,
-0.19125136733055115,
0.16230152547359467,
0.3078797459602356,
0.009723836556077003,
-0.1731162667274475,
-0.18858441710472107,
0.07379506528377533,
-0.017354052513837814,
-0.0782475620508194,
-0.03504151105880737,
0.05113941431045532,
-0.013394411653280258,
-0.22967813909053802,
0.08460173010826111,
0.36201080679893494,
-0.010431528091430664,
0.23119503259658813,
-0.0912504494190216,
-0.09687609225511551,
0.2663394808769226,
0.07129521667957306,
0.1399839222431183,
0.3396391272544861,
-0.1283096969127655,
0.04055395722389221,
-0.2991557717323303,
-0.04372801631689072,
0.22568608820438385,
0.21451154351234436,
0.07995550334453583,
-0.11537136882543564,
0.10568037629127502,
-0.18591070175170898,
-0.039331402629613876,
0.03164149075746536,
0.4558183550834656,
0.3703834116458893,
-0.1435421109199524,
-0.036569587886333466,
0.153065025806427,
0.23084595799446106,
-0.09098142385482788,
-0.18227416276931763,
0.06433388590812683,
0.03298579156398773,
-0.07690344750881195,
0.1911543756723404,
-0.09511283040046692,
-0.01891949772834778,
0.014277853071689606,
0.1966533660888672,
0.4198898375034332,
-0.1500144898891449,
0.2137894630432129,
0.2251373827457428,
-0.08515448123216629,
0.03251003101468086,
0.41778767108917236,
0.09839940071105957,
0.1445125788450241,
0.4390137791633606,
-0.48306095600128174,
0.21655088663101196,
-0.017026204615831375,
0.08989553898572922,
0.3064734935760498,
-0.20165102183818817,
0.15136609971523285,
-0.020449340343475342,
0.04433232545852661,
-0.010442204773426056,
-0.04894651472568512,
0.42926034331321716,
-0.4091394245624542,
-0.1859024614095688,
-0.19408053159713745,
0.10886378586292267,
-0.2638857066631317,
-0.15076477825641632,
0.15925286710262299,
-0.2614313066005707,
-0.15270358324050903,
-0.012163784354925156,
0.030574947595596313,
-0.11170302331447601,
0.29809075593948364,
0.00756525993347168,
0.03476911038160324,
-0.5647348165512085,
-0.1965794563293457,
-0.03212390094995499,
0.17874351143836975,
-0.21631667017936707,
0.1116613820195198,
0.4769017696380615,
-0.058898672461509705,
0.24148060381412506,
0.4229544699192047,
0.8144322633743286,
0.4674823582172394,
0.11054566502571106,
0.09844546020030975,
-0.14819201827049255,
-0.12207057327032089,
0.05459725111722946,
0.2485184520483017,
0.0782245621085167,
-0.018047712743282318,
0.16002289950847626,
0.2879994511604309,
-0.24122963845729828,
0.1359817236661911,
-0.31327173113822937,
0.40357115864753723,
-0.2800593376159668,
0.34382739663124084,
-0.1497921645641327,
-0.08232622593641281,
-0.11369279026985168,
-0.1420304775238037,
-0.38994309306144714,
-0.2643568813800812,
0.4423883557319641,
-0.022237421944737434,
-0.005020751617848873,
-0.279730886220932,
0.13907547295093536,
0.25349417328834534,
0.4389813542366028,
0.5304309129714966,
0.1478673666715622,
-0.16626764833927155,
-0.16493794322013855,
-0.33819979429244995,
-0.014589883387088776,
0.1877765655517578,
0.011731250211596489,
-0.05268149450421333,
0.007082467898726463,
0.0034545958042144775,
0.14444762468338013,
0.22380051016807556,
0.025516897439956665,
-0.0267795342952013,
-0.016583621501922607,
-0.16732530295848846,
0.21776016056537628,
0.11333110928535461,
-0.18278633058071136,
0.15743370354175568,
-0.07322590053081512,
0.3254065215587616,
-0.31583210825920105,
0.052201077342033386,
-0.0720129981637001,
0.2291414439678192,
-0.006568890064954758,
-0.1288294494152069,
0.27362221479415894,
0.26711034774780273,
0.2622326612472534,
-0.20441529154777527,
-0.3481524586677551,
-0.15794481337070465,
-0.4199603796005249,
-0.15124022960662842,
0.3158774971961975,
0.0005535818636417389,
0.44923606514930725,
-0.3222914934158325,
-0.3095751702785492,
-0.37715205550193787,
0.3523938059806824,
0.010560519993305206,
0.00919822882860899,
-0.2537619471549988,
0.24379518628120422,
0.11062995344400406,
-0.20976035296916962,
0.12633217871189117,
0.1892317533493042,
0.11670871078968048,
0.18957099318504333,
-0.06196136772632599,
-0.6810804605484009,
0.536567211151123,
-0.05934938043355942,
-0.29223453998565674,
-0.1475885808467865,
0.0034747570753097534,
0.3140942454338074,
-0.27888989448547363,
-0.7688246965408325,
-0.045915067195892334,
0.15038996934890747,
0.1088671088218689,
-0.2036195993423462,
0.14495886862277985,
-0.1340331882238388,
-0.039409738034009933,
-0.24796602129936218,
0.344407320022583,
0.3763144314289093,
-0.1557871401309967,
0.29490625858306885,
-0.017001653090119362
] |
https://github.com/huggingface/datasets/issues/5406 | [2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str` | I just checked on conda at https://anaconda.org/HuggingFace/datasets/files
and everything looks fine, I got
```python
f"ClassLabel expected a value for all label ids [0:{int(label_ids[-1]) + 1}] but some ids are missing."
```
as expected in features.py line 1760 (notice the "int()") to not have the TypeError.
From where on conda did you install `datasets` ? You should use the `HuggingFace` official channel
edit: the conda-forge one [here](https://anaconda.org/conda-forge/datasets/files) seems ok as well | `datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience. | 70 | [2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
I just checked on conda at https://anaconda.org/HuggingFace/datasets/files
and everything looks fine, I got
```python
f"ClassLabel expected a value for all label ids [0:{int(label_ids[-1]) + 1}] but some ids are missing."
```
as expected in features.py line 1760 (notice the "int()") to not have the TypeError.
From where on conda did you install `datasets` ? You should use the `HuggingFace` official channel
edit: the conda-forge one [here](https://anaconda.org/conda-forge/datasets/files) seems ok as well | [
-0.15835687518119812,
-0.05639704316854477,
-0.01046288013458252,
0.23701727390289307,
0.23716716468334198,
0.09276866167783737,
0.14984539151191711,
0.23796384036540985,
-0.10564179718494415,
0.07009120285511017,
-0.3384237587451935,
0.1702401041984558,
-0.028741907328367233,
0.34571924805641174,
-0.2619304955005646,
-0.03603240102529526,
0.0158984437584877,
0.08466688543558121,
-0.09723229706287384,
0.05203505605459213,
-0.2625172734260559,
0.41497987508773804,
-0.22171685099601746,
0.08666206151247025,
-0.42664918303489685,
0.09535147994756699,
-0.023822925984859467,
0.2956726551055908,
-0.22304078936576843,
-0.46323028206825256,
0.4326256513595581,
0.0693817213177681,
0.18500681221485138,
0.4171123802661896,
-0.00011485116556286812,
-0.06381276249885559,
0.33423978090286255,
-0.019969990476965904,
-0.4938831925392151,
-0.33482855558395386,
0.13529738783836365,
-0.039998479187488556,
0.26262208819389343,
0.08177942782640457,
0.08788708597421646,
-0.18165622651576996,
0.014472031965851784,
-0.10297267138957977,
0.10833337157964706,
0.27065885066986084,
0.19975996017456055,
0.2312220185995102,
0.43771255016326904,
-0.34723204374313354,
-0.12170105427503586,
0.338398814201355,
-0.0261482372879982,
0.2315170168876648,
0.0442638024687767,
0.1054685115814209,
0.10744526982307434,
0.31018298864364624,
-0.022204747423529625,
-0.20436380803585052,
0.24860122799873352,
0.1984744817018509,
-0.14587903022766113,
-0.5832147598266602,
0.146095409989357,
0.12978632748126984,
0.24068421125411987,
-0.16065773367881775,
-0.5798625349998474,
-0.26699918508529663,
0.10234925150871277,
-0.1460876762866974,
0.15700818598270416,
0.004139786586165428,
-0.10663753747940063,
0.21337313950061798,
-0.3487815260887146,
-0.17454777657985687,
-0.030236076563596725,
0.04911958426237106,
-0.047756824642419815,
0.033410005271434784,
-0.24535438418388367,
0.016514349728822708,
0.21039994060993195,
-0.3634227514266968,
-0.03852224722504616,
0.22094078361988068,
-0.2408565878868103,
0.0642421618103981,
-0.04077992960810661,
0.050210848450660706,
-0.16317030787467957,
0.00965048372745514,
0.14445161819458008,
-0.04990321397781372,
-0.3925671875476837,
0.11876779794692993,
-0.25308236479759216,
0.07314106822013855,
0.06744235754013062,
0.11007474362850189,
0.4305160641670227,
0.2387060821056366,
0.18785840272903442,
0.06008840352296829,
0.32306820154190063,
-0.08304848521947861,
-0.15755236148834229,
-0.018386216834187508,
-0.06773805618286133,
-0.14993223547935486,
0.09668388217687607,
-0.10144105553627014,
-0.2373792678117752,
0.10817794501781464,
0.08305130153894424,
0.020068757236003876,
0.04572198539972305,
0.3114200532436371,
-0.16005639731884003,
0.15730321407318115,
0.3407047390937805,
0.29627251625061035,
0.2168019711971283,
-0.10956131666898727,
-0.1524369865655899,
-0.02004813402891159,
0.014832783490419388,
-0.034602388739585876,
0.14289091527462006,
-0.5621611475944519,
0.1182512566447258,
0.23429080843925476,
0.3567203879356384,
0.028733737766742706,
-0.4594651758670807,
0.18587850034236908,
0.09338478744029999,
0.35347846150398254,
-0.10226429998874664,
0.2161625325679779,
0.28217434883117676,
-0.3374720811843872,
-0.10181041061878204,
-0.1295572817325592,
-0.4226371645927429,
-0.13721172511577606,
-0.5032395124435425,
0.13262708485126495,
0.13522499799728394,
-0.04453278332948685,
-0.19737112522125244,
-0.09701007604598999,
0.01699061691761017,
-0.264292448759079,
-0.08825982362031937,
-0.18492616713047028,
0.0988435447216034,
-0.14814618229866028,
0.3310624659061432,
0.4277602434158325,
-0.18447524309158325,
-0.282543808221817,
0.14638324081897736,
0.016146639361977577,
0.05069215968251228,
0.09775410592556,
0.0003111101977992803,
-0.16201627254486084,
-0.46597257256507874,
-0.02568195015192032,
0.19690629839897156,
-0.5470320582389832,
-0.17813929915428162,
0.04303266480565071,
0.13221296668052673,
0.11851546913385391,
-0.014990277588367462,
-0.026133988052606583,
0.010169308632612228,
0.035776834934949875,
0.5086780190467834,
-0.10064034163951874,
0.05115728825330734,
-0.18756961822509766,
-0.16762354969978333,
-0.24272623658180237,
-0.014553770422935486,
0.15125620365142822,
-0.023516196757555008,
0.2902597486972809,
-0.05049266666173935,
-0.15194475650787354,
0.16409583389759064,
0.03456846624612808,
0.03388788551092148,
0.21147356927394867,
0.1254175752401352,
0.2384766787290573,
-0.017623957246541977,
-0.15504300594329834,
-0.45997512340545654,
0.11587410420179367,
0.16507981717586517,
0.2781081199645996,
-0.170294389128685,
-0.20417506992816925,
-0.1433749496936798,
-0.031659502536058426,
-0.03621694818139076,
-0.2630141079425812,
0.10494448244571686,
0.0691443681716919,
0.19636909663677216,
0.04502933844923973,
-0.2977231740951538,
0.6862758994102478,
-0.03935021534562111,
0.33182793855667114,
-0.33414551615715027,
0.1519549936056137,
-0.08450938016176224,
-0.1327715963125229,
0.0390220582485199,
0.19702312350273132,
0.19205746054649353,
-0.049723368138074875,
0.006140193901956081,
0.5546910762786865,
-0.07270704209804535,
-0.03957226872444153,
-0.027025088667869568,
-0.0685044676065445,
0.2235008329153061,
0.1666550189256668,
-0.21718929708003998,
-0.22252748906612396,
-0.1010294035077095,
-0.04253338649868965,
-0.07596644014120102,
0.19616800546646118,
-0.01886523887515068,
0.32431501150131226,
0.21538318693637848,
0.30351364612579346,
0.3068435490131378,
0.07710973918437958,
-0.29407525062561035,
-0.4319639503955841,
0.08611391484737396,
-0.20771007239818573,
0.04854899272322655,
0.07796669006347656,
-0.4790053367614746,
0.0876103937625885,
0.4751412272453308,
0.0811719000339508,
0.034065164625644684,
0.44105687737464905,
-0.3504542112350464,
0.24335631728172302,
0.012643706053495407,
0.0600883774459362,
0.2646988034248352,
0.1728195995092392,
-0.1736021339893341,
0.1052098199725151,
-0.052789390087127686,
-0.11200834065675735,
0.12971477210521698,
0.19377408921718597,
-0.06676851958036423,
0.10884085297584534,
0.24966183304786682,
0.2844381630420685,
-0.11397852748632431,
-0.2600027322769165,
-0.41044071316719055,
-0.0010430123656988144,
-0.3944903016090393,
0.008314894512295723,
-0.32299402356147766,
-0.07373227924108505,
0.06445097178220749,
-0.6168550252914429,
-0.46611422300338745,
-0.34828096628189087,
-0.20511962473392487,
0.2241458296775818,
0.09056557714939117,
0.15316911041736603,
-0.024545466527342796,
0.1457136571407318,
-0.06586673110723495,
-0.14264941215515137,
-0.18096548318862915,
0.09787188470363617,
-0.15382367372512817,
-0.01186562143266201,
-0.055729061365127563,
-0.20620563626289368,
0.1742418259382248,
-0.6293773651123047,
0.06403306871652603,
-0.15928827226161957,
-0.47627803683280945,
0.19899064302444458,
-0.23514167964458466,
0.2707664370536804,
0.43945959210395813,
0.12086565792560577,
-0.0666523277759552,
-0.28703075647354126,
0.3615153729915619,
-0.04594750702381134,
-0.19014032185077667,
0.060565285384655,
0.12026333063840866,
-0.11362382769584656,
-0.3153814375400543,
-0.11752314120531082,
-0.3165726065635681,
-0.44254934787750244,
0.5055207014083862,
0.1430579572916031,
0.09163892269134521,
0.36065351963043213,
0.05399424955248833,
0.15469956398010254,
-0.17838768661022186,
0.28713953495025635,
-0.19846917688846588,
-0.34891319274902344,
0.33175963163375854,
-0.21094122529029846,
-0.26478371024131775,
0.030141692608594894,
0.11273805797100067,
0.15595825016498566,
-0.30080312490463257,
-0.24174723029136658,
-0.3715410530567169,
-0.17198488116264343,
0.3791349530220032,
-0.0326148122549057,
0.13786809146404266,
0.2974728047847748,
0.2566203474998474,
-0.10869714617729187,
0.04444607347249985,
-0.1891866773366928,
0.08334680646657944,
-0.11748944967985153,
0.058312319219112396,
0.006139509379863739,
0.18096709251403809,
-0.1918015480041504,
0.03770735114812851,
0.32812830805778503,
-0.10819607973098755,
0.15810784697532654,
-0.08097385615110397,
0.6266667246818542,
-0.32478809356689453,
-0.5553379654884338,
-0.07576176524162292,
-0.12210604548454285,
0.21539603173732758,
-0.018389597535133362,
0.023257577791810036,
0.45286187529563904,
-0.2607216536998749,
0.05651238188147545,
-0.21995356678962708,
-0.1927555352449417,
-0.15806137025356293,
0.19109977781772614,
0.007961466908454895,
-0.07403844594955444,
0.09796825796365738,
-0.10267557203769684,
-0.08212606608867645,
0.07257774472236633,
0.319979190826416,
0.0342656709253788,
-0.00911726150661707,
-0.34137463569641113,
-0.04236224666237831,
-0.4013914167881012,
0.33088013529777527,
0.0811414048075676,
0.37699875235557556,
-0.009114649146795273,
-0.11443321406841278,
-0.12434791028499603,
0.19578462839126587,
0.7300938963890076,
0.047885410487651825,
-0.4396439790725708,
0.21435336768627167,
-0.0658922791481018,
-0.4291251599788666,
-0.006965663284063339,
-0.07641717046499252,
0.13634204864501953,
0.5797496438026428,
0.7338293790817261,
-0.18340730667114258,
-0.23452505469322205,
0.3113017976284027,
0.11188509315252304,
0.008280538022518158,
0.059917304664850235,
-0.2595687508583069,
-0.07477196305990219,
-0.30518049001693726,
-0.2389424741268158,
0.12769876420497894,
0.3847203850746155,
-0.08421080559492111,
-0.027015695348381996,
-0.21381203830242157,
-0.3286327123641968,
0.29159513115882874,
0.01545642502605915,
0.4422733187675476,
-0.05556472763419151,
0.13393032550811768,
0.2862524390220642,
0.1532401442527771,
0.5102471113204956,
0.5450818538665771,
-0.1433960646390915,
-0.48444849252700806,
0.1561065912246704,
-0.0065313670784235,
0.2948176860809326,
0.13316664099693298,
-0.11474480479955673,
-0.009430080652236938,
-0.1469258964061737,
0.35804659128189087,
-0.38881462812423706,
0.12590552866458893,
0.34044525027275085,
0.017251156270503998,
-0.5299279689788818,
-0.2236332893371582,
0.3190084993839264,
0.048505667597055435,
0.07156439125537872,
0.30221879482269287,
0.5841107368469238,
-0.27737122774124146,
-0.01053831446915865,
0.0317503996193409,
0.944840133190155,
0.2595860958099365,
0.11794796586036682,
-0.04645543545484543,
-0.089437335729599,
0.6139381527900696,
0.20351073145866394,
0.07525825500488281,
-0.2545410394668579,
-0.20201629400253296,
-0.1020502895116806,
-0.048047397285699844,
0.11474387347698212,
-0.3244403600692749,
-0.42953968048095703,
0.16822752356529236,
-0.3292427659034729,
-0.12310394644737244,
0.00230427086353302,
0.16840799152851105,
-0.31452715396881104,
-0.3757767975330353,
-0.10254724323749542,
0.11663593351840973,
-0.011977210640907288,
0.2776573896408081,
0.1523917019367218,
0.0076479180715978146,
-0.1986275017261505,
-0.19066131114959717,
-0.4890980124473572,
-0.011707086116075516,
-0.04964097589254379,
0.0833246111869812,
0.5245577692985535,
-0.10686072707176208,
-0.03810834884643555,
0.16018074750900269,
0.6519730091094971,
0.1649438589811325,
-0.14267747104167938,
-0.008440855890512466,
-0.28227972984313965,
-0.07891277223825455,
0.08079927414655685,
0.09483375400304794,
0.14742717146873474,
0.11280364543199539,
0.002298608422279358,
0.05306170880794525,
-0.013040456920862198,
0.011988136917352676,
-0.18825404345989227,
0.005777403712272644,
-0.08687160909175873,
-0.387616366147995,
-0.09313812851905823,
-0.25701653957366943,
0.12156409025192261,
-0.31159156560897827,
0.08522917330265045,
0.051109667867422104,
-0.005372869782149792,
-0.16419029235839844,
0.2066861391067505,
-0.33538246154785156,
-0.17515689134597778,
0.4727896749973297,
-0.22285738587379456,
-0.15898703038692474,
0.42590081691741943,
0.15323081612586975,
-0.19971470534801483,
0.000579148530960083,
0.11359608918428421,
0.24585188925266266,
-0.39981719851493835,
0.14332178235054016,
0.1827595978975296,
-0.10132473707199097,
0.007150758523494005,
0.485652357339859,
0.06943497806787491,
0.10786651074886322,
-0.06546173989772797,
-0.34526529908180237,
-0.37622785568237305,
0.25778889656066895,
-0.15837207436561584,
0.10340367257595062,
-0.02214735932648182,
0.08908793330192566,
0.02616637758910656,
0.011464400216937065,
-0.29520851373672485,
-0.06577388197183609,
-0.34823277592658997,
-0.07022587954998016,
0.2502369284629822,
-0.0029900148510932922,
0.38920292258262634,
-0.18742415308952332,
0.08787765353918076,
0.2808707356452942,
0.0338149331510067,
-0.07740654051303864,
-0.21477118134498596,
0.1063147634267807,
0.023051874712109566,
-0.012081226333975792,
-0.011787155643105507,
0.10821589827537537,
0.01480039581656456,
-0.19484201073646545,
0.07772009074687958,
0.31704002618789673,
0.03520973399281502,
0.29587915539741516,
-0.16793158650398254,
0.08034737408161163,
0.219813272356987,
0.12427530437707901,
0.17367157340049744,
0.3308446407318115,
-0.058312419801950455,
0.0569891594350338,
-0.3671410381793976,
-0.010086767375469208,
0.18374566733837128,
0.3075648248195648,
-0.025698408484458923,
-0.18781796097755432,
0.1886121928691864,
-0.25263911485671997,
0.058809008449316025,
0.12543196976184845,
0.3709867596626282,
0.3631315529346466,
-0.10668383538722992,
-0.03899179399013519,
0.21162524819374084,
0.1622355580329895,
-0.10065314918756485,
-0.2370222955942154,
0.011066069826483727,
0.07352588325738907,
-0.09562293440103531,
0.25391367077827454,
-0.09826857596635818,
0.004591591656208038,
0.07928508520126343,
0.17544808983802795,
0.44406989216804504,
-0.08964761346578598,
0.23980168998241425,
0.19277119636535645,
-0.008212018758058548,
0.09957355260848999,
0.5092445015907288,
0.22087472677230835,
0.1494731307029724,
0.34477007389068604,
-0.4355606436729431,
0.19363172352313995,
-0.0753244087100029,
0.055992528796195984,
0.29810163378715515,
-0.21147440373897552,
0.1427737921476364,
0.0038807839155197144,
0.057374488562345505,
-0.012945279479026794,
-0.17012453079223633,
0.43841710686683655,
-0.5333600640296936,
-0.2991320490837097,
-0.06867477297782898,
0.15027005970478058,
-0.21617239713668823,
-0.14621903002262115,
0.14039278030395508,
-0.23163974285125732,
-0.07440447807312012,
-0.05394424498081207,
0.010127346962690353,
-0.23465682566165924,
0.3832448422908783,
-0.08042316138744354,
-0.03881631791591644,
-0.6851405501365662,
-0.33426332473754883,
0.046147435903549194,
0.19724613428115845,
-0.14963585138320923,
0.15471957623958588,
0.4825500249862671,
-0.12604013085365295,
0.2795174717903137,
0.4425084590911865,
0.8051090240478516,
0.4019785523414612,
0.21994350850582123,
0.06669033318758011,
-0.19077737629413605,
-0.08578944951295853,
0.03841133043169975,
0.24316002428531647,
0.04666846618056297,
-0.12105244398117065,
0.11281074583530426,
0.24088257551193237,
-0.1951570212841034,
0.07570987194776535,
-0.27312782406806946,
0.4945814907550812,
-0.2541797459125519,
0.43261992931365967,
-0.29294613003730774,
-0.11796034127473831,
-0.032143235206604004,
-0.004034377634525299,
-0.3634364902973175,
-0.19068503379821777,
0.3161357343196869,
0.018894346430897713,
-0.0004695802927017212,
-0.18098141252994537,
0.10545136034488678,
0.2127351462841034,
0.456768274307251,
0.5413791537284851,
0.06268778443336487,
-0.10527584701776505,
-0.13845375180244446,
-0.38462287187576294,
-0.1242758110165596,
0.26322153210639954,
-0.014131346717476845,
-0.005462498404085636,
-0.04979708790779114,
0.04040650650858879,
0.09725899249315262,
0.13952866196632385,
0.02402416616678238,
0.00235083419829607,
-0.15533208847045898,
-0.20256999135017395,
0.14830224215984344,
-0.020952977240085602,
-0.14573469758033752,
0.1431315690279007,
-0.03636179491877556,
0.360339492559433,
-0.3131429851055145,
-0.0032274648547172546,
-0.01826096698641777,
0.26589369773864746,
-0.0028272680938243866,
-0.12315124273300171,
0.2089410275220871,
0.2647283971309662,
0.187139630317688,
-0.09836043417453766,
-0.38527578115463257,
-0.12244749069213867,
-0.43084704875946045,
-0.10549946129322052,
0.36078622937202454,
-0.10136553645133972,
0.44561848044395447,
-0.3623587489128113,
-0.38622939586639404,
-0.362855464220047,
0.30048152804374695,
0.07381583005189896,
-0.018359094858169556,
-0.30998095870018005,
0.3394780158996582,
0.04738941788673401,
-0.22444818913936615,
0.284351110458374,
0.2162398099899292,
0.10954669117927551,
0.22150474786758423,
-0.0460185743868351,
-0.5661908984184265,
0.5051103234291077,
-0.17924842238426208,
-0.2520880401134491,
-0.10535372793674469,
0.0028654709458351135,
0.40640684962272644,
-0.27129340171813965,
-0.7703536748886108,
-0.021125979721546173,
0.2188066989183426,
0.06834256649017334,
-0.27458155155181885,
0.1213555783033371,
-0.19194257259368896,
-0.07472999393939972,
-0.2327595204114914,
0.365671306848526,
0.2894737422466278,
-0.13418111205101013,
0.35278546810150146,
0.04089173674583435
] |
https://github.com/huggingface/datasets/issues/5406 | [2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str` | Could you also try this in your notebook ? In case your python kernel doesn't match the `pip` environment in your shell
```python
import datasets; datasets.__version__
```
and
```
!which python
```
```python
import sys; sys.executable
``` | `datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience. | 37 | [2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
Could you also try this in your notebook ? In case your python kernel doesn't match the `pip` environment in your shell
```python
import datasets; datasets.__version__
```
and
```
!which python
```
```python
import sys; sys.executable
``` | [
-0.3279578387737274,
-0.19580914080142975,
-0.03432777523994446,
0.16157463192939758,
0.23252519965171814,
0.09833017736673355,
0.059830378741025925,
0.29804548621177673,
-0.03190207853913307,
0.19195975363254547,
-0.29935744404792786,
0.322247713804245,
-0.00861781369894743,
0.2766525149345398,
-0.20445090532302856,
-0.08322225511074066,
0.008953571319580078,
0.1561707854270935,
-0.038247250020504,
0.12349146604537964,
-0.2697807550430298,
0.4400778114795685,
-0.2730179727077484,
0.13944533467292786,
-0.3464301824569702,
0.009420882910490036,
0.1133725494146347,
0.3457100987434387,
-0.28368139266967773,
-0.39959755539894104,
0.3012000024318695,
0.043235696852207184,
0.20902417600154877,
0.4024524688720703,
-0.00010913262667600065,
-0.03968053683638573,
0.4002372622489929,
-0.018040407449007034,
-0.3891771733760834,
-0.400970995426178,
0.2137676179409027,
-0.10211313515901566,
0.3349106013774872,
-0.009443484246730804,
0.10436607152223587,
-0.14371417462825775,
0.1584836095571518,
-0.11082026362419128,
0.15994226932525635,
0.27988922595977783,
0.2541007399559021,
0.36855125427246094,
0.4678232669830322,
-0.4144503176212311,
0.014064155519008636,
0.2431885153055191,
-0.07059503346681595,
0.1429501473903656,
0.14927926659584045,
0.10441312193870544,
0.12859536707401276,
0.2983320653438568,
-0.07794482260942459,
-0.13836927711963654,
0.28462716937065125,
0.22025488317012787,
-0.12828335165977478,
-0.5485377311706543,
0.13527527451515198,
0.17887020111083984,
0.18930822610855103,
-0.22295287251472473,
-0.41430407762527466,
-0.10936268419027328,
0.07016211003065109,
-0.08932287245988846,
0.20658859610557556,
0.1144489049911499,
-0.16154257953166962,
0.16987475752830505,
-0.28429266810417175,
-0.18862660229206085,
-0.028331253677606583,
0.14190712571144104,
-0.02774617448449135,
0.01022087037563324,
-0.17330269515514374,
0.01104370504617691,
0.2926265299320221,
-0.3329152464866638,
0.030938059091567993,
0.20121949911117554,
-0.2397519052028656,
-0.04804736748337746,
-0.02197382226586342,
0.0654219388961792,
-0.14056885242462158,
0.11683465540409088,
0.05352930724620819,
-0.07797715812921524,
-0.17426949739456177,
0.19566383957862854,
-0.1447019875049591,
0.16480803489685059,
0.023464825004339218,
0.08651505410671234,
0.19474637508392334,
0.2656104862689972,
0.351965069770813,
0.2034900039434433,
0.23362326622009277,
-0.14043059945106506,
-0.08899451047182083,
-0.09436745196580887,
-0.07686960697174072,
-0.16507557034492493,
0.27517181634902954,
-0.032784271985292435,
-0.31282249093055725,
0.06783093512058258,
0.07089787721633911,
0.07888644188642502,
0.052096303552389145,
0.3413134217262268,
-0.22850418090820312,
0.04733343422412872,
0.4289524555206299,
0.2569766640663147,
0.04997415840625763,
-0.02753719687461853,
-0.11863713711500168,
0.12844331562519073,
-0.04609472304582596,
-0.1058264970779419,
0.18002396821975708,
-0.438281774520874,
0.041412919759750366,
0.3259917199611664,
0.4166458249092102,
0.0494014173746109,
-0.24439211189746857,
0.05626166984438896,
0.01303834468126297,
0.32014569640159607,
0.13162660598754883,
0.12065780907869339,
0.1957097202539444,
-0.35570335388183594,
-0.08537431061267853,
0.018086444586515427,
-0.32495689392089844,
-0.1681388020515442,
-0.49727165699005127,
0.20206603407859802,
0.16102473437786102,
-0.04659612476825714,
-0.27327513694763184,
-0.15146248042583466,
-0.07221395522356033,
-0.27744901180267334,
-0.12299790233373642,
-0.24389947950839996,
0.17143216729164124,
-0.15106697380542755,
0.26965799927711487,
0.296902060508728,
-0.17976133525371552,
-0.11383624374866486,
-0.06442940980195999,
0.05441708862781525,
0.05859265476465225,
0.17898283898830414,
0.001981498673558235,
-0.1958748698234558,
-0.43867501616477966,
0.08376039564609528,
0.29828697443008423,
-0.585720956325531,
-0.2211558222770691,
0.09846734255552292,
0.039066508412361145,
0.018854187801480293,
0.024440869688987732,
0.054058000445365906,
-0.02900782600045204,
0.19189943373203278,
0.3424828052520752,
0.059062112122774124,
0.0533343106508255,
-0.10452378541231155,
-0.18524640798568726,
-0.23389974236488342,
-0.05523215979337692,
0.1606493443250656,
0.07258379459381104,
0.12687617540359497,
-0.019575566053390503,
0.040313947945833206,
0.21983104944229126,
-0.018338825553655624,
0.044334836304187775,
0.21907058358192444,
0.19832320511341095,
0.23211827874183655,
-0.03146665170788765,
-0.22369670867919922,
-0.32013511657714844,
0.041107259690761566,
0.04778968542814255,
0.27979177236557007,
-0.17697785794734955,
-0.2325543612241745,
-0.14809513092041016,
-0.11937606334686279,
-0.06385305523872375,
-0.0920356959104538,
0.1941613405942917,
0.061291977763175964,
0.11820830404758453,
0.06509415805339813,
-0.2629706859588623,
0.5410584211349487,
-0.07104853540658951,
0.3390847146511078,
-0.4167236387729645,
0.20050190389156342,
-0.22604776918888092,
-0.229405477643013,
-0.0250258669257164,
0.0793745219707489,
0.09968811273574829,
0.05239863321185112,
0.055383551865816116,
0.554770827293396,
-0.0525863952934742,
0.08295302838087082,
-0.09890872985124588,
-0.10338659584522247,
0.1886650174856186,
0.0037666596472263336,
-0.08231499046087265,
-0.00869147852063179,
-0.0309784933924675,
0.05783045291900635,
-0.11319448798894882,
0.1700281947851181,
-0.03820686414837837,
0.19859063625335693,
0.2826612591743469,
0.23033124208450317,
0.30386218428611755,
0.02971874549984932,
-0.29605698585510254,
-0.47298479080200195,
0.18046125769615173,
-0.13815248012542725,
-0.016528919339179993,
-0.03649602085351944,
-0.4934205412864685,
-0.04213709384202957,
0.45848676562309265,
0.1464589536190033,
0.1703076958656311,
0.43057674169540405,
-0.2589321732521057,
0.25386708974838257,
-0.056432031095027924,
0.057885874062776566,
0.2056494802236557,
0.2756504714488983,
-0.15001580119132996,
0.20124505460262299,
-0.021899249404668808,
-0.17544160783290863,
0.15953384339809418,
0.20617367327213287,
-0.14004501700401306,
0.19965416193008423,
0.23073144257068634,
0.1536262035369873,
-0.2200828492641449,
-0.2895231544971466,
-0.33580929040908813,
0.0024020597338676453,
-0.37935683131217957,
-0.08684103935956955,
-0.39775389432907104,
-0.11891049891710281,
0.13235336542129517,
-0.4927632212638855,
-0.3618256151676178,
-0.2645876705646515,
-0.16717010736465454,
0.4362201392650604,
0.156036838889122,
0.11081722378730774,
0.051894012838602066,
0.13557882606983185,
-0.031517721712589264,
-0.09541996568441391,
-0.17723357677459717,
0.14885424077510834,
-0.10308516770601273,
0.09909641742706299,
0.031225457787513733,
-0.07908347249031067,
0.2219945341348648,
-0.6548555493354797,
0.06280302256345749,
-0.27377352118492126,
-0.38801875710487366,
0.16630414128303528,
-0.2949947118759155,
0.3217369019985199,
0.4299595057964325,
0.13527092337608337,
-0.2154986560344696,
-0.2684664726257324,
0.373470276594162,
-0.1494366079568863,
-0.2151186466217041,
0.11159393191337585,
0.10650967806577682,
-0.23731383681297302,
-0.2590312361717224,
-0.17352354526519775,
-0.3532154858112335,
-0.5669293999671936,
0.46074599027633667,
0.10897693037986755,
0.09967806935310364,
0.3169756531715393,
0.007828920148313046,
0.1341206133365631,
-0.03199007734656334,
0.24345090985298157,
-0.16405172646045685,
-0.1823771595954895,
0.4000713527202606,
-0.3097851276397705,
-0.28617456555366516,
0.1878143846988678,
0.1431003212928772,
0.09282520413398743,
-0.2532864809036255,
-0.29751056432724,
-0.4081766903400421,
-0.3031015992164612,
0.2936173975467682,
-0.033563002943992615,
0.16621403396129608,
0.22309444844722748,
0.15258380770683289,
-0.1781160682439804,
0.04516436904668808,
-0.17557738721370697,
0.030980706214904785,
-0.0018612928688526154,
0.052515652030706406,
0.11567919701337814,
0.24040091037750244,
-0.1519738733768463,
-0.006684429943561554,
0.34527966380119324,
0.046189289540052414,
0.29703032970428467,
-0.1484738439321518,
0.5737247467041016,
-0.4349380433559418,
-0.5242446660995483,
-0.2057746797800064,
-0.12124016880989075,
0.11718621850013733,
-0.003916345536708832,
-0.05129136145114899,
0.4025276303291321,
-0.27152305841445923,
0.08413553237915039,
-0.19986885786056519,
-0.19606927037239075,
-0.09774355590343475,
0.281528115272522,
0.07335492968559265,
-0.1485469788312912,
0.05696108192205429,
0.015774518251419067,
-0.23191994428634644,
0.11154156923294067,
0.4013776183128357,
-0.01184418797492981,
-0.06348145753145218,
-0.2830275893211365,
-0.07731042802333832,
-0.4310750961303711,
0.43386662006378174,
0.06149822473526001,
0.3760017156600952,
-0.19507738947868347,
-0.11374828219413757,
-0.02711598575115204,
0.16928766667842865,
0.5841571092605591,
-0.07779344916343689,
-0.3641732335090637,
0.240693598985672,
-0.14614498615264893,
-0.5038005709648132,
-0.014535743743181229,
-0.22211593389511108,
0.15165802836418152,
0.44838789105415344,
0.6095173358917236,
-0.14193110167980194,
-0.15535545349121094,
0.37271377444267273,
0.10866730660200119,
-0.05230862647294998,
0.048761773854494095,
-0.25701501965522766,
-0.1742362082004547,
-0.3588223457336426,
-0.20990487933158875,
0.22682322561740875,
0.38133877515792847,
0.04271673411130905,
-0.09700450301170349,
-0.1963103860616684,
-0.29753220081329346,
0.36733710765838623,
0.028980541974306107,
0.5340888500213623,
-0.06570201367139816,
0.04920713230967522,
0.11840309202671051,
0.06633348762989044,
0.4949389398097992,
0.4918317198753357,
-0.20035511255264282,
-0.41290658712387085,
0.163563072681427,
-0.11771046370267868,
0.187303364276886,
0.1473018378019333,
-0.13261836767196655,
0.14667969942092896,
-0.031154748052358627,
0.3083100914955139,
-0.3485553562641144,
0.12495726346969604,
0.4040123522281647,
0.010281992144882679,
-0.4045991599559784,
-0.22993214428424835,
0.2457927167415619,
0.14625369012355804,
0.08453327417373657,
0.1616625189781189,
0.4553927183151245,
-0.3453442454338074,
0.09654886275529861,
0.021654464304447174,
0.9625713229179382,
0.1925806999206543,
0.12839816510677338,
0.004618149250745773,
-0.025808796286582947,
0.4004220962524414,
0.09512779116630554,
0.15003567934036255,
-0.3030949831008911,
-0.2624075412750244,
-0.11540471017360687,
-0.026475759223103523,
0.13653291761875153,
-0.36717259883880615,
-0.5817182064056396,
0.13881659507751465,
-0.25658488273620605,
-0.1480855494737625,
-0.100665383040905,
0.22984689474105835,
-0.45669248700141907,
-0.3070456385612488,
-0.1955307126045227,
0.19146281480789185,
-0.044943518936634064,
0.12308436632156372,
0.11002395302057266,
0.04165461286902428,
-0.1885770857334137,
-0.2052057683467865,
-0.5032432675361633,
-0.05866720899939537,
-0.07719039171934128,
0.19561806321144104,
0.2807149291038513,
-0.17674565315246582,
-0.047317758202552795,
0.18613308668136597,
0.5144763588905334,
0.23928692936897278,
-0.08164051175117493,
-0.042049046605825424,
-0.24103504419326782,
-0.216389000415802,
0.020544489845633507,
0.10047507286071777,
0.13131485879421234,
-0.013688500970602036,
-0.058292288333177567,
0.07237124443054199,
0.1019086167216301,
-0.11513333767652512,
-0.1147121787071228,
0.003767453134059906,
0.061305124312639236,
-0.3958917260169983,
-0.18356791138648987,
-0.3845568597316742,
-0.033711954951286316,
-0.30663812160491943,
0.13671720027923584,
-0.01512233167886734,
-0.034285061061382294,
-0.04892557114362717,
0.29355180263519287,
-0.35820820927619934,
-0.14301952719688416,
0.4401806592941284,
-0.2017122507095337,
-0.18705405294895172,
0.360455185174942,
0.3014747202396393,
-0.28742462396621704,
-0.07239982485771179,
0.2505131661891937,
0.2058025300502777,
-0.29525697231292725,
0.2832711338996887,
0.1883808821439743,
-0.05774413049221039,
0.017236195504665375,
0.5578150749206543,
0.17533919215202332,
0.14704999327659607,
-0.21529588103294373,
-0.3473844528198242,
-0.3713591396808624,
0.3449205160140991,
-0.020948242396116257,
0.2323508858680725,
0.07442808151245117,
-0.1069021075963974,
0.09162024408578873,
-0.11524748802185059,
-0.3810410797595978,
0.017228608950972557,
-0.3816494941711426,
0.018388569355010986,
0.17537331581115723,
-0.10063064843416214,
0.32673218846321106,
-0.1511063575744629,
0.1585402488708496,
0.2520997226238251,
-0.0094830933958292,
-0.1901746690273285,
-0.1617366224527359,
0.07483692467212677,
-0.09000968188047409,
-0.07267430424690247,
-0.08313247561454773,
0.011441562324762344,
0.013056193478405476,
-0.208070769906044,
0.07547499239444733,
0.3518872857093811,
-0.01747605949640274,
0.2553865611553192,
-0.11199146509170532,
-0.11501237004995346,
0.22269515693187714,
0.1064690500497818,
0.0724443569779396,
0.3355786204338074,
-0.09025394916534424,
0.09025547653436661,
-0.17837537825107574,
-0.027650289237499237,
0.29243457317352295,
0.16283588111400604,
0.17023736238479614,
-0.17424491047859192,
0.14246916770935059,
-0.20777852833271027,
0.0030478201806545258,
0.08987485617399216,
0.4290388226509094,
0.3763216435909271,
-0.14343522489070892,
-0.05571579933166504,
0.12310831248760223,
0.23934802412986755,
-0.09415163099765778,
-0.2025928944349289,
0.07300624251365662,
-0.028243783861398697,
-0.07970369607210159,
0.2325381338596344,
-0.07222515344619751,
0.020253770053386688,
-0.0849490612745285,
0.25190800428390503,
0.44606131315231323,
-0.14084240794181824,
0.19953304529190063,
0.2228325605392456,
-0.04884271323680878,
0.06689567118883133,
0.4054297208786011,
0.20926281809806824,
0.15799587965011597,
0.41728198528289795,
-0.43606799840927124,
0.22088578343391418,
-0.023436248302459717,
0.15281814336776733,
0.2720990478992462,
-0.24573534727096558,
0.09649433940649033,
-0.0522177517414093,
0.04812658578157425,
0.03966636210680008,
-0.03465670347213745,
0.36080795526504517,
-0.4315733313560486,
-0.16582216322422028,
-0.19560161232948303,
0.07930110394954681,
-0.2729918360710144,
-0.14573456346988678,
0.12894241511821747,
-0.2635972201824188,
-0.21903939545154572,
-0.0507270023226738,
0.050983726978302,
-0.06873950362205505,
0.2476213127374649,
0.08708208054304123,
0.051838651299476624,
-0.4649965763092041,
-0.21430492401123047,
-0.003243662416934967,
0.16188636422157288,
-0.3097683787345886,
0.06620385497808456,
0.40679752826690674,
-0.020592287182807922,
0.1818731278181076,
0.5183517336845398,
0.8159440159797668,
0.42343878746032715,
-0.03404949605464935,
0.14632242918014526,
-0.15343190729618073,
-0.09522552043199539,
0.06335558742284775,
0.20084233582019806,
0.10472855716943741,
0.11385232210159302,
0.10149294137954712,
0.28963154554367065,
-0.22416532039642334,
0.09997039288282394,
-0.335748553276062,
0.333633691072464,
-0.2621724605560303,
0.3469783067703247,
-0.1256485879421234,
-0.07671697437763214,
-0.0661131888628006,
-0.15886825323104858,
-0.4989236891269684,
-0.25784748792648315,
0.4403187036514282,
-0.05699709802865982,
-0.031618811190128326,
-0.2565711438655853,
0.1359507143497467,
0.18508164584636688,
0.42281079292297363,
0.5525698065757751,
0.19652003049850464,
-0.21432562172412872,
-0.19451355934143066,
-0.3495127558708191,
-0.011837497353553772,
0.1684769243001938,
-0.12579423189163208,
-0.003196842037141323,
-0.027290649712085724,
-0.029965341091156006,
0.1643286794424057,
0.2283937931060791,
-0.026611203327775,
-0.09587331861257553,
0.08795514702796936,
-0.18864195048809052,
0.19295287132263184,
0.2512286305427551,
-0.23262208700180054,
0.13253609836101532,
-0.08427523076534271,
0.29232579469680786,
-0.3324286937713623,
0.03760012239217758,
-0.12536665797233582,
0.13868896663188934,
0.06252886354923248,
-0.1305588185787201,
0.3268573582172394,
0.23133225739002228,
0.3306092917919159,
-0.23699751496315002,
-0.3575645089149475,
-0.09971269965171814,
-0.4060972332954407,
-0.193473219871521,
0.35199132561683655,
-0.004276558756828308,
0.47116729617118835,
-0.36039257049560547,
-0.3274296224117279,
-0.36657005548477173,
0.3809767961502075,
-0.023670535534620285,
-0.08426567167043686,
-0.24263311922550201,
0.16308268904685974,
0.053268514573574066,
-0.18484719097614288,
0.18024177849292755,
0.17842447757720947,
0.16314834356307983,
0.21415236592292786,
-0.07612375915050507,
-0.731667160987854,
0.44296175241470337,
-0.026950683444738388,
-0.2701691687107086,
-0.19188806414604187,
0.013481080532073975,
0.25625649094581604,
-0.19436439871788025,
-0.6870697736740112,
-0.06102817878127098,
0.12101420760154724,
0.06914006173610687,
-0.2123422622680664,
0.17020462453365326,
-0.14087283611297607,
-0.03613100200891495,
-0.2479167878627777,
0.27019643783569336,
0.3103208839893341,
-0.1359567940235138,
0.14376387000083923,
-0.12334790825843811
] |
https://github.com/huggingface/datasets/issues/5406 | [2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str` | Mmmm, just a potential clue:
Where are you running your Python code? Is it the Spyder IDE?
I have recently seen some users reporting conflicting Python environments while using Spyder...
Maybe related:
- #5487 | `datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience. | 34 | [2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
Mmmm, just a potential clue:
Where are you running your Python code? Is it the Spyder IDE?
I have recently seen some users reporting conflicting Python environments while using Spyder...
Maybe related:
- #5487 | [
-0.29983484745025635,
-0.09081178903579712,
-0.0404607430100441,
0.13161751627922058,
0.20251797139644623,
-0.00621776282787323,
0.12956039607524872,
0.2817309498786926,
0.10443757474422455,
0.15001168847084045,
-0.3052215576171875,
0.2753986418247223,
-0.0435800701379776,
0.34281623363494873,
-0.29206153750419617,
-0.13160823285579681,
0.04162383824586868,
0.0929311215877533,
-0.11248208582401276,
0.12232492864131927,
-0.2279719114303589,
0.4428473114967346,
-0.1800694763660431,
0.1377217024564743,
-0.41296833753585815,
0.11607393622398376,
0.07181805372238159,
0.37200894951820374,
-0.2700665295124054,
-0.4302773177623749,
0.34080275893211365,
0.03068453259766102,
0.17904165387153625,
0.5497190952301025,
-0.0001093801183742471,
0.02955593168735504,
0.3605116009712219,
0.02931937761604786,
-0.447006493806839,
-0.37750738859176636,
0.27603858709335327,
-0.08869333565235138,
0.4292218089103699,
0.049521587789058685,
0.0388568714261055,
-0.12316525727510452,
0.11770353466272354,
-0.17871326208114624,
0.20168669521808624,
0.29762768745422363,
0.2646658420562744,
0.4054908752441406,
0.3282678723335266,
-0.44350454211235046,
-0.04205220937728882,
0.2326490432024002,
-0.08541037887334824,
0.13763177394866943,
0.09733612090349197,
0.1431862711906433,
0.021826602518558502,
0.2824140191078186,
-0.05766977742314339,
-0.1684626340866089,
0.2061564326286316,
0.23044444620609283,
0.04097902402281761,
-0.5580252408981323,
0.16538971662521362,
0.14868725836277008,
0.20835083723068237,
-0.18929746747016907,
-0.47974273562431335,
-0.12037815153598785,
-0.028127770870923996,
-0.09042846411466599,
0.2342471480369568,
0.07836530357599258,
-0.13123659789562225,
0.20593015849590302,
-0.2504807114601135,
-0.1559767872095108,
0.06256085634231567,
0.08853883296251297,
-0.11971735954284668,
0.04210928454995155,
-0.19242599606513977,
0.03453855216503143,
0.20422668755054474,
-0.3382806181907654,
0.033461861312389374,
0.106221042573452,
-0.2724822461605072,
-0.10644568502902985,
-0.04310993477702141,
0.07677848637104034,
-0.12001214176416397,
0.03778418153524399,
-0.014117669314146042,
0.025642726570367813,
-0.25428327918052673,
0.19335532188415527,
-0.23887892067432404,
0.12593376636505127,
0.15224865078926086,
0.12600542604923248,
0.21127894520759583,
0.24548979103565216,
0.3243946433067322,
0.058664701879024506,
0.21108347177505493,
-0.05376996099948883,
-0.001028384198434651,
-0.1031157597899437,
-0.011299272999167442,
-0.1763962209224701,
0.2390270084142685,
-0.08384884893894196,
-0.3230079710483551,
0.17218054831027985,
0.08764932304620743,
0.010693557560443878,
0.0161463413387537,
0.32363611459732056,
-0.1312011033296585,
0.09389601647853851,
0.34212368726730347,
0.3679547905921936,
0.04127511382102966,
0.03243185579776764,
-0.1974431872367859,
0.12612977623939514,
-0.09055356681346893,
-0.11804375797510147,
0.08909302949905396,
-0.46723636984825134,
0.08168692886829376,
0.39788058400154114,
0.3803369402885437,
-0.013535026460886002,
-0.27851930260658264,
0.10665574669837952,
-0.07202880829572678,
0.3195127248764038,
0.09839202463626862,
0.18023395538330078,
0.23275651037693024,
-0.37070220708847046,
-0.07193177938461304,
-0.032898321747779846,
-0.3432002067565918,
-0.18451090157032013,
-0.5898336172103882,
0.21438416838645935,
0.03820327669382095,
-0.016744010150432587,
-0.202484130859375,
-0.13777172565460205,
-0.09292414039373398,
-0.24831140041351318,
-0.1336425244808197,
-0.30832886695861816,
0.17489448189735413,
-0.13127712905406952,
0.21525053679943085,
0.36812371015548706,
-0.20718494057655334,
-0.06579817086458206,
-0.02132449857890606,
-0.016167260706424713,
0.11181145906448364,
0.20424756407737732,
-0.05091160908341408,
-0.2742650806903839,
-0.4279636740684509,
0.04028201848268509,
0.25153622031211853,
-0.4999600648880005,
-0.1499762237071991,
0.11886060237884521,
-0.0496838316321373,
0.18695670366287231,
0.045208342373371124,
0.012543430551886559,
-0.20924778282642365,
0.1319558024406433,
0.21692383289337158,
-0.0024439897388219833,
0.1000303328037262,
-0.02413412369787693,
-0.21390792727470398,
-0.26479220390319824,
0.09229521453380585,
0.1389310359954834,
0.10892292857170105,
0.1023452952504158,
-0.0671338215470314,
0.05483769625425339,
0.15423528850078583,
0.01719004288315773,
0.00708793755620718,
0.18414375185966492,
0.11843948066234589,
0.22103025019168854,
-0.05399787798523903,
-0.18629413843154907,
-0.40011218190193176,
0.06549552083015442,
0.09679374098777771,
0.2938004434108734,
-0.10457967221736908,
-0.22175176441669464,
-0.1264183521270752,
-0.05188647285103798,
-0.15865586698055267,
-0.23709791898727417,
0.18740752339363098,
0.13052600622177124,
0.15369325876235962,
-0.005976468324661255,
-0.27658092975616455,
0.4443785846233368,
-0.025563957169651985,
0.26899510622024536,
-0.32987797260284424,
0.20334945619106293,
-0.2250780612230301,
-0.22442218661308289,
-0.0586201511323452,
0.09426072239875793,
0.09897487610578537,
0.04988069459795952,
-0.016998864710330963,
0.5546581745147705,
0.009874247014522552,
0.11564286798238754,
-0.018539495766162872,
-0.08131729066371918,
0.19426748156547546,
0.01028590276837349,
-0.006609844043850899,
0.12053966522216797,
-0.11252199858427048,
0.02247139811515808,
-0.14101049304008484,
0.1386711746454239,
-0.022015895694494247,
0.30212289094924927,
0.24174003303050995,
0.15407221019268036,
0.3231661021709442,
0.02700890228152275,
-0.22571024298667908,
-0.45971861481666565,
0.1402028650045395,
-0.19546520709991455,
0.0649462640285492,
0.07419779896736145,
-0.42263826727867126,
0.04724771901965141,
0.4579974412918091,
0.1795485019683838,
0.1626814752817154,
0.443250834941864,
-0.20062485337257385,
0.13259947299957275,
-0.14465953409671783,
0.018534962087869644,
0.24506327509880066,
0.19996467232704163,
-0.06324779987335205,
0.17169897258281708,
-0.050543174147605896,
-0.18724538385868073,
0.14374777674674988,
0.2295806109905243,
-0.20559382438659668,
0.227107971906662,
0.2962031960487366,
0.14122480154037476,
-0.21636781096458435,
-0.2939377725124359,
-0.3496813476085663,
0.010609639808535576,
-0.32985591888427734,
-0.02405477873980999,
-0.39788904786109924,
-0.015658129006624222,
0.0932430624961853,
-0.46671074628829956,
-0.3997851610183716,
-0.3271910846233368,
-0.1391550898551941,
0.4166359007358551,
0.018794968724250793,
0.06549853086471558,
-0.0662338063120842,
0.06352916359901428,
-0.07515709102153778,
-0.036965809762477875,
-0.12848660349845886,
0.1617710143327713,
-0.11155024915933609,
0.04939417168498039,
0.10377241671085358,
-0.09725072234869003,
0.2080565094947815,
-0.5763707160949707,
-0.034380897879600525,
-0.3665286898612976,
-0.4491439759731293,
0.1839291751384735,
-0.20170463621616364,
0.40243569016456604,
0.43248695135116577,
0.10356555879116058,
-0.16920191049575806,
-0.41039642691612244,
0.4054867923259735,
-0.09474732726812363,
-0.18053372204303741,
0.06442166864871979,
0.11001893877983093,
-0.20201456546783447,
-0.26511839032173157,
-0.2026008665561676,
-0.35070809721946716,
-0.5711736083030701,
0.40422797203063965,
0.08855023980140686,
0.11558999121189117,
0.22385255992412567,
0.027658849954605103,
0.10155662149190903,
-0.11676034331321716,
0.2687028646469116,
-0.20164147019386292,
-0.2859272062778473,
0.31541314721107483,
-0.32729560136795044,
-0.22129155695438385,
0.08839203417301178,
0.043144382536411285,
0.11193878948688507,
-0.35212212800979614,
-0.3043596148490906,
-0.44145771861076355,
-0.3707888424396515,
0.2943502962589264,
0.06083838641643524,
0.10271675884723663,
0.16452211141586304,
0.17736011743545532,
-0.1789463460445404,
0.03625006228685379,
-0.19126088917255402,
0.0932353287935257,
0.005363365635275841,
-0.00618927925825119,
0.06719666719436646,
0.17871850728988647,
-0.18254263699054718,
0.1282080113887787,
0.36222702264785767,
0.03517860174179077,
0.29031193256378174,
-0.0664002001285553,
0.5844859480857849,
-0.523162841796875,
-0.48127472400665283,
-0.2727430462837219,
-0.1512070894241333,
0.140109121799469,
0.02814197540283203,
-0.028799470514059067,
0.3753928244113922,
-0.23374561965465546,
0.011224839836359024,
-0.15753313899040222,
-0.2321576476097107,
-0.0845334380865097,
0.25901299715042114,
0.008279316127300262,
-0.16618970036506653,
0.0683884546160698,
-0.014645363204181194,
-0.14507707953453064,
0.11827152967453003,
0.3636122941970825,
0.0030894726514816284,
0.00892390962690115,
-0.36540117859840393,
-0.1313219517469406,
-0.3267529010772705,
0.35563889145851135,
0.08882898092269897,
0.3332013785839081,
-0.15437324345111847,
-0.14865991473197937,
-0.004695534706115723,
0.12056636810302734,
0.5530649423599243,
-0.008557436987757683,
-0.36972856521606445,
0.18572184443473816,
-0.3061380982398987,
-0.43106719851493835,
-0.08569604158401489,
-0.1547105610370636,
0.18912670016288757,
0.4522218704223633,
0.6005369424819946,
-0.19868344068527222,
-0.24410834908485413,
0.4161626994609833,
0.11379655450582504,
0.0010557733476161957,
0.0694894790649414,
-0.2447240948677063,
-0.12554603815078735,
-0.34841176867485046,
-0.20968738198280334,
0.20344649255275726,
0.35373276472091675,
-0.07382246851921082,
-0.11043062806129456,
-0.12322089076042175,
-0.2236941158771515,
0.3840945363044739,
0.012444578111171722,
0.5225781202316284,
-0.10941196978092194,
0.08840227127075195,
0.16751618683338165,
0.04834611713886261,
0.40442344546318054,
0.6282174587249756,
-0.16391518712043762,
-0.37098428606987,
0.24078315496444702,
-0.08643433451652527,
0.18777722120285034,
0.2691623568534851,
-0.0622888021171093,
0.21027535200119019,
-0.17015373706817627,
0.31934821605682373,
-0.2833566665649414,
0.1442626416683197,
0.4846538305282593,
0.017083924263715744,
-0.3010684847831726,
-0.21976754069328308,
0.27512526512145996,
0.08964280784130096,
0.07596226036548615,
0.15430018305778503,
0.4748305678367615,
-0.2073291540145874,
0.1773068904876709,
-0.04620080441236496,
0.961150050163269,
0.30528193712234497,
0.18068327009677887,
0.04756487160921097,
0.016977787017822266,
0.4067707657814026,
0.12493537366390228,
0.08470752835273743,
-0.30175191164016724,
-0.21186740696430206,
-0.04870656132698059,
-0.06911855936050415,
0.0928969457745552,
-0.3870880603790283,
-0.4587995707988739,
0.16805791854858398,
-0.41371089220046997,
-0.06955137848854065,
-0.06378918886184692,
0.2939431965351105,
-0.4657478928565979,
-0.22929173707962036,
-0.07541891932487488,
0.18056043982505798,
-0.035367198288440704,
0.16161823272705078,
0.1181749477982521,
-0.012995122000575066,
-0.10332196950912476,
-0.2132573276758194,
-0.5150952339172363,
0.01871427521109581,
0.09374326467514038,
0.2172989696264267,
0.3116164207458496,
-0.1436075121164322,
-0.03863520175218582,
0.11552365124225616,
0.4192512631416321,
0.22916173934936523,
-0.00925825722515583,
-0.030869778245687485,
-0.21352678537368774,
-0.11304792016744614,
0.03248777985572815,
0.08618029952049255,
0.13882462680339813,
0.03651992231607437,
-0.1076856181025505,
0.09705761820077896,
0.012857633642852306,
-0.09456305205821991,
-0.1991293728351593,
0.004628725349903107,
0.0807490199804306,
-0.36368560791015625,
-0.1631932258605957,
-0.3395528197288513,
-0.06937417387962341,
-0.31080129742622375,
0.15409427881240845,
-0.015465088188648224,
0.01122401561588049,
-0.053681276738643646,
0.27008378505706787,
-0.4167075753211975,
-0.1789514422416687,
0.4474300146102905,
-0.17166560888290405,
-0.170110821723938,
0.4697487950325012,
0.27233263850212097,
-0.30560070276260376,
-0.07890237867832184,
0.14024168252944946,
0.21967051923274994,
-0.28561314940452576,
0.3289046287536621,
0.13239678740501404,
-0.13734638690948486,
0.08219160884618759,
0.4540771543979645,
0.17661833763122559,
0.17706704139709473,
-0.24428893625736237,
-0.350341796875,
-0.25016698241233826,
0.2144738882780075,
-0.040435273200273514,
0.30367809534072876,
0.018650997430086136,
-0.08764894306659698,
0.036495640873909,
-0.03285662829875946,
-0.37392449378967285,
-0.0233322661370039,
-0.3549414575099945,
0.060212716460227966,
0.1443856656551361,
-0.07727218419313431,
0.3024361729621887,
-0.09700983762741089,
0.15116682648658752,
0.24249008297920227,
-0.0689195916056633,
-0.1769580841064453,
-0.23368661105632782,
0.08277059346437454,
-0.05566859990358353,
-0.11869633942842484,
0.03886774927377701,
0.03144935518503189,
0.1027374267578125,
-0.23409929871559143,
0.14737194776535034,
0.3957051634788513,
-0.042927369475364685,
0.128561332821846,
-0.17479518055915833,
-0.1521712839603424,
0.23075012862682343,
0.05525766313076019,
0.11292218416929245,
0.32439833879470825,
-0.09049253910779953,
0.11011110246181488,
-0.2302931398153305,
-0.08732889592647552,
0.40955713391304016,
0.19510582089424133,
0.04637798294425011,
-0.011059928685426712,
0.06576968729496002,
-0.20273055136203766,
-0.0007029585540294647,
0.06241105496883392,
0.38556140661239624,
0.38163790106773376,
-0.14103546738624573,
-0.05896875262260437,
0.13837772607803345,
0.22957320511341095,
-0.07953706383705139,
-0.254476934671402,
0.11565889418125153,
0.002347775734961033,
-0.0580451563000679,
0.21284475922584534,
0.004325311630964279,
0.014562256634235382,
0.09402718394994736,
0.25386306643486023,
0.4419768452644348,
-0.15096443891525269,
0.23303543031215668,
0.3309045135974884,
-0.14525513350963593,
0.04539602994918823,
0.4756363332271576,
0.09309481829404831,
0.07909123599529266,
0.4592580795288086,
-0.468387246131897,
0.22746334969997406,
-0.0834306851029396,
0.06255201995372772,
0.26593199372291565,
-0.19838987290859222,
0.0513572134077549,
-0.053213924169540405,
0.08194011449813843,
0.029971368610858917,
-0.03190913051366806,
0.38130807876586914,
-0.5339849591255188,
-0.1440814733505249,
-0.2714007496833801,
0.129398912191391,
-0.2787259519100189,
-0.13159403204917908,
0.10406534373760223,
-0.27843138575553894,
-0.2666235566139221,
0.021028440445661545,
-0.0043000467121601105,
-0.06768742203712463,
0.31945687532424927,
0.08000882714986801,
0.04901020601391792,
-0.4623052477836609,
-0.2375430166721344,
-0.11661633104085922,
0.08887416124343872,
-0.24892492592334747,
0.17676502466201782,
0.5675348043441772,
-0.08864213526248932,
0.20917730033397675,
0.44229209423065186,
0.7863351106643677,
0.4618772566318512,
-0.026546109467744827,
0.039184875786304474,
-0.09133526682853699,
-0.11185801774263382,
0.04400072246789932,
0.16752338409423828,
-0.04400618374347687,
0.01911609247326851,
0.1769060641527176,
0.284807026386261,
-0.268581748008728,
0.026135673746466637,
-0.2743168771266937,
0.3828233480453491,
-0.3005943298339844,
0.4371379315853119,
-0.12580980360507965,
0.002865411341190338,
-0.03980521112680435,
-0.1631433665752411,
-0.4651535749435425,
-0.399403840303421,
0.4615554213523865,
-0.008583765476942062,
-0.006859759800136089,
-0.2875884771347046,
0.13973401486873627,
0.2568396329879761,
0.4511292576789856,
0.5053794384002686,
0.15370604395866394,
-0.26933151483535767,
-0.07489895820617676,
-0.3608325719833374,
0.028308801352977753,
0.1122342050075531,
-0.06253231316804886,
-0.08822421729564667,
-0.030795304104685783,
-0.0221683531999588,
0.22797688841819763,
0.30840998888015747,
0.0005280007608234882,
-0.000655515119433403,
0.06167706847190857,
-0.22286070883274078,
0.2821537256240845,
0.2245291918516159,
-0.20579594373703003,
0.14398393034934998,
-0.13871480524539948,
0.31318971514701843,
-0.3105933666229248,
0.048752494156360626,
-0.031294479966163635,
0.09155204892158508,
0.07069483399391174,
-0.1858459860086441,
0.2312668412923813,
0.21646274626255035,
0.35170677304267883,
-0.194411963224411,
-0.3336874842643738,
-0.14262855052947998,
-0.3943418264389038,
-0.1884138286113739,
0.2988843023777008,
-0.085936039686203,
0.5925637483596802,
-0.35387638211250305,
-0.2680567502975464,
-0.3909778892993927,
0.37467145919799805,
-0.03726667910814285,
0.004926089197397232,
-0.2318452000617981,
0.22273311018943787,
0.008816935122013092,
-0.18052810430526733,
0.20639537274837494,
0.1961517632007599,
0.21530182659626007,
0.22716198861598969,
-0.0980411171913147,
-0.6955505609512329,
0.4959886372089386,
-0.06717319786548615,
-0.323957234621048,
-0.25068482756614685,
-0.005030475556850433,
0.3782031536102295,
-0.2076842188835144,
-0.6049009561538696,
-0.06200774759054184,
0.05145327374339104,
0.12937027215957642,
-0.16788016259670258,
0.09588827192783356,
-0.14749856293201447,
-0.052550751715898514,
-0.22401084005832672,
0.27049148082733154,
0.3134159445762634,
-0.10306922346353531,
0.20451542735099792,
-0.09847049415111542
] |
https://github.com/huggingface/datasets/issues/5406 | [2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str` | Other potential clue:
- Had you already imported `datasets` before pip-updating it? You should first update datasets, before importing it. Otherwise, you need to restart the kernel after updating it. | `datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience. | 30 | [2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
Other potential clue:
- Had you already imported `datasets` before pip-updating it? You should first update datasets, before importing it. Otherwise, you need to restart the kernel after updating it. | [
-0.3250020444393158,
-0.2863336503505707,
-0.03993111848831177,
0.13353289663791656,
0.2754467725753784,
0.05622177571058273,
0.035391874611377716,
0.30181893706321716,
-0.0034168269485235214,
0.24011032283306122,
-0.2261940836906433,
0.32073748111724854,
-0.022890783846378326,
0.2280568927526474,
-0.21365796029567719,
-0.11750103533267975,
0.026630938053131104,
0.1438504159450531,
-0.0723067969083786,
0.055127717554569244,
-0.21068702638149261,
0.4217694103717804,
-0.267877995967865,
0.09904101490974426,
-0.35185155272483826,
0.0907922089099884,
0.11830738186836243,
0.35991060733795166,
-0.3303600251674652,
-0.40083661675453186,
0.27861011028289795,
0.00713082030415535,
0.12576767802238464,
0.3717646300792694,
-0.00010866416414501145,
-0.048858094960451126,
0.4568787217140198,
-0.017727211117744446,
-0.3575407564640045,
-0.43328171968460083,
0.21272441744804382,
-0.20166851580142975,
0.35971617698669434,
0.058955736458301544,
0.06951238960027695,
-0.12739381194114685,
0.17762544751167297,
-0.032337579876184464,
0.21230833232402802,
0.24755364656448364,
0.25721627473831177,
0.33844193816185,
0.4332919716835022,
-0.3762376010417938,
0.03253106400370598,
0.2722249925136566,
-0.1094299852848053,
0.1602885127067566,
0.1919681578874588,
0.1052209660410881,
0.12318430840969086,
0.31078511476516724,
-0.08766253292560577,
-0.1641646772623062,
0.20376378297805786,
0.18922020494937897,
-0.08294432610273361,
-0.5756368637084961,
0.1202125996351242,
0.21158364415168762,
0.16793808341026306,
-0.1828598976135254,
-0.40191951394081116,
-0.12146952003240585,
0.012668495997786522,
-0.11398280411958694,
0.23515430092811584,
0.06542129814624786,
-0.14779332280158997,
0.11726479232311249,
-0.2870165705680847,
-0.2080056369304657,
0.02153555303812027,
0.12197815626859665,
0.02348420023918152,
0.05007588118314743,
-0.1733841598033905,
0.05738740414381027,
0.276924192905426,
-0.32692354917526245,
-0.0033784499391913414,
0.22789518535137177,
-0.26376354694366455,
-0.0019204309210181236,
-0.010103944689035416,
0.09544543921947479,
-0.1467580795288086,
0.10795243084430695,
0.05219385027885437,
-0.049664922058582306,
-0.27324533462524414,
0.22363877296447754,
-0.1698373705148697,
0.17534315586090088,
0.09623053669929504,
0.07903669774532318,
0.1439754068851471,
0.281192809343338,
0.29567891359329224,
0.14905884861946106,
0.22305616736412048,
-0.11949694901704788,
-0.023019861429929733,
-0.07233000546693802,
-0.06033657491207123,
-0.12563374638557434,
0.2554003596305847,
-0.052533913403749466,
-0.2020900547504425,
0.049174126237630844,
0.08906922489404678,
0.04390270262956619,
0.03715508431196213,
0.3503422737121582,
-0.20191815495491028,
0.11649606376886368,
0.30601024627685547,
0.3085610270500183,
0.07658006250858307,
0.05041540414094925,
-0.15694573521614075,
0.12553903460502625,
-0.03312959522008896,
-0.10693956166505814,
0.1450796276330948,
-0.489804744720459,
0.13410218060016632,
0.3628820478916168,
0.4205175042152405,
0.057750821113586426,
-0.27255383133888245,
0.11360965669155121,
0.006224192678928375,
0.34329962730407715,
0.13142605125904083,
0.18915632367134094,
0.24738548696041107,
-0.3518112301826477,
-0.06286630779504776,
-0.009210824966430664,
-0.387545108795166,
-0.23018676042556763,
-0.5192764401435852,
0.20229890942573547,
0.14475342631340027,
-0.016101744025945663,
-0.32267922163009644,
-0.13346567749977112,
0.015625812113285065,
-0.3238784074783325,
-0.07542093843221664,
-0.27885502576828003,
0.19040368497371674,
-0.15606330335140228,
0.20889432728290558,
0.2531362771987915,
-0.12728947401046753,
-0.133355051279068,
-0.017639173194766045,
0.04595301300287247,
0.12124230712652206,
0.19410955905914307,
-0.03861674666404724,
-0.26668575406074524,
-0.4221729338169098,
0.07756884396076202,
0.27466118335723877,
-0.6204819679260254,
-0.1875057816505432,
0.0962187871336937,
0.04584898799657822,
0.06772200018167496,
0.05560297518968582,
-0.029405521228909492,
-0.004644296132028103,
0.1717178225517273,
0.28433066606521606,
-0.014389604330062866,
0.023402614519000053,
-0.037072423845529556,
-0.2545926868915558,
-0.19251440465450287,
-0.04667250066995621,
0.12849527597427368,
0.03975597769021988,
0.14200147986412048,
-0.03631829470396042,
0.0447864793241024,
0.21215009689331055,
0.03251909464597702,
0.09182009100914001,
0.20953315496444702,
0.24151961505413055,
0.27304011583328247,
0.022621531039476395,
-0.1931813657283783,
-0.31476250290870667,
0.029853828251361847,
0.07084749639034271,
0.2664361000061035,
-0.1836795061826706,
-0.20945896208286285,
-0.13081008195877075,
-0.09459514170885086,
-0.08696000277996063,
-0.10857018828392029,
0.18095789849758148,
0.03790260851383209,
0.13670647144317627,
0.08900541067123413,
-0.3115933835506439,
0.49162164330482483,
-0.07557086646556854,
0.31050342321395874,
-0.4412873089313507,
0.18148338794708252,
-0.24455760419368744,
-0.22033534944057465,
-0.08880279213190079,
0.10712370276451111,
0.13364648818969727,
-0.010952684096992016,
0.012752685695886612,
0.5392102599143982,
-0.08052156120538712,
0.1340586245059967,
-0.12077780812978745,
-0.16337420046329498,
0.18017862737178802,
-0.022943202406167984,
-0.07163099944591522,
-0.049176815897226334,
-0.07472020387649536,
0.0024205967783927917,
-0.09154479950666428,
0.08791041374206543,
-0.05176554247736931,
0.2629634141921997,
0.21111737191677094,
0.21261869370937347,
0.3248099088668823,
0.040826793760061264,
-0.31605514883995056,
-0.4382430613040924,
0.19378715753555298,
-0.14423201978206635,
0.02162162959575653,
-0.06166945397853851,
-0.46306148171424866,
0.010623633861541748,
0.5494396686553955,
0.1560913622379303,
0.1071087121963501,
0.43845129013061523,
-0.24644052982330322,
0.19400933384895325,
-0.0666375607252121,
0.08268952369689941,
0.22183680534362793,
0.19414332509040833,
-0.1419639140367508,
0.1991000920534134,
0.007394406013190746,
-0.18126371502876282,
0.16323703527450562,
0.2271682769060135,
-0.16578929126262665,
0.22253674268722534,
0.25422510504722595,
0.1723770797252655,
-0.22790148854255676,
-0.21745754778385162,
-0.3749908208847046,
0.0315248928964138,
-0.35985299944877625,
-0.0995049923658371,
-0.37052249908447266,
-0.03829056769609451,
0.12304236739873886,
-0.5885909199714661,
-0.3947550356388092,
-0.2910960614681244,
-0.10588864982128143,
0.38102418184280396,
0.1207570731639862,
0.1179480105638504,
0.10915713012218475,
0.00016830861568450928,
-0.05525915324687958,
-0.1075747087597847,
-0.21004129946231842,
0.1469758152961731,
-0.03796113282442093,
0.07822544872760773,
-0.011723136529326439,
-0.11148307472467422,
0.1802423596382141,
-0.5570327043533325,
0.01690259575843811,
-0.24700698256492615,
-0.4261132776737213,
0.17169472575187683,
-0.38792848587036133,
0.2981191575527191,
0.46998172998428345,
0.16896381974220276,
-0.17460042238235474,
-0.28091803193092346,
0.3865211606025696,
-0.15149590373039246,
-0.1880788803100586,
0.11766718327999115,
0.05677436664700508,
-0.20925259590148926,
-0.3177579641342163,
-0.19257038831710815,
-0.3540136516094208,
-0.5565260648727417,
0.4547966718673706,
0.1277495175600052,
0.08870033174753189,
0.32401907444000244,
0.06351513415575027,
0.09341063350439072,
-0.07677328586578369,
0.2273307889699936,
-0.17970459163188934,
-0.23555469512939453,
0.3454291522502899,
-0.33615800738334656,
-0.26456576585769653,
0.17750291526317596,
0.10230150818824768,
0.0973200649023056,
-0.271541953086853,
-0.28370288014411926,
-0.5134736895561218,
-0.2795088589191437,
0.2725558578968048,
-0.021250233054161072,
0.16156430542469025,
0.2605079412460327,
0.1938878744840622,
-0.16908469796180725,
0.017187051475048065,
-0.1398940086364746,
-0.0009718164801597595,
0.04486300051212311,
0.08209498226642609,
0.07144719362258911,
0.3145124316215515,
-0.15873506665229797,
0.09107513725757599,
0.3549514412879944,
0.09892295300960541,
0.3088638186454773,
-0.1335434764623642,
0.5632891058921814,
-0.461996465921402,
-0.5114557147026062,
-0.19182519614696503,
-0.08239258825778961,
0.10841962695121765,
-0.028674766421318054,
0.004706215113401413,
0.42230188846588135,
-0.24691390991210938,
0.11829119920730591,
-0.13739356398582458,
-0.16062040627002716,
-0.06395074725151062,
0.28620845079421997,
0.04094049707055092,
-0.054684076458215714,
0.05919758230447769,
0.007089225575327873,
-0.21642997860908508,
0.06805822253227234,
0.38012629747390747,
-0.023222438991069794,
-0.017642496153712273,
-0.2721356153488159,
-0.13065670430660248,
-0.41837528347969055,
0.3644856810569763,
0.11855592578649521,
0.27189090847969055,
-0.14377248287200928,
-0.07531213760375977,
-0.01488899439573288,
0.14008751511573792,
0.5587743520736694,
-0.10776729136705399,
-0.3884289264678955,
0.20112881064414978,
-0.14041873812675476,
-0.5034027695655823,
-0.020783456042408943,
-0.18752329051494598,
0.17867335677146912,
0.4728146195411682,
0.5951351523399353,
-0.1929580569267273,
-0.19637271761894226,
0.3651314675807953,
0.12690255045890808,
-0.020833071321249008,
0.10966157913208008,
-0.2807982265949249,
-0.22510254383087158,
-0.37072110176086426,
-0.2270643413066864,
0.1876170039176941,
0.3567090928554535,
-0.06086146831512451,
-0.11607539653778076,
-0.11029466986656189,
-0.22279894351959229,
0.27535301446914673,
0.009003009647130966,
0.5161788463592529,
-0.11786147952079773,
0.028695151209831238,
0.11007379740476608,
0.05819065496325493,
0.40836477279663086,
0.5405551195144653,
-0.17365293204784393,
-0.30580607056617737,
0.09679260849952698,
-0.08315558731555939,
0.17980928719043732,
0.12661193311214447,
-0.13322462141513824,
0.1670549511909485,
-0.09191824495792389,
0.3698003888130188,
-0.29840561747550964,
0.12384040653705597,
0.4211884140968323,
0.00978302862495184,
-0.38591268658638,
-0.2572806179523468,
0.2967812418937683,
0.10882209241390228,
0.10170644521713257,
0.1761671006679535,
0.48714888095855713,
-0.2725420594215393,
0.13929352164268494,
-0.08471126109361649,
0.9212659597396851,
0.20771969854831696,
0.09350277483463287,
0.031456757336854935,
0.05409102886915207,
0.4016992151737213,
0.08431155979633331,
0.10290065407752991,
-0.3088780641555786,
-0.1789749711751938,
-0.09971638023853302,
-0.0075704194605350494,
0.07805394381284714,
-0.39035409688949585,
-0.5977543592453003,
0.1723138391971588,
-0.24817480146884918,
-0.12826931476593018,
-0.1515868455171585,
0.19690117239952087,
-0.45393097400665283,
-0.31111934781074524,
-0.1793532818555832,
0.19882386922836304,
-0.0760975331068039,
0.16592960059642792,
0.1449272632598877,
-0.002698257565498352,
-0.18332849442958832,
-0.2820870280265808,
-0.49555617570877075,
-0.051351241767406464,
-0.019563570618629456,
0.1481926590204239,
0.34249693155288696,
-0.1605122685432434,
-0.06865011155605316,
0.13532336056232452,
0.4489511251449585,
0.2011469006538391,
-0.1251521110534668,
0.008132917806506157,
-0.1880655586719513,
-0.220491424202919,
0.00854276493191719,
0.15170615911483765,
0.0806230902671814,
-0.0181689765304327,
-0.07245840132236481,
0.06242170184850693,
0.007314124144613743,
-0.10731467604637146,
-0.15829627215862274,
0.04218582063913345,
0.056394562125205994,
-0.4200095236301422,
-0.1811201572418213,
-0.3166794180870056,
-0.024553371593356133,
-0.3050486445426941,
0.14826346933841705,
0.006502948701381683,
-0.05376726761460304,
0.01019488275051117,
0.30868276953697205,
-0.3506646752357483,
-0.14667923748493195,
0.3717319071292877,
-0.19024839997291565,
-0.20370744168758392,
0.3839316964149475,
0.24075962603092194,
-0.2550840377807617,
-0.057855769991874695,
0.18581551313400269,
0.12996132671833038,
-0.3299793004989624,
0.24139255285263062,
0.21495965123176575,
-0.08492626249790192,
0.11029031127691269,
0.5166884064674377,
0.10197274386882782,
0.14876481890678406,
-0.2344837337732315,
-0.32500308752059937,
-0.38333380222320557,
0.313973069190979,
-0.02368314191699028,
0.20703093707561493,
-0.001331958919763565,
-0.10397566854953766,
0.07206321507692337,
-0.06018775701522827,
-0.3796081840991974,
0.028148574754595757,
-0.3611631691455841,
0.09173013269901276,
0.178965762257576,
-0.12231583148241043,
0.3865305781364441,
-0.14964647591114044,
0.1739463359117508,
0.29241877794265747,
-0.06059824675321579,
-0.20255964994430542,
-0.1669159233570099,
0.07217780500650406,
-0.03511864319443703,
-0.09597022086381912,
-0.1082507073879242,
0.08034295588731766,
0.021482940763235092,
-0.2099243700504303,
0.09288577735424042,
0.32200920581817627,
-0.05701933801174164,
0.22327107191085815,
-0.1064949780702591,
-0.04919902980327606,
0.2918412685394287,
0.10462932288646698,
0.08964795619249344,
0.3938950300216675,
-0.1064639762043953,
0.05330543592572212,
-0.19051317870616913,
-0.04376494511961937,
0.2820757329463959,
0.15808573365211487,
0.21397331357002258,
-0.13808637857437134,
0.1417662799358368,
-0.21380402147769928,
0.005307212471961975,
0.01590714231133461,
0.46585801243782043,
0.36360999941825867,
-0.15165095031261444,
-0.019083676859736443,
0.08683554828166962,
0.24520790576934814,
-0.025634579360485077,
-0.131573885679245,
0.0789550244808197,
0.029952242970466614,
-0.07049229741096497,
0.21103939414024353,
-0.00379301980137825,
-0.04131702333688736,
0.02639937773346901,
0.2507096827030182,
0.5039050579071045,
-0.22344346344470978,
0.1696327179670334,
0.18114645779132843,
-0.10346771776676178,
0.03776398301124573,
0.3456677794456482,
0.12768377363681793,
0.16273239254951477,
0.46697670221328735,
-0.39874544739723206,
0.3009127676486969,
-0.00031909719109535217,
0.07836256176233292,
0.2849512994289398,
-0.22338832914829254,
0.12117601931095123,
-0.06654681265354156,
0.027719907462596893,
0.048261720687150955,
-0.009339548647403717,
0.3911827504634857,
-0.43941280245780945,
-0.1521567404270172,
-0.1819545328617096,
0.10550042986869812,
-0.24099218845367432,
-0.19843605160713196,
0.18532951176166534,
-0.21273082494735718,
-0.19598957896232605,
-0.02689993381500244,
0.05545806884765625,
-0.05567232519388199,
0.28186529874801636,
0.11029055714607239,
0.03250056877732277,
-0.48607778549194336,
-0.23847538232803345,
-0.024171218276023865,
0.16865767538547516,
-0.2569558620452881,
0.12988817691802979,
0.4979259967803955,
-0.08664864301681519,
0.14749567210674286,
0.4469846189022064,
0.8530145287513733,
0.44525080919265747,
-0.03774368762969971,
0.1810883730649948,
-0.14710567891597748,
-0.0901775136590004,
0.07627340406179428,
0.23585368692874908,
0.025891467928886414,
0.10786442458629608,
0.0820663571357727,
0.3023160994052887,
-0.262472003698349,
0.048646070063114166,
-0.33775269985198975,
0.3677430748939514,
-0.2133803814649582,
0.3557874858379364,
-0.17222343385219574,
-0.061078764498233795,
-0.1157270222902298,
-0.15219098329544067,
-0.5061659812927246,
-0.2754767835140228,
0.4460397958755493,
-0.011876275762915611,
-0.01450946182012558,
-0.3246123194694519,
0.13799847662448883,
0.18655656278133392,
0.44072291254997253,
0.5212695002555847,
0.1994081437587738,
-0.20030438899993896,
-0.17570383846759796,
-0.30062317848205566,
0.00967889279127121,
0.12030109763145447,
-0.06369426101446152,
-0.043727122247219086,
-0.004770816303789616,
-0.0670703575015068,
0.1612223982810974,
0.21664854884147644,
-0.028813961893320084,
-0.0023930631577968597,
0.07457852363586426,
-0.13642457127571106,
0.1979701817035675,
0.2248695194721222,
-0.24514120817184448,
0.17697371542453766,
-0.08091863989830017,
0.29896312952041626,
-0.35257089138031006,
0.05455554276704788,
-0.1168830394744873,
0.15866993367671967,
0.04509914293885231,
-0.11816242337226868,
0.28309929370880127,
0.24285410344600677,
0.292789101600647,
-0.21998825669288635,
-0.3562662601470947,
-0.1460345834493637,
-0.44793885946273804,
-0.19078244268894196,
0.31400054693222046,
-0.043606337159872055,
0.5151580572128296,
-0.3225937485694885,
-0.3406928777694702,
-0.37506696581840515,
0.32837074995040894,
-0.04814206808805466,
-0.08351261913776398,
-0.17037031054496765,
0.19189868867397308,
0.08320605009794235,
-0.15705682337284088,
0.13683032989501953,
0.18579253554344177,
0.1849953830242157,
0.22824709117412567,
-0.11209595203399658,
-0.7447091937065125,
0.497683584690094,
-0.031480658799409866,
-0.267069548368454,
-0.19837845861911774,
0.004196301102638245,
0.2594340145587921,
-0.2343418002128601,
-0.749499499797821,
-0.07279043644666672,
0.1007143035531044,
0.07274579256772995,
-0.2238050401210785,
0.15471695363521576,
-0.09617221355438232,
-0.07576154917478561,
-0.2225186973810196,
0.28746265172958374,
0.3108094334602356,
-0.10431213676929474,
0.25894081592559814,
-0.08037692308425903
] |
https://github.com/huggingface/datasets/issues/5406 | [2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str` | I installed `datasets` with Conda using `conda install datasets` and got this issue.
Then I tried to reinstall using
`
conda install -c huggingface -c conda-forge datasets
`
The issue is now fixed. | `datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience. | 33 | [2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets.
When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets:
```python
TypeError: can only concatenate str (not "int") to str
```
This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0
This change is required or those datasets won't be supported by the Hugging Face Hub.
Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version.
For example, versions 2.6.2 and 2.7.1 patch this issue.
```python
pip install -U datasets
```
All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275).
We apologize for the inconvenience.
I installed `datasets` with Conda using `conda install datasets` and got this issue.
Then I tried to reinstall using
`
conda install -c huggingface -c conda-forge datasets
`
The issue is now fixed. | [
-0.26784858107566833,
-0.08024802803993225,
-0.019542146474123,
0.17858220636844635,
0.28097838163375854,
0.028393283486366272,
0.0963553935289383,
0.31161925196647644,
-0.18481163680553436,
0.14354604482650757,
-0.32570284605026245,
0.17842727899551392,
-0.019120804965496063,
0.30389976501464844,
-0.29173263907432556,
-0.03722040355205536,
-0.006785370409488678,
0.11171390861272812,
-0.1598781794309616,
0.14962120354175568,
-0.1855640858411789,
0.4074859917163849,
-0.2559809982776642,
0.08528833091259003,
-0.35655176639556885,
0.0989602655172348,
0.06646572798490524,
0.33909210562705994,
-0.272443950176239,
-0.39528003334999084,
0.3528597950935364,
0.02254685014486313,
0.2074926495552063,
0.44056805968284607,
-0.00011236533464398235,
-0.022212035953998566,
0.3776273727416992,
-0.012643247842788696,
-0.49361932277679443,
-0.4622768759727478,
0.1307666003704071,
-0.029792247340083122,
0.3079068660736084,
0.10462101548910141,
0.0633576363325119,
-0.18782974779605865,
0.09100174903869629,
-0.20170429348945618,
0.1533956229686737,
0.34691086411476135,
0.22621873021125793,
0.2914632260799408,
0.408571720123291,
-0.41195374727249146,
-0.2065953016281128,
0.33009713888168335,
-0.10529620200395584,
0.18001051247119904,
0.02713572233915329,
0.10239613801240921,
0.10028169304132462,
0.22594377398490906,
-0.034350648522377014,
-0.14837118983268738,
0.18618127703666687,
0.1742796152830124,
-0.14837929606437683,
-0.5520808696746826,
0.18187329173088074,
0.17063796520233154,
0.26455074548721313,
-0.1997092068195343,
-0.4840480089187622,
-0.19026029109954834,
0.0859604999423027,
-0.07723286747932434,
0.20817750692367554,
0.02627260610461235,
-0.13583528995513916,
0.19995637238025665,
-0.30585259199142456,
-0.15197710692882538,
0.032668642699718475,
0.06002673879265785,
-0.08484756201505661,
-0.04478152096271515,
-0.2425072342157364,
0.014371998608112335,
0.29866838455200195,
-0.3803422451019287,
0.036263685673475266,
0.22092488408088684,
-0.2956753671169281,
-0.014914468862116337,
-0.10035765171051025,
0.1146852970123291,
-0.1540513038635254,
0.0013543516397476196,
0.14795330166816711,
-0.0319267213344574,
-0.30111759901046753,
0.15595602989196777,
-0.22860191762447357,
0.07316746562719345,
0.0807921439409256,
0.07446061074733734,
0.3546455502510071,
0.18439532816410065,
0.2846916913986206,
0.09195540100336075,
0.31510332226753235,
-0.11974061280488968,
-0.06640367209911346,
-0.09371934086084366,
-0.16940973699092865,
-0.19592994451522827,
0.1801416277885437,
-0.05343375355005264,
-0.24142275750637054,
0.08811566978693008,
0.08601837605237961,
0.007067784201353788,
0.07782510668039322,
0.3245605230331421,
-0.17135894298553467,
0.1282118260860443,
0.33437156677246094,
0.3060374855995178,
0.21422864496707916,
-0.026133794337511063,
-0.14122408628463745,
-0.007556656375527382,
-0.02857564389705658,
-0.09317120164632797,
0.19875024259090424,
-0.5733193755149841,
0.06419520825147629,
0.3080212473869324,
0.4728836417198181,
0.028573498129844666,
-0.4107457101345062,
0.094027578830719,
0.06847433745861053,
0.3516945242881775,
-0.004628509283065796,
0.13441331684589386,
0.21861645579338074,
-0.3038043677806854,
-0.050047531723976135,
-0.06943007558584213,
-0.3723703920841217,
-0.1526949405670166,
-0.6112770438194275,
0.14258824288845062,
0.11550766229629517,
0.03294004499912262,
-0.24059996008872986,
-0.11317424476146698,
-0.07494843751192093,
-0.22668305039405823,
-0.15823844075202942,
-0.18494142591953278,
0.14574824273586273,
-0.1250871866941452,
0.34545236825942993,
0.3298459053039551,
-0.1564822643995285,
-0.152610182762146,
0.04894104599952698,
0.01752191036939621,
0.03589269518852234,
0.18278899788856506,
-0.04942729324102402,
-0.2220730185508728,
-0.47588202357292175,
0.03443770855665207,
0.23643168807029724,
-0.5064295530319214,
-0.13465744256973267,
0.0561956986784935,
0.09979389607906342,
0.1389494687318802,
-0.04517901688814163,
-0.1393466591835022,
0.025769373401999474,
0.14738985896110535,
0.4005785286426544,
-0.018721207976341248,
0.07160129398107529,
-0.13320264220237732,
-0.1366833597421646,
-0.202976256608963,
0.019333522766828537,
0.09753911197185516,
-0.0023856014013290405,
0.2974155843257904,
-0.011682093143463135,
-0.11323752254247665,
0.21435964107513428,
0.0350705087184906,
0.06759847700595856,
0.16471822559833527,
0.15849003195762634,
0.18137794733047485,
0.016649557277560234,
-0.2083911895751953,
-0.4101274609565735,
0.06086546927690506,
0.1444259136915207,
0.2916356921195984,
-0.23008863627910614,
-0.1359972357749939,
-0.12011668086051941,
-0.06232335418462753,
-0.009252037853002548,
-0.15097492933273315,
0.15473121404647827,
0.04350883886218071,
0.09448342025279999,
0.09443077445030212,
-0.2899896800518036,
0.6865124106407166,
-0.03862767666578293,
0.29555174708366394,
-0.339383989572525,
0.20335234701633453,
-0.13572421669960022,
-0.14975827932357788,
-0.0034206025302410126,
0.17673708498477936,
0.116111621260643,
-0.039332468062639236,
-0.004694849252700806,
0.5363004803657532,
-0.1292172372341156,
0.004268646240234375,
-0.09341270476579666,
-0.13469405472278595,
0.20102712512016296,
0.12415182590484619,
-0.16120058298110962,
-0.2026325911283493,
-0.07781711965799332,
-0.007943633943796158,
-0.05929314345121384,
0.11889094114303589,
0.026620078831911087,
0.29082542657852173,
0.23236139118671417,
0.29034003615379333,
0.40396010875701904,
0.011802982538938522,
-0.29379501938819885,
-0.5035262107849121,
0.12962983548641205,
-0.13318189978599548,
-0.01693347468972206,
0.04662690311670303,
-0.4904935956001282,
-0.04015427082777023,
0.505850613117218,
0.12239813804626465,
0.06060415506362915,
0.5065326690673828,
-0.26474854350090027,
0.2349330186843872,
-0.031749047338962555,
0.022065412253141403,
0.24429209530353546,
0.13174153864383698,
-0.1236005425453186,
0.14802037179470062,
-0.037014689296483994,
-0.14109337329864502,
0.12231216579675674,
0.16766357421875,
-0.04237644374370575,
0.183027982711792,
0.277505487203598,
0.2240513265132904,
-0.22546842694282532,
-0.30057385563850403,
-0.3780503571033478,
0.013800824992358685,
-0.34885409474372864,
-0.060809746384620667,
-0.4080089032649994,
-0.02197827771306038,
0.09197485446929932,
-0.583278238773346,
-0.4479620158672333,
-0.2600395977497101,
-0.2319236546754837,
0.34247151017189026,
0.14911872148513794,
0.15126574039459229,
0.008661124855279922,
0.10430849343538284,
-0.09986300766468048,
-0.10116293281316757,
-0.21168982982635498,
0.1633836328983307,
-0.07463446259498596,
0.044559333473443985,
0.006459943018853664,
-0.16475094854831696,
0.13682956993579865,
-0.5896766781806946,
0.07690921425819397,
-0.23546981811523438,
-0.42693856358528137,
0.2217431217432022,
-0.23600904643535614,
0.29229995608329773,
0.4061143100261688,
0.14672495424747467,
-0.07412123680114746,
-0.28903108835220337,
0.3382222652435303,
-0.04046408087015152,
-0.17149657011032104,
0.12235412001609802,
0.08515916764736176,
-0.187092125415802,
-0.3416016697883606,
-0.12656694650650024,
-0.25634387135505676,
-0.49861109256744385,
0.5187737345695496,
0.08078296482563019,
0.06276281923055649,
0.3126564919948578,
0.09221860021352768,
0.13131456077098846,
-0.17284630239009857,
0.3158878684043884,
-0.20954331755638123,
-0.25945544242858887,
0.31437650322914124,
-0.2459058165550232,
-0.2665315568447113,
0.05959707126021385,
0.19180099666118622,
0.1547141820192337,
-0.211543470621109,
-0.2509099543094635,
-0.3363267183303833,
-0.21401646733283997,
0.3464951515197754,
-0.017147153615951538,
0.07076531648635864,
0.28202658891677856,
0.24375493824481964,
-0.14459489285945892,
0.07186843454837799,
-0.17862577736377716,
0.05510479211807251,
-0.023691855370998383,
0.07694627344608307,
0.041773635894060135,
0.24538150429725647,
-0.1429099142551422,
-0.049423933029174805,
0.28338441252708435,
-0.10264416038990021,
0.23780010640621185,
-0.08736805617809296,
0.6655628681182861,
-0.43610236048698425,
-0.5433911085128784,
-0.13475196063518524,
-0.1225382387638092,
0.24977655708789825,
-0.06419700384140015,
-0.03267605975270271,
0.4484294056892395,
-0.31156519055366516,
0.0550626777112484,
-0.16247868537902832,
-0.19369706511497498,
-0.12049224972724915,
0.11381550878286362,
0.025483034551143646,
-0.045035697519779205,
0.07890262454748154,
0.008537665009498596,
-0.11216949671506882,
0.05108281597495079,
0.3508211374282837,
0.0433102510869503,
-0.06106937304139137,
-0.31697484850883484,
-0.028303276747465134,
-0.4399901032447815,
0.3408988118171692,
0.06493918597698212,
0.4840242862701416,
-0.06988652795553207,
-0.07499442249536514,
-0.11442181468009949,
0.16865763068199158,
0.7491648197174072,
0.05933300405740738,
-0.5090713500976562,
0.1693449467420578,
-0.06633900105953217,
-0.43163102865219116,
0.014831878244876862,
-0.010535594075918198,
0.2141280472278595,
0.5206129550933838,
0.7176771759986877,
-0.1387971043586731,
-0.2644304037094116,
0.28125032782554626,
0.1819666475057602,
0.029499810189008713,
0.06875898689031601,
-0.2505721151828766,
-0.14693740010261536,
-0.3394209146499634,
-0.259308397769928,
0.13407714664936066,
0.42968374490737915,
-0.07243312150239944,
-0.08049461245536804,
-0.21186205744743347,
-0.36759114265441895,
0.3266676068305969,
0.050364088267087936,
0.4864955246448517,
-0.0947795957326889,
0.14890801906585693,
0.20164237916469574,
0.15148663520812988,
0.5032965540885925,
0.5001134872436523,
-0.1047406941652298,
-0.42663538455963135,
0.1637634038925171,
-0.043278127908706665,
0.24823400378227234,
0.11338462680578232,
-0.17616447806358337,
0.09799566119909286,
-0.15244247019290924,
0.3566780090332031,
-0.33735525608062744,
0.10733211040496826,
0.40921464562416077,
0.026490751653909683,
-0.5283903479576111,
-0.1948833018541336,
0.2240907847881317,
0.06667709350585938,
0.11631499230861664,
0.29686737060546875,
0.5096384882926941,
-0.2477697879076004,
-0.005172695964574814,
-0.004114575684070587,
0.8890650868415833,
0.1999915987253189,
0.07868023961782455,
-0.05512222647666931,
-0.030138839036226273,
0.4417051374912262,
0.14639565348625183,
0.06775074452161789,
-0.25178617238998413,
-0.21585145592689514,
-0.12094423919916153,
-0.05014696717262268,
0.2002764642238617,
-0.38834714889526367,
-0.4401886761188507,
0.09649720788002014,
-0.3411867022514343,
-0.0326031930744648,
-0.03325784206390381,
0.1982114017009735,
-0.3688846826553345,
-0.36602073907852173,
-0.13403268158435822,
0.1364598274230957,
-0.03061215579509735,
0.15253165364265442,
0.17793115973472595,
0.003549847286194563,
-0.1346575766801834,
-0.22057059407234192,
-0.5261430740356445,
0.026808910071849823,
0.02584642544388771,
0.1308218240737915,
0.4358578026294708,
-0.14519788324832916,
-0.004791552200913429,
0.15642257034778595,
0.6239103674888611,
0.19372430443763733,
-0.14084838330745697,
-0.007222987711429596,
-0.28283512592315674,
-0.14944195747375488,
0.043044477701187134,
0.10441316664218903,
0.048597149550914764,
0.0615776851773262,
-0.04458910971879959,
0.06307296454906464,
0.023052319884300232,
-0.019473571330308914,
-0.15586605668067932,
0.07115942984819412,
-0.09672029316425323,
-0.40263524651527405,
-0.10821166634559631,
-0.24540328979492188,
0.11054283380508423,
-0.3099149167537689,
0.10494834184646606,
0.039389900863170624,
0.046253498643636703,
-0.08041196316480637,
0.21021628379821777,
-0.3555918335914612,
-0.18177549540996552,
0.4384251832962036,
-0.19296520948410034,
-0.15600928664207458,
0.38064974546432495,
0.18880580365657806,
-0.24774383008480072,
-0.021791255101561546,
0.059249572455883026,
0.15161795914173126,
-0.33954161405563354,
0.22767427563667297,
0.2224222868680954,
-0.15211264789104462,
0.01888956129550934,
0.41610434651374817,
0.009943008422851562,
0.12099778652191162,
-0.13278166949748993,
-0.35231420397758484,
-0.35288316011428833,
0.2325592041015625,
-0.16768284142017365,
0.16448381543159485,
0.02740687131881714,
0.13197605311870575,
0.03769565373659134,
-0.050679706037044525,
-0.3172284960746765,
-0.0027239657938480377,
-0.3225667178630829,
0.0027577560395002365,
0.1488107591867447,
-0.09319990128278732,
0.3802250623703003,
-0.1980762481689453,
0.12638109922409058,
0.35426974296569824,
-0.006712308153510094,
-0.1139441505074501,
-0.20212332904338837,
0.08938043564558029,
-0.019161943346261978,
-0.06046468764543533,
-0.029237251728773117,
0.052037060260772705,
-0.03137129172682762,
-0.24702107906341553,
0.0715058445930481,
0.3665061891078949,
-0.010067284107208252,
0.21661175787448883,
-0.10619884729385376,
-0.043705329298973083,
0.29933643341064453,
0.09496767818927765,
0.1552516371011734,
0.2895137667655945,
-0.09320709854364395,
0.08382505178451538,
-0.38906097412109375,
0.002927258610725403,
0.12835727632045746,
0.2275521159172058,
0.022689171135425568,
-0.13052326440811157,
0.12969426810741425,
-0.16682936251163483,
-0.00850299745798111,
0.04547584056854248,
0.43974441289901733,
0.4293396770954132,
-0.10533135384321213,
-0.04224041476845741,
0.19895026087760925,
0.1740521341562271,
-0.08259178698062897,
-0.23498517274856567,
-0.007006708532571793,
0.04327915608882904,
-0.08421583473682404,
0.19005122780799866,
-0.03753899037837982,
-0.04477296397089958,
0.06453661620616913,
0.17577549815177917,
0.4272770285606384,
-0.14087238907814026,
0.24342317879199982,
0.16531279683113098,
-0.025036651641130447,
0.04299473762512207,
0.47972655296325684,
0.15253740549087524,
0.17326712608337402,
0.44074535369873047,
-0.5146478414535522,
0.2118961662054062,
-0.06385039538145065,
0.09611089527606964,
0.2622212767601013,
-0.26127418875694275,
0.18706563115119934,
-0.01577182114124298,
0.05887352302670479,
-0.008369781076908112,
-0.09301373362541199,
0.4303400218486786,
-0.4534021317958832,
-0.218375101685524,
-0.17506368458271027,
0.08105401694774628,
-0.2487826943397522,
-0.16556479036808014,
0.169306680560112,
-0.25634685158729553,
-0.09594893455505371,
-0.035638049244880676,
0.04348625987768173,
-0.11164580285549164,
0.35184380412101746,
-0.04891764372587204,
0.019226208329200745,
-0.5985147356987,
-0.2501195967197418,
0.010560661554336548,
0.10289838165044785,
-0.1831149309873581,
0.13253366947174072,
0.5059117674827576,
-0.12170512974262238,
0.22740237414836884,
0.3984239101409912,
0.8342306017875671,
0.437104731798172,
0.16357071697711945,
0.10298627614974976,
-0.18214327096939087,
-0.07589592039585114,
0.030828163027763367,
0.287639319896698,
0.07213151454925537,
-0.03710874542593956,
0.14735819399356842,
0.25979581475257874,
-0.20370060205459595,
0.10540449619293213,
-0.288766473531723,
0.48119327425956726,
-0.2728613317012787,
0.34708619117736816,
-0.18229486048221588,
-0.06375740468502045,
-0.04589724540710449,
-0.08225081115961075,
-0.33178412914276123,
-0.24367542564868927,
0.39478233456611633,
-0.04585855081677437,
-0.02139792963862419,
-0.26124733686447144,
0.11889965832233429,
0.26705074310302734,
0.43810784816741943,
0.5061010122299194,
0.14567133784294128,
-0.11753439158201218,
-0.18956798315048218,
-0.3450460135936737,
-0.038311608135700226,
0.17451263964176178,
0.06332924216985703,
0.005327019840478897,
-0.02843123860657215,
0.016028709709644318,
0.10622189939022064,
0.19636499881744385,
0.00031341263093054295,
-0.023478064686059952,
-0.15178857743740082,
-0.184854194521904,
0.17465682327747345,
0.02639348804950714,
-0.15056882798671722,
0.13552512228488922,
-0.0449979268014431,
0.3583352267742157,
-0.2916770279407501,
0.03072577714920044,
-0.09718587249517441,
0.19252052903175354,
-0.002441227436065674,
-0.12625722587108612,
0.23323321342468262,
0.29001984000205994,
0.18132269382476807,
-0.16981977224349976,
-0.3707236647605896,
-0.1818983256816864,
-0.41686147451400757,
-0.09594102203845978,
0.32324060797691345,
0.0023085959255695343,
0.4119301438331604,
-0.3693680465221405,
-0.3219253718852997,
-0.38797423243522644,
0.35593917965888977,
0.01843675971031189,
0.06104616820812225,
-0.2694634795188904,
0.297525554895401,
0.09747857600450516,
-0.19247256219387054,
0.17402683198451996,
0.2521298825740814,
0.11083435267210007,
0.23741008341312408,
-0.026588216423988342,
-0.5957359671592712,
0.5152065753936768,
-0.07479532808065414,
-0.29640138149261475,
-0.12592588365077972,
-0.04064524173736572,
0.2956410050392151,
-0.30296099185943604,
-0.7990913391113281,
-0.022729843854904175,
0.16993743181228638,
0.09920021891593933,
-0.22428591549396515,
0.1161397248506546,
-0.17980733513832092,
-0.05524233356118202,
-0.24837996065616608,
0.37322792410850525,
0.3520905375480652,
-0.17943072319030762,
0.3260364532470703,
0.03085540235042572
] |
https://github.com/huggingface/datasets/issues/5405 | size_in_bytes the same for all splits | Hi @Breakend,
Indeed, the attribute `size_in_bytes` refers to the size of the entire dataset configuration, for all splits (size of downloaded files + Arrow files), not the specific split.
This is also the case for `download_size` (downloaded files) and `dataset_size` (Arrow files).
The size of the Arrow files for a specific split can be accessed: e.g. size of the "test" split only
```python
ds["train"].info.splits["test"].num_bytes
```
I agree this is confusing and maybe we should improve it. | ### Describe the bug
Hi, it looks like whenever you pull a dataset and get size_in_bytes, it returns the same size for all splits (and that size is the combined size of all splits). It seems like this shouldn't be the intended behavior since it is misleading. Here's an example:
```
>>> from datasets import load_dataset
>>> x = load_dataset("glue", "wnli")
Found cached dataset glue (/Users/breakend/.cache/huggingface/datasets/glue/wnli/1.0.0/dacbe3125aa31d7f70367a07a8a9e72a5a0bfeb5fc42e75c9db75b96da6053ad)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 1097.70it/s]
>>> x["train"].size_in_bytes
186159
>>> x["validation"].size_in_bytes
186159
>>> x["test"].size_in_bytes
186159
>>>
```
### Steps to reproduce the bug
```
>>> from datasets import load_dataset
>>> x = load_dataset("glue", "wnli")
>>> x["train"].size_in_bytes
186159
>>> x["validation"].size_in_bytes
186159
>>> x["test"].size_in_bytes
186159
```
### Expected behavior
The expected behavior is that it should return the separate sizes for all splits.
### Environment info
- `datasets` version: 2.7.1
- Platform: macOS-12.5-arm64-arm-64bit
- Python version: 3.10.8
- PyArrow version: 10.0.1
- Pandas version: 1.5.2 | 76 | size_in_bytes the same for all splits
### Describe the bug
Hi, it looks like whenever you pull a dataset and get size_in_bytes, it returns the same size for all splits (and that size is the combined size of all splits). It seems like this shouldn't be the intended behavior since it is misleading. Here's an example:
```
>>> from datasets import load_dataset
>>> x = load_dataset("glue", "wnli")
Found cached dataset glue (/Users/breakend/.cache/huggingface/datasets/glue/wnli/1.0.0/dacbe3125aa31d7f70367a07a8a9e72a5a0bfeb5fc42e75c9db75b96da6053ad)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 1097.70it/s]
>>> x["train"].size_in_bytes
186159
>>> x["validation"].size_in_bytes
186159
>>> x["test"].size_in_bytes
186159
>>>
```
### Steps to reproduce the bug
```
>>> from datasets import load_dataset
>>> x = load_dataset("glue", "wnli")
>>> x["train"].size_in_bytes
186159
>>> x["validation"].size_in_bytes
186159
>>> x["test"].size_in_bytes
186159
```
### Expected behavior
The expected behavior is that it should return the separate sizes for all splits.
### Environment info
- `datasets` version: 2.7.1
- Platform: macOS-12.5-arm64-arm-64bit
- Python version: 3.10.8
- PyArrow version: 10.0.1
- Pandas version: 1.5.2
Hi @Breakend,
Indeed, the attribute `size_in_bytes` refers to the size of the entire dataset configuration, for all splits (size of downloaded files + Arrow files), not the specific split.
This is also the case for `download_size` (downloaded files) and `dataset_size` (Arrow files).
The size of the Arrow files for a specific split can be accessed: e.g. size of the "test" split only
```python
ds["train"].info.splits["test"].num_bytes
```
I agree this is confusing and maybe we should improve it. | [
-0.09145727753639221,
-0.39270544052124023,
-0.08924220502376556,
0.4507644772529602,
0.17124532163143158,
-0.07393275946378708,
0.33963534235954285,
0.45473015308380127,
-0.002492012456059456,
0.23375020921230316,
0.056194089353084564,
-0.08060459792613983,
0.14824600517749786,
0.13303512334823608,
-0.12300470471382141,
0.026778696104884148,
0.03571245074272156,
0.1438608467578888,
-0.1728370636701584,
-0.20458808541297913,
-0.18957866728305817,
0.16332383453845978,
-0.1129341721534729,
-0.15530093014240265,
-0.4372355043888092,
0.07981915026903152,
-0.20287716388702393,
-0.04402206093072891,
-0.3825524151325226,
-0.08247329294681549,
0.440765380859375,
-0.21339982748031616,
0.015558365732431412,
0.23185069859027863,
-0.00011674259440042078,
-0.029858924448490143,
0.3972734808921814,
-0.11177145689725876,
-0.12941476702690125,
0.15362322330474854,
-0.21824604272842407,
-0.3023446500301361,
-0.03629622608423233,
-0.13267439603805542,
0.19494667649269104,
0.019014030694961548,
-0.2683310806751251,
-0.31236106157302856,
0.03029676526784897,
0.13559655845165253,
0.14745637774467468,
0.13861095905303955,
-0.28349071741104126,
0.08346009254455566,
0.29881784319877625,
0.25263047218322754,
0.004047529771924019,
0.22792883217334747,
0.0014281496405601501,
-0.08516145497560501,
0.14667466282844543,
0.2192406803369522,
0.12061962485313416,
0.4349907636642456,
0.09625853598117828,
0.24025051295757294,
-0.1528206169605255,
-0.06060486286878586,
0.06373624503612518,
0.36072856187820435,
0.10629194974899292,
-0.17744329571723938,
-0.3931463956832886,
-0.5815834403038025,
-0.07253524661064148,
-0.24270381033420563,
-0.022554777562618256,
0.5999752879142761,
0.09741492569446564,
0.13567322492599487,
-0.34531402587890625,
0.4047378599643707,
0.0860007107257843,
0.05282440781593323,
-0.5814108848571777,
0.2885783314704895,
-0.12214118242263794,
0.13516056537628174,
0.030286487191915512,
0.06326272338628769,
-0.028867892920970917,
-0.19883188605308533,
-0.2500884532928467,
0.0395122691988945,
-0.4507318139076233,
-0.04178665578365326,
0.11192986369132996,
0.18997307121753693,
0.4724313020706177,
0.054279178380966187,
-0.04819607734680176,
-0.29429373145103455,
-0.01761767454445362,
0.00036670267581939697,
0.4325560927391052,
0.42659991979599,
-0.17433518171310425,
0.2275736927986145,
0.0927324965596199,
0.11490824818611145,
-0.019496724009513855,
-0.06283936649560928,
0.2708759903907776,
-0.03011099249124527,
0.159787118434906,
-0.2030186653137207,
0.26797759532928467,
-0.02587433159351349,
-0.43752002716064453,
0.0222446508705616,
-0.2681673765182495,
-0.202574223279953,
-0.1704108566045761,
0.01300106942653656,
-0.12648053467273712,
0.5477064251899719,
-0.17650042474269867,
0.2452053427696228,
-0.12238629162311554,
-0.09279358386993408,
-0.4449469745159149,
-0.23317210376262665,
-0.3671616315841675,
-0.16686631739139557,
0.19404907524585724,
0.030314607545733452,
0.08039245754480362,
0.17235107719898224,
-0.019362561404705048,
-0.16939502954483032,
-0.03985598310828209,
-0.19980327785015106,
0.29188698530197144,
0.24862204492092133,
-0.10721883177757263,
0.19888734817504883,
-0.04187585040926933,
0.04460308700799942,
-0.2636721134185791,
0.19343599677085876,
-0.23649850487709045,
-0.29177790880203247,
0.017429016530513763,
0.1825328767299652,
-0.35634249448776245,
0.0938970074057579,
-0.054236359894275665,
0.22634311020374298,
0.262182354927063,
0.26301583647727966,
0.2818154990673065,
-0.31432604789733887,
-0.1986331045627594,
-0.21324673295021057,
0.2006429135799408,
0.1958393156528473,
-0.40721145272254944,
-0.07045838236808777,
-0.09085869789123535,
-0.050592150539159775,
0.20755550265312195,
0.46279796957969666,
-0.026991473510861397,
-0.01127517968416214,
-0.49092769622802734,
0.5839952826499939,
0.3337799906730652,
-0.18474091589450836,
-0.7810370922088623,
0.3557727336883545,
0.0753902792930603,
0.05644425004720688,
0.23331579566001892,
-0.0005367365665733814,
0.36844950914382935,
0.2864644229412079,
-0.061343878507614136,
0.413770854473114,
-0.2057543247938156,
0.17333850264549255,
-0.263331800699234,
-0.366874635219574,
0.26199302077293396,
-0.033950503915548325,
0.16569504141807556,
-0.09551198035478592,
0.17994312942028046,
-0.08197073638439178,
0.5920662879943848,
0.09181491285562515,
0.14285799860954285,
-0.053628109395504,
0.13632124662399292,
-0.17902393639087677,
0.20746777951717377,
-0.18558382987976074,
-0.26266273856163025,
0.26204586029052734,
0.021000131964683533,
-0.24597737193107605,
-0.05612806975841522,
-0.3968772292137146,
-0.4293869435787201,
-0.07168504595756531,
-0.0988183468580246,
-0.2956654727458954,
0.08091932535171509,
0.15714234113693237,
0.23094195127487183,
-0.010068079456686974,
-0.08773763477802277,
0.31018540263175964,
-0.03460725024342537,
0.1296837478876114,
0.000023014843463897705,
0.30070236325263977,
0.13849492371082306,
-0.043468717485666275,
-0.16432258486747742,
0.22760143876075745,
-0.04829265922307968,
0.07958562672138214,
-0.10451008379459381,
0.2608579695224762,
0.12518702447414398,
0.17639802396297455,
-0.15975186228752136,
0.01176317036151886,
0.28804224729537964,
0.18152418732643127,
0.1842619776725769,
-0.03822366148233414,
0.09503354132175446,
-0.15069672465324402,
-0.07864920049905777,
0.21107731759548187,
0.030798491090536118,
0.2659730911254883,
-0.08481098711490631,
-0.011190551333129406,
-0.045665811747312546,
-0.015828341245651245,
-0.060814373195171356,
-0.3203229010105133,
-0.18835224211215973,
-0.03773501142859459,
0.418917715549469,
0.21240027248859406,
-0.12220702320337296,
0.09111353754997253,
0.8537120223045349,
-0.0900641530752182,
-0.06859416514635086,
0.15905173122882843,
-0.3175017237663269,
-0.008860085159540176,
0.020618906244635582,
0.6288807392120361,
0.7725775837898254,
0.12878045439720154,
0.45656800270080566,
0.002524847164750099,
0.1225578561425209,
-0.22381271421909332,
0.14483267068862915,
0.14668871462345123,
-0.052583858370780945,
0.24629229307174683,
0.09282919019460678,
-0.2548309564590454,
-0.2565062344074249,
0.4005116820335388,
-0.04378461837768555,
-0.06626137346029282,
-0.26901209354400635,
0.12060839682817459,
-0.4177896976470947,
-0.27452966570854187,
-0.5073536038398743,
-0.3085499405860901,
-0.3899989426136017,
-0.3126724660396576,
-0.17253853380680084,
-0.08613927662372589,
0.08755528926849365,
-0.19082356989383698,
-0.15498144924640656,
0.3555687665939331,
0.20982420444488525,
0.15629635751247406,
-0.004318684339523315,
0.05338894948363304,
-0.4006670117378235,
0.05678856745362282,
-0.03231097012758255,
0.05743012577295303,
0.21229349076747894,
-0.19760866463184357,
-0.027787845581769943,
-0.14657600224018097,
-0.37252211570739746,
0.16297531127929688,
-0.19832377135753632,
0.12003298848867416,
0.23975226283073425,
0.22335834801197052,
0.1511082798242569,
0.12668021023273468,
0.10735014081001282,
-0.006364047527313232,
-0.16886866092681885,
0.025857415050268173,
0.027241097763180733,
0.23394832015037537,
-0.4608779549598694,
-0.19194242358207703,
-0.23352773487567902,
-0.24346619844436646,
0.43846309185028076,
-0.058538854122161865,
-0.06127222627401352,
-0.0313626192510128,
0.010701934807002544,
0.016183320432901382,
0.13865254819393158,
-0.024674030020833015,
-0.4783379137516022,
-0.19406118988990784,
0.2655811607837677,
0.07594766467809677,
-0.2569953203201294,
-0.12679706513881683,
-0.19752787053585052,
0.027862032875418663,
0.19704458117485046,
-0.47685670852661133,
-0.0995660126209259,
-0.47152990102767944,
-0.02747449465095997,
0.09726350009441376,
0.40944570302963257,
0.11290299892425537,
-0.39800316095352173,
0.08758514374494553,
-0.2557399272918701,
-0.17685672640800476,
0.09620369970798492,
0.107355996966362,
0.3056362569332123,
0.09346171468496323,
0.0888744592666626,
0.4936748445034027,
0.4007410407066345,
0.4790456295013428,
-0.12543343007564545,
0.08811827749013901,
-0.04926083981990814,
0.38986995816230774,
-0.025782376527786255,
0.005431104451417923,
0.41487422585487366,
-0.09032933413982391,
-0.09619543701410294,
0.2160179615020752,
0.09701608121395111,
0.002958047203719616,
0.1767115443944931,
0.0434083454310894,
-0.04990551993250847,
-0.27382031083106995,
-0.028049001470208168,
-0.1370949000120163,
-0.156936377286911,
0.1567203253507614,
0.15666639804840088,
0.06603379547595978,
0.0013778600841760635,
0.06251226365566254,
-0.026178106665611267,
-0.11824294179677963,
0.14003503322601318,
0.1541355848312378,
-0.009626084938645363,
-0.4117793142795563,
0.291825532913208,
0.16014674305915833,
0.16136027872562408,
0.31975439190864563,
-0.45043328404426575,
0.17797937989234924,
0.2635021507740021,
0.8604558110237122,
0.09056472778320312,
-0.06951022148132324,
-0.15807321667671204,
-0.011853108182549477,
-0.2369868904352188,
-0.39053210616111755,
-0.12847423553466797,
-0.10808522999286652,
0.41917651891708374,
-0.002061121165752411,
-0.3225107192993164,
-0.011340317316353321,
0.1896291971206665,
0.30718907713890076,
-0.060606081038713455,
-0.3005560040473938,
-0.25358083844184875,
-0.00985906645655632,
-0.03945557773113251,
0.11898452788591385,
0.08570840954780579,
0.18095938861370087,
-0.3422330915927887,
-0.11758415400981903,
-0.3090129494667053,
-0.4361903667449951,
0.05154132843017578,
0.13377591967582703,
0.5122968554496765,
-0.24229776859283447,
-0.006571125239133835,
0.1165354773402214,
0.21257826685905457,
0.007442181929945946,
0.839170515537262,
0.03290543705224991,
-0.10832810401916504,
0.13081365823745728,
-0.21821796894073486,
0.14589917659759521,
0.3617802560329437,
-0.08805976808071136,
-0.2215997874736786,
0.04737947881221771,
0.1196577176451683,
-0.3577594757080078,
0.17204564809799194,
0.3130095303058624,
0.047250308096408844,
0.026501106098294258,
-0.2097344696521759,
0.5101187825202942,
0.34018275141716003,
0.08897377550601959,
0.5479913949966431,
0.20901142060756683,
-0.20164017379283905,
-0.041337672621011734,
-0.07760760933160782,
0.8544129133224487,
0.2527662515640259,
0.16655714809894562,
0.28858909010887146,
-0.16664595901966095,
0.09091013669967651,
-0.13604220747947693,
0.04439527541399002,
-0.4308968484401703,
-0.11491751670837402,
-0.08616618812084198,
-0.22378307580947876,
-0.0803707167506218,
0.0062200166285037994,
-0.08456002175807953,
0.2446386218070984,
-0.0699407234787941,
0.47747400403022766,
-0.01574116200208664,
0.03928615152835846,
-0.5182384848594666,
0.007051246240735054,
0.02359643764793873,
0.07927779853343964,
-0.08521746098995209,
0.2643226087093353,
-0.019354049116373062,
-0.08563525229692459,
-0.21852612495422363,
-0.22841458022594452,
-0.3376960754394531,
-0.0693725124001503,
-0.2772231101989746,
0.20764222741127014,
-0.02187284082174301,
-0.24712735414505005,
-0.3256719708442688,
0.09025271981954575,
0.14074745774269104,
0.032550010830163956,
-0.14921735227108002,
0.27500826120376587,
0.13919708132743835,
0.3119108974933624,
0.1639939546585083,
-0.1276840716600418,
0.27333134412765503,
0.25403743982315063,
-0.19866400957107544,
-0.2498539686203003,
-0.006977470591664314,
0.08553050458431244,
-0.02919638156890869,
0.1742340326309204,
-0.31342077255249023,
-0.4427367150783539,
-0.24020911753177643,
-0.024662189185619354,
0.3526151478290558,
0.03401127830147743,
0.11373254656791687,
0.09606568515300751,
-0.03138969466090202,
0.3481006920337677,
0.038049012422561646,
-0.3696867525577545,
-0.3426959812641144,
0.16494512557983398,
0.10096491128206253,
-0.0038317032158374786,
0.1423654854297638,
-0.1548127382993698,
-0.09890596568584442,
-0.0010206960141658783,
0.0836816057562828,
-0.09109954535961151,
-0.1535361111164093,
0.2085431069135666,
-0.41380277276039124,
0.1052839607000351,
-0.08925581723451614,
-0.15594284236431122,
0.2344132363796234,
0.2032831311225891,
-0.18148651719093323,
-0.36260807514190674,
-0.012280931696295738,
0.10152794420719147,
-0.3872462809085846,
0.4859972894191742,
-0.14935052394866943,
0.14402855932712555,
0.07979203015565872,
-0.01294129528105259,
-0.23159466683864594,
0.17086660861968994,
0.15115517377853394,
-0.11051574349403381,
0.04521919786930084,
0.03880440443754196,
0.04617138206958771,
0.006323766894638538,
0.007243344560265541,
0.3013719916343689,
-0.1676756739616394,
-0.1824842095375061,
-0.23279954493045807,
0.12270952761173248,
0.07533600926399231,
0.1750546395778656,
0.21654266119003296,
-0.048581331968307495,
-0.04418749734759331,
-0.24170950055122375,
0.2967199981212616,
-0.1372506022453308,
-0.07360218465328217,
0.2788911759853363,
0.4262292683124542,
-0.013405732810497284,
-0.11024688184261322,
0.06647628545761108,
-0.048287540674209595,
0.2630118131637573,
-0.03365880623459816,
0.39903348684310913,
-0.062145017087459564,
0.2042531669139862,
-0.1755359023809433,
-0.08149652928113937,
-0.0674065500497818,
0.09896155446767807,
0.16649383306503296,
-0.06468814611434937,
0.08798491954803467,
-0.0753653272986412,
0.6102935075759888,
0.43075302243232727,
-0.09175083786249161,
-0.09638449549674988,
-0.2146489918231964,
0.21161246299743652,
-0.09693349152803421,
0.04300125315785408,
0.21629789471626282,
0.3314596116542816,
-0.061301037669181824,
0.3805054724216461,
0.40515753626823425,
0.22241732478141785,
-0.3123253583908081,
0.04165517911314964,
0.2089737355709076,
-0.07978909462690353,
0.31296423077583313,
0.6877022981643677,
-0.1852729171514511,
0.11311601102352142,
0.26922205090522766,
-0.057913411408662796,
0.28812918066978455,
0.5677851438522339,
-0.0893867090344429,
0.39768797159194946,
-0.1566581428050995,
-0.14251670241355896,
0.07521387934684753,
-0.2530019283294678,
-0.09261861443519592,
-0.006244882941246033,
-0.36612576246261597,
-0.07759355753660202,
0.29621538519859314,
0.42426735162734985,
-0.21328051388263702,
-0.22466132044792175,
-0.16892224550247192,
-0.11773131787776947,
-0.13124758005142212,
0.11058957874774933,
0.035196930170059204,
-0.1868966519832611,
-0.36069348454475403,
-0.017614636570215225,
-0.022402871400117874,
-0.02711072564125061,
0.6657516956329346,
0.07012203335762024,
-0.07109794020652771,
-0.44799530506134033,
-0.17900589108467102,
-0.0019846856594085693,
0.1633356213569641,
-0.34371545910835266,
-0.0038071293383836746,
0.14226798713207245,
-0.185636967420578,
0.25182658433914185,
0.30739060044288635,
0.543721616268158,
0.20230333507061005,
-0.027876488864421844,
-0.2134546935558319,
0.11229017376899719,
-0.055473022162914276,
-0.28213584423065186,
0.07247909158468246,
0.15632744133472443,
-0.07117478549480438,
0.26087433099746704,
0.15419530868530273,
-0.11974339932203293,
0.06142208352684975,
-0.1885523498058319,
0.06979356706142426,
-0.6993095874786377,
0.43293118476867676,
-0.15379638969898224,
-0.022678054869174957,
-0.32637444138526917,
-0.06543699651956558,
-0.525506317615509,
0.12702274322509766,
0.32137158513069153,
0.1285320371389389,
0.26704177260398865,
-0.28189322352409363,
0.057844407856464386,
0.04911570996046066,
0.18555834889411926,
0.17461568117141724,
0.13363519310951233,
-0.021334238350391388,
-0.05235592648386955,
-0.6662001609802246,
-0.03335285931825638,
-0.053436633199453354,
0.057362765073776245,
-0.09449100494384766,
0.34792837500572205,
-0.24221369624137878,
-0.12224607169628143,
0.3826088309288025,
0.12087342143058777,
0.10272207856178284,
-0.010071374475955963,
-0.23527294397354126,
-0.4965899586677551,
-0.3057131767272949,
-0.254499614238739,
0.054140426218509674,
-0.35461851954460144,
0.1728646159172058,
-0.2812579274177551,
-0.035342637449502945,
-0.038464151322841644,
0.023912742733955383,
0.3018796443939209,
0.07243864983320236,
0.2494942843914032,
0.36634528636932373,
0.3590433895587921,
0.014371708035469055,
0.010437378659844398,
-0.5201408863067627,
0.01913977600634098,
-0.32414349913597107,
0.15130409598350525,
-0.34256991744041443,
0.3572457432746887,
-0.27033090591430664,
-0.31027549505233765,
-0.18567761778831482,
0.03567017242312431,
0.18099839985370636,
-0.10210228711366653,
-0.07196395844221115,
-0.001042972318828106,
-0.19942891597747803,
0.05217433348298073,
0.3822111189365387,
0.36550551652908325,
-0.1626991182565689,
0.09676314145326614,
0.09108386933803558,
-0.5226587653160095,
0.24325096607208252,
-0.2012982815504074,
-0.30130791664123535,
-0.132834330201149,
0.12106063216924667,
0.3474271595478058,
-0.14136330783367157,
-0.7641276121139526,
0.07299237698316574,
0.4018123745918274,
-0.19831547141075134,
-0.10345518589019775,
0.1964798867702484,
0.2966475784778595,
-0.01159483939409256,
-0.18447767198085785,
0.22133761644363403,
0.22596052289009094,
-0.41510653495788574,
0.34417542815208435,
-0.3518528342247009
] |
https://github.com/huggingface/datasets/issues/5402 | Missing state.json when creating a cloud dataset using a dataset_builder | `load_from_disk` must be used on datasets saved using `save_to_disk`: they correspond to fully serialized datasets including their state.
On the other hand, `download_and_prepare` just downloads the raw data and convert them to arrow (or parquet if you want). We are working on allowing you to reload a dataset saved on S3 with `download_and_prepare` using `load_dataset` in #5281
For now I'd encourage you to keep using `save_to_disk` | ### Describe the bug
Using `load_dataset_builder` to create a builder, run `download_and_prepare` do upload it to S3. However when trying to load it, there are missing `state.json` files. Complete example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
As a comparison, if you use the non lazy `load_dataset`, it works and the S3 folder has different structure + state.json files. Example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_dataset, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
dataset = load_dataset("imdb",)
dataset.save_to_disk(output_dir, fs=fs)
load_from_disk(output_dir, fs=fs) # WORKS
```
You still want the 1st option for the laziness and the parquet conversion. Thanks!
### Steps to reproduce the bug
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
BTW, you need the AioSession as s3fs is now based on aiobotocore, see https://github.com/fsspec/s3fs/issues/385.
### Expected behavior
Expected to be able to load the dataset from S3.
### Environment info
```
s3fs 2022.11.0
s3transfer 0.6.0
datasets 2.8.0
aiobotocore 2.4.2
boto3 1.24.59
botocore 1.27.59
```
python 3.7.15. | 66 | Missing state.json when creating a cloud dataset using a dataset_builder
### Describe the bug
Using `load_dataset_builder` to create a builder, run `download_and_prepare` do upload it to S3. However when trying to load it, there are missing `state.json` files. Complete example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
As a comparison, if you use the non lazy `load_dataset`, it works and the S3 folder has different structure + state.json files. Example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_dataset, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
dataset = load_dataset("imdb",)
dataset.save_to_disk(output_dir, fs=fs)
load_from_disk(output_dir, fs=fs) # WORKS
```
You still want the 1st option for the laziness and the parquet conversion. Thanks!
### Steps to reproduce the bug
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
BTW, you need the AioSession as s3fs is now based on aiobotocore, see https://github.com/fsspec/s3fs/issues/385.
### Expected behavior
Expected to be able to load the dataset from S3.
### Environment info
```
s3fs 2022.11.0
s3transfer 0.6.0
datasets 2.8.0
aiobotocore 2.4.2
boto3 1.24.59
botocore 1.27.59
```
python 3.7.15.
`load_from_disk` must be used on datasets saved using `save_to_disk`: they correspond to fully serialized datasets including their state.
On the other hand, `download_and_prepare` just downloads the raw data and convert them to arrow (or parquet if you want). We are working on allowing you to reload a dataset saved on S3 with `download_and_prepare` using `load_dataset` in #5281
For now I'd encourage you to keep using `save_to_disk` | [
-0.2532854974269867,
0.19776985049247742,
0.008729513734579086,
0.4805905818939209,
0.1316860318183899,
0.11200118809938431,
0.4172387719154358,
0.23316419124603271,
-0.03772224113345146,
0.20437727868556976,
0.23392252624034882,
0.41359204053878784,
0.1034996435046196,
0.31614574790000916,
0.11504828184843063,
0.1286565661430359,
0.3739227056503296,
0.42841994762420654,
0.09389714151620865,
0.041391268372535706,
-0.15978474915027618,
0.26174283027648926,
-0.13670368492603302,
-0.32917213439941406,
-0.28328937292099,
0.2751047611236572,
-0.36597153544425964,
0.30274876952171326,
-0.15474405884742737,
-0.39568907022476196,
0.18404150009155273,
0.034381695091724396,
0.1499945968389511,
0.3578280210494995,
-0.00012250387226231396,
0.09978942573070526,
0.42373013496398926,
-0.08645933121442795,
-0.546794056892395,
-0.3530905246734619,
-0.5681458711624146,
-0.11643219739198685,
0.16741743683815002,
-0.0333271399140358,
-0.06978927552700043,
0.0631769672036171,
-0.008729571476578712,
-0.377603679895401,
0.32912012934684753,
0.3426579535007477,
0.0411926805973053,
0.37896814942359924,
-0.10266749560832977,
-0.1745360642671585,
0.19395190477371216,
0.5329782962799072,
-0.17925094068050385,
0.062318380922079086,
0.14918427169322968,
0.11508366465568542,
0.12055100500583649,
0.07433967292308807,
-0.19677871465682983,
-0.056053709238767624,
0.46817368268966675,
0.2533840835094452,
0.37828752398490906,
-0.3165799081325531,
0.00999147817492485,
0.1553698033094406,
0.8795714378356934,
0.035387683659791946,
-0.595112144947052,
-0.3901268541812897,
0.09326320141553879,
0.03487280011177063,
0.37680765986442566,
0.1397802233695984,
-0.1199830174446106,
-0.000981505960226059,
-0.1413874626159668,
-0.19727714359760284,
-0.09658484905958176,
0.10953588038682938,
0.027719855308532715,
0.10828014463186264,
-0.08833202719688416,
-0.11989723891019821,
-0.27159327268600464,
-0.07257047295570374,
0.587834358215332,
-0.567165732383728,
0.024950699880719185,
0.258145272731781,
-0.1852819323539734,
0.10293146967887878,
-0.009796544909477234,
-0.16918841004371643,
-0.16697219014167786,
0.281951367855072,
0.08847002685070038,
-0.30547791719436646,
0.056104760617017746,
0.16401484608650208,
0.3476235568523407,
-0.004485401324927807,
0.200245663523674,
0.07063532620668411,
0.01827738806605339,
0.15479043126106262,
0.13848719000816345,
-0.20981308817863464,
-0.2482941597700119,
-0.3248046636581421,
0.2864856719970703,
0.003507142886519432,
0.04882904142141342,
-0.05377740040421486,
-0.13150542974472046,
0.011173571459949017,
-0.027309350669384003,
0.12572965025901794,
0.011818904429674149,
0.058845020830631256,
-0.09896761178970337,
-0.13351932168006897,
0.19165049493312836,
0.4110165238380432,
-0.25055426359176636,
-0.10744252055883408,
-0.22371934354305267,
-0.12526866793632507,
0.08715270459651947,
0.11083495616912842,
0.15156814455986023,
-0.36591142416000366,
0.5193418860435486,
0.09420382231473923,
-0.03316989541053772,
-0.1095675453543663,
0.3131888806819916,
0.13663126528263092,
-0.06610260158777237,
0.40981969237327576,
0.41727638244628906,
0.06210047006607056,
-0.11796565353870392,
-0.5259038805961609,
-0.08698207139968872,
0.2577546536922455,
-0.23296454548835754,
-0.4225853979587555,
-0.5722176432609558,
0.10110709071159363,
-0.4323028326034546,
-0.0031524188816547394,
-0.6497443318367004,
-0.11694546043872833,
0.1427692025899887,
-0.2888390123844147,
-0.09556024521589279,
-0.15103892982006073,
0.004017096012830734,
-0.12395390123128891,
0.3818032443523407,
0.6254810094833374,
-0.13274118304252625,
-0.2203971892595291,
-0.44723615050315857,
-0.07724787294864655,
0.11290007829666138,
-0.04194815829396248,
-0.10171787440776825,
0.3640575706958771,
-0.36670926213264465,
0.08261710405349731,
0.4291980266571045,
-0.3541233241558075,
-0.11872301995754242,
0.37207576632499695,
0.02192174643278122,
0.12042251974344254,
0.2542777955532074,
0.09517449140548706,
0.055984385311603546,
-0.23579224944114685,
0.18170027434825897,
0.17091894149780273,
-0.0628730058670044,
0.0016952846199274063,
0.016869131475687027,
-0.1490316092967987,
0.05291743576526642,
0.33242690563201904,
0.13168767094612122,
0.2915739119052887,
0.08809249848127365,
-0.056159719824790955,
0.0548623763024807,
-0.13048003613948822,
0.20743787288665771,
0.2996644377708435,
0.2182030975818634,
0.019933752715587616,
-0.11588164418935776,
0.13414260745048523,
-0.8731092810630798,
0.29844191670417786,
0.051033519208431244,
0.08093146979808807,
-0.09869363903999329,
-0.043380070477724075,
0.09343533217906952,
-0.11573480814695358,
-0.28190845251083374,
0.10694959759712219,
0.004878498613834381,
0.06935400515794754,
0.152868390083313,
0.049132395535707474,
-0.08862639218568802,
-0.06684127449989319,
0.18965394794940948,
0.190508171916008,
-0.24623258411884308,
0.39035463333129883,
-0.030146995559334755,
-0.40870392322540283,
0.39696064591407776,
-0.1473444402217865,
0.060542210936546326,
0.002393237082287669,
-0.18506789207458496,
0.2172250747680664,
0.12643112242221832,
0.3025189936161041,
-0.17325469851493835,
0.21633420884609222,
0.162927508354187,
0.4135800004005432,
0.24845239520072937,
-0.1708991974592209,
0.07357841730117798,
-0.24856916069984436,
-0.2719072103500366,
0.18005412817001343,
0.019427279010415077,
0.34399449825286865,
0.0036840923130512238,
-0.025824587792158127,
0.13963912427425385,
0.1596512794494629,
-0.011791572906076908,
-0.22978973388671875,
0.01625186949968338,
-0.013833075761795044,
0.2004726231098175,
0.217948317527771,
-0.08759638667106628,
0.10607989132404327,
0.20912864804267883,
-0.23780056834220886,
-0.013230189681053162,
0.03802341967821121,
-0.21202373504638672,
-0.13440226018428802,
0.14628130197525024,
0.07512061297893524,
0.7747647762298584,
0.02990332990884781,
0.009873706847429276,
-0.11799316853284836,
0.18613584339618683,
-0.22264128923416138,
0.35484614968299866,
0.2140350490808487,
0.528032660484314,
0.2687831521034241,
0.15739783644676208,
-0.03715888410806656,
-0.19569170475006104,
-0.33711037039756775,
0.1502828747034073,
0.05028035491704941,
-0.43329545855522156,
-0.122667595744133,
-0.2525233328342438,
-0.08611170947551727,
0.02875218354165554,
0.24117571115493774,
-0.16737376153469086,
-0.3314114212989807,
-0.13291838765144348,
0.28483322262763977,
-0.09073378890752792,
-0.2100968211889267,
0.011471297591924667,
0.11279717832803726,
0.017095116898417473,
-0.11810033768415451,
-0.37507596611976624,
-0.008279168978333473,
-0.3077247440814972,
-0.046821702271699905,
0.20654934644699097,
-0.06860183924436569,
-0.031017305329442024,
-0.3790411949157715,
0.2273203581571579,
-0.35959842801094055,
-0.13774549961090088,
0.21961809694766998,
-0.051398925483226776,
0.5976997017860413,
0.1779346466064453,
0.11072535067796707,
0.11239504814147949,
0.042646076530218124,
0.29476815462112427,
0.24924921989440918,
-0.24878789484500885,
0.2561202645301819,
-0.10308849811553955,
-0.354362428188324,
-0.02968914806842804,
-0.16202175617218018,
-0.07135238498449326,
-0.13887643814086914,
0.004462946206331253,
0.12777535617351532,
0.07158932089805603,
-0.28818485140800476,
0.2685646712779999,
0.14961948990821838,
0.04064711928367615,
0.04826005548238754,
-0.06571896374225616,
-0.8443080186843872,
0.4635087847709656,
-0.3607085645198822,
-0.08966372907161713,
0.13521960377693176,
-0.06373226642608643,
0.40939861536026,
-0.22915610671043396,
-0.6268811821937561,
0.04650761932134628,
-0.0539722815155983,
0.1740105003118515,
-0.24507397413253784,
-0.03231704235076904,
0.3842328190803528,
0.10819360613822937,
0.09154330939054489,
-0.1761859953403473,
-0.29657986760139465,
-0.0953202024102211,
0.285709410905838,
0.3351297378540039,
-0.29109933972358704,
0.47935280203819275,
-0.08654424548149109,
0.6806164383888245,
0.3787810504436493,
-0.12682728469371796,
0.24650052189826965,
-0.18713729083538055,
0.08996336162090302,
-0.3202081322669983,
0.02266172505915165,
0.09465143084526062,
-0.03642605245113373,
-0.1347045600414276,
-0.005505397915840149,
-0.021663468331098557,
-0.08304760605096817,
-0.12553523480892181,
-0.09756948053836823,
-0.45548322796821594,
-0.1854507178068161,
-0.03501003235578537,
-0.23807770013809204,
0.2050914466381073,
0.04727114364504814,
-0.07381770014762878,
-0.2528849244117737,
0.014194147661328316,
0.12488409876823425,
0.3909124732017517,
0.6763410568237305,
0.15057387948036194,
0.040354933589696884,
-0.3703972399234772,
-0.3016560971736908,
0.22108429670333862,
0.0940079540014267,
0.0197548009455204,
-0.05084101855754852,
0.10109397023916245,
-0.018977120518684387,
0.07609069347381592,
0.7637637853622437,
-0.6462437510490417,
-0.15927885472774506,
0.26428571343421936,
-0.05579447001218796,
-0.3106137812137604,
-0.02787826955318451,
0.016456570476293564,
0.1718425750732422,
0.206422358751297,
0.551275372505188,
-0.10838624835014343,
-0.3111613392829895,
-0.13336347043514252,
0.05028047040104866,
-0.18037018179893494,
-0.5183402299880981,
-0.3654114603996277,
0.011160764843225479,
-0.3139016032218933,
-0.12850481271743774,
-0.006757955998182297,
0.09362208098173141,
0.006614287383854389,
-0.3289467394351959,
-0.17859375476837158,
0.16146090626716614,
-0.09797155857086182,
0.018633902072906494,
0.24454370141029358,
0.01980927586555481,
0.5349639058113098,
0.13751013576984406,
-0.08246895670890808,
0.5861679911613464,
0.6260332465171814,
0.4875333905220032,
-0.1601617932319641,
0.15123412013053894,
-0.44351962208747864,
0.461233526468277,
-0.07723283767700195,
0.0874565988779068,
-0.28085681796073914,
0.24429026246070862,
0.15334810316562653,
-0.35742709040641785,
-0.06817664951086044,
0.20050311088562012,
-0.26083213090896606,
0.05087965354323387,
-0.4433498978614807,
0.3532250225543976,
0.1488519310951233,
-0.014869622886180878,
-0.16513265669345856,
0.06391911208629608,
-0.2325206845998764,
0.48533904552459717,
0.2689269781112671,
0.5850316882133484,
-0.012951448559761047,
0.2706587612628937,
0.34205228090286255,
0.031609922647476196,
0.5325148701667786,
-0.1675216406583786,
0.04443306103348732,
-0.17246249318122864,
-0.09922883659601212,
-0.01707058772444725,
-0.32940271496772766,
0.23446229100227356,
0.2875550389289856,
-0.01791664958000183,
0.414103239774704,
-0.26212599873542786,
0.1505202203989029,
-0.004940103739500046,
0.2623845636844635,
-0.26955994963645935,
-0.4463275969028473,
0.07444646954536438,
0.10117366909980774,
-0.03328883647918701,
0.16673973202705383,
-0.027079112827777863,
-0.07131194323301315,
-0.1763496845960617,
0.044407449662685394,
-0.16385725140571594,
0.22287195920944214,
0.058902475982904434,
0.07446201145648956,
0.17063622176647186,
-0.09888409078121185,
0.37984520196914673,
0.30367839336395264,
0.05331462249159813,
-0.015527479350566864,
-0.1811387687921524,
0.25372880697250366,
0.3387913405895233,
0.15805812180042267,
0.011245975270867348,
-0.2785823941230774,
0.49550938606262207,
-0.10151499509811401,
0.046017177402973175,
-0.1350095570087433,
-0.3432409167289734,
0.05101121962070465,
-0.0862983986735344,
-0.29779237508773804,
-0.10831910371780396,
-0.1663157194852829,
-0.1392408162355423,
0.008269503712654114,
0.16559243202209473,
-0.12467914819717407,
0.06470780074596405,
0.24430207908153534,
0.041482750326395035,
-0.07386884838342667,
-0.2669616639614105,
-0.11498565971851349,
-0.09043028950691223,
0.46776074171066284,
0.13294196128845215,
-0.026277098804712296,
0.6771653890609741,
0.05667790398001671,
-0.039335697889328,
-0.1248345896601677,
0.0901990756392479,
-0.09624767303466797,
-0.17257271707057953,
0.25558459758758545,
-0.07614491879940033,
-0.0013247877359390259,
-0.03245297819375992,
0.042311809957027435,
0.07198697328567505,
-0.2453785240650177,
0.17763842642307281,
-0.3136061429977417,
-0.1399916559457779,
-0.05757895112037659,
0.057557106018066406,
0.1021016389131546,
-0.224992573261261,
-0.1878627985715866,
-0.025765882804989815,
-0.31215694546699524,
-0.16869118809700012,
-0.11821425706148148,
-0.14913034439086914,
0.34442880749702454,
-0.12393400073051453,
0.24278110265731812,
-0.027133893221616745,
-0.4100736081600189,
0.04098851978778839,
-0.15266160666942596,
0.12156856060028076,
-0.11565151810646057,
-0.2666095197200775,
0.18153630197048187,
0.2996048629283905,
0.09161246567964554,
0.10784376412630081,
-0.06544622778892517,
-0.25903552770614624,
-0.15161089599132538,
0.3097144663333893,
-0.1684897243976593,
-0.11702403426170349,
0.024490993469953537,
-0.12908022105693817,
0.008054867386817932,
-0.1389445811510086,
-0.07150710374116898,
-0.005749166011810303,
0.085010826587677,
-0.26143476366996765,
0.13182121515274048,
0.06323204934597015,
0.05153045058250427,
0.16303452849388123,
0.06550978124141693,
-0.2677870988845825,
0.45418694615364075,
0.5902210474014282,
-0.4388046860694885,
0.10048376023769379,
-0.075386181473732,
0.12818686664104462,
0.180137038230896,
-0.1529812216758728,
0.17885781824588776,
0.14044344425201416,
0.1558278203010559,
-0.02200762927532196,
-0.20524778962135315,
-0.2772299647331238,
0.09193968772888184,
-0.1360868513584137,
-0.006238959729671478,
-0.1100330576300621,
-0.05150595307350159,
-0.3062330484390259,
0.10809654742479324,
0.21897555887699127,
-0.026813898235559464,
-0.005669468082487583,
-0.05463190749287605,
-0.057413652539253235,
0.38292646408081055,
0.17337840795516968,
0.09683522582054138,
-0.04698751121759415,
0.29912954568862915,
0.35903388261795044,
-0.08916305005550385,
0.2868690490722656,
0.31214267015457153,
-0.08711130172014236,
-0.36263859272003174,
-0.056314315646886826,
0.028147578239440918,
-0.13576200604438782,
0.20405715703964233,
0.10022223740816116,
-0.019464023411273956,
-0.05154259875416756,
-0.022164752706885338,
-0.43230196833610535,
0.04256827384233475,
-0.11546889692544937,
-0.0827806293964386,
-0.5485848188400269,
0.040633998811244965,
0.035490043461322784,
0.1843372881412506,
0.05211785435676575,
-0.08762212097644806,
-0.14855636656284332,
0.3467068076133728,
0.11223504692316055,
-0.2311209887266159,
0.03162292391061783,
0.2867557108402252,
0.044967345893383026,
-0.3394910991191864,
0.11713212728500366,
0.1342749446630478,
-0.4225805699825287,
-0.09137238562107086,
0.22453251481056213,
0.5632354617118835,
0.2369014322757721,
-0.2107366919517517,
-0.02630889043211937,
0.16505827009677887,
-0.19240888953208923,
-0.040855057537555695,
0.19308264553546906,
-0.01962527632713318,
0.31550920009613037,
0.07599274814128876,
0.1164846420288086,
-0.045068562030792236,
0.0022388994693756104,
0.11208026111125946,
0.40343695878982544,
-0.27319034934043884,
0.359709233045578,
-0.33822566270828247,
-0.1533856987953186,
-0.03218858689069748,
0.14533808827400208,
-0.48190250992774963,
-0.3010285496711731,
0.2860874831676483,
0.08786953240633011,
0.1668272316455841,
-0.03938063234090805,
-0.004556676372885704,
-0.19997428357601166,
0.34720537066459656,
0.1554013341665268,
-0.20041021704673767,
-0.40901970863342285,
0.04586820304393768,
-0.3135356903076172,
-0.2208554744720459,
0.03268240764737129,
-0.07945246994495392,
0.1288401484489441,
0.3777341842651367,
-0.023328930139541626,
-0.09644895792007446,
-0.06281796097755432,
0.2925804853439331,
-0.13121850788593292,
0.25388550758361816,
-0.11348827183246613,
-0.37169548869132996,
-0.26258528232574463,
0.00007652491331100464,
-0.0015396364033222198,
-0.1305851936340332,
0.1380884200334549,
-0.18440568447113037,
-0.08881933987140656,
-0.08593203872442245,
0.0817185491323471,
0.3212604224681854,
-0.1550753116607666,
0.6211469769477844,
0.04449934884905815,
0.16840893030166626,
-0.0473940372467041,
-0.19951437413692474,
-0.13568782806396484,
-0.06254049390554428,
-0.08394486457109451,
0.37175503373146057,
-0.27686551213264465,
0.5569475889205933,
-0.22386343777179718,
0.376844584941864,
-0.3252270519733429,
-0.22429071366786957,
-0.029847899451851845,
-0.21087715029716492,
-0.6423898339271545,
0.3218385875225067,
-0.3592657148838043,
0.3994581699371338,
0.3166345953941345,
-0.002364281564950943,
-0.17215876281261444,
0.04704928398132324,
-0.2598778009414673,
-0.16779373586177826,
0.3149159550666809,
-0.48280245065689087,
-0.09671176970005035,
-0.055263303220272064,
0.2002888023853302,
0.3243430554866791,
0.12325781583786011,
-0.18604010343551636,
-0.03188692033290863,
0.3765195906162262,
-0.20969951152801514,
-0.12728355824947357,
0.1577431708574295,
0.13140588998794556,
0.06652399897575378,
-0.07735783606767654,
0.10513217002153397,
-0.10579150170087814,
-0.17550551891326904,
-0.03155399113893509,
-0.20641069114208221
] |
https://github.com/huggingface/datasets/issues/5402 | Missing state.json when creating a cloud dataset using a dataset_builder | Thanks, I'll follow that issue.
I was following the [cloud storage](https://huggingface.co/docs/datasets/filesystems) docs section and perhaps I'm missing some part of the flow; start with `load_dataset_builder` + `download_and_prepare`. You say I need an explicit `save_to_disk` but what object needs to be saved? the builder? is that related to the other issue? | ### Describe the bug
Using `load_dataset_builder` to create a builder, run `download_and_prepare` do upload it to S3. However when trying to load it, there are missing `state.json` files. Complete example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
As a comparison, if you use the non lazy `load_dataset`, it works and the S3 folder has different structure + state.json files. Example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_dataset, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
dataset = load_dataset("imdb",)
dataset.save_to_disk(output_dir, fs=fs)
load_from_disk(output_dir, fs=fs) # WORKS
```
You still want the 1st option for the laziness and the parquet conversion. Thanks!
### Steps to reproduce the bug
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
BTW, you need the AioSession as s3fs is now based on aiobotocore, see https://github.com/fsspec/s3fs/issues/385.
### Expected behavior
Expected to be able to load the dataset from S3.
### Environment info
```
s3fs 2022.11.0
s3transfer 0.6.0
datasets 2.8.0
aiobotocore 2.4.2
boto3 1.24.59
botocore 1.27.59
```
python 3.7.15. | 50 | Missing state.json when creating a cloud dataset using a dataset_builder
### Describe the bug
Using `load_dataset_builder` to create a builder, run `download_and_prepare` do upload it to S3. However when trying to load it, there are missing `state.json` files. Complete example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
As a comparison, if you use the non lazy `load_dataset`, it works and the S3 folder has different structure + state.json files. Example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_dataset, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
dataset = load_dataset("imdb",)
dataset.save_to_disk(output_dir, fs=fs)
load_from_disk(output_dir, fs=fs) # WORKS
```
You still want the 1st option for the laziness and the parquet conversion. Thanks!
### Steps to reproduce the bug
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
BTW, you need the AioSession as s3fs is now based on aiobotocore, see https://github.com/fsspec/s3fs/issues/385.
### Expected behavior
Expected to be able to load the dataset from S3.
### Environment info
```
s3fs 2022.11.0
s3transfer 0.6.0
datasets 2.8.0
aiobotocore 2.4.2
boto3 1.24.59
botocore 1.27.59
```
python 3.7.15.
Thanks, I'll follow that issue.
I was following the [cloud storage](https://huggingface.co/docs/datasets/filesystems) docs section and perhaps I'm missing some part of the flow; start with `load_dataset_builder` + `download_and_prepare`. You say I need an explicit `save_to_disk` but what object needs to be saved? the builder? is that related to the other issue? | [
-0.2532854974269867,
0.19776985049247742,
0.008729513734579086,
0.4805905818939209,
0.1316860318183899,
0.11200118809938431,
0.4172387719154358,
0.23316419124603271,
-0.03772224113345146,
0.20437727868556976,
0.23392252624034882,
0.41359204053878784,
0.1034996435046196,
0.31614574790000916,
0.11504828184843063,
0.1286565661430359,
0.3739227056503296,
0.42841994762420654,
0.09389714151620865,
0.041391268372535706,
-0.15978474915027618,
0.26174283027648926,
-0.13670368492603302,
-0.32917213439941406,
-0.28328937292099,
0.2751047611236572,
-0.36597153544425964,
0.30274876952171326,
-0.15474405884742737,
-0.39568907022476196,
0.18404150009155273,
0.034381695091724396,
0.1499945968389511,
0.3578280210494995,
-0.00012250387226231396,
0.09978942573070526,
0.42373013496398926,
-0.08645933121442795,
-0.546794056892395,
-0.3530905246734619,
-0.5681458711624146,
-0.11643219739198685,
0.16741743683815002,
-0.0333271399140358,
-0.06978927552700043,
0.0631769672036171,
-0.008729571476578712,
-0.377603679895401,
0.32912012934684753,
0.3426579535007477,
0.0411926805973053,
0.37896814942359924,
-0.10266749560832977,
-0.1745360642671585,
0.19395190477371216,
0.5329782962799072,
-0.17925094068050385,
0.062318380922079086,
0.14918427169322968,
0.11508366465568542,
0.12055100500583649,
0.07433967292308807,
-0.19677871465682983,
-0.056053709238767624,
0.46817368268966675,
0.2533840835094452,
0.37828752398490906,
-0.3165799081325531,
0.00999147817492485,
0.1553698033094406,
0.8795714378356934,
0.035387683659791946,
-0.595112144947052,
-0.3901268541812897,
0.09326320141553879,
0.03487280011177063,
0.37680765986442566,
0.1397802233695984,
-0.1199830174446106,
-0.000981505960226059,
-0.1413874626159668,
-0.19727714359760284,
-0.09658484905958176,
0.10953588038682938,
0.027719855308532715,
0.10828014463186264,
-0.08833202719688416,
-0.11989723891019821,
-0.27159327268600464,
-0.07257047295570374,
0.587834358215332,
-0.567165732383728,
0.024950699880719185,
0.258145272731781,
-0.1852819323539734,
0.10293146967887878,
-0.009796544909477234,
-0.16918841004371643,
-0.16697219014167786,
0.281951367855072,
0.08847002685070038,
-0.30547791719436646,
0.056104760617017746,
0.16401484608650208,
0.3476235568523407,
-0.004485401324927807,
0.200245663523674,
0.07063532620668411,
0.01827738806605339,
0.15479043126106262,
0.13848719000816345,
-0.20981308817863464,
-0.2482941597700119,
-0.3248046636581421,
0.2864856719970703,
0.003507142886519432,
0.04882904142141342,
-0.05377740040421486,
-0.13150542974472046,
0.011173571459949017,
-0.027309350669384003,
0.12572965025901794,
0.011818904429674149,
0.058845020830631256,
-0.09896761178970337,
-0.13351932168006897,
0.19165049493312836,
0.4110165238380432,
-0.25055426359176636,
-0.10744252055883408,
-0.22371934354305267,
-0.12526866793632507,
0.08715270459651947,
0.11083495616912842,
0.15156814455986023,
-0.36591142416000366,
0.5193418860435486,
0.09420382231473923,
-0.03316989541053772,
-0.1095675453543663,
0.3131888806819916,
0.13663126528263092,
-0.06610260158777237,
0.40981969237327576,
0.41727638244628906,
0.06210047006607056,
-0.11796565353870392,
-0.5259038805961609,
-0.08698207139968872,
0.2577546536922455,
-0.23296454548835754,
-0.4225853979587555,
-0.5722176432609558,
0.10110709071159363,
-0.4323028326034546,
-0.0031524188816547394,
-0.6497443318367004,
-0.11694546043872833,
0.1427692025899887,
-0.2888390123844147,
-0.09556024521589279,
-0.15103892982006073,
0.004017096012830734,
-0.12395390123128891,
0.3818032443523407,
0.6254810094833374,
-0.13274118304252625,
-0.2203971892595291,
-0.44723615050315857,
-0.07724787294864655,
0.11290007829666138,
-0.04194815829396248,
-0.10171787440776825,
0.3640575706958771,
-0.36670926213264465,
0.08261710405349731,
0.4291980266571045,
-0.3541233241558075,
-0.11872301995754242,
0.37207576632499695,
0.02192174643278122,
0.12042251974344254,
0.2542777955532074,
0.09517449140548706,
0.055984385311603546,
-0.23579224944114685,
0.18170027434825897,
0.17091894149780273,
-0.0628730058670044,
0.0016952846199274063,
0.016869131475687027,
-0.1490316092967987,
0.05291743576526642,
0.33242690563201904,
0.13168767094612122,
0.2915739119052887,
0.08809249848127365,
-0.056159719824790955,
0.0548623763024807,
-0.13048003613948822,
0.20743787288665771,
0.2996644377708435,
0.2182030975818634,
0.019933752715587616,
-0.11588164418935776,
0.13414260745048523,
-0.8731092810630798,
0.29844191670417786,
0.051033519208431244,
0.08093146979808807,
-0.09869363903999329,
-0.043380070477724075,
0.09343533217906952,
-0.11573480814695358,
-0.28190845251083374,
0.10694959759712219,
0.004878498613834381,
0.06935400515794754,
0.152868390083313,
0.049132395535707474,
-0.08862639218568802,
-0.06684127449989319,
0.18965394794940948,
0.190508171916008,
-0.24623258411884308,
0.39035463333129883,
-0.030146995559334755,
-0.40870392322540283,
0.39696064591407776,
-0.1473444402217865,
0.060542210936546326,
0.002393237082287669,
-0.18506789207458496,
0.2172250747680664,
0.12643112242221832,
0.3025189936161041,
-0.17325469851493835,
0.21633420884609222,
0.162927508354187,
0.4135800004005432,
0.24845239520072937,
-0.1708991974592209,
0.07357841730117798,
-0.24856916069984436,
-0.2719072103500366,
0.18005412817001343,
0.019427279010415077,
0.34399449825286865,
0.0036840923130512238,
-0.025824587792158127,
0.13963912427425385,
0.1596512794494629,
-0.011791572906076908,
-0.22978973388671875,
0.01625186949968338,
-0.013833075761795044,
0.2004726231098175,
0.217948317527771,
-0.08759638667106628,
0.10607989132404327,
0.20912864804267883,
-0.23780056834220886,
-0.013230189681053162,
0.03802341967821121,
-0.21202373504638672,
-0.13440226018428802,
0.14628130197525024,
0.07512061297893524,
0.7747647762298584,
0.02990332990884781,
0.009873706847429276,
-0.11799316853284836,
0.18613584339618683,
-0.22264128923416138,
0.35484614968299866,
0.2140350490808487,
0.528032660484314,
0.2687831521034241,
0.15739783644676208,
-0.03715888410806656,
-0.19569170475006104,
-0.33711037039756775,
0.1502828747034073,
0.05028035491704941,
-0.43329545855522156,
-0.122667595744133,
-0.2525233328342438,
-0.08611170947551727,
0.02875218354165554,
0.24117571115493774,
-0.16737376153469086,
-0.3314114212989807,
-0.13291838765144348,
0.28483322262763977,
-0.09073378890752792,
-0.2100968211889267,
0.011471297591924667,
0.11279717832803726,
0.017095116898417473,
-0.11810033768415451,
-0.37507596611976624,
-0.008279168978333473,
-0.3077247440814972,
-0.046821702271699905,
0.20654934644699097,
-0.06860183924436569,
-0.031017305329442024,
-0.3790411949157715,
0.2273203581571579,
-0.35959842801094055,
-0.13774549961090088,
0.21961809694766998,
-0.051398925483226776,
0.5976997017860413,
0.1779346466064453,
0.11072535067796707,
0.11239504814147949,
0.042646076530218124,
0.29476815462112427,
0.24924921989440918,
-0.24878789484500885,
0.2561202645301819,
-0.10308849811553955,
-0.354362428188324,
-0.02968914806842804,
-0.16202175617218018,
-0.07135238498449326,
-0.13887643814086914,
0.004462946206331253,
0.12777535617351532,
0.07158932089805603,
-0.28818485140800476,
0.2685646712779999,
0.14961948990821838,
0.04064711928367615,
0.04826005548238754,
-0.06571896374225616,
-0.8443080186843872,
0.4635087847709656,
-0.3607085645198822,
-0.08966372907161713,
0.13521960377693176,
-0.06373226642608643,
0.40939861536026,
-0.22915610671043396,
-0.6268811821937561,
0.04650761932134628,
-0.0539722815155983,
0.1740105003118515,
-0.24507397413253784,
-0.03231704235076904,
0.3842328190803528,
0.10819360613822937,
0.09154330939054489,
-0.1761859953403473,
-0.29657986760139465,
-0.0953202024102211,
0.285709410905838,
0.3351297378540039,
-0.29109933972358704,
0.47935280203819275,
-0.08654424548149109,
0.6806164383888245,
0.3787810504436493,
-0.12682728469371796,
0.24650052189826965,
-0.18713729083538055,
0.08996336162090302,
-0.3202081322669983,
0.02266172505915165,
0.09465143084526062,
-0.03642605245113373,
-0.1347045600414276,
-0.005505397915840149,
-0.021663468331098557,
-0.08304760605096817,
-0.12553523480892181,
-0.09756948053836823,
-0.45548322796821594,
-0.1854507178068161,
-0.03501003235578537,
-0.23807770013809204,
0.2050914466381073,
0.04727114364504814,
-0.07381770014762878,
-0.2528849244117737,
0.014194147661328316,
0.12488409876823425,
0.3909124732017517,
0.6763410568237305,
0.15057387948036194,
0.040354933589696884,
-0.3703972399234772,
-0.3016560971736908,
0.22108429670333862,
0.0940079540014267,
0.0197548009455204,
-0.05084101855754852,
0.10109397023916245,
-0.018977120518684387,
0.07609069347381592,
0.7637637853622437,
-0.6462437510490417,
-0.15927885472774506,
0.26428571343421936,
-0.05579447001218796,
-0.3106137812137604,
-0.02787826955318451,
0.016456570476293564,
0.1718425750732422,
0.206422358751297,
0.551275372505188,
-0.10838624835014343,
-0.3111613392829895,
-0.13336347043514252,
0.05028047040104866,
-0.18037018179893494,
-0.5183402299880981,
-0.3654114603996277,
0.011160764843225479,
-0.3139016032218933,
-0.12850481271743774,
-0.006757955998182297,
0.09362208098173141,
0.006614287383854389,
-0.3289467394351959,
-0.17859375476837158,
0.16146090626716614,
-0.09797155857086182,
0.018633902072906494,
0.24454370141029358,
0.01980927586555481,
0.5349639058113098,
0.13751013576984406,
-0.08246895670890808,
0.5861679911613464,
0.6260332465171814,
0.4875333905220032,
-0.1601617932319641,
0.15123412013053894,
-0.44351962208747864,
0.461233526468277,
-0.07723283767700195,
0.0874565988779068,
-0.28085681796073914,
0.24429026246070862,
0.15334810316562653,
-0.35742709040641785,
-0.06817664951086044,
0.20050311088562012,
-0.26083213090896606,
0.05087965354323387,
-0.4433498978614807,
0.3532250225543976,
0.1488519310951233,
-0.014869622886180878,
-0.16513265669345856,
0.06391911208629608,
-0.2325206845998764,
0.48533904552459717,
0.2689269781112671,
0.5850316882133484,
-0.012951448559761047,
0.2706587612628937,
0.34205228090286255,
0.031609922647476196,
0.5325148701667786,
-0.1675216406583786,
0.04443306103348732,
-0.17246249318122864,
-0.09922883659601212,
-0.01707058772444725,
-0.32940271496772766,
0.23446229100227356,
0.2875550389289856,
-0.01791664958000183,
0.414103239774704,
-0.26212599873542786,
0.1505202203989029,
-0.004940103739500046,
0.2623845636844635,
-0.26955994963645935,
-0.4463275969028473,
0.07444646954536438,
0.10117366909980774,
-0.03328883647918701,
0.16673973202705383,
-0.027079112827777863,
-0.07131194323301315,
-0.1763496845960617,
0.044407449662685394,
-0.16385725140571594,
0.22287195920944214,
0.058902475982904434,
0.07446201145648956,
0.17063622176647186,
-0.09888409078121185,
0.37984520196914673,
0.30367839336395264,
0.05331462249159813,
-0.015527479350566864,
-0.1811387687921524,
0.25372880697250366,
0.3387913405895233,
0.15805812180042267,
0.011245975270867348,
-0.2785823941230774,
0.49550938606262207,
-0.10151499509811401,
0.046017177402973175,
-0.1350095570087433,
-0.3432409167289734,
0.05101121962070465,
-0.0862983986735344,
-0.29779237508773804,
-0.10831910371780396,
-0.1663157194852829,
-0.1392408162355423,
0.008269503712654114,
0.16559243202209473,
-0.12467914819717407,
0.06470780074596405,
0.24430207908153534,
0.041482750326395035,
-0.07386884838342667,
-0.2669616639614105,
-0.11498565971851349,
-0.09043028950691223,
0.46776074171066284,
0.13294196128845215,
-0.026277098804712296,
0.6771653890609741,
0.05667790398001671,
-0.039335697889328,
-0.1248345896601677,
0.0901990756392479,
-0.09624767303466797,
-0.17257271707057953,
0.25558459758758545,
-0.07614491879940033,
-0.0013247877359390259,
-0.03245297819375992,
0.042311809957027435,
0.07198697328567505,
-0.2453785240650177,
0.17763842642307281,
-0.3136061429977417,
-0.1399916559457779,
-0.05757895112037659,
0.057557106018066406,
0.1021016389131546,
-0.224992573261261,
-0.1878627985715866,
-0.025765882804989815,
-0.31215694546699524,
-0.16869118809700012,
-0.11821425706148148,
-0.14913034439086914,
0.34442880749702454,
-0.12393400073051453,
0.24278110265731812,
-0.027133893221616745,
-0.4100736081600189,
0.04098851978778839,
-0.15266160666942596,
0.12156856060028076,
-0.11565151810646057,
-0.2666095197200775,
0.18153630197048187,
0.2996048629283905,
0.09161246567964554,
0.10784376412630081,
-0.06544622778892517,
-0.25903552770614624,
-0.15161089599132538,
0.3097144663333893,
-0.1684897243976593,
-0.11702403426170349,
0.024490993469953537,
-0.12908022105693817,
0.008054867386817932,
-0.1389445811510086,
-0.07150710374116898,
-0.005749166011810303,
0.085010826587677,
-0.26143476366996765,
0.13182121515274048,
0.06323204934597015,
0.05153045058250427,
0.16303452849388123,
0.06550978124141693,
-0.2677870988845825,
0.45418694615364075,
0.5902210474014282,
-0.4388046860694885,
0.10048376023769379,
-0.075386181473732,
0.12818686664104462,
0.180137038230896,
-0.1529812216758728,
0.17885781824588776,
0.14044344425201416,
0.1558278203010559,
-0.02200762927532196,
-0.20524778962135315,
-0.2772299647331238,
0.09193968772888184,
-0.1360868513584137,
-0.006238959729671478,
-0.1100330576300621,
-0.05150595307350159,
-0.3062330484390259,
0.10809654742479324,
0.21897555887699127,
-0.026813898235559464,
-0.005669468082487583,
-0.05463190749287605,
-0.057413652539253235,
0.38292646408081055,
0.17337840795516968,
0.09683522582054138,
-0.04698751121759415,
0.29912954568862915,
0.35903388261795044,
-0.08916305005550385,
0.2868690490722656,
0.31214267015457153,
-0.08711130172014236,
-0.36263859272003174,
-0.056314315646886826,
0.028147578239440918,
-0.13576200604438782,
0.20405715703964233,
0.10022223740816116,
-0.019464023411273956,
-0.05154259875416756,
-0.022164752706885338,
-0.43230196833610535,
0.04256827384233475,
-0.11546889692544937,
-0.0827806293964386,
-0.5485848188400269,
0.040633998811244965,
0.035490043461322784,
0.1843372881412506,
0.05211785435676575,
-0.08762212097644806,
-0.14855636656284332,
0.3467068076133728,
0.11223504692316055,
-0.2311209887266159,
0.03162292391061783,
0.2867557108402252,
0.044967345893383026,
-0.3394910991191864,
0.11713212728500366,
0.1342749446630478,
-0.4225805699825287,
-0.09137238562107086,
0.22453251481056213,
0.5632354617118835,
0.2369014322757721,
-0.2107366919517517,
-0.02630889043211937,
0.16505827009677887,
-0.19240888953208923,
-0.040855057537555695,
0.19308264553546906,
-0.01962527632713318,
0.31550920009613037,
0.07599274814128876,
0.1164846420288086,
-0.045068562030792236,
0.0022388994693756104,
0.11208026111125946,
0.40343695878982544,
-0.27319034934043884,
0.359709233045578,
-0.33822566270828247,
-0.1533856987953186,
-0.03218858689069748,
0.14533808827400208,
-0.48190250992774963,
-0.3010285496711731,
0.2860874831676483,
0.08786953240633011,
0.1668272316455841,
-0.03938063234090805,
-0.004556676372885704,
-0.19997428357601166,
0.34720537066459656,
0.1554013341665268,
-0.20041021704673767,
-0.40901970863342285,
0.04586820304393768,
-0.3135356903076172,
-0.2208554744720459,
0.03268240764737129,
-0.07945246994495392,
0.1288401484489441,
0.3777341842651367,
-0.023328930139541626,
-0.09644895792007446,
-0.06281796097755432,
0.2925804853439331,
-0.13121850788593292,
0.25388550758361816,
-0.11348827183246613,
-0.37169548869132996,
-0.26258528232574463,
0.00007652491331100464,
-0.0015396364033222198,
-0.1305851936340332,
0.1380884200334549,
-0.18440568447113037,
-0.08881933987140656,
-0.08593203872442245,
0.0817185491323471,
0.3212604224681854,
-0.1550753116607666,
0.6211469769477844,
0.04449934884905815,
0.16840893030166626,
-0.0473940372467041,
-0.19951437413692474,
-0.13568782806396484,
-0.06254049390554428,
-0.08394486457109451,
0.37175503373146057,
-0.27686551213264465,
0.5569475889205933,
-0.22386343777179718,
0.376844584941864,
-0.3252270519733429,
-0.22429071366786957,
-0.029847899451851845,
-0.21087715029716492,
-0.6423898339271545,
0.3218385875225067,
-0.3592657148838043,
0.3994581699371338,
0.3166345953941345,
-0.002364281564950943,
-0.17215876281261444,
0.04704928398132324,
-0.2598778009414673,
-0.16779373586177826,
0.3149159550666809,
-0.48280245065689087,
-0.09671176970005035,
-0.055263303220272064,
0.2002888023853302,
0.3243430554866791,
0.12325781583786011,
-0.18604010343551636,
-0.03188692033290863,
0.3765195906162262,
-0.20969951152801514,
-0.12728355824947357,
0.1577431708574295,
0.13140588998794556,
0.06652399897575378,
-0.07735783606767654,
0.10513217002153397,
-0.10579150170087814,
-0.17550551891326904,
-0.03155399113893509,
-0.20641069114208221
] |
https://github.com/huggingface/datasets/issues/5402 | Missing state.json when creating a cloud dataset using a dataset_builder | Right now `load_dataset_builder` + `download_and_prepare` is to be used with tools like dask or spark, but `load_dataset` will support private cloud storage soon as well so you'll be able to reload the dataset with `datasets`.
Right now the only function that can load a dataset from a cloud storage is `load_from_disk`, that must be used with a dataset serialized with `save_to_disk`. | ### Describe the bug
Using `load_dataset_builder` to create a builder, run `download_and_prepare` do upload it to S3. However when trying to load it, there are missing `state.json` files. Complete example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
As a comparison, if you use the non lazy `load_dataset`, it works and the S3 folder has different structure + state.json files. Example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_dataset, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
dataset = load_dataset("imdb",)
dataset.save_to_disk(output_dir, fs=fs)
load_from_disk(output_dir, fs=fs) # WORKS
```
You still want the 1st option for the laziness and the parquet conversion. Thanks!
### Steps to reproduce the bug
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
BTW, you need the AioSession as s3fs is now based on aiobotocore, see https://github.com/fsspec/s3fs/issues/385.
### Expected behavior
Expected to be able to load the dataset from S3.
### Environment info
```
s3fs 2022.11.0
s3transfer 0.6.0
datasets 2.8.0
aiobotocore 2.4.2
boto3 1.24.59
botocore 1.27.59
```
python 3.7.15. | 61 | Missing state.json when creating a cloud dataset using a dataset_builder
### Describe the bug
Using `load_dataset_builder` to create a builder, run `download_and_prepare` do upload it to S3. However when trying to load it, there are missing `state.json` files. Complete example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
As a comparison, if you use the non lazy `load_dataset`, it works and the S3 folder has different structure + state.json files. Example:
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_dataset, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
dataset = load_dataset("imdb",)
dataset.save_to_disk(output_dir, fs=fs)
load_from_disk(output_dir, fs=fs) # WORKS
```
You still want the 1st option for the laziness and the parquet conversion. Thanks!
### Steps to reproduce the bug
```python
from aiobotocore.session import AioSession as Session
from datasets import load_from_disk, load_datase, load_dataset_builder
import s3fs
storage_options = {"session": Session()}
fs = s3fs.S3FileSystem(**storage_options)
output_dir = "s3://bucket/imdb"
builder = load_dataset_builder("imdb")
builder.download_and_prepare(output_dir, storage_options=storage_options)
load_from_disk(output_dir, fs=fs) # ERROR
# [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json'
```
BTW, you need the AioSession as s3fs is now based on aiobotocore, see https://github.com/fsspec/s3fs/issues/385.
### Expected behavior
Expected to be able to load the dataset from S3.
### Environment info
```
s3fs 2022.11.0
s3transfer 0.6.0
datasets 2.8.0
aiobotocore 2.4.2
boto3 1.24.59
botocore 1.27.59
```
python 3.7.15.
Right now `load_dataset_builder` + `download_and_prepare` is to be used with tools like dask or spark, but `load_dataset` will support private cloud storage soon as well so you'll be able to reload the dataset with `datasets`.
Right now the only function that can load a dataset from a cloud storage is `load_from_disk`, that must be used with a dataset serialized with `save_to_disk`. | [
-0.2532854974269867,
0.19776985049247742,
0.008729513734579086,
0.4805905818939209,
0.1316860318183899,
0.11200118809938431,
0.4172387719154358,
0.23316419124603271,
-0.03772224113345146,
0.20437727868556976,
0.23392252624034882,
0.41359204053878784,
0.1034996435046196,
0.31614574790000916,
0.11504828184843063,
0.1286565661430359,
0.3739227056503296,
0.42841994762420654,
0.09389714151620865,
0.041391268372535706,
-0.15978474915027618,
0.26174283027648926,
-0.13670368492603302,
-0.32917213439941406,
-0.28328937292099,
0.2751047611236572,
-0.36597153544425964,
0.30274876952171326,
-0.15474405884742737,
-0.39568907022476196,
0.18404150009155273,
0.034381695091724396,
0.1499945968389511,
0.3578280210494995,
-0.00012250387226231396,
0.09978942573070526,
0.42373013496398926,
-0.08645933121442795,
-0.546794056892395,
-0.3530905246734619,
-0.5681458711624146,
-0.11643219739198685,
0.16741743683815002,
-0.0333271399140358,
-0.06978927552700043,
0.0631769672036171,
-0.008729571476578712,
-0.377603679895401,
0.32912012934684753,
0.3426579535007477,
0.0411926805973053,
0.37896814942359924,
-0.10266749560832977,
-0.1745360642671585,
0.19395190477371216,
0.5329782962799072,
-0.17925094068050385,
0.062318380922079086,
0.14918427169322968,
0.11508366465568542,
0.12055100500583649,
0.07433967292308807,
-0.19677871465682983,
-0.056053709238767624,
0.46817368268966675,
0.2533840835094452,
0.37828752398490906,
-0.3165799081325531,
0.00999147817492485,
0.1553698033094406,
0.8795714378356934,
0.035387683659791946,
-0.595112144947052,
-0.3901268541812897,
0.09326320141553879,
0.03487280011177063,
0.37680765986442566,
0.1397802233695984,
-0.1199830174446106,
-0.000981505960226059,
-0.1413874626159668,
-0.19727714359760284,
-0.09658484905958176,
0.10953588038682938,
0.027719855308532715,
0.10828014463186264,
-0.08833202719688416,
-0.11989723891019821,
-0.27159327268600464,
-0.07257047295570374,
0.587834358215332,
-0.567165732383728,
0.024950699880719185,
0.258145272731781,
-0.1852819323539734,
0.10293146967887878,
-0.009796544909477234,
-0.16918841004371643,
-0.16697219014167786,
0.281951367855072,
0.08847002685070038,
-0.30547791719436646,
0.056104760617017746,
0.16401484608650208,
0.3476235568523407,
-0.004485401324927807,
0.200245663523674,
0.07063532620668411,
0.01827738806605339,
0.15479043126106262,
0.13848719000816345,
-0.20981308817863464,
-0.2482941597700119,
-0.3248046636581421,
0.2864856719970703,
0.003507142886519432,
0.04882904142141342,
-0.05377740040421486,
-0.13150542974472046,
0.011173571459949017,
-0.027309350669384003,
0.12572965025901794,
0.011818904429674149,
0.058845020830631256,
-0.09896761178970337,
-0.13351932168006897,
0.19165049493312836,
0.4110165238380432,
-0.25055426359176636,
-0.10744252055883408,
-0.22371934354305267,
-0.12526866793632507,
0.08715270459651947,
0.11083495616912842,
0.15156814455986023,
-0.36591142416000366,
0.5193418860435486,
0.09420382231473923,
-0.03316989541053772,
-0.1095675453543663,
0.3131888806819916,
0.13663126528263092,
-0.06610260158777237,
0.40981969237327576,
0.41727638244628906,
0.06210047006607056,
-0.11796565353870392,
-0.5259038805961609,
-0.08698207139968872,
0.2577546536922455,
-0.23296454548835754,
-0.4225853979587555,
-0.5722176432609558,
0.10110709071159363,
-0.4323028326034546,
-0.0031524188816547394,
-0.6497443318367004,
-0.11694546043872833,
0.1427692025899887,
-0.2888390123844147,
-0.09556024521589279,
-0.15103892982006073,
0.004017096012830734,
-0.12395390123128891,
0.3818032443523407,
0.6254810094833374,
-0.13274118304252625,
-0.2203971892595291,
-0.44723615050315857,
-0.07724787294864655,
0.11290007829666138,
-0.04194815829396248,
-0.10171787440776825,
0.3640575706958771,
-0.36670926213264465,
0.08261710405349731,
0.4291980266571045,
-0.3541233241558075,
-0.11872301995754242,
0.37207576632499695,
0.02192174643278122,
0.12042251974344254,
0.2542777955532074,
0.09517449140548706,
0.055984385311603546,
-0.23579224944114685,
0.18170027434825897,
0.17091894149780273,
-0.0628730058670044,
0.0016952846199274063,
0.016869131475687027,
-0.1490316092967987,
0.05291743576526642,
0.33242690563201904,
0.13168767094612122,
0.2915739119052887,
0.08809249848127365,
-0.056159719824790955,
0.0548623763024807,
-0.13048003613948822,
0.20743787288665771,
0.2996644377708435,
0.2182030975818634,
0.019933752715587616,
-0.11588164418935776,
0.13414260745048523,
-0.8731092810630798,
0.29844191670417786,
0.051033519208431244,
0.08093146979808807,
-0.09869363903999329,
-0.043380070477724075,
0.09343533217906952,
-0.11573480814695358,
-0.28190845251083374,
0.10694959759712219,
0.004878498613834381,
0.06935400515794754,
0.152868390083313,
0.049132395535707474,
-0.08862639218568802,
-0.06684127449989319,
0.18965394794940948,
0.190508171916008,
-0.24623258411884308,
0.39035463333129883,
-0.030146995559334755,
-0.40870392322540283,
0.39696064591407776,
-0.1473444402217865,
0.060542210936546326,
0.002393237082287669,
-0.18506789207458496,
0.2172250747680664,
0.12643112242221832,
0.3025189936161041,
-0.17325469851493835,
0.21633420884609222,
0.162927508354187,
0.4135800004005432,
0.24845239520072937,
-0.1708991974592209,
0.07357841730117798,
-0.24856916069984436,
-0.2719072103500366,
0.18005412817001343,
0.019427279010415077,
0.34399449825286865,
0.0036840923130512238,
-0.025824587792158127,
0.13963912427425385,
0.1596512794494629,
-0.011791572906076908,
-0.22978973388671875,
0.01625186949968338,
-0.013833075761795044,
0.2004726231098175,
0.217948317527771,
-0.08759638667106628,
0.10607989132404327,
0.20912864804267883,
-0.23780056834220886,
-0.013230189681053162,
0.03802341967821121,
-0.21202373504638672,
-0.13440226018428802,
0.14628130197525024,
0.07512061297893524,
0.7747647762298584,
0.02990332990884781,
0.009873706847429276,
-0.11799316853284836,
0.18613584339618683,
-0.22264128923416138,
0.35484614968299866,
0.2140350490808487,
0.528032660484314,
0.2687831521034241,
0.15739783644676208,
-0.03715888410806656,
-0.19569170475006104,
-0.33711037039756775,
0.1502828747034073,
0.05028035491704941,
-0.43329545855522156,
-0.122667595744133,
-0.2525233328342438,
-0.08611170947551727,
0.02875218354165554,
0.24117571115493774,
-0.16737376153469086,
-0.3314114212989807,
-0.13291838765144348,
0.28483322262763977,
-0.09073378890752792,
-0.2100968211889267,
0.011471297591924667,
0.11279717832803726,
0.017095116898417473,
-0.11810033768415451,
-0.37507596611976624,
-0.008279168978333473,
-0.3077247440814972,
-0.046821702271699905,
0.20654934644699097,
-0.06860183924436569,
-0.031017305329442024,
-0.3790411949157715,
0.2273203581571579,
-0.35959842801094055,
-0.13774549961090088,
0.21961809694766998,
-0.051398925483226776,
0.5976997017860413,
0.1779346466064453,
0.11072535067796707,
0.11239504814147949,
0.042646076530218124,
0.29476815462112427,
0.24924921989440918,
-0.24878789484500885,
0.2561202645301819,
-0.10308849811553955,
-0.354362428188324,
-0.02968914806842804,
-0.16202175617218018,
-0.07135238498449326,
-0.13887643814086914,
0.004462946206331253,
0.12777535617351532,
0.07158932089805603,
-0.28818485140800476,
0.2685646712779999,
0.14961948990821838,
0.04064711928367615,
0.04826005548238754,
-0.06571896374225616,
-0.8443080186843872,
0.4635087847709656,
-0.3607085645198822,
-0.08966372907161713,
0.13521960377693176,
-0.06373226642608643,
0.40939861536026,
-0.22915610671043396,
-0.6268811821937561,
0.04650761932134628,
-0.0539722815155983,
0.1740105003118515,
-0.24507397413253784,
-0.03231704235076904,
0.3842328190803528,
0.10819360613822937,
0.09154330939054489,
-0.1761859953403473,
-0.29657986760139465,
-0.0953202024102211,
0.285709410905838,
0.3351297378540039,
-0.29109933972358704,
0.47935280203819275,
-0.08654424548149109,
0.6806164383888245,
0.3787810504436493,
-0.12682728469371796,
0.24650052189826965,
-0.18713729083538055,
0.08996336162090302,
-0.3202081322669983,
0.02266172505915165,
0.09465143084526062,
-0.03642605245113373,
-0.1347045600414276,
-0.005505397915840149,
-0.021663468331098557,
-0.08304760605096817,
-0.12553523480892181,
-0.09756948053836823,
-0.45548322796821594,
-0.1854507178068161,
-0.03501003235578537,
-0.23807770013809204,
0.2050914466381073,
0.04727114364504814,
-0.07381770014762878,
-0.2528849244117737,
0.014194147661328316,
0.12488409876823425,
0.3909124732017517,
0.6763410568237305,
0.15057387948036194,
0.040354933589696884,
-0.3703972399234772,
-0.3016560971736908,
0.22108429670333862,
0.0940079540014267,
0.0197548009455204,
-0.05084101855754852,
0.10109397023916245,
-0.018977120518684387,
0.07609069347381592,
0.7637637853622437,
-0.6462437510490417,
-0.15927885472774506,
0.26428571343421936,
-0.05579447001218796,
-0.3106137812137604,
-0.02787826955318451,
0.016456570476293564,
0.1718425750732422,
0.206422358751297,
0.551275372505188,
-0.10838624835014343,
-0.3111613392829895,
-0.13336347043514252,
0.05028047040104866,
-0.18037018179893494,
-0.5183402299880981,
-0.3654114603996277,
0.011160764843225479,
-0.3139016032218933,
-0.12850481271743774,
-0.006757955998182297,
0.09362208098173141,
0.006614287383854389,
-0.3289467394351959,
-0.17859375476837158,
0.16146090626716614,
-0.09797155857086182,
0.018633902072906494,
0.24454370141029358,
0.01980927586555481,
0.5349639058113098,
0.13751013576984406,
-0.08246895670890808,
0.5861679911613464,
0.6260332465171814,
0.4875333905220032,
-0.1601617932319641,
0.15123412013053894,
-0.44351962208747864,
0.461233526468277,
-0.07723283767700195,
0.0874565988779068,
-0.28085681796073914,
0.24429026246070862,
0.15334810316562653,
-0.35742709040641785,
-0.06817664951086044,
0.20050311088562012,
-0.26083213090896606,
0.05087965354323387,
-0.4433498978614807,
0.3532250225543976,
0.1488519310951233,
-0.014869622886180878,
-0.16513265669345856,
0.06391911208629608,
-0.2325206845998764,
0.48533904552459717,
0.2689269781112671,
0.5850316882133484,
-0.012951448559761047,
0.2706587612628937,
0.34205228090286255,
0.031609922647476196,
0.5325148701667786,
-0.1675216406583786,
0.04443306103348732,
-0.17246249318122864,
-0.09922883659601212,
-0.01707058772444725,
-0.32940271496772766,
0.23446229100227356,
0.2875550389289856,
-0.01791664958000183,
0.414103239774704,
-0.26212599873542786,
0.1505202203989029,
-0.004940103739500046,
0.2623845636844635,
-0.26955994963645935,
-0.4463275969028473,
0.07444646954536438,
0.10117366909980774,
-0.03328883647918701,
0.16673973202705383,
-0.027079112827777863,
-0.07131194323301315,
-0.1763496845960617,
0.044407449662685394,
-0.16385725140571594,
0.22287195920944214,
0.058902475982904434,
0.07446201145648956,
0.17063622176647186,
-0.09888409078121185,
0.37984520196914673,
0.30367839336395264,
0.05331462249159813,
-0.015527479350566864,
-0.1811387687921524,
0.25372880697250366,
0.3387913405895233,
0.15805812180042267,
0.011245975270867348,
-0.2785823941230774,
0.49550938606262207,
-0.10151499509811401,
0.046017177402973175,
-0.1350095570087433,
-0.3432409167289734,
0.05101121962070465,
-0.0862983986735344,
-0.29779237508773804,
-0.10831910371780396,
-0.1663157194852829,
-0.1392408162355423,
0.008269503712654114,
0.16559243202209473,
-0.12467914819717407,
0.06470780074596405,
0.24430207908153534,
0.041482750326395035,
-0.07386884838342667,
-0.2669616639614105,
-0.11498565971851349,
-0.09043028950691223,
0.46776074171066284,
0.13294196128845215,
-0.026277098804712296,
0.6771653890609741,
0.05667790398001671,
-0.039335697889328,
-0.1248345896601677,
0.0901990756392479,
-0.09624767303466797,
-0.17257271707057953,
0.25558459758758545,
-0.07614491879940033,
-0.0013247877359390259,
-0.03245297819375992,
0.042311809957027435,
0.07198697328567505,
-0.2453785240650177,
0.17763842642307281,
-0.3136061429977417,
-0.1399916559457779,
-0.05757895112037659,
0.057557106018066406,
0.1021016389131546,
-0.224992573261261,
-0.1878627985715866,
-0.025765882804989815,
-0.31215694546699524,
-0.16869118809700012,
-0.11821425706148148,
-0.14913034439086914,
0.34442880749702454,
-0.12393400073051453,
0.24278110265731812,
-0.027133893221616745,
-0.4100736081600189,
0.04098851978778839,
-0.15266160666942596,
0.12156856060028076,
-0.11565151810646057,
-0.2666095197200775,
0.18153630197048187,
0.2996048629283905,
0.09161246567964554,
0.10784376412630081,
-0.06544622778892517,
-0.25903552770614624,
-0.15161089599132538,
0.3097144663333893,
-0.1684897243976593,
-0.11702403426170349,
0.024490993469953537,
-0.12908022105693817,
0.008054867386817932,
-0.1389445811510086,
-0.07150710374116898,
-0.005749166011810303,
0.085010826587677,
-0.26143476366996765,
0.13182121515274048,
0.06323204934597015,
0.05153045058250427,
0.16303452849388123,
0.06550978124141693,
-0.2677870988845825,
0.45418694615364075,
0.5902210474014282,
-0.4388046860694885,
0.10048376023769379,
-0.075386181473732,
0.12818686664104462,
0.180137038230896,
-0.1529812216758728,
0.17885781824588776,
0.14044344425201416,
0.1558278203010559,
-0.02200762927532196,
-0.20524778962135315,
-0.2772299647331238,
0.09193968772888184,
-0.1360868513584137,
-0.006238959729671478,
-0.1100330576300621,
-0.05150595307350159,
-0.3062330484390259,
0.10809654742479324,
0.21897555887699127,
-0.026813898235559464,
-0.005669468082487583,
-0.05463190749287605,
-0.057413652539253235,
0.38292646408081055,
0.17337840795516968,
0.09683522582054138,
-0.04698751121759415,
0.29912954568862915,
0.35903388261795044,
-0.08916305005550385,
0.2868690490722656,
0.31214267015457153,
-0.08711130172014236,
-0.36263859272003174,
-0.056314315646886826,
0.028147578239440918,
-0.13576200604438782,
0.20405715703964233,
0.10022223740816116,
-0.019464023411273956,
-0.05154259875416756,
-0.022164752706885338,
-0.43230196833610535,
0.04256827384233475,
-0.11546889692544937,
-0.0827806293964386,
-0.5485848188400269,
0.040633998811244965,
0.035490043461322784,
0.1843372881412506,
0.05211785435676575,
-0.08762212097644806,
-0.14855636656284332,
0.3467068076133728,
0.11223504692316055,
-0.2311209887266159,
0.03162292391061783,
0.2867557108402252,
0.044967345893383026,
-0.3394910991191864,
0.11713212728500366,
0.1342749446630478,
-0.4225805699825287,
-0.09137238562107086,
0.22453251481056213,
0.5632354617118835,
0.2369014322757721,
-0.2107366919517517,
-0.02630889043211937,
0.16505827009677887,
-0.19240888953208923,
-0.040855057537555695,
0.19308264553546906,
-0.01962527632713318,
0.31550920009613037,
0.07599274814128876,
0.1164846420288086,
-0.045068562030792236,
0.0022388994693756104,
0.11208026111125946,
0.40343695878982544,
-0.27319034934043884,
0.359709233045578,
-0.33822566270828247,
-0.1533856987953186,
-0.03218858689069748,
0.14533808827400208,
-0.48190250992774963,
-0.3010285496711731,
0.2860874831676483,
0.08786953240633011,
0.1668272316455841,
-0.03938063234090805,
-0.004556676372885704,
-0.19997428357601166,
0.34720537066459656,
0.1554013341665268,
-0.20041021704673767,
-0.40901970863342285,
0.04586820304393768,
-0.3135356903076172,
-0.2208554744720459,
0.03268240764737129,
-0.07945246994495392,
0.1288401484489441,
0.3777341842651367,
-0.023328930139541626,
-0.09644895792007446,
-0.06281796097755432,
0.2925804853439331,
-0.13121850788593292,
0.25388550758361816,
-0.11348827183246613,
-0.37169548869132996,
-0.26258528232574463,
0.00007652491331100464,
-0.0015396364033222198,
-0.1305851936340332,
0.1380884200334549,
-0.18440568447113037,
-0.08881933987140656,
-0.08593203872442245,
0.0817185491323471,
0.3212604224681854,
-0.1550753116607666,
0.6211469769477844,
0.04449934884905815,
0.16840893030166626,
-0.0473940372467041,
-0.19951437413692474,
-0.13568782806396484,
-0.06254049390554428,
-0.08394486457109451,
0.37175503373146057,
-0.27686551213264465,
0.5569475889205933,
-0.22386343777179718,
0.376844584941864,
-0.3252270519733429,
-0.22429071366786957,
-0.029847899451851845,
-0.21087715029716492,
-0.6423898339271545,
0.3218385875225067,
-0.3592657148838043,
0.3994581699371338,
0.3166345953941345,
-0.002364281564950943,
-0.17215876281261444,
0.04704928398132324,
-0.2598778009414673,
-0.16779373586177826,
0.3149159550666809,
-0.48280245065689087,
-0.09671176970005035,
-0.055263303220272064,
0.2002888023853302,
0.3243430554866791,
0.12325781583786011,
-0.18604010343551636,
-0.03188692033290863,
0.3765195906162262,
-0.20969951152801514,
-0.12728355824947357,
0.1577431708574295,
0.13140588998794556,
0.06652399897575378,
-0.07735783606767654,
0.10513217002153397,
-0.10579150170087814,
-0.17550551891326904,
-0.03155399113893509,
-0.20641069114208221
] |
https://github.com/huggingface/datasets/issues/5394 | CI error: TypeError: dataclass_transform() got an unexpected keyword argument 'field_specifiers' | @MFatnassi, this issue and the corresponding fix only affect our Continuous Integration testing environment.
Note that `datasets` does not depend on `spacy`. | ### Describe the bug
While installing the dependencies, the CI raises a TypeError:
```
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/spacy/__init__.py", line 6, in <module>
from .errors import setup_default_warnings
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/spacy/errors.py", line 2, in <module>
from .compat import Literal
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/spacy/compat.py", line 3, in <module>
from thinc.util import copy_array
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/thinc/__init__.py", line 5, in <module>
from .config import registry
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/thinc/config.py", line 2, in <module>
import confection
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/confection/__init__.py", line 10, in <module>
from pydantic import BaseModel, create_model, ValidationError, Extra
File "pydantic/__init__.py", line 2, in init pydantic.__init__
File "pydantic/dataclasses.py", line 46, in init pydantic.dataclasses
# | None | Attribute is set to None. |
File "pydantic/main.py", line 121, in init pydantic.main
TypeError: dataclass_transform() got an unexpected keyword argument 'field_specifiers'
```
See: https://github.com/huggingface/datasets/actions/runs/3793736481/jobs/6466356565
### Steps to reproduce the bug
```shell
pip install .[tests,metrics-tests]
python -m spacy download en_core_web_sm
```
### Expected behavior
No error.
### Environment info
See: https://github.com/huggingface/datasets/actions/runs/3793736481/jobs/6466356565 | 22 | CI error: TypeError: dataclass_transform() got an unexpected keyword argument 'field_specifiers'
### Describe the bug
While installing the dependencies, the CI raises a TypeError:
```
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/spacy/__init__.py", line 6, in <module>
from .errors import setup_default_warnings
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/spacy/errors.py", line 2, in <module>
from .compat import Literal
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/spacy/compat.py", line 3, in <module>
from thinc.util import copy_array
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/thinc/__init__.py", line 5, in <module>
from .config import registry
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/thinc/config.py", line 2, in <module>
import confection
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/confection/__init__.py", line 10, in <module>
from pydantic import BaseModel, create_model, ValidationError, Extra
File "pydantic/__init__.py", line 2, in init pydantic.__init__
File "pydantic/dataclasses.py", line 46, in init pydantic.dataclasses
# | None | Attribute is set to None. |
File "pydantic/main.py", line 121, in init pydantic.main
TypeError: dataclass_transform() got an unexpected keyword argument 'field_specifiers'
```
See: https://github.com/huggingface/datasets/actions/runs/3793736481/jobs/6466356565
### Steps to reproduce the bug
```shell
pip install .[tests,metrics-tests]
python -m spacy download en_core_web_sm
```
### Expected behavior
No error.
### Environment info
See: https://github.com/huggingface/datasets/actions/runs/3793736481/jobs/6466356565
@MFatnassi, this issue and the corresponding fix only affect our Continuous Integration testing environment.
Note that `datasets` does not depend on `spacy`. | [
-0.1793406754732132,
-0.11005890369415283,
-0.06198836490511894,
0.14016938209533691,
0.313936710357666,
-0.07446721941232681,
0.17119450867176056,
0.44393715262413025,
-0.10442712903022766,
0.07730436325073242,
0.13754478096961975,
0.4131949841976166,
-0.11487019807100296,
0.3807457387447357,
-0.34174880385398865,
-0.33114808797836304,
0.0198039710521698,
0.26951318979263306,
-0.20359385013580322,
-0.027407605201005936,
-0.10106873512268066,
0.46317777037620544,
-0.13934192061424255,
0.11364878714084625,
0.08477456122636795,
-0.22986939549446106,
0.015670405700802803,
0.09403268247842789,
-0.3214878737926483,
-0.2691543996334076,
0.4839678406715393,
0.012991180643439293,
-0.10055019706487656,
0.4790920615196228,
-0.00011186974006704986,
0.12955325841903687,
0.17230454087257385,
-0.08370018750429153,
-0.07191789150238037,
-0.1112363189458847,
0.18819460272789001,
-0.03145713359117508,
0.12066074460744858,
-0.2885911762714386,
0.05220966041088104,
0.08891094475984573,
-0.27575957775115967,
-0.17249426245689392,
0.3116123080253601,
0.25698041915893555,
0.21161620318889618,
0.2864744961261749,
0.13426631689071655,
-0.127993643283844,
0.15081262588500977,
0.0894007682800293,
-0.41703200340270996,
0.1750141680240631,
0.1776445508003235,
0.13367103040218353,
0.19238713383674622,
0.26751527190208435,
-0.12520161271095276,
-0.32119515538215637,
0.1800340861082077,
-0.22119693458080292,
0.20624366402626038,
-0.38985082507133484,
0.056387364864349365,
-0.17651227116584778,
-0.0459684357047081,
-0.12917974591255188,
-0.0725584626197815,
0.07946092635393143,
-0.18272505700588226,
-0.07899241894483566,
0.21013757586479187,
-0.1860114336013794,
0.008363276720046997,
0.0044747889041900635,
0.17824649810791016,
0.1062299907207489,
-0.07173985987901688,
-0.025067582726478577,
-0.0878237783908844,
0.36264944076538086,
-0.314873069524765,
0.06880176067352295,
0.1643923968076706,
-0.11920203268527985,
0.09804173558950424,
0.06775052845478058,
0.058470115065574646,
0.09169304370880127,
0.038119107484817505,
-0.3993505537509918,
-0.003687053918838501,
0.35769790410995483,
-0.27848020195961,
0.170172318816185,
0.03414011001586914,
0.06975950300693512,
-0.22356101870536804,
0.015928827226161957,
-0.021090220659971237,
0.1623813360929489,
-0.1328420341014862,
0.1903892457485199,
0.249416783452034,
0.4266533851623535,
-0.03591446205973625,
0.10202357172966003,
0.10347749292850494,
-0.11961620301008224,
-0.029151219874620438,
0.332582950592041,
0.5988156199455261,
-0.18758425116539001,
-0.21712984144687653,
0.029243379831314087,
0.20422938466072083,
0.1685602217912674,
0.05896100029349327,
0.36177006363868713,
-0.05887274444103241,
0.420400470495224,
0.46318960189819336,
0.23114117980003357,
0.04751850664615631,
-0.15328119695186615,
-0.13732843101024628,
0.3057444095611572,
0.04795398935675621,
-0.0905652642250061,
0.04807218536734581,
0.04933878779411316,
0.2707587480545044,
0.2351049929857254,
0.4048731327056885,
-0.11259989440441132,
0.044409848749637604,
-0.0911368727684021,
-0.08943534642457962,
0.3163769543170929,
-0.24716754257678986,
0.06801631301641464,
0.5725430846214294,
-0.24436497688293457,
-0.1621454954147339,
0.06138873100280762,
-0.40665674209594727,
-0.14325815439224243,
-0.09305224567651749,
0.21425607800483704,
-0.07256114482879639,
-0.12658686935901642,
-0.00675307959318161,
-0.3209661841392517,
0.41938430070877075,
0.07515622675418854,
-0.07758007198572159,
-0.41931939125061035,
-0.10766835510730743,
-0.1329207718372345,
-0.1066349595785141,
0.2553883492946625,
-0.047265421599149704,
-0.06708426028490067,
0.056594107300043106,
0.10803978145122528,
0.09943505376577377,
-0.08424311876296997,
-0.09007340669631958,
0.34582090377807617,
-0.06301648914813995,
-0.24812155961990356,
0.6196269392967224,
-0.6704510450363159,
-0.039890438318252563,
0.29607123136520386,
0.05674867331981659,
-0.012281873263418674,
0.1535920798778534,
-0.23242861032485962,
0.10295145213603973,
-0.06130244582891464,
-0.14808323979377747,
0.20368117094039917,
-0.1926894187927246,
0.20617042481899261,
-0.4358968138694763,
-0.13715720176696777,
-0.23787568509578705,
0.03826797381043434,
0.3957028090953827,
0.24283990263938904,
-0.050042472779750824,
0.3764408230781555,
0.1624208241701126,
-0.017701301723718643,
-0.19404926896095276,
0.3606722950935364,
0.1754397600889206,
0.005997613072395325,
0.08451434969902039,
-0.11738593876361847,
0.010798808187246323,
-0.0787462443113327,
-0.36085665225982666,
0.28206002712249756,
-0.07503639161586761,
-0.15163064002990723,
-0.428891658782959,
0.06073684245347977,
-0.1511327028274536,
0.012821609154343605,
0.24806416034698486,
-0.035086438059806824,
0.005225684493780136,
-0.16407133638858795,
-0.08594140410423279,
-0.01193835586309433,
-0.01246289536356926,
0.12266909331083298,
-0.023529410362243652,
0.16458557546138763,
-0.4685768485069275,
-0.23083488643169403,
0.03151959925889969,
-0.00880046933889389,
0.48949068784713745,
-0.28823256492614746,
-0.2535741627216339,
0.2815398871898651,
0.03343803808093071,
-0.1491917073726654,
-0.161873459815979,
0.3963851034641266,
0.1983906328678131,
0.010867174714803696,
0.1753489226102829,
0.02274981513619423,
-0.0003061681054532528,
-0.13881860673427582,
0.2995341122150421,
0.29711487889289856,
-0.3174349367618561,
0.3392183184623718,
0.20025183260440826,
0.14314402639865875,
0.4183203876018524,
-0.028519609943032265,
-0.16519111394882202,
-0.4021686017513275,
0.05219365283846855,
0.0632617250084877,
0.07674002647399902,
-0.16406436264514923,
0.017909422516822815,
0.31605541706085205,
0.3291713297367096,
0.2014380842447281,
-0.043137192726135254,
-0.1449924111366272,
0.16193243861198425,
0.18143969774246216,
-0.3813766837120056,
0.16145259141921997,
0.6516310572624207,
-0.0002642592880874872,
-0.20914226770401,
0.3028373122215271,
0.008996753953397274,
0.03519049286842346,
0.3061915934085846,
0.15486130118370056,
0.26467183232307434,
0.17774885892868042,
-0.01697097159922123,
0.2545316517353058,
-0.005015391856431961,
-0.5523504018783569,
-0.033799152821302414,
0.010777478106319904,
-0.374153733253479,
0.30939269065856934,
-0.1882675290107727,
0.09197377413511276,
-0.18081653118133545,
-0.09022527933120728,
0.023709461092948914,
-0.4426896274089813,
-0.034877508878707886,
0.22617483139038086,
-0.13248535990715027,
0.21925166249275208,
-0.2735901176929474,
0.24502728879451752,
0.19115564227104187,
-0.10428286343812943,
-0.1513039767742157,
-0.07576332241296768,
-0.1581982672214508,
0.030105948448181152,
0.12227974832057953,
-0.4561828076839447,
0.15377585589885712,
-0.3897615671157837,
0.0671594887971878,
-0.031059661880135536,
-0.6124504804611206,
0.22627180814743042,
-0.27086764574050903,
0.2584141790866852,
0.4899875819683075,
0.21951638162136078,
0.25706493854522705,
-0.4110003113746643,
0.4176320731639862,
-0.09941758215427399,
0.03449104726314545,
0.08341824263334274,
-0.15066668391227722,
-0.20326289534568787,
-0.17328721284866333,
-0.2753385305404663,
-0.10761099308729172,
-0.31474027037620544,
-0.2432040423154831,
0.29077622294425964,
0.13991911709308624,
0.6499965786933899,
0.011593406088650227,
-0.16198936104774475,
0.145210400223732,
0.36114147305488586,
-0.09145110845565796,
-0.39227938652038574,
0.10094159841537476,
-0.2277628481388092,
-0.1550145447254181,
0.07972459495067596,
0.042380109429359436,
0.5559226274490356,
-0.29410403966903687,
-0.2881402373313904,
-0.2713721692562103,
-0.1785147786140442,
0.17502157390117645,
-0.21608960628509521,
-0.05239468067884445,
0.36211255192756653,
0.28140929341316223,
-0.09982017427682877,
-0.14371365308761597,
-0.1004423201084137,
0.10632757097482681,
-0.1972290575504303,
0.1892944723367691,
-0.1491013467311859,
0.31205230951309204,
0.13532128930091858,
0.474462628364563,
-0.05613485723733902,
-0.11850997805595398,
0.20604875683784485,
0.2356853485107422,
0.21092838048934937,
-0.2078401744365692,
-0.5243604779243469,
-0.2927206754684448,
-0.030900225043296814,
-0.11736146360635757,
0.060363125056028366,
-0.29534733295440674,
-0.07986745238304138,
-0.1283074915409088,
0.19016511738300323,
0.12396173924207687,
-0.13491874933242798,
0.10223380476236343,
-0.24803102016448975,
0.267047256231308,
-0.012733985669910908,
-0.045065343379974365,
-0.244119793176651,
0.18067967891693115,
0.26137223839759827,
0.3239968419075012,
-0.34650537371635437,
-0.14868378639221191,
0.08368758857250214,
-0.34868335723876953,
0.1371757984161377,
0.2389398217201233,
-0.1702391654253006,
0.18509969115257263,
-0.24176810681819916,
-0.12003079056739807,
-0.11904077231884003,
0.07444196194410324,
0.11526741832494736,
0.009776239283382893,
0.11111289262771606,
0.6527432203292847,
-0.30143892765045166,
-0.224201038479805,
-0.5120770931243896,
-0.379069060087204,
0.11648765951395035,
0.37218791246414185,
0.8325475454330444,
-0.17513597011566162,
-0.0934305414557457,
0.6673321723937988,
0.09231282025575638,
-0.2599276006221771,
0.16716481745243073,
-0.36587220430374146,
-0.5754662156105042,
-0.16408829391002655,
0.25415897369384766,
0.16040457785129547,
0.3334774971008301,
-0.0791204497218132,
0.025764960795640945,
0.1642967313528061,
-0.29834237694740295,
-0.045034170150756836,
0.12018917500972748,
-0.007824704051017761,
-0.027733663097023964,
0.07975703477859497,
-0.491531103849411,
0.04198179021477699,
-0.16396468877792358,
0.4104812741279602,
0.12579034268856049,
-0.16047000885009766,
0.009805269539356232,
-0.05340730398893356,
-0.054301150143146515,
0.14999660849571228,
-0.35102367401123047,
0.13831506669521332,
-0.0860721617937088,
0.30587154626846313,
0.0542755126953125,
0.26654478907585144,
0.22694793343544006,
-0.19657625257968903,
-0.1080157607793808,
-0.06550358235836029,
0.057618677616119385,
-0.020074808970093727,
-0.203172966837883,
0.03469244763255119,
-0.018617816269397736,
-0.2671307921409607,
0.6345034837722778,
0.2226388156414032,
0.9648949503898621,
0.14891904592514038,
-0.17413797974586487,
0.3778850734233856,
0.15041416883468628,
0.06412909924983978,
-0.4666764736175537,
-0.07704813778400421,
-0.20548608899116516,
-0.5284472107887268,
0.08086173981428146,
-0.08714606612920761,
0.5770468711853027,
-0.1499304175376892,
-0.703239381313324,
0.03403659164905548,
-0.27589842677116394,
0.0035883113741874695,
0.03215666115283966,
-0.16711314022541046,
0.06381065398454666,
-0.20107561349868774,
-0.4198814332485199,
0.15979743003845215,
-0.08638766407966614,
0.29050326347351074,
-0.2478574514389038,
-0.10468713194131851,
-0.07048163563013077,
-0.46528059244155884,
-0.25372257828712463,
0.2257562279701233,
-0.39951908588409424,
0.223683163523674,
-0.2555003762245178,
0.17756833136081696,
0.14184242486953735,
-0.06829805672168732,
0.617695152759552,
0.36807912588119507,
0.014429391361773014,
0.11409933865070343,
-0.06026729196310043,
-0.17077960073947906,
0.18879565596580505,
0.06906979531049728,
0.25042060017585754,
-0.29474925994873047,
0.05660543590784073,
0.08010683953762054,
-0.2229422628879547,
-0.11842073500156403,
0.1020950973033905,
-0.17144127190113068,
-0.10160273313522339,
-0.4720505475997925,
-0.14954552054405212,
-0.05253501236438751,
-0.04387641325592995,
-0.22258946299552917,
0.1295441836118698,
-0.12436060607433319,
-0.18660414218902588,
0.3568823039531708,
0.055679406970739365,
-0.4205223023891449,
-0.01718788594007492,
-0.04695235937833786,
0.23900747299194336,
0.16345201432704926,
0.3420823812484741,
-0.09699541330337524,
-0.15666240453720093,
-0.2987309396266937,
0.06398940831422806,
-0.3898032307624817,
-0.08620437979698181,
0.35576310753822327,
-0.0025863528717309237,
-0.2946423888206482,
-0.18199767172336578,
0.5108279585838318,
0.20489327609539032,
0.40410116314888,
-0.1933988779783249,
-0.3757217824459076,
-0.21686115860939026,
0.1533610075712204,
-0.11031240224838257,
-0.05627060309052467,
0.08625123649835587,
0.6209637522697449,
-0.05320185050368309,
0.12698879837989807,
-0.3156985640525818,
-0.1164940819144249,
-0.3163321614265442,
0.1079518124461174,
0.3636484146118164,
-0.08426458388566971,
0.08784399926662445,
0.15765710175037384,
0.11666810512542725,
-0.005269214510917664,
0.15903015434741974,
-0.224668949842453,
-0.22129236161708832,
0.11872304975986481,
0.09436523169279099,
0.20434769988059998,
0.25422313809394836,
0.1289953589439392,
-0.07923208177089691,
-0.000853375531733036,
0.07438039779663086,
0.011412352323532104,
0.02943512797355652,
0.1691541224718094,
-0.45496711134910583,
0.28709250688552856,
0.11682501435279846,
-0.11414892971515656,
-0.028215400874614716,
0.02501498907804489,
0.11663316935300827,
0.2747480273246765,
-0.07249553501605988,
-0.37071940302848816,
-0.04394444823265076,
0.13984692096710205,
-0.20095090568065643,
0.08189673721790314,
0.29895851016044617,
-0.24224208295345306,
0.0902249664068222,
0.4517092704772949,
-0.18309062719345093,
0.24188865721225739,
-0.3634487986564636,
0.16551515460014343,
-0.28134486079216003,
0.18781864643096924,
-0.24913731217384338,
-0.15030506253242493,
0.01995784230530262,
-0.14706505835056305,
-0.03843579441308975,
0.4632278382778168,
0.11722639203071594,
-0.1081211268901825,
0.4746739864349365,
0.12639421224594116,
0.3982967436313629,
0.07334812730550766,
0.4932071268558502,
0.2212836593389511,
-0.09500249475240707,
0.18809638917446136,
0.23349405825138092,
-0.07330158352851868,
-0.004112713038921356,
0.03291075676679611,
-0.40643182396888733,
0.2483818531036377,
0.01013241522014141,
-0.275826632976532,
0.24482566118240356,
-0.18370918929576874,
0.18616898357868195,
-0.010315775871276855,
0.31353944540023804,
0.11959175765514374,
-0.11582416296005249,
-0.09287924319505692,
-0.27005842328071594,
-0.3217651844024658,
-0.3645550012588501,
0.09831498563289642,
-0.25931769609451294,
-0.011070491746068,
0.1159101128578186,
-0.1519712209701538,
-0.2980930805206299,
-0.09274506568908691,
0.12249457836151123,
0.1399192065000534,
0.04669775813817978,
-0.04288388043642044,
-0.22011761367321014,
-0.14795537292957306,
-0.2137342393398285,
0.10508237034082413,
0.13680917024612427,
-0.37895694375038147,
0.4285769760608673,
-0.006740570068359375,
-0.07610675692558289,
-0.1915663629770279,
0.2808854281902313,
0.5398598909378052,
0.5362798571586609,
0.1358822137117386,
-0.12151915580034256,
-0.2891324460506439,
-0.15516023337841034,
0.03566141054034233,
0.029377823695540428,
0.12103299796581268,
0.6214401125907898,
0.14584144949913025,
0.1376596987247467,
-0.23636330664157867,
-0.15087908506393433,
0.06912532448768616,
0.11274267733097076,
-0.12813840806484222,
0.18042825162410736,
0.083571657538414,
-0.045927584171295166,
-0.007430441677570343,
0.2929325997829437,
-0.354669451713562,
-0.10148996859788895,
0.20011429488658905,
0.24717029929161072,
0.16632071137428284,
-0.14540857076644897,
0.10357686132192612,
0.3760996460914612,
0.3849596381187439,
-0.010297548025846481,
-0.18412327766418457,
-0.34674108028411865,
-0.11817176640033722,
-0.07690168917179108,
0.11114579439163208,
0.28868368268013,
-0.0393805056810379,
-0.08245918899774551,
0.09400343894958496,
0.2602980434894562,
0.14170607924461365,
0.4400092363357544,
-0.3218846917152405,
0.35475361347198486,
-0.1146959513425827,
-0.14527811110019684,
0.021751094609498978,
0.0020161718130111694,
-0.03585803508758545,
0.10246466100215912,
-0.22032147645950317,
-0.01854551210999489,
0.3766438364982605,
0.11740364879369736,
-0.1342606544494629,
-0.5176992416381836,
0.17388534545898438,
-0.33195027709007263,
0.19801728427410126,
0.17946135997772217,
0.46703648567199707,
-0.13070052862167358,
-0.12465224415063858,
-0.1632760465145111,
-0.4373708963394165,
-0.08701640367507935,
0.37259045243263245,
0.12454037368297577,
0.07772374153137207,
-0.048432521522045135,
-0.024659108370542526,
-0.5133278369903564,
0.23237493634223938,
0.0015352927148342133,
-0.2914162874221802,
-0.3512517213821411,
0.133647620677948,
-0.021085012704133987,
0.2113390564918518,
-0.023093802854418755,
0.05350824072957039,
-0.0593586340546608,
0.3087758421897888,
-0.34184473752975464,
-0.5334386229515076,
0.3983328342437744,
0.07657323777675629,
-0.36026322841644287,
0.038834456354379654,
0.2128361463546753,
-0.26841044425964355,
0.0745277926325798,
-0.27680277824401855,
-0.026730597019195557,
0.07259804010391235,
-0.21444746851921082,
-0.13853685557842255,
0.24728895723819733,
-0.17221182584762573,
0.027575943619012833,
-0.05895969271659851,
0.35224053263664246,
-0.10469511896371841,
0.10510003566741943,
-0.08456039428710938,
-0.026156479492783546
] |
https://github.com/huggingface/datasets/issues/5391 | Whisper Event - RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 [2:52:21<00:00, 10.34s/it] | Hey @catswithbats! Super sorry for the late reply! This is happening because there is data with label length (504) that exceeds the model's max length (448).
There are two options here:
1. Increase the model's `max_length` parameter:
```python
model.config.max_length = 512
```
2. Filter data with labels longer than max length: https://discuss.huggingface.co/t/open-to-the-community-whisper-fine-tuning-event/26681/21?u=sanchit-gandhi
Note that the datasets repo is reserved for issues directly related to the HF datasets library. Issues related to custom fine-tuning implementations are more applicable to the HF Forum: https://discuss.huggingface.co. You're more likely to get a response by posting your issue in the most applicable place and boost the chance of someone sharing a working solution! | Done in a VM with a GPU (Ubuntu) following the [Whisper Event - PYTHON](https://github.com/huggingface/community-events/tree/main/whisper-fine-tuning-event#python-script) instructions.
Attempted using [RuntimeError: he size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 - WEB](https://discuss.huggingface.co/t/trainer-runtimeerror-the-size-of-tensor-a-462-must-match-the-size-of-tensor-b-448-at-non-singleton-dimension-1/26010/10 ) - another person experiencing the same issue. But could not resolve the issue with the google/fleurs data. __Not clear what can be modified in the PY code to resolve the input data size mismatch, as the training data is already very small__.
Tried posting on Discord, @sanchit-gandhi and @vaibhavs10. Was hoping that the event is over and some input/help is now available. [Hugging Face - whisper-small-amet](https://huggingface.co/drmeeseeks/whisper-small-amet).
The paper [Robust Speech Recognition via Large-Scale Weak Supervision](https://arxiv.org/abs/2212.04356) am_et is a low resource language (Table E), with the WER results ranging from 120-229, based on model size. (Whisper small WER=120.2).
# ---> Initial Training Output
/usr/local/lib/python3.8/dist-packages/transformers/optimization.py:306: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use the PyTorch implementation torch.optim.AdamW instead, or set `no_deprecation_warning=True` to disable this warning
warnings.warn(
[INFO|trainer.py:1641] 2022-12-18 05:23:28,799 >> ***** Running training *****
[INFO|trainer.py:1642] 2022-12-18 05:23:28,799 >> Num examples = 446
[INFO|trainer.py:1643] 2022-12-18 05:23:28,799 >> Num Epochs = 72
[INFO|trainer.py:1644] 2022-12-18 05:23:28,799 >> Instantaneous batch size per device = 16
[INFO|trainer.py:1645] 2022-12-18 05:23:28,799 >> Total train batch size (w. parallel, distributed & accumulation) = 32
[INFO|trainer.py:1646] 2022-12-18 05:23:28,799 >> Gradient Accumulation steps = 2
[INFO|trainer.py:1647] 2022-12-18 05:23:28,800 >> Total optimization steps = 1000
[INFO|trainer.py:1648] 2022-12-18 05:23:28,801 >> Number of trainable parameters = 241734912
# ---> Error
14% 9/65 [07:07<48:34, 52.04s/it][INFO|configuration_utils.py:523] 2022-12-18 05:03:07,941 >> Generate config GenerationConfig {
"begin_suppress_tokens": [
220,
50257
],
"bos_token_id": 50257,
"decoder_start_token_id": 50258,
"eos_token_id": 50257,
"max_length": 448,
"pad_token_id": 50257,
"transformers_version": "4.26.0.dev0",
"use_cache": false
}
Traceback (most recent call last):
File "run_speech_recognition_seq2seq_streaming.py", line 629, in <module>
main()
File "run_speech_recognition_seq2seq_streaming.py", line 578, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 1534, in train
return inner_training_loop(
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 1859, in _inner_training_loop
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2122, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer_seq2seq.py", line 78, in evaluate
return super().evaluate(eval_dataset, ignore_keys=ignore_keys, metric_key_prefix=metric_key_prefix)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2818, in evaluate
output = eval_loop(
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 3000, in evaluation_loop
loss, logits, labels = self.prediction_step(model, inputs, prediction_loss_only, ignore_keys=ignore_keys)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer_seq2seq.py", line 213, in prediction_step
outputs = model(**inputs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 1197, in forward
outputs = self.model(
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 1066, in forward
decoder_outputs = self.decoder(
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 873, in forward
hidden_states = inputs_embeds + positions
RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1
100% 1000/1000 [2:52:21<00:00, 10.34s/it]
| 108 | Whisper Event - RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 [2:52:21<00:00, 10.34s/it]
Done in a VM with a GPU (Ubuntu) following the [Whisper Event - PYTHON](https://github.com/huggingface/community-events/tree/main/whisper-fine-tuning-event#python-script) instructions.
Attempted using [RuntimeError: he size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 - WEB](https://discuss.huggingface.co/t/trainer-runtimeerror-the-size-of-tensor-a-462-must-match-the-size-of-tensor-b-448-at-non-singleton-dimension-1/26010/10 ) - another person experiencing the same issue. But could not resolve the issue with the google/fleurs data. __Not clear what can be modified in the PY code to resolve the input data size mismatch, as the training data is already very small__.
Tried posting on Discord, @sanchit-gandhi and @vaibhavs10. Was hoping that the event is over and some input/help is now available. [Hugging Face - whisper-small-amet](https://huggingface.co/drmeeseeks/whisper-small-amet).
The paper [Robust Speech Recognition via Large-Scale Weak Supervision](https://arxiv.org/abs/2212.04356) am_et is a low resource language (Table E), with the WER results ranging from 120-229, based on model size. (Whisper small WER=120.2).
# ---> Initial Training Output
/usr/local/lib/python3.8/dist-packages/transformers/optimization.py:306: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use the PyTorch implementation torch.optim.AdamW instead, or set `no_deprecation_warning=True` to disable this warning
warnings.warn(
[INFO|trainer.py:1641] 2022-12-18 05:23:28,799 >> ***** Running training *****
[INFO|trainer.py:1642] 2022-12-18 05:23:28,799 >> Num examples = 446
[INFO|trainer.py:1643] 2022-12-18 05:23:28,799 >> Num Epochs = 72
[INFO|trainer.py:1644] 2022-12-18 05:23:28,799 >> Instantaneous batch size per device = 16
[INFO|trainer.py:1645] 2022-12-18 05:23:28,799 >> Total train batch size (w. parallel, distributed & accumulation) = 32
[INFO|trainer.py:1646] 2022-12-18 05:23:28,799 >> Gradient Accumulation steps = 2
[INFO|trainer.py:1647] 2022-12-18 05:23:28,800 >> Total optimization steps = 1000
[INFO|trainer.py:1648] 2022-12-18 05:23:28,801 >> Number of trainable parameters = 241734912
# ---> Error
14% 9/65 [07:07<48:34, 52.04s/it][INFO|configuration_utils.py:523] 2022-12-18 05:03:07,941 >> Generate config GenerationConfig {
"begin_suppress_tokens": [
220,
50257
],
"bos_token_id": 50257,
"decoder_start_token_id": 50258,
"eos_token_id": 50257,
"max_length": 448,
"pad_token_id": 50257,
"transformers_version": "4.26.0.dev0",
"use_cache": false
}
Traceback (most recent call last):
File "run_speech_recognition_seq2seq_streaming.py", line 629, in <module>
main()
File "run_speech_recognition_seq2seq_streaming.py", line 578, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 1534, in train
return inner_training_loop(
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 1859, in _inner_training_loop
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2122, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer_seq2seq.py", line 78, in evaluate
return super().evaluate(eval_dataset, ignore_keys=ignore_keys, metric_key_prefix=metric_key_prefix)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2818, in evaluate
output = eval_loop(
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 3000, in evaluation_loop
loss, logits, labels = self.prediction_step(model, inputs, prediction_loss_only, ignore_keys=ignore_keys)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer_seq2seq.py", line 213, in prediction_step
outputs = model(**inputs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 1197, in forward
outputs = self.model(
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 1066, in forward
decoder_outputs = self.decoder(
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 873, in forward
hidden_states = inputs_embeds + positions
RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1
100% 1000/1000 [2:52:21<00:00, 10.34s/it]
Hey @catswithbats! Super sorry for the late reply! This is happening because there is data with label length (504) that exceeds the model's max length (448).
There are two options here:
1. Increase the model's `max_length` parameter:
```python
model.config.max_length = 512
```
2. Filter data with labels longer than max length: https://discuss.huggingface.co/t/open-to-the-community-whisper-fine-tuning-event/26681/21?u=sanchit-gandhi
Note that the datasets repo is reserved for issues directly related to the HF datasets library. Issues related to custom fine-tuning implementations are more applicable to the HF Forum: https://discuss.huggingface.co. You're more likely to get a response by posting your issue in the most applicable place and boost the chance of someone sharing a working solution! | [
-0.1865757256746292,
-0.38332003355026245,
-0.00825178436934948,
0.3663005828857422,
0.15976998209953308,
-0.23157888650894165,
0.2509406507015228,
0.39457225799560547,
0.0024186819791793823,
0.2883606553077698,
0.10479263961315155,
-0.34932392835617065,
-0.23804496228694916,
0.29941651225090027,
-0.0014983518049120903,
-0.22182077169418335,
-0.12149340659379959,
-0.013619691133499146,
0.031106505542993546,
-0.026705998927354813,
0.15574155747890472,
0.1528434306383133,
-0.18898199498653412,
-0.10782474279403687,
-0.15596576035022736,
-0.13024741411209106,
0.07907684892416,
0.06806471943855286,
-0.35136210918426514,
-0.01911487616598606,
0.15650668740272522,
-0.35622549057006836,
-0.050544824451208115,
0.6082884073257446,
-0.0001221758866449818,
0.03898108750581741,
0.3701186776161194,
-0.19904500246047974,
0.06412787735462189,
0.0052000731229782104,
0.09224242717027664,
0.1769300103187561,
-0.19839976727962494,
0.22690966725349426,
-0.17648017406463623,
-0.02208024635910988,
-0.27736708521842957,
-0.004036981612443924,
0.5520844459533691,
0.35684511065483093,
0.05998058617115021,
0.4393806755542755,
0.544482409954071,
0.0775919258594513,
0.0379660464823246,
-0.19484494626522064,
0.10250198096036911,
0.14836500585079193,
0.16514265537261963,
0.10089297592639923,
0.13253754377365112,
0.42201098799705505,
-0.13431891798973083,
-0.0274001806974411,
0.2067161202430725,
-0.06028583645820618,
-0.21348536014556885,
-0.506450891494751,
0.0057347677648067474,
0.42300257086753845,
-0.11202900856733322,
-0.14793989062309265,
-0.08282724022865295,
-0.36943864822387695,
0.08428783714771271,
-0.2930528223514557,
0.05151586979627609,
-0.0028217872604727745,
-0.1115664690732956,
0.05131798982620239,
-0.16370633244514465,
-0.059072285890579224,
-0.10713192820549011,
0.08050457388162613,
0.13052481412887573,
0.2856675982475281,
-0.04569097235798836,
0.22158971428871155,
-0.06456813216209412,
-0.21835489571094513,
-0.21643659472465515,
-0.010737944394350052,
0.02206449583172798,
0.386669397354126,
-0.5825905203819275,
-0.44517749547958374,
-0.19582530856132507,
-0.312336802482605,
0.17676696181297302,
-0.13910183310508728,
0.10812539607286453,
0.024269241839647293,
-0.03255438059568405,
0.06888153403997421,
0.23200538754463196,
0.636812150478363,
-0.20319914817810059,
-0.09393493086099625,
0.17586448788642883,
0.2635616064071655,
0.4274536371231079,
0.3439962863922119,
0.05305046588182449,
-0.32401221990585327,
-0.4053803086280823,
0.04098501801490784,
0.0985938310623169,
-0.1870788037776947,
-0.329956978559494,
0.19283173978328705,
-0.526961624622345,
0.04614623263478279,
0.03992651030421257,
0.05163513123989105,
-0.20837190747261047,
0.3049207925796509,
0.35766899585723877,
0.15361061692237854,
-0.24615409970283508,
-0.11593511700630188,
-0.15898165106773376,
0.10552263259887695,
0.21845263242721558,
0.05826028436422348,
-0.10085012018680573,
0.11013780534267426,
0.1343797892332077,
0.0913616269826889,
0.2523829936981201,
-0.0002549365162849426,
-0.01580832526087761,
-0.08821232616901398,
-0.06242869049310684,
0.2954840064048767,
0.019634444266557693,
-0.231609508395195,
0.13268664479255676,
-0.11542254686355591,
-0.06683852523565292,
-0.009695649147033691,
-0.30932649970054626,
-0.28567081689834595,
0.14711466431617737,
0.1437351554632187,
-0.06951595842838287,
0.2946508526802063,
-0.06966324895620346,
0.24114210903644562,
0.3527114987373352,
0.17627902328968048,
-0.003557845950126648,
-0.3076660633087158,
-0.356054425239563,
-0.028483374044299126,
0.44878748059272766,
0.14483840763568878,
-0.05899335443973541,
-0.2577614486217499,
0.19696618616580963,
0.22085653245449066,
0.21544015407562256,
0.5847083926200867,
0.03931743651628494,
-0.20943140983581543,
-0.035150330513715744,
0.515903115272522,
0.013348042964935303,
-0.10625176131725311,
-0.4218737483024597,
0.05817089229822159,
-0.3990042805671692,
0.05185438692569733,
0.030292242765426636,
-0.05061383545398712,
-0.18165776133537292,
0.10148661583662033,
0.6217746734619141,
0.11764448136091232,
-0.09821100533008575,
-0.06941046565771103,
-0.41065746545791626,
-0.39790335297584534,
0.026940785348415375,
0.10553866624832153,
0.17993056774139404,
-0.2709077298641205,
-0.16859230399131775,
0.1715203821659088,
0.24352297186851501,
0.022098351269960403,
0.2081400752067566,
0.11885935068130493,
0.35398516058921814,
-0.1176726371049881,
0.029016707092523575,
0.2239372432231903,
0.14705108106136322,
0.1302572786808014,
-0.09847402572631836,
0.4163203537464142,
0.14903800189495087,
0.11841225624084473,
-0.13600695133209229,
-0.14998836815357208,
-0.02977173402905464,
-0.2976997494697571,
0.047890275716781616,
-0.4218765199184418,
0.2923676073551178,
-0.05632518231868744,
-0.0698106661438942,
0.3922375738620758,
-0.6174995303153992,
0.09884737432003021,
-0.4896990656852722,
0.026155756786465645,
-0.31077784299850464,
-0.32716578245162964,
0.2510370910167694,
0.32047200202941895,
0.1570730358362198,
0.11028940230607986,
-0.10183888673782349,
0.3197028338909149,
-0.22600378096103668,
-0.0848388522863388,
-0.31963199377059937,
0.3701808452606201,
0.19912011921405792,
-0.04966822266578674,
0.19989994168281555,
0.02962310053408146,
-0.09007445722818375,
0.025298550724983215,
0.26230522990226746,
0.29651176929473877,
0.4467339813709259,
0.270473450422287,
0.07396282255649567,
-0.17697475850582123,
-0.3392442762851715,
0.09543734788894653,
-0.03739868849515915,
-0.0515567883849144,
0.1976960450410843,
-0.471421480178833,
0.33024725317955017,
-0.13701242208480835,
-0.33249929547309875,
-0.22384914755821228,
0.22224991023540497,
0.04706166312098503,
0.2735588252544403,
0.34952205419540405,
-0.4042130708694458,
-0.20739030838012695,
-0.1828315258026123,
-0.030784640461206436,
0.34384602308273315,
0.08358372747898102,
-0.10714435577392578,
0.22877958416938782,
0.13354778289794922,
-0.10881959646940231,
0.16693156957626343,
0.14051280915737152,
-0.04773307964205742,
0.18725800514221191,
0.29787689447402954,
0.10944417119026184,
-0.15118223428726196,
0.13636310398578644,
-0.2904351055622101,
0.24552732706069946,
-0.4611784815788269,
-0.09801866859197617,
-0.09724479913711548,
0.058053791522979736,
-0.3350088894367218,
0.18928533792495728,
-0.4252118766307831,
0.06619585305452347,
0.1581610143184662,
-0.10249088704586029,
-0.03898362070322037,
-0.08271516859531403,
0.4423413872718811,
0.3233959376811981,
0.2924204170703888,
0.38243502378463745,
-0.02907300554215908,
0.10474495589733124,
-0.2877863645553589,
0.0630754679441452,
0.026595961302518845,
-0.32509785890579224,
0.040987614542245865,
-0.0211638193577528,
-0.41149771213531494,
0.3032483756542206,
-0.6685826778411865,
0.1505856066942215,
-0.19608168303966522,
0.3797929286956787,
0.08741123974323273,
0.21860939264297485,
0.0032428205013275146,
-0.24763613939285278,
-0.07112500071525574,
-0.002644471824169159,
-0.41205713152885437,
-0.050953302532434464,
-0.2286360114812851,
0.09675321727991104,
-0.1310216784477234,
-0.30843815207481384,
-0.32610949873924255,
-0.3116157054901123,
0.35372138023376465,
-0.16972018778324127,
0.04623519629240036,
0.238626629114151,
0.2910032868385315,
0.008667707443237305,
-0.15068255364894867,
0.13693232834339142,
-0.24176637828350067,
-0.24708816409111023,
0.21010082960128784,
0.019485745579004288,
-0.20961003005504608,
-0.22514356672763824,
0.09318112581968307,
0.13166752457618713,
0.005550379864871502,
-0.4566623568534851,
-0.3476253151893616,
-0.28635406494140625,
-0.5363571047782898,
0.04594951495528221,
-0.04921535402536392,
0.23136258125305176,
-0.14900381863117218,
0.008197026327252388,
0.08006208389997482,
-0.14040736854076385,
0.04991244152188301,
0.29702094197273254,
0.28220072388648987,
0.19079020619392395,
0.39141014218330383,
0.3815188705921173,
0.7570569515228271,
0.3134201169013977,
-0.3603922128677368,
0.016936127096414566,
0.08366301655769348,
0.04279934614896774,
-0.12975525856018066,
0.20614944398403168,
0.42727023363113403,
0.08398839086294174,
0.0574108362197876,
0.1511068344116211,
-0.14779624342918396,
0.18841347098350525,
-0.03050795942544937,
-0.16897039115428925,
0.06604880839586258,
-0.20997144281864166,
0.049593813717365265,
0.37607866525650024,
0.32982760667800903,
-0.07270081341266632,
0.20155444741249084,
0.1295831948518753,
-0.2235630750656128,
0.11314581334590912,
0.13660793006420135,
-0.09961121529340744,
0.31684067845344543,
0.0034813731908798218,
-0.28263765573501587,
-0.5443085432052612,
0.35552510619163513,
0.004765041172504425,
0.6009749174118042,
-0.036398205906152725,
-0.2929908037185669,
-0.11387021839618683,
0.07919915020465851,
0.37904733419418335,
0.11509953439235687,
-0.009804163128137589,
-0.1701579988002777,
0.08131677657365799,
-0.13036392629146576,
-0.02775494009256363,
0.07800400257110596,
-0.22291848063468933,
0.12010373175144196,
0.555420994758606,
-0.41410502791404724,
0.03209763392806053,
0.18541158735752106,
0.1620863378047943,
0.003445275127887726,
0.11726880818605423,
-0.09790584444999695,
0.056193821132183075,
-0.4161930978298187,
0.24969482421875,
0.17032812535762787,
0.13198383152484894,
-0.21287348866462708,
0.06408941745758057,
0.36673393845558167,
-0.22895249724388123,
0.3467365503311157,
0.13986696302890778,
0.34035393595695496,
0.0721326395869255,
0.13819077610969543,
0.3616889417171478,
0.010436683893203735,
0.1905290186405182,
0.20946648716926575,
0.2971935570240021,
-0.13683004677295685,
0.050109073519706726,
0.2148859202861786,
0.23314590752124786,
0.6293751001358032,
0.019094280898571014,
0.4336892068386078,
0.28412652015686035,
0.4011126756668091,
-0.24943968653678894,
0.23267754912376404,
0.2327783703804016,
0.0010970542207360268,
0.07374631613492966,
-0.20485959947109222,
0.28775280714035034,
0.11247727274894714,
0.14550060033798218,
0.16574814915657043,
-0.2614683508872986,
-0.0928402915596962,
0.2698782682418823,
0.03991420939564705,
1.0512892007827759,
0.18334761261940002,
0.10432946681976318,
0.15423184633255005,
-0.049369022250175476,
-0.02510637417435646,
-0.5814626216888428,
0.16750094294548035,
-0.2075987607240677,
0.27708426117897034,
0.05634206533432007,
-0.10791502892971039,
-0.05532681941986084,
-0.292758584022522,
-0.06333363801240921,
0.21898485720157623,
0.016647741198539734,
-0.10757692158222198,
-0.14639703929424286,
0.1634484827518463,
-0.17241385579109192,
-0.07697874307632446,
-0.029872357845306396,
0.041767388582229614,
-0.07600873708724976,
0.35775840282440186,
0.14070123434066772,
-0.15436944365501404,
-0.3412826955318451,
-0.5148729681968689,
-0.36585700511932373,
0.014375317841768265,
-0.5656377077102661,
-0.024136118590831757,
0.08187907934188843,
-0.5231339335441589,
0.47535017132759094,
0.14867614209651947,
0.015204712748527527,
0.2448457032442093,
-0.18139779567718506,
0.38698992133140564,
0.3224019408226013,
-0.04478232190012932,
0.1372392624616623,
-0.09268226474523544,
0.07195253670215607,
-0.06281103193759918,
-0.036750465631484985,
-0.044145673513412476,
0.012645010836422443,
0.009353477507829666,
-0.5623863339424133,
-0.21135391294956207,
0.39488685131073,
-0.05612439662218094,
0.019078997895121574,
0.09043991565704346,
-0.0020196959376335144,
-0.10722407698631287,
0.09499335289001465,
0.05774257332086563,
-0.189543679356575,
-0.10347158461809158,
0.28235894441604614,
-0.289705753326416,
0.08490651845932007,
0.5418034195899963,
0.08944830298423767,
0.2261573076248169,
0.6518534421920776,
0.3487448990345001,
0.10372766852378845,
-0.08931130915880203,
-0.2622538208961487,
0.37682098150253296,
-0.1615036278963089,
0.035783033818006516,
-0.0773681253194809,
-0.1581260859966278,
-0.14698533713817596,
0.1636536717414856,
0.013992991298437119,
-0.027815453708171844,
-0.05149078741669655,
-0.17375127971172333,
-0.27616339921951294,
0.2410983145236969,
-0.07133558392524719,
0.254702091217041,
-0.2896471321582794,
0.5392227172851562,
-0.3479471206665039,
0.09575732052326202,
-0.22104915976524353,
-0.02019328810274601,
-0.24230188131332397,
0.07708530128002167,
0.038183219730854034,
-0.18921396136283875,
0.3390306830406189,
-0.05351640656590462,
-0.03648766130208969,
0.2184884250164032,
-0.2271927297115326,
-0.09136466681957245,
-0.07174140214920044,
0.12380485981702805,
-0.12181741744279861,
-0.20515935122966766,
0.20945541560649872,
-0.0857173502445221,
-0.11361335217952728,
0.05842976272106171,
0.22842055559158325,
0.020892389118671417,
0.040465764701366425,
-0.21191798150539398,
-0.07089278101921082,
0.06367053836584091,
-0.015923835337162018,
-0.12025365233421326,
-0.20797711610794067,
0.212957501411438,
0.2105903923511505,
-0.06102854013442993,
0.07849095016717911,
-0.06025278568267822,
0.13333868980407715,
0.01894495263695717,
0.022633850574493408,
-0.10942953079938889,
0.07844122499227524,
-0.09034088253974915,
-0.4398494362831116,
-0.10803212970495224,
0.14406096935272217,
0.1674252599477768,
-0.37723004817962646,
-0.0500737801194191,
0.04207209497690201,
0.10394588857889175,
-0.127615824341774,
0.14169037342071533,
-0.23275238275527954,
0.0261211059987545,
-0.040961600840091705,
0.0964631587266922,
0.39426299929618835,
0.4038267135620117,
-0.414226770401001,
0.3000015318393707,
-0.04804672673344612,
-0.1452697068452835,
0.051572758704423904,
0.3515617251396179,
-0.02748967334628105,
-0.14117518067359924,
0.08443654328584671,
-0.370705783367157,
0.367357462644577,
0.039459262043237686,
-0.10807343572378159,
0.33231213688850403,
-0.21546190977096558,
0.11670870333909988,
0.043191734701395035,
-0.39997023344039917,
-0.3617164194583893,
0.08028369396924973,
0.026596643030643463,
0.3036520481109619,
-0.0405631959438324,
0.7349851131439209,
0.013530944474041462,
-0.057828351855278015,
0.07347439229488373,
0.02571125328540802,
-0.25716525316238403,
0.028855804353952408,
0.04976776987314224,
-0.31216874718666077,
-0.4522645175457001,
-0.03978769853711128,
0.04062208905816078,
-0.017658889293670654,
0.16511529684066772,
0.05324196070432663,
-0.39743906259536743,
-0.038461022078990936,
-0.7256074547767639,
0.4256158471107483,
0.20490504801273346,
-0.28068748116493225,
0.3155108094215393,
0.46169716119766235,
-0.3267825245857239,
0.1344291865825653,
0.30834347009658813,
0.5766407251358032,
0.14413487911224365,
-0.5000723004341125,
0.18302810192108154,
0.3181622624397278,
-0.14286957681179047,
-0.01850592903792858,
-0.0467229038476944,
0.41694870591163635,
-0.16736051440238953,
0.05766856297850609,
0.031511008739471436,
-0.1680079847574234,
-0.13739866018295288,
-0.2625458836555481,
0.2112942337989807,
-0.17258918285369873,
0.37711289525032043,
-0.3438773453235626,
0.1103767529129982,
-0.6406310796737671,
0.01211230456829071,
-0.6789149641990662,
0.2520250976085663,
0.27827635407447815,
0.17692865431308746,
-0.029493466019630432,
-0.14638744294643402,
0.0292346328496933,
-0.1979357898235321,
0.5119205713272095,
0.20224669575691223,
-0.13040301203727722,
-0.26152440905570984,
-0.12959237396717072,
-0.1707819402217865,
0.17359741032123566,
-0.20581954717636108,
0.38972198963165283,
-0.24688562750816345,
0.2689083516597748,
0.16660070419311523,
0.0142458975315094,
0.08852986991405487,
-0.39862099289894104,
-0.36175641417503357,
-0.11555776000022888,
-0.31460249423980713,
0.053965434432029724,
-0.31185173988342285,
-0.1527940183877945,
0.4541900157928467,
0.04604069143533707,
0.11223535239696503,
0.013739214278757572,
-0.13578587770462036,
-0.12064597010612488,
0.10435011982917786,
0.12376576662063599,
-0.04954618215560913,
0.5447084903717041,
0.12627045810222626,
0.3755326271057129,
-0.12773096561431885,
-0.32322001457214355,
-0.22492027282714844,
0.055765993893146515,
-0.3749485909938812,
0.13076820969581604,
-0.07741864025592804,
0.4023013114929199,
-0.012667981907725334,
-0.5938494801521301,
-0.4080051779747009,
0.17489062249660492,
-0.11673440784215927,
-0.326320618391037,
-0.2855980694293976,
0.2269362062215805,
-0.19166439771652222,
0.18733148276805878,
0.06990548223257065,
0.28560709953308105,
-0.035986483097076416,
-0.26500579714775085,
-0.29788777232170105,
-0.3558921217918396,
0.5655257105827332,
-0.05570845678448677,
0.08362777531147003,
-0.33075231313705444,
-0.10620914399623871,
0.18303127586841583,
0.008801688440144062,
-0.6148248314857483,
0.08383139222860336,
0.0881548672914505,
0.20443210005760193,
-0.20763158798217773,
0.1306716352701187,
0.19995829463005066,
-0.12946592271327972,
0.014874305576086044,
0.35810333490371704,
0.06775595992803574,
-0.12423402070999146,
0.2566342353820801,
-0.24241092801094055
] |
https://github.com/huggingface/datasets/issues/5391 | Whisper Event - RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 [2:52:21<00:00, 10.34s/it] | @sanchit-gandhi Thank you for all your work on this topic.
I'm finding that changing the `max_length` value does not make this error go away. | Done in a VM with a GPU (Ubuntu) following the [Whisper Event - PYTHON](https://github.com/huggingface/community-events/tree/main/whisper-fine-tuning-event#python-script) instructions.
Attempted using [RuntimeError: he size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 - WEB](https://discuss.huggingface.co/t/trainer-runtimeerror-the-size-of-tensor-a-462-must-match-the-size-of-tensor-b-448-at-non-singleton-dimension-1/26010/10 ) - another person experiencing the same issue. But could not resolve the issue with the google/fleurs data. __Not clear what can be modified in the PY code to resolve the input data size mismatch, as the training data is already very small__.
Tried posting on Discord, @sanchit-gandhi and @vaibhavs10. Was hoping that the event is over and some input/help is now available. [Hugging Face - whisper-small-amet](https://huggingface.co/drmeeseeks/whisper-small-amet).
The paper [Robust Speech Recognition via Large-Scale Weak Supervision](https://arxiv.org/abs/2212.04356) am_et is a low resource language (Table E), with the WER results ranging from 120-229, based on model size. (Whisper small WER=120.2).
# ---> Initial Training Output
/usr/local/lib/python3.8/dist-packages/transformers/optimization.py:306: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use the PyTorch implementation torch.optim.AdamW instead, or set `no_deprecation_warning=True` to disable this warning
warnings.warn(
[INFO|trainer.py:1641] 2022-12-18 05:23:28,799 >> ***** Running training *****
[INFO|trainer.py:1642] 2022-12-18 05:23:28,799 >> Num examples = 446
[INFO|trainer.py:1643] 2022-12-18 05:23:28,799 >> Num Epochs = 72
[INFO|trainer.py:1644] 2022-12-18 05:23:28,799 >> Instantaneous batch size per device = 16
[INFO|trainer.py:1645] 2022-12-18 05:23:28,799 >> Total train batch size (w. parallel, distributed & accumulation) = 32
[INFO|trainer.py:1646] 2022-12-18 05:23:28,799 >> Gradient Accumulation steps = 2
[INFO|trainer.py:1647] 2022-12-18 05:23:28,800 >> Total optimization steps = 1000
[INFO|trainer.py:1648] 2022-12-18 05:23:28,801 >> Number of trainable parameters = 241734912
# ---> Error
14% 9/65 [07:07<48:34, 52.04s/it][INFO|configuration_utils.py:523] 2022-12-18 05:03:07,941 >> Generate config GenerationConfig {
"begin_suppress_tokens": [
220,
50257
],
"bos_token_id": 50257,
"decoder_start_token_id": 50258,
"eos_token_id": 50257,
"max_length": 448,
"pad_token_id": 50257,
"transformers_version": "4.26.0.dev0",
"use_cache": false
}
Traceback (most recent call last):
File "run_speech_recognition_seq2seq_streaming.py", line 629, in <module>
main()
File "run_speech_recognition_seq2seq_streaming.py", line 578, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 1534, in train
return inner_training_loop(
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 1859, in _inner_training_loop
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2122, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer_seq2seq.py", line 78, in evaluate
return super().evaluate(eval_dataset, ignore_keys=ignore_keys, metric_key_prefix=metric_key_prefix)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2818, in evaluate
output = eval_loop(
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 3000, in evaluation_loop
loss, logits, labels = self.prediction_step(model, inputs, prediction_loss_only, ignore_keys=ignore_keys)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer_seq2seq.py", line 213, in prediction_step
outputs = model(**inputs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 1197, in forward
outputs = self.model(
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 1066, in forward
decoder_outputs = self.decoder(
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 873, in forward
hidden_states = inputs_embeds + positions
RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1
100% 1000/1000 [2:52:21<00:00, 10.34s/it]
| 24 | Whisper Event - RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 [2:52:21<00:00, 10.34s/it]
Done in a VM with a GPU (Ubuntu) following the [Whisper Event - PYTHON](https://github.com/huggingface/community-events/tree/main/whisper-fine-tuning-event#python-script) instructions.
Attempted using [RuntimeError: he size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 - WEB](https://discuss.huggingface.co/t/trainer-runtimeerror-the-size-of-tensor-a-462-must-match-the-size-of-tensor-b-448-at-non-singleton-dimension-1/26010/10 ) - another person experiencing the same issue. But could not resolve the issue with the google/fleurs data. __Not clear what can be modified in the PY code to resolve the input data size mismatch, as the training data is already very small__.
Tried posting on Discord, @sanchit-gandhi and @vaibhavs10. Was hoping that the event is over and some input/help is now available. [Hugging Face - whisper-small-amet](https://huggingface.co/drmeeseeks/whisper-small-amet).
The paper [Robust Speech Recognition via Large-Scale Weak Supervision](https://arxiv.org/abs/2212.04356) am_et is a low resource language (Table E), with the WER results ranging from 120-229, based on model size. (Whisper small WER=120.2).
# ---> Initial Training Output
/usr/local/lib/python3.8/dist-packages/transformers/optimization.py:306: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use the PyTorch implementation torch.optim.AdamW instead, or set `no_deprecation_warning=True` to disable this warning
warnings.warn(
[INFO|trainer.py:1641] 2022-12-18 05:23:28,799 >> ***** Running training *****
[INFO|trainer.py:1642] 2022-12-18 05:23:28,799 >> Num examples = 446
[INFO|trainer.py:1643] 2022-12-18 05:23:28,799 >> Num Epochs = 72
[INFO|trainer.py:1644] 2022-12-18 05:23:28,799 >> Instantaneous batch size per device = 16
[INFO|trainer.py:1645] 2022-12-18 05:23:28,799 >> Total train batch size (w. parallel, distributed & accumulation) = 32
[INFO|trainer.py:1646] 2022-12-18 05:23:28,799 >> Gradient Accumulation steps = 2
[INFO|trainer.py:1647] 2022-12-18 05:23:28,800 >> Total optimization steps = 1000
[INFO|trainer.py:1648] 2022-12-18 05:23:28,801 >> Number of trainable parameters = 241734912
# ---> Error
14% 9/65 [07:07<48:34, 52.04s/it][INFO|configuration_utils.py:523] 2022-12-18 05:03:07,941 >> Generate config GenerationConfig {
"begin_suppress_tokens": [
220,
50257
],
"bos_token_id": 50257,
"decoder_start_token_id": 50258,
"eos_token_id": 50257,
"max_length": 448,
"pad_token_id": 50257,
"transformers_version": "4.26.0.dev0",
"use_cache": false
}
Traceback (most recent call last):
File "run_speech_recognition_seq2seq_streaming.py", line 629, in <module>
main()
File "run_speech_recognition_seq2seq_streaming.py", line 578, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 1534, in train
return inner_training_loop(
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 1859, in _inner_training_loop
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2122, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer_seq2seq.py", line 78, in evaluate
return super().evaluate(eval_dataset, ignore_keys=ignore_keys, metric_key_prefix=metric_key_prefix)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2818, in evaluate
output = eval_loop(
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 3000, in evaluation_loop
loss, logits, labels = self.prediction_step(model, inputs, prediction_loss_only, ignore_keys=ignore_keys)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer_seq2seq.py", line 213, in prediction_step
outputs = model(**inputs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 1197, in forward
outputs = self.model(
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 1066, in forward
decoder_outputs = self.decoder(
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 873, in forward
hidden_states = inputs_embeds + positions
RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1
100% 1000/1000 [2:52:21<00:00, 10.34s/it]
@sanchit-gandhi Thank you for all your work on this topic.
I'm finding that changing the `max_length` value does not make this error go away. | [
-0.1865757256746292,
-0.38332003355026245,
-0.00825178436934948,
0.3663005828857422,
0.15976998209953308,
-0.23157888650894165,
0.2509406507015228,
0.39457225799560547,
0.0024186819791793823,
0.2883606553077698,
0.10479263961315155,
-0.34932392835617065,
-0.23804496228694916,
0.29941651225090027,
-0.0014983518049120903,
-0.22182077169418335,
-0.12149340659379959,
-0.013619691133499146,
0.031106505542993546,
-0.026705998927354813,
0.15574155747890472,
0.1528434306383133,
-0.18898199498653412,
-0.10782474279403687,
-0.15596576035022736,
-0.13024741411209106,
0.07907684892416,
0.06806471943855286,
-0.35136210918426514,
-0.01911487616598606,
0.15650668740272522,
-0.35622549057006836,
-0.050544824451208115,
0.6082884073257446,
-0.0001221758866449818,
0.03898108750581741,
0.3701186776161194,
-0.19904500246047974,
0.06412787735462189,
0.0052000731229782104,
0.09224242717027664,
0.1769300103187561,
-0.19839976727962494,
0.22690966725349426,
-0.17648017406463623,
-0.02208024635910988,
-0.27736708521842957,
-0.004036981612443924,
0.5520844459533691,
0.35684511065483093,
0.05998058617115021,
0.4393806755542755,
0.544482409954071,
0.0775919258594513,
0.0379660464823246,
-0.19484494626522064,
0.10250198096036911,
0.14836500585079193,
0.16514265537261963,
0.10089297592639923,
0.13253754377365112,
0.42201098799705505,
-0.13431891798973083,
-0.0274001806974411,
0.2067161202430725,
-0.06028583645820618,
-0.21348536014556885,
-0.506450891494751,
0.0057347677648067474,
0.42300257086753845,
-0.11202900856733322,
-0.14793989062309265,
-0.08282724022865295,
-0.36943864822387695,
0.08428783714771271,
-0.2930528223514557,
0.05151586979627609,
-0.0028217872604727745,
-0.1115664690732956,
0.05131798982620239,
-0.16370633244514465,
-0.059072285890579224,
-0.10713192820549011,
0.08050457388162613,
0.13052481412887573,
0.2856675982475281,
-0.04569097235798836,
0.22158971428871155,
-0.06456813216209412,
-0.21835489571094513,
-0.21643659472465515,
-0.010737944394350052,
0.02206449583172798,
0.386669397354126,
-0.5825905203819275,
-0.44517749547958374,
-0.19582530856132507,
-0.312336802482605,
0.17676696181297302,
-0.13910183310508728,
0.10812539607286453,
0.024269241839647293,
-0.03255438059568405,
0.06888153403997421,
0.23200538754463196,
0.636812150478363,
-0.20319914817810059,
-0.09393493086099625,
0.17586448788642883,
0.2635616064071655,
0.4274536371231079,
0.3439962863922119,
0.05305046588182449,
-0.32401221990585327,
-0.4053803086280823,
0.04098501801490784,
0.0985938310623169,
-0.1870788037776947,
-0.329956978559494,
0.19283173978328705,
-0.526961624622345,
0.04614623263478279,
0.03992651030421257,
0.05163513123989105,
-0.20837190747261047,
0.3049207925796509,
0.35766899585723877,
0.15361061692237854,
-0.24615409970283508,
-0.11593511700630188,
-0.15898165106773376,
0.10552263259887695,
0.21845263242721558,
0.05826028436422348,
-0.10085012018680573,
0.11013780534267426,
0.1343797892332077,
0.0913616269826889,
0.2523829936981201,
-0.0002549365162849426,
-0.01580832526087761,
-0.08821232616901398,
-0.06242869049310684,
0.2954840064048767,
0.019634444266557693,
-0.231609508395195,
0.13268664479255676,
-0.11542254686355591,
-0.06683852523565292,
-0.009695649147033691,
-0.30932649970054626,
-0.28567081689834595,
0.14711466431617737,
0.1437351554632187,
-0.06951595842838287,
0.2946508526802063,
-0.06966324895620346,
0.24114210903644562,
0.3527114987373352,
0.17627902328968048,
-0.003557845950126648,
-0.3076660633087158,
-0.356054425239563,
-0.028483374044299126,
0.44878748059272766,
0.14483840763568878,
-0.05899335443973541,
-0.2577614486217499,
0.19696618616580963,
0.22085653245449066,
0.21544015407562256,
0.5847083926200867,
0.03931743651628494,
-0.20943140983581543,
-0.035150330513715744,
0.515903115272522,
0.013348042964935303,
-0.10625176131725311,
-0.4218737483024597,
0.05817089229822159,
-0.3990042805671692,
0.05185438692569733,
0.030292242765426636,
-0.05061383545398712,
-0.18165776133537292,
0.10148661583662033,
0.6217746734619141,
0.11764448136091232,
-0.09821100533008575,
-0.06941046565771103,
-0.41065746545791626,
-0.39790335297584534,
0.026940785348415375,
0.10553866624832153,
0.17993056774139404,
-0.2709077298641205,
-0.16859230399131775,
0.1715203821659088,
0.24352297186851501,
0.022098351269960403,
0.2081400752067566,
0.11885935068130493,
0.35398516058921814,
-0.1176726371049881,
0.029016707092523575,
0.2239372432231903,
0.14705108106136322,
0.1302572786808014,
-0.09847402572631836,
0.4163203537464142,
0.14903800189495087,
0.11841225624084473,
-0.13600695133209229,
-0.14998836815357208,
-0.02977173402905464,
-0.2976997494697571,
0.047890275716781616,
-0.4218765199184418,
0.2923676073551178,
-0.05632518231868744,
-0.0698106661438942,
0.3922375738620758,
-0.6174995303153992,
0.09884737432003021,
-0.4896990656852722,
0.026155756786465645,
-0.31077784299850464,
-0.32716578245162964,
0.2510370910167694,
0.32047200202941895,
0.1570730358362198,
0.11028940230607986,
-0.10183888673782349,
0.3197028338909149,
-0.22600378096103668,
-0.0848388522863388,
-0.31963199377059937,
0.3701808452606201,
0.19912011921405792,
-0.04966822266578674,
0.19989994168281555,
0.02962310053408146,
-0.09007445722818375,
0.025298550724983215,
0.26230522990226746,
0.29651176929473877,
0.4467339813709259,
0.270473450422287,
0.07396282255649567,
-0.17697475850582123,
-0.3392442762851715,
0.09543734788894653,
-0.03739868849515915,
-0.0515567883849144,
0.1976960450410843,
-0.471421480178833,
0.33024725317955017,
-0.13701242208480835,
-0.33249929547309875,
-0.22384914755821228,
0.22224991023540497,
0.04706166312098503,
0.2735588252544403,
0.34952205419540405,
-0.4042130708694458,
-0.20739030838012695,
-0.1828315258026123,
-0.030784640461206436,
0.34384602308273315,
0.08358372747898102,
-0.10714435577392578,
0.22877958416938782,
0.13354778289794922,
-0.10881959646940231,
0.16693156957626343,
0.14051280915737152,
-0.04773307964205742,
0.18725800514221191,
0.29787689447402954,
0.10944417119026184,
-0.15118223428726196,
0.13636310398578644,
-0.2904351055622101,
0.24552732706069946,
-0.4611784815788269,
-0.09801866859197617,
-0.09724479913711548,
0.058053791522979736,
-0.3350088894367218,
0.18928533792495728,
-0.4252118766307831,
0.06619585305452347,
0.1581610143184662,
-0.10249088704586029,
-0.03898362070322037,
-0.08271516859531403,
0.4423413872718811,
0.3233959376811981,
0.2924204170703888,
0.38243502378463745,
-0.02907300554215908,
0.10474495589733124,
-0.2877863645553589,
0.0630754679441452,
0.026595961302518845,
-0.32509785890579224,
0.040987614542245865,
-0.0211638193577528,
-0.41149771213531494,
0.3032483756542206,
-0.6685826778411865,
0.1505856066942215,
-0.19608168303966522,
0.3797929286956787,
0.08741123974323273,
0.21860939264297485,
0.0032428205013275146,
-0.24763613939285278,
-0.07112500071525574,
-0.002644471824169159,
-0.41205713152885437,
-0.050953302532434464,
-0.2286360114812851,
0.09675321727991104,
-0.1310216784477234,
-0.30843815207481384,
-0.32610949873924255,
-0.3116157054901123,
0.35372138023376465,
-0.16972018778324127,
0.04623519629240036,
0.238626629114151,
0.2910032868385315,
0.008667707443237305,
-0.15068255364894867,
0.13693232834339142,
-0.24176637828350067,
-0.24708816409111023,
0.21010082960128784,
0.019485745579004288,
-0.20961003005504608,
-0.22514356672763824,
0.09318112581968307,
0.13166752457618713,
0.005550379864871502,
-0.4566623568534851,
-0.3476253151893616,
-0.28635406494140625,
-0.5363571047782898,
0.04594951495528221,
-0.04921535402536392,
0.23136258125305176,
-0.14900381863117218,
0.008197026327252388,
0.08006208389997482,
-0.14040736854076385,
0.04991244152188301,
0.29702094197273254,
0.28220072388648987,
0.19079020619392395,
0.39141014218330383,
0.3815188705921173,
0.7570569515228271,
0.3134201169013977,
-0.3603922128677368,
0.016936127096414566,
0.08366301655769348,
0.04279934614896774,
-0.12975525856018066,
0.20614944398403168,
0.42727023363113403,
0.08398839086294174,
0.0574108362197876,
0.1511068344116211,
-0.14779624342918396,
0.18841347098350525,
-0.03050795942544937,
-0.16897039115428925,
0.06604880839586258,
-0.20997144281864166,
0.049593813717365265,
0.37607866525650024,
0.32982760667800903,
-0.07270081341266632,
0.20155444741249084,
0.1295831948518753,
-0.2235630750656128,
0.11314581334590912,
0.13660793006420135,
-0.09961121529340744,
0.31684067845344543,
0.0034813731908798218,
-0.28263765573501587,
-0.5443085432052612,
0.35552510619163513,
0.004765041172504425,
0.6009749174118042,
-0.036398205906152725,
-0.2929908037185669,
-0.11387021839618683,
0.07919915020465851,
0.37904733419418335,
0.11509953439235687,
-0.009804163128137589,
-0.1701579988002777,
0.08131677657365799,
-0.13036392629146576,
-0.02775494009256363,
0.07800400257110596,
-0.22291848063468933,
0.12010373175144196,
0.555420994758606,
-0.41410502791404724,
0.03209763392806053,
0.18541158735752106,
0.1620863378047943,
0.003445275127887726,
0.11726880818605423,
-0.09790584444999695,
0.056193821132183075,
-0.4161930978298187,
0.24969482421875,
0.17032812535762787,
0.13198383152484894,
-0.21287348866462708,
0.06408941745758057,
0.36673393845558167,
-0.22895249724388123,
0.3467365503311157,
0.13986696302890778,
0.34035393595695496,
0.0721326395869255,
0.13819077610969543,
0.3616889417171478,
0.010436683893203735,
0.1905290186405182,
0.20946648716926575,
0.2971935570240021,
-0.13683004677295685,
0.050109073519706726,
0.2148859202861786,
0.23314590752124786,
0.6293751001358032,
0.019094280898571014,
0.4336892068386078,
0.28412652015686035,
0.4011126756668091,
-0.24943968653678894,
0.23267754912376404,
0.2327783703804016,
0.0010970542207360268,
0.07374631613492966,
-0.20485959947109222,
0.28775280714035034,
0.11247727274894714,
0.14550060033798218,
0.16574814915657043,
-0.2614683508872986,
-0.0928402915596962,
0.2698782682418823,
0.03991420939564705,
1.0512892007827759,
0.18334761261940002,
0.10432946681976318,
0.15423184633255005,
-0.049369022250175476,
-0.02510637417435646,
-0.5814626216888428,
0.16750094294548035,
-0.2075987607240677,
0.27708426117897034,
0.05634206533432007,
-0.10791502892971039,
-0.05532681941986084,
-0.292758584022522,
-0.06333363801240921,
0.21898485720157623,
0.016647741198539734,
-0.10757692158222198,
-0.14639703929424286,
0.1634484827518463,
-0.17241385579109192,
-0.07697874307632446,
-0.029872357845306396,
0.041767388582229614,
-0.07600873708724976,
0.35775840282440186,
0.14070123434066772,
-0.15436944365501404,
-0.3412826955318451,
-0.5148729681968689,
-0.36585700511932373,
0.014375317841768265,
-0.5656377077102661,
-0.024136118590831757,
0.08187907934188843,
-0.5231339335441589,
0.47535017132759094,
0.14867614209651947,
0.015204712748527527,
0.2448457032442093,
-0.18139779567718506,
0.38698992133140564,
0.3224019408226013,
-0.04478232190012932,
0.1372392624616623,
-0.09268226474523544,
0.07195253670215607,
-0.06281103193759918,
-0.036750465631484985,
-0.044145673513412476,
0.012645010836422443,
0.009353477507829666,
-0.5623863339424133,
-0.21135391294956207,
0.39488685131073,
-0.05612439662218094,
0.019078997895121574,
0.09043991565704346,
-0.0020196959376335144,
-0.10722407698631287,
0.09499335289001465,
0.05774257332086563,
-0.189543679356575,
-0.10347158461809158,
0.28235894441604614,
-0.289705753326416,
0.08490651845932007,
0.5418034195899963,
0.08944830298423767,
0.2261573076248169,
0.6518534421920776,
0.3487448990345001,
0.10372766852378845,
-0.08931130915880203,
-0.2622538208961487,
0.37682098150253296,
-0.1615036278963089,
0.035783033818006516,
-0.0773681253194809,
-0.1581260859966278,
-0.14698533713817596,
0.1636536717414856,
0.013992991298437119,
-0.027815453708171844,
-0.05149078741669655,
-0.17375127971172333,
-0.27616339921951294,
0.2410983145236969,
-0.07133558392524719,
0.254702091217041,
-0.2896471321582794,
0.5392227172851562,
-0.3479471206665039,
0.09575732052326202,
-0.22104915976524353,
-0.02019328810274601,
-0.24230188131332397,
0.07708530128002167,
0.038183219730854034,
-0.18921396136283875,
0.3390306830406189,
-0.05351640656590462,
-0.03648766130208969,
0.2184884250164032,
-0.2271927297115326,
-0.09136466681957245,
-0.07174140214920044,
0.12380485981702805,
-0.12181741744279861,
-0.20515935122966766,
0.20945541560649872,
-0.0857173502445221,
-0.11361335217952728,
0.05842976272106171,
0.22842055559158325,
0.020892389118671417,
0.040465764701366425,
-0.21191798150539398,
-0.07089278101921082,
0.06367053836584091,
-0.015923835337162018,
-0.12025365233421326,
-0.20797711610794067,
0.212957501411438,
0.2105903923511505,
-0.06102854013442993,
0.07849095016717911,
-0.06025278568267822,
0.13333868980407715,
0.01894495263695717,
0.022633850574493408,
-0.10942953079938889,
0.07844122499227524,
-0.09034088253974915,
-0.4398494362831116,
-0.10803212970495224,
0.14406096935272217,
0.1674252599477768,
-0.37723004817962646,
-0.0500737801194191,
0.04207209497690201,
0.10394588857889175,
-0.127615824341774,
0.14169037342071533,
-0.23275238275527954,
0.0261211059987545,
-0.040961600840091705,
0.0964631587266922,
0.39426299929618835,
0.4038267135620117,
-0.414226770401001,
0.3000015318393707,
-0.04804672673344612,
-0.1452697068452835,
0.051572758704423904,
0.3515617251396179,
-0.02748967334628105,
-0.14117518067359924,
0.08443654328584671,
-0.370705783367157,
0.367357462644577,
0.039459262043237686,
-0.10807343572378159,
0.33231213688850403,
-0.21546190977096558,
0.11670870333909988,
0.043191734701395035,
-0.39997023344039917,
-0.3617164194583893,
0.08028369396924973,
0.026596643030643463,
0.3036520481109619,
-0.0405631959438324,
0.7349851131439209,
0.013530944474041462,
-0.057828351855278015,
0.07347439229488373,
0.02571125328540802,
-0.25716525316238403,
0.028855804353952408,
0.04976776987314224,
-0.31216874718666077,
-0.4522645175457001,
-0.03978769853711128,
0.04062208905816078,
-0.017658889293670654,
0.16511529684066772,
0.05324196070432663,
-0.39743906259536743,
-0.038461022078990936,
-0.7256074547767639,
0.4256158471107483,
0.20490504801273346,
-0.28068748116493225,
0.3155108094215393,
0.46169716119766235,
-0.3267825245857239,
0.1344291865825653,
0.30834347009658813,
0.5766407251358032,
0.14413487911224365,
-0.5000723004341125,
0.18302810192108154,
0.3181622624397278,
-0.14286957681179047,
-0.01850592903792858,
-0.0467229038476944,
0.41694870591163635,
-0.16736051440238953,
0.05766856297850609,
0.031511008739471436,
-0.1680079847574234,
-0.13739866018295288,
-0.2625458836555481,
0.2112942337989807,
-0.17258918285369873,
0.37711289525032043,
-0.3438773453235626,
0.1103767529129982,
-0.6406310796737671,
0.01211230456829071,
-0.6789149641990662,
0.2520250976085663,
0.27827635407447815,
0.17692865431308746,
-0.029493466019630432,
-0.14638744294643402,
0.0292346328496933,
-0.1979357898235321,
0.5119205713272095,
0.20224669575691223,
-0.13040301203727722,
-0.26152440905570984,
-0.12959237396717072,
-0.1707819402217865,
0.17359741032123566,
-0.20581954717636108,
0.38972198963165283,
-0.24688562750816345,
0.2689083516597748,
0.16660070419311523,
0.0142458975315094,
0.08852986991405487,
-0.39862099289894104,
-0.36175641417503357,
-0.11555776000022888,
-0.31460249423980713,
0.053965434432029724,
-0.31185173988342285,
-0.1527940183877945,
0.4541900157928467,
0.04604069143533707,
0.11223535239696503,
0.013739214278757572,
-0.13578587770462036,
-0.12064597010612488,
0.10435011982917786,
0.12376576662063599,
-0.04954618215560913,
0.5447084903717041,
0.12627045810222626,
0.3755326271057129,
-0.12773096561431885,
-0.32322001457214355,
-0.22492027282714844,
0.055765993893146515,
-0.3749485909938812,
0.13076820969581604,
-0.07741864025592804,
0.4023013114929199,
-0.012667981907725334,
-0.5938494801521301,
-0.4080051779747009,
0.17489062249660492,
-0.11673440784215927,
-0.326320618391037,
-0.2855980694293976,
0.2269362062215805,
-0.19166439771652222,
0.18733148276805878,
0.06990548223257065,
0.28560709953308105,
-0.035986483097076416,
-0.26500579714775085,
-0.29788777232170105,
-0.3558921217918396,
0.5655257105827332,
-0.05570845678448677,
0.08362777531147003,
-0.33075231313705444,
-0.10620914399623871,
0.18303127586841583,
0.008801688440144062,
-0.6148248314857483,
0.08383139222860336,
0.0881548672914505,
0.20443210005760193,
-0.20763158798217773,
0.1306716352701187,
0.19995829463005066,
-0.12946592271327972,
0.014874305576086044,
0.35810333490371704,
0.06775595992803574,
-0.12423402070999146,
0.2566342353820801,
-0.24241092801094055
] |
https://github.com/huggingface/datasets/issues/5390 | Error when pushing to the CI hub | Hmmm, git bisect tells me that the behavior is the same since https://github.com/huggingface/datasets/commit/67e65c90e9490810b89ee140da11fdd13c356c9c (3 Oct), i.e. https://github.com/huggingface/datasets/pull/4926 | ### Describe the bug
Note that it's a special case where the Hub URL is "https://hub-ci.huggingface.co", which does not appear if we do the same on the Hub (https://huggingface.co).
The call to `dataset.push_to_hub(` fails:
```
Pushing dataset shards to the dataset hub: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.93s/it]
Traceback (most recent call last):
File "reproduce_hubci.py", line 16, in <module>
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
File "/home/slesage/hf/datasets/src/datasets/arrow_dataset.py", line 5025, in push_to_hub
HfApi(endpoint=config.HF_ENDPOINT).upload_file(
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1346, in upload_file
raise err
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1337, in upload_file
r.raise_for_status()
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/requests/models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://hub-ci.huggingface.co/api/datasets/__DUMMY_DATASETS_SERVER_USER__/bug-16718047265472/upload/main/README.md
```
### Steps to reproduce the bug
```python
# reproduce.py
from datasets import Dataset
import time
USER = "__DUMMY_DATASETS_SERVER_USER__"
USER_TOKEN = "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"
dataset = Dataset.from_dict({"a": [1, 2, 3]})
repo_id = f"{USER}/bug-{int(time.time() * 10e3)}"
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
```
```bash
$ HF_ENDPOINT="https://hub-ci.huggingface.co" python reproduce.py
```
### Expected behavior
No error and the dataset should be uploaded to the Hub with the README file (which generates the error).
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.0-1026-aws-x86_64-with-glibc2.35
- Python version: 3.9.15
- PyArrow version: 7.0.0
- Pandas version: 1.5.2
| 17 | Error when pushing to the CI hub
### Describe the bug
Note that it's a special case where the Hub URL is "https://hub-ci.huggingface.co", which does not appear if we do the same on the Hub (https://huggingface.co).
The call to `dataset.push_to_hub(` fails:
```
Pushing dataset shards to the dataset hub: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.93s/it]
Traceback (most recent call last):
File "reproduce_hubci.py", line 16, in <module>
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
File "/home/slesage/hf/datasets/src/datasets/arrow_dataset.py", line 5025, in push_to_hub
HfApi(endpoint=config.HF_ENDPOINT).upload_file(
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1346, in upload_file
raise err
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1337, in upload_file
r.raise_for_status()
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/requests/models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://hub-ci.huggingface.co/api/datasets/__DUMMY_DATASETS_SERVER_USER__/bug-16718047265472/upload/main/README.md
```
### Steps to reproduce the bug
```python
# reproduce.py
from datasets import Dataset
import time
USER = "__DUMMY_DATASETS_SERVER_USER__"
USER_TOKEN = "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"
dataset = Dataset.from_dict({"a": [1, 2, 3]})
repo_id = f"{USER}/bug-{int(time.time() * 10e3)}"
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
```
```bash
$ HF_ENDPOINT="https://hub-ci.huggingface.co" python reproduce.py
```
### Expected behavior
No error and the dataset should be uploaded to the Hub with the README file (which generates the error).
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.0-1026-aws-x86_64-with-glibc2.35
- Python version: 3.9.15
- PyArrow version: 7.0.0
- Pandas version: 1.5.2
Hmmm, git bisect tells me that the behavior is the same since https://github.com/huggingface/datasets/commit/67e65c90e9490810b89ee140da11fdd13c356c9c (3 Oct), i.e. https://github.com/huggingface/datasets/pull/4926 | [
-0.25651171803474426,
-0.39295852184295654,
0.041849467903375626,
0.058050427585840225,
0.010085087269544601,
-0.0018385425209999084,
0.19325734674930573,
0.24485576152801514,
0.010120231658220291,
0.03842552751302719,
-0.10119698196649551,
0.05556296929717064,
0.09907793253660202,
0.48055845499038696,
0.035029761493206024,
0.04912268742918968,
0.16502779722213745,
-0.09196779131889343,
0.14359650015830994,
-0.09019273519515991,
-0.2067345231771469,
0.058143287897109985,
-0.1382063776254654,
0.21928752958774567,
-0.4184926748275757,
-0.18317608535289764,
-0.044367652386426926,
0.37922579050064087,
-0.04584374278783798,
-0.20377260446548462,
0.427946001291275,
0.03951845318078995,
-0.038654226809740067,
0.7026517391204834,
-0.00011475833161966875,
0.028223633766174316,
0.5114488005638123,
0.07572194933891296,
-0.4094427525997162,
-0.36653536558151245,
-0.13832241296768188,
-0.08801419287919998,
-0.1861429512500763,
0.04728657752275467,
-0.035959333181381226,
0.4323616325855255,
-0.0745014175772667,
0.13093775510787964,
0.11692382395267487,
0.2248910367488861,
0.20099622011184692,
0.4762099087238312,
0.10917598009109497,
-0.29725217819213867,
0.19787997007369995,
0.23391008377075195,
-0.23252572119235992,
0.1139989048242569,
0.009575992822647095,
0.2066812962293625,
-0.03537077456712723,
0.11953839659690857,
0.12677979469299316,
-0.06055257096886635,
0.17653688788414001,
-0.12940001487731934,
-0.3712176978588104,
-0.23886382579803467,
0.08107930421829224,
-0.04450911283493042,
0.04164092615246773,
-0.37361690402030945,
-0.46186161041259766,
-0.04457023739814758,
-0.22903017699718475,
-0.20572887361049652,
0.31704506278038025,
0.1727198362350464,
-0.27072378993034363,
-0.004586208611726761,
-0.21755196154117584,
-0.3049395978450775,
-0.10119526088237762,
-0.007162339985370636,
-0.025983698666095734,
0.170299232006073,
-0.027705997228622437,
0.09540732204914093,
0.13283152878284454,
-0.1612749546766281,
0.10973665863275528,
-0.15672874450683594,
-0.05303525552153587,
-0.06377323716878891,
-0.4544473886489868,
-0.1711757779121399,
0.0023665204644203186,
0.5406168103218079,
0.1900545358657837,
0.18896013498306274,
-0.09526771306991577,
0.027161331847310066,
-0.15719836950302124,
0.16316041350364685,
0.27665603160858154,
0.09843797981739044,
0.06781807541847229,
0.2759481966495514,
0.29747119545936584,
0.46764716506004333,
0.19636309146881104,
-0.032257869839668274,
0.14955973625183105,
-0.2805691659450531,
-0.034406401216983795,
0.04429112747311592,
0.39027702808380127,
-0.28729870915412903,
-0.3934999108314514,
0.12857751548290253,
0.17036879062652588,
0.32471969723701477,
0.06050386279821396,
0.26418057084083557,
0.016492396593093872,
0.0636734813451767,
-0.17715579271316528,
0.1734902560710907,
-0.2325388789176941,
0.1340777724981308,
-0.2656345069408417,
0.108073890209198,
0.06621533632278442,
0.22514840960502625,
0.15353389084339142,
-0.6025370955467224,
0.1824645847082138,
0.13752387464046478,
0.4324747323989868,
-0.13991107046604156,
-0.14347341656684875,
0.02133982628583908,
0.001271165907382965,
0.33995547890663147,
0.15845051407814026,
0.3048465847969055,
0.25865834951400757,
-0.2796022891998291,
-0.11548089981079102,
-0.07322051376104355,
-0.6257144212722778,
-0.3451710343360901,
-0.17675535380840302,
0.20192407071590424,
-0.1721494495868683,
-0.017141733318567276,
-0.4728828966617584,
-0.2738557755947113,
-0.09936598688364029,
0.0690428763628006,
0.022086679935455322,
0.003934288397431374,
-0.05963870882987976,
-0.05410352721810341,
0.17716099321842194,
0.43347203731536865,
0.05753595754504204,
0.026068389415740967,
0.1649036705493927,
0.16130095720291138,
-0.1185404434800148,
0.2271244376897812,
-0.19044072926044464,
-0.16129690408706665,
-0.2533898949623108,
0.14992162585258484,
0.06785841286182404,
-0.7800475358963013,
-0.4181014597415924,
0.16559921205043793,
-0.26154181361198425,
-0.20232795178890228,
-0.2819124460220337,
-0.027463994920253754,
0.15144863724708557,
0.03421429917216301,
0.10931342840194702,
0.13970093429088593,
-0.12303267419338226,
0.10636565834283829,
-0.34877172112464905,
-0.3137730360031128,
-0.3785816431045532,
0.1802659034729004,
0.07356563210487366,
0.09026686102151871,
0.29346582293510437,
0.057194918394088745,
0.23464825749397278,
0.09160764515399933,
0.23839987814426422,
0.16329416632652283,
0.5480523109436035,
-0.22485233843326569,
0.1823684424161911,
0.0321374237537384,
-0.4058718979358673,
0.1957787275314331,
-0.022012818604707718,
0.20875662565231323,
-0.11259663105010986,
-0.14972279965877533,
-0.529375433921814,
0.1652916520833969,
-0.338249534368515,
0.05219034105539322,
0.06306084245443344,
-0.3550640940666199,
-0.05264808237552643,
0.09555414319038391,
-0.06568410992622375,
0.3459787964820862,
-0.17236723005771637,
0.35549619793891907,
-0.36129340529441833,
0.5986379981040955,
-0.18735986948013306,
-0.147737517952919,
0.10398441553115845,
0.01628691330552101,
0.37822896242141724,
-0.1863466054201126,
-0.2745091915130615,
0.32993656396865845,
0.0754803940653801,
0.3770179748535156,
0.3468438684940338,
0.03393298387527466,
0.3839966356754303,
-0.23572030663490295,
0.05944950878620148,
0.14176666736602783,
0.044678471982479095,
0.07446592301130295,
-0.16786620020866394,
0.3398274779319763,
-0.2653239965438843,
0.27257832884788513,
-0.06034853309392929,
0.30170562863349915,
0.1109015941619873,
0.028902996331453323,
-0.007008334156125784,
-0.07688111066818237,
0.2071724683046341,
-0.04820582643151283,
0.04326488450169563,
-0.2682729959487915,
0.36521634459495544,
0.10629520565271378,
0.28308406472206116,
0.17015080153942108,
-0.09987478703260422,
0.25989922881126404,
-0.12770456075668335,
-0.04067806154489517,
0.4095664620399475,
0.3595592975616455,
0.03918333351612091,
-0.08957526087760925,
-0.29436272382736206,
0.20231281220912933,
-0.06168857961893082,
-0.22731246054172516,
0.14820228517055511,
0.07407945394515991,
0.06473534554243088,
0.10802741348743439,
0.09730970859527588,
0.06773887574672699,
-0.35412490367889404,
-0.2589379847049713,
-0.022807497531175613,
0.35236650705337524,
-0.2924908399581909,
0.0221682321280241,
-0.05603710561990738,
0.02279236912727356,
-0.048533957451581955,
-0.258575975894928,
-0.42040854692459106,
-0.5527648329734802,
-0.1568320095539093,
0.3787707984447479,
-0.1449788361787796,
0.16865308582782745,
-0.026686053723096848,
0.12767484784126282,
0.0957622230052948,
-0.0700848400592804,
-0.2518651485443115,
-0.022423233836889267,
-0.00894710049033165,
-0.017346348613500595,
0.15085577964782715,
0.045328911393880844,
0.17847859859466553,
-0.11982722580432892,
0.1928766965866089,
-0.36001500487327576,
-0.17661160230636597,
0.2204689085483551,
0.04090357571840286,
0.24467043578624725,
0.10323859751224518,
0.12952102720737457,
-0.01763794757425785,
-0.23316946625709534,
0.4011700749397278,
-0.22820407152175903,
-0.1629108190536499,
0.1619844138622284,
-0.14418259263038635,
-0.11417228728532791,
-0.04755531623959541,
0.11043344438076019,
-0.08512290567159653,
-0.3551173508167267,
0.034892737865448,
0.05294310674071312,
0.13470640778541565,
0.31956493854522705,
0.03698619082570076,
-0.039854150265455246,
0.03547437861561775,
-0.5122407078742981,
-0.19479934871196747,
-0.5348491072654724,
0.17512068152427673,
-0.22167520225048065,
-0.31902840733528137,
0.1282528191804886,
0.174631729722023,
0.19142480194568634,
0.05601397529244423,
-0.42062222957611084,
-0.5666985511779785,
-0.10032476484775543,
0.32985568046569824,
-0.01330607384443283,
-0.013412995263934135,
0.1361759752035141,
-0.16022339463233948,
-0.05705311894416809,
0.0016653016209602356,
-0.26436033844947815,
0.14112588763237,
0.3630034029483795,
-0.0819731131196022,
-0.02646186575293541,
0.2914968729019165,
0.20407111942768097,
0.49168187379837036,
0.5204327702522278,
-0.061233680695295334,
0.57237708568573,
0.06827520579099655,
0.3220004141330719,
-0.02555917203426361,
-0.3961157202720642,
0.20634087920188904,
0.04950963705778122,
-0.022117748856544495,
0.1563461422920227,
0.1792820692062378,
0.13897201418876648,
-0.12429608404636383,
-0.5176193714141846,
-0.04582678899168968,
-0.3324447274208069,
-0.2069704830646515,
-0.17587915062904358,
0.0266694538295269,
0.10901136696338654,
0.0405086949467659,
-0.28662022948265076,
-0.31795576214790344,
0.30250993371009827,
0.24939997494220734,
0.0679652988910675,
0.043159130960702896,
-0.03957583010196686,
-0.27075350284576416,
-0.5115251541137695,
0.21435904502868652,
-0.012235384434461594,
0.4149131774902344,
-0.12115485966205597,
0.19247522950172424,
0.1195613294839859,
-0.09227249026298523,
0.5079758167266846,
-0.37991732358932495,
0.2252196967601776,
-0.1798335611820221,
-0.03098766878247261,
-0.5463100075721741,
-0.03624100238084793,
0.08562995493412018,
0.501315176486969,
-0.14692336320877075,
0.9110408425331116,
-0.09311933070421219,
-0.16587038338184357,
0.053617894649505615,
-0.16091659665107727,
-0.2407877892255783,
-0.0711146891117096,
-0.11837510764598846,
-0.5230721235275269,
-0.38351285457611084,
0.2763429582118988,
0.04540205001831055,
0.16774658858776093,
-0.07916844636201859,
-0.32066166400909424,
0.33370259404182434,
0.018569648265838623,
-0.05873841047286987,
0.02132834494113922,
0.10905122756958008,
0.11355622857809067,
0.1964418590068817,
0.04074668884277344,
0.27177688479423523,
0.21801099181175232,
0.5741133689880371,
0.22131922841072083,
-0.12391875684261322,
0.11829205602407455,
-0.0495135672390461,
-0.05229472368955612,
0.5056180953979492,
0.07103282958269119,
0.38560208678245544,
0.031001998111605644,
0.3800027370452881,
-0.3988898992538452,
-0.1267448514699936,
0.08781489729881287,
0.00045351218432188034,
-0.261210173368454,
0.26025205850601196,
0.3527911603450775,
-0.21779102087020874,
0.0879196971654892,
0.28496021032333374,
0.7280203700065613,
-0.16305433213710785,
0.2829883098602295,
0.10638036578893661,
0.9391905069351196,
0.07752856612205505,
0.044450543820858,
0.14301636815071106,
-0.12810176610946655,
0.3566967844963074,
-0.0005587227642536163,
-0.10299057513475418,
-0.3929463028907776,
-0.29885151982307434,
-0.07147850096225739,
-0.04751898720860481,
0.04332732409238815,
-0.1459856927394867,
-0.21154126524925232,
0.27063581347465515,
-0.37519294023513794,
0.5537729263305664,
-0.07562153041362762,
0.20948836207389832,
-0.6293010711669922,
-0.27667373418807983,
-0.0937577337026596,
0.23987969756126404,
-0.016847319900989532,
0.39119499921798706,
-0.036095909774303436,
0.05431108549237251,
-0.29651692509651184,
-0.21502959728240967,
-0.3742606043815613,
0.2466840147972107,
-0.09603295475244522,
-0.025832869112491608,
-0.2480112612247467,
-0.19192630052566528,
0.14519788324832916,
-0.21085679531097412,
0.7318270206451416,
0.020985281094908714,
-0.36879146099090576,
0.22500132024288177,
-0.1588820219039917,
0.03536192327737808,
-0.009084021672606468,
-0.047977346926927567,
0.19248132407665253,
-0.21364367008209229,
-0.23560895025730133,
-0.09294790774583817,
0.08155839145183563,
-0.18996617197990417,
-0.006729811429977417,
-0.0018753185868263245,
-0.1397121548652649,
-0.2794123589992523,
0.08896440267562866,
-0.20725411176681519,
-0.0004353523254394531,
-0.2819472849369049,
0.09555321931838989,
0.028168074786663055,
-0.004814677871763706,
0.031002748757600784,
0.3804585337638855,
-0.04704856127500534,
0.05674535408616066,
0.2904489040374756,
-0.1134110614657402,
-0.21368058025836945,
0.22312715649604797,
-0.10593067109584808,
-0.1752002090215683,
-0.1286514401435852,
0.1514117419719696,
0.14636240899562836,
-0.5739508867263794,
0.09901831299066544,
-0.32498446106910706,
0.12307165563106537,
-0.09482377767562866,
0.2025947868824005,
0.18945768475532532,
0.06519041955471039,
-0.16065847873687744,
-0.291398823261261,
-0.060500867664813995,
0.11269180476665497,
-0.07131044566631317,
0.03841206431388855,
-0.25348007678985596,
0.14255893230438232,
0.22750094532966614,
0.10177113860845566,
-0.2905823886394501,
0.2545713782310486,
-0.30795344710350037,
0.1706876903772354,
-0.14930284023284912,
-0.19520220160484314,
0.074781134724617,
-0.3985733091831207,
0.016171591356396675,
0.08835303038358688,
-0.20564004778862,
-0.12250567972660065,
-0.3449847996234894,
0.1325472593307495,
0.25038787722587585,
-0.2817569375038147,
-0.05891396477818489,
-0.05329276621341705,
-0.1650284081697464,
-0.1748410165309906,
0.14156723022460938,
0.28136783838272095,
-0.014764688909053802,
-0.2823024392127991,
0.6297059655189514,
0.06191541254520416,
-0.22390790283679962,
0.33101290464401245,
0.2807333469390869,
0.32907992601394653,
-0.06086454167962074,
0.08708524703979492,
-0.1602003425359726,
-0.03554824739694595,
0.032088279724121094,
0.3849111497402191,
0.21569138765335083,
0.16584384441375732,
0.2352815568447113,
-0.38090288639068604,
-0.03781396523118019,
0.09081593155860901,
0.49953433871269226,
0.15592429041862488,
-0.12869344651699066,
-0.04760212451219559,
0.23228925466537476,
0.20774303376674652,
0.053151898086071014,
-0.21357189118862152,
0.40425801277160645,
-0.18955913186073303,
-0.05578462779521942,
0.09680158644914627,
0.2754513919353485,
-0.0435028113424778,
0.002964109182357788,
0.037391677498817444,
0.7099265456199646,
-0.2419423609972,
0.0954573005437851,
-0.09305897355079651,
-0.14685072004795074,
0.17486490309238434,
0.30584627389907837,
-0.23302608728408813,
0.16824869811534882,
0.3118177056312561,
-0.14613166451454163,
0.4299321174621582,
0.19541779160499573,
-0.08704318106174469,
0.23248368501663208,
-0.35955381393432617,
-0.09544788300991058,
-0.1989370882511139,
-0.002720281481742859,
-0.00922616571187973,
0.12674711644649506,
0.47727036476135254,
-0.465756893157959,
-0.21503886580467224,
-0.45466896891593933,
0.040701378136873245,
-0.2161770462989807,
0.13121509552001953,
-0.2125512957572937,
-0.18880638480186462,
-0.30158567428588867,
0.08981338143348694,
-0.08013822138309479,
-0.11698134243488312,
0.287666916847229,
0.0020931512117385864,
-0.10165971517562866,
-0.10011332482099533,
-0.20650717616081238,
0.29309120774269104,
0.3402179777622223,
-0.09276475012302399,
0.3116559386253357,
0.12048003822565079,
-0.17845246195793152,
-0.15781329572200775,
0.17351901531219482,
0.4971037805080414,
0.014913368970155716,
0.17379385232925415,
0.15193398296833038,
0.2730976343154907,
0.09576686471700668,
0.20003531873226166,
0.04830671101808548,
-0.05357933044433594,
-0.007054097950458527,
0.185370534658432,
0.18281443417072296,
-0.1052488461136818,
-0.2578917145729065,
-0.09014801681041718,
0.2225399613380432,
-0.041861582547426224,
0.4347406327724457,
-0.29599398374557495,
-0.11481770873069763,
-0.14053158462047577,
0.04620181769132614,
-0.05475785583257675,
0.14011012017726898,
0.2803212106227875,
-0.29417669773101807,
0.10490414500236511,
-0.3127495348453522,
0.06728173792362213,
-0.1630469113588333,
0.45144253969192505,
0.4018469750881195,
-0.025083929300308228,
-0.15625855326652527,
-0.25026604533195496,
-0.46803179383277893,
0.2989248037338257,
-0.08546997606754303,
0.2549031972885132,
0.19264593720436096,
0.02309987135231495,
-0.15219846367835999,
-0.005364585667848587,
0.1264822632074356,
0.194387286901474,
-0.04748081788420677,
-0.07642631232738495,
-0.14579305052757263,
0.05441133677959442,
-0.05330029875040054,
-0.19948358833789825,
-0.04260663688182831,
-0.38136786222457886,
0.31817612051963806,
0.14566761255264282,
0.0027623288333415985,
0.004473833367228508,
0.003935307264328003,
0.08952200412750244,
-0.7489908933639526,
0.268818199634552,
0.05746578425168991,
0.20009541511535645,
0.017760809510946274,
-0.12129803001880646,
-0.3282863199710846,
-0.36972683668136597,
-0.33279117941856384,
-0.15738505125045776,
-0.21780365705490112,
0.35849159955978394,
0.20647850632667542,
-0.38083845376968384,
-0.17578452825546265,
0.33236223459243774,
-0.0041069649159908295,
0.11382325738668442,
0.08565733581781387,
0.22540903091430664,
-0.24323445558547974,
0.09111812710762024,
0.23015807569026947,
0.09487316757440567,
0.0823817104101181,
0.2624225318431854,
-0.1630104035139084,
-0.40340232849121094,
0.5397718548774719,
-0.13022194802761078,
-0.07287432998418808,
-0.012516417540609837,
0.4478780925273895,
0.07288961857557297,
-0.2703731954097748,
-0.09005336463451385,
-0.07968038320541382,
0.1251380890607834,
0.01161792129278183,
-0.16214130818843842,
0.29616743326187134,
-0.12186641991138458,
-0.10737927258014679,
-0.027660472318530083,
0.26975739002227783,
0.1571751832962036,
-0.34294670820236206,
0.44575002789497375,
0.0970863401889801
] |
https://github.com/huggingface/datasets/issues/5390 | Error when pushing to the CI hub | Maybe the current version of moonlanding in Hub CI is the issue.
I relaunched tests that were working two days ago: now they are failing. https://github.com/huggingface/datasets-server/commit/746414449cae4b311733f8a76e5b3b4ca73b38a9 for example
cc @huggingface/moon-landing | ### Describe the bug
Note that it's a special case where the Hub URL is "https://hub-ci.huggingface.co", which does not appear if we do the same on the Hub (https://huggingface.co).
The call to `dataset.push_to_hub(` fails:
```
Pushing dataset shards to the dataset hub: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.93s/it]
Traceback (most recent call last):
File "reproduce_hubci.py", line 16, in <module>
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
File "/home/slesage/hf/datasets/src/datasets/arrow_dataset.py", line 5025, in push_to_hub
HfApi(endpoint=config.HF_ENDPOINT).upload_file(
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1346, in upload_file
raise err
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1337, in upload_file
r.raise_for_status()
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/requests/models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://hub-ci.huggingface.co/api/datasets/__DUMMY_DATASETS_SERVER_USER__/bug-16718047265472/upload/main/README.md
```
### Steps to reproduce the bug
```python
# reproduce.py
from datasets import Dataset
import time
USER = "__DUMMY_DATASETS_SERVER_USER__"
USER_TOKEN = "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"
dataset = Dataset.from_dict({"a": [1, 2, 3]})
repo_id = f"{USER}/bug-{int(time.time() * 10e3)}"
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
```
```bash
$ HF_ENDPOINT="https://hub-ci.huggingface.co" python reproduce.py
```
### Expected behavior
No error and the dataset should be uploaded to the Hub with the README file (which generates the error).
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.0-1026-aws-x86_64-with-glibc2.35
- Python version: 3.9.15
- PyArrow version: 7.0.0
- Pandas version: 1.5.2
| 30 | Error when pushing to the CI hub
### Describe the bug
Note that it's a special case where the Hub URL is "https://hub-ci.huggingface.co", which does not appear if we do the same on the Hub (https://huggingface.co).
The call to `dataset.push_to_hub(` fails:
```
Pushing dataset shards to the dataset hub: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.93s/it]
Traceback (most recent call last):
File "reproduce_hubci.py", line 16, in <module>
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
File "/home/slesage/hf/datasets/src/datasets/arrow_dataset.py", line 5025, in push_to_hub
HfApi(endpoint=config.HF_ENDPOINT).upload_file(
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1346, in upload_file
raise err
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1337, in upload_file
r.raise_for_status()
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/requests/models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://hub-ci.huggingface.co/api/datasets/__DUMMY_DATASETS_SERVER_USER__/bug-16718047265472/upload/main/README.md
```
### Steps to reproduce the bug
```python
# reproduce.py
from datasets import Dataset
import time
USER = "__DUMMY_DATASETS_SERVER_USER__"
USER_TOKEN = "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"
dataset = Dataset.from_dict({"a": [1, 2, 3]})
repo_id = f"{USER}/bug-{int(time.time() * 10e3)}"
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
```
```bash
$ HF_ENDPOINT="https://hub-ci.huggingface.co" python reproduce.py
```
### Expected behavior
No error and the dataset should be uploaded to the Hub with the README file (which generates the error).
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.0-1026-aws-x86_64-with-glibc2.35
- Python version: 3.9.15
- PyArrow version: 7.0.0
- Pandas version: 1.5.2
Maybe the current version of moonlanding in Hub CI is the issue.
I relaunched tests that were working two days ago: now they are failing. https://github.com/huggingface/datasets-server/commit/746414449cae4b311733f8a76e5b3b4ca73b38a9 for example
cc @huggingface/moon-landing | [
-0.25651171803474426,
-0.39295852184295654,
0.041849467903375626,
0.058050427585840225,
0.010085087269544601,
-0.0018385425209999084,
0.19325734674930573,
0.24485576152801514,
0.010120231658220291,
0.03842552751302719,
-0.10119698196649551,
0.05556296929717064,
0.09907793253660202,
0.48055845499038696,
0.035029761493206024,
0.04912268742918968,
0.16502779722213745,
-0.09196779131889343,
0.14359650015830994,
-0.09019273519515991,
-0.2067345231771469,
0.058143287897109985,
-0.1382063776254654,
0.21928752958774567,
-0.4184926748275757,
-0.18317608535289764,
-0.044367652386426926,
0.37922579050064087,
-0.04584374278783798,
-0.20377260446548462,
0.427946001291275,
0.03951845318078995,
-0.038654226809740067,
0.7026517391204834,
-0.00011475833161966875,
0.028223633766174316,
0.5114488005638123,
0.07572194933891296,
-0.4094427525997162,
-0.36653536558151245,
-0.13832241296768188,
-0.08801419287919998,
-0.1861429512500763,
0.04728657752275467,
-0.035959333181381226,
0.4323616325855255,
-0.0745014175772667,
0.13093775510787964,
0.11692382395267487,
0.2248910367488861,
0.20099622011184692,
0.4762099087238312,
0.10917598009109497,
-0.29725217819213867,
0.19787997007369995,
0.23391008377075195,
-0.23252572119235992,
0.1139989048242569,
0.009575992822647095,
0.2066812962293625,
-0.03537077456712723,
0.11953839659690857,
0.12677979469299316,
-0.06055257096886635,
0.17653688788414001,
-0.12940001487731934,
-0.3712176978588104,
-0.23886382579803467,
0.08107930421829224,
-0.04450911283493042,
0.04164092615246773,
-0.37361690402030945,
-0.46186161041259766,
-0.04457023739814758,
-0.22903017699718475,
-0.20572887361049652,
0.31704506278038025,
0.1727198362350464,
-0.27072378993034363,
-0.004586208611726761,
-0.21755196154117584,
-0.3049395978450775,
-0.10119526088237762,
-0.007162339985370636,
-0.025983698666095734,
0.170299232006073,
-0.027705997228622437,
0.09540732204914093,
0.13283152878284454,
-0.1612749546766281,
0.10973665863275528,
-0.15672874450683594,
-0.05303525552153587,
-0.06377323716878891,
-0.4544473886489868,
-0.1711757779121399,
0.0023665204644203186,
0.5406168103218079,
0.1900545358657837,
0.18896013498306274,
-0.09526771306991577,
0.027161331847310066,
-0.15719836950302124,
0.16316041350364685,
0.27665603160858154,
0.09843797981739044,
0.06781807541847229,
0.2759481966495514,
0.29747119545936584,
0.46764716506004333,
0.19636309146881104,
-0.032257869839668274,
0.14955973625183105,
-0.2805691659450531,
-0.034406401216983795,
0.04429112747311592,
0.39027702808380127,
-0.28729870915412903,
-0.3934999108314514,
0.12857751548290253,
0.17036879062652588,
0.32471969723701477,
0.06050386279821396,
0.26418057084083557,
0.016492396593093872,
0.0636734813451767,
-0.17715579271316528,
0.1734902560710907,
-0.2325388789176941,
0.1340777724981308,
-0.2656345069408417,
0.108073890209198,
0.06621533632278442,
0.22514840960502625,
0.15353389084339142,
-0.6025370955467224,
0.1824645847082138,
0.13752387464046478,
0.4324747323989868,
-0.13991107046604156,
-0.14347341656684875,
0.02133982628583908,
0.001271165907382965,
0.33995547890663147,
0.15845051407814026,
0.3048465847969055,
0.25865834951400757,
-0.2796022891998291,
-0.11548089981079102,
-0.07322051376104355,
-0.6257144212722778,
-0.3451710343360901,
-0.17675535380840302,
0.20192407071590424,
-0.1721494495868683,
-0.017141733318567276,
-0.4728828966617584,
-0.2738557755947113,
-0.09936598688364029,
0.0690428763628006,
0.022086679935455322,
0.003934288397431374,
-0.05963870882987976,
-0.05410352721810341,
0.17716099321842194,
0.43347203731536865,
0.05753595754504204,
0.026068389415740967,
0.1649036705493927,
0.16130095720291138,
-0.1185404434800148,
0.2271244376897812,
-0.19044072926044464,
-0.16129690408706665,
-0.2533898949623108,
0.14992162585258484,
0.06785841286182404,
-0.7800475358963013,
-0.4181014597415924,
0.16559921205043793,
-0.26154181361198425,
-0.20232795178890228,
-0.2819124460220337,
-0.027463994920253754,
0.15144863724708557,
0.03421429917216301,
0.10931342840194702,
0.13970093429088593,
-0.12303267419338226,
0.10636565834283829,
-0.34877172112464905,
-0.3137730360031128,
-0.3785816431045532,
0.1802659034729004,
0.07356563210487366,
0.09026686102151871,
0.29346582293510437,
0.057194918394088745,
0.23464825749397278,
0.09160764515399933,
0.23839987814426422,
0.16329416632652283,
0.5480523109436035,
-0.22485233843326569,
0.1823684424161911,
0.0321374237537384,
-0.4058718979358673,
0.1957787275314331,
-0.022012818604707718,
0.20875662565231323,
-0.11259663105010986,
-0.14972279965877533,
-0.529375433921814,
0.1652916520833969,
-0.338249534368515,
0.05219034105539322,
0.06306084245443344,
-0.3550640940666199,
-0.05264808237552643,
0.09555414319038391,
-0.06568410992622375,
0.3459787964820862,
-0.17236723005771637,
0.35549619793891907,
-0.36129340529441833,
0.5986379981040955,
-0.18735986948013306,
-0.147737517952919,
0.10398441553115845,
0.01628691330552101,
0.37822896242141724,
-0.1863466054201126,
-0.2745091915130615,
0.32993656396865845,
0.0754803940653801,
0.3770179748535156,
0.3468438684940338,
0.03393298387527466,
0.3839966356754303,
-0.23572030663490295,
0.05944950878620148,
0.14176666736602783,
0.044678471982479095,
0.07446592301130295,
-0.16786620020866394,
0.3398274779319763,
-0.2653239965438843,
0.27257832884788513,
-0.06034853309392929,
0.30170562863349915,
0.1109015941619873,
0.028902996331453323,
-0.007008334156125784,
-0.07688111066818237,
0.2071724683046341,
-0.04820582643151283,
0.04326488450169563,
-0.2682729959487915,
0.36521634459495544,
0.10629520565271378,
0.28308406472206116,
0.17015080153942108,
-0.09987478703260422,
0.25989922881126404,
-0.12770456075668335,
-0.04067806154489517,
0.4095664620399475,
0.3595592975616455,
0.03918333351612091,
-0.08957526087760925,
-0.29436272382736206,
0.20231281220912933,
-0.06168857961893082,
-0.22731246054172516,
0.14820228517055511,
0.07407945394515991,
0.06473534554243088,
0.10802741348743439,
0.09730970859527588,
0.06773887574672699,
-0.35412490367889404,
-0.2589379847049713,
-0.022807497531175613,
0.35236650705337524,
-0.2924908399581909,
0.0221682321280241,
-0.05603710561990738,
0.02279236912727356,
-0.048533957451581955,
-0.258575975894928,
-0.42040854692459106,
-0.5527648329734802,
-0.1568320095539093,
0.3787707984447479,
-0.1449788361787796,
0.16865308582782745,
-0.026686053723096848,
0.12767484784126282,
0.0957622230052948,
-0.0700848400592804,
-0.2518651485443115,
-0.022423233836889267,
-0.00894710049033165,
-0.017346348613500595,
0.15085577964782715,
0.045328911393880844,
0.17847859859466553,
-0.11982722580432892,
0.1928766965866089,
-0.36001500487327576,
-0.17661160230636597,
0.2204689085483551,
0.04090357571840286,
0.24467043578624725,
0.10323859751224518,
0.12952102720737457,
-0.01763794757425785,
-0.23316946625709534,
0.4011700749397278,
-0.22820407152175903,
-0.1629108190536499,
0.1619844138622284,
-0.14418259263038635,
-0.11417228728532791,
-0.04755531623959541,
0.11043344438076019,
-0.08512290567159653,
-0.3551173508167267,
0.034892737865448,
0.05294310674071312,
0.13470640778541565,
0.31956493854522705,
0.03698619082570076,
-0.039854150265455246,
0.03547437861561775,
-0.5122407078742981,
-0.19479934871196747,
-0.5348491072654724,
0.17512068152427673,
-0.22167520225048065,
-0.31902840733528137,
0.1282528191804886,
0.174631729722023,
0.19142480194568634,
0.05601397529244423,
-0.42062222957611084,
-0.5666985511779785,
-0.10032476484775543,
0.32985568046569824,
-0.01330607384443283,
-0.013412995263934135,
0.1361759752035141,
-0.16022339463233948,
-0.05705311894416809,
0.0016653016209602356,
-0.26436033844947815,
0.14112588763237,
0.3630034029483795,
-0.0819731131196022,
-0.02646186575293541,
0.2914968729019165,
0.20407111942768097,
0.49168187379837036,
0.5204327702522278,
-0.061233680695295334,
0.57237708568573,
0.06827520579099655,
0.3220004141330719,
-0.02555917203426361,
-0.3961157202720642,
0.20634087920188904,
0.04950963705778122,
-0.022117748856544495,
0.1563461422920227,
0.1792820692062378,
0.13897201418876648,
-0.12429608404636383,
-0.5176193714141846,
-0.04582678899168968,
-0.3324447274208069,
-0.2069704830646515,
-0.17587915062904358,
0.0266694538295269,
0.10901136696338654,
0.0405086949467659,
-0.28662022948265076,
-0.31795576214790344,
0.30250993371009827,
0.24939997494220734,
0.0679652988910675,
0.043159130960702896,
-0.03957583010196686,
-0.27075350284576416,
-0.5115251541137695,
0.21435904502868652,
-0.012235384434461594,
0.4149131774902344,
-0.12115485966205597,
0.19247522950172424,
0.1195613294839859,
-0.09227249026298523,
0.5079758167266846,
-0.37991732358932495,
0.2252196967601776,
-0.1798335611820221,
-0.03098766878247261,
-0.5463100075721741,
-0.03624100238084793,
0.08562995493412018,
0.501315176486969,
-0.14692336320877075,
0.9110408425331116,
-0.09311933070421219,
-0.16587038338184357,
0.053617894649505615,
-0.16091659665107727,
-0.2407877892255783,
-0.0711146891117096,
-0.11837510764598846,
-0.5230721235275269,
-0.38351285457611084,
0.2763429582118988,
0.04540205001831055,
0.16774658858776093,
-0.07916844636201859,
-0.32066166400909424,
0.33370259404182434,
0.018569648265838623,
-0.05873841047286987,
0.02132834494113922,
0.10905122756958008,
0.11355622857809067,
0.1964418590068817,
0.04074668884277344,
0.27177688479423523,
0.21801099181175232,
0.5741133689880371,
0.22131922841072083,
-0.12391875684261322,
0.11829205602407455,
-0.0495135672390461,
-0.05229472368955612,
0.5056180953979492,
0.07103282958269119,
0.38560208678245544,
0.031001998111605644,
0.3800027370452881,
-0.3988898992538452,
-0.1267448514699936,
0.08781489729881287,
0.00045351218432188034,
-0.261210173368454,
0.26025205850601196,
0.3527911603450775,
-0.21779102087020874,
0.0879196971654892,
0.28496021032333374,
0.7280203700065613,
-0.16305433213710785,
0.2829883098602295,
0.10638036578893661,
0.9391905069351196,
0.07752856612205505,
0.044450543820858,
0.14301636815071106,
-0.12810176610946655,
0.3566967844963074,
-0.0005587227642536163,
-0.10299057513475418,
-0.3929463028907776,
-0.29885151982307434,
-0.07147850096225739,
-0.04751898720860481,
0.04332732409238815,
-0.1459856927394867,
-0.21154126524925232,
0.27063581347465515,
-0.37519294023513794,
0.5537729263305664,
-0.07562153041362762,
0.20948836207389832,
-0.6293010711669922,
-0.27667373418807983,
-0.0937577337026596,
0.23987969756126404,
-0.016847319900989532,
0.39119499921798706,
-0.036095909774303436,
0.05431108549237251,
-0.29651692509651184,
-0.21502959728240967,
-0.3742606043815613,
0.2466840147972107,
-0.09603295475244522,
-0.025832869112491608,
-0.2480112612247467,
-0.19192630052566528,
0.14519788324832916,
-0.21085679531097412,
0.7318270206451416,
0.020985281094908714,
-0.36879146099090576,
0.22500132024288177,
-0.1588820219039917,
0.03536192327737808,
-0.009084021672606468,
-0.047977346926927567,
0.19248132407665253,
-0.21364367008209229,
-0.23560895025730133,
-0.09294790774583817,
0.08155839145183563,
-0.18996617197990417,
-0.006729811429977417,
-0.0018753185868263245,
-0.1397121548652649,
-0.2794123589992523,
0.08896440267562866,
-0.20725411176681519,
-0.0004353523254394531,
-0.2819472849369049,
0.09555321931838989,
0.028168074786663055,
-0.004814677871763706,
0.031002748757600784,
0.3804585337638855,
-0.04704856127500534,
0.05674535408616066,
0.2904489040374756,
-0.1134110614657402,
-0.21368058025836945,
0.22312715649604797,
-0.10593067109584808,
-0.1752002090215683,
-0.1286514401435852,
0.1514117419719696,
0.14636240899562836,
-0.5739508867263794,
0.09901831299066544,
-0.32498446106910706,
0.12307165563106537,
-0.09482377767562866,
0.2025947868824005,
0.18945768475532532,
0.06519041955471039,
-0.16065847873687744,
-0.291398823261261,
-0.060500867664813995,
0.11269180476665497,
-0.07131044566631317,
0.03841206431388855,
-0.25348007678985596,
0.14255893230438232,
0.22750094532966614,
0.10177113860845566,
-0.2905823886394501,
0.2545713782310486,
-0.30795344710350037,
0.1706876903772354,
-0.14930284023284912,
-0.19520220160484314,
0.074781134724617,
-0.3985733091831207,
0.016171591356396675,
0.08835303038358688,
-0.20564004778862,
-0.12250567972660065,
-0.3449847996234894,
0.1325472593307495,
0.25038787722587585,
-0.2817569375038147,
-0.05891396477818489,
-0.05329276621341705,
-0.1650284081697464,
-0.1748410165309906,
0.14156723022460938,
0.28136783838272095,
-0.014764688909053802,
-0.2823024392127991,
0.6297059655189514,
0.06191541254520416,
-0.22390790283679962,
0.33101290464401245,
0.2807333469390869,
0.32907992601394653,
-0.06086454167962074,
0.08708524703979492,
-0.1602003425359726,
-0.03554824739694595,
0.032088279724121094,
0.3849111497402191,
0.21569138765335083,
0.16584384441375732,
0.2352815568447113,
-0.38090288639068604,
-0.03781396523118019,
0.09081593155860901,
0.49953433871269226,
0.15592429041862488,
-0.12869344651699066,
-0.04760212451219559,
0.23228925466537476,
0.20774303376674652,
0.053151898086071014,
-0.21357189118862152,
0.40425801277160645,
-0.18955913186073303,
-0.05578462779521942,
0.09680158644914627,
0.2754513919353485,
-0.0435028113424778,
0.002964109182357788,
0.037391677498817444,
0.7099265456199646,
-0.2419423609972,
0.0954573005437851,
-0.09305897355079651,
-0.14685072004795074,
0.17486490309238434,
0.30584627389907837,
-0.23302608728408813,
0.16824869811534882,
0.3118177056312561,
-0.14613166451454163,
0.4299321174621582,
0.19541779160499573,
-0.08704318106174469,
0.23248368501663208,
-0.35955381393432617,
-0.09544788300991058,
-0.1989370882511139,
-0.002720281481742859,
-0.00922616571187973,
0.12674711644649506,
0.47727036476135254,
-0.465756893157959,
-0.21503886580467224,
-0.45466896891593933,
0.040701378136873245,
-0.2161770462989807,
0.13121509552001953,
-0.2125512957572937,
-0.18880638480186462,
-0.30158567428588867,
0.08981338143348694,
-0.08013822138309479,
-0.11698134243488312,
0.287666916847229,
0.0020931512117385864,
-0.10165971517562866,
-0.10011332482099533,
-0.20650717616081238,
0.29309120774269104,
0.3402179777622223,
-0.09276475012302399,
0.3116559386253357,
0.12048003822565079,
-0.17845246195793152,
-0.15781329572200775,
0.17351901531219482,
0.4971037805080414,
0.014913368970155716,
0.17379385232925415,
0.15193398296833038,
0.2730976343154907,
0.09576686471700668,
0.20003531873226166,
0.04830671101808548,
-0.05357933044433594,
-0.007054097950458527,
0.185370534658432,
0.18281443417072296,
-0.1052488461136818,
-0.2578917145729065,
-0.09014801681041718,
0.2225399613380432,
-0.041861582547426224,
0.4347406327724457,
-0.29599398374557495,
-0.11481770873069763,
-0.14053158462047577,
0.04620181769132614,
-0.05475785583257675,
0.14011012017726898,
0.2803212106227875,
-0.29417669773101807,
0.10490414500236511,
-0.3127495348453522,
0.06728173792362213,
-0.1630469113588333,
0.45144253969192505,
0.4018469750881195,
-0.025083929300308228,
-0.15625855326652527,
-0.25026604533195496,
-0.46803179383277893,
0.2989248037338257,
-0.08546997606754303,
0.2549031972885132,
0.19264593720436096,
0.02309987135231495,
-0.15219846367835999,
-0.005364585667848587,
0.1264822632074356,
0.194387286901474,
-0.04748081788420677,
-0.07642631232738495,
-0.14579305052757263,
0.05441133677959442,
-0.05330029875040054,
-0.19948358833789825,
-0.04260663688182831,
-0.38136786222457886,
0.31817612051963806,
0.14566761255264282,
0.0027623288333415985,
0.004473833367228508,
0.003935307264328003,
0.08952200412750244,
-0.7489908933639526,
0.268818199634552,
0.05746578425168991,
0.20009541511535645,
0.017760809510946274,
-0.12129803001880646,
-0.3282863199710846,
-0.36972683668136597,
-0.33279117941856384,
-0.15738505125045776,
-0.21780365705490112,
0.35849159955978394,
0.20647850632667542,
-0.38083845376968384,
-0.17578452825546265,
0.33236223459243774,
-0.0041069649159908295,
0.11382325738668442,
0.08565733581781387,
0.22540903091430664,
-0.24323445558547974,
0.09111812710762024,
0.23015807569026947,
0.09487316757440567,
0.0823817104101181,
0.2624225318431854,
-0.1630104035139084,
-0.40340232849121094,
0.5397718548774719,
-0.13022194802761078,
-0.07287432998418808,
-0.012516417540609837,
0.4478780925273895,
0.07288961857557297,
-0.2703731954097748,
-0.09005336463451385,
-0.07968038320541382,
0.1251380890607834,
0.01161792129278183,
-0.16214130818843842,
0.29616743326187134,
-0.12186641991138458,
-0.10737927258014679,
-0.027660472318530083,
0.26975739002227783,
0.1571751832962036,
-0.34294670820236206,
0.44575002789497375,
0.0970863401889801
] |
https://github.com/huggingface/datasets/issues/5390 | Error when pushing to the CI hub | Hi! I don't think this has anything to do with `datasets`. Hub CI seems to be the culprit - the identical failure can be found in [this](https://github.com/huggingface/datasets/pull/5389) PR (with unrelated changes) opened today. | ### Describe the bug
Note that it's a special case where the Hub URL is "https://hub-ci.huggingface.co", which does not appear if we do the same on the Hub (https://huggingface.co).
The call to `dataset.push_to_hub(` fails:
```
Pushing dataset shards to the dataset hub: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.93s/it]
Traceback (most recent call last):
File "reproduce_hubci.py", line 16, in <module>
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
File "/home/slesage/hf/datasets/src/datasets/arrow_dataset.py", line 5025, in push_to_hub
HfApi(endpoint=config.HF_ENDPOINT).upload_file(
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1346, in upload_file
raise err
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1337, in upload_file
r.raise_for_status()
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/requests/models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://hub-ci.huggingface.co/api/datasets/__DUMMY_DATASETS_SERVER_USER__/bug-16718047265472/upload/main/README.md
```
### Steps to reproduce the bug
```python
# reproduce.py
from datasets import Dataset
import time
USER = "__DUMMY_DATASETS_SERVER_USER__"
USER_TOKEN = "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"
dataset = Dataset.from_dict({"a": [1, 2, 3]})
repo_id = f"{USER}/bug-{int(time.time() * 10e3)}"
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
```
```bash
$ HF_ENDPOINT="https://hub-ci.huggingface.co" python reproduce.py
```
### Expected behavior
No error and the dataset should be uploaded to the Hub with the README file (which generates the error).
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.0-1026-aws-x86_64-with-glibc2.35
- Python version: 3.9.15
- PyArrow version: 7.0.0
- Pandas version: 1.5.2
| 33 | Error when pushing to the CI hub
### Describe the bug
Note that it's a special case where the Hub URL is "https://hub-ci.huggingface.co", which does not appear if we do the same on the Hub (https://huggingface.co).
The call to `dataset.push_to_hub(` fails:
```
Pushing dataset shards to the dataset hub: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.93s/it]
Traceback (most recent call last):
File "reproduce_hubci.py", line 16, in <module>
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
File "/home/slesage/hf/datasets/src/datasets/arrow_dataset.py", line 5025, in push_to_hub
HfApi(endpoint=config.HF_ENDPOINT).upload_file(
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1346, in upload_file
raise err
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1337, in upload_file
r.raise_for_status()
File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/requests/models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://hub-ci.huggingface.co/api/datasets/__DUMMY_DATASETS_SERVER_USER__/bug-16718047265472/upload/main/README.md
```
### Steps to reproduce the bug
```python
# reproduce.py
from datasets import Dataset
import time
USER = "__DUMMY_DATASETS_SERVER_USER__"
USER_TOKEN = "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"
dataset = Dataset.from_dict({"a": [1, 2, 3]})
repo_id = f"{USER}/bug-{int(time.time() * 10e3)}"
dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True)
```
```bash
$ HF_ENDPOINT="https://hub-ci.huggingface.co" python reproduce.py
```
### Expected behavior
No error and the dataset should be uploaded to the Hub with the README file (which generates the error).
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.0-1026-aws-x86_64-with-glibc2.35
- Python version: 3.9.15
- PyArrow version: 7.0.0
- Pandas version: 1.5.2
Hi! I don't think this has anything to do with `datasets`. Hub CI seems to be the culprit - the identical failure can be found in [this](https://github.com/huggingface/datasets/pull/5389) PR (with unrelated changes) opened today. | [
-0.25651171803474426,
-0.39295852184295654,
0.041849467903375626,
0.058050427585840225,
0.010085087269544601,
-0.0018385425209999084,
0.19325734674930573,
0.24485576152801514,
0.010120231658220291,
0.03842552751302719,
-0.10119698196649551,
0.05556296929717064,
0.09907793253660202,
0.48055845499038696,
0.035029761493206024,
0.04912268742918968,
0.16502779722213745,
-0.09196779131889343,
0.14359650015830994,
-0.09019273519515991,
-0.2067345231771469,
0.058143287897109985,
-0.1382063776254654,
0.21928752958774567,
-0.4184926748275757,
-0.18317608535289764,
-0.044367652386426926,
0.37922579050064087,
-0.04584374278783798,
-0.20377260446548462,
0.427946001291275,
0.03951845318078995,
-0.038654226809740067,
0.7026517391204834,
-0.00011475833161966875,
0.028223633766174316,
0.5114488005638123,
0.07572194933891296,
-0.4094427525997162,
-0.36653536558151245,
-0.13832241296768188,
-0.08801419287919998,
-0.1861429512500763,
0.04728657752275467,
-0.035959333181381226,
0.4323616325855255,
-0.0745014175772667,
0.13093775510787964,
0.11692382395267487,
0.2248910367488861,
0.20099622011184692,
0.4762099087238312,
0.10917598009109497,
-0.29725217819213867,
0.19787997007369995,
0.23391008377075195,
-0.23252572119235992,
0.1139989048242569,
0.009575992822647095,
0.2066812962293625,
-0.03537077456712723,
0.11953839659690857,
0.12677979469299316,
-0.06055257096886635,
0.17653688788414001,
-0.12940001487731934,
-0.3712176978588104,
-0.23886382579803467,
0.08107930421829224,
-0.04450911283493042,
0.04164092615246773,
-0.37361690402030945,
-0.46186161041259766,
-0.04457023739814758,
-0.22903017699718475,
-0.20572887361049652,
0.31704506278038025,
0.1727198362350464,
-0.27072378993034363,
-0.004586208611726761,
-0.21755196154117584,
-0.3049395978450775,
-0.10119526088237762,
-0.007162339985370636,
-0.025983698666095734,
0.170299232006073,
-0.027705997228622437,
0.09540732204914093,
0.13283152878284454,
-0.1612749546766281,
0.10973665863275528,
-0.15672874450683594,
-0.05303525552153587,
-0.06377323716878891,
-0.4544473886489868,
-0.1711757779121399,
0.0023665204644203186,
0.5406168103218079,
0.1900545358657837,
0.18896013498306274,
-0.09526771306991577,
0.027161331847310066,
-0.15719836950302124,
0.16316041350364685,
0.27665603160858154,
0.09843797981739044,
0.06781807541847229,
0.2759481966495514,
0.29747119545936584,
0.46764716506004333,
0.19636309146881104,
-0.032257869839668274,
0.14955973625183105,
-0.2805691659450531,
-0.034406401216983795,
0.04429112747311592,
0.39027702808380127,
-0.28729870915412903,
-0.3934999108314514,
0.12857751548290253,
0.17036879062652588,
0.32471969723701477,
0.06050386279821396,
0.26418057084083557,
0.016492396593093872,
0.0636734813451767,
-0.17715579271316528,
0.1734902560710907,
-0.2325388789176941,
0.1340777724981308,
-0.2656345069408417,
0.108073890209198,
0.06621533632278442,
0.22514840960502625,
0.15353389084339142,
-0.6025370955467224,
0.1824645847082138,
0.13752387464046478,
0.4324747323989868,
-0.13991107046604156,
-0.14347341656684875,
0.02133982628583908,
0.001271165907382965,
0.33995547890663147,
0.15845051407814026,
0.3048465847969055,
0.25865834951400757,
-0.2796022891998291,
-0.11548089981079102,
-0.07322051376104355,
-0.6257144212722778,
-0.3451710343360901,
-0.17675535380840302,
0.20192407071590424,
-0.1721494495868683,
-0.017141733318567276,
-0.4728828966617584,
-0.2738557755947113,
-0.09936598688364029,
0.0690428763628006,
0.022086679935455322,
0.003934288397431374,
-0.05963870882987976,
-0.05410352721810341,
0.17716099321842194,
0.43347203731536865,
0.05753595754504204,
0.026068389415740967,
0.1649036705493927,
0.16130095720291138,
-0.1185404434800148,
0.2271244376897812,
-0.19044072926044464,
-0.16129690408706665,
-0.2533898949623108,
0.14992162585258484,
0.06785841286182404,
-0.7800475358963013,
-0.4181014597415924,
0.16559921205043793,
-0.26154181361198425,
-0.20232795178890228,
-0.2819124460220337,
-0.027463994920253754,
0.15144863724708557,
0.03421429917216301,
0.10931342840194702,
0.13970093429088593,
-0.12303267419338226,
0.10636565834283829,
-0.34877172112464905,
-0.3137730360031128,
-0.3785816431045532,
0.1802659034729004,
0.07356563210487366,
0.09026686102151871,
0.29346582293510437,
0.057194918394088745,
0.23464825749397278,
0.09160764515399933,
0.23839987814426422,
0.16329416632652283,
0.5480523109436035,
-0.22485233843326569,
0.1823684424161911,
0.0321374237537384,
-0.4058718979358673,
0.1957787275314331,
-0.022012818604707718,
0.20875662565231323,
-0.11259663105010986,
-0.14972279965877533,
-0.529375433921814,
0.1652916520833969,
-0.338249534368515,
0.05219034105539322,
0.06306084245443344,
-0.3550640940666199,
-0.05264808237552643,
0.09555414319038391,
-0.06568410992622375,
0.3459787964820862,
-0.17236723005771637,
0.35549619793891907,
-0.36129340529441833,
0.5986379981040955,
-0.18735986948013306,
-0.147737517952919,
0.10398441553115845,
0.01628691330552101,
0.37822896242141724,
-0.1863466054201126,
-0.2745091915130615,
0.32993656396865845,
0.0754803940653801,
0.3770179748535156,
0.3468438684940338,
0.03393298387527466,
0.3839966356754303,
-0.23572030663490295,
0.05944950878620148,
0.14176666736602783,
0.044678471982479095,
0.07446592301130295,
-0.16786620020866394,
0.3398274779319763,
-0.2653239965438843,
0.27257832884788513,
-0.06034853309392929,
0.30170562863349915,
0.1109015941619873,
0.028902996331453323,
-0.007008334156125784,
-0.07688111066818237,
0.2071724683046341,
-0.04820582643151283,
0.04326488450169563,
-0.2682729959487915,
0.36521634459495544,
0.10629520565271378,
0.28308406472206116,
0.17015080153942108,
-0.09987478703260422,
0.25989922881126404,
-0.12770456075668335,
-0.04067806154489517,
0.4095664620399475,
0.3595592975616455,
0.03918333351612091,
-0.08957526087760925,
-0.29436272382736206,
0.20231281220912933,
-0.06168857961893082,
-0.22731246054172516,
0.14820228517055511,
0.07407945394515991,
0.06473534554243088,
0.10802741348743439,
0.09730970859527588,
0.06773887574672699,
-0.35412490367889404,
-0.2589379847049713,
-0.022807497531175613,
0.35236650705337524,
-0.2924908399581909,
0.0221682321280241,
-0.05603710561990738,
0.02279236912727356,
-0.048533957451581955,
-0.258575975894928,
-0.42040854692459106,
-0.5527648329734802,
-0.1568320095539093,
0.3787707984447479,
-0.1449788361787796,
0.16865308582782745,
-0.026686053723096848,
0.12767484784126282,
0.0957622230052948,
-0.0700848400592804,
-0.2518651485443115,
-0.022423233836889267,
-0.00894710049033165,
-0.017346348613500595,
0.15085577964782715,
0.045328911393880844,
0.17847859859466553,
-0.11982722580432892,
0.1928766965866089,
-0.36001500487327576,
-0.17661160230636597,
0.2204689085483551,
0.04090357571840286,
0.24467043578624725,
0.10323859751224518,
0.12952102720737457,
-0.01763794757425785,
-0.23316946625709534,
0.4011700749397278,
-0.22820407152175903,
-0.1629108190536499,
0.1619844138622284,
-0.14418259263038635,
-0.11417228728532791,
-0.04755531623959541,
0.11043344438076019,
-0.08512290567159653,
-0.3551173508167267,
0.034892737865448,
0.05294310674071312,
0.13470640778541565,
0.31956493854522705,
0.03698619082570076,
-0.039854150265455246,
0.03547437861561775,
-0.5122407078742981,
-0.19479934871196747,
-0.5348491072654724,
0.17512068152427673,
-0.22167520225048065,
-0.31902840733528137,
0.1282528191804886,
0.174631729722023,
0.19142480194568634,
0.05601397529244423,
-0.42062222957611084,
-0.5666985511779785,
-0.10032476484775543,
0.32985568046569824,
-0.01330607384443283,
-0.013412995263934135,
0.1361759752035141,
-0.16022339463233948,
-0.05705311894416809,
0.0016653016209602356,
-0.26436033844947815,
0.14112588763237,
0.3630034029483795,
-0.0819731131196022,
-0.02646186575293541,
0.2914968729019165,
0.20407111942768097,
0.49168187379837036,
0.5204327702522278,
-0.061233680695295334,
0.57237708568573,
0.06827520579099655,
0.3220004141330719,
-0.02555917203426361,
-0.3961157202720642,
0.20634087920188904,
0.04950963705778122,
-0.022117748856544495,
0.1563461422920227,
0.1792820692062378,
0.13897201418876648,
-0.12429608404636383,
-0.5176193714141846,
-0.04582678899168968,
-0.3324447274208069,
-0.2069704830646515,
-0.17587915062904358,
0.0266694538295269,
0.10901136696338654,
0.0405086949467659,
-0.28662022948265076,
-0.31795576214790344,
0.30250993371009827,
0.24939997494220734,
0.0679652988910675,
0.043159130960702896,
-0.03957583010196686,
-0.27075350284576416,
-0.5115251541137695,
0.21435904502868652,
-0.012235384434461594,
0.4149131774902344,
-0.12115485966205597,
0.19247522950172424,
0.1195613294839859,
-0.09227249026298523,
0.5079758167266846,
-0.37991732358932495,
0.2252196967601776,
-0.1798335611820221,
-0.03098766878247261,
-0.5463100075721741,
-0.03624100238084793,
0.08562995493412018,
0.501315176486969,
-0.14692336320877075,
0.9110408425331116,
-0.09311933070421219,
-0.16587038338184357,
0.053617894649505615,
-0.16091659665107727,
-0.2407877892255783,
-0.0711146891117096,
-0.11837510764598846,
-0.5230721235275269,
-0.38351285457611084,
0.2763429582118988,
0.04540205001831055,
0.16774658858776093,
-0.07916844636201859,
-0.32066166400909424,
0.33370259404182434,
0.018569648265838623,
-0.05873841047286987,
0.02132834494113922,
0.10905122756958008,
0.11355622857809067,
0.1964418590068817,
0.04074668884277344,
0.27177688479423523,
0.21801099181175232,
0.5741133689880371,
0.22131922841072083,
-0.12391875684261322,
0.11829205602407455,
-0.0495135672390461,
-0.05229472368955612,
0.5056180953979492,
0.07103282958269119,
0.38560208678245544,
0.031001998111605644,
0.3800027370452881,
-0.3988898992538452,
-0.1267448514699936,
0.08781489729881287,
0.00045351218432188034,
-0.261210173368454,
0.26025205850601196,
0.3527911603450775,
-0.21779102087020874,
0.0879196971654892,
0.28496021032333374,
0.7280203700065613,
-0.16305433213710785,
0.2829883098602295,
0.10638036578893661,
0.9391905069351196,
0.07752856612205505,
0.044450543820858,
0.14301636815071106,
-0.12810176610946655,
0.3566967844963074,
-0.0005587227642536163,
-0.10299057513475418,
-0.3929463028907776,
-0.29885151982307434,
-0.07147850096225739,
-0.04751898720860481,
0.04332732409238815,
-0.1459856927394867,
-0.21154126524925232,
0.27063581347465515,
-0.37519294023513794,
0.5537729263305664,
-0.07562153041362762,
0.20948836207389832,
-0.6293010711669922,
-0.27667373418807983,
-0.0937577337026596,
0.23987969756126404,
-0.016847319900989532,
0.39119499921798706,
-0.036095909774303436,
0.05431108549237251,
-0.29651692509651184,
-0.21502959728240967,
-0.3742606043815613,
0.2466840147972107,
-0.09603295475244522,
-0.025832869112491608,
-0.2480112612247467,
-0.19192630052566528,
0.14519788324832916,
-0.21085679531097412,
0.7318270206451416,
0.020985281094908714,
-0.36879146099090576,
0.22500132024288177,
-0.1588820219039917,
0.03536192327737808,
-0.009084021672606468,
-0.047977346926927567,
0.19248132407665253,
-0.21364367008209229,
-0.23560895025730133,
-0.09294790774583817,
0.08155839145183563,
-0.18996617197990417,
-0.006729811429977417,
-0.0018753185868263245,
-0.1397121548652649,
-0.2794123589992523,
0.08896440267562866,
-0.20725411176681519,
-0.0004353523254394531,
-0.2819472849369049,
0.09555321931838989,
0.028168074786663055,
-0.004814677871763706,
0.031002748757600784,
0.3804585337638855,
-0.04704856127500534,
0.05674535408616066,
0.2904489040374756,
-0.1134110614657402,
-0.21368058025836945,
0.22312715649604797,
-0.10593067109584808,
-0.1752002090215683,
-0.1286514401435852,
0.1514117419719696,
0.14636240899562836,
-0.5739508867263794,
0.09901831299066544,
-0.32498446106910706,
0.12307165563106537,
-0.09482377767562866,
0.2025947868824005,
0.18945768475532532,
0.06519041955471039,
-0.16065847873687744,
-0.291398823261261,
-0.060500867664813995,
0.11269180476665497,
-0.07131044566631317,
0.03841206431388855,
-0.25348007678985596,
0.14255893230438232,
0.22750094532966614,
0.10177113860845566,
-0.2905823886394501,
0.2545713782310486,
-0.30795344710350037,
0.1706876903772354,
-0.14930284023284912,
-0.19520220160484314,
0.074781134724617,
-0.3985733091831207,
0.016171591356396675,
0.08835303038358688,
-0.20564004778862,
-0.12250567972660065,
-0.3449847996234894,
0.1325472593307495,
0.25038787722587585,
-0.2817569375038147,
-0.05891396477818489,
-0.05329276621341705,
-0.1650284081697464,
-0.1748410165309906,
0.14156723022460938,
0.28136783838272095,
-0.014764688909053802,
-0.2823024392127991,
0.6297059655189514,
0.06191541254520416,
-0.22390790283679962,
0.33101290464401245,
0.2807333469390869,
0.32907992601394653,
-0.06086454167962074,
0.08708524703979492,
-0.1602003425359726,
-0.03554824739694595,
0.032088279724121094,
0.3849111497402191,
0.21569138765335083,
0.16584384441375732,
0.2352815568447113,
-0.38090288639068604,
-0.03781396523118019,
0.09081593155860901,
0.49953433871269226,
0.15592429041862488,
-0.12869344651699066,
-0.04760212451219559,
0.23228925466537476,
0.20774303376674652,
0.053151898086071014,
-0.21357189118862152,
0.40425801277160645,
-0.18955913186073303,
-0.05578462779521942,
0.09680158644914627,
0.2754513919353485,
-0.0435028113424778,
0.002964109182357788,
0.037391677498817444,
0.7099265456199646,
-0.2419423609972,
0.0954573005437851,
-0.09305897355079651,
-0.14685072004795074,
0.17486490309238434,
0.30584627389907837,
-0.23302608728408813,
0.16824869811534882,
0.3118177056312561,
-0.14613166451454163,
0.4299321174621582,
0.19541779160499573,
-0.08704318106174469,
0.23248368501663208,
-0.35955381393432617,
-0.09544788300991058,
-0.1989370882511139,
-0.002720281481742859,
-0.00922616571187973,
0.12674711644649506,
0.47727036476135254,
-0.465756893157959,
-0.21503886580467224,
-0.45466896891593933,
0.040701378136873245,
-0.2161770462989807,
0.13121509552001953,
-0.2125512957572937,
-0.18880638480186462,
-0.30158567428588867,
0.08981338143348694,
-0.08013822138309479,
-0.11698134243488312,
0.287666916847229,
0.0020931512117385864,
-0.10165971517562866,
-0.10011332482099533,
-0.20650717616081238,
0.29309120774269104,
0.3402179777622223,
-0.09276475012302399,
0.3116559386253357,
0.12048003822565079,
-0.17845246195793152,
-0.15781329572200775,
0.17351901531219482,
0.4971037805080414,
0.014913368970155716,
0.17379385232925415,
0.15193398296833038,
0.2730976343154907,
0.09576686471700668,
0.20003531873226166,
0.04830671101808548,
-0.05357933044433594,
-0.007054097950458527,
0.185370534658432,
0.18281443417072296,
-0.1052488461136818,
-0.2578917145729065,
-0.09014801681041718,
0.2225399613380432,
-0.041861582547426224,
0.4347406327724457,
-0.29599398374557495,
-0.11481770873069763,
-0.14053158462047577,
0.04620181769132614,
-0.05475785583257675,
0.14011012017726898,
0.2803212106227875,
-0.29417669773101807,
0.10490414500236511,
-0.3127495348453522,
0.06728173792362213,
-0.1630469113588333,
0.45144253969192505,
0.4018469750881195,
-0.025083929300308228,
-0.15625855326652527,
-0.25026604533195496,
-0.46803179383277893,
0.2989248037338257,
-0.08546997606754303,
0.2549031972885132,
0.19264593720436096,
0.02309987135231495,
-0.15219846367835999,
-0.005364585667848587,
0.1264822632074356,
0.194387286901474,
-0.04748081788420677,
-0.07642631232738495,
-0.14579305052757263,
0.05441133677959442,
-0.05330029875040054,
-0.19948358833789825,
-0.04260663688182831,
-0.38136786222457886,
0.31817612051963806,
0.14566761255264282,
0.0027623288333415985,
0.004473833367228508,
0.003935307264328003,
0.08952200412750244,
-0.7489908933639526,
0.268818199634552,
0.05746578425168991,
0.20009541511535645,
0.017760809510946274,
-0.12129803001880646,
-0.3282863199710846,
-0.36972683668136597,
-0.33279117941856384,
-0.15738505125045776,
-0.21780365705490112,
0.35849159955978394,
0.20647850632667542,
-0.38083845376968384,
-0.17578452825546265,
0.33236223459243774,
-0.0041069649159908295,
0.11382325738668442,
0.08565733581781387,
0.22540903091430664,
-0.24323445558547974,
0.09111812710762024,
0.23015807569026947,
0.09487316757440567,
0.0823817104101181,
0.2624225318431854,
-0.1630104035139084,
-0.40340232849121094,
0.5397718548774719,
-0.13022194802761078,
-0.07287432998418808,
-0.012516417540609837,
0.4478780925273895,
0.07288961857557297,
-0.2703731954097748,
-0.09005336463451385,
-0.07968038320541382,
0.1251380890607834,
0.01161792129278183,
-0.16214130818843842,
0.29616743326187134,
-0.12186641991138458,
-0.10737927258014679,
-0.027660472318530083,
0.26975739002227783,
0.1571751832962036,
-0.34294670820236206,
0.44575002789497375,
0.0970863401889801
] |
https://github.com/huggingface/datasets/issues/5388 | Getting Value Error while loading a dataset.. | Hi! I can't reproduce this error locally (Mac) or in Colab. What version of `datasets` are you using? | ### Describe the bug
I am trying to load a dataset using Hugging Face Datasets load_dataset method. I am getting the value error as show below. Can someone help with this? I am using Windows laptop and Google Colab notebook.
```
WARNING:datasets.builder:Using custom data configuration default-a1d9e8eaedd958cd
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-12-5b4fdcb8e6d5>](https://localhost:8080/#) in <module>
6 )
7
----> 8 next(iter(law_dataset_streamed))
17 frames
[/usr/local/lib/python3.8/dist-packages/fsspec/core.py](https://localhost:8080/#) in get_compression(urlpath, compression)
485 compression = infer_compression(urlpath)
486 if compression is not None and compression not in compr:
--> 487 raise ValueError("Compression type %s not supported" % compression)
488 return compression
489
ValueError: Compression type zstd not supported
```
### Steps to reproduce the bug
```
!pip install zstandard
from datasets import load_dataset
lds = load_dataset(
"json",
data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst",
split="train",
streaming=True,
)
```
### Expected behavior
I expect an iterable object as the output 'lds' to be created.
### Environment info
Windows laptop with Google Colab notebook | 18 | Getting Value Error while loading a dataset..
### Describe the bug
I am trying to load a dataset using Hugging Face Datasets load_dataset method. I am getting the value error as show below. Can someone help with this? I am using Windows laptop and Google Colab notebook.
```
WARNING:datasets.builder:Using custom data configuration default-a1d9e8eaedd958cd
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-12-5b4fdcb8e6d5>](https://localhost:8080/#) in <module>
6 )
7
----> 8 next(iter(law_dataset_streamed))
17 frames
[/usr/local/lib/python3.8/dist-packages/fsspec/core.py](https://localhost:8080/#) in get_compression(urlpath, compression)
485 compression = infer_compression(urlpath)
486 if compression is not None and compression not in compr:
--> 487 raise ValueError("Compression type %s not supported" % compression)
488 return compression
489
ValueError: Compression type zstd not supported
```
### Steps to reproduce the bug
```
!pip install zstandard
from datasets import load_dataset
lds = load_dataset(
"json",
data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst",
split="train",
streaming=True,
)
```
### Expected behavior
I expect an iterable object as the output 'lds' to be created.
### Environment info
Windows laptop with Google Colab notebook
Hi! I can't reproduce this error locally (Mac) or in Colab. What version of `datasets` are you using? | [
-0.42182275652885437,
-0.3026272654533386,
0.017313849180936813,
0.4908521771430969,
0.2631380259990692,
0.059877730906009674,
0.3964580297470093,
0.04273839667439461,
0.08469170331954956,
0.27312690019607544,
-0.16546882688999176,
0.3394649922847748,
-0.17036893963813782,
0.28852760791778564,
-0.20962877571582794,
-0.10898122191429138,
0.0765070915222168,
0.2818981409072876,
0.1805199682712555,
0.202109232544899,
-0.26751455664634705,
0.30965209007263184,
-0.3118411600589752,
0.10454122722148895,
-0.14612925052642822,
-0.2004634588956833,
0.001826191321015358,
0.2198203206062317,
-0.12120386213064194,
-0.41636160016059875,
0.4248589873313904,
-0.13012102246284485,
0.5867087841033936,
0.5032975077629089,
-0.00012591657286975533,
0.01820477843284607,
0.5432898998260498,
-0.1313728243112564,
-0.335875004529953,
-0.4331200122833252,
-0.05999283120036125,
-0.11333689838647842,
0.014823148027062416,
-0.09070474654436111,
-0.36432117223739624,
-0.03028608113527298,
-0.16421741247177124,
-0.25672677159309387,
0.49384623765945435,
0.31282633543014526,
0.08414918929338455,
0.25886818766593933,
-0.007937699556350708,
-0.11616735905408859,
0.17437788844108582,
-0.07594428956508636,
0.005262752994894981,
0.4712883532047272,
0.28636443614959717,
0.1739213764667511,
0.2797928750514984,
0.04968378692865372,
0.11657693982124329,
-0.1552881896495819,
0.22518104314804077,
0.18466271460056305,
0.16407325863838196,
-0.27628955245018005,
0.12578164041042328,
0.025395188480615616,
0.6406012177467346,
-0.042573779821395874,
-0.28661230206489563,
-0.1885508894920349,
0.06008991599082947,
-0.24030780792236328,
0.3477805256843567,
0.31626757979393005,
-0.21766552329063416,
0.18570411205291748,
-0.27383530139923096,
0.16071413457393646,
-0.2881137430667877,
0.15411387383937836,
-0.07808306813240051,
-0.08407126367092133,
-0.3405018150806427,
0.2369331419467926,
0.2837952971458435,
-0.17250016331672668,
0.340658038854599,
-0.0806499570608139,
0.04182824492454529,
0.11680276691913605,
-0.3066956400871277,
-0.08146976679563522,
-0.18472248315811157,
0.09952837973833084,
0.06464608758687973,
-0.11018446087837219,
0.11955202370882034,
-0.2187749147415161,
0.1606493592262268,
0.2396371066570282,
0.3774889409542084,
0.09517255425453186,
0.12414458394050598,
-0.3012145161628723,
0.11247362196445465,
0.3641599714756012,
0.21440204977989197,
-0.16038298606872559,
-0.2798442840576172,
-0.2922196686267853,
0.1157037615776062,
-0.03436640277504921,
0.46497106552124023,
-0.1134454682469368,
-0.48888635635375977,
0.007624223828315735,
-0.23363837599754333,
0.2287551462650299,
0.19843170046806335,
0.4397438168525696,
-0.027164719998836517,
-0.10635193437337875,
0.194695383310318,
0.11071884632110596,
-0.064851775765419,
-0.2042619287967682,
-0.04268501326441765,
0.05328620225191116,
-0.11268815398216248,
0.013250160962343216,
0.13062326610088348,
-0.5712167024612427,
0.14056405425071716,
0.26496657729148865,
0.1167561262845993,
-0.1832699030637741,
-0.2561536729335785,
-0.17970189452171326,
0.06800559163093567,
0.24463549256324768,
0.0348125658929348,
-0.1413213312625885,
0.0808190107345581,
-0.36717402935028076,
-0.20624662935733795,
0.4242883622646332,
-0.40960994362831116,
-0.3721730709075928,
-0.19542907178401947,
0.008898618631064892,
-0.2098749279975891,
0.10514997690916061,
-0.13823202252388,
0.14327935874462128,
0.31736910343170166,
-0.09348640590906143,
0.013942420482635498,
-0.1705787628889084,
-0.4790692627429962,
-0.11596128344535828,
0.30251652002334595,
0.4823957085609436,
-0.5822734832763672,
-0.14391028881072998,
-0.16608747839927673,
-0.0842018574476242,
0.1465948224067688,
0.26909390091896057,
-0.30241093039512634,
0.14352542161941528,
-0.2239435315132141,
-0.1531272530555725,
0.1550976186990738,
-0.14675554633140564,
-0.6455808877944946,
0.20035992562770844,
0.003741227090358734,
0.17922252416610718,
-0.19024872779846191,
0.06685550510883331,
-0.005721515044569969,
-0.13882264494895935,
0.2529318630695343,
0.19476354122161865,
-0.2240281105041504,
-0.0854770839214325,
-0.19990986585617065,
-0.17041195929050446,
0.42372429370880127,
0.26727598905563354,
-0.07663047313690186,
0.26884323358535767,
0.10205762833356857,
-0.1816636174917221,
-0.013570696115493774,
-0.04415792599320412,
-0.04880484938621521,
0.2051456868648529,
0.4287518560886383,
-0.012814395129680634,
-0.016531413421034813,
-0.17749199271202087,
-0.577046275138855,
0.21404817700386047,
-0.12185446918010712,
0.19433896243572235,
-0.1678280085325241,
-0.01410670205950737,
-0.40505385398864746,
0.18553227186203003,
-0.21822114288806915,
-0.10941503942012787,
-0.0537002831697464,
0.2245844006538391,
-0.048287197947502136,
-0.17244748771190643,
-0.21221309900283813,
0.5809553861618042,
-0.13518860936164856,
-0.016158415004611015,
-0.46841904520988464,
0.25667187571525574,
-0.14167743921279907,
-0.24511802196502686,
0.07846683263778687,
-0.09922299534082413,
0.29218631982803345,
-0.21452496945858002,
-0.2635793387889862,
0.4235362410545349,
-0.02007204107940197,
0.047236278653144836,
-0.28356650471687317,
-0.3045263886451721,
0.3269347846508026,
-0.3640367090702057,
-0.026837961748242378,
0.16301704943180084,
0.2929266393184662,
0.04074466973543167,
0.18044698238372803,
0.37065571546554565,
-0.2863371968269348,
-0.0756298378109932,
-0.18564090132713318,
0.03446219116449356,
0.21995434165000916,
0.009999539703130722,
-0.1875474900007248,
-0.11838375777006149,
-0.009128492325544357,
-0.06965047121047974,
0.3092341125011444,
0.14066049456596375,
-0.2881529927253723,
-0.21677041053771973,
0.29550784826278687,
-0.17170175909996033,
-0.0532771572470665,
0.4729664921760559,
0.20700454711914062,
-0.11621954292058945,
0.13126567006111145,
0.08824510872364044,
0.5699761509895325,
-0.050728343427181244,
-0.3339553475379944,
0.24577964842319489,
0.14724458754062653,
0.05363953113555908,
0.1698913276195526,
-0.04213857650756836,
0.3506437838077545,
0.2884117662906647,
0.0886702612042427,
0.21998775005340576,
-0.19599628448486328,
-0.1464819461107254,
-0.0022381599992513657,
0.17696532607078552,
-0.39292827248573303,
0.08227033168077469,
-0.041427239775657654,
-0.09544754028320312,
-0.09422620385885239,
-0.0831514522433281,
-0.24706438183784485,
0.16602659225463867,
-0.33949190378189087,
0.34592780470848083,
0.09599156677722931,
0.2282920926809311,
0.10765041410923004,
0.6865671277046204,
0.3263533115386963,
-0.21195019781589508,
-0.38711845874786377,
-0.015470175072550774,
-0.40269339084625244,
-0.1310768872499466,
-0.049406711012125015,
-0.26636722683906555,
0.2321164608001709,
-0.34006601572036743,
0.02273891121149063,
-0.0900249034166336,
-0.23268502950668335,
0.1961851418018341,
-0.10444414615631104,
0.5112874507904053,
0.2745082974433899,
0.14898622035980225,
-0.09773307293653488,
-0.08820673078298569,
0.33101484179496765,
-0.36291199922561646,
-0.14927542209625244,
-0.01046521682292223,
0.05728188157081604,
-0.1254187673330307,
-0.07128946483135223,
-0.05409272760152817,
-0.5292346477508545,
-0.19703654944896698,
0.028464041650295258,
-0.14325137436389923,
0.07153716683387756,
0.371656596660614,
0.18921639025211334,
-0.020129799842834473,
0.48639315366744995,
0.12774066627025604,
-0.23378534615039825,
-0.424664705991745,
0.19594919681549072,
-0.23825204372406006,
-0.4763583838939667,
-0.0951889157295227,
-0.008481910452246666,
0.003552433103322983,
0.17721420526504517,
-0.1993863433599472,
0.09109877794981003,
-0.3258538842201233,
0.14795683324337006,
-0.3150518834590912,
-0.18690013885498047,
0.18428802490234375,
0.11141527444124222,
0.15288707613945007,
-0.2825031876564026,
-0.542182981967926,
0.06641041487455368,
0.17886939644813538,
0.4062495827674866,
0.5992246270179749,
0.45123133063316345,
-0.019070053473114967,
0.27099791169166565,
0.430332750082016,
-0.18377918004989624,
0.5991952419281006,
-0.1053038164973259,
0.26829278469085693,
-0.21952950954437256,
-0.5485088229179382,
-0.15704487264156342,
-0.002544969320297241,
-0.3135596513748169,
0.15916907787322998,
-0.15124663710594177,
-0.019105317071080208,
-0.35699406266212463,
-0.18784357607364655,
-0.17954617738723755,
-0.07892045378684998,
-0.0405532568693161,
0.13378557562828064,
0.2063380777835846,
-0.2432396560907364,
-0.16209375858306885,
0.03296937793493271,
-0.023573584854602814,
0.15725332498550415,
0.36041945219039917,
0.05334628000855446,
0.057012889534235,
0.1638067364692688,
0.11747387051582336,
-0.34988129138946533,
0.25348395109176636,
0.358090341091156,
0.3902799189090729,
-0.2020326554775238,
0.23608869314193726,
0.0320243239402771,
-0.02332291565835476,
0.7613047957420349,
0.14994101226329803,
0.384695827960968,
0.09915143251419067,
-0.2649134397506714,
-0.3666861057281494,
-0.05839948356151581,
-0.2673945128917694,
0.1615530252456665,
-0.026446063071489334,
0.6398274898529053,
-0.10428241640329361,
-0.11367354542016983,
0.21283528208732605,
-0.13106434047222137,
-0.12527042627334595,
-0.3977246880531311,
-0.1170634776353836,
-0.3450380861759186,
-0.2377542406320572,
-0.15066123008728027,
0.1273718923330307,
0.532101571559906,
0.015479173511266708,
-0.0879891961812973,
-0.020207202062010765,
-0.0008369907736778259,
0.07681985199451447,
0.05734856054186821,
0.2416267693042755,
-0.14910480380058289,
0.0598721019923687,
-0.040365248918533325,
0.09303107857704163,
0.3319602608680725,
0.7156418561935425,
0.2680809497833252,
-0.5182511806488037,
0.07911430299282074,
0.10698753595352173,
0.028519652783870697,
0.26117876172065735,
-0.33006009459495544,
-0.3885776400566101,
-0.16689713299274445,
0.3082362413406372,
-0.28122082352638245,
0.11428124457597733,
0.28002721071243286,
0.046744454652071,
-0.4302525222301483,
-0.10795076936483383,
0.48979508876800537,
-0.17515504360198975,
-0.02390904724597931,
0.13720902800559998,
0.30186188220977783,
-0.3250323235988617,
0.2511797547340393,
0.3055895268917084,
0.9432961940765381,
0.04891877621412277,
-0.0987694263458252,
0.36008718609809875,
-0.16865047812461853,
0.21693995594978333,
0.05551624298095703,
-0.051926471292972565,
-0.18226423859596252,
-0.3045838177204132,
-0.17691245675086975,
-0.06651511788368225,
0.4942907392978668,
0.22661809623241425,
-0.34043312072753906,
0.0689624771475792,
0.05176495015621185,
0.12535779178142548,
0.24478766322135925,
0.07589051872491837,
-0.28659510612487793,
-0.13786299526691437,
-0.405322790145874,
0.017825227230787277,
-0.21464870870113373,
0.2859915494918823,
-0.18055111169815063,
-0.14592862129211426,
-0.15172742307186127,
-0.055967703461647034,
-0.2794906497001648,
0.07197579741477966,
-0.31133896112442017,
0.08315743505954742,
0.269586980342865,
-0.4723644256591797,
0.31992611289024353,
0.3528177738189697,
0.2578168511390686,
-0.06015918776392937,
-0.3009086549282074,
0.005747262388467789,
-0.2171158492565155,
-0.022154467180371284,
-0.1226411685347557,
-0.019582156091928482,
0.2945953607559204,
-0.052435241639614105,
-0.2144395112991333,
-0.15251436829566956,
-0.06275111436843872,
-0.11995439231395721,
0.1903090476989746,
-0.06716573238372803,
-0.24700815975666046,
-0.4315575063228607,
-0.4227435290813446,
-0.4400715231895447,
0.26771628856658936,
-0.10657626390457153,
0.017562754452228546,
-0.029538854956626892,
-0.0779212936758995,
-0.20603087544441223,
0.039901070296764374,
-0.3852771520614624,
0.008706973865628242,
0.3764801323413849,
-0.19738155603408813,
0.34254688024520874,
0.43328768014907837,
0.0278097502887249,
0.004929788410663605,
-0.009214069694280624,
0.11305426806211472,
0.13772383332252502,
-0.31646621227264404,
0.32088762521743774,
-0.05557826906442642,
-0.06205981969833374,
-0.08116424083709717,
0.5157153010368347,
0.43413209915161133,
0.054201073944568634,
0.07588563859462738,
-0.48897379636764526,
-0.1660107672214508,
-0.16699527204036713,
0.09817977249622345,
0.24514663219451904,
0.4160080850124359,
-0.015466015785932541,
0.07585223764181137,
-0.30322888493537903,
-0.16639702022075653,
0.019080711528658867,
-0.215373232960701,
0.11157219111919403,
0.19189339876174927,
-0.041995592415332794,
0.05244448408484459,
0.03147919476032257,
-0.06388907879590988,
0.238643616437912,
-0.008856622502207756,
-0.08071009814739227,
-0.14496305584907532,
0.20925219357013702,
0.13404911756515503,
-0.25239405035972595,
-0.12845158576965332,
-0.05076996982097626,
-0.30546313524246216,
-0.1210586428642273,
0.17857182025909424,
0.1222759559750557,
0.06759288161993027,
0.541790246963501,
-0.0009576641023159027,
-0.02148071676492691,
-0.05194827914237976,
0.3590482175350189,
-0.058547720313072205,
0.3244497776031494,
-0.04083457589149475,
0.17319314181804657,
-0.10336748510599136,
-0.03125724941492081,
-0.20152077078819275,
0.16585928201675415,
0.10195690393447876,
-0.03864837437868118,
0.28912055492401123,
-0.3701398968696594,
0.19144180417060852,
0.0154659952968359,
0.3915693759918213,
0.16198128461837769,
-0.4100962281227112,
-0.061917878687381744,
0.1270868480205536,
-0.006044253706932068,
-0.2365240901708603,
-0.1356268674135208,
0.12092575430870056,
0.10536430776119232,
-0.18954594433307648,
0.2869202196598053,
-0.0795120820403099,
0.13516704738140106,
-0.14988577365875244,
-0.12541651725769043,
0.9070836305618286,
0.04289359599351883,
0.1265651434659958,
0.38102880120277405,
-0.14963296055793762,
0.39415666460990906,
0.2141377478837967,
0.3655543625354767,
0.12626701593399048,
0.35152506828308105,
-0.3158099055290222,
-0.0361042395234108,
-0.04086650162935257,
0.3693940341472626,
0.21366620063781738,
-0.5010393857955933,
0.2615811228752136,
0.39535972476005554,
-0.15829038619995117,
-0.022964060306549072,
0.012318268418312073,
0.3730939030647278,
-0.16953910887241364,
-0.2813550531864166,
-0.2573120892047882,
0.12725253403186798,
-0.18924158811569214,
-0.09664696455001831,
-0.16795533895492554,
-0.031342823058366776,
-0.11916595697402954,
0.27784422039985657,
0.01971178688108921,
-0.22017039358615875,
0.10204045474529266,
0.3236094117164612,
-0.13278387486934662,
-0.38179171085357666,
-0.06802637875080109,
0.3710707724094391,
0.06885524094104767,
-0.2906958758831024,
0.37187546491622925,
0.037190504372119904,
-0.11352501809597015,
0.2616840600967407,
0.2142108827829361,
0.484510213136673,
0.5136818885803223,
0.015567497350275517,
0.13607971370220184,
-0.019067738205194473,
-0.11348557472229004,
0.05954916030168533,
0.2290402054786682,
0.10956575721502304,
0.31535860896110535,
0.3900623917579651,
0.012675795704126358,
0.04090188443660736,
0.1363239288330078,
0.13420817255973816,
0.28386688232421875,
-0.5331094861030579,
-0.0591963455080986,
-0.3064146935939789,
0.029089920222759247,
-0.07623180747032166,
-0.014506533741950989,
-0.2027830183506012,
-0.22293652594089508,
0.3333580195903778,
-0.16222767531871796,
0.34305405616760254,
0.14904038608074188,
0.012710150331258774,
-0.19343696534633636,
0.4517517387866974,
0.211886927485466,
0.02892407961189747,
-0.19477589428424835,
-0.019316300749778748,
-0.5250657200813293,
0.010013960301876068,
0.4644997715950012,
-0.15928736329078674,
0.25718066096305847,
-0.09667620062828064,
-0.2361273467540741,
0.20155709981918335,
0.07772094011306763,
0.17760728299617767,
0.1735984832048416,
0.16264446079730988,
0.0014651380479335785,
-0.32015570998191833,
-0.006769359111785889,
0.14236058294773102,
0.02475276216864586,
-0.30894556641578674,
0.13791653513908386,
-0.07493233680725098,
-0.16281840205192566,
-0.11422599852085114,
-0.1199469119310379,
-0.262570321559906,
-0.24298319220542908,
0.26311829686164856,
0.24841852486133575,
0.27883172035217285,
-0.09957251697778702,
0.27529004216194153,
0.10203100740909576,
0.05691682547330856,
-0.16461440920829773,
0.25717368721961975,
0.09590261429548264,
0.17867103219032288,
-0.12379296123981476,
0.20123596489429474,
-0.404929518699646,
0.19441507756710052,
0.18548457324504852,
-0.12157203257083893,
-0.44861263036727905,
0.03338561952114105,
-0.11809909343719482,
-0.1723124086856842,
0.13680003583431244,
0.026711730286478996,
-0.10388214886188507,
0.33327803015708923,
-0.1880122423171997,
-0.32295170426368713,
0.6050885915756226,
-0.42144909501075745,
-0.2942902147769928,
0.3428186774253845,
-0.11050011217594147,
0.11973929405212402,
-0.3454115390777588,
-0.3526085615158081,
0.044861145317554474,
0.2788870632648468,
-0.16891470551490784,
-0.19229181110858917,
0.20800131559371948,
-0.03948791325092316,
0.12355376780033112,
-0.003982093185186386,
0.5205615758895874,
0.24796900153160095,
0.017937375232577324,
0.16223081946372986,
-0.2765222489833832
] |
https://github.com/huggingface/datasets/issues/5388 | Getting Value Error while loading a dataset.. | @valmetisrinivas you get that error because you imported `datasets` (and thus `fsspec`) before installing `zstandard`.
Please, restart your Colab runtime and execute the install commands before importing `datasets`:
```python
!pip install datasets
!pip install zstandard
from datasets import load_dataset
ds = load_dataset(
"json",
data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst",
split="train",
streaming=True,
)
next(iter(ds))
``` | ### Describe the bug
I am trying to load a dataset using Hugging Face Datasets load_dataset method. I am getting the value error as show below. Can someone help with this? I am using Windows laptop and Google Colab notebook.
```
WARNING:datasets.builder:Using custom data configuration default-a1d9e8eaedd958cd
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-12-5b4fdcb8e6d5>](https://localhost:8080/#) in <module>
6 )
7
----> 8 next(iter(law_dataset_streamed))
17 frames
[/usr/local/lib/python3.8/dist-packages/fsspec/core.py](https://localhost:8080/#) in get_compression(urlpath, compression)
485 compression = infer_compression(urlpath)
486 if compression is not None and compression not in compr:
--> 487 raise ValueError("Compression type %s not supported" % compression)
488 return compression
489
ValueError: Compression type zstd not supported
```
### Steps to reproduce the bug
```
!pip install zstandard
from datasets import load_dataset
lds = load_dataset(
"json",
data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst",
split="train",
streaming=True,
)
```
### Expected behavior
I expect an iterable object as the output 'lds' to be created.
### Environment info
Windows laptop with Google Colab notebook | 49 | Getting Value Error while loading a dataset..
### Describe the bug
I am trying to load a dataset using Hugging Face Datasets load_dataset method. I am getting the value error as show below. Can someone help with this? I am using Windows laptop and Google Colab notebook.
```
WARNING:datasets.builder:Using custom data configuration default-a1d9e8eaedd958cd
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-12-5b4fdcb8e6d5>](https://localhost:8080/#) in <module>
6 )
7
----> 8 next(iter(law_dataset_streamed))
17 frames
[/usr/local/lib/python3.8/dist-packages/fsspec/core.py](https://localhost:8080/#) in get_compression(urlpath, compression)
485 compression = infer_compression(urlpath)
486 if compression is not None and compression not in compr:
--> 487 raise ValueError("Compression type %s not supported" % compression)
488 return compression
489
ValueError: Compression type zstd not supported
```
### Steps to reproduce the bug
```
!pip install zstandard
from datasets import load_dataset
lds = load_dataset(
"json",
data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst",
split="train",
streaming=True,
)
```
### Expected behavior
I expect an iterable object as the output 'lds' to be created.
### Environment info
Windows laptop with Google Colab notebook
@valmetisrinivas you get that error because you imported `datasets` (and thus `fsspec`) before installing `zstandard`.
Please, restart your Colab runtime and execute the install commands before importing `datasets`:
```python
!pip install datasets
!pip install zstandard
from datasets import load_dataset
ds = load_dataset(
"json",
data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst",
split="train",
streaming=True,
)
next(iter(ds))
``` | [
-0.4479125440120697,
-0.3030000925064087,
-0.01902599073946476,
0.5297799110412598,
0.2991926670074463,
0.08056461066007614,
0.3831023871898651,
0.02812386117875576,
0.1280464082956314,
0.23822905123233795,
-0.21237188577651978,
0.28098517656326294,
-0.1627029925584793,
0.29270410537719727,
-0.18539345264434814,
-0.10611851513385773,
0.05714988708496094,
0.2563631534576416,
0.1721450388431549,
0.18829838931560516,
-0.26372644305229187,
0.29038339853286743,
-0.3195098638534546,
0.10630770027637482,
-0.11745388805866241,
-0.21640892326831818,
0.02829580567777157,
0.2063402533531189,
-0.12031944841146469,
-0.4310719072818756,
0.395297646522522,
-0.12526363134384155,
0.5924466848373413,
0.514190673828125,
-0.00012450371286831796,
0.0034439638257026672,
0.5293804407119751,
-0.12755443155765533,
-0.33264270424842834,
-0.39724987745285034,
-0.05033145472407341,
-0.14333681762218475,
-0.023930182680487633,
-0.08909878134727478,
-0.35300740599632263,
-0.08426959067583084,
-0.2218015342950821,
-0.30662035942077637,
0.49656444787979126,
0.34536051750183105,
0.09941796213388443,
0.2938403785228729,
0.007163498550653458,
-0.09943020343780518,
0.17393654584884644,
-0.1287863403558731,
0.05172988027334213,
0.4402712285518646,
0.2812810242176056,
0.18312883377075195,
0.31330782175064087,
0.036921728402376175,
0.06658532470464706,
-0.19738061726093292,
0.23780325055122375,
0.17234152555465698,
0.15554016828536987,
-0.2518080174922943,
0.08828368037939072,
-0.017194949090480804,
0.6426813006401062,
-0.060662783682346344,
-0.2676748037338257,
-0.21301206946372986,
0.05677502229809761,
-0.2854889929294586,
0.3081075847148895,
0.29862862825393677,
-0.17109331488609314,
0.20210979878902435,
-0.2437453269958496,
0.09904435276985168,
-0.297611266374588,
0.1817411631345749,
-0.04911021515727043,
-0.10150209069252014,
-0.3196360468864441,
0.2317398190498352,
0.29188019037246704,
-0.1485351324081421,
0.3196979761123657,
-0.12845638394355774,
0.027932021766901016,
0.16856138408184052,
-0.3236910104751587,
-0.08616284281015396,
-0.155636727809906,
0.10259348154067993,
0.0867384523153305,
-0.04934915900230408,
0.05743326246738434,
-0.19998812675476074,
0.14718063175678253,
0.23068022727966309,
0.4182063341140747,
0.07912716269493103,
0.13178998231887817,
-0.26812461018562317,
0.11982504278421402,
0.3014092445373535,
0.23439478874206543,
-0.1756715476512909,
-0.24028149247169495,
-0.30796751379966736,
0.1503845751285553,
-0.01702762022614479,
0.45732581615448,
-0.12094186991453171,
-0.45258966088294983,
0.03194648027420044,
-0.2295016348361969,
0.19447530806064606,
0.18489861488342285,
0.4421367347240448,
-0.028756804764270782,
-0.09225789457559586,
0.2030877321958542,
0.12300930917263031,
-0.059898458421230316,
-0.2284580022096634,
-0.05598379671573639,
0.03643897548317909,
-0.08798781037330627,
0.020307056605815887,
0.13762901723384857,
-0.6122186183929443,
0.13723322749137878,
0.2368939071893692,
0.15782079100608826,
-0.18289420008659363,
-0.22530080378055573,
-0.1894068419933319,
0.03749793395400047,
0.22999773919582367,
0.06078949198126793,
-0.09879138320684433,
0.09872791171073914,
-0.3849942684173584,
-0.19577458500862122,
0.40132930874824524,
-0.40986838936805725,
-0.35702160000801086,
-0.16997256875038147,
0.03546276316046715,
-0.22214500606060028,
0.0917738676071167,
-0.18403655290603638,
0.12142772972583771,
0.2943422794342041,
-0.0941058099269867,
-0.008709095418453217,
-0.15736795961856842,
-0.443430095911026,
-0.09852975606918335,
0.27441245317459106,
0.4859318733215332,
-0.554625928401947,
-0.16152963042259216,
-0.14952267706394196,
-0.11981214582920074,
0.08945116400718689,
0.2729139029979706,
-0.34061399102211,
0.1728934645652771,
-0.22631299495697021,
-0.13700537383556366,
0.16383099555969238,
-0.1439834088087082,
-0.6251129508018494,
0.20170369744300842,
-0.018178395926952362,
0.19792622327804565,
-0.20763477683067322,
0.10169433802366257,
0.04319065436720848,
-0.1317760944366455,
0.2583172917366028,
0.21454744040966034,
-0.20136040449142456,
-0.08211658895015717,
-0.1908116489648819,
-0.11753032356500626,
0.4364469647407532,
0.2539709210395813,
-0.07414531707763672,
0.27109113335609436,
0.11475231498479843,
-0.1622009575366974,
-0.03416775166988373,
-0.07940688729286194,
-0.02546565979719162,
0.2797902226448059,
0.3955828547477722,
0.03682655841112137,
-0.030576400458812714,
-0.20996510982513428,
-0.6508840322494507,
0.22392895817756653,
-0.13686098158359528,
0.1866828054189682,
-0.1762116700410843,
-0.009604372084140778,
-0.3977927267551422,
0.1532667577266693,
-0.24402795732021332,
-0.07779650390148163,
-0.04320378229022026,
0.2008691430091858,
-0.05332370102405548,
-0.15727326273918152,
-0.19719332456588745,
0.5888855457305908,
-0.1432601809501648,
0.0003770383773371577,
-0.48754656314849854,
0.3082044720649719,
-0.14582335948944092,
-0.22808001935482025,
0.059546537697315216,
-0.08635423332452774,
0.3045852780342102,
-0.20790888369083405,
-0.236190527677536,
0.39160194993019104,
-0.04688849672675133,
0.07294178754091263,
-0.27315133810043335,
-0.28771597146987915,
0.30278027057647705,
-0.41465431451797485,
-0.01474052108824253,
0.15068213641643524,
0.3061050474643707,
-0.0030098706483840942,
0.2146039605140686,
0.37270909547805786,
-0.3084785044193268,
-0.03722604364156723,
-0.17833127081394196,
0.02260577864944935,
0.23527348041534424,
0.029026608914136887,
-0.2308845818042755,
-0.13322871923446655,
0.031131301075220108,
-0.051461976021528244,
0.302033931016922,
0.14630454778671265,
-0.2734243869781494,
-0.2701614499092102,
0.2785012423992157,
-0.14553110301494598,
-0.07522677630186081,
0.4441615343093872,
0.156153604388237,
-0.06875161826610565,
0.13455241918563843,
0.05275202915072441,
0.5858293771743774,
0.010434134863317013,
-0.3470706045627594,
0.2577682137489319,
0.14508233964443207,
0.08873654901981354,
0.1664506196975708,
-0.021880246698856354,
0.345584511756897,
0.3293575942516327,
0.04173511639237404,
0.20570144057273865,
-0.20004159212112427,
-0.13664300739765167,
-0.026657234877347946,
0.17907004058361053,
-0.4248443841934204,
0.06968732923269272,
-0.04628734290599823,
-0.08163779973983765,
-0.09316424280405045,
-0.11279548704624176,
-0.27904951572418213,
0.14728178083896637,
-0.37000948190689087,
0.31305888295173645,
0.11627663671970367,
0.21543952822685242,
0.08636614680290222,
0.6668591499328613,
0.30998581647872925,
-0.270006388425827,
-0.4069889485836029,
-0.05485817790031433,
-0.3537166118621826,
-0.12195800244808197,
-0.030666954815387726,
-0.24372436106204987,
0.3160536289215088,
-0.2837871015071869,
0.03660814091563225,
-0.13520804047584534,
-0.2083970308303833,
0.15654245018959045,
-0.12838445603847504,
0.4825994372367859,
0.22059378027915955,
0.19217996299266815,
-0.014074301347136497,
-0.048234906047582626,
0.3448626697063446,
-0.311055988073349,
-0.12542425096035004,
0.02568259835243225,
0.04790099710226059,
-0.1269545555114746,
-0.05802920088171959,
-0.08561687916517258,
-0.5415299534797668,
-0.22157235443592072,
-0.009673774242401123,
-0.0882071778178215,
0.03398634493350983,
0.35929977893829346,
0.1991857886314392,
-0.019201025366783142,
0.46351364254951477,
0.12751652300357819,
-0.2317383736371994,
-0.3975003957748413,
0.23816221952438354,
-0.24876625835895538,
-0.46886470913887024,
-0.05968775600194931,
0.024697571992874146,
0.00489991158246994,
0.16487005352973938,
-0.20051978528499603,
0.09687208384275436,
-0.30478227138519287,
0.11765827238559723,
-0.3380272388458252,
-0.1611860990524292,
0.1761331558227539,
0.13692691922187805,
0.1632518619298935,
-0.24916765093803406,
-0.5288094878196716,
0.04141868278384209,
0.1557144671678543,
0.384901762008667,
0.5536774396896362,
0.49722927808761597,
-0.036306437104940414,
0.27487918734550476,
0.44568929076194763,
-0.196277916431427,
0.5757871866226196,
-0.1145726665854454,
0.28819534182548523,
-0.22029709815979004,
-0.5964213609695435,
-0.20957115292549133,
-0.0353708416223526,
-0.2669387757778168,
0.1314089447259903,
-0.16147193312644958,
0.01801980659365654,
-0.36770468950271606,
-0.14537875354290009,
-0.15288211405277252,
-0.04956437647342682,
-0.051942892372608185,
0.13138347864151,
0.21421125531196594,
-0.20754562318325043,
-0.19821006059646606,
0.0055381860584020615,
-0.0329471156001091,
0.16258472204208374,
0.30752724409103394,
0.027761802077293396,
0.06678856909275055,
0.10143563151359558,
0.1332463026046753,
-0.33851391077041626,
0.28718504309654236,
0.32556208968162537,
0.31729674339294434,
-0.1667482554912567,
0.2658008635044098,
0.031017467379570007,
-0.023567762225866318,
0.7530031800270081,
0.123774953186512,
0.33252406120300293,
0.1117134839296341,
-0.25260230898857117,
-0.39371827244758606,
-0.023898594081401825,
-0.2789790630340576,
0.09839243441820145,
-0.056156713515520096,
0.6522698402404785,
-0.16908253729343414,
-0.11299879103899002,
0.22692085802555084,
-0.0728972777724266,
-0.15348441898822784,
-0.4042407274246216,
-0.13612335920333862,
-0.3577905595302582,
-0.30519479513168335,
-0.1533375382423401,
0.1320067048072815,
0.5635408759117126,
0.020294902846217155,
-0.07266183197498322,
-0.037464022636413574,
0.028530508279800415,
0.09984825551509857,
-0.01684628427028656,
0.27692919969558716,
-0.12533454596996307,
0.08333584666252136,
-0.03562077134847641,
0.13913047313690186,
0.298753947019577,
0.7614890336990356,
0.23745892941951752,
-0.5431239604949951,
-0.005757888779044151,
0.11015188694000244,
0.07753019034862518,
0.22565677762031555,
-0.32051926851272583,
-0.3797542154788971,
-0.16923142969608307,
0.3277316093444824,
-0.30164697766304016,
0.1337345987558365,
0.299874484539032,
0.09269403666257858,
-0.43507468700408936,
-0.15107040107250214,
0.4931428134441376,
-0.1777917593717575,
-0.0023769885301589966,
0.13585110008716583,
0.37726324796676636,
-0.3474632501602173,
0.24302391707897186,
0.2573864758014679,
0.9395971894264221,
0.062067024409770966,
-0.08931565284729004,
0.3808135390281677,
-0.14638769626617432,
0.22137263417243958,
0.028597764670848846,
-0.11199221014976501,
-0.17580150067806244,
-0.2659814655780792,
-0.17387211322784424,
-0.07176531851291656,
0.5165039896965027,
0.24841657280921936,
-0.31447678804397583,
0.10180578380823135,
0.030700325965881348,
0.13874372839927673,
0.21433250606060028,
0.1373131424188614,
-0.21934610605239868,
-0.15549440681934357,
-0.3692060112953186,
0.037339918315410614,
-0.23975811898708344,
0.2930982708930969,
-0.18673941493034363,
-0.1082228273153305,
-0.12966707348823547,
-0.07160445302724838,
-0.24899567663669586,
0.03259075805544853,
-0.3099597096443176,
0.12229076027870178,
0.22404305636882782,
-0.4332478642463684,
0.36487284302711487,
0.39499151706695557,
0.2570035457611084,
-0.058524128049612045,
-0.27702024579048157,
0.00826217606663704,
-0.23120221495628357,
-0.02092495933175087,
-0.09924699366092682,
0.0028085410594940186,
0.2775878310203552,
-0.051156241446733475,
-0.22715610265731812,
-0.05376613885164261,
-0.047936223447322845,
-0.14336873590946198,
0.11892169713973999,
-0.07047438621520996,
-0.2516624927520752,
-0.4371068775653839,
-0.44916632771492004,
-0.3897339701652527,
0.2710980772972107,
-0.08992266654968262,
0.033738408237695694,
-0.01274947077035904,
-0.07676021754741669,
-0.18524223566055298,
0.07154139876365662,
-0.40529996156692505,
-0.011841755360364914,
0.3785400092601776,
-0.2286641001701355,
0.277008593082428,
0.45003917813301086,
0.049595657736063004,
-0.03918933868408203,
-0.018608715385198593,
0.1129363551735878,
0.14684893190860748,
-0.3210708498954773,
0.30109739303588867,
0.0021366060245782137,
-0.026525326073169708,
-0.12875986099243164,
0.4514789283275604,
0.39587467908859253,
0.011581815779209137,
0.1346995234489441,
-0.455692321062088,
-0.16607356071472168,
-0.13004107773303986,
0.15198007225990295,
0.2515975534915924,
0.4131394028663635,
-0.034363679587841034,
0.0037428252398967743,
-0.27350136637687683,
-0.18391422927379608,
0.011514104902744293,
-0.19934865832328796,
0.12075585871934891,
0.23362241685390472,
-0.04689681529998779,
0.0378207266330719,
0.007267957553267479,
-0.0384397953748703,
0.21630464494228363,
-0.0060398168861866,
-0.10256350785493851,
-0.14006397128105164,
0.19333061575889587,
0.13073739409446716,
-0.24507087469100952,
-0.1088961586356163,
-0.06698675453662872,
-0.2483835220336914,
-0.1154870018362999,
0.17572402954101562,
0.14916875958442688,
0.07842352241277695,
0.5542524456977844,
0.0239393450319767,
-0.045645877718925476,
-0.07751191407442093,
0.36782747507095337,
-0.0633992850780487,
0.3243539333343506,
-0.029816599562764168,
0.15927457809448242,
-0.07499289512634277,
-0.058259353041648865,
-0.2602550685405731,
0.19208934903144836,
0.1935022473335266,
-0.03970670700073242,
0.31609880924224854,
-0.37506425380706787,
0.21147873997688293,
0.0573008731007576,
0.38357624411582947,
0.168463334441185,
-0.465393602848053,
-0.0025186240673065186,
0.12141025066375732,
0.00963645800948143,
-0.2503688931465149,
-0.14762307703495026,
0.11496885120868683,
0.06260164827108383,
-0.16781790554523468,
0.25565430521965027,
-0.10721088945865631,
0.17220544815063477,
-0.1524653285741806,
-0.1437681019306183,
0.9165205955505371,
0.028453024104237556,
0.13694339990615845,
0.3519388437271118,
-0.1277158111333847,
0.34486475586891174,
0.21279320120811462,
0.41372525691986084,
0.12178047746419907,
0.35310184955596924,
-0.354056715965271,
-0.049610771238803864,
-0.07302004843950272,
0.36053428053855896,
0.15680545568466187,
-0.5144028663635254,
0.23452430963516235,
0.4054754376411438,
-0.1825522780418396,
-0.034350715577602386,
0.004795290529727936,
0.3416459560394287,
-0.1383606493473053,
-0.27964621782302856,
-0.2315165251493454,
0.1661193072795868,
-0.1712835133075714,
-0.0892573744058609,
-0.17634789645671844,
-0.023463066667318344,
-0.12233035266399384,
0.2845040559768677,
0.037778228521347046,
-0.30802202224731445,
0.03444855287671089,
0.32625430822372437,
-0.14545586705207825,
-0.4012099802494049,
-0.06413904577493668,
0.33034050464630127,
0.009136542677879333,
-0.2952631115913391,
0.33175384998321533,
0.022197283804416656,
-0.0816129744052887,
0.2708493173122406,
0.1901862919330597,
0.45741966366767883,
0.497823029756546,
0.03884158283472061,
0.17578637599945068,
-0.030976328998804092,
-0.13955838978290558,
0.07132752239704132,
0.2262548804283142,
0.04004814848303795,
0.3215502202510834,
0.39770060777664185,
0.03362152725458145,
0.0026356345042586327,
0.03761370852589607,
0.14522786438465118,
0.28250136971473694,
-0.5434118509292603,
0.0019608885049819946,
-0.3122715950012207,
-0.0015141218900680542,
-0.13867127895355225,
-0.02967388927936554,
-0.20256474614143372,
-0.24813397228717804,
0.38595739006996155,
-0.17153629660606384,
0.32769155502319336,
0.11470235139131546,
0.017446495592594147,
-0.19838020205497742,
0.4666054844856262,
0.19228535890579224,
0.04514921084046364,
-0.2389492392539978,
-0.0025840550661087036,
-0.5862951874732971,
-0.01344851404428482,
0.4541477560997009,
-0.15338751673698425,
0.24876242876052856,
-0.10152113437652588,
-0.20830965042114258,
0.24090519547462463,
0.07460717856884003,
0.21821154654026031,
0.1692897528409958,
0.09058067947626114,
-0.02396675944328308,
-0.30640971660614014,
-0.010119348764419556,
0.19676856696605682,
0.012622341513633728,
-0.28880080580711365,
0.1158781349658966,
-0.043912846595048904,
-0.13818016648292542,
-0.11122937500476837,
-0.05154988542199135,
-0.262643426656723,
-0.21272096037864685,
0.28811806440353394,
0.2083284705877304,
0.3400377333164215,
-0.07740750908851624,
0.3089675009250641,
0.12414897233247757,
0.03050466999411583,
-0.1719127744436264,
0.2646329402923584,
0.07141044735908508,
0.15916794538497925,
-0.13903576135635376,
0.14093135297298431,
-0.3936117887496948,
0.16282612085342407,
0.1969088762998581,
-0.13308560848236084,
-0.4735233783721924,
0.034538038074970245,
-0.09022893011569977,
-0.13154344260692596,
0.12113131582736969,
0.017939820885658264,
-0.08915457129478455,
0.35445675253868103,
-0.15617957711219788,
-0.30766209959983826,
0.619843602180481,
-0.3757404685020447,
-0.27667757868766785,
0.38360658288002014,
-0.07655642926692963,
0.11068423837423325,
-0.36907967925071716,
-0.31533679366111755,
0.045595549046993256,
0.3070685863494873,
-0.1727880835533142,
-0.201756551861763,
0.23500414192676544,
-0.03815632313489914,
0.13272516429424286,
-0.0016234740614891052,
0.47474226355552673,
0.256799578666687,
0.047608040273189545,
0.202274352312088,
-0.2498345673084259
] |
https://github.com/huggingface/datasets/issues/5388 | Getting Value Error while loading a dataset.. | > @valmetisrinivas you get that error because you imported `datasets` (and thus `fsspec`) before installing `zstandard`.
>
> Please, restart your Colab runtime and execute the install commands before importing `datasets`:
>
> ```python
> !pip install datasets
> !pip install zstandard
>
> from datasets import load_dataset
>
> ds = load_dataset(
> "json",
> data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst",
> split="train",
> streaming=True,
> )
> next(iter(ds))
> ```
I guess that was the problem, importing datasets before the installation of zstandard. Thank you for the feedback. | ### Describe the bug
I am trying to load a dataset using Hugging Face Datasets load_dataset method. I am getting the value error as show below. Can someone help with this? I am using Windows laptop and Google Colab notebook.
```
WARNING:datasets.builder:Using custom data configuration default-a1d9e8eaedd958cd
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-12-5b4fdcb8e6d5>](https://localhost:8080/#) in <module>
6 )
7
----> 8 next(iter(law_dataset_streamed))
17 frames
[/usr/local/lib/python3.8/dist-packages/fsspec/core.py](https://localhost:8080/#) in get_compression(urlpath, compression)
485 compression = infer_compression(urlpath)
486 if compression is not None and compression not in compr:
--> 487 raise ValueError("Compression type %s not supported" % compression)
488 return compression
489
ValueError: Compression type zstd not supported
```
### Steps to reproduce the bug
```
!pip install zstandard
from datasets import load_dataset
lds = load_dataset(
"json",
data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst",
split="train",
streaming=True,
)
```
### Expected behavior
I expect an iterable object as the output 'lds' to be created.
### Environment info
Windows laptop with Google Colab notebook | 85 | Getting Value Error while loading a dataset..
### Describe the bug
I am trying to load a dataset using Hugging Face Datasets load_dataset method. I am getting the value error as show below. Can someone help with this? I am using Windows laptop and Google Colab notebook.
```
WARNING:datasets.builder:Using custom data configuration default-a1d9e8eaedd958cd
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-12-5b4fdcb8e6d5>](https://localhost:8080/#) in <module>
6 )
7
----> 8 next(iter(law_dataset_streamed))
17 frames
[/usr/local/lib/python3.8/dist-packages/fsspec/core.py](https://localhost:8080/#) in get_compression(urlpath, compression)
485 compression = infer_compression(urlpath)
486 if compression is not None and compression not in compr:
--> 487 raise ValueError("Compression type %s not supported" % compression)
488 return compression
489
ValueError: Compression type zstd not supported
```
### Steps to reproduce the bug
```
!pip install zstandard
from datasets import load_dataset
lds = load_dataset(
"json",
data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst",
split="train",
streaming=True,
)
```
### Expected behavior
I expect an iterable object as the output 'lds' to be created.
### Environment info
Windows laptop with Google Colab notebook
> @valmetisrinivas you get that error because you imported `datasets` (and thus `fsspec`) before installing `zstandard`.
>
> Please, restart your Colab runtime and execute the install commands before importing `datasets`:
>
> ```python
> !pip install datasets
> !pip install zstandard
>
> from datasets import load_dataset
>
> ds = load_dataset(
> "json",
> data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst",
> split="train",
> streaming=True,
> )
> next(iter(ds))
> ```
I guess that was the problem, importing datasets before the installation of zstandard. Thank you for the feedback. | [
-0.45217618346214294,
-0.3022094964981079,
-0.018817532807588577,
0.5334210991859436,
0.29905641078948975,
0.07933398336172104,
0.38119950890541077,
0.02605338767170906,
0.12390193343162537,
0.24274203181266785,
-0.21303217113018036,
0.2835160195827484,
-0.16486546397209167,
0.29460984468460083,
-0.1853584200143814,
-0.10333371162414551,
0.05740778520703316,
0.2541045546531677,
0.17517831921577454,
0.19174058735370636,
-0.2646545171737671,
0.2914539575576782,
-0.32160815596580505,
0.10534615069627762,
-0.11778358370065689,
-0.2165689319372177,
0.029717234894633293,
0.20584768056869507,
-0.11589746922254562,
-0.4292343556880951,
0.3953778147697449,
-0.12506312131881714,
0.5914424657821655,
0.5147379040718079,
-0.00012461231381166726,
0.003061935305595398,
0.5299251675605774,
-0.1250849962234497,
-0.33650708198547363,
-0.3970363736152649,
-0.05345682427287102,
-0.14408203959465027,
-0.024424493312835693,
-0.0881941020488739,
-0.3563438355922699,
-0.08165999501943588,
-0.22198449075222015,
-0.305145263671875,
0.4931451678276062,
0.3449957072734833,
0.09844744950532913,
0.2907967269420624,
0.006185900419950485,
-0.09942447394132614,
0.17508575320243835,
-0.12796208262443542,
0.05076758563518524,
0.44221732020378113,
0.28016331791877747,
0.18543604016304016,
0.31410375237464905,
0.04006892442703247,
0.06659350544214249,
-0.19615627825260162,
0.23907485604286194,
0.17584548890590668,
0.15037842094898224,
-0.25114011764526367,
0.09042391180992126,
-0.01667696237564087,
0.6452344655990601,
-0.05929352343082428,
-0.2658458352088928,
-0.2148393988609314,
0.05792113021016121,
-0.2879997789859772,
0.31142061948776245,
0.2976841926574707,
-0.17243418097496033,
0.20182093977928162,
-0.2424796223640442,
0.09804610162973404,
-0.29846978187561035,
0.1827179491519928,
-0.050071313977241516,
-0.10204198956489563,
-0.32091420888900757,
0.23115471005439758,
0.2911420166492462,
-0.1467711329460144,
0.3204428255558014,
-0.12739019095897675,
0.02471054159104824,
0.16754485666751862,
-0.3248271048069,
-0.08482982218265533,
-0.15829142928123474,
0.10470838099718094,
0.08607316762208939,
-0.04956281930208206,
0.06079261004924774,
-0.19673186540603638,
0.14657066762447357,
0.22976785898208618,
0.4175308644771576,
0.07637615501880646,
0.13264963030815125,
-0.2660314440727234,
0.12494705617427826,
0.3017876446247101,
0.23469790816307068,
-0.17632535099983215,
-0.2398744374513626,
-0.3098602592945099,
0.1507551521062851,
-0.019474241882562637,
0.45732730627059937,
-0.12089554965496063,
-0.450872004032135,
0.029910411685705185,
-0.23170989751815796,
0.19515344500541687,
0.18580320477485657,
0.44156980514526367,
-0.02815394103527069,
-0.09548953920602798,
0.20410549640655518,
0.12066829204559326,
-0.059466466307640076,
-0.2280110865831375,
-0.05529123172163963,
0.03378519415855408,
-0.08727598935365677,
0.02281746082007885,
0.13889890909194946,
-0.6125895380973816,
0.13622280955314636,
0.23533590137958527,
0.1580987572669983,
-0.18371433019638062,
-0.2261645793914795,
-0.19270217418670654,
0.035655055195093155,
0.22993427515029907,
0.06143966689705849,
-0.09950956702232361,
0.09636399149894714,
-0.38191914558410645,
-0.19532424211502075,
0.404834508895874,
-0.4086014926433563,
-0.3555312752723694,
-0.16819897294044495,
0.034211963415145874,
-0.22008414566516876,
0.09123307466506958,
-0.18464162945747375,
0.12593992054462433,
0.29317235946655273,
-0.09548905491828918,
-0.006974563002586365,
-0.15941192209720612,
-0.44655001163482666,
-0.09999064356088638,
0.2754427194595337,
0.48684269189834595,
-0.5546772480010986,
-0.16213329136371613,
-0.1536993682384491,
-0.12022680044174194,
0.08608445525169373,
0.27383923530578613,
-0.340960830450058,
0.17502102255821228,
-0.22606131434440613,
-0.1411045491695404,
0.16388089954853058,
-0.13919872045516968,
-0.6276927590370178,
0.20026423037052155,
-0.016032323241233826,
0.19626057147979736,
-0.21074101328849792,
0.10498172789812088,
0.043551407754421234,
-0.13049308955669403,
0.26203522086143494,
0.2148847132921219,
-0.20289160311222076,
-0.08203712850809097,
-0.18957741558551788,
-0.1165190190076828,
0.43480581045150757,
0.2527197599411011,
-0.07066264748573303,
0.27128198742866516,
0.11902185529470444,
-0.1656751185655594,
-0.035777702927589417,
-0.07940565049648285,
-0.02491908334195614,
0.2830033600330353,
0.397945761680603,
0.03816932067275047,
-0.02963899075984955,
-0.21042314171791077,
-0.648939847946167,
0.22482949495315552,
-0.13366910815238953,
0.18720662593841553,
-0.17667879164218903,
-0.008128339424729347,
-0.3979228436946869,
0.15406790375709534,
-0.23963116109371185,
-0.07621446251869202,
-0.045189324766397476,
0.200576052069664,
-0.05568183213472366,
-0.1542884111404419,
-0.19483628869056702,
0.5918723940849304,
-0.14385168254375458,
0.0003352491185069084,
-0.486542284488678,
0.3087274730205536,
-0.14244885742664337,
-0.22854386270046234,
0.05962115526199341,
-0.08792614191770554,
0.3047909438610077,
-0.20631906390190125,
-0.23802593350410461,
0.39393025636672974,
-0.04639342799782753,
0.07039818167686462,
-0.2767311632633209,
-0.28439098596572876,
0.3050409257411957,
-0.41312915086746216,
-0.013951705768704414,
0.14842554926872253,
0.30567649006843567,
-0.003292698413133621,
0.21579155325889587,
0.3743221163749695,
-0.30873924493789673,
-0.0374784842133522,
-0.17924749851226807,
0.022232821211218834,
0.2377861738204956,
0.02943996712565422,
-0.22884540259838104,
-0.13262316584587097,
0.02953450009226799,
-0.05461013689637184,
0.3021448850631714,
0.14735156297683716,
-0.2757865786552429,
-0.26781582832336426,
0.27777421474456787,
-0.14466936886310577,
-0.07667957991361618,
0.4453200101852417,
0.1529424786567688,
-0.06859522312879562,
0.13528618216514587,
0.055308882147073746,
0.5858941674232483,
0.009518494829535484,
-0.34734463691711426,
0.2595570981502533,
0.14443789422512054,
0.0877051129937172,
0.16698020696640015,
-0.020648986101150513,
0.3491968512535095,
0.3287939727306366,
0.03959394991397858,
0.20675063133239746,
-0.1984674036502838,
-0.13440124690532684,
-0.02416405826807022,
0.17817316949367523,
-0.4251773953437805,
0.06884316354990005,
-0.047780487686395645,
-0.08297692984342575,
-0.09424667060375214,
-0.11087601631879807,
-0.27957019209861755,
0.14707538485527039,
-0.3712787628173828,
0.31535881757736206,
0.11555519700050354,
0.2137853503227234,
0.09132243692874908,
0.6646669507026672,
0.3099648356437683,
-0.2731208801269531,
-0.4044242799282074,
-0.058089692145586014,
-0.3533462584018707,
-0.12183670699596405,
-0.029231343418359756,
-0.24375803768634796,
0.31548839807510376,
-0.28014424443244934,
0.037098634988069534,
-0.13653509318828583,
-0.20864659547805786,
0.1571275293827057,
-0.129106342792511,
0.4838469624519348,
0.21943430602550507,
0.18753847479820251,
-0.0161012951284647,
-0.04575316607952118,
0.3437404930591583,
-0.3087882101535797,
-0.12438666075468063,
0.025293581187725067,
0.048035625368356705,
-0.12721021473407745,
-0.057707417756319046,
-0.0841081365942955,
-0.5402565598487854,
-0.21846340596675873,
-0.009148463606834412,
-0.0897713452577591,
0.03410668671131134,
0.35828185081481934,
0.20049349963665009,
-0.017541758716106415,
0.46649229526519775,
0.12449099868535995,
-0.23197180032730103,
-0.39008015394210815,
0.2355148047208786,
-0.24825042486190796,
-0.4682529866695404,
-0.05806725472211838,
0.0219728946685791,
0.006198391318321228,
0.16843004524707794,
-0.2022729218006134,
0.09749425947666168,
-0.30537205934524536,
0.11714476346969604,
-0.3390849530696869,
-0.16292962431907654,
0.17722943425178528,
0.13449923694133759,
0.1634816825389862,
-0.24631071090698242,
-0.5330938696861267,
0.04012509062886238,
0.15329237282276154,
0.38738295435905457,
0.5565825700759888,
0.4993171691894531,
-0.040017787367105484,
0.27421170473098755,
0.4406794309616089,
-0.19751837849617004,
0.5698298215866089,
-0.11467643827199936,
0.28953489661216736,
-0.22031867504119873,
-0.5950986742973328,
-0.2073204219341278,
-0.034885093569755554,
-0.27361688017845154,
0.131756991147995,
-0.1606861650943756,
0.01733293943107128,
-0.36772647500038147,
-0.14843977987766266,
-0.15423130989074707,
-0.051622577011585236,
-0.05038679391145706,
0.1304205358028412,
0.21717122197151184,
-0.20583656430244446,
-0.19813793897628784,
0.0063219815492630005,
-0.03511592745780945,
0.16011852025985718,
0.3093646168708801,
0.028160907328128815,
0.0631738230586052,
0.10374152660369873,
0.13278673589229584,
-0.339761346578598,
0.2883312702178955,
0.32605111598968506,
0.31743061542510986,
-0.1681261956691742,
0.26694926619529724,
0.032431066036224365,
-0.023198740556836128,
0.7497046589851379,
0.122003473341465,
0.331234872341156,
0.11293798685073853,
-0.2544805407524109,
-0.3914431631565094,
-0.024965178221464157,
-0.2796156108379364,
0.0974140539765358,
-0.056885022670030594,
0.6529510021209717,
-0.16551385819911957,
-0.11187809705734253,
0.22762499749660492,
-0.07480805367231369,
-0.15496622025966644,
-0.4010412395000458,
-0.13571564853191376,
-0.35995230078697205,
-0.3050118386745453,
-0.15298780798912048,
0.13143418729305267,
0.5621281862258911,
0.02110971137881279,
-0.07354111969470978,
-0.03834687918424606,
0.02770017459988594,
0.09728148579597473,
-0.015703478828072548,
0.27796950936317444,
-0.1232328787446022,
0.08361628651618958,
-0.03762432932853699,
0.13938820362091064,
0.29864558577537537,
0.759434700012207,
0.23795218765735626,
-0.5440037250518799,
-0.006065038964152336,
0.10889344662427902,
0.07906496524810791,
0.2238515466451645,
-0.32363101840019226,
-0.37747469544410706,
-0.1705784797668457,
0.3262249231338501,
-0.3008654713630676,
0.13226738572120667,
0.2954566180706024,
0.09655352681875229,
-0.4377077519893646,
-0.15243977308273315,
0.4923469126224518,
-0.17522910237312317,
-0.0043625980615615845,
0.13739943504333496,
0.37535983324050903,
-0.3493396043777466,
0.24057583510875702,
0.2611858546733856,
0.93692547082901,
0.05857671797275543,
-0.09116463363170624,
0.3812897503376007,
-0.14618587493896484,
0.22146451473236084,
0.029508091509342194,
-0.1081954836845398,
-0.17769299447536469,
-0.2656562328338623,
-0.17386890947818756,
-0.07167918980121613,
0.5162364840507507,
0.24828869104385376,
-0.3132631182670593,
0.10008849948644638,
0.03500150889158249,
0.14289072155952454,
0.2141997516155243,
0.1352730095386505,
-0.21825160086154938,
-0.1558365374803543,
-0.3675358295440674,
0.036867767572402954,
-0.24246080219745636,
0.29035359621047974,
-0.18920817971229553,
-0.10571334511041641,
-0.13111217319965363,
-0.07050098478794098,
-0.2508038878440857,
0.03134795278310776,
-0.3158749043941498,
0.12160008400678635,
0.22447912395000458,
-0.4352084994316101,
0.3669726848602295,
0.39728736877441406,
0.26102834939956665,
-0.056755516678094864,
-0.2786039710044861,
0.009580763056874275,
-0.23515865206718445,
-0.020156413316726685,
-0.09892530739307404,
0.003781203180551529,
0.2773684859275818,
-0.049293339252471924,
-0.22852468490600586,
-0.055182307958602905,
-0.0463903546333313,
-0.1479012370109558,
0.11984521150588989,
-0.07012918591499329,
-0.25434863567352295,
-0.43451622128486633,
-0.4470229744911194,
-0.3903558552265167,
0.27031368017196655,
-0.08952686935663223,
0.03279060497879982,
-0.01141665130853653,
-0.07353789359331131,
-0.18503129482269287,
0.0704319179058075,
-0.40480947494506836,
-0.01110650971531868,
0.3781263530254364,
-0.22771745920181274,
0.2754015028476715,
0.4501454532146454,
0.04794493690133095,
-0.03693999722599983,
-0.01892419159412384,
0.11289901286363602,
0.14133574068546295,
-0.31728097796440125,
0.30282050371170044,
0.003176797181367874,
-0.026474736630916595,
-0.1266886591911316,
0.4505663514137268,
0.3967188000679016,
0.011906195431947708,
0.13420134782791138,
-0.4566234052181244,
-0.16526605188846588,
-0.1295919269323349,
0.15067468583583832,
0.25093308091163635,
0.4104204773902893,
-0.03545603156089783,
0.0025014225393533707,
-0.27524760365486145,
-0.18237736821174622,
0.011804788373410702,
-0.19746732711791992,
0.1184004470705986,
0.23655670881271362,
-0.04591863602399826,
0.04006478190422058,
0.005452829413115978,
-0.03975032642483711,
0.21796777844429016,
-0.004858981817960739,
-0.10073746740818024,
-0.1390809714794159,
0.19356763362884521,
0.12943430244922638,
-0.24474190175533295,
-0.1121504157781601,
-0.07013478875160217,
-0.24658635258674622,
-0.11608484387397766,
0.17844216525554657,
0.14971983432769775,
0.07758568972349167,
0.553928792476654,
0.019189510494470596,
-0.04125141352415085,
-0.0768124982714653,
0.3697168529033661,
-0.06484383344650269,
0.3263012170791626,
-0.02802162431180477,
0.15775786340236664,
-0.07352905720472336,
-0.05707219988107681,
-0.26178061962127686,
0.1922975480556488,
0.19081483781337738,
-0.041224971413612366,
0.31719377636909485,
-0.37474697828292847,
0.20950248837471008,
0.05654188245534897,
0.3812980651855469,
0.16503256559371948,
-0.4637306034564972,
-0.0033976640552282333,
0.1238405629992485,
0.007991516031324863,
-0.24970842897891998,
-0.14541170001029968,
0.11375650763511658,
0.05893249809741974,
-0.1689441204071045,
0.2569323480129242,
-0.10412094742059708,
0.1731964647769928,
-0.15501470863819122,
-0.14521387219429016,
0.9160259962081909,
0.029721206054091454,
0.1357141137123108,
0.35177886486053467,
-0.12706170976161957,
0.3474562466144562,
0.21404077112674713,
0.41347500681877136,
0.12011265754699707,
0.35377854108810425,
-0.35355833172798157,
-0.05180851370096207,
-0.07436912506818771,
0.36243772506713867,
0.15926581621170044,
-0.5145086646080017,
0.23600076138973236,
0.4067195951938629,
-0.1858939528465271,
-0.03423018753528595,
0.0036462321877479553,
0.34047141671180725,
-0.14246942102909088,
-0.2783551514148712,
-0.2328193336725235,
0.16251611709594727,
-0.17159128189086914,
-0.08747932314872742,
-0.1761954128742218,
-0.02287706732749939,
-0.12265908718109131,
0.28570279479026794,
0.03726550191640854,
-0.3080063462257385,
0.03231869637966156,
0.3254724144935608,
-0.14739003777503967,
-0.39822348952293396,
-0.06074320524930954,
0.3316977024078369,
0.007699295878410339,
-0.29463449120521545,
0.33019939064979553,
0.014365069568157196,
-0.08080440759658813,
0.272174209356308,
0.19003134965896606,
0.454150527715683,
0.49656569957733154,
0.039324596524238586,
0.17589806020259857,
-0.03054753690958023,
-0.13586737215518951,
0.07181721180677414,
0.22525468468666077,
0.04243415594100952,
0.32202836871147156,
0.3963799476623535,
0.03181483596563339,
0.004776940681040287,
0.040830742567777634,
0.14691030979156494,
0.28396838903427124,
-0.5432472229003906,
0.00019118934869766235,
-0.3119228780269623,
0.00028368085622787476,
-0.14056749641895294,
-0.028682373464107513,
-0.20075923204421997,
-0.25109848380088806,
0.3877699673175812,
-0.17272473871707916,
0.3267327845096588,
0.11654212325811386,
0.016254618763923645,
-0.19714407622814178,
0.4673239290714264,
0.1945587545633316,
0.04303882643580437,
-0.23634976148605347,
-0.00483713299036026,
-0.5881170034408569,
-0.013906441628932953,
0.45533788204193115,
-0.15284763276576996,
0.2493007630109787,
-0.1003265306353569,
-0.20694804191589355,
0.24100908637046814,
0.07376137375831604,
0.21875566244125366,
0.16935984790325165,
0.08675438165664673,
-0.024536849930882454,
-0.3075774610042572,
-0.011647969484329224,
0.19549381732940674,
0.011809621006250381,
-0.2885333001613617,
0.11648007482290268,
-0.04271688312292099,
-0.14006391167640686,
-0.11368303000926971,
-0.05029362440109253,
-0.2643953561782837,
-0.21250402927398682,
0.2913995385169983,
0.20723992586135864,
0.33699578046798706,
-0.07663754373788834,
0.3084641695022583,
0.12574349343776703,
0.03080914169549942,
-0.17182090878486633,
0.26546669006347656,
0.07167570292949677,
0.16005466878414154,
-0.13554920256137848,
0.1424286812543869,
-0.39203935861587524,
0.16423000395298004,
0.19728530943393707,
-0.13394346833229065,
-0.47258898615837097,
0.03393586724996567,
-0.09143488109111786,
-0.1314716786146164,
0.12005484104156494,
0.019639059901237488,
-0.08887670934200287,
0.3544241189956665,
-0.15662133693695068,
-0.3053693175315857,
0.6177425384521484,
-0.3762402832508087,
-0.2739502787590027,
0.38503313064575195,
-0.07668524980545044,
0.11103598773479462,
-0.3671801686286926,
-0.312669962644577,
0.044525258243083954,
0.30824169516563416,
-0.17356616258621216,
-0.20013746619224548,
0.2354360818862915,
-0.036268047988414764,
0.1330384761095047,
-0.0012852847576141357,
0.47130048274993896,
0.25514477491378784,
0.048893868923187256,
0.19966499507427216,
-0.2487165480852127
] |
https://github.com/huggingface/datasets/issues/5387 | Missing documentation page : improve-performance | Hi! Our documentation builder does not support links to sections, hence the bug. This is the link it should point to https://huggingface.co/docs/datasets/v2.8.0/en/cache#improve-performance. | ### Describe the bug
Trying to access https://huggingface.co/docs/datasets/v2.8.0/en/package_reference/cache#improve-performance, the page is missing.
The link is in here : https://huggingface.co/docs/datasets/v2.8.0/en/package_reference/loading_methods#datasets.load_dataset.keep_in_memory
### Steps to reproduce the bug
Access the page and see it's missing.
### Expected behavior
Not missing page
### Environment info
Doesn't matter | 22 | Missing documentation page : improve-performance
### Describe the bug
Trying to access https://huggingface.co/docs/datasets/v2.8.0/en/package_reference/cache#improve-performance, the page is missing.
The link is in here : https://huggingface.co/docs/datasets/v2.8.0/en/package_reference/loading_methods#datasets.load_dataset.keep_in_memory
### Steps to reproduce the bug
Access the page and see it's missing.
### Expected behavior
Not missing page
### Environment info
Doesn't matter
Hi! Our documentation builder does not support links to sections, hence the bug. This is the link it should point to https://huggingface.co/docs/datasets/v2.8.0/en/cache#improve-performance. | [
-0.0404958538711071,
-0.17207591235637665,
-0.08690676093101501,
0.48534655570983887,
0.10513737797737122,
0.37189891934394836,
0.02101120352745056,
0.23381856083869934,
0.04772822931408882,
0.21724505722522736,
0.008832949213683605,
0.1380598098039627,
0.045830219984054565,
-0.1787082552909851,
0.5689287185668945,
-0.30097195506095886,
0.12729400396347046,
0.1444610059261322,
0.18105614185333252,
0.16107705235481262,
-0.13391906023025513,
0.06255068629980087,
-0.2988106608390808,
-0.1349426507949829,
-0.18781135976314545,
0.06310708820819855,
-0.07652484625577927,
0.3070324957370758,
0.024816688150167465,
-0.7000814080238342,
0.15599505603313446,
-0.11088995635509491,
-0.06862370669841766,
0.2706059515476227,
-0.00010933067824225873,
0.06771957874298096,
0.43964719772338867,
0.17021246254444122,
-0.45884329080581665,
0.058763131499290466,
-0.13439396023750305,
-0.13468554615974426,
0.020866811275482178,
-0.057056546211242676,
-0.12184091657400131,
0.03465680032968521,
0.07338801771402359,
-0.12057788670063019,
0.11202286928892136,
0.15030881762504578,
0.24589815735816956,
0.4300062656402588,
0.3364185392856598,
-0.12616227567195892,
0.31039246916770935,
0.052834056317806244,
-0.11461879312992096,
0.39938992261886597,
0.16803056001663208,
0.046763427555561066,
-0.2313012182712555,
0.5430068969726562,
-0.009224237874150276,
-0.07972145080566406,
0.3354596495628357,
0.1405429095029831,
-0.20361027121543884,
-0.03387382626533508,
0.32733237743377686,
0.02759142592549324,
0.5858364105224609,
-0.1438440978527069,
-0.36131778359413147,
-0.21171164512634277,
-0.1978939026594162,
-0.19109712541103363,
0.28020069003105164,
0.006199354771524668,
0.02118825539946556,
0.15573595464229584,
-0.1160564050078392,
-0.4860433340072632,
-0.1393343210220337,
0.13073992729187012,
0.2492409646511078,
-0.15824995934963226,
-0.23114626109600067,
-0.1415313482284546,
0.27547329664230347,
-0.026848722249269485,
-0.09022729098796844,
0.19246497750282288,
-0.18608318269252777,
0.4425700902938843,
0.11208667606115341,
0.12880942225456238,
0.426077663898468,
0.2729646861553192,
0.4061204791069031,
-0.06595069915056229,
-0.1764419823884964,
-0.0013980790972709656,
-0.0045084827579557896,
0.0965869128704071,
0.048242561519145966,
0.3199305534362793,
-0.048113368451595306,
-0.07063580304384232,
0.24778498709201813,
0.46677687764167786,
0.056126873940229416,
-0.14685511589050293,
0.07650987803936005,
-0.20853102207183838,
0.25949469208717346,
-0.36687108874320984,
-0.029231727123260498,
-0.3638656735420227,
-0.25228655338287354,
0.20204544067382812,
0.13918456435203552,
-0.08451839536428452,
0.06135465204715729,
0.42849355936050415,
0.044376157224178314,
-0.12501388788223267,
0.16068127751350403,
-0.08195918798446655,
-0.40879687666893005,
-0.14507640898227692,
-0.37218931317329407,
0.2512236535549164,
-0.3830164074897766,
0.3044925034046173,
0.12060454487800598,
-0.27246004343032837,
0.45655232667922974,
-0.019772298634052277,
-0.07388554513454437,
-0.23335827887058258,
-0.22402116656303406,
0.08833958208560944,
-0.022016122937202454,
0.2718490660190582,
0.04145515337586403,
-0.09950878471136093,
0.19579987227916718,
-0.001043993979692459,
-0.08719009906053543,
-0.1266632378101349,
-0.30886614322662354,
-0.4896022081375122,
-0.12137259542942047,
0.15548139810562134,
0.14518988132476807,
0.02085236832499504,
-0.09779480844736099,
0.20980921387672424,
0.11447279155254364,
-0.18853908777236938,
0.01561051607131958,
0.49525976181030273,
-0.29106372594833374,
-0.15197494626045227,
0.3579029440879822,
0.5809882283210754,
0.19551023840904236,
-0.28422683477401733,
0.06596779823303223,
-0.0011901091784238815,
-0.031267039477825165,
0.216934934258461,
-0.25378456711769104,
0.12680116295814514,
-0.4345994293689728,
-0.0645175576210022,
0.33681976795196533,
-0.47507092356681824,
-0.3110308051109314,
0.20235420763492584,
-0.10672364383935928,
0.05353880673646927,
-0.10091014951467514,
-0.22138234972953796,
-0.07009433209896088,
0.009717526845633984,
0.25809407234191895,
-0.25801074504852295,
0.12866845726966858,
0.09757912904024124,
-0.3538064658641815,
-0.1284828931093216,
0.03415505588054657,
-0.021643057465553284,
0.016888413578271866,
0.1296331137418747,
0.054048649966716766,
0.10899865627288818,
0.290132611989975,
0.01402457058429718,
0.03752245754003525,
0.6634983420372009,
0.19077208638191223,
0.10859119892120361,
0.08819591253995895,
-0.2298118770122528,
-0.42564284801483154,
0.18401098251342773,
-0.020665252581238747,
-0.02399994432926178,
0.17171542346477509,
-0.09786003828048706,
-0.3700787425041199,
-0.027510639280080795,
0.05746755003929138,
-0.5570553541183472,
0.14814025163650513,
0.0646604672074318,
0.2565491795539856,
0.22401390969753265,
-0.2259090691804886,
0.1798100769519806,
-0.18672333657741547,
0.25310468673706055,
-0.21327568590641022,
0.17711207270622253,
-0.003818223252892494,
-0.08375819027423859,
0.09387247264385223,
0.16187871992588043,
0.18463820219039917,
0.056722767651081085,
-0.2331903874874115,
0.3526771068572998,
0.07771303504705429,
0.3034780025482178,
0.2136026918888092,
0.2455434501171112,
0.25314924120903015,
-0.30551567673683167,
0.1866452991962433,
0.006251576356589794,
-0.027953889220952988,
0.06814990192651749,
-0.24811235070228577,
-0.060053229331970215,
-0.023213837295770645,
0.2422717809677124,
0.26295948028564453,
0.08030980825424194,
0.13390421867370605,
-0.019663706421852112,
0.03257307410240173,
-0.30246472358703613,
0.39897099137306213,
-0.20340299606323242,
0.5814948678016663,
0.04961048811674118,
-0.28664764761924744,
0.2492961585521698,
0.25958216190338135,
0.11400443315505981,
-0.17893433570861816,
0.27595993876457214,
-0.248011976480484,
-0.3090187609195709,
0.2996523380279541,
-0.09307979792356491,
0.21400690078735352,
0.19133755564689636,
0.2292104959487915,
0.18484966456890106,
-0.015226454474031925,
-0.05171002447605133,
0.17042231559753418,
-0.11244556307792664,
0.05057676509022713,
-0.10853909701108932,
-0.03239813074469566,
0.11185707151889801,
-0.2179727852344513,
0.009418319910764694,
-0.2634715437889099,
0.13124381005764008,
-0.3694324493408203,
-0.11052391678094864,
-0.04154522344470024,
-0.3074091672897339,
-0.18453069031238556,
-0.15409183502197266,
-0.2983141839504242,
-0.2097778469324112,
-0.1510878950357437,
0.1347002238035202,
-0.11304940283298492,
0.06725986301898956,
-0.23393720388412476,
0.25636932253837585,
-0.06351805478334427,
0.09091362357139587,
-0.30615124106407166,
0.059940993785858154,
-0.2832508683204651,
-0.020092206075787544,
0.09872141480445862,
-0.003500586375594139,
0.1726178079843521,
-0.39480167627334595,
0.0030379965901374817,
-0.5699425339698792,
-0.37965965270996094,
0.19112630188465118,
0.09936138987541199,
0.2575426995754242,
0.16255317628383636,
0.16523653268814087,
-0.07351452112197876,
-0.1431567221879959,
0.2998252213001251,
-0.20594064891338348,
-0.20687703788280487,
-0.19195334613323212,
0.07577098160982132,
0.07590692490339279,
-0.05448393151164055,
-0.23312780261039734,
0.18953697383403778,
-0.3116651773452759,
0.31722134351730347,
-0.16767871379852295,
-0.008008591830730438,
0.12040433287620544,
-0.06526575982570648,
0.3914007544517517,
-0.13582949340343475,
0.3963833153247833,
-0.3973143398761749,
-0.6248906254768372,
0.055820487439632416,
-0.3769304156303406,
-0.4036175012588501,
-0.0002179965376853943,
0.08031915873289108,
0.4923989474773407,
-0.04611952230334282,
-0.6369468569755554,
0.21353285014629364,
-0.22552378475666046,
0.00643104687333107,
-0.1705140769481659,
0.15492667257785797,
0.352883905172348,
-0.017026538029313087,
-0.1030198261141777,
-0.15865495800971985,
-0.3156225085258484,
-0.26967060565948486,
-0.35237547755241394,
0.3610028326511383,
-0.1752985119819641,
0.29029497504234314,
0.20565955340862274,
0.6154572367668152,
0.33186542987823486,
0.33082956075668335,
0.11475683748722076,
-0.05717972666025162,
0.494060218334198,
-0.26619839668273926,
-0.3368834853172302,
0.1461411863565445,
-0.12965700030326843,
-0.2359931319952011,
0.24307800829410553,
0.3509926199913025,
-0.2443123608827591,
-0.2981533706188202,
-0.4667086601257324,
-0.19926932454109192,
-0.2814691960811615,
-0.1273740977048874,
-0.12097853422164917,
0.3738657236099243,
0.21242326498031616,
0.21775922179222107,
-0.3017515242099762,
-0.04087115824222565,
0.176600843667984,
0.5163383483886719,
0.417354553937912,
0.10771405696868896,
-0.14126363396644592,
0.12140367180109024,
-0.5344091653823853,
0.04086098074913025,
0.03651814162731171,
0.07470071315765381,
-0.12163709104061127,
-0.030047891661524773,
0.13148237764835358,
0.02457701414823532,
0.3247418999671936,
0.07241831719875336,
0.20286405086517334,
0.09545682370662689,
-0.21084220707416534,
-0.2584071159362793,
0.13348780572414398,
0.1947212666273117,
0.2191510945558548,
0.16548430919647217,
0.3097074627876282,
-0.3422679603099823,
-0.2968563735485077,
0.32252904772758484,
-0.19177863001823425,
-0.07033870369195938,
-0.1215919777750969,
-0.2912336587905884,
-0.07398082315921783,
-0.1035238727927208,
0.04561728984117508,
0.05684404820203781,
0.07911050319671631,
0.09022604674100876,
-0.03318566456437111,
0.05567340552806854,
0.06249389052391052,
-0.10699938237667084,
-0.021865837275981903,
0.39859744906425476,
-0.1287587434053421,
0.2359444797039032,
0.516129732131958,
0.13774704933166504,
0.2863790988922119,
0.22909250855445862,
-0.19154149293899536,
-0.24465686082839966,
-0.04847951978445053,
0.04978671297430992,
0.2041175663471222,
0.2637416422367096,
-0.0678042396903038,
0.10005700588226318,
0.32713523507118225,
0.03685205802321434,
-0.4484024941921234,
-0.14744862914085388,
0.22384223341941833,
0.11096760630607605,
-0.09683015197515488,
-0.3193165063858032,
0.5945950746536255,
0.20732994377613068,
0.003457963466644287,
0.5734379291534424,
0.40573352575302124,
-0.2714413106441498,
-0.06419312953948975,
0.04172242060303688,
0.8971647024154663,
0.2139393538236618,
0.23064924776554108,
0.1943136751651764,
-0.4354284405708313,
0.286526083946228,
-0.07591506093740463,
0.1706262230873108,
-0.2291279286146164,
-0.1998155564069748,
-0.0064227525144815445,
-0.17364147305488586,
0.08144786208868027,
-0.18265344202518463,
-0.08583120256662369,
0.16630472242832184,
-0.08338613063097,
0.28357192873954773,
0.03343784064054489,
0.06295252591371536,
-0.18364375829696655,
-0.20657707750797272,
-0.3983684778213501,
0.17300188541412354,
0.041773613542318344,
0.41258135437965393,
-0.2975810766220093,
-0.016604624688625336,
-0.017929982393980026,
-0.18003210425376892,
-0.48442065715789795,
-0.12084013968706131,
-0.01795514114201069,
0.17404727637767792,
0.20625457167625427,
-0.27115345001220703,
0.015612762421369553,
0.15913012623786926,
0.13825514912605286,
0.153252512216568,
-0.5758630037307739,
0.15820914506912231,
-0.17852619290351868,
-0.1519290953874588,
-0.022458713501691818,
0.03590920567512512,
0.37541380524635315,
-0.10213659703731537,
-0.1671421378850937,
0.05656244605779648,
-0.46120235323905945,
-0.2860792875289917,
-0.03593859821557999,
-0.03204105794429779,
-0.38286536931991577,
-0.22978517413139343,
-0.15012259781360626,
0.08479954302310944,
0.10156716406345367,
-0.2595549523830414,
0.20493414998054504,
0.21605369448661804,
-0.11085639894008636,
-0.11971751600503922,
0.35135185718536377,
-0.048088524490594864,
-0.05837958678603172,
0.474509596824646,
-0.19642958045005798,
-0.14926940202713013,
0.22885090112686157,
-0.04822573810815811,
-0.41327202320098877,
-0.14068913459777832,
-0.1774003505706787,
0.28849855065345764,
-0.1232229620218277,
0.14214685559272766,
-0.055356599390506744,
0.2671220898628235,
-0.061146654188632965,
-0.06311124563217163,
0.20384930074214935,
-0.0674516037106514,
0.02680334821343422,
-0.32704392075538635,
-0.5048418045043945,
0.371806263923645,
-0.4001401364803314,
0.13360488414764404,
-0.14770323038101196,
-0.02535180374979973,
0.08188651502132416,
0.008463893085718155,
-0.35677480697631836,
0.10464723408222198,
-0.35440579056739807,
-0.15012933313846588,
0.291995644569397,
0.045052606612443924,
0.18991149961948395,
0.0006730491295456886,
0.06753101199865341,
0.13178464770317078,
-0.0856863334774971,
-0.17345330119132996,
-0.19395464658737183,
0.10862141102552414,
-0.2886778712272644,
-0.07118449360132217,
0.1299126148223877,
0.05876294523477554,
-0.026858169585466385,
-0.09358358383178711,
0.28376638889312744,
0.07655796408653259,
0.11527074873447418,
-0.06871920824050903,
-0.1007755845785141,
0.2241535484790802,
-0.0887523964047432,
0.26990532875061035,
0.0984625443816185,
0.2990160584449768,
0.01083037443459034,
-0.1467294692993164,
-0.4238899350166321,
-0.016762785613536835,
0.2523275911808014,
0.13067349791526794,
-0.01394025981426239,
0.05234841629862785,
0.2872474491596222,
-0.12916620075702667,
-0.037316467612981796,
0.049900803714990616,
0.2593287229537964,
0.09721875935792923,
-0.0869281068444252,
0.29913273453712463,
0.13868018984794617,
0.20045726001262665,
-0.10940460115671158,
-0.10628990828990936,
0.010160528123378754,
-0.14840243756771088,
0.025325018912553787,
0.000051937997341156006,
0.28308922052383423,
0.10543961822986603,
0.2667398452758789,
0.15759265422821045,
0.23940283060073853,
-0.18267673254013062,
0.0011719709727913141,
-0.023452166467905045,
-0.0062295980751514435,
0.042443953454494476,
0.26999080181121826,
0.2449781745672226,
0.198801189661026,
0.03616718202829361,
0.07365380972623825,
0.20001542568206787,
-0.15853634476661682,
0.5118129253387451,
-0.22686710953712463,
-0.1556803584098816,
-0.20925889909267426,
0.26454973220825195,
-0.1326187700033188,
-0.08674856275320053,
-0.4159502387046814,
0.4960772395133972,
0.05368657037615776,
-0.07221300899982452,
-0.038752827793359756,
0.24320809543132782,
-0.18146225810050964,
-0.1732570379972458,
0.3763866722583771,
-0.18948471546173096,
-0.005586259067058563,
0.04901343956589699,
0.16641873121261597,
-0.17612650990486145,
0.13418607413768768,
-0.2494080513715744,
0.06406661123037338,
-0.27400609850883484,
0.11510694026947021,
0.40024682879447937,
0.2234509289264679,
-0.10706233233213425,
0.17863227427005768,
-0.21605761349201202,
-0.19008296728134155,
-0.1795824021100998,
0.45844241976737976,
0.357671320438385,
-0.010801807045936584,
0.15237611532211304,
-0.27393022179603577,
0.02212846651673317,
-0.00160912424325943,
-0.05473215505480766,
0.18060362339019775,
0.004856094717979431,
-0.24948082864284515,
0.07508018612861633,
0.10551232099533081,
-0.18962477147579193,
0.22897693514823914,
-0.11437913775444031,
0.27418702840805054,
-0.3633289337158203,
-0.02679751068353653,
-0.3067156672477722,
-0.09195616096258163,
-0.2689343988895416,
-0.035076312720775604,
-0.10900421440601349,
0.1949472427368164,
0.20655426383018494,
-0.03125317767262459,
-0.03968794643878937,
0.01624922826886177,
0.10862056910991669,
0.3043110966682434,
0.4866752624511719,
0.3649958670139313,
0.3007485568523407,
-0.0934186801314354,
-0.6641713380813599,
-0.5562103986740112,
0.06916984170675278,
-0.11647294461727142,
0.049811653792858124,
0.24677106738090515,
0.13508087396621704,
-0.5133185982704163,
-0.046483151614665985,
0.4923589825630188,
-0.08274051547050476,
0.24454304575920105,
-0.25299105048179626,
-0.24352802336215973,
-0.06848657131195068,
-0.08715923130512238,
-0.05029129981994629,
0.01177142933011055,
-0.04573410004377365,
0.11910353600978851,
0.11926105618476868,
-0.0014646761119365692,
-0.12395785748958588,
0.389332115650177,
-0.1161523163318634,
0.25608521699905396,
0.4737150967121124,
0.029282964766025543,
0.07117772102355957,
-0.06430769711732864,
-0.42040473222732544,
-0.4740113615989685,
-0.24533648788928986,
0.10711399465799332,
0.11634901911020279,
-0.10090963542461395,
0.17296624183654785,
-0.2876746356487274,
-0.5068733096122742,
-0.26662299036979675,
0.4675063192844391,
0.30230283737182617,
-0.2092912495136261,
-0.3182580769062042,
0.22313547134399414,
-0.09390191733837128,
0.03591974452137947,
0.45725584030151367,
0.3744122087955475,
-0.11274811625480652,
0.11853539943695068,
-0.2976769208908081,
-0.320146381855011,
0.5526145696640015,
-0.29704591631889343,
-0.02503274939954281,
0.05486118793487549,
0.3059283494949341,
0.3554061949253082,
-0.6410781741142273,
-0.7695668935775757,
-0.20511199533939362,
0.2355332374572754,
0.2715190351009369,
-0.28844112157821655,
0.19578824937343597,
-0.18024098873138428,
0.22564448416233063,
0.03407028689980507,
0.553992509841919,
0.19021666049957275,
-0.004870720207691193,
0.23461613059043884,
-0.06679725646972656
] |
https://github.com/huggingface/datasets/issues/5386 | `max_shard_size` in `datasets.push_to_hub()` breaks with large files | Hi!
This behavior stems from the fact that we don't always embed image bytes in the underlying arrow table, which can lead to bad size estimation (we use the first 1000 table rows to [estimate](https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/arrow_dataset.py#L4627) the external file size). We plan to address this in the next major release by always embedding external bytes. In the meantime, you can either shuffle the dataset with `.shuffle().flatten_indices()` to make the estimation more precise or embed the bytes in the table like so:
```python
from datasets.table import embed_table_storage
format = ds.format
ds = ds.with_format("arrow")
ds = ds.map(embed_table_storage, batched=True)
ds = ds.with_format(**format)
...
ds.push_to_hub(...)
``` | ### Describe the bug
`max_shard_size` parameter for `datasets.push_to_hub()` works unreliably with large files, generating shard files that are way past the specified limit.
In my private dataset, which contains unprocessed images of all sizes (up to `~100MB` per file), I've encountered cases where `max_shard_size='100MB'` results in shard files that are `>2GB` in size. Setting `max_shard_size` to another value, such as `1GB` or `500MB` does not fix this problem.
**The real problem is this:** When the shard file size grows too big, the entire dataset breaks because of #4721 and ultimately https://issues.apache.org/jira/browse/ARROW-5030. Since `max_shard_size` does not let one accurately control the size of the shard files, it becomes very easy to build a large dataset without any warnings that it will be broken -- even when you think you are mitigating this problem by setting `max_shard_size`.
```
File " /path/to/sd-test-suite-v1/venv/lib/site-packages/datasets/builder.py", line 1763, in _prepare_split_single
for _, table in generator:
File " /path/to/sd-test-suite-v1/venv/lib/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables
for batch_idx, record_batch in enumerate(
File "pyarrow/_parquet.pyx", line 1323, in iter_batches
File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Nested data conversions not implemented for chunked array outputs
```
### Steps to reproduce the bug
1. Clone [example repo](https://github.com/salieri/hf-dataset-shard-size-bug)
2. Follow steps in [README.md](https://github.com/salieri/hf-dataset-shard-size-bug/blob/main/README.md)
3. After uploading the dataset, you will see that the shard file size varies between `30MB` and `200MB` -- way beyond the `max_shard_size='75MB'` limit (example: `train-00003-of-00131...` is `155MB` in [here](https://huggingface.co/datasets/slri/shard-size-test/tree/main/data))
(Note that this example repo does not generate shard files that are so large that they would trigger #4721)
### Expected behavior
The shard file size should remain below or equal to `max_shard_size`.
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.10.157-139.675.amzn2.aarch64-aarch64-with-glibc2.17
- Python version: 3.7.15
- PyArrow version: 10.0.1
- Pandas version: 1.3.5 | 101 | `max_shard_size` in `datasets.push_to_hub()` breaks with large files
### Describe the bug
`max_shard_size` parameter for `datasets.push_to_hub()` works unreliably with large files, generating shard files that are way past the specified limit.
In my private dataset, which contains unprocessed images of all sizes (up to `~100MB` per file), I've encountered cases where `max_shard_size='100MB'` results in shard files that are `>2GB` in size. Setting `max_shard_size` to another value, such as `1GB` or `500MB` does not fix this problem.
**The real problem is this:** When the shard file size grows too big, the entire dataset breaks because of #4721 and ultimately https://issues.apache.org/jira/browse/ARROW-5030. Since `max_shard_size` does not let one accurately control the size of the shard files, it becomes very easy to build a large dataset without any warnings that it will be broken -- even when you think you are mitigating this problem by setting `max_shard_size`.
```
File " /path/to/sd-test-suite-v1/venv/lib/site-packages/datasets/builder.py", line 1763, in _prepare_split_single
for _, table in generator:
File " /path/to/sd-test-suite-v1/venv/lib/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables
for batch_idx, record_batch in enumerate(
File "pyarrow/_parquet.pyx", line 1323, in iter_batches
File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Nested data conversions not implemented for chunked array outputs
```
### Steps to reproduce the bug
1. Clone [example repo](https://github.com/salieri/hf-dataset-shard-size-bug)
2. Follow steps in [README.md](https://github.com/salieri/hf-dataset-shard-size-bug/blob/main/README.md)
3. After uploading the dataset, you will see that the shard file size varies between `30MB` and `200MB` -- way beyond the `max_shard_size='75MB'` limit (example: `train-00003-of-00131...` is `155MB` in [here](https://huggingface.co/datasets/slri/shard-size-test/tree/main/data))
(Note that this example repo does not generate shard files that are so large that they would trigger #4721)
### Expected behavior
The shard file size should remain below or equal to `max_shard_size`.
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.10.157-139.675.amzn2.aarch64-aarch64-with-glibc2.17
- Python version: 3.7.15
- PyArrow version: 10.0.1
- Pandas version: 1.3.5
Hi!
This behavior stems from the fact that we don't always embed image bytes in the underlying arrow table, which can lead to bad size estimation (we use the first 1000 table rows to [estimate](https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/arrow_dataset.py#L4627) the external file size). We plan to address this in the next major release by always embedding external bytes. In the meantime, you can either shuffle the dataset with `.shuffle().flatten_indices()` to make the estimation more precise or embed the bytes in the table like so:
```python
from datasets.table import embed_table_storage
format = ds.format
ds = ds.with_format("arrow")
ds = ds.map(embed_table_storage, batched=True)
ds = ds.with_format(**format)
...
ds.push_to_hub(...)
``` | [
-0.43253472447395325,
-0.17858906090259552,
0.032033924013376236,
0.30755358934402466,
-0.0419180765748024,
-0.23482638597488403,
0.19890174269676208,
0.4464373290538788,
-0.2880842089653015,
0.1801431030035019,
0.17171980440616608,
0.05644378438591957,
-0.094880610704422,
0.003277583047747612,
0.056167036294937134,
0.054958753287792206,
0.12811404466629028,
-0.05040895938873291,
0.026054557412862778,
0.12203221023082733,
-0.2732996344566345,
-0.051543496549129486,
0.0378216877579689,
-0.0242396742105484,
-0.3334779143333435,
0.020201852545142174,
0.05163342505693436,
0.3244312107563019,
-0.15440882742404938,
-0.14095816016197205,
-0.02508370950818062,
-0.12566399574279785,
-0.11092314124107361,
0.3246384263038635,
-0.00012302440882194787,
-0.015940364450216293,
0.519879162311554,
-0.0746130496263504,
-0.1013576090335846,
0.2650933265686035,
-0.27315518260002136,
-0.41299232840538025,
-0.4559575021266937,
-0.24703171849250793,
0.4402824938297272,
0.015326552093029022,
-0.12765730917453766,
0.17246891558170319,
0.11669263243675232,
0.3248290419578552,
0.10543513298034668,
0.09778010845184326,
0.3480185568332672,
-0.00636607501655817,
0.7390937209129333,
0.07589951902627945,
-0.19563734531402588,
-0.08392764627933502,
0.27101224660873413,
0.2860497236251831,
-0.543869137763977,
-0.16984626650810242,
0.10636439919471741,
-0.1480276882648468,
0.17773620784282684,
-0.13192106783390045,
-0.0271993950009346,
-0.10148854553699493,
0.24019014835357666,
0.35743236541748047,
-0.073146753013134,
-0.4665369689464569,
-0.21256615221500397,
-0.439019113779068,
-0.2328869104385376,
-0.40099290013313293,
0.19504550099372864,
0.41953930258750916,
-0.23864121735095978,
0.04966261610388756,
-0.14892426133155823,
-0.35422849655151367,
-0.25628572702407837,
0.09655534476041794,
-0.14374437928199768,
-0.08817408978939056,
-0.00841473788022995,
0.11140197515487671,
0.08947418630123138,
-0.47954946756362915,
0.06054777652025223,
-0.1437709629535675,
-0.18500283360481262,
-0.23749886453151703,
-0.3402491509914398,
-0.03224366530776024,
0.13544151186943054,
0.254183292388916,
0.6810378432273865,
0.0775316059589386,
0.1048726886510849,
0.22401028871536255,
0.16509316861629486,
0.24382957816123962,
0.19604313373565674,
0.019710440188646317,
-0.2000868320465088,
0.035092417150735855,
0.22192220389842987,
0.3367973268032074,
0.05703822895884514,
0.24604782462120056,
0.27763357758522034,
-0.4713394045829773,
-0.009481212124228477,
-0.11846888810396194,
0.24849744141101837,
-0.10384274274110794,
0.047326572239398956,
0.3984571099281311,
0.10011749714612961,
0.35663720965385437,
-0.008138389326632023,
0.13816119730472565,
0.24421025812625885,
0.10479757934808731,
-0.5389641523361206,
0.16101613640785217,
-0.05905921012163162,
-0.4801757335662842,
-0.16306939721107483,
0.07585518062114716,
-0.005250770598649979,
0.18647299706935883,
0.16661471128463745,
-0.039689529687166214,
-0.04841472953557968,
0.09224629402160645,
0.5502300262451172,
-0.033978432416915894,
-0.37551653385162354,
-0.25212037563323975,
0.34465858340263367,
0.32528936862945557,
-0.0470094308257103,
-0.14334043860435486,
-0.20373524725437164,
-0.15880417823791504,
-0.25018471479415894,
0.26769569516181946,
-0.35511860251426697,
-0.46972960233688354,
0.09421069175004959,
0.08751554787158966,
-0.4610198140144348,
0.2969299852848053,
-0.5506200790405273,
0.12106391787528992,
0.3634968400001526,
0.03635401651263237,
0.1631305068731308,
-0.4040912389755249,
-0.009815461933612823,
-0.3456859290599823,
0.27802544832229614,
0.22121381759643555,
-0.523251473903656,
0.4155109226703644,
-0.18905581533908844,
0.14630474150180817,
-0.12302877753973007,
0.2770639955997467,
-0.1130950003862381,
-0.11926092952489853,
-0.23911331593990326,
0.3650374412536621,
0.20125681161880493,
0.023464713245630264,
-0.6570101380348206,
0.22786015272140503,
0.029937177896499634,
-0.06685874611139297,
0.23225528001785278,
-0.19381015002727509,
0.47587937116622925,
-0.1701761782169342,
-0.18344977498054504,
0.3935566544532776,
-0.09857310354709625,
0.011382436379790306,
-0.4475592374801636,
-0.3280375003814697,
-0.34514153003692627,
0.13408780097961426,
0.3346206843852997,
-0.22350427508354187,
0.3428323566913605,
0.00014655012637376785,
0.029416460543870926,
0.01986825466156006,
0.4135878086090088,
0.18860317766666412,
0.14787964522838593,
-0.4477813243865967,
0.06693784892559052,
-0.24060606956481934,
-0.22751164436340332,
0.2625983655452728,
-0.280685156583786,
-0.22987225651741028,
-0.3765789866447449,
-0.06116459146142006,
-0.05677524581551552,
0.07822646200656891,
-0.021702993661165237,
0.21656140685081482,
0.04620034247636795,
-0.14100536704063416,
0.15477445721626282,
-0.06020408123731613,
0.0975811630487442,
-0.21753950417041779,
-0.41299304366111755,
0.05634431540966034,
-0.4245480000972748,
0.33029669523239136,
0.06973905116319656,
-0.36048948764801025,
-0.0332711897790432,
0.20931032299995422,
0.01467253640294075,
-0.15614910423755646,
0.019303098320961,
0.37883058190345764,
-0.025151176378130913,
0.1717773675918579,
-0.14931124448776245,
0.22586031258106232,
0.08590538799762726,
-0.18843939900398254,
0.1305220127105713,
0.010775741189718246,
-0.18734467029571533,
0.011825084686279297,
-0.17808952927589417,
0.39656877517700195,
0.11817622184753418,
0.29536882042884827,
0.07121866941452026,
-0.11948160082101822,
-0.05909114331007004,
-0.08220311999320984,
0.09762601554393768,
-0.13047826290130615,
-0.1511172354221344,
0.26099714636802673,
0.09361086785793304,
-0.08825377374887466,
0.14897212386131287,
0.25263431668281555,
0.6442692875862122,
-0.13917161524295807,
0.08503304421901703,
0.3847479224205017,
-0.05570506304502487,
-0.2254222333431244,
0.20947644114494324,
0.43829771876335144,
0.12398828566074371,
0.2280973345041275,
0.08035513013601303,
-0.1991008222103119,
-0.09498104453086853,
-0.1968832165002823,
0.0695900097489357,
0.32847803831100464,
0.10293003171682358,
0.38408976793289185,
0.3334875702857971,
-0.21726375818252563,
-0.3363029956817627,
-0.21915200352668762,
0.12821170687675476,
0.17948360741138458,
-0.34032467007637024,
0.0025983303785324097,
-0.13437017798423767,
0.17898330092430115,
-0.19897761940956116,
0.41286149621009827,
-0.4025425910949707,
-0.4542063772678375,
0.09032741189002991,
0.21577738225460052,
-0.2600879669189453,
-0.010165177285671234,
0.16011406481266022,
0.3173995614051819,
0.19572202861309052,
-0.07861506193876266,
-0.1428949385881424,
-0.0015957779251039028,
-0.23549330234527588,
0.005983386188745499,
0.4796603322029114,
-0.10575072467327118,
0.06023711338639259,
0.08815095573663712,
0.06664016097784042,
-0.4340340197086334,
-0.211645245552063,
0.06177480146288872,
-0.1421850323677063,
0.21547651290893555,
0.022581614553928375,
0.002959325909614563,
0.1817052662372589,
0.009775754995644093,
0.11602341383695602,
-0.07891253381967545,
-0.049319878220558167,
0.3606971502304077,
-0.12862077355384827,
0.08855338394641876,
-0.0529952347278595,
0.08667398244142532,
0.1216089129447937,
-0.4753544330596924,
0.2996674180030823,
0.2334243506193161,
0.22735781967639923,
-0.08052558451890945,
0.4020034670829773,
0.07677227258682251,
-0.10036793351173401,
-0.2812676429748535,
0.1674797534942627,
-0.36001867055892944,
0.4618341028690338,
-0.216265007853508,
-0.2965087890625,
-0.13490644097328186,
-0.030331213027238846,
0.010722719132900238,
0.484355628490448,
-0.4677029848098755,
0.09842851012945175,
-0.23443026840686798,
0.36465632915496826,
-0.1270199567079544,
-0.07068351656198502,
0.05275240167975426,
-0.17644572257995605,
0.01571071706712246,
-0.01534736156463623,
0.04886644706130028,
0.06575306504964828,
0.19841238856315613,
0.2148861289024353,
0.11543291807174683,
0.21890032291412354,
0.5000597834587097,
0.8289975523948669,
0.09453296661376953,
-0.11598391830921173,
0.2123045027256012,
0.12313691526651382,
0.2580420970916748,
-0.24346885085105896,
0.08513272553682327,
0.27245044708251953,
-0.07271121442317963,
-0.07563561201095581,
0.11018446832895279,
-0.002521069720387459,
-0.00870666652917862,
0.33128002285957336,
-0.19519151747226715,
0.056804098188877106,
-0.3348453640937805,
0.3010507822036743,
-0.015196524560451508,
-0.03810685873031616,
-0.1951468586921692,
-0.10537944734096527,
-0.014273760840296745,
-0.3079946041107178,
-0.006115555763244629,
-0.16634346544742584,
0.053687479346990585,
0.1582426279783249,
0.11884365975856781,
0.008651325479149818,
-0.3223922848701477,
0.22528567910194397,
0.034973762929439545,
0.205946147441864,
0.0845670998096466,
-0.25574785470962524,
-0.07014131546020508,
-0.3207758367061615,
0.6159862279891968,
-0.26788532733917236,
0.3206462860107422,
0.06516346335411072,
0.20296958088874817,
-0.35133951902389526,
-0.12590210139751434,
-0.07973261177539825,
0.30874690413475037,
-0.04460256174206734,
0.5034084916114807,
-0.3412788510322571,
0.1240793764591217,
-0.056869447231292725,
0.19655530154705048,
-0.008540142327547073,
-0.00250687962397933,
-0.11508943140506744,
-0.07284945994615555,
-0.29775765538215637,
0.19233447313308716,
0.16991360485553741,
0.35367274284362793,
-0.2664152681827545,
-0.12187917530536652,
0.019225865602493286,
-0.23721253871917725,
-0.06085473299026489,
0.0863429456949234,
0.2131439745426178,
-0.3352828621864319,
0.0407647080719471,
-0.39579129219055176,
-0.02393054962158203,
0.49643102288246155,
0.44926074147224426,
0.22123181819915771,
-0.013721741735935211,
0.059629857540130615,
-0.07261837273836136,
0.16077178716659546,
0.40677326917648315,
-0.15388385951519012,
0.12816154956817627,
-0.15169896185398102,
0.31755387783050537,
0.0006654411554336548,
-0.08709300309419632,
0.15098077058792114,
-0.31793472170829773,
-0.2812102437019348,
0.1379757523536682,
0.6496997475624084,
-0.036297161132097244,
0.23796068131923676,
0.12888309359550476,
0.46185553073883057,
-0.17758235335350037,
0.534401535987854,
0.19113893806934357,
0.9176213145256042,
0.0420917347073555,
0.312652587890625,
-0.08880605548620224,
0.09897999465465546,
0.26953014731407166,
-0.3887094259262085,
-0.04704677313566208,
-0.30537959933280945,
0.014764361083507538,
0.019541265442967415,
-0.23276351392269135,
0.1507205218076706,
0.31759196519851685,
-0.07683689892292023,
0.13404446840286255,
-0.03011922538280487,
0.37989386916160583,
-0.001190432347357273,
0.19410689175128937,
-0.4124591648578644,
-0.24464857578277588,
-0.11026330292224884,
0.09788258373737335,
-0.16806013882160187,
-0.40081197023391724,
0.02760840207338333,
-0.11466135084629059,
-0.17794620990753174,
-0.05584204941987991,
-0.42367023229599,
0.12844595313072205,
0.09632319957017899,
0.040687739849090576,
-0.05785892531275749,
-0.6117038726806641,
0.12809602916240692,
-0.04629888758063316,
-0.06403958797454834,
0.10070939362049103,
-0.2836366891860962,
0.17444801330566406,
-0.04986172169446945,
0.015428667888045311,
0.2532596290111542,
-0.19973541796207428,
0.17218945920467377,
0.06981848925352097,
-0.04401160031557083,
0.14930400252342224,
0.17273207008838654,
-0.24398298561573029,
-0.056049980223178864,
0.06710531562566757,
0.14411836862564087,
-0.11800193786621094,
-0.0024565979838371277,
-0.2640824317932129,
-0.38185349106788635,
-0.24400359392166138,
0.04814103990793228,
0.07730821520090103,
-0.027091290801763535,
0.15848949551582336,
-0.2154715210199356,
-0.1875476837158203,
-0.0374288372695446,
0.3446810841560364,
-0.13944211602210999,
0.30339276790618896,
-0.04536428302526474,
0.08300365507602692,
-0.024996396154165268,
-0.08940882980823517,
0.35484999418258667,
0.22108985483646393,
-0.6496378779411316,
0.11460539698600769,
-0.5337727069854736,
0.1104900985956192,
-0.09923803061246872,
-0.1644378900527954,
0.17639462649822235,
-0.07063046842813492,
-0.3566841781139374,
-0.2956210970878601,
-0.12439464777708054,
0.07774128019809723,
-0.17747928202152252,
0.08559297025203705,
-0.18264049291610718,
-0.21187633275985718,
-0.05207080394029617,
0.29246020317077637,
-0.19244912266731262,
0.3031584620475769,
-0.04868490248918533,
0.0368376187980175,
-0.21890832483768463,
0.056023240089416504,
-0.0621420219540596,
-0.14117641746997833,
-0.13814875483512878,
0.24931466579437256,
-0.17348797619342804,
-0.1487777978181839,
-0.0916745662689209,
0.13079383969306946,
0.28795304894447327,
0.14079804718494415,
-0.1763332337141037,
-0.02906259521842003,
-0.07519246637821198,
-0.13523180782794952,
0.28425440192222595,
-0.12444884330034256,
-0.11980397999286652,
-0.12322308123111725,
0.6847252249717712,
0.11091298609972,
-0.12528961896896362,
-0.05188107490539551,
0.15235626697540283,
0.4178818464279175,
-0.03822609409689903,
0.6187496185302734,
0.08775079995393753,
-0.09615348279476166,
-0.22921112179756165,
0.29416194558143616,
0.10645585507154465,
-0.13503319025039673,
0.4946538805961609,
-0.2238849550485611,
-0.2633839547634125,
-0.1629151850938797,
0.43480145931243896,
0.46887505054473877,
-0.24318833649158478,
-0.25528934597969055,
0.2472047507762909,
0.0987323448061943,
-0.03235100954771042,
-0.2672688663005829,
0.48372846841812134,
-0.12011938542127609,
0.012544948607683182,
0.18050657212734222,
0.3854408860206604,
-0.256875216960907,
-0.1491488516330719,
0.1794755458831787,
0.34018808603286743,
-0.25045883655548096,
-0.07177342474460602,
0.505522608757019,
-0.0034171082079410553,
0.09315412491559982,
0.38515299558639526,
0.05294042080640793,
0.5090199112892151,
0.8095622658729553,
0.057634785771369934,
0.6307918429374695,
0.0887427031993866,
-0.23734650015830994,
0.3431086540222168,
-0.48871469497680664,
0.014928210526704788,
0.21912315487861633,
0.14883270859718323,
0.11568646132946014,
0.06043357402086258,
0.6214473843574524,
0.27381837368011475,
-0.09807775914669037,
-0.33960920572280884,
-0.20565132796764374,
-0.13481640815734863,
0.07993029057979584,
-0.05526068061590195,
-0.2938462793827057,
-0.3036908507347107,
0.1556803435087204,
-0.06164730712771416,
-0.3116247057914734,
0.5787745714187622,
0.05822001397609711,
-0.09065835177898407,
0.09276532381772995,
0.24325522780418396,
0.0036256127059459686,
0.10613641887903214,
-0.39317643642425537,
0.261106014251709,
0.3004229664802551,
-0.2931865155696869,
0.07271263003349304,
0.010305097326636314,
0.50485759973526,
0.13813632726669312,
-0.16082671284675598,
0.003805746790021658,
0.22879457473754883,
-0.020339513197541237,
-0.26573365926742554,
0.07756277173757553,
-0.037000708281993866,
0.12479151785373688,
0.5220984220504761,
0.083423912525177,
-0.10952833294868469,
-0.16289682686328888,
0.3273243010044098,
0.12640181183815002,
-0.1342192143201828,
0.05381372943520546,
-0.10797789692878723,
-0.31187859177589417,
0.10031852126121521,
-0.16908076405525208,
-0.40354305505752563,
-0.2790489196777344,
0.48542290925979614,
-0.11860817670822144,
0.11987007409334183,
-0.15548425912857056,
0.0048843491822481155,
-0.17829185724258423,
0.6423845887184143,
0.3321898877620697,
-0.20012778043746948,
-0.20396247506141663,
-0.0008255913853645325,
-0.37279099225997925,
0.3469647169113159,
-0.4666784405708313,
0.13893277943134308,
0.1398240625858307,
0.41148918867111206,
-0.10597538203001022,
0.07987601310014725,
0.03564627468585968,
-0.06184383109211922,
-0.210163414478302,
0.32896581292152405,
-0.17761747539043427,
-0.176081120967865,
0.2008698284626007,
-0.22189398109912872,
-0.16077296435832977,
-0.4089497923851013,
0.483383446931839,
-0.0742480680346489,
-0.04287660866975784,
0.07308439910411835,
-0.0961553156375885,
0.38417795300483704,
-0.36569833755493164,
0.39507052302360535,
0.007646857760846615,
0.05428403615951538,
-0.029446277767419815,
-0.0900149717926979,
-0.514661431312561,
0.12126608937978745,
-0.261401891708374,
0.02499479427933693,
-0.24134257435798645,
0.32086271047592163,
-0.055335208773612976,
-0.17105720937252045,
-0.051390547305345535,
0.1432769000530243,
-0.14641034603118896,
0.16281995177268982,
0.21314755082130432,
0.017056843265891075,
-0.06525266170501709,
0.08198416233062744,
0.08620787411928177,
0.053178828209638596,
-0.13268570601940155,
0.09244901686906815,
-0.1757114827632904,
-0.37508922815322876,
0.3732158839702606,
-0.3303591012954712,
-0.3585891127586365,
0.05213131010532379,
0.2558417320251465,
0.17954325675964355,
-0.15360668301582336,
-0.1311940997838974,
-0.0400053970515728,
0.20078185200691223,
0.055212728679180145,
-0.18332654237747192,
0.09914551675319672,
-0.14208726584911346,
-0.06913413107395172,
-0.09515851736068726,
0.013076849281787872,
0.19891208410263062,
-0.39371350407600403,
0.15579740703105927,
-0.21845759451389313
] |
https://github.com/huggingface/datasets/issues/5385 | Is `fs=` deprecated in `load_from_disk()` as well? | Hi! Yes, we should deprecate the `fs` param here. Would you be interested in submitting a PR? | ### Describe the bug
The `fs=` argument was deprecated from `Dataset.save_to_disk` and `Dataset.load_from_disk` in favor of automagically figuring it out via fsspec:
https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/arrow_dataset.py#L1339-L1340
Is there a reason the same thing shouldn't also apply to `datasets.load.load_from_disk()` as well ?
https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/load.py#L1779
### Steps to reproduce the bug
n/a
### Expected behavior
n/a
### Environment info
n/a | 17 | Is `fs=` deprecated in `load_from_disk()` as well?
### Describe the bug
The `fs=` argument was deprecated from `Dataset.save_to_disk` and `Dataset.load_from_disk` in favor of automagically figuring it out via fsspec:
https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/arrow_dataset.py#L1339-L1340
Is there a reason the same thing shouldn't also apply to `datasets.load.load_from_disk()` as well ?
https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/load.py#L1779
### Steps to reproduce the bug
n/a
### Expected behavior
n/a
### Environment info
n/a
Hi! Yes, we should deprecate the `fs` param here. Would you be interested in submitting a PR? | [
-0.17477941513061523,
-0.4953836500644684,
-0.04820879176259041,
0.0716986283659935,
0.39074134826660156,
-0.30995815992355347,
0.3980564773082733,
-0.043174613267183304,
0.12461672723293304,
0.07487393915653229,
-0.008422604762017727,
0.3234102427959442,
-0.042723238468170166,
0.16384625434875488,
-0.14234164357185364,
0.08057689666748047,
0.38731223344802856,
0.05636826530098915,
-0.1920013427734375,
0.06305108964443207,
-0.17694076895713806,
0.3809050917625427,
-0.1971096396446228,
-0.04808783531188965,
-0.20776382088661194,
0.3070148527622223,
-0.2153913974761963,
0.09969500452280045,
-0.1141420528292656,
-0.23589831590652466,
0.39728283882141113,
-0.1036156713962555,
0.2765589654445648,
0.2680092453956604,
-0.0001253486843779683,
-0.12362002581357956,
0.20365425944328308,
-0.12453871220350266,
-0.5135816931724548,
0.10965760797262192,
0.1437152922153473,
0.10317938774824142,
0.09885989129543304,
-0.020637981593608856,
-0.02283519133925438,
-0.23161786794662476,
-0.36748600006103516,
-0.4031342566013336,
0.3031727075576782,
0.19902151823043823,
0.17292968928813934,
0.31314176321029663,
-0.1165635734796524,
-0.18441583216190338,
-0.04056423902511597,
0.38953423500061035,
-0.17035150527954102,
0.1600584238767624,
0.14398375153541565,
-0.1738201081752777,
0.009737588465213776,
0.07430659234523773,
-0.14673775434494019,
-0.19420360028743744,
0.6253076195716858,
-0.03572855144739151,
0.28675374388694763,
-0.06728661060333252,
-0.15938454866409302,
-0.17884689569473267,
0.5687533020973206,
-0.0775982066988945,
-0.550068199634552,
-0.3243233263492584,
-0.17354436218738556,
-0.03025343455374241,
0.04570828378200531,
-0.2875550389289856,
-0.15287131071090698,
0.32896989583969116,
0.027055904269218445,
-0.5093958377838135,
-0.12031453102827072,
0.15003077685832977,
-0.037096939980983734,
-0.20383459329605103,
-0.44422975182533264,
0.02139134705066681,
0.24312585592269897,
-0.12467004358768463,
-0.15142743289470673,
-0.12177738547325134,
-0.023698214441537857,
0.18820837140083313,
-0.1399492472410202,
-0.2461150586605072,
0.04543759301304817,
0.01591918244957924,
0.022857628762722015,
0.3566330075263977,
0.024843290448188782,
-0.16301554441452026,
-0.22908465564250946,
0.1535058319568634,
0.24706758558750153,
0.25149035453796387,
0.3433450758457184,
-0.2305781990289688,
0.14216390252113342,
-0.04767760634422302,
0.10524065792560577,
-0.218455970287323,
0.09551874548196793,
-0.2673660218715668,
0.17113643884658813,
-0.05172625184059143,
0.35481929779052734,
-0.3316589593887329,
-0.10041143745183945,
-0.05822960287332535,
0.27792075276374817,
-0.10062141716480255,
-0.027130186557769775,
0.27694568037986755,
0.15480546653270721,
0.5618981719017029,
0.14266639947891235,
0.08289174735546112,
-0.23687493801116943,
-0.052992939949035645,
-0.09050025045871735,
-0.10898201167583466,
-0.29268109798431396,
0.1241534873843193,
-0.06615089625120163,
-0.09468992054462433,
0.06068667024374008,
0.07719893753528595,
-0.011601395905017853,
-0.12552660703659058,
-0.5691621899604797,
-0.04841066896915436,
0.25945547223091125,
0.21925516426563263,
-0.4885064661502838,
0.02123570628464222,
-0.0041170865297317505,
0.19098488986492157,
-0.11767013370990753,
0.3755015730857849,
-0.3699410557746887,
-0.39752915501594543,
-0.3188400864601135,
0.06353432685136795,
-0.16784337162971497,
-0.047558851540088654,
-0.8008136749267578,
0.22651827335357666,
-0.05757201462984085,
-0.25878041982650757,
0.32431456446647644,
-0.041886135935783386,
-0.2059570550918579,
-0.23758424818515778,
0.09568186104297638,
0.3422924876213074,
-0.2181749790906906,
-0.23648086190223694,
0.06105688586831093,
-0.40291285514831543,
0.1540546715259552,
0.4055463969707489,
-0.3175628185272217,
-0.014993861317634583,
-0.3621310591697693,
0.026472754776477814,
0.3524923026561737,
-0.24070651829242706,
0.08470334857702255,
0.6191009879112244,
0.2881184220314026,
0.11308594793081284,
-0.05639494210481644,
-0.14785495400428772,
0.05787180736660957,
-0.24794459342956543,
0.10449344664812088,
0.04188988730311394,
0.1721527874469757,
-0.2114492505788803,
-0.14195400476455688,
-0.29643988609313965,
0.11588277667760849,
0.15437433123588562,
-0.11923688650131226,
0.4290976822376251,
0.32887834310531616,
-0.09191902726888657,
0.24110248684883118,
-0.05901830270886421,
-0.12796777486801147,
0.48448342084884644,
0.48111093044281006,
0.07593680173158646,
0.11582667380571365,
-0.2980845868587494,
-0.6691024899482727,
0.12875306606292725,
0.25786373019218445,
-0.18881498277187347,
0.1212867945432663,
-0.17895564436912537,
0.07301046699285507,
0.19407489895820618,
0.1033860445022583,
0.24052363634109497,
-0.0926816537976265,
-0.3410368263721466,
0.0791197270154953,
-0.02937217243015766,
-0.2458299845457077,
0.11852126568555832,
-0.2306848019361496,
0.10334813594818115,
-0.09376539289951324,
0.3567390739917755,
0.04629932716488838,
-0.1510586142539978,
-0.16404199600219727,
0.08104951679706573,
0.3153994083404541,
-0.02751140296459198,
-0.13175389170646667,
0.5508027672767639,
0.46046486496925354,
0.3802492022514343,
-0.12292052060365677,
0.3855026960372925,
0.16973699629306793,
0.059337880462408066,
0.07902562618255615,
0.18488433957099915,
0.0846359059214592,
0.02963746339082718,
-0.1058492437005043,
0.25270944833755493,
-0.07168975472450256,
0.17659804224967957,
0.18281586468219757,
-0.1388477385044098,
-0.08974238485097885,
0.0721864253282547,
-0.13705691695213318,
0.05732908099889755,
-0.026228036731481552,
0.021274160593748093,
0.22803230583667755,
0.2703891694545746,
-0.06558209657669067,
-0.17723217606544495,
0.133636012673378,
-0.2765212953090668,
-0.1075359657406807,
0.36893129348754883,
0.1550506055355072,
-0.18061521649360657,
0.4598598778247833,
0.016459446400403976,
0.6566814184188843,
0.14365841448307037,
0.13033725321292877,
-0.10010913759469986,
0.17683416604995728,
-0.13785098493099213,
0.5514947772026062,
0.09645220637321472,
0.2755480110645294,
0.3311801552772522,
-0.02482224442064762,
0.21283121407032013,
-0.3720813989639282,
-0.09912925958633423,
-0.2676922082901001,
-0.040118686854839325,
-0.5040927529335022,
0.1562758833169937,
-0.1538103222846985,
-0.0664670541882515,
0.07937026768922806,
0.19715560972690582,
-0.29092657566070557,
0.014381153509020805,
-0.351989209651947,
0.26997247338294983,
-0.08983618021011353,
-0.11074740439653397,
-0.25432872772216797,
0.5194999575614929,
-0.10041208565235138,
-0.003946991637349129,
-0.40280357003211975,
0.16277682781219482,
0.07445044815540314,
-0.0895518958568573,
-0.01964600384235382,
-0.23235991597175598,
0.08133252710103989,
0.2829446494579315,
0.08050037175416946,
-0.563593327999115,
-0.31096357107162476,
-0.09306235611438751,
-0.0014545582234859467,
0.30387425422668457,
0.14744912087917328,
0.07085567712783813,
-0.07734870910644531,
0.08932162821292877,
-0.05588429421186447,
-0.45206353068351746,
-0.18527448177337646,
-0.16118307411670685,
0.018023015931248665,
0.023164071142673492,
-0.5252176523208618,
0.17297135293483734,
-0.10088083893060684,
-0.2751627266407013,
0.2628193497657776,
-0.2187008112668991,
-0.0871647298336029,
0.341707319021225,
0.041137274354696274,
-0.22676776349544525,
0.26771795749664307,
0.09511718899011612,
-0.3466964662075043,
-0.29238054156303406,
0.23289896547794342,
0.015124395489692688,
-0.2219415158033371,
-0.07657931745052338,
0.32493412494659424,
-0.12139183282852173,
0.016582317650318146,
-0.29513734579086304,
-0.3251023590564728,
-0.0012203380465507507,
0.15485484898090363,
-0.5231540203094482,
0.26486003398895264,
0.3115888237953186,
0.12354324758052826,
0.02426346205174923,
-0.18359562754631042,
-0.2659892439842224,
0.04451694339513779,
-0.04176817089319229,
0.12662670016288757,
0.26507866382598877,
0.17809680104255676,
0.10019801557064056,
0.41261541843414307,
0.10218971967697144,
0.01518707349896431,
0.5394988059997559,
0.008457189425826073,
0.5054715275764465,
-0.045160554349422455,
-0.14887425303459167,
-0.1396705061197281,
-0.403912752866745,
-0.11991483718156815,
-0.06152378022670746,
0.16745907068252563,
0.030546467751264572,
-0.17101188004016876,
0.0847407728433609,
-0.1278371512889862,
-0.13283689320087433,
-0.2603152096271515,
-0.3390806317329407,
0.11993400752544403,
-0.16893117129802704,
0.36215391755104065,
-0.044496018439531326,
0.2471873164176941,
0.37678417563438416,
0.23742033541202545,
0.5612366795539856,
-0.12277001142501831,
-0.41625550389289856,
0.13266043365001678,
-0.32651206851005554,
0.17933106422424316,
0.0646742507815361,
0.2921487092971802,
-0.028606120496988297,
-0.10135173797607422,
0.13978180289268494,
-0.2429477870464325,
0.7130482196807861,
0.193290576338768,
-0.08032023906707764,
0.0828043520450592,
-0.09223133325576782,
-0.3545122742652893,
0.03878520056605339,
0.18738821148872375,
-0.10965266078710556,
-0.07636696100234985,
0.46394774317741394,
-0.28069862723350525,
-0.731560468673706,
-0.03946796804666519,
-0.187946617603302,
-0.04612801596522331,
-0.38620930910110474,
-0.17278146743774414,
0.005702704191207886,
-0.017768803983926773,
-0.32541945576667786,
0.21399424970149994,
-0.018103929236531258,
-0.39689600467681885,
0.1354110687971115,
-0.07899407297372818,
0.018948838114738464,
0.2473989725112915,
-0.21887929737567902,
0.3576493263244629,
-0.22509309649467468,
-0.01578538864850998,
0.06291374564170837,
-0.0953814685344696,
0.23943065106868744,
0.3649245798587799,
-0.40453001856803894,
-0.10896666347980499,
0.00990821048617363,
0.26056107878685,
0.41470611095428467,
0.3826514184474945,
-0.12122365087270737,
0.06572800129652023,
-0.22215892374515533,
-0.049223676323890686,
-0.589969277381897,
-0.29991182684898376,
0.21095767617225647,
-0.038619574159383774,
0.12809939682483673,
-0.2654944658279419,
0.46538251638412476,
0.09125581383705139,
-0.07425394654273987,
0.19833312928676605,
0.5615936517715454,
-0.19058488309383392,
0.34164494276046753,
-0.038973189890384674,
1.0213966369628906,
0.2704811096191406,
0.3538542091846466,
0.22256791591644287,
0.0019331872463226318,
-0.08398178219795227,
0.03615809231996536,
-0.3462945222854614,
-0.24984313547611237,
0.058807242661714554,
-0.09781622886657715,
-0.14525893330574036,
0.30671775341033936,
0.23184838891029358,
0.01708943024277687,
0.2355497032403946,
0.01649128645658493,
-0.07207061350345612,
0.11659975349903107,
0.17033350467681885,
-0.22912272810935974,
-0.15663324296474457,
-0.5713790059089661,
0.11332075297832489,
-0.13481928408145905,
0.2104444056749344,
-0.19492551684379578,
-0.03176454082131386,
0.2517118453979492,
-0.24189311265945435,
-0.12720373272895813,
0.1847178339958191,
-0.05858949199318886,
0.3680533170700073,
0.348416268825531,
-0.02120259404182434,
0.19645899534225464,
0.4223117530345917,
0.3386654257774353,
-0.07136879861354828,
-0.07542664557695389,
0.04518783092498779,
-0.11212483793497086,
0.4622151553630829,
-0.3189992308616638,
0.03627346083521843,
0.2399023324251175,
-0.0258207768201828,
0.034985266625881195,
-0.14223763346672058,
-0.19800201058387756,
-0.5553930997848511,
-0.20760446786880493,
0.011765390634536743,
0.043249666690826416,
-0.1881593018770218,
-0.28997498750686646,
0.12659043073654175,
0.19605349004268646,
-0.1103697121143341,
0.01937101036310196,
0.3455212712287903,
-0.14646227657794952,
0.23795077204704285,
-0.10031737387180328,
-0.035855937749147415,
0.03999164700508118,
0.6954428553581238,
-0.19904980063438416,
-0.3398209810256958,
0.16649594902992249,
-0.19103336334228516,
-0.34800904989242554,
-0.10989264398813248,
0.12779691815376282,
-0.017255518585443497,
-0.3575102388858795,
0.318794310092926,
0.09225419908761978,
0.10613402724266052,
0.014749784953892231,
0.38708993792533875,
0.13332001864910126,
-0.05828019231557846,
0.006167009472846985,
0.024456754326820374,
-0.13389883935451508,
0.12803110480308533,
-0.08461518585681915,
0.3402177393436432,
0.25379279255867004,
-0.47588902711868286,
-0.2733670473098755,
-0.36448433995246887,
-0.22263850271701813,
0.4595813751220703,
0.34882622957229614,
-0.07104475796222687,
0.2086254209280014,
-0.27845078706741333,
0.2679474651813507,
-0.28785088658332825,
0.0198057908564806,
-0.07112471014261246,
-0.18155278265476227,
-0.05258239805698395,
-0.26380518078804016,
0.21404500305652618,
0.16801664233207703,
-0.10561718046665192,
-0.21869337558746338,
-0.1423902064561844,
-0.2412087619304657,
-0.039291996508836746,
0.08908440172672272,
0.49599725008010864,
-0.01343487948179245,
0.4550720155239105,
0.30790480971336365,
0.2676572799682617,
-0.012111973017454147,
0.45073267817497253,
0.2193530797958374,
0.6139052510261536,
-0.08367635309696198,
0.132376566529274,
-0.2061343640089035,
-0.11255165934562683,
-0.2520294487476349,
0.2710660994052887,
0.3638659119606018,
0.21487277746200562,
0.3919202983379364,
-0.22744639217853546,
-0.09804892539978027,
-0.1852446049451828,
0.45416784286499023,
0.2869569659233093,
-0.24464577436447144,
0.0684027224779129,
0.04216073825955391,
0.13428927958011627,
0.07513189315795898,
-0.11696425825357437,
0.011730356141924858,
-0.001643623225390911,
-0.1419800966978073,
0.16714008152484894,
0.23305538296699524,
0.083919957280159,
0.3359805941581726,
0.015010111033916473,
0.04135194793343544,
0.20452335476875305,
-0.03146917745471001,
0.1997969001531601,
0.13990412652492523,
0.17524629831314087,
0.22752951085567474,
0.1382327824831009,
0.2829296290874481,
0.34051865339279175,
-0.20634600520133972,
0.22400902211666107,
0.07027605175971985,
0.23187574744224548,
0.008881621062755585,
-0.4546618163585663,
0.23844216763973236,
-0.02177514135837555,
-0.2419317364692688,
0.020748771727085114,
-0.06164535880088806,
0.36865705251693726,
-0.2860853374004364,
-0.4450986087322235,
0.0017578918486833572,
0.09639482200145721,
-0.3256628215312958,
-0.3400099575519562,
0.2032431811094284,
0.1326713263988495,
0.04846885800361633,
0.009190365672111511,
-0.20941534638404846,
-0.2559449076652527,
0.25227677822113037,
0.1713116317987442,
0.23066546022891998,
0.033885881304740906,
-0.07982204109430313,
0.14031994342803955,
0.48892003297805786,
0.04327784851193428,
-0.005001010373234749,
-0.0979146808385849,
0.10571517050266266,
0.12991605699062347,
0.10715401917695999,
0.4793800413608551,
0.25150159001350403,
-0.08078314363956451,
-0.2747991383075714,
0.18820200860500336,
-0.03895961493253708,
0.2742071747779846,
0.16981065273284912,
-0.13559378683567047,
0.4324820041656494,
0.4490671455860138,
0.06526186317205429,
-0.0015614023432135582,
-0.07937714457511902,
-0.03988594189286232,
0.3395400047302246,
-0.6314923763275146,
0.6366923451423645,
-0.22383639216423035,
-0.10880345106124878,
-0.29396966099739075,
0.34695950150489807,
-0.2649778127670288,
-0.24304945766925812,
0.38415369391441345,
-0.1352643072605133,
0.04138454422354698,
-0.14605695009231567,
0.04176492616534233,
0.2548275887966156,
0.09867958724498749,
0.3193782866001129,
0.027032991871237755,
-0.12633314728736877,
0.022190332412719727,
-0.5760884284973145,
-0.30959558486938477,
0.6317402124404907,
0.44830015301704407,
-0.0908200591802597,
0.06571156531572342,
-0.10449466854333878,
-0.080795057117939,
-0.04424217343330383,
-0.25186216831207275,
0.19961954653263092,
0.16096052527427673,
-0.021492503583431244,
0.07560276240110397,
-0.07998313009738922,
-0.028899481520056725,
-0.030820798128843307,
-0.45209142565727234,
0.18101195991039276,
-0.026663310825824738,
-0.16383659839630127,
-0.11403539776802063,
0.1717829406261444,
-0.15790845453739166,
0.07231797277927399,
0.5020466446876526,
0.07084789127111435,
-0.0016956254839897156,
0.061121948063373566,
-0.36654984951019287,
0.18024125695228577,
-0.27038872241973877,
0.23970156908035278,
0.001264825463294983,
-0.34722113609313965,
0.19604235887527466,
-0.26619234681129456,
0.14460183680057526,
-0.2433210164308548,
0.11084780842065811,
0.022550195455551147,
-0.2889482080936432,
-0.6782445311546326,
0.21690209209918976,
-0.3233681917190552,
-0.15343599021434784,
-0.01296794880181551,
0.18448099493980408,
-0.08889147639274597,
0.35541290044784546,
-0.27593863010406494,
-0.09804871678352356,
0.5277162194252014,
-0.16543230414390564,
-0.005835019052028656,
-0.09199127554893494,
0.35733646154403687,
0.299207478761673,
-0.29941830039024353,
-0.7216008305549622,
-0.17712590098381042,
0.28173917531967163,
-0.03240801766514778,
-0.03718212619423866,
0.5038799047470093,
-0.35710665583610535,
-0.14115005731582642,
-0.14901725947856903,
0.3443872928619385,
-0.021573945879936218,
0.12257643043994904,
0.36908668279647827,
-0.2980002164840698
] |
https://github.com/huggingface/datasets/issues/5385 | Is `fs=` deprecated in `load_from_disk()` as well? | > Hi! Yes, we should deprecate the `fs` param here. Would you be interested in submitting a PR?
Yeah I can do that sometime next week. Should the storage_options be a new arg here? I’ll look around for anywhere else where fs is an arg. | ### Describe the bug
The `fs=` argument was deprecated from `Dataset.save_to_disk` and `Dataset.load_from_disk` in favor of automagically figuring it out via fsspec:
https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/arrow_dataset.py#L1339-L1340
Is there a reason the same thing shouldn't also apply to `datasets.load.load_from_disk()` as well ?
https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/load.py#L1779
### Steps to reproduce the bug
n/a
### Expected behavior
n/a
### Environment info
n/a | 45 | Is `fs=` deprecated in `load_from_disk()` as well?
### Describe the bug
The `fs=` argument was deprecated from `Dataset.save_to_disk` and `Dataset.load_from_disk` in favor of automagically figuring it out via fsspec:
https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/arrow_dataset.py#L1339-L1340
Is there a reason the same thing shouldn't also apply to `datasets.load.load_from_disk()` as well ?
https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/load.py#L1779
### Steps to reproduce the bug
n/a
### Expected behavior
n/a
### Environment info
n/a
> Hi! Yes, we should deprecate the `fs` param here. Would you be interested in submitting a PR?
Yeah I can do that sometime next week. Should the storage_options be a new arg here? I’ll look around for anywhere else where fs is an arg. | [
-0.09783859550952911,
-0.4176594316959381,
-0.07149815559387207,
0.0844612717628479,
0.417685329914093,
-0.2808403968811035,
0.37226083874702454,
-0.07231108844280243,
0.08835488557815552,
0.056952040642499924,
-0.019156813621520996,
0.3035810887813568,
-0.05652914196252823,
0.14101429283618927,
-0.11508485674858093,
0.12931396067142487,
0.43810251355171204,
0.06937508285045624,
-0.07145939767360687,
0.058458112180233,
-0.18906480073928833,
0.37342047691345215,
-0.19360753893852234,
-0.0704503208398819,
-0.17759770154953003,
0.2516039311885834,
-0.28404131531715393,
0.06829751282930374,
-0.14874398708343506,
-0.3034604787826538,
0.3912109136581421,
-0.10427479445934296,
0.2299644649028778,
0.23846307396888733,
-0.00012125611829105765,
-0.12102243304252625,
0.17017608880996704,
-0.13898727297782898,
-0.5380076766014099,
0.04255562275648117,
0.10899313539266586,
0.060918740928173065,
0.05774722248315811,
-0.0267176553606987,
0.012057997286319733,
-0.2877821624279022,
-0.29168054461479187,
-0.4394533932209015,
0.24896183609962463,
0.21010063588619232,
0.2025023251771927,
0.2365020513534546,
-0.09072626382112503,
-0.22087913751602173,
0.06950487941503525,
0.41688889265060425,
-0.18458735942840576,
0.2656593918800354,
0.1517122983932495,
-0.16751039028167725,
-0.012746147811412811,
0.11318349838256836,
-0.15234670042991638,
-0.16488128900527954,
0.5914056897163391,
0.045481570065021515,
0.2526201605796814,
-0.07015839219093323,
-0.12814897298812866,
-0.18674296140670776,
0.5826768279075623,
-0.09362559765577316,
-0.5531826615333557,
-0.3250730335712433,
-0.17337025701999664,
-0.06564316153526306,
0.08036500960588455,
-0.2287779152393341,
-0.13267236948013306,
0.28223639726638794,
-0.005066774785518646,
-0.48109960556030273,
-0.162189781665802,
0.1697215735912323,
-0.010713890194892883,
-0.16299498081207275,
-0.44769686460494995,
0.03706374764442444,
0.2635199725627899,
-0.1386968493461609,
-0.20434530079364777,
-0.11742118000984192,
-0.04209023341536522,
0.19888362288475037,
-0.15480104088783264,
-0.18332767486572266,
0.04053705930709839,
-0.011991702020168304,
0.11514795571565628,
0.32898372411727905,
0.04130971431732178,
-0.13526523113250732,
-0.18688012659549713,
0.17867684364318848,
0.21517394483089447,
0.2935568392276764,
0.2952623665332794,
-0.25917401909828186,
0.11619865894317627,
0.0032307335641235113,
0.08669918775558472,
-0.2321566641330719,
0.0917048379778862,
-0.2669200897216797,
0.18141517043113708,
-0.17910149693489075,
0.3908393383026123,
-0.3302081525325775,
-0.12829528748989105,
-0.012317155487835407,
0.2905650734901428,
-0.10051095485687256,
-0.02843528985977173,
0.3145391345024109,
0.19091634452342987,
0.5365142226219177,
0.12854157388210297,
0.09921247512102127,
-0.2328484207391739,
0.012935982085764408,
-0.11673516035079956,
-0.12409202754497528,
-0.2644754946231842,
0.12929126620292664,
-0.047357331961393356,
-0.045546647161245346,
0.08214268088340759,
0.07792071253061295,
-0.00550638884305954,
-0.1334003210067749,
-0.508968710899353,
-0.0980621874332428,
0.26718273758888245,
0.2646440267562866,
-0.5052688717842102,
0.009178724139928818,
0.022347573190927505,
0.13916154205799103,
-0.1427438110113144,
0.3409021496772766,
-0.2973582446575165,
-0.44471368193626404,
-0.33998018503189087,
0.09812111407518387,
-0.16797305643558502,
-0.02946249395608902,
-0.747430145740509,
0.24558879435062408,
-0.0708424374461174,
-0.24876083433628082,
0.2814934253692627,
-0.006332900375127792,
-0.20029231905937195,
-0.2998427748680115,
0.13535650074481964,
0.33192381262779236,
-0.2606998085975647,
-0.21666373312473297,
-0.0005397526547312737,
-0.40076759457588196,
0.15785187482833862,
0.3669583797454834,
-0.2678177058696747,
-0.06461461633443832,
-0.35424932837486267,
0.07281419634819031,
0.303790807723999,
-0.19852350652217865,
0.014268474653363228,
0.579348623752594,
0.29878753423690796,
0.09316466003656387,
-0.0497497096657753,
-0.07949525862932205,
0.07721786946058273,
-0.18782085180282593,
0.09057622402906418,
0.02556523121893406,
0.10093725472688675,
-0.24804344773292542,
-0.18542179465293884,
-0.31254440546035767,
0.1119702160358429,
0.17431870102882385,
-0.14903369545936584,
0.331437885761261,
0.2895927131175995,
-0.02980116754770279,
0.21300357580184937,
0.014132201671600342,
-0.11145816743373871,
0.4234426021575928,
0.5835332870483398,
0.062269214540719986,
0.05265103653073311,
-0.23447659611701965,
-0.7400906682014465,
0.15631404519081116,
0.24439001083374023,
-0.18142984807491302,
0.12243340909481049,
-0.15462830662727356,
0.06846898049116135,
0.2364492565393448,
0.08547036349773407,
0.19844704866409302,
-0.04921356216073036,
-0.25930196046829224,
0.07381777465343475,
-0.012587891891598701,
-0.29068076610565186,
0.09571252018213272,
-0.2683010697364807,
0.11174403131008148,
-0.10250265896320343,
0.3683295249938965,
-0.015363121405243874,
-0.22953923046588898,
-0.1649598926305771,
0.024581175297498703,
0.2834722399711609,
-0.029642494395375252,
-0.15490129590034485,
0.6158407926559448,
0.4667077958583832,
0.4348726272583008,
-0.16962960362434387,
0.4248006343841553,
0.19107423722743988,
0.10720525681972504,
0.1895289421081543,
0.07079803943634033,
0.08784876763820648,
0.010775208473205566,
-0.18007656931877136,
0.2567818760871887,
-0.09754343330860138,
0.15388745069503784,
0.1831832230091095,
-0.10485552251338959,
-0.03801586478948593,
0.09448499977588654,
-0.12536513805389404,
-0.04960992559790611,
-0.02164633944630623,
-0.032071925699710846,
0.2350643426179886,
0.29932940006256104,
-0.0964890867471695,
-0.09952231496572495,
0.14701373875141144,
-0.22737963497638702,
-0.09948047250509262,
0.36906278133392334,
0.13332003355026245,
-0.24979811906814575,
0.5563947558403015,
0.03087368980050087,
0.7407582998275757,
0.1741546392440796,
0.10933760553598404,
-0.15251633524894714,
0.13411226868629456,
-0.16886137425899506,
0.5785021185874939,
0.07812507450580597,
0.24460181593894958,
0.30761396884918213,
0.039833541959524155,
0.17654669284820557,
-0.3225192129611969,
-0.06584857404232025,
-0.27475404739379883,
-0.017987431958317757,
-0.45161572098731995,
0.14295704662799835,
-0.1772156059741974,
-0.08644156157970428,
0.06365235149860382,
0.093300461769104,
-0.2649838626384735,
-0.07157696038484573,
-0.284403920173645,
0.2617306411266327,
-0.1110071986913681,
-0.08302372694015503,
-0.33073538541793823,
0.5629057884216309,
-0.10244499146938324,
0.02800360694527626,
-0.40736129879951477,
0.20543496310710907,
-0.005591344088315964,
-0.06356928497552872,
0.024425290524959564,
-0.21872922778129578,
0.1575872302055359,
0.3347035348415375,
0.055111974477767944,
-0.5854630470275879,
-0.3593093454837799,
-0.052822671830654144,
-0.09446504712104797,
0.39035138487815857,
0.1724386215209961,
0.11305594444274902,
-0.0657796561717987,
0.08745119720697403,
0.07838544249534607,
-0.4421049952507019,
-0.16244733333587646,
-0.10857223719358444,
0.08050784468650818,
-0.035595495253801346,
-0.5832603573799133,
0.08863038569688797,
-0.11223698407411575,
-0.31798630952835083,
0.3029552698135376,
-0.1849260926246643,
-0.015869349241256714,
0.36020681262016296,
0.14568856358528137,
-0.11823907494544983,
0.22851771116256714,
0.11148654669523239,
-0.3562144339084625,
-0.38043373823165894,
0.2303464412689209,
0.018900826573371887,
-0.18553882837295532,
-0.008242756128311157,
0.3469330668449402,
-0.08385902643203735,
-0.018870046362280846,
-0.4008655548095703,
-0.4105553925037384,
-0.020596956834197044,
0.15767668187618256,
-0.48531287908554077,
0.17630529403686523,
0.288146436214447,
0.10803810507059097,
0.0042744968086481094,
-0.21343225240707397,
-0.3085688650608063,
0.08563587814569473,
0.015478702262043953,
0.09698287397623062,
0.2660857141017914,
0.15460118651390076,
0.1356145739555359,
0.3915196657180786,
0.13917388021945953,
0.029150154441595078,
0.5260350704193115,
0.02584567666053772,
0.5229887366294861,
-0.06423435360193253,
-0.17014308273792267,
-0.07550226897001266,
-0.3477288484573364,
-0.19080513715744019,
-0.010206945240497589,
0.19661027193069458,
0.000045525841414928436,
-0.1479380577802658,
0.07806652784347534,
-0.008250925689935684,
-0.13531875610351562,
-0.10599052906036377,
-0.2934725284576416,
0.08569609373807907,
-0.25104790925979614,
0.26672300696372986,
-0.0656668096780777,
0.21978822350502014,
0.28213822841644287,
0.22036105394363403,
0.5143420696258545,
-0.08398975431919098,
-0.36521628499031067,
0.11466233432292938,
-0.31436729431152344,
0.194671630859375,
0.014597129076719284,
0.2668674886226654,
-0.07039245218038559,
-0.12596116960048676,
0.14985106885433197,
-0.21957537531852722,
0.7102046012878418,
0.2120884358882904,
-0.15869344770908356,
0.11781857907772064,
-0.028959155082702637,
-0.32040271162986755,
-0.04361259937286377,
0.13485373556613922,
-0.11881343275308609,
-0.1107306182384491,
0.5334283113479614,
-0.3435938358306885,
-0.7013638019561768,
-0.05770716071128845,
-0.17587721347808838,
-0.04967496171593666,
-0.32733628153800964,
-0.14487622678279877,
-0.028334692120552063,
-0.07873757183551788,
-0.31450149416923523,
0.19694490730762482,
-0.08915021270513535,
-0.33038878440856934,
0.12626855075359344,
-0.039141006767749786,
0.05795556306838989,
0.21489712595939636,
-0.20341569185256958,
0.3623156249523163,
-0.30086272954940796,
-0.035122476518154144,
0.09642874449491501,
-0.09770001471042633,
0.3348493278026581,
0.41444283723831177,
-0.38293957710266113,
-0.02241690456867218,
0.04893110692501068,
0.23133596777915955,
0.4276828467845917,
0.47497498989105225,
-0.11280062049627304,
0.09699402004480362,
-0.1925339251756668,
-0.011515043675899506,
-0.6485269069671631,
-0.3093092739582062,
0.22332997620105743,
-0.11554920673370361,
0.18589650094509125,
-0.2682916820049286,
0.5140957832336426,
0.060291845351457596,
-0.1319882869720459,
0.1729760468006134,
0.6043648719787598,
-0.2172529548406601,
0.41677796840667725,
0.006173528730869293,
1.160265326499939,
0.22740358114242554,
0.3235783576965332,
0.2741343677043915,
-0.012367837131023407,
-0.07828786969184875,
0.006920713931322098,
-0.3219534754753113,
-0.20248349010944366,
0.029500208795070648,
-0.0688580721616745,
-0.17047470808029175,
0.3323308229446411,
0.18867163360118866,
-0.12581393122673035,
0.2152789831161499,
-0.0010035932064056396,
0.03360232338309288,
0.07273884862661362,
0.15433570742607117,
-0.3700368106365204,
-0.1678323745727539,
-0.5829808115959167,
0.17768999934196472,
-0.1125873476266861,
0.15040865540504456,
-0.1899474859237671,
-0.03446032106876373,
0.20841190218925476,
-0.22341163456439972,
-0.1629124879837036,
0.15339183807373047,
-0.050524815917015076,
0.38498008251190186,
0.3239665925502777,
0.09036467969417572,
0.10753270983695984,
0.44266098737716675,
0.26709720492362976,
-0.05818364396691322,
-0.11576004326343536,
0.0005093365907669067,
-0.09194783121347427,
0.4101496934890747,
-0.2580537497997284,
0.015705790370702744,
0.31336313486099243,
-0.017343435436487198,
0.001983746886253357,
-0.19420799612998962,
-0.19209890067577362,
-0.5431443452835083,
-0.2744160294532776,
0.005517981946468353,
0.11892488598823547,
-0.24744121730327606,
-0.327577143907547,
0.050642311573028564,
0.08834920823574066,
-0.13079744577407837,
0.06348060071468353,
0.35827165842056274,
-0.10868541896343231,
0.3089362680912018,
-0.122725710272789,
0.023605063557624817,
-0.011862140148878098,
0.6009683012962341,
-0.17372941970825195,
-0.23440879583358765,
0.19053581357002258,
-0.16974128782749176,
-0.3451773524284363,
-0.12750379741191864,
0.0878017321228981,
-0.15008437633514404,
-0.2677551507949829,
0.3685719072818756,
0.0700831487774849,
0.05306597054004669,
-0.026667337864637375,
0.34022071957588196,
0.2491990625858307,
-0.09518437832593918,
-0.02585839107632637,
0.031676165759563446,
-0.15340586006641388,
0.2205260545015335,
-0.07095420360565186,
0.42447784543037415,
0.14022883772850037,
-0.5119203925132751,
-0.25728529691696167,
-0.31242677569389343,
-0.2755938172340393,
0.4250448942184448,
0.24358093738555908,
-0.057873502373695374,
0.1262091100215912,
-0.2447967529296875,
0.2265767753124237,
-0.3591034412384033,
0.05191940814256668,
-0.11466546356678009,
-0.2053619921207428,
-0.08232565224170685,
-0.17631687223911285,
0.20548410713672638,
0.17843317985534668,
-0.1466808319091797,
-0.19902895390987396,
-0.17557750642299652,
-0.2053208351135254,
-0.059321992099285126,
0.0834265947341919,
0.4702325463294983,
-0.03009314090013504,
0.35855114459991455,
0.30388835072517395,
0.27097541093826294,
0.04356774687767029,
0.4493480324745178,
0.20867688953876495,
0.5431398153305054,
-0.06892409920692444,
0.06411559134721756,
-0.24135249853134155,
-0.17006942629814148,
-0.07022609561681747,
0.3328325152397156,
0.3168465495109558,
0.1818636953830719,
0.43596652150154114,
-0.1630513221025467,
-0.14775484800338745,
-0.16054469347000122,
0.4211142957210541,
0.27263978123664856,
-0.23744826018810272,
0.07612356543540955,
0.0516747385263443,
0.16194382309913635,
0.052903883159160614,
-0.09345680475234985,
0.0077039217576384544,
0.03952435031533241,
-0.11235601454973221,
0.1899624764919281,
0.2887117266654968,
0.08594289422035217,
0.27057376503944397,
0.1062365397810936,
0.10065296292304993,
0.1640249490737915,
-0.05415517836809158,
0.11726213991641998,
0.1176346093416214,
0.18019957840442657,
0.2756781280040741,
0.13701505959033966,
0.35082879662513733,
0.22061598300933838,
-0.29417937994003296,
0.21975204348564148,
0.049545206129550934,
0.1925986260175705,
0.0958903580904007,
-0.4254375100135803,
0.18539582192897797,
0.08407474309206009,
-0.2703535854816437,
0.054177284240722656,
-0.06250391900539398,
0.4646992087364197,
-0.277723491191864,
-0.45221176743507385,
-0.02000792697072029,
0.07013797760009766,
-0.3371392786502838,
-0.3133407235145569,
0.11375945806503296,
0.11252634972333908,
-0.023746471852064133,
0.015326745808124542,
-0.24946460127830505,
-0.3454880714416504,
0.3147014379501343,
0.19309112429618835,
0.2052011787891388,
0.010275441221892834,
0.03156695514917374,
0.10079779475927353,
0.431601881980896,
0.05098075792193413,
0.11409737914800644,
0.012973934412002563,
0.04465344548225403,
0.1491837352514267,
0.18181975185871124,
0.5209259986877441,
0.28945744037628174,
-0.049012456089258194,
-0.19550760090351105,
0.2269560545682907,
-0.06749612092971802,
0.2563056945800781,
0.22351841628551483,
-0.17418968677520752,
0.3546527922153473,
0.35324838757514954,
0.11429959535598755,
-0.03245241567492485,
-0.007332678884267807,
-0.032176513224840164,
0.3235889971256256,
-0.5801621079444885,
0.6098484396934509,
-0.1450807750225067,
-0.1527252048254013,
-0.20846214890480042,
0.26528263092041016,
-0.3405240774154663,
-0.2384224236011505,
0.40439364314079285,
-0.1550978571176529,
0.12120591849088669,
-0.09909555315971375,
0.0729261040687561,
0.26614147424697876,
0.023722242563962936,
0.3309854567050934,
-0.04168994724750519,
-0.1648200899362564,
0.01031406968832016,
-0.5853936672210693,
-0.3016923666000366,
0.6066741943359375,
0.39159801602363586,
-0.06585197150707245,
0.10190805792808533,
-0.04769877344369888,
-0.11573946475982666,
-0.029647335410118103,
-0.33446216583251953,
0.14961186051368713,
0.1259126216173172,
-0.1370115429162979,
0.05903332680463791,
-0.023084551095962524,
-0.02865658514201641,
-0.06123434007167816,
-0.4058883786201477,
0.18256326019763947,
-0.08301470428705215,
-0.11382047832012177,
-0.11386562883853912,
0.23405390977859497,
-0.11550404131412506,
0.04832414165139198,
0.4780340790748596,
0.0383191742002964,
-0.1425560563802719,
0.06522541493177414,
-0.35104501247406006,
0.10391846299171448,
-0.21393805742263794,
0.18840469419956207,
-0.09215586632490158,
-0.3530213534832001,
0.26914843916893005,
-0.3074359893798828,
0.1727098971605301,
-0.23455718159675598,
0.10641156882047653,
0.020758040249347687,
-0.29941675066947937,
-0.6441969871520996,
0.2522711753845215,
-0.3304204046726227,
-0.1613636165857315,
0.0005199229344725609,
0.20138901472091675,
-0.09330585598945618,
0.36980339884757996,
-0.32143864035606384,
-0.16766852140426636,
0.5454748868942261,
-0.16385604441165924,
-0.04258762300014496,
0.00744506623595953,
0.3479035496711731,
0.287331759929657,
-0.20244908332824707,
-0.7787487506866455,
-0.16899606585502625,
0.26123449206352234,
-0.05556235462427139,
-0.03133203461766243,
0.49944615364074707,
-0.27032119035720825,
-0.16566351056098938,
-0.1638454645872116,
0.39491674304008484,
-0.06070506572723389,
0.12030830979347229,
0.34582027792930603,
-0.32581663131713867
] |
https://github.com/huggingface/datasets/issues/5383 | IterableDataset missing column_names, differs from Dataset interface | Another example is that `IterableDataset.map` does not have `fn_kwargs`, among other arguments. It makes it harder to convert code from Dataset to IterableDataset. | ### Describe the bug
The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like
```
dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...)
```
will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available.
### Steps to reproduce the bug
See above
### Expected behavior
Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation.
### Environment info
n/a | 23 | IterableDataset missing column_names, differs from Dataset interface
### Describe the bug
The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like
```
dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...)
```
will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available.
### Steps to reproduce the bug
See above
### Expected behavior
Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation.
### Environment info
n/a
Another example is that `IterableDataset.map` does not have `fn_kwargs`, among other arguments. It makes it harder to convert code from Dataset to IterableDataset. | [
-0.028434697538614273,
-0.22802451252937317,
-0.020680371671915054,
0.1344291865825653,
0.23493483662605286,
0.3893427848815918,
0.4180056154727936,
0.05439216271042824,
0.08721564710140228,
0.11261903494596481,
-0.031082259491086006,
0.3224223852157593,
-0.08553209155797958,
0.21674583852291107,
0.24724161624908447,
-0.30461055040359497,
0.32922592759132385,
0.0267394557595253,
-0.22020745277404785,
-0.06441196799278259,
-0.06530830264091492,
0.34960129857063293,
-0.42519259452819824,
-0.030144311487674713,
0.2056753784418106,
-0.028868114575743675,
-0.20139870047569275,
0.07703913748264313,
-0.05692026764154434,
-0.27234235405921936,
0.3690100610256195,
0.1095394492149353,
0.045378994196653366,
0.24571937322616577,
-0.000127503284602426,
-0.03658716753125191,
0.27802151441574097,
-0.17496365308761597,
-0.4705260396003723,
-0.03593084216117859,
-0.1935071349143982,
-0.03253132849931717,
0.15046928822994232,
-0.3295367956161499,
0.011362921446561813,
-0.47588643431663513,
0.14537617564201355,
-0.3380539119243622,
0.02163933962583542,
0.1048521175980568,
0.08164045214653015,
0.30770236253738403,
0.0440111942589283,
-0.06929375976324081,
0.12383390963077545,
0.44798779487609863,
-0.4191437363624573,
0.24891681969165802,
0.4935961663722992,
0.052008070051670074,
0.1399860978126526,
0.14396606385707855,
-0.21767355501651764,
0.03920743986964226,
0.3257126212120056,
0.14882227778434753,
-0.31680020689964294,
-0.18655997514724731,
0.1272846758365631,
0.32733064889907837,
0.37086406350135803,
-0.27874496579170227,
-0.33179622888565063,
-0.551310658454895,
-0.09018796682357788,
-0.20519769191741943,
0.13940146565437317,
-0.12651152908802032,
-0.04556378722190857,
0.17313216626644135,
-0.2851409912109375,
-0.11304885894060135,
-0.04754314199090004,
0.24000081419944763,
0.3664126694202423,
0.04242067039012909,
-0.346757709980011,
0.3616911768913269,
-0.13608653843402863,
-0.0168059803545475,
0.1056445762515068,
-0.22218970954418182,
-0.045811381191015244,
0.2234424650669098,
-0.36546289920806885,
0.09686225652694702,
0.08219435811042786,
0.0341147780418396,
0.32017388939857483,
0.17255909740924835,
0.26443737745285034,
-0.1755731701850891,
-0.04685444012284279,
0.09942410886287689,
0.43617674708366394,
0.010038632899522781,
-0.05481959134340286,
0.27325639128685,
0.06633862853050232,
0.267598956823349,
0.09247861802577972,
-0.2188180387020111,
0.1105014756321907,
0.3085249960422516,
0.2246033102273941,
-0.24729028344154358,
0.1866963654756546,
-0.019979752600193024,
-0.20174483954906464,
-0.16328759491443634,
-0.37792032957077026,
-0.1291024535894394,
0.12331204861402512,
0.08302658051252365,
0.1257297843694687,
-0.11476439982652664,
-0.2630944848060608,
0.2095022350549698,
0.23482318222522736,
-0.17315320670604706,
-0.23194444179534912,
-0.12840880453586578,
0.025777023285627365,
0.008137887343764305,
-0.030088596045970917,
-0.5736185908317566,
0.39658403396606445,
-0.008664748631417751,
-0.0990043431520462,
0.22035923600196838,
-0.06557787954807281,
0.04437034949660301,
0.31384730339050293,
0.3400535583496094,
0.02581244334578514,
0.26903218030929565,
-0.009310651570558548,
-0.18800418078899384,
-0.14929048717021942,
-0.052743807435035706,
-0.21207088232040405,
-0.187367245554924,
-0.0800989493727684,
0.043408919125795364,
-0.12170913070440292,
-0.10081224143505096,
-0.33311739563941956,
0.2905485928058624,
0.002210579812526703,
-0.5351059436798096,
0.17876853048801422,
-0.04260123521089554,
0.1198263168334961,
-0.2620992362499237,
0.21731388568878174,
0.34196028113365173,
-0.3060694634914398,
-0.12243615090847015,
-0.20652265846729279,
-0.10983775556087494,
0.325636625289917,
0.026318151503801346,
0.00258250767365098,
0.06035992503166199,
-0.4311361312866211,
0.21896113455295563,
0.3842601776123047,
0.0014173239469528198,
-0.1694849729537964,
0.28321146965026855,
0.25240594148635864,
0.46431493759155273,
0.06526032090187073,
0.009173237718641758,
0.2307116985321045,
-0.03650891035795212,
0.008348383009433746,
-0.06435158848762512,
-0.38910701870918274,
-0.1687847375869751,
0.04210124537348747,
-0.2198675572872162,
-0.026715420186519623,
-0.0050262585282325745,
-0.18772883713245392,
0.5082654356956482,
0.29356226325035095,
-0.2039327621459961,
0.3335149586200714,
0.01622270792722702,
0.17535533010959625,
0.1939949095249176,
0.18137748539447784,
0.20994241535663605,
0.22436344623565674,
-0.4109412729740143,
-0.749943733215332,
0.13037380576133728,
0.580718994140625,
-0.21426692605018616,
0.05477657541632652,
-0.1362628936767578,
-0.22685924172401428,
0.10721104592084885,
-0.036412257701158524,
-0.19491207599639893,
-0.044566020369529724,
0.3847857117652893,
0.21721205115318298,
-0.22817924618721008,
-0.6301715970039368,
0.25834599137306213,
-0.60576331615448,
-0.1352916955947876,
-0.4355050325393677,
0.14826780557632446,
0.28989991545677185,
-0.16736456751823425,
-0.06336631625890732,
0.14245975017547607,
0.018177513033151627,
-0.28095120191574097,
-0.05036424845457077,
0.3974374830722809,
-0.14077197015285492,
0.08013257384300232,
0.03872162848711014,
0.5977376699447632,
0.046985235065221786,
0.008594226092100143,
-0.18498463928699493,
0.03549439460039139,
0.16331234574317932,
-0.16629329323768616,
-0.10811222344636917,
-0.026837125420570374,
-0.15999576449394226,
0.5105663537979126,
0.24495680630207062,
0.1305452138185501,
0.3400784730911255,
0.27225252985954285,
-0.3790525794029236,
-0.27027708292007446,
0.006625853478908539,
-0.4419207274913788,
0.32721689343452454,
-0.28949087858200073,
-0.39554715156555176,
0.26665037870407104,
0.4030611217021942,
-0.015036865137517452,
-0.13888639211654663,
-0.045776911079883575,
-0.21805933117866516,
-0.0692640021443367,
0.13537482917308807,
0.27151140570640564,
0.598974347114563,
0.029900066554546356,
0.4077487885951996,
0.05485887825489044,
0.18197892606258392,
0.01096336916089058,
0.23575030267238617,
0.18233545124530792,
0.04860294982790947,
-0.0490330308675766,
0.0858168676495552,
0.06713816523551941,
-0.3560048043727875,
-0.1836128681898117,
0.006203433498740196,
0.21264664828777313,
-0.16818924248218536,
0.16925930976867676,
-0.23862984776496887,
-0.2953321635723114,
0.03608383983373642,
-0.3738899827003479,
0.020718611776828766,
-0.4548337161540985,
-0.2500365376472473,
0.5372209548950195,
-0.21299827098846436,
0.14997483789920807,
-0.15898235142230988,
0.2934185266494751,
0.04827158898115158,
-0.03715367615222931,
-0.491065114736557,
-0.06539685279130936,
-0.27470123767852783,
-0.05608326941728592,
-0.0501612164080143,
-0.29267898201942444,
0.19479556381702423,
-0.06500636786222458,
-0.10879973322153091,
-0.7561633586883545,
-0.3565477728843689,
0.3090672791004181,
-0.2500678300857544,
0.34676307439804077,
0.509371280670166,
0.2592202425003052,
0.015204884111881256,
-0.13589683175086975,
0.18350593745708466,
-0.21412713825702667,
-0.13361062109470367,
-0.001779286190867424,
0.01569978892803192,
-0.25573819875717163,
-0.0751410573720932,
-0.1482812762260437,
0.05398862808942795,
-0.21476376056671143,
0.28461605310440063,
-0.27717268466949463,
0.09175986051559448,
0.29434579610824585,
-0.2530744969844818,
0.23984117805957794,
0.04211993142962456,
0.007639186456799507,
-0.3047032356262207,
-0.4314543604850769,
0.2797558009624481,
-0.2351292073726654,
-0.3051161766052246,
0.1648842990398407,
-0.02083073928952217,
0.11346308887004852,
0.29737263917922974,
-0.3115474581718445,
0.0153964189812541,
-0.07937712222337723,
-0.004004288464784622,
0.2194710671901703,
0.058010533452034,
0.30229616165161133,
-0.08983281254768372,
0.12299659848213196,
-0.36041808128356934,
-0.3925115466117859,
0.055236272513866425,
0.3976649343967438,
0.16102060675621033,
0.37917235493659973,
0.4153701364994049,
-0.15195445716381073,
0.3868444561958313,
0.3557828664779663,
0.2918946444988251,
0.47731444239616394,
-0.36919906735420227,
0.33463364839553833,
-0.35888373851776123,
-0.3959377706050873,
0.21019664406776428,
-0.11376345157623291,
-0.1627749353647232,
0.25420042872428894,
0.04356548190116882,
-0.14322037994861603,
-0.11997101455926895,
0.2542456388473511,
-0.0815950334072113,
-0.14714446663856506,
-0.10226645320653915,
-0.062245868146419525,
0.36212658882141113,
0.2089674323797226,
0.06856798380613327,
-0.016411252319812775,
-0.05387439206242561,
0.044556695967912674,
0.2214507758617401,
0.49681344628334045,
0.06004299223423004,
-0.5035587549209595,
-0.2198317050933838,
-0.3081890940666199,
0.19099250435829163,
0.024954209104180336,
0.468356192111969,
-0.26177066564559937,
-0.37207287549972534,
0.20006754994392395,
0.23124293982982635,
0.5695880651473999,
-0.3401067852973938,
-0.34128832817077637,
0.05835965648293495,
0.24291649460792542,
-0.1377408802509308,
-0.2592419683933258,
-0.07757820934057236,
0.4263544976711273,
0.18830764293670654,
0.4638598561286926,
-0.23300930857658386,
-0.1362011730670929,
0.45250454545021057,
0.14697350561618805,
0.010833043605089188,
-0.013924507424235344,
-0.24912098050117493,
-0.2795622944831848,
0.1319008469581604,
-0.21968141198158264,
0.12223022431135178,
0.059469763189554214,
0.16371220350265503,
-0.15547899901866913,
-0.05074746906757355,
-0.021956294775009155,
-0.07997433841228485,
0.2410072237253189,
0.10180310904979706,
0.07075779885053635,
0.3103916049003601,
0.23332379758358002,
0.25239360332489014,
0.04243890941143036,
0.5283512473106384,
-0.09586957097053528,
-0.3885059952735901,
0.28748467564582825,
-0.21690338850021362,
0.5094513297080994,
0.16133077442646027,
-0.17114031314849854,
0.2462298572063446,
0.43790358304977417,
-0.01772882044315338,
-0.3354368507862091,
-0.22906529903411865,
0.48597055673599243,
-0.004991808440536261,
-0.25663310289382935,
-0.6701827645301819,
0.3175952136516571,
0.12010961771011353,
-0.0714164674282074,
0.8060731291770935,
0.4467300772666931,
-0.12786753475666046,
0.17305555939674377,
-0.2590016722679138,
0.6575118899345398,
0.1693800687789917,
-0.14958444237709045,
0.35866573452949524,
-0.3147289752960205,
0.3715832531452179,
0.18088343739509583,
0.2350107878446579,
-0.09199682623147964,
-0.45153361558914185,
-0.10507205128669739,
-0.06810303032398224,
0.23547852039337158,
0.23018643260002136,
0.1665937751531601,
0.40208953619003296,
0.04083019495010376,
0.6035987138748169,
-0.026437072083353996,
-0.1801999807357788,
-0.1612458974123001,
-0.13924968242645264,
-0.30913829803466797,
-0.016942601650953293,
0.13953576982021332,
0.14295613765716553,
0.07631292194128036,
0.004308634903281927,
0.18070659041404724,
-0.16838224232196808,
-0.4022775888442993,
-0.032792702317237854,
-0.022519323974847794,
-0.2276999056339264,
0.24317115545272827,
-0.29056793451309204,
0.06620241701602936,
0.18524350225925446,
0.10250301659107208,
-0.3468741178512573,
-0.2555607259273529,
0.25210341811180115,
0.09958397597074509,
0.23572498559951782,
-0.10218855738639832,
0.1466723531484604,
0.2828686535358429,
-0.013286177068948746,
0.05947444587945938,
0.09508336335420609,
-0.2747921943664551,
-0.3975048065185547,
-0.2718542218208313,
0.06937723606824875,
0.4533836841583252,
-0.28123921155929565,
-0.11430925130844116,
0.01242142915725708,
0.07423444092273712,
-0.3583029806613922,
-0.061950068920850754,
-0.05015096068382263,
-0.009404304437339306,
0.07139595597982407,
-0.08695065975189209,
0.01701229065656662,
-0.06481122970581055,
0.20008552074432373,
-0.24768319725990295,
-0.07415557652711868,
0.4596015214920044,
-0.03509044647216797,
-0.18071910738945007,
-0.018313104286789894,
-0.24154701828956604,
0.2200317531824112,
-0.15819351375102997,
0.0865994319319725,
-0.11305928975343704,
0.2043030709028244,
-0.10160370171070099,
0.4532787501811981,
-0.027656584978103638,
-0.030630141496658325,
-0.38736701011657715,
-0.49250978231430054,
-0.29583939909935,
0.20731016993522644,
-0.010466348379850388,
-0.011615779250860214,
0.03998900204896927,
-0.5098175406455994,
0.049942247569561005,
-0.19347766041755676,
-0.13976627588272095,
-0.2048158347606659,
0.05619250237941742,
0.06613524258136749,
0.4316103756427765,
0.3990045189857483,
0.4864204227924347,
-0.2058977633714676,
0.050192005932331085,
-0.13157716393470764,
0.12354213744401932,
-0.021683022379875183,
-0.27404505014419556,
0.2223319709300995,
0.09442966431379318,
-0.10659484565258026,
-0.17738448083400726,
-0.23832274973392487,
-0.4813443720340729,
-0.41134291887283325,
0.402160108089447,
0.04023925960063934,
0.07159560918807983,
0.057792048901319504,
-0.04468900337815285,
0.029147308319807053,
-0.2988366484642029,
0.03782304748892784,
0.20543599128723145,
-0.05281384289264679,
0.029030732810497284,
-0.07213951647281647,
-0.05502907186746597,
-0.0811566561460495,
0.15478558838367462,
0.19295190274715424,
0.09050153195858002,
0.022257715463638306,
0.5650339722633362,
-0.1403154581785202,
0.13584089279174805,
0.14222180843353271,
0.3601665794849396,
0.47729671001434326,
-0.014815673232078552,
0.044869668781757355,
0.16583353281021118,
-0.020240558311343193,
-0.34606537222862244,
-0.10490711778402328,
0.18105673789978027,
0.37388312816619873,
0.09556609392166138,
0.10460256040096283,
0.07018190622329712,
-0.04673551023006439,
0.0436367467045784,
-0.06553594022989273,
0.2430313527584076,
-0.13950221240520477,
0.15213793516159058,
0.5108543634414673,
0.18468493223190308,
0.30798351764678955,
0.17652465403079987,
0.07071715593338013,
-0.07007338851690292,
0.4277217984199524,
0.03511696308851242,
0.14866462349891663,
0.30065563321113586,
0.08838032186031342,
0.3292677402496338,
-0.39741718769073486,
0.036760617047548294,
-0.12065857648849487,
0.09143197536468506,
0.3968576192855835,
0.12439095973968506,
0.2265055775642395,
-0.021053951233625412,
0.031471941620111465,
-0.040062788873910904,
-0.23636098206043243,
-0.020541977137327194,
-0.03346361964941025,
-0.004984550178050995,
-0.15294548869132996,
0.10256651043891907,
-0.20521946251392365,
0.04585207253694534,
0.011782262474298477,
0.5593103170394897,
-0.26063817739486694,
0.20935362577438354,
-0.45538684725761414,
-0.1996922791004181,
0.2188926339149475,
0.2645872235298157,
-0.10192403197288513,
0.1641889363527298,
0.06397002935409546,
-0.07532165944576263,
-0.028499465435743332,
0.311691552400589,
0.18053235113620758,
0.16130582988262177,
0.3751845955848694,
-0.038728926330804825,
-0.04927954450249672,
-0.2369980365037918,
0.07472620159387589,
0.4639360010623932,
-0.04604452848434448,
-0.06452134251594543,
-0.01503908634185791,
-0.0734037533402443,
0.09255004674196243,
0.12786847352981567,
0.1328371912240982,
0.22250248491764069,
-0.3563842475414276,
0.24682694673538208,
-0.5312557220458984,
-0.2456236481666565,
-0.026908524334430695,
-0.07571635395288467,
-0.06046057865023613,
-0.15895800292491913,
0.2016749382019043,
-0.09581414610147476,
0.07432111352682114,
0.03277631103992462,
-0.013257326558232307,
-0.08243720233440399,
0.31213802099227905,
0.4496365189552307,
-0.24486222863197327,
0.009604796767234802,
-0.4008445143699646,
-0.49394187331199646,
-0.18330341577529907,
0.036733485758304596,
0.047216370701789856,
0.2776809632778168,
0.2217872142791748,
0.21166390180587769,
-0.146970734000206,
0.21225126087665558,
-0.3075766861438751,
-0.058972567319869995,
0.428008496761322,
-0.1167323887348175,
-0.6369678974151611,
-0.12840992212295532,
0.02512216567993164,
-0.020936131477355957,
-0.20817157626152039,
0.2079876810312271,
-0.09241856634616852,
-0.21368083357810974,
-0.0103883296251297,
0.14732080698013306,
0.12929506599903107,
-0.1750745326280594,
0.21581853926181793,
0.11337246745824814,
0.15882380306720734,
-0.08465206623077393,
-0.13176099956035614,
-0.35975897312164307,
-0.1085154265165329,
-0.11340820044279099,
0.5192721486091614,
-0.32719308137893677,
0.16707618534564972,
-0.10700898617506027,
-0.149117574095726,
-0.3159697651863098,
0.044152479618787766,
0.16007843613624573,
-0.28327152132987976,
-0.4486710727214813,
0.3887583613395691,
-0.39688387513160706,
0.24990880489349365,
0.2101050317287445,
0.05951995402574539,
-0.05337914824485779,
-0.06341972947120667,
-0.16033858060836792,
-0.2012115716934204,
0.5904473066329956,
-0.45801588892936707,
-0.23699474334716797,
0.03930366039276123,
0.050694726407527924,
0.6125072240829468,
-0.24680200219154358,
-0.6452764868736267,
-0.13755527138710022,
0.42615410685539246,
-0.2629949152469635,
0.17205345630645752,
0.15690121054649353,
-0.08142806589603424,
0.1897425353527069,
0.04742961749434471,
0.5047174692153931,
0.27551451325416565,
-0.1878727227449417,
0.24542424082756042,
-0.20646025240421295
] |
https://github.com/huggingface/datasets/issues/5383 | IterableDataset missing column_names, differs from Dataset interface | Hi! `fn_kwargs` was added to `IterableDataset.map` in `datasets 2.5.0`, so please update your installation (`pip install -U datasets`) to use it.
Regarding `column_names`, I agree we should add this property to `IterableDataset`. In the meantime, you can use `list(dataset.features.keys())` instead. | ### Describe the bug
The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like
```
dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...)
```
will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available.
### Steps to reproduce the bug
See above
### Expected behavior
Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation.
### Environment info
n/a | 40 | IterableDataset missing column_names, differs from Dataset interface
### Describe the bug
The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like
```
dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...)
```
will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available.
### Steps to reproduce the bug
See above
### Expected behavior
Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation.
### Environment info
n/a
Hi! `fn_kwargs` was added to `IterableDataset.map` in `datasets 2.5.0`, so please update your installation (`pip install -U datasets`) to use it.
Regarding `column_names`, I agree we should add this property to `IterableDataset`. In the meantime, you can use `list(dataset.features.keys())` instead. | [
-0.009467221796512604,
-0.2536153197288513,
-0.01843317598104477,
0.10106542706489563,
0.19255389273166656,
0.4067719280719757,
0.38206860423088074,
0.10267168283462524,
0.10492873191833496,
0.11748990416526794,
-0.0636005848646164,
0.41396892070770264,
-0.0971875935792923,
0.24759669601917267,
0.18377207219600677,
-0.3123859763145447,
0.3488592207431793,
0.04662581533193588,
-0.1740720272064209,
-0.034310128539800644,
-0.1121976301074028,
0.3902718126773834,
-0.4024370312690735,
0.018837615847587585,
0.22294288873672485,
-0.020971262827515602,
-0.2327568680047989,
0.04753886163234711,
-0.12614808976650238,
-0.3683014512062073,
0.3545530140399933,
0.10010071098804474,
0.025958046317100525,
0.20030994713306427,
-0.00012635446910280734,
-0.06263633072376251,
0.2927032709121704,
-0.15291163325309753,
-0.46052488684654236,
-0.05173337459564209,
-0.10151693224906921,
-0.21347160637378693,
0.1783299744129181,
-0.4191822111606598,
0.048188962042331696,
-0.4834193289279938,
0.10543030500411987,
-0.18600508570671082,
0.10937556624412537,
0.13323667645454407,
0.10378582775592804,
0.30104923248291016,
0.08394336700439453,
-0.04498601332306862,
0.1517128348350525,
0.35267746448516846,
-0.451181024312973,
0.14131155610084534,
0.4503129720687866,
-0.028335288166999817,
0.2543129622936249,
0.23846037685871124,
-0.33945584297180176,
0.017862387001514435,
0.2796761989593506,
0.1806500405073166,
-0.18341591954231262,
-0.28257429599761963,
0.12493882328271866,
0.33596765995025635,
0.3182668685913086,
-0.2974848747253418,
-0.32955822348594666,
-0.594530463218689,
-0.09147331118583679,
-0.2644607424736023,
0.10855036973953247,
-0.1701209396123886,
-0.13425631821155548,
0.09637664258480072,
-0.17555101215839386,
-0.044292766600847244,
0.0411599725484848,
0.24540181457996368,
0.364934504032135,
0.10823405534029007,
-0.3025135099887848,
0.3350558876991272,
-0.06479331851005554,
-0.03967586159706116,
0.09920530021190643,
-0.15081007778644562,
-0.11600196361541748,
0.28314995765686035,
-0.34789222478866577,
0.10985437035560608,
0.14552006125450134,
0.04560083895921707,
0.298837274312973,
0.11886326968669891,
0.15984275937080383,
-0.18800008296966553,
0.040019553154706955,
0.08850934356451035,
0.412757933139801,
0.020295657217502594,
0.011982530355453491,
0.37031933665275574,
0.042914532124996185,
0.21887657046318054,
0.11013902723789215,
-0.24314185976982117,
0.13815005123615265,
0.21072648465633392,
0.27085044980049133,
-0.24672439694404602,
0.253479540348053,
-0.0007747560739517212,
-0.16722863912582397,
-0.07845582813024521,
-0.29034096002578735,
-0.06814923882484436,
0.12539012730121613,
0.14528529345989227,
0.10870426148176193,
-0.03655280917882919,
-0.27926552295684814,
0.2259836047887802,
0.21323581039905548,
-0.00008463021367788315,
-0.22472918033599854,
-0.1394645720720291,
0.11373616755008698,
-0.05496571213006973,
-0.00034827739000320435,
-0.5410980582237244,
0.40796399116516113,
0.0009431913495063782,
-0.09646010398864746,
0.2263348400592804,
-0.13428691029548645,
0.050269097089767456,
0.2673736810684204,
0.4248879849910736,
-0.028532885015010834,
0.3201878070831299,
0.0378851555287838,
-0.19104765355587006,
-0.17037813365459442,
-0.04657445847988129,
-0.26818957924842834,
-0.18535274267196655,
-0.08724130690097809,
0.04283653944730759,
-0.13444775342941284,
-0.13972648978233337,
-0.4021543562412262,
0.2422214299440384,
0.03810245543718338,
-0.539767324924469,
0.16672354936599731,
-0.08222378045320511,
0.1569911241531372,
-0.28621959686279297,
0.1932632327079773,
0.3224155604839325,
-0.18790456652641296,
-0.17146387696266174,
-0.2316337525844574,
-0.04492076858878136,
0.35516998171806335,
-0.02846042439341545,
0.042861033231019974,
0.0671430304646492,
-0.36753830313682556,
0.19041849672794342,
0.4726680517196655,
-0.07249677181243896,
-0.24793046712875366,
0.27446436882019043,
0.27419883012771606,
0.44938117265701294,
0.08391377329826355,
0.031391508877277374,
0.1457940936088562,
0.012303910218179226,
-0.036704838275909424,
-0.10831275582313538,
-0.3189457058906555,
-0.09585317969322205,
-0.024266215041279793,
-0.24344012141227722,
0.02188357710838318,
-0.04502187669277191,
-0.11842896044254303,
0.47752127051353455,
0.1833042949438095,
-0.23041720688343048,
0.33975860476493835,
0.021109890192747116,
0.14154894649982452,
0.20199480652809143,
0.28915101289749146,
0.24066446721553802,
0.30508023500442505,
-0.4419163465499878,
-0.7145332098007202,
0.1506616473197937,
0.4443652629852295,
-0.18525247275829315,
-0.19285105168819427,
-0.15516990423202515,
-0.2828182280063629,
0.158847838640213,
-0.10224644839763641,
-0.2362806797027588,
-0.00922408141195774,
0.3326122462749481,
0.23608696460723877,
-0.16656120121479034,
-0.569499671459198,
0.2480330914258957,
-0.4240700304508209,
-0.09381664544343948,
-0.44345077872276306,
0.1724485456943512,
0.20650288462638855,
-0.1747085154056549,
-0.14374718070030212,
0.2302226424217224,
0.1313263177871704,
-0.22357963025569916,
-0.04225127771496773,
0.42387646436691284,
-0.11957123875617981,
0.026240728795528412,
0.008323635905981064,
0.5256664156913757,
0.04745085909962654,
0.0768260508775711,
-0.1933533400297165,
0.07868371903896332,
0.15687566995620728,
-0.12021959573030472,
-0.06317472457885742,
0.014499291777610779,
-0.22981755435466766,
0.568479061126709,
0.14589639008045197,
0.20298722386360168,
0.3149855136871338,
0.26252561807632446,
-0.3540019690990448,
-0.27752187848091125,
0.021955670788884163,
-0.4888826906681061,
0.2594757378101349,
-0.35489222407341003,
-0.32913100719451904,
0.21539106965065002,
0.3832179009914398,
0.034118395298719406,
-0.14315766096115112,
-0.030501052737236023,
-0.19546383619308472,
-0.019879134371876717,
0.10634505748748779,
0.2780856192111969,
0.6029514670372009,
0.030149180442094803,
0.3821198046207428,
0.060577936470508575,
0.17794635891914368,
0.04717724025249481,
0.24469760060310364,
0.2134505659341812,
-0.07335785031318665,
0.009543556720018387,
0.13913926482200623,
0.06121642887592316,
-0.29194095730781555,
-0.10277435183525085,
-0.03061824105679989,
0.2909358739852905,
-0.2088264524936676,
0.20834532380104065,
-0.22461476922035217,
-0.289349228143692,
0.10105615854263306,
-0.42006006836891174,
-0.01843401789665222,
-0.5305781960487366,
-0.16417375206947327,
0.4940272569656372,
-0.20519204437732697,
0.19474248588085175,
-0.1683245599269867,
0.12092217803001404,
0.08909571170806885,
-0.09939753264188766,
-0.5421113967895508,
-0.08364225924015045,
-0.21433061361312866,
-0.06369303166866302,
-0.10328047722578049,
-0.20778000354766846,
0.18459728360176086,
-0.032996922731399536,
-0.1183549091219902,
-0.7122896909713745,
-0.3908846080303192,
0.24110808968544006,
-0.3473441004753113,
0.40499967336654663,
0.5519065856933594,
0.28296077251434326,
-0.05178465694189072,
-0.18228505551815033,
0.2946400046348572,
-0.1963607519865036,
-0.09063482284545898,
0.09580482542514801,
0.013023193925619125,
-0.22340111434459686,
-0.05698486045002937,
-0.10993783921003342,
-0.07286616414785385,
-0.24576632678508759,
0.334303081035614,
-0.23144008219242096,
0.12395491451025009,
0.3085310459136963,
-0.26073533296585083,
0.1715703159570694,
0.01842675730586052,
-0.019608337432146072,
-0.2881777882575989,
-0.34211620688438416,
0.349676251411438,
-0.2535334527492523,
-0.2756749391555786,
0.14182978868484497,
-0.02462756074965,
0.060953523963689804,
0.21709157526493073,
-0.31143227219581604,
-0.15036609768867493,
-0.09379397332668304,
0.1079479306936264,
0.2393423467874527,
0.1100127249956131,
0.3003374934196472,
-0.010543540120124817,
0.12088224291801453,
-0.34456667304039,
-0.25648033618927,
0.02238062024116516,
0.42814165353775024,
0.1756507158279419,
0.3276734948158264,
0.4086209833621979,
-0.11065730452537537,
0.39454811811447144,
0.41707998514175415,
0.3719703257083893,
0.446586936712265,
-0.43406441807746887,
0.30066972970962524,
-0.2997541129589081,
-0.5279824137687683,
0.08505275100469589,
-0.12099713087081909,
-0.1512926071882248,
0.16513505578041077,
0.045437294989824295,
-0.08972334116697311,
-0.1869926005601883,
0.289966344833374,
-0.1246831864118576,
-0.1847587525844574,
-0.07223150879144669,
-0.05604010075330734,
0.38818788528442383,
0.20284216105937958,
0.09461208432912827,
-0.09192103147506714,
-0.11423536390066147,
-0.003438366111367941,
0.16110530495643616,
0.389792799949646,
0.05691075697541237,
-0.5483747124671936,
-0.3147312104701996,
-0.36101359128952026,
0.22579357028007507,
0.01290484331548214,
0.4474624991416931,
-0.2087562084197998,
-0.30947086215019226,
0.18827691674232483,
0.22853758931159973,
0.6174219250679016,
-0.3731534481048584,
-0.37837016582489014,
0.14476460218429565,
0.32998403906822205,
-0.23641277849674225,
-0.2838342785835266,
-0.03932315111160278,
0.4089699983596802,
0.154243603348732,
0.4184468388557434,
-0.26742756366729736,
-0.14195412397384644,
0.4403761923313141,
0.19519267976284027,
-0.04428345710039139,
0.006892411969602108,
-0.3056263029575348,
-0.32611405849456787,
0.05482562631368637,
-0.1659311056137085,
0.16103655099868774,
0.12758857011795044,
0.08308389037847519,
-0.07401071488857269,
-0.012704567983746529,
0.04054395109415054,
-0.08515520393848419,
0.24075858294963837,
0.1473187506198883,
0.06387698650360107,
0.3103331923484802,
0.20625877380371094,
0.20902062952518463,
-0.011657511815428734,
0.571320652961731,
-0.10593082010746002,
-0.3603149354457855,
0.08687356859445572,
-0.24971377849578857,
0.46761271357536316,
0.1247970461845398,
-0.2298160046339035,
0.21016483008861542,
0.3312501311302185,
0.03302142024040222,
-0.2609533369541168,
-0.2302434891462326,
0.5325038433074951,
-0.008460666052997112,
-0.2263704389333725,
-0.696443498134613,
0.405932754278183,
0.16163179278373718,
-0.10548669099807739,
0.7455126047134399,
0.39136558771133423,
-0.152399480342865,
0.26471567153930664,
-0.3157874047756195,
0.6609678268432617,
0.1890820562839508,
-0.14887556433677673,
0.42045727372169495,
-0.24495580792427063,
0.4160482585430145,
0.09328362345695496,
0.17766514420509338,
-0.14133143424987793,
-0.4498909115791321,
-0.09998346865177155,
-0.03770900517702103,
0.25959354639053345,
0.16683876514434814,
0.10790321230888367,
0.4311969578266144,
0.07599540054798126,
0.47598907351493835,
-0.1286381632089615,
-0.26221907138824463,
-0.17275483906269073,
-0.19280941784381866,
-0.26733362674713135,
-0.018805287778377533,
0.06697236001491547,
0.19025284051895142,
0.10582215338945389,
-0.00837123766541481,
0.13040022552013397,
-0.2616923749446869,
-0.42550599575042725,
-0.09469211846590042,
-0.13073615729808807,
-0.11883759498596191,
0.2426759898662567,
-0.36481088399887085,
-0.06941621750593185,
0.26425158977508545,
0.11605330556631088,
-0.31531697511672974,
-0.27358248829841614,
0.26531311869621277,
0.15049460530281067,
0.20963549613952637,
-0.0580325573682785,
0.1429632008075714,
0.18833830952644348,
-0.026873111724853516,
0.012340165674686432,
0.04798686131834984,
-0.26139310002326965,
-0.33054518699645996,
-0.21895729005336761,
0.08317209035158157,
0.4597828984260559,
-0.2752892076969147,
-0.18632183969020844,
-0.03319992125034332,
0.06864282488822937,
-0.3474109470844269,
-0.036827389150857925,
-0.014134854078292847,
-0.12161195278167725,
0.21534621715545654,
-0.2620682418346405,
0.035464607179164886,
-0.03329090401530266,
0.21080654859542847,
-0.2774888575077057,
-0.12854303419589996,
0.5023574829101562,
-0.05970637500286102,
-0.16932564973831177,
-0.018425121903419495,
-0.1724342703819275,
0.1236923485994339,
-0.211521178483963,
0.06310705095529556,
-0.03417182341217995,
0.20867399871349335,
-0.08267778903245926,
0.5280155539512634,
-0.08327797055244446,
-0.058680228888988495,
-0.35592687129974365,
-0.41681987047195435,
-0.33861011266708374,
0.23914121091365814,
0.09107863157987595,
0.047400832176208496,
-0.002588775008916855,
-0.49673521518707275,
0.034803979098796844,
-0.17627927660942078,
-0.15328815579414368,
-0.16294533014297485,
0.03802929073572159,
0.08871123939752579,
0.4562009871006012,
0.36538392305374146,
0.48070448637008667,
-0.225565567612648,
0.07021009176969528,
-0.05264074355363846,
0.1178465262055397,
-0.05108828842639923,
-0.2513590157032013,
0.22116272151470184,
0.05547928065061569,
-0.12170834094285965,
-0.1995595544576645,
-0.2269594371318817,
-0.3832509219646454,
-0.4119286835193634,
0.36185500025749207,
0.07215791940689087,
0.08434106409549713,
0.20824794471263885,
-0.07251155376434326,
0.06765256077051163,
-0.17324654757976532,
0.09088267385959625,
0.13866105675697327,
-0.06608451902866364,
0.10347604751586914,
-0.010787393897771835,
-0.06780024617910385,
-0.020685065537691116,
0.14572995901107788,
0.16197922825813293,
0.004098102450370789,
-0.021778948605060577,
0.6233786344528198,
-0.2123401015996933,
0.09742876887321472,
0.18640203773975372,
0.3477969467639923,
0.4797079265117645,
-0.05894208326935768,
0.09878110140562057,
0.21788117289543152,
0.015760239213705063,
-0.39778831601142883,
-0.12273233383893967,
0.24183054268360138,
0.4070444703102112,
0.11736619472503662,
0.14873087406158447,
0.16618992388248444,
-0.15027642250061035,
0.03723251447081566,
-0.041951656341552734,
0.24071262776851654,
-0.2407071441411972,
0.13347181677818298,
0.660487949848175,
0.24457941949367523,
0.26980188488960266,
0.14538219571113586,
0.07446500658988953,
-0.08796768635511398,
0.4910844564437866,
0.04118011146783829,
0.11441405117511749,
0.3794231414794922,
0.04654082655906677,
0.2950499355792999,
-0.3479975163936615,
0.040060047060251236,
-0.22862306237220764,
0.040234386920928955,
0.3568838834762573,
0.14050738513469696,
0.2434898018836975,
-0.05628069117665291,
0.027531929314136505,
-0.07645098865032196,
-0.12197236716747284,
-0.006728429347276688,
-0.15652631223201752,
0.10321703553199768,
-0.1463412642478943,
0.040847212076187134,
-0.24203431606292725,
0.05545295402407646,
-0.07479190826416016,
0.4780395030975342,
-0.22706468403339386,
0.17305296659469604,
-0.4782029688358307,
-0.24498063325881958,
0.24250882863998413,
0.3943344056606293,
-0.18841370940208435,
0.07825169712305069,
0.1570083647966385,
-0.11915040016174316,
-0.0757635086774826,
0.26229193806648254,
0.2853347957134247,
0.13201259076595306,
0.25356870889663696,
0.030383095145225525,
-0.11833018064498901,
-0.19918954372406006,
0.05055191367864609,
0.47029078006744385,
-0.07903097569942474,
0.0374847836792469,
-0.003938678652048111,
-0.060081273317337036,
0.04579104855656624,
0.07919363677501678,
0.07997898757457733,
0.28494271636009216,
-0.3069812059402466,
0.34226176142692566,
-0.48754265904426575,
-0.318707674741745,
-0.01538146287202835,
-0.09174036234617233,
-0.11003178358078003,
-0.14335501194000244,
0.2371334582567215,
0.02722199447453022,
0.10804934054613113,
-0.030819296836853027,
-0.004581501707434654,
-0.0796671211719513,
0.2659114897251129,
0.45486804842948914,
-0.17990097403526306,
-0.04422399029135704,
-0.31573790311813354,
-0.5339460372924805,
-0.2582211494445801,
-0.03708016499876976,
-0.0014084894210100174,
0.3856326639652252,
0.14819589257240295,
0.17486491799354553,
-0.10004700720310211,
0.1443120539188385,
-0.30788135528564453,
-0.08957113325595856,
0.5272720456123352,
-0.1142110675573349,
-0.6106604337692261,
-0.13279348611831665,
0.1045265793800354,
0.02852802351117134,
-0.24257135391235352,
0.16217496991157532,
-0.12331380695104599,
-0.18175259232521057,
-0.02522607520222664,
0.0670909434556961,
0.11034691333770752,
-0.13711491227149963,
0.21957093477249146,
0.1319575309753418,
0.13866904377937317,
-0.07715796679258347,
-0.1124335452914238,
-0.43412137031555176,
-0.13325586915016174,
-0.07978079468011856,
0.4561638832092285,
-0.26583030819892883,
0.23550456762313843,
-0.11403800547122955,
-0.1780039519071579,
-0.3071794807910919,
0.00041968049481511116,
0.14761681854724884,
-0.32852089405059814,
-0.3528599143028259,
0.34973272681236267,
-0.2717262804508209,
0.27470192313194275,
0.1272677779197693,
0.10669775307178497,
-0.060034625232219696,
0.0009695161134004593,
-0.10911443829536438,
-0.3289852738380432,
0.6285859942436218,
-0.4217512309551239,
-0.2714828550815582,
0.038400936871767044,
0.05177951604127884,
0.5717117786407471,
-0.17707476019859314,
-0.6474645733833313,
-0.14522741734981537,
0.4371587336063385,
-0.2657620310783386,
0.16604860126972198,
0.16207554936408997,
-0.059581298381090164,
0.1950700581073761,
0.054058436304330826,
0.39564424753189087,
0.2414470911026001,
-0.09738334268331528,
0.2800546884536743,
-0.22306294739246368
] |
https://github.com/huggingface/datasets/issues/5383 | IterableDataset missing column_names, differs from Dataset interface | Thanks! That's great news.
On Thu, Dec 22, 2022, 07:48 Mario Šaško ***@***.***> wrote:
> Hi! fn_kwargs was added to IterableDataset.map in datasets 2.5.0, so
> please update your installation (pip install -U datasets) to use it.
>
> Regarding column_names, I agree we should add this property to
> IterableDataset. In the meantime, you can use
> list(dataset.features.keys()) instead.
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/5383#issuecomment-1362993633>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAHD6N2EQUFEOUFDW3VHSILWORZ45ANCNFSM6AAAAAATGKWVGM>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
| ### Describe the bug
The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like
```
dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...)
```
will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available.
### Steps to reproduce the bug
See above
### Expected behavior
Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation.
### Environment info
n/a | 96 | IterableDataset missing column_names, differs from Dataset interface
### Describe the bug
The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like
```
dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...)
```
will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available.
### Steps to reproduce the bug
See above
### Expected behavior
Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation.
### Environment info
n/a
Thanks! That's great news.
On Thu, Dec 22, 2022, 07:48 Mario Šaško ***@***.***> wrote:
> Hi! fn_kwargs was added to IterableDataset.map in datasets 2.5.0, so
> please update your installation (pip install -U datasets) to use it.
>
> Regarding column_names, I agree we should add this property to
> IterableDataset. In the meantime, you can use
> list(dataset.features.keys()) instead.
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/5383#issuecomment-1362993633>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAHD6N2EQUFEOUFDW3VHSILWORZ45ANCNFSM6AAAAAATGKWVGM>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
| [
0.06190392002463341,
-0.2250930666923523,
-0.021936357021331787,
0.08682585507631302,
0.23684585094451904,
0.42823758721351624,
0.4132128953933716,
0.14071489870548248,
0.13083317875862122,
0.12087797373533249,
-0.1222340539097786,
0.42908886075019836,
-0.08957673609256744,
0.21413053572177887,
0.1624394804239273,
-0.27529293298721313,
0.3206230103969574,
0.032843299210071564,
-0.22655001282691956,
-0.004139598459005356,
-0.1328728199005127,
0.4261626601219177,
-0.35613733530044556,
-0.030814804136753082,
0.15123184025287628,
-0.0022441018372774124,
-0.26386961340904236,
0.047193922102451324,
-0.1345481127500534,
-0.4052734375,
0.38629281520843506,
0.12759949266910553,
-0.015659239143133163,
0.17369312047958374,
-0.0001224755251314491,
-0.015320461243391037,
0.2680065333843231,
-0.10710343718528748,
-0.4813635051250458,
-0.11709915101528168,
-0.09526040405035019,
-0.19919437170028687,
0.2033309042453766,
-0.3923393487930298,
0.027260400354862213,
-0.4166017472743988,
0.1217823252081871,
-0.17519758641719818,
0.06549078226089478,
0.09575042873620987,
0.1327671855688095,
0.33017486333847046,
0.18188795447349548,
-0.13686998188495636,
0.10797357559204102,
0.330921471118927,
-0.48408278822898865,
0.2302825003862381,
0.3799609839916229,
-0.02036743424832821,
0.24705001711845398,
0.21525870263576508,
-0.25803306698799133,
0.028800882399082184,
0.26917243003845215,
0.1529126614332199,
-0.2293601930141449,
-0.242664635181427,
0.15057522058486938,
0.31460997462272644,
0.32838329672813416,
-0.33609846234321594,
-0.3462795913219452,
-0.582548201084137,
-0.03696276620030403,
-0.24876339733600616,
0.1464446634054184,
-0.21034525334835052,
-0.06360135972499847,
0.15254658460617065,
-0.23755966126918793,
-0.007000589743256569,
0.05015441030263901,
0.2237793207168579,
0.3662767708301544,
-0.00851316750049591,
-0.3608894348144531,
0.27594584226608276,
-0.042527955025434494,
-0.0222572460770607,
-0.009605943225324154,
-0.14635175466537476,
-0.08470310270786285,
0.2711220979690552,
-0.3576321303844452,
0.0719519779086113,
0.10864265263080597,
0.0497436486184597,
0.3065701425075531,
0.13910624384880066,
0.0892368033528328,
-0.21488803625106812,
0.05244561657309532,
0.049033645540475845,
0.370528906583786,
0.01433979719877243,
0.010323047637939453,
0.27751410007476807,
0.01817866787314415,
0.22629955410957336,
0.1402370035648346,
-0.25238174200057983,
0.1623871922492981,
0.22152692079544067,
0.1974153071641922,
-0.2441186010837555,
0.23920755088329315,
0.02447270229458809,
-0.15137453377246857,
-0.09341089427471161,
-0.2730303704738617,
-0.06329827010631561,
0.07995719462633133,
0.14865648746490479,
0.06507708132266998,
-0.09602882713079453,
-0.2541452646255493,
0.21326903998851776,
0.22054137289524078,
0.004407334141433239,
-0.2517910599708557,
-0.10722759366035461,
0.06325823068618774,
-0.008062442764639854,
0.04515404626727104,
-0.4999343752861023,
0.40373072028160095,
0.04344276338815689,
-0.07801885902881622,
0.20679298043251038,
-0.16772429645061493,
0.027976032346487045,
0.24795714020729065,
0.37391069531440735,
-0.05871997028589249,
0.31946703791618347,
0.03502650558948517,
-0.24787285923957825,
-0.13774117827415466,
-0.127020925283432,
-0.2548665702342987,
-0.15427014231681824,
-0.1256595104932785,
0.06768105179071426,
-0.1509879231452942,
-0.13858716189861298,
-0.3255159556865692,
0.23571673035621643,
-0.02616981416940689,
-0.458713561296463,
0.15949714183807373,
-0.004008989781141281,
0.13848981261253357,
-0.28802186250686646,
0.1785007119178772,
0.35935527086257935,
-0.2178257554769516,
-0.18462058901786804,
-0.21436761319637299,
-0.04499703273177147,
0.2574045956134796,
-0.03343025967478752,
0.03885791450738907,
0.04658965393900871,
-0.39746809005737305,
0.21626590192317963,
0.27771732211112976,
-0.020813003182411194,
-0.23460762202739716,
0.23513545095920563,
0.23241625726222992,
0.4658656418323517,
0.09873265773057938,
-0.02218683436512947,
0.07449384778738022,
0.008596484549343586,
0.005774572491645813,
-0.2158258855342865,
-0.2929762303829193,
-0.15085819363594055,
-0.049708981066942215,
-0.2692174017429352,
-0.07193078845739365,
-0.040919966995716095,
-0.15169425308704376,
0.474987268447876,
0.21163785457611084,
-0.19565927982330322,
0.38633427023887634,
0.0017211399972438812,
0.1267445683479309,
0.27910345792770386,
0.2520204186439514,
0.2961522340774536,
0.2501009702682495,
-0.391746461391449,
-0.7836484909057617,
0.19203996658325195,
0.4395545721054077,
-0.0848657488822937,
-0.20226462185382843,
-0.16771702468395233,
-0.3341270983219147,
0.13661208748817444,
-0.08404827117919922,
-0.21765893697738647,
0.014343615621328354,
0.3377434015274048,
0.27421435713768005,
-0.06954799592494965,
-0.5208000540733337,
0.2525027394294739,
-0.43077006936073303,
-0.07893829792737961,
-0.5008068084716797,
0.1482601761817932,
0.2125968039035797,
-0.16271735727787018,
-0.09530118852853775,
0.2487775683403015,
0.12674783170223236,
-0.24322840571403503,
-0.002818334847688675,
0.38131752610206604,
-0.12439939379692078,
0.0402531735599041,
0.028058411553502083,
0.5372706651687622,
0.05453524738550186,
0.09227313101291656,
-0.18205995857715607,
0.023154277354478836,
0.17521154880523682,
-0.10238189250230789,
-0.09478785842657089,
0.08984753489494324,
-0.20826099812984467,
0.4761613607406616,
0.1627182513475418,
0.2033458650112152,
0.31223365664482117,
0.2241799533367157,
-0.35107752680778503,
-0.3358556926250458,
0.006258804351091385,
-0.4767553210258484,
0.28918221592903137,
-0.3080874979496002,
-0.32694727182388306,
0.19336995482444763,
0.4473806619644165,
0.0881432294845581,
-0.14395293593406677,
-0.06829237192869186,
-0.214543879032135,
-0.00011160224676132202,
0.1134164109826088,
0.2903161942958832,
0.6048635840415955,
0.08147917687892914,
0.3326079249382019,
0.046326760202646255,
0.14852279424667358,
0.0005304571241140366,
0.2469816505908966,
0.207686647772789,
-0.02073601819574833,
-0.01850782334804535,
0.11831145733594894,
0.06075778603553772,
-0.35390305519104004,
-0.08016039431095123,
-0.009500707499682903,
0.24296438694000244,
-0.21286693215370178,
0.10216229408979416,
-0.2537378966808319,
-0.29250988364219666,
0.10560533404350281,
-0.38604456186294556,
-0.07431456446647644,
-0.5316624641418457,
-0.14590342342853546,
0.470015287399292,
-0.19896356761455536,
0.20044070482254028,
-0.17192092537879944,
0.10974892973899841,
-0.004675364121794701,
-0.07193952798843384,
-0.5538382530212402,
-0.04509367421269417,
-0.17599782347679138,
-0.02031954564154148,
-0.12010914087295532,
-0.3071109652519226,
0.22616764903068542,
-0.04002977907657623,
-0.12354368716478348,
-0.6808785200119019,
-0.435052752494812,
0.25820016860961914,
-0.36352789402008057,
0.3733074367046356,
0.5715770125389099,
0.20989981293678284,
-0.10022146999835968,
-0.1545891910791397,
0.3127421438694,
-0.17214639484882355,
-0.12634435296058655,
0.051436617970466614,
0.013371280394494534,
-0.2124650627374649,
-0.07799920439720154,
-0.1621970236301422,
-0.07194217294454575,
-0.2487223893404007,
0.4758704900741577,
-0.2321901023387909,
0.05883859097957611,
0.4158031940460205,
-0.2718872129917145,
0.23559340834617615,
-0.024961600080132484,
-0.017447080463171005,
-0.34509116411209106,
-0.33310651779174805,
0.3496091365814209,
-0.30826428532600403,
-0.2783222794532776,
0.1407622992992401,
-0.035737279802560806,
0.06242198124527931,
0.1123935654759407,
-0.32910704612731934,
-0.2386230230331421,
-0.13799569010734558,
0.17171339690685272,
0.27638882398605347,
0.07579715549945831,
0.31361502408981323,
-0.006824736949056387,
0.06287846714258194,
-0.31873053312301636,
-0.28904926776885986,
0.016574345529079437,
0.3330681324005127,
0.1431138813495636,
0.3133566975593567,
0.417996883392334,
-0.09903259575366974,
0.3489148020744324,
0.426291823387146,
0.36882999539375305,
0.4567874073982239,
-0.44579634070396423,
0.3486693501472473,
-0.29970914125442505,
-0.550225555896759,
0.09638094156980515,
-0.15349960327148438,
-0.08501754701137543,
0.15174078941345215,
0.02350441738963127,
-0.03061714954674244,
-0.1542034149169922,
0.24875536561012268,
-0.11318434029817581,
-0.1868373304605484,
-0.0721031203866005,
-0.016396664083003998,
0.3451632559299469,
0.1824999302625656,
0.06585494428873062,
-0.09714163839817047,
-0.15028804540634155,
0.007802879437804222,
0.14397521317005157,
0.4037318229675293,
0.028270438313484192,
-0.5430154800415039,
-0.2207544595003128,
-0.4070979654788971,
0.2230517417192459,
0.021372376009821892,
0.40809866786003113,
-0.21970641613006592,
-0.2991108000278473,
0.17678964138031006,
0.29345712065696716,
0.7117907404899597,
-0.3000873327255249,
-0.40672773122787476,
0.15757369995117188,
0.2164614498615265,
-0.22440698742866516,
-0.21022118628025055,
-0.0814148485660553,
0.38779664039611816,
0.16582386195659637,
0.48002612590789795,
-0.2660042345523834,
-0.16854971647262573,
0.49089494347572327,
0.18532662093639374,
-0.031554773449897766,
-0.018754340708255768,
-0.2689081132411957,
-0.3204297125339508,
0.04517310857772827,
-0.16397884488105774,
0.21611447632312775,
0.19942332804203033,
0.07823331654071808,
-0.0730648934841156,
-0.023285208269953728,
-0.024865757673978806,
-0.028585761785507202,
0.23289987444877625,
0.16807159781455994,
0.13844071328639984,
0.3561147451400757,
0.21927288174629211,
0.265621542930603,
0.001060880720615387,
0.5750594139099121,
-0.11387868225574493,
-0.366192102432251,
0.12081032246351242,
-0.287781685590744,
0.4542444348335266,
0.16325132548809052,
-0.2026255577802658,
0.23859205842018127,
0.29824137687683105,
0.08089887350797653,
-0.3339962065219879,
-0.27515584230422974,
0.5156769752502441,
-0.030824735760688782,
-0.19953890144824982,
-0.610264241695404,
0.379441499710083,
0.12204542756080627,
-0.05870461463928223,
0.6286005973815918,
0.5184645056724548,
-0.16584986448287964,
0.16721338033676147,
-0.30238279700279236,
0.6582725048065186,
0.18048042058944702,
-0.1523001492023468,
0.3720848858356476,
-0.24622929096221924,
0.48240286111831665,
0.1495574414730072,
0.18044595420360565,
-0.14245951175689697,
-0.4660313129425049,
-0.06036034971475601,
0.001741316169500351,
0.2949303984642029,
0.21430031955242157,
0.13049069046974182,
0.3638644218444824,
0.11620795726776123,
0.456648051738739,
-0.11653761565685272,
-0.21187666058540344,
-0.21396932005882263,
-0.2596356272697449,
-0.24809634685516357,
0.006044577807188034,
0.16856956481933594,
0.1788756400346756,
0.11652892082929611,
0.03239499032497406,
0.11307094991207123,
-0.22183571755886078,
-0.3907197117805481,
-0.09678208082914352,
-0.17716103792190552,
-0.12117935717105865,
0.2735412120819092,
-0.27678561210632324,
-0.016908513382077217,
0.24931871891021729,
0.22022958099842072,
-0.27308371663093567,
-0.2587699294090271,
0.278352290391922,
0.07531434297561646,
0.17482350766658783,
-0.05823637172579765,
0.16416585445404053,
0.22348707914352417,
-0.03669073060154915,
0.050158821046352386,
0.019351758062839508,
-0.24404384195804596,
-0.32400965690612793,
-0.26827365159988403,
0.06461043655872345,
0.3699198365211487,
-0.3274255096912384,
-0.16861148178577423,
-0.06574434041976929,
0.09924589097499847,
-0.391212522983551,
-0.015385188162326813,
0.005778871476650238,
-0.07893514633178711,
0.18948817253112793,
-0.2654663324356079,
-0.014830157160758972,
-0.0778161883354187,
0.2801547348499298,
-0.29391974210739136,
-0.10261700302362442,
0.563257098197937,
-0.005389906466007233,
-0.17622973024845123,
-0.031557559967041016,
-0.2233029007911682,
0.18784165382385254,
-0.33615970611572266,
0.09944892674684525,
0.00676373764872551,
0.26162517070770264,
-0.0857982486486435,
0.4785691797733307,
-0.041186265647411346,
-0.07377462834119797,
-0.3052975535392761,
-0.3955095410346985,
-0.34287065267562866,
0.28237175941467285,
0.12107741832733154,
0.06623479723930359,
0.07047133147716522,
-0.3991270661354065,
0.04404856264591217,
-0.1829756200313568,
-0.20421946048736572,
-0.16606101393699646,
-0.014922907575964928,
0.021549638360738754,
0.47237685322761536,
0.2879220247268677,
0.5607616305351257,
-0.2334219217300415,
0.12872101366519928,
-0.016045335680246353,
0.12068527191877365,
-0.07493520528078079,
-0.2613958418369293,
0.19717572629451752,
0.01575734093785286,
-0.052345603704452515,
-0.20013418793678284,
-0.18049094080924988,
-0.3886096775531769,
-0.3647773265838623,
0.39725902676582336,
0.0934891328215599,
0.11892877519130707,
0.21014168858528137,
-0.10210369527339935,
0.056109342724084854,
-0.19856026768684387,
0.05178236961364746,
0.17551708221435547,
-0.02618684619665146,
0.08879679441452026,
-0.035858623683452606,
-0.1374349147081375,
0.009268000721931458,
0.15544575452804565,
0.1643734574317932,
-0.059018149971961975,
-0.0725821927189827,
0.5901196002960205,
-0.16536426544189453,
0.03192322328686714,
0.21493975818157196,
0.32456743717193604,
0.4002925455570221,
-0.04299227520823479,
0.07483087480068207,
0.2266537845134735,
0.03840451315045357,
-0.3768376410007477,
-0.11702638864517212,
0.22273798286914825,
0.3614872395992279,
0.16527777910232544,
0.19531603157520294,
0.1926509439945221,
-0.042888447642326355,
0.07724075764417648,
-0.03581317514181137,
0.27593302726745605,
-0.22652675211429596,
0.10635662078857422,
0.6192232966423035,
0.24862809479236603,
0.2631351053714752,
0.21946057677268982,
0.10495534539222717,
-0.07623276859521866,
0.4242912530899048,
-0.017616182565689087,
0.08582086116075516,
0.2576429545879364,
0.08356973528862,
0.3381297290325165,
-0.33142924308776855,
0.08882007747888565,
-0.1690901517868042,
0.00977054238319397,
0.3345365822315216,
0.06906270235776901,
0.26725879311561584,
-0.11292499303817749,
0.061882324516773224,
-0.07394006103277206,
-0.1476542204618454,
-0.045859962701797485,
-0.15912777185440063,
0.057809703052043915,
-0.16473139822483063,
-0.05683154985308647,
-0.19417662918567657,
0.002903476357460022,
-0.08642546832561493,
0.5156888961791992,
-0.28124797344207764,
0.17362898588180542,
-0.5231617093086243,
-0.29546988010406494,
0.2418123185634613,
0.43124833703041077,
-0.17840725183486938,
0.0738329216837883,
0.13587786257266998,
-0.1331186443567276,
-0.08549913763999939,
0.3337823450565338,
0.28343749046325684,
0.03343356400728226,
0.3805786669254303,
-0.016415227204561234,
-0.11350053548812866,
-0.18966889381408691,
0.0413859523832798,
0.5306550860404968,
-0.06901156902313232,
0.047200463712215424,
-0.031043339520692825,
-0.020198533311486244,
0.008087175898253918,
0.05441911518573761,
0.07841752469539642,
0.3218458592891693,
-0.2973147928714752,
0.3372046649456024,
-0.4792264997959137,
-0.2935081422328949,
-0.0006171576678752899,
-0.05382324010133743,
-0.11394163966178894,
-0.1265745609998703,
0.23143310844898224,
-0.02221650816500187,
0.08035504817962646,
-0.08016613870859146,
0.022889386862516403,
-0.07907550036907196,
0.24381692707538605,
0.4256514310836792,
-0.26906818151474,
-0.037801146507263184,
-0.3098853528499603,
-0.4990215301513672,
-0.2711023688316345,
0.015251470729708672,
-0.021841634064912796,
0.34732523560523987,
0.16840001940727234,
0.21600458025932312,
-0.15591801702976227,
0.12241613864898682,
-0.3646698594093323,
-0.0840715691447258,
0.4494582414627075,
-0.10810647904872894,
-0.5594642162322998,
-0.1293073147535324,
0.0620698556303978,
0.0988275557756424,
-0.1822512447834015,
0.16670100390911102,
-0.04076152667403221,
-0.18650856614112854,
-0.12768694758415222,
0.17519980669021606,
0.07462380826473236,
-0.20872339606285095,
0.214909166097641,
0.14012734591960907,
0.07072070986032486,
-0.107328861951828,
-0.18309274315834045,
-0.4196716248989105,
-0.15614312887191772,
-0.09652402997016907,
0.5100741982460022,
-0.2043382078409195,
0.25644055008888245,
-0.1007155030965805,
-0.20610003173351288,
-0.23803018033504486,
0.04602542147040367,
0.14038509130477905,
-0.2740655839443207,
-0.32836028933525085,
0.3790481388568878,
-0.2702758014202118,
0.2252468764781952,
0.15884968638420105,
0.16720247268676758,
-0.05157729983329773,
0.0683104544878006,
-0.07468753308057785,
-0.3698386549949646,
0.5713853240013123,
-0.3871592879295349,
-0.20500709116458893,
0.1069675087928772,
0.03733069449663162,
0.5378613471984863,
-0.25250357389450073,
-0.6822953224182129,
-0.11873796582221985,
0.4452105164527893,
-0.2270955741405487,
0.16095660626888275,
0.2273697704076767,
-0.07975564897060394,
0.15719713270664215,
0.06438538432121277,
0.425700843334198,
0.24990549683570862,
-0.08885426819324493,
0.3072187602519989,
-0.1870780885219574
] |
https://github.com/huggingface/datasets/issues/5383 | IterableDataset missing column_names, differs from Dataset interface | I'm marking this issue as a "good first issue", as it makes sense to have `IterableDataset.column_names` in the API. Besides the case when `features` are `None` (e.g., `features` are `None` after `map`), in which we can also return `column_names` as `None`, adding this property should be straightforward, | ### Describe the bug
The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like
```
dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...)
```
will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available.
### Steps to reproduce the bug
See above
### Expected behavior
Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation.
### Environment info
n/a | 47 | IterableDataset missing column_names, differs from Dataset interface
### Describe the bug
The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like
```
dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...)
```
will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available.
### Steps to reproduce the bug
See above
### Expected behavior
Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation.
### Environment info
n/a
I'm marking this issue as a "good first issue", as it makes sense to have `IterableDataset.column_names` in the API. Besides the case when `features` are `None` (e.g., `features` are `None` after `map`), in which we can also return `column_names` as `None`, adding this property should be straightforward, | [
0.01865231618285179,
-0.1996592879295349,
-0.017534758895635605,
0.07391022890806198,
0.26169347763061523,
0.3632996678352356,
0.4099632799625397,
0.06242913007736206,
0.15399505198001862,
0.12583155930042267,
-0.0031730616465210915,
0.27897578477859497,
-0.11127909272909164,
0.2552745044231415,
0.19068275392055511,
-0.2887974977493286,
0.2811334729194641,
0.09009627252817154,
-0.1419200599193573,
-0.07080153375864029,
-0.08278918266296387,
0.34656229615211487,
-0.3604351878166199,
-0.05740794539451599,
0.25264209508895874,
-0.021299565210938454,
-0.16728834807872772,
0.04274296388030052,
-0.10096043348312378,
-0.22041934728622437,
0.35901355743408203,
0.09509577602148056,
0.0022157877683639526,
0.17985153198242188,
-0.00012787881132680923,
-0.03457348421216011,
0.2553679943084717,
-0.1561044305562973,
-0.4143505394458771,
-0.1358499675989151,
-0.17984876036643982,
-0.046019069850444794,
0.18076567351818085,
-0.3429318368434906,
0.002985157072544098,
-0.5105909705162048,
0.09512543678283691,
-0.36548110842704773,
-0.010244496166706085,
0.07928194105625153,
0.05445403605699539,
0.3179691433906555,
-0.02961171604692936,
0.013156415894627571,
0.10219127684831619,
0.46339160203933716,
-0.4675690829753876,
0.10105720162391663,
0.4805055856704712,
0.03442424535751343,
0.15566754341125488,
0.1655789017677307,
-0.21130357682704926,
0.08702830970287323,
0.28665921092033386,
0.1743551343679428,
-0.3436543941497803,
-0.24362972378730774,
0.16273732483386993,
0.3531460464000702,
0.3699471056461334,
-0.27393925189971924,
-0.32595136761665344,
-0.5847271680831909,
-0.062463320791721344,
-0.2844798266887665,
0.11233824491500854,
-0.1195993721485138,
-0.009221216663718224,
0.18083447217941284,
-0.2765465974807739,
-0.14688798785209656,
-0.011929981410503387,
0.19573166966438293,
0.3432360887527466,
0.010290071368217468,
-0.32353004813194275,
0.33738279342651367,
-0.1534728854894638,
-0.04913461208343506,
0.003042912110686302,
-0.21443185210227966,
-0.050014693289995193,
0.26892024278640747,
-0.33110395073890686,
0.027155138552188873,
0.17146559059619904,
-0.014859333634376526,
0.28294557332992554,
0.2337358593940735,
0.29697859287261963,
-0.09785125404596329,
-0.05154317617416382,
0.07245361804962158,
0.47313714027404785,
0.027796726673841476,
0.017234086990356445,
0.24455462396144867,
0.11719345301389694,
0.3225591480731964,
0.19901466369628906,
-0.17609286308288574,
0.186050146818161,
0.41299012303352356,
0.16612419486045837,
-0.2304610013961792,
0.29870766401290894,
-0.01689119264483452,
-0.18310195207595825,
-0.12917852401733398,
-0.3551815450191498,
-0.14296472072601318,
0.14512048661708832,
0.06845250725746155,
0.14603093266487122,
-0.018160317093133926,
-0.23482951521873474,
0.1704932004213333,
0.21191179752349854,
-0.18760311603546143,
-0.2737012207508087,
-0.09908518195152283,
0.06354711949825287,
0.05480985343456268,
0.031861547380685806,
-0.46311748027801514,
0.3359316885471344,
-0.05224166810512543,
-0.11483341455459595,
0.2588881254196167,
-0.018159469589591026,
0.06191770359873772,
0.36628931760787964,
0.36197927594184875,
0.038893718272447586,
0.27579042315483093,
-0.005022075027227402,
-0.22292114794254303,
-0.17180635035037994,
-0.06072968244552612,
-0.20581978559494019,
-0.20797139406204224,
-0.07793714106082916,
0.03717042878270149,
-0.1705932319164276,
-0.059976838529109955,
-0.33885979652404785,
0.3101388216018677,
0.0027252063155174255,
-0.42683637142181396,
0.1558941751718521,
0.03624815493822098,
0.10345645248889923,
-0.21116861701011658,
0.22454588115215302,
0.35440635681152344,
-0.23586592078208923,
-0.1628967821598053,
-0.20096875727176666,
-0.07917289435863495,
0.2500670254230499,
-0.018904350697994232,
0.032871585339307785,
-0.015556029975414276,
-0.40676161646842957,
0.22197245061397552,
0.3487764298915863,
-0.023548951372504234,
-0.10745959728956223,
0.2521294951438904,
0.23739571869373322,
0.4414220154285431,
0.07716114819049835,
-0.03357755020260811,
0.23672662675380707,
-0.015523252077400684,
0.048000358045101166,
-0.06102128326892853,
-0.36150190234184265,
-0.15143780410289764,
0.10349050164222717,
-0.27452364563941956,
-0.018039245158433914,
-0.0406850166618824,
-0.21752353012561798,
0.4784051775932312,
0.21568427979946136,
-0.2730752229690552,
0.33751025795936584,
-0.014497537165880203,
0.18715979158878326,
0.20565824210643768,
0.2051355540752411,
0.18456025421619415,
0.2525153160095215,
-0.383770227432251,
-0.7756893038749695,
0.14477938413619995,
0.5957788228988647,
-0.13499221205711365,
-0.015701211988925934,
-0.18595653772354126,
-0.13163262605667114,
0.10884936898946762,
0.000080890953540802,
-0.149662047624588,
-0.06229563057422638,
0.3580606281757355,
0.18383218348026276,
-0.19229505956172943,
-0.6497863531112671,
0.2161569744348526,
-0.5543074011802673,
-0.09602933377027512,
-0.5014148354530334,
0.11659999191761017,
0.3848741054534912,
-0.1383783221244812,
-0.0668618381023407,
0.20246219635009766,
0.023782949894666672,
-0.23185916244983673,
0.020294317975640297,
0.3250305652618408,
-0.1488010734319687,
0.10716351866722107,
0.01934884861111641,
0.6479172706604004,
0.11546462029218674,
0.07685205340385437,
-0.17246539890766144,
-0.0007897913455963135,
0.154338076710701,
-0.15570268034934998,
-0.08453642576932907,
0.037598878145217896,
-0.09356245398521423,
0.5417762398719788,
0.2415076643228531,
0.0893927663564682,
0.33500605821609497,
0.2777477204799652,
-0.4066478908061981,
-0.32590705156326294,
-0.015249539166688919,
-0.43638959527015686,
0.25090306997299194,
-0.31309518218040466,
-0.37213239073753357,
0.30128732323646545,
0.4461219012737274,
0.0132024846971035,
-0.13989561796188354,
-0.094573475420475,
-0.20855280756950378,
-0.08494427800178528,
0.2069820612668991,
0.2250167280435562,
0.5774554014205933,
0.026362676173448563,
0.3856951892375946,
0.027168748900294304,
0.20649513602256775,
0.04597865790128708,
0.2356628179550171,
0.21986539661884308,
-0.0047692502848804,
-0.0685206726193428,
0.12486469000577927,
0.00622240174561739,
-0.4604822099208832,
-0.22837145626544952,
0.023472553119063377,
0.19456394016742706,
-0.16142317652702332,
0.10777703672647476,
-0.2478908896446228,
-0.2570086121559143,
0.1436600536108017,
-0.4508071839809418,
0.006232261657714844,
-0.45714446902275085,
-0.2307252138853073,
0.5577090382575989,
-0.27659735083580017,
0.1756683886051178,
-0.1990722268819809,
0.28540000319480896,
0.013198690488934517,
-0.10559960454702377,
-0.5134760141372681,
-0.05008716136217117,
-0.19371157884597778,
-0.05584503710269928,
-0.13337966799736023,
-0.30396702885627747,
0.19871650636196136,
-0.03128217160701752,
-0.13365203142166138,
-0.7300700545310974,
-0.38324931263923645,
0.3184314966201782,
-0.3062089681625366,
0.276975154876709,
0.5209726095199585,
0.231061652302742,
0.041199684143066406,
-0.0799270048737526,
0.19656452536582947,
-0.16453127562999725,
-0.14129957556724548,
-0.03417570888996124,
0.04938646778464317,
-0.21438239514827728,
-0.129898801445961,
-0.1413968801498413,
0.07508361339569092,
-0.18557177484035492,
0.30514779686927795,
-0.24543026089668274,
0.08482906222343445,
0.2284846305847168,
-0.2919442057609558,
0.21168681979179382,
0.06026504188776016,
0.0020917486399412155,
-0.32187363505363464,
-0.3920868933200836,
0.28148719668388367,
-0.19705915451049805,
-0.26220574975013733,
0.20244517922401428,
-0.01184820756316185,
0.0885419100522995,
0.24353529512882233,
-0.24278108775615692,
-0.06447388231754303,
-0.0858888104557991,
0.03169456496834755,
0.22377698123455048,
0.056519389152526855,
0.36563536524772644,
-0.01764955371618271,
0.10615308582782745,
-0.30642271041870117,
-0.43426093459129333,
0.054760050028562546,
0.47610434889793396,
0.1302398443222046,
0.3749656677246094,
0.399711549282074,
-0.17271064221858978,
0.3676831126213074,
0.26188430190086365,
0.29586654901504517,
0.5158726572990417,
-0.35406631231307983,
0.32976698875427246,
-0.3005811274051666,
-0.38814792037010193,
0.15170469880104065,
-0.08828797936439514,
-0.15130789577960968,
0.2373693585395813,
0.044697657227516174,
-0.1403808891773224,
-0.14065849781036377,
0.3521330952644348,
-0.06575687229633331,
-0.14975884556770325,
-0.11078348755836487,
-0.03755379468202591,
0.3227419853210449,
0.2107129544019699,
0.12178092449903488,
-0.08493645489215851,
-0.10352031886577606,
0.014441734179854393,
0.177893728017807,
0.5001431107521057,
0.011035335250198841,
-0.5056918263435364,
-0.23273709416389465,
-0.4242634177207947,
0.1943950057029724,
-0.0015972219407558441,
0.4362519383430481,
-0.23859749734401703,
-0.41616129875183105,
0.20499014854431152,
0.22368435561656952,
0.5527563691139221,
-0.27028825879096985,
-0.3597913384437561,
0.04796464368700981,
0.18091781437397003,
-0.09040394425392151,
-0.2575557231903076,
-0.040343329310417175,
0.395412415266037,
0.12819549441337585,
0.5379195809364319,
-0.26461565494537354,
-0.1659713089466095,
0.399556040763855,
0.13657961785793304,
-0.015002705156803131,
0.06890939921140671,
-0.2815190553665161,
-0.3099384903907776,
0.11416788399219513,
-0.23233628273010254,
0.14966028928756714,
0.12748177349567413,
0.1438320428133011,
-0.18657828867435455,
0.03558924049139023,
-0.05945931375026703,
-0.030405357480049133,
0.22218012809753418,
0.11904383450746536,
0.05871741473674774,
0.34204936027526855,
0.2000121772289276,
0.30798521637916565,
-0.022999795153737068,
0.5512887835502625,
-0.06865744292736053,
-0.43815016746520996,
0.30031922459602356,
-0.19485042989253998,
0.49961042404174805,
0.17759984731674194,
-0.16694962978363037,
0.2878481149673462,
0.4214361310005188,
0.07230915129184723,
-0.4066353142261505,
-0.23884671926498413,
0.4752713739871979,
-0.022682681679725647,
-0.24505871534347534,
-0.5786752700805664,
0.32248589396476746,
0.09257768094539642,
-0.0388466939330101,
0.8177179098129272,
0.5233736634254456,
-0.14797326922416687,
0.18927139043807983,
-0.2718162536621094,
0.618861198425293,
0.16316694021224976,
-0.1580624282360077,
0.31338319182395935,
-0.3205581307411194,
0.4667695462703705,
0.1646842360496521,
0.28888899087905884,
-0.06823647767305374,
-0.4243201017379761,
-0.12421245127916336,
-0.022245220839977264,
0.265838623046875,
0.18320682644844055,
0.2677326798439026,
0.40194085240364075,
0.12384083867073059,
0.5946744680404663,
-0.07611558586359024,
-0.1446620523929596,
-0.20769070088863373,
-0.18629001080989838,
-0.2380315661430359,
-0.04904986172914505,
0.08461601287126541,
0.14298292994499207,
0.11000633984804153,
0.03327193483710289,
0.17049816250801086,
-0.21945194900035858,
-0.35152578353881836,
-0.0576888769865036,
-0.04379309341311455,
-0.21718670427799225,
0.21483759582042694,
-0.3434000611305237,
0.042891476303339005,
0.1289987862110138,
0.04311032220721245,
-0.38666465878486633,
-0.3038817346096039,
0.2920741140842438,
0.08523106575012207,
0.23310965299606323,
-0.11500247567892075,
0.15145494043827057,
0.26873451471328735,
0.04219542443752289,
0.04317020624876022,
0.051193248480558395,
-0.29044511914253235,
-0.3385070562362671,
-0.2967023253440857,
0.08057564496994019,
0.4782652258872986,
-0.2819954454898834,
-0.10331840813159943,
0.05165347456932068,
0.16846123337745667,
-0.3347645401954651,
-0.07198008894920349,
0.009431108832359314,
-0.019558686763048172,
0.047455526888370514,
-0.13780592381954193,
0.008383207023143768,
-0.08883741497993469,
0.2555398941040039,
-0.2127683460712433,
-0.07695703953504562,
0.45803573727607727,
-0.024213431403040886,
-0.1669653207063675,
0.005275547504425049,
-0.31120985746383667,
0.2409270703792572,
-0.16846783459186554,
0.09425541758537292,
-0.012567681260406971,
0.12461651861667633,
-0.09075087308883667,
0.43483075499534607,
-0.13685642182826996,
0.020753011107444763,
-0.35362866520881653,
-0.46029433608055115,
-0.2833207845687866,
0.30359914898872375,
-0.0829617977142334,
-0.01645553484559059,
0.023201309144496918,
-0.4854241609573364,
0.059460945427417755,
-0.2388833463191986,
-0.12518957257270813,
-0.19846680760383606,
0.07756102830171585,
0.0393979549407959,
0.4675467908382416,
0.41524866223335266,
0.5136085748672485,
-0.2198350876569748,
0.05299893021583557,
-0.1555052548646927,
0.10176803171634674,
-0.012789484113454819,
-0.249254509806633,
0.2320357859134674,
0.07295314222574234,
-0.04746818542480469,
-0.20116735994815826,
-0.25781571865081787,
-0.46874484419822693,
-0.442484587430954,
0.4290638864040375,
0.06444910168647766,
0.11628572642803192,
0.05956574156880379,
-0.0768364816904068,
0.019150253385305405,
-0.3011300563812256,
0.02829763852059841,
0.21879655122756958,
-0.08318452537059784,
0.042467404156923294,
-0.04742875695228577,
-0.11175759881734848,
-0.03808305785059929,
0.14119714498519897,
0.15418007969856262,
0.01940852403640747,
-0.014242399483919144,
0.5583349466323853,
-0.08641807734966278,
0.06380327045917511,
0.13228008151054382,
0.36147019267082214,
0.42490699887275696,
-0.03185054659843445,
0.03735437989234924,
0.11862985044717789,
-0.026715947315096855,
-0.35945212841033936,
-0.11801904439926147,
0.15735609829425812,
0.41861939430236816,
0.12170985341072083,
0.1380324810743332,
0.032236676663160324,
-0.018355093896389008,
0.04209378361701965,
-0.07208043336868286,
0.2725834250450134,
-0.15186874568462372,
0.13421237468719482,
0.4827271103858948,
0.11326143145561218,
0.2894638180732727,
0.1868441104888916,
0.09687446057796478,
-0.03603660315275192,
0.39656007289886475,
0.04309825971722603,
0.1174478530883789,
0.33560431003570557,
0.12504583597183228,
0.22676068544387817,
-0.45680975914001465,
0.019353412091732025,
-0.15293043851852417,
0.15122899413108826,
0.41407284140586853,
0.155570849776268,
0.23434236645698547,
-0.05662790313363075,
0.05074916407465935,
-0.05968385934829712,
-0.1966884583234787,
-0.02452496439218521,
-0.06951607763767242,
0.06312771141529083,
-0.12606792151927948,
0.11712047457695007,
-0.1938742697238922,
0.08876113593578339,
0.0037945397198200226,
0.5456586480140686,
-0.31229275465011597,
0.15451118350028992,
-0.4178307354450226,
-0.24615108966827393,
0.18544375896453857,
0.29147395491600037,
-0.06379663199186325,
0.12332285195589066,
0.07006716728210449,
-0.10035562515258789,
-0.044320035725831985,
0.2425728142261505,
0.08217477798461914,
0.06802064180374146,
0.38995561003685,
0.0472518615424633,
-0.055982787162065506,
-0.23314577341079712,
0.0602615624666214,
0.4694325029850006,
-0.042805224657058716,
-0.04813094064593315,
-0.07844643294811249,
-0.0750044658780098,
0.08568399399518967,
0.09709949791431427,
0.1332472264766693,
0.2547382414340973,
-0.32107317447662354,
0.33761003613471985,
-0.4837033450603485,
-0.27947378158569336,
-0.0426594614982605,
-0.11071182042360306,
-0.009922858327627182,
-0.1832849085330963,
0.146550714969635,
-0.06709370762109756,
0.044062111526727676,
-0.009708579629659653,
-0.022329650819301605,
-0.13582509756088257,
0.1598833203315735,
0.4359808564186096,
-0.3012942969799042,
0.007119609508663416,
-0.3574070334434509,
-0.4689776599407196,
-0.19196084141731262,
0.03389690816402435,
0.007950125262141228,
0.2989144027233124,
0.2842327952384949,
0.24721533060073853,
-0.19460275769233704,
0.1956396996974945,
-0.30877938866615295,
-0.08591300249099731,
0.36632415652275085,
-0.1371701955795288,
-0.6065621376037598,
-0.16044054925441742,
0.012536611407995224,
-0.010195259004831314,
-0.21062225103378296,
0.18667005002498627,
-0.025974731892347336,
-0.23302343487739563,
-0.051963940262794495,
0.13553296029567719,
0.12313003838062286,
-0.18219873309135437,
0.26606500148773193,
0.10705671459436417,
0.04550784081220627,
-0.10535859316587448,
-0.14228320121765137,
-0.3242085874080658,
-0.0549498125910759,
-0.09438951313495636,
0.5161992907524109,
-0.2853200435638428,
0.1868506222963333,
-0.05485910922288895,
-0.06052381172776222,
-0.3002830743789673,
0.09544804692268372,
0.12174020707607269,
-0.29793184995651245,
-0.44378694891929626,
0.4424343407154083,
-0.37231650948524475,
0.25990188121795654,
0.15525607764720917,
0.03316826373338699,
-0.03008449822664261,
-0.06289272755384445,
-0.12944823503494263,
-0.20031434297561646,
0.6082415580749512,
-0.460977703332901,
-0.21690519154071808,
0.050252363085746765,
0.12201195955276489,
0.5909945964813232,
-0.2746693193912506,
-0.7040008902549744,
-0.1587003618478775,
0.36981847882270813,
-0.2816429138183594,
0.12665146589279175,
0.1377871334552765,
-0.12426751852035522,
0.17511145770549774,
0.017377212643623352,
0.542715311050415,
0.2708585262298584,
-0.14151531457901,
0.2597190737724304,
-0.1597774177789688
] |
https://github.com/huggingface/datasets/issues/5381 | Wrong URL for the_pile dataset | Hi! This error can happen if there is a local file/folder with the same name as the requested dataset. And to avoid it, rename the local file/folder.
Soon, it will be possible to explicitly request a Hub dataset as follows:https://github.com/huggingface/datasets/issues/5228#issuecomment-1313494020 | ### Describe the bug
When trying to load `the_pile` dataset from the library, I get a `FileNotFound` error.
### Steps to reproduce the bug
Steps to reproduce:
Run:
```
from datasets import load_dataset
dataset = load_dataset("the_pile")
```
I get the output:
"name": "FileNotFoundError",
"message": "Unable to resolve any data file that matches '['**']' at /storage/store/work/lgrinszt/memorization/the_pile with any supported extension ['csv', 'tsv', 'json', 'jsonl', 'parquet', 'txt', 'blp', 'bmp', 'dib', 'bufr', 'cur', 'pcx', 'dcx', 'dds', 'ps', 'eps', 'fit', 'fits', 'fli', 'flc', 'ftc', 'ftu', 'gbr', 'gif', 'grib', 'h5', 'hdf', 'png', 'apng', 'jp2', 'j2k', 'jpc', 'jpf', 'jpx', 'j2c', 'icns', 'ico', 'im', 'iim', 'tif', 'tiff', 'jfif', 'jpe', 'jpg', 'jpeg', 'mpg', 'mpeg', 'msp', 'pcd', 'pxr', 'pbm', 'pgm', 'ppm', 'pnm', 'psd', 'bw', 'rgb', 'rgba', 'sgi', 'ras', 'tga', 'icb', 'vda', 'vst', 'webp', 'wmf', 'emf', 'xbm', 'xpm', 'BLP', 'BMP', 'DIB', 'BUFR', 'CUR', 'PCX', 'DCX', 'DDS', 'PS', 'EPS', 'FIT', 'FITS', 'FLI', 'FLC', 'FTC', 'FTU', 'GBR', 'GIF', 'GRIB', 'H5', 'HDF', 'PNG', 'APNG', 'JP2', 'J2K', 'JPC', 'JPF', 'JPX', 'J2C', 'ICNS', 'ICO', 'IM', 'IIM', 'TIF', 'TIFF', 'JFIF', 'JPE', 'JPG', 'JPEG', 'MPG', 'MPEG', 'MSP', 'PCD', 'PXR', 'PBM', 'PGM', 'PPM', 'PNM', 'PSD', 'BW', 'RGB', 'RGBA', 'SGI', 'RAS', 'TGA', 'ICB', 'VDA', 'VST', 'WEBP', 'WMF', 'EMF', 'XBM', 'XPM', 'aiff', 'au', 'avr', 'caf', 'flac', 'htk', 'svx', 'mat4', 'mat5', 'mpc2k', 'ogg', 'paf', 'pvf', 'raw', 'rf64', 'sd2', 'sds', 'ircam', 'voc', 'w64', 'wav', 'nist', 'wavex', 'wve', 'xi', 'mp3', 'opus', 'AIFF', 'AU', 'AVR', 'CAF', 'FLAC', 'HTK', 'SVX', 'MAT4', 'MAT5', 'MPC2K', 'OGG', 'PAF', 'PVF', 'RAW', 'RF64', 'SD2', 'SDS', 'IRCAM', 'VOC', 'W64', 'WAV', 'NIST', 'WAVEX', 'WVE', 'XI', 'MP3', 'OPUS', 'zip']"
### Expected behavior
`the_pile` dataset should be dowloaded.
### Environment info
- `datasets` version: 2.7.1
- Platform: Linux-4.15.0-112-generic-x86_64-with-glibc2.27
- Python version: 3.10.8
- PyArrow version: 10.0.1
- Pandas version: 1.5.2 | 40 | Wrong URL for the_pile dataset
### Describe the bug
When trying to load `the_pile` dataset from the library, I get a `FileNotFound` error.
### Steps to reproduce the bug
Steps to reproduce:
Run:
```
from datasets import load_dataset
dataset = load_dataset("the_pile")
```
I get the output:
"name": "FileNotFoundError",
"message": "Unable to resolve any data file that matches '['**']' at /storage/store/work/lgrinszt/memorization/the_pile with any supported extension ['csv', 'tsv', 'json', 'jsonl', 'parquet', 'txt', 'blp', 'bmp', 'dib', 'bufr', 'cur', 'pcx', 'dcx', 'dds', 'ps', 'eps', 'fit', 'fits', 'fli', 'flc', 'ftc', 'ftu', 'gbr', 'gif', 'grib', 'h5', 'hdf', 'png', 'apng', 'jp2', 'j2k', 'jpc', 'jpf', 'jpx', 'j2c', 'icns', 'ico', 'im', 'iim', 'tif', 'tiff', 'jfif', 'jpe', 'jpg', 'jpeg', 'mpg', 'mpeg', 'msp', 'pcd', 'pxr', 'pbm', 'pgm', 'ppm', 'pnm', 'psd', 'bw', 'rgb', 'rgba', 'sgi', 'ras', 'tga', 'icb', 'vda', 'vst', 'webp', 'wmf', 'emf', 'xbm', 'xpm', 'BLP', 'BMP', 'DIB', 'BUFR', 'CUR', 'PCX', 'DCX', 'DDS', 'PS', 'EPS', 'FIT', 'FITS', 'FLI', 'FLC', 'FTC', 'FTU', 'GBR', 'GIF', 'GRIB', 'H5', 'HDF', 'PNG', 'APNG', 'JP2', 'J2K', 'JPC', 'JPF', 'JPX', 'J2C', 'ICNS', 'ICO', 'IM', 'IIM', 'TIF', 'TIFF', 'JFIF', 'JPE', 'JPG', 'JPEG', 'MPG', 'MPEG', 'MSP', 'PCD', 'PXR', 'PBM', 'PGM', 'PPM', 'PNM', 'PSD', 'BW', 'RGB', 'RGBA', 'SGI', 'RAS', 'TGA', 'ICB', 'VDA', 'VST', 'WEBP', 'WMF', 'EMF', 'XBM', 'XPM', 'aiff', 'au', 'avr', 'caf', 'flac', 'htk', 'svx', 'mat4', 'mat5', 'mpc2k', 'ogg', 'paf', 'pvf', 'raw', 'rf64', 'sd2', 'sds', 'ircam', 'voc', 'w64', 'wav', 'nist', 'wavex', 'wve', 'xi', 'mp3', 'opus', 'AIFF', 'AU', 'AVR', 'CAF', 'FLAC', 'HTK', 'SVX', 'MAT4', 'MAT5', 'MPC2K', 'OGG', 'PAF', 'PVF', 'RAW', 'RF64', 'SD2', 'SDS', 'IRCAM', 'VOC', 'W64', 'WAV', 'NIST', 'WAVEX', 'WVE', 'XI', 'MP3', 'OPUS', 'zip']"
### Expected behavior
`the_pile` dataset should be dowloaded.
### Environment info
- `datasets` version: 2.7.1
- Platform: Linux-4.15.0-112-generic-x86_64-with-glibc2.27
- Python version: 3.10.8
- PyArrow version: 10.0.1
- Pandas version: 1.5.2
Hi! This error can happen if there is a local file/folder with the same name as the requested dataset. And to avoid it, rename the local file/folder.
Soon, it will be possible to explicitly request a Hub dataset as follows:https://github.com/huggingface/datasets/issues/5228#issuecomment-1313494020 | [
0.04037334397435188,
0.2507587671279907,
0.01055099442601204,
0.5873169898986816,
0.2429571896791458,
0.09090284258127213,
0.26323336362838745,
0.45683375000953674,
-0.07539603114128113,
0.07974769175052643,
-0.01638014055788517,
0.26830172538757324,
0.03204666078090668,
-0.3287288248538971,
0.21430730819702148,
0.08523759245872498,
0.032584719359874725,
-0.06047217547893524,
-0.1065482646226883,
-0.14730633795261383,
-0.5327776670455933,
0.2270757406949997,
-0.29375699162483215,
-0.03989455848932266,
-0.08173269778490067,
0.13817204535007477,
-0.18751944601535797,
0.516301155090332,
-0.09939413517713547,
-0.1784212291240692,
0.12705665826797485,
-0.07325312495231628,
0.21457014977931976,
0.5561865568161011,
-0.0001092667953344062,
-0.07561103254556656,
0.27195391058921814,
-0.19906602799892426,
-0.13654181361198425,
-0.4789477586746216,
-0.0914507508277893,
-0.37080118060112,
-0.07026315480470657,
-0.4109376072883606,
-0.04382804036140442,
-0.21621552109718323,
0.27217134833335876,
-0.21274127066135406,
-0.022592246532440186,
0.27642250061035156,
0.2233947515487671,
-0.1610085517168045,
0.03984472528100014,
0.0916266068816185,
0.32260391116142273,
-0.08234401047229767,
-0.05322883278131485,
0.46132126450538635,
0.020793668925762177,
-0.22261032462120056,
-0.07731395214796066,
0.38501980900764465,
-0.13589946925640106,
-0.018691081553697586,
0.4425022006034851,
0.3036610782146454,
-0.0983470007777214,
-0.04405325651168823,
0.030819253996014595,
0.11720181256532669,
0.4685913920402527,
-0.21564644575119019,
-0.22106289863586426,
0.09179484099149704,
-0.12690803408622742,
-0.19103381037712097,
0.2855648994445801,
0.29140353202819824,
0.149457186460495,
0.13717205822467804,
0.23746471107006073,
-0.06999560445547104,
-0.1806246042251587,
0.3392030596733093,
0.10164569318294525,
0.21282321214675903,
0.04688971862196922,
0.028484202921390533,
-0.03291122987866402,
-0.12010486423969269,
0.07242470234632492,
-0.1268061250448227,
0.11473259329795837,
0.31180331110954285,
-0.2948356866836548,
0.07656431198120117,
0.3297021985054016,
0.02172168716788292,
0.40773457288742065,
-0.01979948952794075,
0.1745416820049286,
-0.05162137746810913,
-0.004341858439147472,
0.016231469810009003,
0.3770938515663147,
0.1287779062986374,
-0.31371548771858215,
-0.07970469444990158,
0.3620966672897339,
0.3973582088947296,
-0.19651514291763306,
-0.10725521296262741,
-0.06665804237127304,
-0.1943637579679489,
0.05235880985856056,
0.026048708707094193,
0.453794002532959,
-0.3650793135166168,
-0.187456876039505,
0.20230025053024292,
-0.17598775029182434,
-0.0070975162088871,
-0.061313021928071976,
0.43016207218170166,
-0.33209338784217834,
0.3515971899032593,
0.11065877974033356,
0.06776849925518036,
-0.05964489281177521,
0.12932173907756805,
-0.25747767090797424,
0.2986550033092499,
-0.30467280745506287,
0.0013423403725028038,
0.16212254762649536,
-0.19591334462165833,
0.1754557341337204,
0.09256622940301895,
0.06217729672789574,
-0.23917649686336517,
0.006725206971168518,
-0.2135668694972992,
-0.023806020617485046,
0.04350050538778305,
-0.042803846299648285,
0.06447575241327286,
0.2526125907897949,
0.1353788524866104,
-0.2749065160751343,
0.3679531514644623,
-0.6141629219055176,
-0.2371383011341095,
-0.19385245442390442,
0.18630419671535492,
-0.15014606714248657,
0.03687528520822525,
-0.3254188895225525,
0.014592444524168968,
-0.157699853181839,
-0.16344909369945526,
-0.08908364921808243,
-0.08800476044416428,
0.09176333248615265,
-0.3746713399887085,
0.30966824293136597,
0.3904874324798584,
-0.3572763204574585,
0.1450929045677185,
-0.3230712115764618,
0.11951635777950287,
0.21817004680633545,
0.40265142917633057,
-0.11633550375699997,
0.07237502932548523,
-0.43587177991867065,
0.2906758785247803,
0.7123565673828125,
-0.41950666904449463,
-0.40332847833633423,
0.029015012085437775,
-0.10113653540611267,
0.1656535416841507,
-0.08923956006765366,
0.31572502851486206,
-0.21245728433132172,
0.021279912441968918,
0.3264954686164856,
0.2918895483016968,
0.03425397351384163,
0.1527506709098816,
-0.382624089717865,
-0.39267316460609436,
0.3167916536331177,
0.2254384309053421,
-0.056542251259088516,
-0.08935945481061935,
0.14763307571411133,
0.10010123997926712,
0.4003927409648895,
-0.05902053043246269,
-0.2890055179595947,
0.1029963418841362,
0.47554510831832886,
0.2131582796573639,
0.21926426887512207,
-0.17918738722801208,
-0.5458632707595825,
0.17361819744110107,
-0.1889670044183731,
0.0959184318780899,
-0.33320915699005127,
-0.07099427282810211,
-0.22750720381736755,
-0.15500721335411072,
-0.11236454546451569,
-0.15617898106575012,
0.1872592270374298,
0.14428681135177612,
-0.11175820231437683,
0.10666835308074951,
-0.3917655944824219,
0.11293388158082962,
-0.2102721631526947,
0.1493002474308014,
-0.4745721220970154,
0.45935317873954773,
-0.1397819072008133,
-0.05895622819662094,
0.11690929532051086,
0.26337572932243347,
0.4178328514099121,
-0.2436293214559555,
-0.07078087329864502,
0.43498608469963074,
-0.020321525633335114,
0.1589905023574829,
-0.13214030861854553,
0.18219198286533356,
0.1373409479856491,
-0.38169634342193604,
0.1358407437801361,
0.24181614816188812,
0.2752451002597809,
0.1391071081161499,
0.08393494784832001,
0.1561766266822815,
0.0734458789229393,
0.048805121332407,
0.29805266857147217,
-0.1776333898305893,
0.2624397277832031,
-0.15462633967399597,
0.22083017230033875,
-0.18922798335552216,
0.2665015161037445,
0.30504608154296875,
0.08878609538078308,
0.035369206219911575,
-0.2255992740392685,
0.03257094323635101,
0.5258661508560181,
-0.0694277286529541,
0.09403961896896362,
0.12751208245754242,
-0.044970087707042694,
-0.2717348039150238,
-0.02090010978281498,
0.0012995563447475433,
0.3582276403903961,
0.19361741840839386,
-0.14411716163158417,
0.11806724220514297,
-0.12119676917791367,
-0.186354398727417,
0.1332142949104309,
-0.07878562808036804,
-0.16079166531562805,
0.29656973481178284,
0.16872341930866241,
0.08116522431373596,
-0.2345312535762787,
-0.336942583322525,
-0.22917647659778595,
0.3701266944408417,
-0.24325905740261078,
-0.01450470183044672,
-0.37262335419654846,
-0.31719180941581726,
-0.22586029767990112,
-0.1399419903755188,
-0.3475343883037567,
-0.2705937922000885,
0.04554933309555054,
0.19633029401302338,
-0.12247462570667267,
-0.11230847984552383,
-0.262530654668808,
0.17062285542488098,
-0.017612669616937637,
-0.2887040376663208,
-0.2853216528892517,
-0.1764979064464569,
-0.2327723205089569,
0.08856268227100372,
0.23754097521305084,
0.2540184557437897,
0.042053304612636566,
-0.345669686794281,
-0.08189883083105087,
-0.4569653570652008,
-0.3933148980140686,
0.0070348456501960754,
0.020713970065116882,
0.31871309876441956,
0.2508949637413025,
0.18161366879940033,
0.3025718927383423,
-0.23390145599842072,
0.21096080541610718,
-0.19718192517757416,
0.019394004717469215,
-0.03230542689561844,
0.14659680426120758,
-0.010445618070662022,
-0.14548934996128082,
-0.7709779143333435,
-0.1736413538455963,
-0.40953537821769714,
-0.17567896842956543,
0.09236764907836914,
0.18639789521694183,
0.19286292791366577,
-0.0980578064918518,
0.31521353125572205,
0.15526609122753143,
0.14260245859622955,
-0.1641341894865036,
-0.24775034189224243,
0.502872884273529,
-0.15899939835071564,
-0.4534599184989929,
0.19552788138389587,
-0.05234599858522415,
0.023475617170333862,
0.06327608227729797,
-0.6139533519744873,
-0.3414464294910431,
-0.07567540556192398,
-0.11526317894458771,
-0.1460663080215454,
0.009208476170897484,
0.015013299882411957,
-0.08377715200185776,
-0.06145726889371872,
-0.17374195158481598,
-0.3202628791332245,
0.06539470702409744,
0.40112900733947754,
0.3844507038593292,
0.007232023403048515,
0.23419463634490967,
-0.00018281862139701843,
0.6934189796447754,
-0.12285295128822327,
0.07286176085472107,
0.5206404328346252,
-0.0743304044008255,
0.41233715415000916,
-0.06679641455411911,
-0.12732701003551483,
0.1201348602771759,
0.211696594953537,
-0.23803327977657318,
0.3631564974784851,
0.26990437507629395,
-0.09067752212285995,
-0.21086591482162476,
0.02737307921051979,
-0.36079370975494385,
-0.3499302268028259,
0.008751974441111088,
0.23364852368831635,
-0.26125994324684143,
0.03183876350522041,
-0.11643511056900024,
0.003804882988333702,
-0.30377811193466187,
0.18733108043670654,
0.49395322799682617,
0.0036099031567573547,
0.041956815868616104,
-0.15596875548362732,
-0.05765889585018158,
-0.11725183576345444,
0.2322036623954773,
0.1575479954481125,
0.2719871997833252,
-0.06515728682279587,
-0.05931458994746208,
-0.009502910077571869,
-0.08845254778862,
0.5867612361907959,
0.0024507809430360794,
0.2829197943210602,
0.10989393293857574,
0.24972695112228394,
-0.11948111653327942,
0.008863493800163269,
-0.03703327104449272,
-0.12117785215377808,
0.21840497851371765,
0.5320599675178528,
-0.2337387204170227,
-0.05954686552286148,
0.1952657550573349,
0.35173144936561584,
-0.04950377345085144,
-0.11798553168773651,
-0.2484743744134903,
-0.5210692882537842,
-0.09029854834079742,
-0.2824864089488983,
0.12015149742364883,
0.36961594223976135,
0.21828892827033997,
-0.06653684377670288,
-0.006809398531913757,
-0.16051360964775085,
0.018894322216510773,
-0.035120971500873566,
0.4103120267391205,
-0.07192447781562805,
0.0006021037697792053,
0.11812374740839005,
0.3992866277694702,
0.33770817518234253,
0.45067647099494934,
-0.007632564753293991,
-0.3933665156364441,
0.046950794756412506,
0.042212069034576416,
-0.06695065647363663,
0.2874993681907654,
-0.1955002099275589,
-0.05527844280004501,
-0.19741880893707275,
0.02061217650771141,
0.10137134790420532,
0.1326083391904831,
0.1648513227701187,
0.030186574906110764,
-0.4012749195098877,
-0.5090499520301819,
0.43426933884620667,
0.07958385348320007,
0.06680531799793243,
0.5211957693099976,
-0.06312792003154755,
-0.3233915865421295,
0.20502936840057373,
-0.03751828521490097,
1.011470079421997,
0.09610331058502197,
0.1675930917263031,
0.366627037525177,
-0.13376840949058533,
0.34084007143974304,
-0.42997491359710693,
0.2296493500471115,
-0.4791175127029419,
-0.47649693489074707,
-0.04013347625732422,
-0.16588056087493896,
0.11981645226478577,
0.041815437376499176,
-0.03793594241142273,
0.6372663974761963,
-0.09632201492786407,
0.1005907952785492,
-0.12711673974990845,
0.09678846597671509,
-0.13829368352890015,
-0.002510054036974907,
-0.5894483923912048,
0.15454605221748352,
-0.05402950942516327,
0.3172924816608429,
-0.2632065713405609,
0.0669257640838623,
-0.16171963512897491,
-0.21849755942821503,
-0.09520484507083893,
0.342163622379303,
-0.3307080864906311,
0.09345769882202148,
-0.11116960644721985,
-0.22140894830226898,
-0.3422430753707886,
0.4461491107940674,
0.09702024608850479,
0.1253788322210312,
-0.2402479350566864,
0.10989896953105927,
-0.21360471844673157,
0.08751197904348373,
0.245603546500206,
0.19706837832927704,
0.30383583903312683,
-0.13848504424095154,
-0.06833325326442719,
-0.09827069193124771,
-0.07109678536653519,
-0.33423876762390137,
0.098752960562706,
-0.014589399099349976,
0.25951194763183594,
0.0322386734187603,
-0.4136873781681061,
0.013102255761623383,
0.048849377781152725,
-0.10758748650550842,
0.1526264250278473,
0.14769625663757324,
0.10190119594335556,
-0.12949058413505554,
-0.05181915685534477,
-0.3312772512435913,
-0.1208503246307373,
0.3361864387989044,
-0.04729773849248886,
-0.3055099546909332,
0.16638101637363434,
0.1474657952785492,
-0.1394098699092865,
-0.17413821816444397,
0.04806502163410187,
-0.021985331550240517,
-0.194452166557312,
0.1084388792514801,
-0.02330884337425232,
0.21514616906642914,
-0.1165274977684021,
0.20432451367378235,
0.2447420209646225,
-0.009052194654941559,
-0.054743025451898575,
-0.5661442875862122,
-0.09935994446277618,
0.3737460970878601,
0.06608042120933533,
0.1227293312549591,
0.009328894317150116,
-0.1733025163412094,
0.11255699396133423,
-0.44517871737480164,
-0.3347274959087372,
0.2802291810512543,
-0.25675028562545776,
-0.009667184203863144,
-0.010026153177022934,
0.15508952736854553,
0.3050881624221802,
0.037092022597789764,
0.17070169746875763,
-0.13408148288726807,
-0.1290074586868286,
-0.1936464011669159,
-0.20034241676330566,
0.11973893642425537,
0.1615208089351654,
-0.16639816761016846,
-0.09422603249549866,
-0.473314106464386,
-0.06966479122638702,
-0.19005295634269714,
0.0409151129424572,
0.28521037101745605,
-0.004801303148269653,
0.10637206584215164,
0.06397223472595215,
-0.135661780834198,
-0.2401709258556366,
0.3133603632450104,
-0.11204946041107178,
0.26499465107917786,
0.2100733518600464,
-0.059516943991184235,
-0.1828196942806244,
-0.007322363555431366,
-0.2620282471179962,
-0.050346069037914276,
-0.2532907724380493,
0.2573776841163635,
0.23085251450538635,
0.05165170878171921,
-0.05800788849592209,
0.2234245389699936,
0.14655457437038422,
0.3233283460140228,
-0.30663225054740906,
-0.012964793480932713,
0.3386263847351074,
0.22237974405288696,
-0.2831898629665375,
0.016691401600837708,
0.3231646716594696,
-0.13574157655239105,
-0.04839137941598892,
0.2205226719379425,
-0.2169467955827713,
-0.02120736986398697,
-0.2144840806722641,
-0.05930526182055473,
0.5266797542572021,
-0.12709781527519226,
0.4081023633480072,
0.2909776270389557,
-0.2696654200553894,
0.21179452538490295,
0.11578726023435593,
0.0540996789932251,
0.09888611733913422,
0.36619043350219727,
-0.10433421283960342,
0.19077900052070618,
0.06078382954001427,
-0.00658903643488884,
-0.22472283244132996,
-0.10981926321983337,
-0.03372758999466896,
0.638221800327301,
0.024662092328071594,
0.20667171478271484,
-0.09064619243144989,
0.3174801468849182,
-0.12262094765901566,
0.15237925946712494,
-0.039138223975896835,
-0.021098151803016663,
-0.09350918978452682,
0.16827651858329773,
0.2644135057926178,
-0.17210093140602112,
-0.09039785712957382,
0.05356275662779808,
-0.14556050300598145,
-0.1827705353498459,
-0.242581307888031,
0.18486404418945312,
-0.1448158174753189,
-0.3871326446533203,
0.21902409195899963,
0.2866806983947754,
0.11428280174732208,
-0.11524681746959686,
0.16631846129894257,
0.05599183961749077,
0.07122213393449783,
0.2925818860530853,
0.2222461849451065,
0.11828827857971191,
0.6057525277137756,
0.23411548137664795,
-0.29905784130096436,
0.18890735507011414,
0.07952477782964706,
-0.016511065885424614,
0.18279828131198883,
-0.10456939041614532,
0.07801848649978638,
0.29539188742637634,
0.1980750411748886,
-0.2551649808883667,
0.3510180115699768,
0.06661463528871536,
0.2809053957462311,
-0.25786563754081726,
0.5475485920906067,
-0.30826032161712646,
0.014803707599639893,
-0.22154083847999573,
0.022772081196308136,
-0.49751996994018555,
-0.3841424882411957,
0.14451754093170166,
0.10141108185052872,
0.2626316249370575,
0.03455737233161926,
0.11268843710422516,
-0.016267869621515274,
0.03715749830007553,
0.46512049436569214,
-0.012832827866077423,
-0.2086595892906189,
-0.07206813991069794,
-0.9624068737030029,
0.22559575736522675,
0.11684577167034149,
-0.014531182125210762,
-0.05290927365422249,
0.11251632869243622,
-0.2531203627586365,
0.13529953360557556,
0.2066013514995575,
0.11569179594516754,
0.1302884817123413,
0.0948849767446518,
-0.28283360600471497,
-0.32638096809387207,
-0.28204792737960815,
0.1670398861169815,
-0.14070552587509155,
-0.3808927834033966,
-0.016526084393262863,
-0.11971279978752136,
0.04743081331253052,
-0.06889931112527847,
-0.116849884390831,
-0.20582149922847748,
0.007344584912061691,
0.4333299994468689,
0.08910035341978073,
0.1771986484527588,
-0.12734492123126984,
-0.20872074365615845,
-0.36180245876312256,
-0.4202963411808014,
-0.01871861144900322,
0.09731690585613251,
-0.014431416988372803,
0.17940889298915863,
-0.11419149488210678,
0.013490313664078712,
-0.3242458999156952,
0.21232938766479492,
-0.0725642517209053,
0.06374290585517883,
-0.3152845501899719,
0.08575483411550522,
0.056952111423015594,
-0.01187961082905531,
-0.1182873323559761,
0.11103147268295288,
-0.11540952324867249,
0.1559169888496399,
-0.14706850051879883,
-0.33570995926856995,
0.5393784046173096,
-0.3784094452857971,
-0.304012268781662,
0.11578875035047531,
0.4202722907066345,
-0.21091023087501526,
0.019191479310393333,
-0.48960191011428833,
0.06969214230775833,
0.3337506353855133,
0.2760654389858246,
-0.12239943444728851,
0.12150442600250244,
-0.37523719668388367,
0.053364288061857224,
0.006257738918066025,
-0.11727368831634521,
0.38932108879089355,
-0.22147253155708313,
0.3267118036746979,
-0.2085368037223816
] |
https://github.com/huggingface/datasets/issues/5380 | Improve dataset `.skip()` speed in streaming mode | Hi! I agree `skip` can be inefficient to use in the current state.
To make it fast, we could use "statistics" stored in Parquet metadata and read only the chunks needed to form a dataset.
And thanks to the "datasets-server" project, which aims to store the Parquet versions of the Hub datasets (only the smaller datasets are covered currently), this solution can also be applied to datasets stored in formats other than Parquet. (cc @severo) | ### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals. | 75 | Improve dataset `.skip()` speed in streaming mode
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
Hi! I agree `skip` can be inefficient to use in the current state.
To make it fast, we could use "statistics" stored in Parquet metadata and read only the chunks needed to form a dataset.
And thanks to the "datasets-server" project, which aims to store the Parquet versions of the Hub datasets (only the smaller datasets are covered currently), this solution can also be applied to datasets stored in formats other than Parquet. (cc @severo) | [
-0.5122532248497009,
-0.16699272394180298,
-0.054168250411748886,
0.04517853260040283,
0.1200137585401535,
-0.09488403052091599,
-0.16149941086769104,
0.27324894070625305,
-0.2669192850589752,
0.20956245064735413,
0.14601297676563263,
0.5617431402206421,
-0.23323029279708862,
0.3225792348384857,
0.0774371549487114,
-0.18829715251922607,
0.025129832327365875,
-0.05403941869735718,
0.055548254400491714,
0.0869157463312149,
0.04145726561546326,
-0.0038851890712976456,
-0.2994406521320343,
-0.3729163408279419,
0.043184611946344376,
-0.03636430948972702,
-0.05015968903899193,
0.11116088926792145,
-0.18279576301574707,
-0.25813812017440796,
0.07921899855136871,
0.28849613666534424,
0.06736133992671967,
0.04808852821588516,
-0.00010975183249684051,
-0.11883804202079773,
0.4782832860946655,
-0.051279425621032715,
-0.17531278729438782,
0.07504842430353165,
-0.5014374852180481,
0.03981276601552963,
-0.2556658983230591,
-0.0712447389960289,
-0.01591954007744789,
0.1855984628200531,
0.04071599990129471,
-0.24182653427124023,
0.2065712809562683,
0.1308959573507309,
0.12380839884281158,
0.16946424543857574,
-0.18215619027614594,
0.13171347975730896,
0.5537556409835815,
0.40882807970046997,
-0.3089669346809387,
0.05052033066749573,
0.6154296398162842,
0.34454917907714844,
-0.34449562430381775,
0.5732096433639526,
-0.1397726982831955,
-0.030014269053936005,
0.32046443223953247,
-0.1275034248828888,
-0.30388763546943665,
-0.0327165350317955,
0.11263401806354523,
0.42739492654800415,
0.38985225558280945,
-0.3867224156856537,
-0.2271146923303604,
-0.4171404242515564,
0.18245543539524078,
-0.4704054892063141,
0.12555532157421112,
-0.02608688361942768,
0.019506726413965225,
0.1765913963317871,
-0.4895918369293213,
-0.3963248133659363,
-0.0749625489115715,
-0.26967859268188477,
0.3348967730998993,
-0.10806608200073242,
0.0659332424402237,
-0.05860373377799988,
0.28038427233695984,
-0.10477375984191895,
0.22233152389526367,
-0.10862414538860321,
-0.026811886578798294,
-0.04730631411075592,
-0.4343634247779846,
-0.3573611378669739,
0.03798535466194153,
0.4903317093849182,
0.20192256569862366,
0.45979630947113037,
0.18473821878433228,
0.5004737973213196,
0.2517347037792206,
0.12657135725021362,
0.09037844836711884,
-0.47616681456565857,
0.1683620810508728,
-0.14028823375701904,
0.16183635592460632,
0.3151569068431854,
0.04459134116768837,
0.044853731989860535,
0.05319471284747124,
0.10282939672470093,
-0.19528989493846893,
-0.04069036245346069,
0.0389200896024704,
-0.1843043863773346,
0.055814459919929504,
0.059167101979255676,
0.01560724526643753,
-0.03263247013092041,
0.1899261623620987,
0.41781604290008545,
-0.0037522227503359318,
-0.12474509328603745,
-0.4910794496536255,
0.016933541744947433,
-0.04466802999377251,
-0.46543997526168823,
-0.1942651867866516,
0.08747179806232452,
0.08913929760456085,
0.2593781352043152,
0.08885560929775238,
-0.1571052521467209,
0.076936274766922,
-0.0055329808965325356,
0.2270708978176117,
0.28969606757164,
0.378538578748703,
-0.14075863361358643,
-0.0906004086136818,
0.07652648538351059,
-0.1545996516942978,
-0.04574436694383621,
-0.2413664013147354,
0.2332969754934311,
-0.18051035702228546,
0.38594719767570496,
-0.07538262754678726,
-0.4638354182243347,
0.2671836316585541,
0.13057200610637665,
-0.3066190481185913,
-0.17031164467334747,
-0.5205270648002625,
0.533353328704834,
-0.17078140377998352,
-0.32630401849746704,
-0.07075247913599014,
0.07622461766004562,
-0.23635713756084442,
-0.1929626762866974,
0.3048115074634552,
0.24434393644332886,
-0.2766170799732208,
-0.1638733595609665,
-0.3653267025947571,
0.052350521087646484,
0.4462672173976898,
0.06988006830215454,
-0.20904722809791565,
-0.25045961141586304,
-0.01696339249610901,
0.4741804003715515,
0.4932270646095276,
-0.18943755328655243,
-0.31724968552589417,
0.1041538268327713,
0.0699327290058136,
0.1516827493906021,
0.3548613488674164,
-0.018860619515180588,
0.4860904812812805,
-0.010973135009407997,
-0.14804622530937195,
0.3340306282043457,
-0.24480503797531128,
0.15038247406482697,
-0.3852913975715637,
-0.27851346135139465,
0.2274981141090393,
0.40574800968170166,
-0.08614405989646912,
-0.37800338864326477,
0.003444947302341461,
0.08953215181827545,
0.2828226685523987,
-0.1093149185180664,
0.15290722250938416,
0.13789686560630798,
0.33441364765167236,
-0.26168084144592285,
-0.1504393070936203,
-0.20255959033966064,
-0.11235646158456802,
0.1316032111644745,
0.3498840034008026,
-0.019551143050193787,
0.0902467891573906,
-0.35053664445877075,
0.07446514815092087,
-0.17301273345947266,
-0.012567978352308273,
-0.010538298636674881,
0.14077326655387878,
0.020832587033510208,
-0.12667040526866913,
-0.20028290152549744,
-0.21858374774456024,
0.08753017336130142,
-0.39265987277030945,
0.05130641907453537,
-0.4163750410079956,
0.4183739721775055,
0.15871910750865936,
-0.19266068935394287,
0.24821507930755615,
0.06975840032100677,
0.09127559512853622,
-0.2200201153755188,
0.0038489755243062973,
0.44396358728408813,
0.2553578317165375,
0.5901556611061096,
0.2873261868953705,
0.21556356549263,
0.20177124440670013,
-0.1910313367843628,
0.20319116115570068,
-0.07689538598060608,
-0.04288962483406067,
-0.062091849744319916,
-0.4446618854999542,
0.3142077326774597,
0.12900471687316895,
0.2053297460079193,
0.14297741651535034,
-0.042998023331165314,
0.12306773662567139,
0.21794059872627258,
-0.26330849528312683,
0.030244380235671997,
0.049061890691518784,
-0.13157983124256134,
-0.005910089239478111,
0.19554583728313446,
-0.41678017377853394,
0.3036104440689087,
0.6377377510070801,
-0.04314153268933296,
-0.19110119342803955,
0.39808931946754456,
0.09118475019931793,
-0.4293903112411499,
0.4277121424674988,
0.4124114215373993,
0.1544550061225891,
0.258280485868454,
0.18164509534835815,
-0.16984772682189941,
0.029547635465860367,
-0.06355611979961395,
0.3170784115791321,
0.14900442957878113,
-0.019033536314964294,
-0.029387615621089935,
0.04503944516181946,
-0.2056850641965866,
-0.3261205852031708,
-0.3809739649295807,
0.26428189873695374,
0.1980952024459839,
-0.06634188443422318,
-0.16653816401958466,
-0.2633127272129059,
0.026428572833538055,
0.07853205502033234,
0.14927156269550323,
-0.23622173070907593,
-0.20295900106430054,
0.3089473247528076,
0.37618303298950195,
-0.19717691838741302,
0.11695883423089981,
0.41848137974739075,
0.299512654542923,
-0.3047763407230377,
-0.05752391368150711,
-0.32326027750968933,
-0.07442531734704971,
0.00022822245955467224,
0.19244590401649475,
0.2857622504234314,
0.5792829394340515,
0.28968724608421326,
0.04698510468006134,
0.03534410148859024,
-0.36121898889541626,
0.01850014179944992,
-0.07108382135629654,
-0.0990811139345169,
0.1815633326768875,
0.18755654990673065,
0.22925393283367157,
-0.3079553246498108,
-0.07619332522153854,
-0.04521907866001129,
-0.1890466958284378,
-0.01597578451037407,
0.028336230665445328,
-0.0920875072479248,
0.299102783203125,
-0.0009492300450801849,
-0.2850012183189392,
-0.28292518854141235,
-0.38533535599708557,
0.14163413643836975,
-0.041741371154785156,
0.09373049437999725,
-0.30431506037712097,
-0.10911458730697632,
0.1606595367193222,
-0.017545651644468307,
-0.04804491251707077,
-0.11919963359832764,
-0.7325330376625061,
0.2648962140083313,
-0.1603497862815857,
-0.05623048171401024,
0.029000263661146164,
0.044832900166511536,
0.21036288142204285,
0.30975621938705444,
-0.4411059617996216,
-0.052527397871017456,
-0.12049545347690582,
-0.16087250411510468,
-0.2344871163368225,
-0.27956080436706543,
0.2807830274105072,
0.021457288414239883,
-0.06124187260866165,
0.01412702351808548,
-0.15258722007274628,
-0.04157150536775589,
0.25234800577163696,
0.32593485713005066,
0.044269293546676636,
0.22251546382904053,
0.17908437550067902,
0.7406798005104065,
0.26762646436691284,
0.30601152777671814,
0.08108029514551163,
0.2930199205875397,
0.12208551168441772,
-0.15739598870277405,
0.24828210473060608,
0.41386693716049194,
-0.0260581374168396,
-0.30499815940856934,
0.25873851776123047,
0.030259333550930023,
-0.21937522292137146,
0.05270911753177643,
-0.24008174240589142,
0.16239607334136963,
-0.34262919425964355,
0.05711679905653,
-0.08701716363430023,
0.02254917472600937,
0.007362380623817444,
0.2639348804950714,
-0.1160559207201004,
-0.11439578235149384,
0.10617108643054962,
0.22473758459091187,
0.34894099831581116,
0.039070576429367065,
-0.49347272515296936,
-0.12510530650615692,
-0.4025917649269104,
0.06885503232479095,
0.13281194865703583,
0.023156307637691498,
-0.048352427780628204,
-0.10615776479244232,
0.06126556918025017,
0.044538047164678574,
0.33556413650512695,
-0.5377842783927917,
0.11580992490053177,
0.1689799726009369,
0.0923498123884201,
-0.04348516836762428,
0.07790146768093109,
-0.30678868293762207,
0.07754006236791611,
0.14533942937850952,
0.19339628517627716,
-0.19920116662979126,
-0.16187827289104462,
0.011854314245283604,
0.08679668605327606,
0.16790971159934998,
0.05897706374526024,
0.034555356949567795,
0.025849036872386932,
-0.5134955048561096,
0.29315081238746643,
0.21826912462711334,
-0.05194234102964401,
-0.33431705832481384,
-0.31596502661705017,
0.25349968671798706,
0.14586153626441956,
0.16436776518821716,
0.1664215326309204,
0.4781791865825653,
0.10209324955940247,
0.33352765440940857,
-0.015671279281377792,
-0.13902506232261658,
0.32883235812187195,
0.07793563604354858,
0.334468275308609,
-0.01783367246389389,
0.09311612695455551,
-0.03663209453225136,
0.08799614757299423,
0.3429102897644043,
-0.009284037165343761,
0.31824254989624023,
-0.0244603268802166,
0.23129551112651825,
-0.16377843916416168,
0.06876923143863678,
0.023414205759763718,
-0.017520766705274582,
-0.2171887457370758,
-0.25745657086372375,
0.45247092843055725,
0.006555195897817612,
-0.15456043183803558,
0.2916634976863861,
0.22916506230831146,
-0.07899065315723419,
0.4950268268585205,
0.13334012031555176,
0.9134540557861328,
0.08647175878286362,
-0.16734829545021057,
0.061900146305561066,
-0.21534746885299683,
0.38274309039115906,
-0.4619861841201782,
0.10261905193328857,
-0.007781021296977997,
-0.41804075241088867,
0.06277430802583694,
-0.03787929192185402,
0.2312595248222351,
0.15864050388336182,
-0.46040406823158264,
0.14354421198368073,
0.3670748472213745,
0.3885505199432373,
-0.13052403926849365,
0.05821443349123001,
-0.22115662693977356,
-0.25652971863746643,
-0.14380259811878204,
0.14257462322711945,
-0.11352093517780304,
-0.48390063643455505,
0.1772441864013672,
-0.2739785313606262,
0.11320841312408447,
0.07588106393814087,
-0.4056565761566162,
-0.17055317759513855,
0.028374403715133667,
-0.15020471811294556,
-0.20623737573623657,
-0.22973954677581787,
0.2128312885761261,
0.09916548430919647,
-0.1158391684293747,
0.1163865178823471,
-0.5176260471343994,
0.48310863971710205,
-0.05096634477376938,
0.33218544721603394,
0.12981615960597992,
-0.11734358221292496,
0.02083471044898033,
-0.19260358810424805,
-0.2203516662120819,
0.06721662729978561,
-0.2156830132007599,
-0.374261736869812,
0.15883144736289978,
-0.45251578092575073,
0.4379057288169861,
0.12208085507154465,
-0.033593595027923584,
0.1190858781337738,
-0.31942614912986755,
-0.42133933305740356,
0.11955402791500092,
0.055373094975948334,
-0.18644240498542786,
0.40113434195518494,
0.0986141562461853,
0.04539041221141815,
-0.25034356117248535,
0.28168508410453796,
-0.07971446216106415,
0.09059633314609528,
0.007157435640692711,
0.07448786497116089,
-0.38746100664138794,
-0.22719484567642212,
0.21130996942520142,
-0.026929227635264397,
0.09752460569143295,
-0.09427733719348907,
-0.2478928416967392,
-0.018469154834747314,
0.11673342436552048,
-0.2936303913593292,
-0.10441350936889648,
0.05819215998053551,
-0.37258246541023254,
-0.047994356602430344,
-0.2319752424955368,
0.18413960933685303,
0.05924537032842636,
0.3257550895214081,
-0.2786262333393097,
0.08269299566745758,
-0.05808646231889725,
0.043269142508506775,
-0.31845471262931824,
0.10213140398263931,
-0.14971372485160828,
0.14543193578720093,
0.08695664256811142,
0.09543776512145996,
0.003185811685398221,
-0.05645190551877022,
-0.023724347352981567,
0.28316783905029297,
-0.16273857653141022,
-0.10801343619823456,
0.13882878422737122,
0.1260596215724945,
-0.02616845816373825,
0.16205774247646332,
-0.02451559528708458,
0.030154220759868622,
-0.30761897563934326,
-0.18311037123203278,
0.14489932358264923,
-0.23512670397758484,
-0.022448532283306122,
-0.034646693617105484,
0.5504906177520752,
-0.06511848419904709,
-0.0625392496585846,
-0.13595746457576752,
0.005441784858703613,
0.014932475984096527,
-0.2342122346162796,
0.07555963844060898,
0.023819593712687492,
-0.1981704831123352,
0.3282960057258606,
0.00465942919254303,
0.0810701996088028,
0.19282662868499756,
0.23361831903457642,
0.07992138713598251,
-0.12335821986198425,
0.22976814210414886,
0.42222851514816284,
0.44664466381073,
0.10282011330127716,
-0.2836216986179352,
0.16660037636756897,
0.24181504547595978,
-0.17224055528640747,
-0.4373616874217987,
0.16397184133529663,
0.054615214467048645,
0.08563132584095001,
-0.11651592701673508,
0.1245216429233551,
0.06986264884471893,
-0.04512350261211395,
0.21957948803901672,
0.40465614199638367,
-0.2312975972890854,
0.27140364050865173,
0.17795203626155853,
-0.18455737829208374,
-0.21534045040607452,
-0.108312226831913,
0.030012240633368492,
0.28864723443984985,
0.48671430349349976,
-0.2046528458595276,
0.6505482196807861,
0.32236960530281067,
0.26663222908973694,
-0.058835454285144806,
-0.44258761405944824,
-0.23411379754543304,
0.4483725428581238,
-0.01547272503376007,
0.03904779255390167,
0.19179728627204895,
0.12745718657970428,
0.2718830108642578,
-0.4409067928791046,
-0.15933100879192352,
-0.1058267205953598,
0.13370445370674133,
-0.0005500512197613716,
0.1001584529876709,
-0.11627963185310364,
-0.39069485664367676,
0.05595147982239723,
0.041101668030023575,
0.21149441599845886,
0.3907364308834076,
-0.06067027151584625,
0.38592028617858887,
-0.20875954627990723,
0.09783382713794708,
-0.22259783744812012,
0.2840433716773987,
-0.3001837134361267,
-0.1333744078874588,
0.08186198770999908,
-0.114383265376091,
0.13844922184944153,
-0.2253488451242447,
-0.02524859830737114,
-0.1887936294078827,
-0.16902057826519012,
0.2033436894416809,
-0.04157896339893341,
-0.05354756861925125,
0.004308538511395454,
0.12964795529842377,
0.08362872898578644,
-0.11947543919086456,
0.32881155610084534,
0.09639238566160202,
-0.15969595313072205,
0.006944593042135239,
0.13723832368850708,
-0.11971405148506165,
-0.43484458327293396,
-0.023081131279468536,
0.1718953251838684,
0.007392525672912598,
-0.15786705911159515,
-0.33346375823020935,
-0.34901225566864014,
-0.3214589059352875,
0.2463170737028122,
-0.33208972215652466,
-0.1167285293340683,
-0.003929202910512686,
0.10657994449138641,
-0.22027140855789185,
0.5224566459655762,
-0.071285679936409,
-0.2897813618183136,
-0.259181946516037,
-0.506226122379303,
-0.5477335453033447,
-0.17620360851287842,
0.1006377786397934,
0.24730661511421204,
0.4382959008216858,
0.37458959221839905,
0.0888817235827446,
0.3706505298614502,
-0.1354205161333084,
-0.03252085670828819,
-0.1284736543893814,
0.23063528537750244,
-0.5009640455245972,
-0.13976943492889404,
-0.04551812261343002,
-0.1026514396071434,
0.05347596853971481,
-0.16309486329555511,
0.44704723358154297,
0.18272478878498077,
-0.057913899421691895,
0.0065612103790044785,
-0.18680517375469208,
0.20876191556453705,
-0.11418116092681885,
0.10537302494049072,
-0.1141347736120224,
-0.1784626841545105,
-0.24170032143592834,
0.054897867143154144,
-0.07351148128509521,
0.06215519830584526,
-0.05469447374343872,
0.07553690671920776,
-0.1300373077392578,
0.6020183563232422,
0.05864301323890686,
0.15587620437145233,
-0.13757796585559845,
0.04725907742977142,
0.022920876741409302,
0.08516264706850052,
-0.4825909733772278,
0.12486732751131058,
0.025767773389816284,
0.39293843507766724,
-0.4691789746284485,
-0.12649354338645935,
-0.03725849837064743,
0.10368887335062027,
-0.21539077162742615,
-0.268707811832428,
0.757299542427063,
-0.1093718409538269,
-0.05911850184202194,
-0.28773629665374756,
0.1879335641860962,
0.4281541705131531,
-0.06730296462774277,
-0.6579285860061646,
-0.04633716866374016,
0.13554969429969788,
0.05047556757926941,
0.058850813657045364,
0.36230286955833435,
0.02706984244287014,
0.07127495110034943,
-0.15982796251773834,
0.0608111172914505,
0.021751005202531815,
-0.05505708232522011,
0.1407346874475479,
-0.34421753883361816
] |
https://github.com/huggingface/datasets/issues/5380 | Improve dataset `.skip()` speed in streaming mode | @mariosasko do the current parquet files created by the datasets-server already have the required "statistics"? If not, please open an issue on https://github.com/huggingface/datasets-server with some details to make sure we implement it. | ### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals. | 32 | Improve dataset `.skip()` speed in streaming mode
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
@mariosasko do the current parquet files created by the datasets-server already have the required "statistics"? If not, please open an issue on https://github.com/huggingface/datasets-server with some details to make sure we implement it. | [
-0.43173107504844666,
-0.1258244514465332,
-0.07828357815742493,
0.09822225570678711,
0.068658247590065,
-0.1188829094171524,
-0.05497921630740166,
0.15876524150371552,
-0.3109876811504364,
0.18370407819747925,
0.14100335538387299,
0.4388366937637329,
-0.20113956928253174,
0.4492751359939575,
0.11688397824764252,
-0.2905881106853485,
0.05174237862229347,
0.03189463913440704,
-0.02894914150238037,
0.08895203471183777,
0.07720718532800674,
0.10415610671043396,
-0.29819774627685547,
-0.33985501527786255,
0.11201220750808716,
-0.011001994833350182,
-0.07360965758562088,
0.14808925986289978,
-0.19902630150318146,
-0.37498021125793457,
-0.0071222856640815735,
0.29011210799217224,
0.03476181998848915,
0.19345247745513916,
-0.00011049860040657222,
-0.13385841250419617,
0.38623517751693726,
-0.009118760004639626,
-0.24123066663742065,
0.06480808556079865,
-0.4033787250518799,
-0.1417878270149231,
-0.2009195238351822,
-0.08525106310844421,
-0.02898673340678215,
0.057995524257421494,
-0.04847956448793411,
-0.22044077515602112,
0.3187205195426941,
0.201411634683609,
0.13790269196033478,
0.19954995810985565,
-0.20801615715026855,
0.11270073056221008,
0.498447448015213,
0.4405568242073059,
-0.2395513951778412,
-0.019967101514339447,
0.5104286670684814,
0.225936621427536,
-0.25330230593681335,
0.5951210260391235,
-0.08883938193321228,
0.021273009479045868,
0.2695545256137848,
-0.12665405869483948,
-0.40487465262413025,
-0.020055249333381653,
0.12659013271331787,
0.43978267908096313,
0.4126954972743988,
-0.35259583592414856,
-0.2722635567188263,
-0.4906960129737854,
0.12884590029716492,
-0.5809690952301025,
0.14344537258148193,
-0.10994335263967514,
0.02087567374110222,
0.10613369941711426,
-0.5280547142028809,
-0.26292920112609863,
-0.055727891623973846,
-0.28893178701400757,
0.31872114539146423,
-0.14434196054935455,
-0.05059599503874779,
-0.07416314631700516,
0.3259447515010834,
-0.12024709582328796,
-0.032424550503492355,
-0.031105462461709976,
-0.0028333328664302826,
-0.03453985974192619,
-0.481947660446167,
-0.31378424167633057,
0.1540052592754364,
0.32386091351509094,
0.3005441427230835,
0.4634307622909546,
0.15512190759181976,
0.3993717432022095,
0.24510571360588074,
0.07086865603923798,
0.10618795454502106,
-0.48089632391929626,
0.1839359998703003,
-0.26704561710357666,
0.17896747589111328,
0.44134652614593506,
0.07536391913890839,
0.008253870531916618,
0.16380541026592255,
0.04619966074824333,
-0.17553772032260895,
0.03071923553943634,
0.0784301906824112,
-0.2973801791667938,
0.11167579144239426,
0.11750815063714981,
0.09739723056554794,
-0.12430723756551743,
0.08112578839063644,
0.3727138340473175,
-0.009942417964339256,
-0.030534178018569946,
-0.45108234882354736,
0.012789817526936531,
-0.1355791836977005,
-0.6107057929039001,
-0.1647312492132187,
-0.04460848495364189,
0.06718596816062927,
0.3149939775466919,
0.10412126779556274,
-0.16463646292686462,
0.1480976939201355,
0.05150367319583893,
0.16945448517799377,
0.31464624404907227,
0.4011419415473938,
-0.11197172105312347,
-0.13084250688552856,
0.08376682549715042,
-0.19233299791812897,
-0.05757562816143036,
-0.18076109886169434,
0.23192547261714935,
-0.12491468340158463,
0.2656956613063812,
-0.026889003813266754,
-0.3819451332092285,
0.2805529236793518,
0.1520581990480423,
-0.250131756067276,
-0.18535752594470978,
-0.5766891837120056,
0.6172037720680237,
-0.17261692881584167,
-0.33603110909461975,
-0.06851810961961746,
0.017209140583872795,
-0.34757235646247864,
-0.14026957750320435,
0.3463352620601654,
0.3288992643356323,
-0.31234729290008545,
-0.2321019321680069,
-0.35660412907600403,
-0.12101618945598602,
0.45018061995506287,
0.17432354390621185,
-0.20513908565044403,
-0.33572009205818176,
-0.045623473823070526,
0.44237762689590454,
0.4496748447418213,
-0.012986639514565468,
-0.26969093084335327,
0.10507232695817947,
0.006557196378707886,
0.18298304080963135,
0.40259018540382385,
-0.1810726374387741,
0.642380952835083,
0.03249124810099602,
-0.14061222970485687,
0.3169952630996704,
-0.2524937689304352,
0.1720331609249115,
-0.4004831612110138,
-0.2627548277378082,
0.2654408812522888,
0.3790905773639679,
-0.09002469480037689,
-0.3589000999927521,
0.04054144397377968,
-0.1807747483253479,
0.28343915939331055,
-0.12831459939479828,
0.10748548805713654,
0.1049792543053627,
0.34136688709259033,
-0.0984749048948288,
-0.08071352541446686,
-0.13681286573410034,
-0.15882468223571777,
0.15518590807914734,
0.3641808032989502,
0.03994184732437134,
0.08290067315101624,
-0.30585432052612305,
0.030874691903591156,
-0.09732390195131302,
0.003719508647918701,
-0.07114100456237793,
0.13606858253479004,
0.12034987658262253,
-0.09182527661323547,
-0.08694708347320557,
-0.22155582904815674,
0.04111197963356972,
-0.4011066257953644,
0.050770100206136703,
-0.3987105190753937,
0.40296798944473267,
0.2162078320980072,
-0.21972686052322388,
0.2324354648590088,
0.0631917342543602,
0.03568828105926514,
-0.2038029432296753,
-0.07647008448839188,
0.46707019209861755,
0.2712521255016327,
0.5566652417182922,
0.33487164974212646,
0.22049179673194885,
0.20506000518798828,
-0.1999778300523758,
0.19519339501857758,
-0.040225476026535034,
-0.052223287522792816,
0.0140385702252388,
-0.413468599319458,
0.350851833820343,
0.12461274862289429,
0.19499096274375916,
0.12794262170791626,
-0.03245341405272484,
0.16339056193828583,
0.20456349849700928,
-0.22576625645160675,
0.07965978980064392,
0.07969792187213898,
-0.18511271476745605,
0.021061938256025314,
0.18536914885044098,
-0.600337564945221,
0.3226510286331177,
0.586297869682312,
-0.06255654990673065,
-0.25587862730026245,
0.44447022676467896,
0.08664826303720474,
-0.48791563510894775,
0.3862234354019165,
0.43372491002082825,
0.25258177518844604,
0.31809911131858826,
0.21848903596401215,
-0.1109696701169014,
0.14586171507835388,
-0.06808872520923615,
0.33068370819091797,
0.07928584516048431,
-0.10340514034032822,
0.04331905022263527,
0.10248813033103943,
-0.12774522602558136,
-0.3896706700325012,
-0.398653119802475,
0.16371764242649078,
0.21296165883541107,
-0.20110349357128143,
-0.16984033584594727,
-0.2117939591407776,
-0.03515970706939697,
-0.00038245320320129395,
0.28279513120651245,
-0.2758426070213318,
-0.16072148084640503,
0.3063350319862366,
0.22802770137786865,
-0.2543604373931885,
0.13607916235923767,
0.33677053451538086,
0.3728792369365692,
-0.28482750058174133,
-0.0716070756316185,
-0.3689630329608917,
-0.04036668688058853,
-0.01766163483262062,
0.17976994812488556,
0.24256180226802826,
0.5387957096099854,
0.37095972895622253,
-0.011820336803793907,
-0.024674035608768463,
-0.34840741753578186,
-0.102892205119133,
-0.09142546355724335,
-0.10668306052684784,
0.21652525663375854,
0.23605157434940338,
0.2881426215171814,
-0.24465060234069824,
-0.023455914109945297,
0.0817892849445343,
-0.22789499163627625,
-0.09352604299783707,
0.0015182625502347946,
-0.038595862686634064,
0.3599190413951874,
-0.023381397128105164,
-0.31453564763069153,
-0.23335565626621246,
-0.3954944610595703,
0.276938259601593,
-0.056918174028396606,
0.0831480473279953,
-0.23835404217243195,
-0.06825940310955048,
0.19364406168460846,
-0.10290997475385666,
0.08492635935544968,
-0.19277329742908478,
-0.7683565616607666,
0.21006441116333008,
-0.17750227451324463,
-0.08250764012336731,
0.026687052100896835,
0.13944508135318756,
0.11808973550796509,
0.3593422770500183,
-0.48896533250808716,
-0.009231465868651867,
-0.1630447655916214,
-0.10644927620887756,
-0.19971749186515808,
-0.19681112468242645,
0.2993614375591278,
0.0919475108385086,
-0.0868951678276062,
0.037298381328582764,
-0.26170265674591064,
-0.03733605891466141,
0.1658494770526886,
0.2764589190483093,
0.07789123058319092,
0.5196986794471741,
0.11135239899158478,
0.9438554048538208,
0.238727867603302,
0.1951311230659485,
0.15678709745407104,
0.1677858829498291,
0.14208325743675232,
-0.19431227445602417,
0.14180757105350494,
0.406419575214386,
0.0032006502151489258,
-0.22993402183055878,
0.24687381088733673,
-0.026253242045640945,
-0.13276034593582153,
0.030854150652885437,
-0.20444051921367645,
0.10179232805967331,
-0.3007180988788605,
0.0742674469947815,
0.07369539886713028,
0.13941366970539093,
-0.03246420994400978,
0.19826990365982056,
-0.08647602796554565,
0.010338252410292625,
0.05169419199228287,
0.23865391314029694,
0.30036818981170654,
0.01655769720673561,
-0.4769965410232544,
0.04020990803837776,
-0.41028231382369995,
0.08185204863548279,
0.08159897476434708,
0.061777520924806595,
-0.18900752067565918,
-0.1620728075504303,
0.05714759603142738,
0.07792352139949799,
0.4057270884513855,
-0.47348877787590027,
0.03576700761914253,
0.1086922287940979,
0.028767205774784088,
0.0781281441450119,
0.047645021229982376,
-0.22695204615592957,
-0.047321900725364685,
0.1852160394191742,
0.26585274934768677,
-0.24292844533920288,
-0.19911615550518036,
0.10798566043376923,
0.14141950011253357,
0.18552826344966888,
0.037156976759433746,
-0.020693259313702583,
-0.02785804308950901,
-0.4301469922065735,
0.3248423635959625,
0.13874247670173645,
-0.022385571151971817,
-0.29771819710731506,
-0.24796871840953827,
0.23315133154392242,
0.12883663177490234,
0.1708240807056427,
0.18574820458889008,
0.44788405299186707,
0.11344314366579056,
0.3607075810432434,
0.07762931287288666,
-0.14354905486106873,
0.3353309631347656,
0.10633011162281036,
0.15816107392311096,
-0.12948234379291534,
0.09717455506324768,
-0.04112755134701729,
0.21091265976428986,
0.3585914075374603,
-0.04083037003874779,
0.29185751080513,
0.06201768293976784,
0.3703114986419678,
-0.14389659464359283,
0.06798204034566879,
0.13471099734306335,
0.09624890238046646,
-0.143856942653656,
-0.35114288330078125,
0.4030080735683441,
0.03603976592421532,
-0.11701337993144989,
0.26986411213874817,
0.23836058378219604,
-0.11429531872272491,
0.43293195962905884,
0.015423506498336792,
0.9242043495178223,
0.043045200407505035,
-0.1396278291940689,
0.12766622006893158,
-0.2862255573272705,
0.3979882299900055,
-0.37615853548049927,
0.019516659900546074,
-0.01835070550441742,
-0.40430131554603577,
0.04816818982362747,
-0.009051892906427383,
0.2863686680793762,
0.1628631353378296,
-0.38421308994293213,
0.1944250613451004,
0.27525603771209717,
0.23405718803405762,
-0.1276862472295761,
0.0699130967259407,
-0.060798123478889465,
-0.2459356188774109,
-0.3014594614505768,
0.1533174067735672,
-0.06960725784301758,
-0.5010312795639038,
0.21672159433364868,
-0.30381935834884644,
0.10508909821510315,
0.03692283481359482,
-0.3698703646659851,
-0.22571271657943726,
-0.10912103950977325,
-0.1686209738254547,
-0.11434729397296906,
-0.2712026536464691,
0.22886356711387634,
0.08126519620418549,
-0.18595649302005768,
0.03152983635663986,
-0.4476991891860962,
0.3874073624610901,
-0.13351958990097046,
0.3856185972690582,
0.11585129052400589,
-0.07621005177497864,
0.03290422260761261,
-0.171845942735672,
-0.1993115246295929,
0.04229526221752167,
-0.24775610864162445,
-0.29168859124183655,
0.1894788146018982,
-0.45972567796707153,
0.2849840819835663,
0.0058911885134875774,
0.021874848753213882,
-0.004972867667675018,
-0.2056056559085846,
-0.36893635988235474,
0.13384059071540833,
0.059377215802669525,
-0.19344386458396912,
0.3065511882305145,
0.01796882040798664,
0.06930774450302124,
-0.2604687809944153,
0.2848703861236572,
-0.20526427030563354,
0.15039998292922974,
0.06839124113321304,
0.16318556666374207,
-0.326570987701416,
-0.21700167655944824,
0.16972213983535767,
-0.04170152544975281,
0.014505282044410706,
-0.05987570807337761,
-0.2335016131401062,
0.02237541973590851,
0.07463783025741577,
-0.2213398516178131,
-0.05830077826976776,
0.021583344787359238,
-0.22960388660430908,
-0.04851912334561348,
-0.24512681365013123,
0.10411731898784637,
-0.04399086907505989,
0.3295843005180359,
-0.18342119455337524,
0.041354499757289886,
-0.009900080040097237,
-0.008437348529696465,
-0.3415301442146301,
0.05983610451221466,
-0.019764399155974388,
0.11494839936494827,
0.3343355655670166,
0.04125509783625603,
0.06983049213886261,
-0.019189108163118362,
0.006253063678741455,
0.22897116839885712,
-0.18672716617584229,
-0.135258287191391,
0.14384406805038452,
0.12263387441635132,
-0.08499937504529953,
0.08183906972408295,
-0.0044545275159180164,
0.1394960731267929,
-0.38553789258003235,
-0.17939695715904236,
0.09942884743213654,
-0.38298556208610535,
-0.03576115518808365,
0.00010567065328359604,
0.37803736329078674,
-0.07240886241197586,
-0.08912880718708038,
-0.0881536602973938,
0.05810016766190529,
-0.034645482897758484,
-0.17719246447086334,
0.08693630993366241,
-0.08257739245891571,
-0.2056410014629364,
0.2541339695453644,
0.0815424993634224,
0.06574933230876923,
0.13124525547027588,
0.24424538016319275,
0.03196044638752937,
-0.12723790109157562,
0.2995411455631256,
0.4914397895336151,
0.5073809623718262,
0.05438152328133583,
-0.28416499495506287,
0.21543744206428528,
0.25382721424102783,
-0.20679210126399994,
-0.27575528621673584,
0.2584216892719269,
0.1571037471294403,
0.1090146005153656,
-0.06353551894426346,
0.11505080759525299,
0.052957966923713684,
-0.04398868978023529,
0.21544930338859558,
0.3281627893447876,
-0.26929712295532227,
0.28623756766319275,
0.10961724072694778,
-0.16855663061141968,
-0.1644073724746704,
-0.029589487239718437,
0.09036268293857574,
0.28880584239959717,
0.38752150535583496,
-0.23545727133750916,
0.5419386029243469,
0.2268543541431427,
0.26629438996315,
-0.14899858832359314,
-0.5368604063987732,
-0.07275833189487457,
0.5172437429428101,
-0.0037325769662857056,
0.034687064588069916,
0.21256648004055023,
0.35655924677848816,
0.22009162604808807,
-0.47675639390945435,
-0.21800699830055237,
0.015153704211115837,
0.13479295372962952,
-0.03782724589109421,
0.16771915555000305,
-0.13380800187587738,
-0.4164147973060608,
0.09528400003910065,
0.03128763660788536,
0.2110537737607956,
0.4460996985435486,
-0.12483097612857819,
0.2759217619895935,
-0.39769959449768066,
-0.015008334070444107,
-0.1254829466342926,
0.3092435598373413,
-0.26406458020210266,
-0.11267746239900589,
0.10952495038509369,
-0.19866952300071716,
0.11304911971092224,
-0.09951692074537277,
0.06690268963575363,
-0.19521518051624298,
-0.03318696841597557,
0.14609184861183167,
-0.05321405455470085,
-0.016922391951084137,
0.04302927479147911,
0.17233557999134064,
0.05420728027820587,
-0.09584483504295349,
0.2707488536834717,
0.10723070800304413,
-0.1713079959154129,
-0.07796651124954224,
0.1541237086057663,
-0.15697583556175232,
-0.515593945980072,
-0.1044464036822319,
0.15954531729221344,
0.0229857936501503,
-0.1638455092906952,
-0.37998998165130615,
-0.3709997236728668,
-0.30517351627349854,
0.288636714220047,
-0.18120920658111572,
-0.09832195937633514,
-0.029191285371780396,
0.10799995064735413,
-0.15169398486614227,
0.4304262399673462,
-0.05224590376019478,
-0.2136305868625641,
-0.2194317728281021,
-0.44670259952545166,
-0.6724894046783447,
-0.29437488317489624,
0.14288125932216644,
0.18306463956832886,
0.4230693280696869,
0.38538047671318054,
0.09717056155204773,
0.2765182554721832,
-0.04657579958438873,
-0.02590770088136196,
-0.08659747242927551,
0.1340762972831726,
-0.48189017176628113,
-0.12564952671527863,
-0.17445141077041626,
-0.08911561965942383,
0.06306777149438858,
-0.10128258168697357,
0.37647178769111633,
0.09844736754894257,
-0.03825567290186882,
-0.008942939341068268,
-0.10317398607730865,
0.059535298496484756,
-0.13782069087028503,
0.11053264886140823,
-0.04822149872779846,
-0.09851588308811188,
-0.20961302518844604,
0.016132602468132973,
-0.084016352891922,
0.061180856078863144,
-0.0795416459441185,
0.1780247688293457,
-0.1307940036058426,
0.6080716848373413,
0.07466915249824524,
0.15045703947544098,
-0.18405576050281525,
0.17273040115833282,
0.130901038646698,
-0.07356542348861694,
-0.4393998682498932,
0.15766149759292603,
0.11114075034856796,
0.2861991822719574,
-0.401039719581604,
-0.11489862948656082,
-0.03122030198574066,
0.09889942407608032,
-0.2872430682182312,
-0.2412721961736679,
0.6991381645202637,
-0.2111329734325409,
0.018111225217580795,
-0.3045373260974884,
0.24501782655715942,
0.4952193796634674,
-0.06129142642021179,
-0.7931981682777405,
-0.029797226190567017,
0.1705327033996582,
0.032646458595991135,
0.019557934254407883,
0.44122129678726196,
-0.006721805781126022,
0.07968930900096893,
-0.14824406802654266,
0.0719565600156784,
-0.03739254176616669,
-0.05365314334630966,
0.19101187586784363,
-0.3149445056915283
] |
https://github.com/huggingface/datasets/issues/5380 | Improve dataset `.skip()` speed in streaming mode | Yes, nothing has to be changed on the datasets-server side. What I mean by "statistics" is that we can use the "row_group" metadata embedded in a Parquet file (by default) to fetch the requested rows more efficiently. | ### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals. | 37 | Improve dataset `.skip()` speed in streaming mode
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
Yes, nothing has to be changed on the datasets-server side. What I mean by "statistics" is that we can use the "row_group" metadata embedded in a Parquet file (by default) to fetch the requested rows more efficiently. | [
-0.40257972478866577,
0.033454760909080505,
-0.09691502153873444,
0.03300023078918457,
0.04281642660498619,
-0.10361076891422272,
-0.029624249786138535,
0.1893923133611679,
-0.42288291454315186,
0.17978981137275696,
0.172031432390213,
0.5246418118476868,
-0.17697995901107788,
0.2543611228466034,
0.14370068907737732,
-0.2415211796760559,
0.024029269814491272,
0.02673037350177765,
-0.08663539588451385,
0.09253247082233429,
0.02423679828643799,
0.06782889366149902,
-0.33045679330825806,
-0.34660911560058594,
0.04372260719537735,
-0.018768979236483574,
-0.05377346649765968,
0.16359390318393707,
-0.15549618005752563,
-0.3602086305618286,
0.018327442929148674,
0.3089047968387604,
0.08988302946090698,
0.15999186038970947,
-0.00010904705413850024,
-0.20469050109386444,
0.32104289531707764,
-0.0712914913892746,
-0.22056113183498383,
0.0944010466337204,
-0.3448900282382965,
-0.09070587158203125,
-0.23233075439929962,
-0.1345876008272171,
0.0050013624131679535,
0.06148206442594528,
-0.01956923119723797,
-0.30118632316589355,
0.21745091676712036,
0.20637939870357513,
0.1460302323102951,
0.19735382497310638,
-0.23273484408855438,
0.15173615515232086,
0.6137604713439941,
0.41953831911087036,
-0.24217729270458221,
0.06511480361223221,
0.5501480102539062,
0.20583544671535492,
-0.3864589035511017,
0.6078224182128906,
-0.09196625649929047,
0.0855637639760971,
0.3136829137802124,
-0.11970610171556473,
-0.4604835510253906,
0.007601875811815262,
0.12799817323684692,
0.38605648279190063,
0.4435461461544037,
-0.4007501006126404,
-0.230512335896492,
-0.4034137725830078,
0.19768847525119781,
-0.4972327649593353,
0.14104968309402466,
-0.08020807057619095,
0.02729681134223938,
0.09600086510181427,
-0.42664191126823425,
-0.22978882491588593,
-0.1368001401424408,
-0.3177693486213684,
0.31740355491638184,
-0.10150879621505737,
0.03148430958390236,
-0.05379537492990494,
0.28798115253448486,
-0.14014574885368347,
0.16968609392642975,
0.08109778165817261,
-0.06389912962913513,
-0.03417152166366577,
-0.47724735736846924,
-0.3241705894470215,
0.22101807594299316,
0.2884463965892792,
0.26708120107650757,
0.4364619851112366,
0.23725607991218567,
0.4373517334461212,
0.30303964018821716,
0.08531839400529861,
0.09015874564647675,
-0.5413488149642944,
0.2053053379058838,
-0.14639416337013245,
0.20337741076946259,
0.37049978971481323,
0.049933578819036484,
0.03444017097353935,
0.17890457808971405,
0.028550874441862106,
-0.1651204377412796,
0.028306765481829643,
0.017459768801927567,
-0.29830706119537354,
0.055015407502651215,
0.03350680321455002,
-0.03653332591056824,
-0.1377188116312027,
0.021823570132255554,
0.37666240334510803,
0.09381802380084991,
-0.0789661630988121,
-0.3849804401397705,
-0.03470480442047119,
-0.14461304247379303,
-0.5806646347045898,
-0.14431709051132202,
0.02052360773086548,
0.056658532470464706,
0.23847439885139465,
0.1286524534225464,
-0.03779368847608566,
0.07230089604854584,
0.03388131782412529,
0.1599476933479309,
0.3484194874763489,
0.4459570646286011,
-0.08306097984313965,
-0.06829013675451279,
0.07954690605401993,
-0.15475594997406006,
-0.15049749612808228,
-0.25058606266975403,
0.265666127204895,
-0.17922794818878174,
0.3474215269088745,
0.004789076745510101,
-0.3623390793800354,
0.2179946005344391,
0.17154461145401,
-0.24141134321689606,
-0.1987999677658081,
-0.4229573905467987,
0.6040705442428589,
-0.16502118110656738,
-0.41602399945259094,
-0.004814997315406799,
0.015971222892403603,
-0.21348971128463745,
-0.15657304227352142,
0.2757696211338043,
0.3059993386268616,
-0.3775556981563568,
-0.1770532727241516,
-0.34352409839630127,
-0.10819077491760254,
0.4150032699108124,
0.09442916512489319,
-0.2012011855840683,
-0.31319475173950195,
0.014479773119091988,
0.4871751666069031,
0.4591512084007263,
-0.04720813408493996,
-0.32215023040771484,
0.09512189030647278,
0.04119963198900223,
0.13111521303653717,
0.4282345175743103,
-0.0756702721118927,
0.6542419195175171,
0.012423482723534107,
-0.039802730083465576,
0.30781328678131104,
-0.23791086673736572,
0.16940370202064514,
-0.383375883102417,
-0.23407097160816193,
0.28359824419021606,
0.40455394983291626,
-0.07764890789985657,
-0.3530552387237549,
0.1328069418668747,
-0.1427297592163086,
0.3035553991794586,
-0.14937204122543335,
0.07672233879566193,
0.09814494103193283,
0.3091384172439575,
-0.2553752660751343,
-0.04945681616663933,
-0.16111192107200623,
-0.1276666224002838,
0.09025827795267105,
0.30026891827583313,
0.07263479381799698,
0.059484925121068954,
-0.36956191062927246,
0.019245505332946777,
-0.12355873733758926,
0.044166289269924164,
-0.030987340956926346,
0.14625617861747742,
0.10127678513526917,
-0.1742423176765442,
-0.11183735728263855,
-0.15250909328460693,
-0.002138003706932068,
-0.39764711260795593,
0.02516692504286766,
-0.3227798640727997,
0.36918142437934875,
0.18563690781593323,
-0.25099146366119385,
0.2762085497379303,
0.0850977897644043,
0.010853935033082962,
-0.2072814404964447,
-0.07317627966403961,
0.44634079933166504,
0.2932037115097046,
0.5121929049491882,
0.40077605843544006,
0.20084340870380402,
0.15158286690711975,
-0.1149008721113205,
0.18066808581352234,
0.006714203394949436,
-0.04961574450135231,
0.030448243021965027,
-0.4485720694065094,
0.3621116578578949,
0.08701424300670624,
0.14255407452583313,
0.11278539896011353,
-0.01791558414697647,
0.19203446805477142,
0.19513727724552155,
-0.27725812792778015,
0.07002076506614685,
0.013163574039936066,
-0.12472088634967804,
-0.041226569563150406,
0.20737750828266144,
-0.6018403172492981,
0.3872581422328949,
0.6162604689598083,
-0.014065857976675034,
-0.24238142371177673,
0.44265761971473694,
0.09508953243494034,
-0.5029475092887878,
0.4611762464046478,
0.4913255274295807,
0.32244187593460083,
0.32662323117256165,
0.26125791668891907,
-0.15412084758281708,
0.13372403383255005,
-0.10271267592906952,
0.2955043613910675,
0.0479070246219635,
-0.10416765511035919,
0.004961427301168442,
0.09557826071977615,
-0.11182313412427902,
-0.3569033145904541,
-0.45632970333099365,
0.17599542438983917,
0.2568672299385071,
-0.22973208129405975,
-0.12308456748723984,
-0.17746473848819733,
-0.09725624322891235,
0.06291566044092178,
0.17561204731464386,
-0.18872323632240295,
-0.17058065533638,
0.3267325162887573,
0.17766442894935608,
-0.30133703351020813,
0.13838502764701843,
0.3483438193798065,
0.4118006229400635,
-0.2437419891357422,
-0.011528050526976585,
-0.3423371911048889,
-0.07058524340391159,
-0.06237773597240448,
0.21811515092849731,
0.22145569324493408,
0.5903565287590027,
0.40912961959838867,
-0.049036867916584015,
0.036140866577625275,
-0.33285200595855713,
-0.0817055031657219,
-0.1724938303232193,
-0.0022002235054969788,
0.2362222969532013,
0.2169273942708969,
0.22607092559337616,
-0.35798197984695435,
-0.05163682624697685,
-0.005287839099764824,
-0.2173517793416977,
-0.032201074063777924,
0.015368025749921799,
-0.09540154039859772,
0.3702353537082672,
-0.071883425116539,
-0.39569997787475586,
-0.25778594613075256,
-0.40271633863449097,
0.2042679786682129,
-0.03288382291793823,
0.11086219549179077,
-0.32670846581459045,
-0.0399140939116478,
0.18955282866954803,
-0.048281989991664886,
0.005008884239941835,
-0.1830904632806778,
-0.7466152310371399,
0.23203544318675995,
-0.20503193140029907,
-0.12761051952838898,
0.03910618647933006,
0.15705689787864685,
0.07017223536968231,
0.4177732467651367,
-0.4979082942008972,
0.003335357643663883,
-0.019610093906521797,
-0.08049945533275604,
-0.22593790292739868,
-0.18038374185562134,
0.2747230529785156,
0.15675246715545654,
-0.12301651388406754,
0.06637562811374664,
-0.19050896167755127,
-0.0825740322470665,
0.06833326816558838,
0.34932741522789,
-0.01368064433336258,
0.3777123987674713,
0.15541917085647583,
0.7784339189529419,
0.18753531575202942,
0.162308469414711,
0.11386033892631531,
0.15900398790836334,
0.2011651247739792,
-0.12594977021217346,
0.163337841629982,
0.38292112946510315,
-0.010794952511787415,
-0.22344166040420532,
0.25906091928482056,
-0.013117613270878792,
-0.19613288342952728,
0.025083497166633606,
-0.22389143705368042,
0.11993888765573502,
-0.3449403643608093,
0.1906147450208664,
-0.03683929145336151,
0.13056261837482452,
0.025154653936624527,
0.23907241225242615,
-0.10808037221431732,
0.007626133039593697,
-0.020077835768461227,
0.21093475818634033,
0.27072784304618835,
-0.0012663647066801786,
-0.46788981556892395,
-0.0020294291898608208,
-0.3684583306312561,
0.1283896267414093,
0.08228731900453568,
0.0916420966386795,
-0.11428417265415192,
-0.16288185119628906,
0.08641821146011353,
0.040012210607528687,
0.2633917033672333,
-0.45354753732681274,
0.011146888136863708,
0.1697378307580948,
0.188972607254982,
0.08445523679256439,
0.09842714667320251,
-0.3106137812137604,
-0.004412374459207058,
0.2291843146085739,
0.18721090257167816,
-0.19980356097221375,
-0.12394709140062332,
0.15335099399089813,
0.09694775938987732,
0.1772313416004181,
-0.006067867856472731,
0.009133834391832352,
-0.09366575628519058,
-0.43445876240730286,
0.28500616550445557,
0.09045340120792389,
-0.05312690511345863,
-0.3670954406261444,
-0.30647239089012146,
0.26527920365333557,
0.16128459572792053,
0.23632489144802094,
0.2761860191822052,
0.4623758792877197,
0.09623107314109802,
0.2606548070907593,
-0.012728437781333923,
-0.18236295878887177,
0.3876810669898987,
0.047651417553424835,
0.15333284437656403,
-0.00992797315120697,
0.1277868002653122,
-0.09400386363267899,
0.18833044171333313,
0.3643385171890259,
-0.07342742383480072,
0.34973642230033875,
0.01393933780491352,
0.3121609687805176,
-0.05588020011782646,
0.025971077382564545,
0.08968408405780792,
0.0846659392118454,
-0.03276076167821884,
-0.35621196031570435,
0.4031922221183777,
0.0062789712101221085,
-0.15099859237670898,
0.24578507244586945,
0.12314770370721817,
-0.12776289880275726,
0.44308602809906006,
0.10387778282165527,
0.9348693490028381,
0.12060703337192535,
-0.09500209987163544,
0.13313597440719604,
-0.26069724559783936,
0.39863264560699463,
-0.35284996032714844,
0.06552083790302277,
-0.04093904048204422,
-0.35394126176834106,
0.0455823615193367,
-0.027516895905137062,
0.25352299213409424,
0.19114001095294952,
-0.4181816577911377,
0.10862457752227783,
0.23963110148906708,
0.2019488662481308,
-0.13044598698616028,
0.04418758302927017,
-0.12997953593730927,
-0.24076417088508606,
-0.2925708293914795,
0.1405397206544876,
-0.12810173630714417,
-0.5484625101089478,
0.17511948943138123,
-0.30561119318008423,
0.024702657014131546,
0.007062152028083801,
-0.3733378052711487,
-0.24648210406303406,
0.007882878184318542,
-0.15052111446857452,
-0.14655929803848267,
-0.2900407314300537,
0.212428480386734,
-0.009701784700155258,
-0.2863180637359619,
0.06787817180156708,
-0.39371341466903687,
0.40819740295410156,
-0.07070114463567734,
0.41217899322509766,
0.31273481249809265,
-0.0007661273702979088,
0.077857106924057,
-0.1496269553899765,
-0.2723786532878876,
0.07044737786054611,
-0.21250496804714203,
-0.3382713794708252,
0.21051019430160522,
-0.36762142181396484,
0.2643113434314728,
-0.03280577063560486,
-0.016702037304639816,
0.050775621086359024,
-0.27561140060424805,
-0.3922556936740875,
0.14723341166973114,
0.0038017332553863525,
-0.19095970690250397,
0.4973391592502594,
0.017959438264369965,
0.06887468695640564,
-0.26595887541770935,
0.2703641355037689,
-0.15360385179519653,
0.129311665892601,
0.012951508164405823,
0.18985120952129364,
-0.32883894443511963,
-0.22530904412269592,
0.25433671474456787,
-0.04010433703660965,
0.06528361886739731,
-0.021937262266874313,
-0.20579230785369873,
0.014066502451896667,
0.1276497095823288,
-0.2543362081050873,
-0.02283894270658493,
0.08397689461708069,
-0.2940799295902252,
-0.0962698683142662,
-0.23449134826660156,
0.13743343949317932,
0.05626469850540161,
0.31007522344589233,
-0.2757490277290344,
0.09157614409923553,
-0.021305078640580177,
0.011096756905317307,
-0.3572068512439728,
0.03815813362598419,
-0.07575482130050659,
0.1044093444943428,
0.260417103767395,
0.05027419701218605,
-0.021419037133455276,
0.008797820657491684,
0.016058651730418205,
0.2735748589038849,
-0.14225360751152039,
-0.13751918077468872,
0.14713133871555328,
0.11558103561401367,
-0.13820528984069824,
0.09939896315336227,
-0.0018250904977321625,
-0.00003686361014842987,
-0.44750842452049255,
-0.15318219363689423,
0.055502284318208694,
-0.3691193163394928,
-0.013475567102432251,
0.07216813415288925,
0.30232375860214233,
-0.00790010392665863,
-0.0048320479691028595,
-0.03312166780233383,
0.0081254243850708,
-0.012374438345432281,
-0.21022899448871613,
0.11918700486421585,
-0.1168038547039032,
-0.1808369755744934,
0.23312079906463623,
0.06554118543863297,
0.018349111080169678,
0.1684386134147644,
0.22513869404792786,
0.14665859937667847,
-0.08605065941810608,
0.20611459016799927,
0.4600236415863037,
0.57635897397995,
0.042685214430093765,
-0.33070969581604004,
0.12777197360992432,
0.2561754584312439,
-0.27988046407699585,
-0.2623850703239441,
0.10179771482944489,
0.16022515296936035,
0.06365309655666351,
-0.08695624023675919,
0.058890845626592636,
-0.02637987583875656,
-0.0294610857963562,
0.1884356141090393,
0.36987727880477905,
-0.2690478563308716,
0.2375105321407318,
0.09040176868438721,
-0.23889882862567902,
-0.20175735652446747,
-0.012006944045424461,
0.07666435837745667,
0.2974587380886078,
0.4558107852935791,
-0.19059482216835022,
0.475149929523468,
0.28078800439834595,
0.25941574573516846,
-0.2118217647075653,
-0.43013155460357666,
-0.06371195614337921,
0.5532687306404114,
0.06197039783000946,
0.04491209238767624,
0.3278333246707916,
0.326313853263855,
0.14850851893424988,
-0.35755106806755066,
-0.16221703588962555,
-0.06593811511993408,
0.14063182473182678,
0.004173089750111103,
0.1245916485786438,
-0.19743657112121582,
-0.33431312441825867,
-0.025090204551815987,
0.015055889263749123,
0.2825326919555664,
0.4588680863380432,
-0.10160316526889801,
0.3196977972984314,
-0.3431921899318695,
0.08501289784908295,
-0.24140146374702454,
0.2937154769897461,
-0.3199646770954132,
-0.19712835550308228,
0.1762154996395111,
-0.07026287913322449,
0.1951451450586319,
-0.15980449318885803,
0.10311432182788849,
-0.12880654633045197,
-0.04439844936132431,
0.1501302570104599,
-0.15715652704238892,
-0.032192815095186234,
-0.0009086038917303085,
0.147771954536438,
0.20025576651096344,
-0.20302355289459229,
0.274528831243515,
0.12053565680980682,
-0.194057434797287,
0.039245426654815674,
0.20562390983104706,
-0.1195526272058487,
-0.42009907960891724,
-0.08275336772203445,
0.14758926630020142,
-0.09439052641391754,
-0.10778702795505524,
-0.39673829078674316,
-0.3336595296859741,
-0.28905075788497925,
0.2366236299276352,
-0.20040076971054077,
-0.08593296259641647,
-0.08101553469896317,
0.11667102575302124,
-0.15620385110378265,
0.44296175241470337,
-0.14391517639160156,
-0.17080184817314148,
-0.20027431845664978,
-0.4330555200576782,
-0.7228114008903503,
-0.2135343849658966,
0.2090499997138977,
0.056173473596572876,
0.41582298278808594,
0.47728803753852844,
0.14082878828048706,
0.23064307868480682,
-0.018270671367645264,
-0.057535625994205475,
-0.12610889971256256,
0.14803126454353333,
-0.5502209663391113,
-0.12660200893878937,
-0.21025170385837555,
-0.08368731290102005,
0.014846377074718475,
-0.16409319639205933,
0.3432897925376892,
0.05241233482956886,
-0.028293795883655548,
-0.10485051572322845,
-0.23512032628059387,
0.2590970993041992,
0.05773055553436279,
0.13726305961608887,
-0.08527012914419174,
-0.047051772475242615,
-0.18658137321472168,
0.02694549597799778,
-0.12961411476135254,
0.019954897463321686,
-0.046101611107587814,
0.13924594223499298,
0.0047223325818777084,
0.579590916633606,
0.07545999437570572,
0.1567409187555313,
-0.12605822086334229,
0.19629614055156708,
0.004563756287097931,
-0.06162179261445999,
-0.4200837016105652,
0.17289187014102936,
0.10858523100614548,
0.25673702359199524,
-0.512342095375061,
-0.11738499253988266,
-0.04666990041732788,
0.09290489554405212,
-0.28366947174072266,
-0.2805957794189453,
0.7003114223480225,
-0.13814924657344818,
-0.030198896303772926,
-0.29272744059562683,
0.2711356282234192,
0.4317786991596222,
-0.07481019198894501,
-0.7244646549224854,
-0.07452848553657532,
0.18402612209320068,
0.09235267341136932,
0.05996006354689598,
0.4488118886947632,
-0.03713192045688629,
0.09293834865093231,
-0.16248996555805206,
0.02853289246559143,
-0.10455017536878586,
-0.03216716647148132,
0.10320405662059784,
-0.3354252576828003
] |
https://github.com/huggingface/datasets/issues/5380 | Improve dataset `.skip()` speed in streaming mode | Glad to see the feature could be of interest.
I'm sure there are many possible ways to implement this feature. I don't know enough about the datasets-server, but I guess that it is not instantaneous, in the sense that user-owned private datasets might need hours or days until they are ported to the datasets-server (if at all), which could be cumbersome. Having optionally that information in the `dataset_infos.json` file would make it easier for users to control the skip process a bit. | ### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals. | 82 | Improve dataset `.skip()` speed in streaming mode
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
Glad to see the feature could be of interest.
I'm sure there are many possible ways to implement this feature. I don't know enough about the datasets-server, but I guess that it is not instantaneous, in the sense that user-owned private datasets might need hours or days until they are ported to the datasets-server (if at all), which could be cumbersome. Having optionally that information in the `dataset_infos.json` file would make it easier for users to control the skip process a bit. | [
-0.3779139518737793,
-0.022256337106227875,
-0.13407522439956665,
-0.04658062011003494,
0.015885569155216217,
-0.11308467388153076,
-0.03142925724387169,
0.3005823493003845,
-0.32740354537963867,
0.25185611844062805,
0.2755398154258728,
0.37828898429870605,
-0.27622517943382263,
0.31587228178977966,
0.15572327375411987,
-0.21660113334655762,
0.06521348655223846,
0.0313875675201416,
-0.03699886053800583,
0.1513054370880127,
0.015656959265470505,
-0.005084536969661713,
-0.25765588879585266,
-0.49430978298187256,
0.11185643076896667,
-0.03385230153799057,
0.05165138840675354,
0.03735369071364403,
-0.11997934430837631,
-0.365477979183197,
-0.03392438217997551,
0.39353567361831665,
0.1330977976322174,
0.013632729649543762,
-0.00011269326932961121,
-0.18771454691886902,
0.440140962600708,
0.013437295332551003,
-0.3358296751976013,
0.1264086216688156,
-0.6298156380653381,
-0.06970784813165665,
-0.22554373741149902,
-0.09667398035526276,
0.12443149834871292,
0.16365812718868256,
0.11121011525392532,
-0.21619722247123718,
0.23897527158260345,
0.061742182821035385,
0.11175276339054108,
0.1888153851032257,
-0.16947577893733978,
0.13153190910816193,
0.49827978014945984,
0.5043920874595642,
-0.3194570243358612,
0.015182649716734886,
0.5182154774665833,
0.33818143606185913,
-0.3049582540988922,
0.7098023891448975,
-0.16220025718212128,
0.14265818893909454,
0.2788555324077606,
-0.1728603094816208,
-0.35376736521720886,
-0.09660321474075317,
0.005478266626596451,
0.511175811290741,
0.5468102097511292,
-0.341875284910202,
-0.28825613856315613,
-0.5097466707229614,
0.22336584329605103,
-0.40317633748054504,
0.08189473301172256,
-0.15775412321090698,
-0.09158511459827423,
0.19543325901031494,
-0.5858505964279175,
-0.24184106290340424,
-0.14971370995044708,
-0.09260192513465881,
0.5146876573562622,
-0.24027061462402344,
-0.02709248661994934,
-0.05082147568464279,
0.41757723689079285,
-0.08905651420354843,
0.1576874703168869,
-0.10639388859272003,
0.018511885777115822,
-0.017073117196559906,
-0.3282322585582733,
-0.34914588928222656,
0.19873207807540894,
0.2360537350177765,
0.3167426288127899,
0.5504435896873474,
0.3401293158531189,
0.3765140473842621,
0.15827228128910065,
0.16017836332321167,
-0.04031238332390785,
-0.4661259055137634,
0.2839764654636383,
-0.21780480444431305,
0.20747429132461548,
0.42378172278404236,
0.16503286361694336,
0.10334226489067078,
0.0558762401342392,
0.026516631245613098,
-0.13439969718456268,
0.10890068113803864,
0.08473499864339828,
-0.15228664875030518,
0.12229914218187332,
0.02481665462255478,
-0.0465010330080986,
-0.12846145033836365,
0.05059549957513809,
0.2542249262332916,
0.08874992281198502,
-0.06436367332935333,
-0.49617528915405273,
-0.09253674000501633,
-0.07894326746463776,
-0.530267596244812,
-0.09543082863092422,
-0.062074463814496994,
0.2075464427471161,
0.3409901559352875,
0.20683057606220245,
-0.07642930746078491,
0.18934230506420135,
-0.06431743502616882,
0.19345256686210632,
0.3330698609352112,
0.5475954413414001,
-0.07271257042884827,
-0.04854991286993027,
0.25789162516593933,
-0.17434825003147125,
0.079422228038311,
-0.24321670830249786,
0.27292871475219727,
-0.14845380187034607,
0.4562969505786896,
-0.0009655579924583435,
-0.5472779870033264,
0.25909650325775146,
0.15202410519123077,
-0.4026413559913635,
-0.18677157163619995,
-0.3805655241012573,
0.5277513861656189,
-0.15268787741661072,
-0.45835092663764954,
0.07216446846723557,
0.050557941198349,
-0.3363458812236786,
-0.24688629806041718,
0.3253944218158722,
0.4004192352294922,
-0.3818156123161316,
-0.21440334618091583,
-0.6008294224739075,
-0.12557663023471832,
0.38020241260528564,
-0.07152070105075836,
-0.26684024930000305,
-0.27537813782691956,
-0.10564294457435608,
0.4863595962524414,
0.4889512062072754,
-0.10654143989086151,
-0.3601555824279785,
0.32295897603034973,
-0.005849577486515045,
0.23136450350284576,
0.3788341283798218,
0.13087163865566254,
0.44684475660324097,
0.034339435398578644,
-0.17115651071071625,
0.31512707471847534,
-0.2516104578971863,
0.06773913651704788,
-0.303078293800354,
-0.2997235357761383,
0.20512239634990692,
0.3755936622619629,
-0.14591020345687866,
-0.2247491180896759,
0.11475298553705215,
-0.12024705857038498,
0.34963417053222656,
-0.07534898817539215,
0.13970090448856354,
0.19394944608211517,
0.38402390480041504,
-0.23774854838848114,
-0.11744654923677444,
-0.17951422929763794,
-0.11649923771619797,
0.09301526099443436,
0.3401179611682892,
-0.07078719884157181,
0.054884303361177444,
-0.34748172760009766,
0.05459801107645035,
-0.14743080735206604,
0.020139921456575394,
-0.0015869811177253723,
0.06626880913972855,
0.12322154641151428,
-0.11884497106075287,
-0.16856272518634796,
-0.1267220675945282,
-0.05381762236356735,
-0.40615299344062805,
0.04213875159621239,
-0.44064944982528687,
0.19538679718971252,
0.21856684982776642,
-0.09881561249494553,
0.12684699892997742,
-0.051575154066085815,
0.0012931078672409058,
-0.26987260580062866,
-0.12767553329467773,
0.4315594434738159,
0.24664703011512756,
0.48107075691223145,
0.31288942694664,
0.3771246075630188,
0.14599815011024475,
-0.11849743127822876,
0.19413647055625916,
0.052721958607435226,
-0.004327609669417143,
-0.03942551091313362,
-0.37497955560684204,
0.4088127613067627,
0.10509440302848816,
0.18456342816352844,
0.07646261155605316,
-0.014758789911866188,
0.18283146619796753,
0.14941400289535522,
-0.30146247148513794,
-0.11253921687602997,
0.05511898547410965,
-0.1582302302122116,
-0.019006576389074326,
0.22577813267707825,
-0.41874977946281433,
0.3461376130580902,
0.5074189901351929,
-0.14398686587810516,
-0.20577645301818848,
0.3708457052707672,
0.0582224503159523,
-0.3900468647480011,
0.5182466506958008,
0.6330651044845581,
0.39677321910858154,
0.2791990637779236,
0.24168603122234344,
-0.3060305118560791,
0.1338973194360733,
-0.18993766605854034,
0.24325180053710938,
0.03305064141750336,
-0.05526451766490936,
0.06530269235372543,
-0.0014073937200009823,
-0.14572568237781525,
-0.22382637858390808,
-0.4121219515800476,
0.26315006613731384,
0.16743089258670807,
-0.12628917396068573,
-0.22812408208847046,
-0.26261594891548157,
-0.178315669298172,
-0.012659112922847271,
0.13748382031917572,
-0.17176638543605804,
-0.12726464867591858,
0.3067260980606079,
0.23242583870887756,
-0.32239142060279846,
0.20972596108913422,
0.3048897385597229,
0.283199667930603,
-0.28814202547073364,
-0.14733806252479553,
-0.19322143495082855,
0.15480880439281464,
0.010097011923789978,
0.1899871528148651,
0.2430122345685959,
0.4515998661518097,
0.3673657476902008,
0.02864081971347332,
-0.07438067346811295,
-0.36118200421333313,
-0.08205313235521317,
-0.09561146795749664,
0.06634727865457535,
0.21874266862869263,
0.15918004512786865,
0.23509782552719116,
-0.15222826600074768,
-0.030800461769104004,
-0.11100457608699799,
-0.10997223854064941,
-0.053610436618328094,
-0.014502359554171562,
-0.08610350638628006,
0.4376964867115021,
-0.16127434372901917,
-0.2730007767677307,
-0.24091915786266327,
-0.34245264530181885,
0.18522286415100098,
-0.06754328310489655,
0.16979622840881348,
-0.1233193650841713,
0.06751931458711624,
0.12868554890155792,
0.0365927591919899,
-0.08180374652147293,
-0.14627325534820557,
-0.7278485894203186,
0.25887444615364075,
-0.2961162328720093,
-0.02176826074719429,
0.01951010152697563,
0.01706293597817421,
0.07021726667881012,
0.4049914479255676,
-0.4514113664627075,
-0.01940402016043663,
-0.17692461609840393,
0.0038163289427757263,
-0.26939138770103455,
-0.29559606313705444,
0.3223157823085785,
0.06281816959381104,
-0.061851464211940765,
-0.03211340308189392,
-0.07998070120811462,
-0.07807814329862595,
-0.018432743847370148,
0.3444119691848755,
0.07223771512508392,
0.27492570877075195,
0.19815129041671753,
0.8825472593307495,
0.2201492041349411,
0.25301095843315125,
-0.014649316668510437,
0.2813577950000763,
0.05033065006136894,
0.013134948909282684,
0.23664048314094543,
0.38141050934791565,
0.037267960608005524,
-0.25892260670661926,
0.144958034157753,
0.005218495614826679,
-0.10248546302318573,
0.11205074191093445,
-0.10350862145423889,
0.06785427033901215,
-0.24132344126701355,
0.1855587214231491,
-0.029595471918582916,
0.15011505782604218,
-0.0027252156287431717,
0.15172156691551208,
-0.15334679186344147,
-0.05903305858373642,
-0.13089706003665924,
0.2833670973777771,
0.37304267287254333,
0.046629976481199265,
-0.5372064113616943,
-0.029882239177823067,
-0.2821415364742279,
0.190529465675354,
0.24306780099868774,
0.007322174496948719,
-0.10923141241073608,
-0.13214218616485596,
0.0439225398004055,
0.17664413154125214,
0.2995903491973877,
-0.553114652633667,
0.002143334597349167,
0.057160038501024246,
0.099424809217453,
0.11399861425161362,
-0.009978760033845901,
-0.18945002555847168,
0.1266348659992218,
0.07724963128566742,
0.018356990069150925,
-0.11040136963129044,
-0.04594964161515236,
0.1962192803621292,
0.12517516314983368,
0.1564931422472,
-0.10911956429481506,
0.10272082686424255,
-0.0491705983877182,
-0.480365127325058,
0.0873466208577156,
0.15020829439163208,
-0.07664086669683456,
-0.5262715816497803,
-0.42836055159568787,
0.34459006786346436,
0.2214873731136322,
0.22270183265209198,
0.08373184502124786,
0.31665894389152527,
0.21298454701900482,
0.33339056372642517,
0.0150863416492939,
-0.25433215498924255,
0.45887935161590576,
-0.04167548567056656,
0.22674545645713806,
-0.02533625066280365,
0.027556374669075012,
-0.10034166276454926,
0.131050705909729,
0.36176908016204834,
-0.13198207318782806,
0.42945626378059387,
0.1982278972864151,
0.22007809579372406,
-0.09366391599178314,
0.07412738353013992,
0.033475667238235474,
0.007727970369160175,
-0.07738632708787918,
-0.4873596429824829,
0.38563084602355957,
0.046516429632902145,
-0.1476842164993286,
0.3719695806503296,
-0.0756048709154129,
-0.10780039429664612,
0.2596840262413025,
-0.1091613844037056,
0.8657286763191223,
0.22530996799468994,
-0.09090246260166168,
0.05454670637845993,
-0.09821422398090363,
0.39747875928878784,
-0.29692280292510986,
0.1558631807565689,
0.03311077132821083,
-0.3677408695220947,
0.02350902371108532,
0.007644433528184891,
0.32260552048683167,
0.1850890815258026,
-0.33313608169555664,
0.06635473668575287,
0.1180315762758255,
0.3186199963092804,
-0.09649582952260971,
-0.014743119478225708,
-0.2423889935016632,
-0.22409626841545105,
-0.059445418417453766,
0.12290118634700775,
-0.08107262849807739,
-0.39870893955230713,
0.2034156620502472,
-0.3553622364997864,
0.06782163679599762,
0.0038353800773620605,
-0.456990122795105,
-0.2714996337890625,
-0.09398845583200455,
-0.048717714846134186,
-0.2160976529121399,
-0.24124017357826233,
0.19805985689163208,
0.1804017722606659,
-0.20330922305583954,
0.08540081232786179,
-0.4475158452987671,
0.38262173533439636,
-0.07201393693685532,
0.3930957615375519,
0.05703159421682358,
-0.08411648124456406,
0.1385403424501419,
-0.2050321102142334,
-0.2789744436740875,
0.11060455441474915,
-0.20013613998889923,
-0.34638798236846924,
0.12663018703460693,
-0.4462355375289917,
0.33687394857406616,
0.008604120463132858,
-0.10057403147220612,
0.07058223336935043,
-0.22703352570533752,
-0.40430158376693726,
0.12201367318630219,
0.06569863855838776,
-0.22017095983028412,
0.42601341009140015,
-0.02300354465842247,
0.08268670737743378,
-0.21845732629299164,
0.2955256402492523,
-0.1561211347579956,
0.11988531053066254,
0.035734884440898895,
-0.02616102062165737,
-0.22153957188129425,
-0.20830729603767395,
0.3035581111907959,
-0.24060039222240448,
0.05794569104909897,
-0.03669560328125954,
-0.07832367718219757,
0.06053273379802704,
-0.05877905339002609,
-0.25465449690818787,
-0.06684605032205582,
0.1580294668674469,
-0.3010897934436798,
-0.09521900117397308,
-0.25987860560417175,
0.12261883914470673,
-0.1425797939300537,
0.3249967694282532,
-0.39276406168937683,
0.10781188309192657,
-0.00924439262598753,
0.0087539441883564,
-0.2978295683860779,
0.00923590362071991,
-0.044048529118299484,
0.042758964002132416,
0.22407697141170502,
0.24022167921066284,
0.02128131315112114,
0.005017055198550224,
-0.05716323107481003,
0.3617636561393738,
-0.16386815905570984,
-0.0956583097577095,
0.052154507488012314,
0.1596696376800537,
-0.10537705570459366,
-0.02956848405301571,
0.06602124869823456,
0.051997214555740356,
-0.312958687543869,
-0.11944407224655151,
0.09592881798744202,
-0.32586318254470825,
0.054524343460798264,
0.17429664731025696,
0.1948520392179489,
0.025885630398988724,
-0.014439919963479042,
0.062461789697408676,
-0.07324302196502686,
0.17196059226989746,
-0.17284336686134338,
0.13652443885803223,
-0.00622179638594389,
-0.17581237852573395,
0.2731338441371918,
-0.026304185390472412,
-0.042385637760162354,
0.15805977582931519,
0.19026532769203186,
0.038187481462955475,
-0.07382583618164062,
0.16974857449531555,
0.3819042146205902,
0.38262420892715454,
-0.01904703490436077,
-0.11126093566417694,
0.14999568462371826,
0.21836338937282562,
-0.2182297706604004,
-0.3913983702659607,
0.17812217772006989,
0.0819590836763382,
0.04804487153887749,
-0.1252482831478119,
0.15515463054180145,
-0.021140549331903458,
0.12213613092899323,
0.11104486137628555,
0.16521009802818298,
-0.1591413915157318,
0.26974961161613464,
0.2672449052333832,
-0.1676775962114334,
-0.187335804104805,
-0.21070392429828644,
-0.024533361196517944,
0.36023685336112976,
0.3586072325706482,
-0.4130690395832062,
0.5402454733848572,
0.17170289158821106,
0.18831226229667664,
-0.1708921492099762,
-0.6122965812683105,
-0.09149478375911713,
0.43450242280960083,
-0.15042611956596375,
0.23653221130371094,
0.2800532579421997,
0.3105170428752899,
0.1720646321773529,
-0.24479757249355316,
-0.15110301971435547,
-0.1615898609161377,
0.2075994610786438,
-0.03871883824467659,
-0.059103816747665405,
-0.07669198513031006,
-0.3915785253047943,
0.055078934878110886,
0.08049198240041733,
0.1788911521434784,
0.5774177312850952,
-0.13720574975013733,
0.1787576973438263,
-0.36915090680122375,
0.21529218554496765,
-0.12169361859560013,
0.27800261974334717,
-0.34182772040367126,
-0.27742403745651245,
0.11426158249378204,
-0.10463711619377136,
0.2454245686531067,
-0.22714172303676605,
0.008593987673521042,
-0.21931245923042297,
0.12033234536647797,
0.15303337574005127,
-0.14103326201438904,
-0.017925366759300232,
-0.09588051587343216,
0.17048710584640503,
0.20262685418128967,
-0.15787872672080994,
0.21905618906021118,
0.04867926985025406,
-0.13813403248786926,
0.16566501557826996,
0.25109919905662537,
-0.09266069531440735,
-0.5400305390357971,
-0.08092192560434341,
0.08456425368785858,
-0.08238860219717026,
-0.16687849164009094,
-0.24151813983917236,
-0.23225900530815125,
-0.24089089035987854,
0.443124383687973,
-0.2620198726654053,
-0.12149616330862045,
-0.046322356909513474,
0.08080427348613739,
-0.3322107493877411,
0.33458229899406433,
-0.12646830081939697,
-0.211582750082016,
-0.2072194516658783,
-0.39760440587997437,
-0.6228488683700562,
-0.21188732981681824,
0.17374888062477112,
0.2342681884765625,
0.3918647766113281,
0.3359636068344116,
0.03816567733883858,
0.22264240682125092,
-0.06570406258106232,
-0.1605183333158493,
-0.013342711143195629,
0.2583826780319214,
-0.4693039357662201,
-0.16265276074409485,
-0.2275056689977646,
-0.0016263928264379501,
0.05242348462343216,
-0.18721336126327515,
0.38646063208580017,
0.06531696021556854,
-0.08079876750707626,
-0.08792946487665176,
-0.15168839693069458,
0.2913178503513336,
0.055638961493968964,
0.27076640725135803,
-0.0002815108746290207,
-0.06950470805168152,
-0.2503924071788788,
0.0017428640276193619,
-0.07471165060997009,
0.15641196072101593,
-0.05687187612056732,
0.13803419470787048,
-0.02966522052884102,
0.617317795753479,
0.005190901458263397,
0.34471461176872253,
-0.1270814687013626,
0.3093540072441101,
0.05165480077266693,
-0.11168111115694046,
-0.4250406324863434,
0.0646350234746933,
-0.14105495810508728,
0.3380693793296814,
-0.3494880795478821,
-0.10740140825510025,
-0.058042481541633606,
0.0607232004404068,
-0.29174989461898804,
-0.212086021900177,
0.6431528329849243,
-0.1657569259405136,
0.10812127590179443,
-0.2443862408399582,
0.21319139003753662,
0.3602883815765381,
-0.06432779133319855,
-0.7244231700897217,
-0.08903640508651733,
0.25684282183647156,
0.16473162174224854,
0.13928474485874176,
0.4159994125366211,
-0.03919239342212677,
0.07732473313808441,
-0.12033826112747192,
0.22129666805267334,
-0.00003980100154876709,
-0.04554816335439682,
0.17928682267665863,
-0.38369596004486084
] |
https://github.com/huggingface/datasets/issues/5380 | Improve dataset `.skip()` speed in streaming mode | re: statistics:
- https://arrow.apache.org/docs/python/generated/pyarrow.parquet.FileMetaData.html
- https://arrow.apache.org/docs/python/generated/pyarrow.parquet.RowGroupMetaData.html
```python
>>> import pyarrow.parquet as pq
>>> import hffs
>>> fs = hffs.HfFileSystem("glue", repo_type="dataset", revision="refs/convert/parquet")
>>> metadata = pq.read_metadata("ax/glue-test.parquet", filesystem=fs)
>>> metadata
<pyarrow._parquet.FileMetaData object at 0x7f4537cec400>
created_by: parquet-cpp-arrow version 7.0.0
num_columns: 4
num_rows: 1104
num_row_groups: 2
format_version: 1.0
serialized_size: 2902
>>> metadata.row_group(0)
<pyarrow._parquet.RowGroupMetaData object at 0x7f45564bcbd0>
num_columns: 4
num_rows: 1000
total_byte_size: 164474
>>> metadata.row_group(1)
<pyarrow._parquet.RowGroupMetaData object at 0x7f455005c400>
num_columns: 4
num_rows: 104
total_byte_size: 13064
``` | ### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals. | 71 | Improve dataset `.skip()` speed in streaming mode
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
re: statistics:
- https://arrow.apache.org/docs/python/generated/pyarrow.parquet.FileMetaData.html
- https://arrow.apache.org/docs/python/generated/pyarrow.parquet.RowGroupMetaData.html
```python
>>> import pyarrow.parquet as pq
>>> import hffs
>>> fs = hffs.HfFileSystem("glue", repo_type="dataset", revision="refs/convert/parquet")
>>> metadata = pq.read_metadata("ax/glue-test.parquet", filesystem=fs)
>>> metadata
<pyarrow._parquet.FileMetaData object at 0x7f4537cec400>
created_by: parquet-cpp-arrow version 7.0.0
num_columns: 4
num_rows: 1104
num_row_groups: 2
format_version: 1.0
serialized_size: 2902
>>> metadata.row_group(0)
<pyarrow._parquet.RowGroupMetaData object at 0x7f45564bcbd0>
num_columns: 4
num_rows: 1000
total_byte_size: 164474
>>> metadata.row_group(1)
<pyarrow._parquet.RowGroupMetaData object at 0x7f455005c400>
num_columns: 4
num_rows: 104
total_byte_size: 13064
``` | [
-0.4533214569091797,
0.08647733926773071,
-0.03593609482049942,
0.018416594713926315,
0.05432776361703873,
-0.10548391938209534,
-0.11660325527191162,
0.20757023990154266,
-0.5190563201904297,
0.06918951869010925,
0.1935848742723465,
0.6088050007820129,
-0.08815257251262665,
0.15086565911769867,
0.1888626515865326,
-0.2774747312068939,
-0.05072661489248276,
-0.040490999817848206,
0.07515877485275269,
0.11679880321025848,
0.04349307715892792,
-0.04692330211400986,
-0.3281395435333252,
-0.23582272231578827,
0.12682317197322845,
0.030147753655910492,
-0.11037269979715347,
0.06429589539766312,
-0.1942964792251587,
-0.456337571144104,
-0.03895331174135208,
0.1777348518371582,
-0.005627539940178394,
0.05709093436598778,
-0.0001177442172775045,
-0.09202996641397476,
0.4201255440711975,
-0.06172961741685867,
-0.17890796065330505,
0.13636943697929382,
-0.18931695818901062,
-0.179441899061203,
-0.055967822670936584,
-0.14387282729148865,
0.11205225437879562,
-0.2200777232646942,
-0.0698850154876709,
-0.213088259100914,
0.21931082010269165,
0.2386457920074463,
0.09056916832923889,
0.25451159477233887,
-0.08454824239015579,
0.24804559350013733,
0.7817156910896301,
0.28722864389419556,
-0.1478326916694641,
0.1852356195449829,
0.5561327934265137,
0.09787771850824356,
-0.3847152590751648,
0.4855346977710724,
-0.13430142402648926,
0.04402901977300644,
0.1741398125886917,
0.01652011275291443,
-0.2590298652648926,
0.05312328040599823,
0.05541768670082092,
0.30393004417419434,
0.2975587844848633,
-0.49333974719047546,
-0.26178789138793945,
-0.4680832028388977,
0.28431832790374756,
-0.5444896221160889,
0.08467750996351242,
0.1491350531578064,
-0.051788024604320526,
0.05490586534142494,
-0.24833178520202637,
-0.14518602192401886,
-0.11360610276460648,
-0.21989081799983978,
0.29737037420272827,
-0.021116510033607483,
0.0892707109451294,
0.040566444396972656,
0.22378529608249664,
-0.05862715095281601,
0.12130513042211533,
-0.01615501567721367,
0.013300608843564987,
0.0023072222247719765,
-0.3451695740222931,
-0.20946434140205383,
0.04988778382539749,
0.2563633918762207,
0.2510978579521179,
0.39307135343551636,
0.3075277507305145,
0.33297640085220337,
0.48345527052879333,
0.1797393262386322,
0.03456495702266693,
-0.5942994356155396,
0.08574946969747543,
-0.1604493409395218,
0.10518733412027359,
0.41299787163734436,
-0.0008674897253513336,
-0.0031550750136375427,
0.23102176189422607,
-0.11746199429035187,
0.035379473119974136,
0.019144657999277115,
0.12519413232803345,
-0.14829041063785553,
-0.08194304257631302,
0.024125298485159874,
-0.2896158993244171,
-0.20360206067562103,
0.0013957526534795761,
0.317769318819046,
0.03658442199230194,
-0.03814215213060379,
-0.3792184591293335,
0.1691589504480362,
-0.2457006424665451,
-0.6883564591407776,
-0.13556411862373352,
-0.012621141970157623,
-0.011347923427820206,
0.2768940329551697,
0.10808451473712921,
0.018346933647990227,
0.06124071776866913,
0.11397752910852432,
0.16390253603458405,
0.3493848741054535,
0.48904067277908325,
-0.15152163803577423,
-0.19347339868545532,
0.06768088787794113,
-0.15636472404003143,
-0.14909082651138306,
-0.08191505074501038,
0.29053252935409546,
-0.16296544671058655,
0.3463813066482544,
-0.06771976500749588,
-0.2694414556026459,
0.2450493425130844,
0.12092925608158112,
-0.10189224779605865,
-0.2544820010662079,
-0.5564155578613281,
0.5359039902687073,
-0.19117245078086853,
-0.34653961658477783,
0.02882096916437149,
-0.0013264268636703491,
-0.05810731276869774,
-0.2550213634967804,
0.2484138011932373,
0.30459070205688477,
-0.4379461109638214,
-0.23506444692611694,
-0.40851151943206787,
-0.04234344884753227,
0.4606676399707794,
0.12370343506336212,
-0.2239254117012024,
-0.1870245635509491,
0.03212101012468338,
0.47699397802352905,
0.5862947106361389,
-0.07169349491596222,
-0.3733803629875183,
0.09303175657987595,
-0.02671089395880699,
0.10746639221906662,
0.4658524990081787,
-0.15083138644695282,
0.5525482892990112,
0.044141288846731186,
-0.1046353131532669,
0.2907055616378784,
-0.2234053611755371,
0.09598689526319504,
-0.3697989284992218,
-0.27856263518333435,
0.2741813063621521,
0.36695021390914917,
-0.15960296988487244,
-0.487995445728302,
0.15562579035758972,
-0.43836331367492676,
0.33637091517448425,
-0.06410759687423706,
0.16950573027133942,
0.14968059957027435,
0.3425363004207611,
-0.23552559316158295,
-0.08312981575727463,
-0.16419565677642822,
-0.22844216227531433,
0.050657689571380615,
0.198110893368721,
-0.06484047323465347,
-0.1872694343328476,
-0.37211501598358154,
-0.055116280913352966,
-0.04499043524265289,
-0.03694109991192818,
-0.029655102640390396,
0.13702908158302307,
-0.006464250385761261,
-0.04809953644871712,
-0.10057955980300903,
-0.061321817338466644,
-0.03975263237953186,
-0.32014113664627075,
0.18545566499233246,
-0.13799896836280823,
0.5170955061912537,
0.1870516687631607,
-0.3843444585800171,
0.2533516585826874,
0.05240839347243309,
0.10379377007484436,
-0.12787391245365143,
-0.030952807515859604,
0.4738244414329529,
0.24579322338104248,
0.4977354407310486,
0.431438148021698,
0.139828622341156,
0.16279394924640656,
-0.3291199207305908,
0.2459840327501297,
0.0458587110042572,
-0.07389937341213226,
0.06303811818361282,
-0.3905177116394043,
0.40548354387283325,
0.22417619824409485,
0.19852539896965027,
0.07050354033708572,
-0.054956063628196716,
0.07933353632688522,
0.26546359062194824,
-0.1901904195547104,
0.1480283886194229,
0.04741453751921654,
0.02578284963965416,
0.11349539458751678,
0.13069407641887665,
-0.5036706924438477,
0.37754836678504944,
0.6064172387123108,
-0.01598265953361988,
-0.17982643842697144,
0.44025346636772156,
-0.04394233971834183,
-0.4184463620185852,
0.3561252951622009,
0.27930930256843567,
0.25635355710983276,
0.35015392303466797,
0.16882969439029694,
-0.14352859556674957,
0.05308558791875839,
-0.09351442009210587,
0.2793036997318268,
0.14471325278282166,
0.0004737438866868615,
0.05600544437766075,
0.25568467378616333,
-0.04923228546977043,
-0.31250298023223877,
-0.4255416989326477,
0.23127195239067078,
0.16650958359241486,
-0.27142879366874695,
-0.0009529311209917068,
-0.2503966689109802,
0.03484289348125458,
-0.09240429103374481,
0.15874415636062622,
-0.2527834475040436,
-0.2449285089969635,
0.2695196270942688,
0.2066352665424347,
-0.23557433485984802,
0.15922817587852478,
0.26000839471817017,
0.2632804214954376,
-0.17472533881664276,
-0.250130295753479,
-0.3611550033092499,
-0.09816159307956696,
-0.08681607991456985,
0.13987544178962708,
0.20566606521606445,
0.522016167640686,
0.4211692214012146,
0.08502068370580673,
-0.004167460836470127,
-0.3720124661922455,
-0.13794338703155518,
-0.14105422794818878,
-0.06983904540538788,
0.20965713262557983,
0.21085159480571747,
0.21547383069992065,
-0.34700435400009155,
-0.12802505493164062,
0.16254355013370514,
-0.19960972666740417,
-0.09256821870803833,
0.09175923466682434,
-0.10580630600452423,
0.5196784138679504,
0.06744228303432465,
-0.31848740577697754,
-0.26092588901519775,
-0.25422948598861694,
0.19768111407756805,
0.08101299405097961,
0.03483336791396141,
-0.404989093542099,
0.036458954215049744,
0.17923560738563538,
-0.09290561825037003,
0.05110912770032883,
0.009806427173316479,
-0.49377501010894775,
0.278938889503479,
-0.07775120437145233,
-0.0554814450442791,
-0.048160120844841,
-0.03277698531746864,
0.09475309401750565,
0.5058631300926208,
-0.5585743188858032,
-0.0537559874355793,
-0.11487728357315063,
0.031838711351156235,
-0.33183810114860535,
-0.0925208032131195,
0.2712247371673584,
0.17145633697509766,
-0.12270012497901917,
0.03993189334869385,
-0.08941122889518738,
-0.10623403638601303,
0.05868403613567352,
0.25890251994132996,
-0.04938037693500519,
0.36403417587280273,
0.10377107560634613,
1.0809881687164307,
0.1613338440656662,
0.23113548755645752,
0.15440520644187927,
0.07597789913415909,
0.09420247375965118,
-0.08575405925512314,
0.2034386694431305,
0.27672478556632996,
-0.12591812014579773,
-0.0791502371430397,
0.1411186158657074,
-0.11455971747636795,
-0.1837594211101532,
0.12396857142448425,
-0.218048095703125,
-0.031179986894130707,
-0.3666868209838867,
0.1795651763677597,
0.07986978441476822,
0.18011394143104553,
-0.07880648970603943,
0.1558702290058136,
-0.12437686324119568,
-0.09095637500286102,
0.11566582322120667,
0.13740655779838562,
0.2319396436214447,
0.017237603664398193,
-0.30067628622055054,
-0.07076890766620636,
-0.3080003559589386,
0.18553128838539124,
0.02752073109149933,
0.017331812530755997,
0.023313332349061966,
-0.2192908525466919,
0.1195705309510231,
-0.06194862350821495,
0.3061021566390991,
-0.2756173014640808,
0.09036676585674286,
0.13954438269138336,
0.2991218566894531,
-0.15867795050144196,
0.021760601550340652,
-0.42316871881484985,
-0.13777105510234833,
0.16096752882003784,
0.1654587686061859,
-0.44695010781288147,
-0.1186976283788681,
0.1759074181318283,
0.1321917027235031,
0.18452805280685425,
0.047184936702251434,
-0.15212814509868622,
0.028940223157405853,
-0.3884849548339844,
0.27501362562179565,
0.18874047696590424,
0.06868012249469757,
-0.31450024247169495,
-0.14718851447105408,
0.19841212034225464,
0.06124075502157211,
0.0723235085606575,
0.17822623252868652,
0.5180076360702515,
-0.09073769301176071,
0.26713329553604126,
-0.06612147390842438,
-0.07726062834262848,
0.4621385633945465,
0.16694504022598267,
0.2988884747028351,
-0.2762937843799591,
0.02642533928155899,
0.013894784264266491,
0.40704813599586487,
0.32992810010910034,
-0.08542388677597046,
0.40584030747413635,
-0.12684349715709686,
0.3338838815689087,
-0.06230029836297035,
-0.06550537049770355,
0.23309341073036194,
-0.10514307767152786,
0.09956277161836624,
-0.11523566395044327,
0.5414108037948608,
0.0867079645395279,
-0.02463117241859436,
0.352970153093338,
0.3354492783546448,
-0.06849735975265503,
0.44939255714416504,
0.1474442332983017,
1.0110375881195068,
0.11582533270120621,
-0.003638077527284622,
0.29989659786224365,
-0.47401535511016846,
0.2505575716495514,
-0.3297126293182373,
0.03224759176373482,
-0.1600344330072403,
-0.2250557690858841,
0.15714488923549652,
-0.1675516664981842,
0.30565932393074036,
0.27274417877197266,
-0.44211968779563904,
0.08428152650594711,
0.12054763734340668,
0.1834382712841034,
-0.0787481814622879,
0.010214973241090775,
-0.16626395285129547,
-0.17473319172859192,
-0.32912635803222656,
0.06435344368219376,
-0.12630566954612732,
-0.5751953125,
0.13388308882713318,
-0.3365335464477539,
-0.041106775403022766,
0.00901801884174347,
-0.34058961272239685,
-0.1559842824935913,
-0.2867906093597412,
-0.2540011405944824,
-0.06219654157757759,
-0.47021692991256714,
0.22639501094818115,
-0.011583853513002396,
-0.4998570680618286,
-0.07581773400306702,
-0.3213634490966797,
0.38287657499313354,
0.02795317769050598,
0.3281780481338501,
0.28461381793022156,
-0.08085774630308151,
0.0006415639072656631,
-0.0798288956284523,
-0.2668251693248749,
0.17893773317337036,
-0.3077465891838074,
-0.31289196014404297,
0.234757661819458,
-0.35686028003692627,
0.444030225276947,
0.0007977657951414585,
0.08163507282733917,
-0.005562081933021545,
-0.29334375262260437,
-0.40293964743614197,
0.08283387124538422,
-0.05589790642261505,
-0.13630181550979614,
0.29550620913505554,
-0.01621805503964424,
0.037283316254615784,
-0.23824892938137054,
0.2580491602420807,
-0.1970626413822174,
0.30667707324028015,
0.21744155883789062,
0.13373813033103943,
-0.3330395221710205,
-0.19955167174339294,
0.21351289749145508,
0.07039286196231842,
-0.18970929086208344,
-0.07731858640909195,
-0.16770462691783905,
0.12126477062702179,
0.12433575093746185,
-0.3035717010498047,
-0.10704578459262848,
0.045799799263477325,
-0.3011716306209564,
-0.1906958669424057,
-0.16709266602993011,
0.23277056217193604,
0.11434808373451233,
0.08799626678228378,
-0.16481968760490417,
0.20224323868751526,
0.015852494165301323,
0.03943473473191261,
-0.2818453311920166,
0.08251385390758514,
0.1551983803510666,
0.09981757402420044,
0.18270033597946167,
0.07936698198318481,
0.05527586117386818,
0.17104390263557434,
0.015562737360596657,
0.26906436681747437,
-0.023161500692367554,
-0.10785544663667679,
0.1826362907886505,
0.13279107213020325,
-0.11959768086671829,
0.15469790995121002,
0.04675005376338959,
-0.010615715757012367,
-0.29038113355636597,
-0.1395847499370575,
0.047549281269311905,
-0.46969494223594666,
0.051822785288095474,
-0.016011618077754974,
0.5486961007118225,
-0.024746723473072052,
-0.2159091830253601,
-0.1738443672657013,
-0.1355932205915451,
0.005021765828132629,
-0.19683590531349182,
0.10750645399093628,
-0.0591280534863472,
-0.10401837527751923,
0.16173237562179565,
-0.0814540907740593,
0.0937030166387558,
0.19742846488952637,
0.21461734175682068,
-0.04119272530078888,
-0.24522295594215393,
0.06624304503202438,
0.46976417303085327,
0.6175020933151245,
0.045350492000579834,
-0.3806001543998718,
0.18880146741867065,
0.20913180708885193,
-0.3483709394931793,
-0.2721407115459442,
0.12257041037082672,
0.10049024969339371,
0.11048388481140137,
-0.05734022706747055,
-0.015541989356279373,
0.0918271541595459,
-0.092429518699646,
0.21757546067237854,
0.2505723536014557,
-0.11750270426273346,
0.11623047292232513,
0.26628953218460083,
-0.03350675106048584,
-0.18782813847064972,
0.07165227830410004,
0.06836538016796112,
0.3369760811328888,
0.19377432763576508,
-0.1544264554977417,
0.4038512408733368,
0.2891004979610443,
0.16596506536006927,
-0.22808173298835754,
-0.4114227294921875,
-0.23082365095615387,
0.5670192241668701,
0.13094043731689453,
-0.0838361456990242,
0.2997299134731293,
0.45859837532043457,
0.47825103998184204,
-0.35622909665107727,
-0.028324317187070847,
-0.03339002653956413,
0.1793873906135559,
0.026647895574569702,
0.11043855547904968,
-0.07471340149641037,
-0.4702988266944885,
0.033226240426301956,
-0.021355923265218735,
0.15587592124938965,
0.4458051919937134,
-0.0038627535104751587,
0.36493980884552,
-0.4227902889251709,
0.0758996456861496,
-0.16624948382377625,
0.3454371392726898,
-0.2912716865539551,
-0.11887960880994797,
0.16319550573825836,
-0.12494459748268127,
0.09083619713783264,
-0.12581370770931244,
0.17259390652179718,
-0.18099938333034515,
-0.2332828938961029,
-0.02114754542708397,
-0.12562038004398346,
-0.01110536977648735,
0.012620093300938606,
0.02031887322664261,
0.2891532778739929,
-0.12653864920139313,
0.2992512583732605,
0.08863606303930283,
-0.18937021493911743,
-0.18796932697296143,
0.32423022389411926,
-0.3007693290710449,
-0.3905446529388428,
0.024307839572429657,
0.1179129034280777,
-0.1315738409757614,
-0.07457346469163895,
-0.4511658847332001,
-0.35080409049987793,
-0.2623066008090973,
0.19053348898887634,
-0.14600379765033722,
-0.1864965558052063,
-0.052007995545864105,
0.08237610757350922,
-0.11028619110584259,
0.43857696652412415,
0.08505163341760635,
-0.22497430443763733,
-0.37242835760116577,
-0.43704718351364136,
-0.6850841045379639,
-0.12515518069267273,
-0.04724033549427986,
-0.05097618326544762,
0.4830022156238556,
0.5137592554092407,
0.15326987206935883,
0.3157116174697876,
0.15374711155891418,
0.10625537484884262,
-0.07855477929115295,
0.2718074917793274,
-0.616861879825592,
-0.13510707020759583,
-0.09007526934146881,
-0.10223253816366196,
-0.06210578233003616,
-0.154043048620224,
0.3827100694179535,
0.04018048569560051,
-0.03541500121355057,
-0.0670451670885086,
-0.3906644582748413,
0.3085305988788605,
0.07894857972860336,
0.24468457698822021,
-0.18145594000816345,
-0.0705900490283966,
-0.1808985471725464,
-0.006941681727766991,
-0.07690165936946869,
0.09027659893035889,
-0.07586182653903961,
0.2770838439464569,
-0.09956783056259155,
0.48853054642677307,
0.04852410405874252,
0.10754960775375366,
-0.21200545132160187,
0.15301571786403656,
0.0004655569791793823,
-0.11029775440692902,
-0.3492702543735504,
0.26951125264167786,
0.26061517000198364,
0.26651132106781006,
-0.5931541323661804,
-0.169078528881073,
-0.022338591516017914,
0.177430659532547,
-0.33891761302948,
-0.3171936869621277,
0.6567871570587158,
-0.26401257514953613,
-0.014527644030749798,
-0.21557766199111938,
0.30326858162879944,
0.37019652128219604,
0.01776691898703575,
-0.5882080793380737,
-0.03585105389356613,
0.2618730962276459,
0.09434688836336136,
0.047740038484334946,
0.2949734628200531,
0.05205213278532028,
0.059398602694272995,
-0.14518408477306366,
0.062490470707416534,
-0.10623376816511154,
0.07321769744157791,
-0.002155207097530365,
-0.3301401734352112
] |
https://github.com/huggingface/datasets/issues/5380 | Improve dataset `.skip()` speed in streaming mode | > user-owned private datasets might need hours or days until they are ported to the datasets-server (if at all)
private datasets are not supported yet (https://github.com/huggingface/datasets-server/issues/39) | ### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals. | 26 | Improve dataset `.skip()` speed in streaming mode
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
> user-owned private datasets might need hours or days until they are ported to the datasets-server (if at all)
private datasets are not supported yet (https://github.com/huggingface/datasets-server/issues/39) | [
-0.38928285241127014,
-0.10682149231433868,
-0.10879738628864288,
0.07360441237688065,
0.06995106488466263,
-0.147757887840271,
0.07614617049694061,
0.2545873820781708,
-0.21900974214076996,
0.219270259141922,
-0.029393630102276802,
0.3338622450828552,
-0.2742607593536377,
0.39802050590515137,
0.11164327710866928,
-0.25952404737472534,
0.030657745897769928,
0.003403089940547943,
-0.10918129980564117,
0.0176030695438385,
-0.009786300361156464,
0.05915197730064392,
-0.26675522327423096,
-0.3738923668861389,
0.09242767095565796,
-0.09243834018707275,
0.05531533807516098,
0.18977883458137512,
-0.18743786215782166,
-0.2689116597175598,
-0.00966368243098259,
0.4285283088684082,
0.06312093883752823,
0.30999675393104553,
-0.00010739771096268669,
-0.16600456833839417,
0.32367008924484253,
0.07204823195934296,
-0.20820561051368713,
0.18391704559326172,
-0.5147496461868286,
0.07059940695762634,
-0.24960589408874512,
-0.05140291154384613,
-0.034688081592321396,
0.05284516140818596,
-0.021949028596282005,
-0.18731090426445007,
0.38281649351119995,
0.07950412482023239,
0.17499226331710815,
0.22742821276187897,
-0.19804665446281433,
0.12313767522573471,
0.39726001024246216,
0.45366573333740234,
-0.2970266044139862,
0.041370101273059845,
0.3560153543949127,
0.29766136407852173,
-0.2730707824230194,
0.6526687145233154,
-0.18365411460399628,
0.1061389297246933,
0.35028257966041565,
-0.18052297830581665,
-0.5611745715141296,
-0.09665167331695557,
0.06735590845346451,
0.5214078426361084,
0.47618141770362854,
-0.33661600947380066,
-0.3453179895877838,
-0.4158395826816559,
0.129762664437294,
-0.5836642980575562,
0.15552687644958496,
-0.1588304042816162,
-0.06955161690711975,
0.1624995321035385,
-0.5858616232872009,
-0.24109546840190887,
-0.10188256204128265,
-0.17920467257499695,
0.34322023391723633,
-0.24598735570907593,
-0.07435625791549683,
-0.10793419927358627,
0.4451262354850769,
-0.13147388398647308,
-0.027846746146678925,
0.01672639697790146,
0.056871600449085236,
-0.004281637258827686,
-0.4029633700847626,
-0.30252107977867126,
0.1574498414993286,
0.3142571747303009,
0.30030959844589233,
0.5277855396270752,
0.2061021476984024,
0.5072619915008545,
0.0650641918182373,
0.054633285850286484,
-0.06965091824531555,
-0.35197141766548157,
0.11459134519100189,
-0.21403026580810547,
0.3856866955757141,
0.42737099528312683,
0.09422677755355835,
0.12092448770999908,
0.03564446046948433,
0.021516934037208557,
-0.20054221153259277,
0.029525112360715866,
0.10986389219760895,
-0.24160334467887878,
0.1480601727962494,
0.06640201807022095,
0.08357775956392288,
-0.07942565530538559,
0.0704309269785881,
0.4149152636528015,
0.02198249101638794,
-0.09258801490068436,
-0.3475334644317627,
-0.08972708135843277,
-0.09439471364021301,
-0.4370162785053253,
-0.13001678884029388,
-0.12524671852588654,
0.14768362045288086,
0.42740508913993835,
0.19066844880580902,
-0.15659260749816895,
0.1626468300819397,
-0.01609191857278347,
0.1270121932029724,
0.32000109553337097,
0.3217846155166626,
0.014618871733546257,
-0.16843408346176147,
0.15533232688903809,
-0.18178872764110565,
0.024195602163672447,
-0.2528306543827057,
0.1685771495103836,
-0.09862644970417023,
0.2689855396747589,
0.09174531698226929,
-0.48535463213920593,
0.22596091032028198,
0.1787659078836441,
-0.3649042844772339,
-0.0811862125992775,
-0.47366955876350403,
0.47159966826438904,
-0.09975706785917282,
-0.26372092962265015,
0.03641875833272934,
0.03945605456829071,
-0.40604156255722046,
-0.17364594340324402,
0.333802729845047,
0.32852670550346375,
-0.2813118100166321,
-0.20987960696220398,
-0.42187100648880005,
-0.12805980443954468,
0.3372087776660919,
0.18290835618972778,
-0.2027256190776825,
-0.2849295139312744,
-0.09151634573936462,
0.45604705810546875,
0.41468557715415955,
-0.051803309470415115,
-0.3656280040740967,
0.2073235958814621,
-0.02252376079559326,
0.19985266029834747,
0.35346925258636475,
-0.001288788509555161,
0.4569224715232849,
-0.0058074588887393475,
-0.09123913943767548,
0.4227917790412903,
-0.1650971919298172,
0.1390961855649948,
-0.42953357100486755,
-0.2642279863357544,
0.1641647070646286,
0.4381229877471924,
-0.07857207953929901,
-0.31580862402915955,
0.010347157716751099,
-0.0893976092338562,
0.3301977217197418,
-0.13121092319488525,
0.09734398126602173,
0.10510142892599106,
0.4443713426589966,
-0.16557921469211578,
-0.09575989097356796,
-0.14297045767307281,
-0.20429179072380066,
0.10563283413648605,
0.3081587255001068,
0.09617093205451965,
0.07380728423595428,
-0.3836964964866638,
0.05335140973329544,
-0.20251840353012085,
-0.08124065399169922,
-0.03200308606028557,
0.10378725826740265,
0.0815737172961235,
-0.10800237953662872,
-0.1140553206205368,
-0.2414432018995285,
-0.008885670453310013,
-0.3995778560638428,
0.11052830517292023,
-0.49915337562561035,
0.21347640454769135,
0.16133426129817963,
-0.07859088480472565,
0.21140184998512268,
0.10095014423131943,
-0.028649717569351196,
-0.23291639983654022,
-0.12097010761499405,
0.40421080589294434,
0.07853235304355621,
0.4958534836769104,
0.23002445697784424,
0.357846200466156,
0.17337912321090698,
-0.17812353372573853,
0.24748389422893524,
0.05039103329181671,
0.0022846944630146027,
-0.09274818003177643,
-0.33836832642555237,
0.446391761302948,
0.05447663739323616,
0.14238525927066803,
0.08301126956939697,
-0.02812034636735916,
0.08190220594406128,
0.07019288837909698,
-0.26814690232276917,
0.03306664526462555,
0.0768149122595787,
-0.288367360830307,
0.10234424471855164,
0.29046630859375,
-0.4609938859939575,
0.3371261656284332,
0.5239338278770447,
-0.18152908980846405,
-0.15306875109672546,
0.4328872263431549,
0.007171966135501862,
-0.3729418218135834,
0.3921920657157898,
0.5868498086929321,
0.36819934844970703,
0.28167790174484253,
0.19141696393489838,
-0.1117476150393486,
0.140486940741539,
-0.14165948331356049,
0.2504894435405731,
0.02445337548851967,
-0.09924235194921494,
0.0451849028468132,
0.05359528958797455,
-0.13493694365024567,
-0.3405438959598541,
-0.37890055775642395,
0.12448062747716904,
0.25530773401260376,
-0.18442490696907043,
-0.21779729425907135,
-0.24551509320735931,
-0.16069664061069489,
0.027041804045438766,
0.08821563422679901,
-0.25610142946243286,
-0.15037015080451965,
0.29630982875823975,
0.3079265058040619,
-0.2761589288711548,
0.22281278669834137,
0.3339424729347229,
0.32845476269721985,
-0.24492540955543518,
-0.06833373010158539,
-0.32109203934669495,
0.1254686713218689,
0.0471586175262928,
0.19572286307811737,
0.404289186000824,
0.4726788401603699,
0.3607988953590393,
-0.013219306245446205,
-0.10376321524381638,
-0.31534790992736816,
-0.07996969670057297,
-0.1052916944026947,
-0.19937463104724884,
0.22608397901058197,
0.21436801552772522,
0.3359641432762146,
-0.14237309992313385,
-0.05393192172050476,
0.06486213207244873,
-0.18994826078414917,
-0.079823337495327,
-0.06455635279417038,
-0.10129107534885406,
0.37202218174934387,
-0.13752290606498718,
-0.27620401978492737,
-0.2380550652742386,
-0.46279093623161316,
0.3857462406158447,
-0.1227828711271286,
0.17339792847633362,
0.013069071806967258,
0.036523059010505676,
0.1868748515844345,
0.00525815412402153,
0.05611979961395264,
-0.23813538253307343,
-0.7435277700424194,
0.24186326563358307,
-0.2316441386938095,
-0.1108836829662323,
-0.007903356105089188,
0.11317907273769379,
0.1384119838476181,
0.2518274784088135,
-0.5087858438491821,
-0.10780251771211624,
-0.25077784061431885,
0.059689853340387344,
-0.12016092240810394,
-0.2493629902601242,
0.2730153203010559,
0.12249547243118286,
-0.12976627051830292,
0.010757479816675186,
-0.24578849971294403,
-0.1129954531788826,
-0.034394606947898865,
0.21398814022541046,
0.10722923278808594,
0.338945209980011,
0.13333240151405334,
1.0099382400512695,
0.2611968517303467,
0.1844320148229599,
0.03591752052307129,
0.27235546708106995,
0.1442103534936905,
-0.12453366070985794,
0.029698384925723076,
0.4086682200431824,
0.012985751032829285,
-0.2257956713438034,
0.16510072350502014,
0.04035228490829468,
-0.07909718155860901,
0.0653882622718811,
-0.14448392391204834,
0.08033987134695053,
-0.3153162896633148,
0.1038152202963829,
0.11600728332996368,
0.039108358323574066,
0.01684717833995819,
0.17750737071037292,
-0.07562404125928879,
-0.031046956777572632,
0.030820325016975403,
0.24622227251529694,
0.2574508786201477,
0.018572485074400902,
-0.5165296792984009,
-0.001353818690404296,
-0.4677281975746155,
0.21227583289146423,
0.10642525553703308,
0.03162703663110733,
-0.17017041146755219,
-0.1424693763256073,
0.03377743065357208,
0.15366004407405853,
0.3247533142566681,
-0.4550884962081909,
-0.03854135423898697,
0.12527133524417877,
0.03139036148786545,
0.0869210734963417,
0.057929303497076035,
-0.1383085995912552,
0.03454064950346947,
0.08289215713739395,
0.17346909642219543,
-0.14261364936828613,
-0.1945866197347641,
0.17847371101379395,
0.13183096051216125,
0.2038407325744629,
-0.06667915731668472,
-0.006845530122518539,
-0.18221282958984375,
-0.46033135056495667,
0.23637551069259644,
0.03287876397371292,
-0.10745198279619217,
-0.5210480093955994,
-0.3284727931022644,
0.3072730302810669,
0.18240046501159668,
0.2668363153934479,
0.16327394545078278,
0.381193071603775,
0.1292143613100052,
0.3498861789703369,
0.0737600028514862,
-0.22212404012680054,
0.33208832144737244,
0.0894695371389389,
0.13461272418498993,
0.02398441731929779,
-0.03170936554670334,
-0.047521982342004776,
0.06379713118076324,
0.41985252499580383,
-0.08528610318899155,
0.37710174918174744,
0.2289188951253891,
0.3688232898712158,
-0.13802185654640198,
0.10877174139022827,
0.09304644912481308,
0.12558352947235107,
-0.14330081641674042,
-0.41949573159217834,
0.4104796051979065,
0.04341278597712517,
-0.13382992148399353,
0.31427210569381714,
0.15983545780181885,
-0.08832003176212311,
0.3341794013977051,
-0.1457207202911377,
0.8976010680198669,
0.06381962448358536,
-0.04181395843625069,
0.1699291467666626,
-0.03676152974367142,
0.3034830093383789,
-0.2520480751991272,
0.053737908601760864,
-0.0008783005177974701,
-0.41379424929618835,
0.030355775728821754,
0.056960489600896835,
0.20514065027236938,
-0.03091713786125183,
-0.3169115483760834,
0.20299996435642242,
0.2641468644142151,
0.2931313216686249,
-0.10502354055643082,
0.01595250517129898,
-0.17607201635837555,
-0.2788431644439697,
-0.2725467085838318,
0.17331917583942413,
-0.07565620541572571,
-0.29053202271461487,
0.2132083773612976,
-0.3414847254753113,
0.054588403552770615,
0.0020627863705158234,
-0.41067320108413696,
-0.26797616481781006,
-0.11145143955945969,
-0.12036247551441193,
-0.16584938764572144,
-0.3123852610588074,
0.24124851822853088,
0.2049092948436737,
-0.09883695840835571,
0.04152136668562889,
-0.47099560499191284,
0.3475712239742279,
-0.14012017846107483,
0.4171432554721832,
0.07635575532913208,
-0.07220964133739471,
0.08721773326396942,
-0.1702505648136139,
-0.21148423850536346,
0.007782552391290665,
-0.12632380425930023,
-0.36165785789489746,
0.08295412361621857,
-0.38747626543045044,
0.30347928404808044,
-0.031848929822444916,
-0.0033845261204987764,
0.003432132303714752,
-0.2441662698984146,
-0.42939138412475586,
0.16726651787757874,
0.04884687811136246,
-0.17770656943321228,
0.3860655725002289,
0.09974988549947739,
0.05751602351665497,
-0.20715369284152985,
0.3777214586734772,
-0.12979894876480103,
0.1172504872083664,
0.10191994160413742,
0.11279398202896118,
-0.26236701011657715,
-0.2580357491970062,
0.25284916162490845,
-0.05432495102286339,
-0.03902655094861984,
-0.05486108735203743,
-0.14909285306930542,
-0.02591238170862198,
-0.03450119495391846,
-0.16612747311592102,
-0.07897049188613892,
0.02356709912419319,
-0.2206026017665863,
-0.03507917374372482,
-0.2904289662837982,
0.15095245838165283,
-0.09551864862442017,
0.38293221592903137,
-0.3067353069782257,
0.08997650444507599,
-0.06309619545936584,
0.03353945538401604,
-0.371777206659317,
0.1167672649025917,
-0.10116469115018845,
-0.031013712286949158,
0.28087738156318665,
0.033051807433366776,
0.15698836743831635,
-0.010214452631771564,
0.027111662551760674,
0.33136242628097534,
-0.28188902139663696,
-0.17885607481002808,
0.06224041059613228,
0.14354483783245087,
-0.12147820740938187,
-0.06627511233091354,
0.13803213834762573,
0.14058826863765717,
-0.3429257273674011,
-0.17733529210090637,
0.18005497753620148,
-0.2551461458206177,
0.029084987938404083,
0.08854955434799194,
0.1766473352909088,
0.007222875952720642,
0.01791316643357277,
0.01681760512292385,
0.04262281954288483,
0.08419931679964066,
-0.09399767965078354,
0.03584899380803108,
-0.09678814560174942,
-0.26417842507362366,
0.3306315541267395,
0.0481267012655735,
0.09699998050928116,
0.15311411023139954,
0.275852769613266,
-0.09076759219169617,
-0.1667351871728897,
0.18234291672706604,
0.5591869354248047,
0.40736231207847595,
-0.04473627358675003,
-0.11540179699659348,
0.181705504655838,
0.28286388516426086,
-0.20182165503501892,
-0.32099857926368713,
0.22316497564315796,
0.07529990375041962,
0.11116573214530945,
-0.04087164252996445,
0.11229152977466583,
0.030014030635356903,
0.02490309625864029,
0.12419909983873367,
0.21757225692272186,
-0.22611282765865326,
0.22124968469142914,
0.062009211629629135,
-0.24240630865097046,
-0.18324808776378632,
-0.008325835689902306,
0.08565787971019745,
0.303648978471756,
0.4497522711753845,
-0.357559472322464,
0.5407536625862122,
0.011479586362838745,
0.3000309467315674,
-0.10396748036146164,
-0.6387626528739929,
-0.09611788392066956,
0.4360869824886322,
-0.07665553689002991,
0.12835076451301575,
0.14890088140964508,
0.4491899609565735,
-0.018619928508996964,
-0.405720978975296,
-0.13988249003887177,
-0.05924246832728386,
0.18822982907295227,
-0.0710928738117218,
0.06123469024896622,
-0.09411274641752243,
-0.3044246435165405,
0.06963881850242615,
0.026338301599025726,
0.06011008843779564,
0.500292181968689,
-0.1321457326412201,
0.18195340037345886,
-0.41488131880760193,
0.003855787217617035,
-0.069638691842556,
0.2824058532714844,
-0.24032039940357208,
-0.09905687719583511,
0.1845574676990509,
-0.14087706804275513,
0.1401548832654953,
-0.1045696809887886,
0.04711071774363518,
-0.1800626963376999,
-0.0065007563680410385,
0.18855038285255432,
-0.13152995705604553,
-0.01757507398724556,
0.0005926862359046936,
0.19624261558055878,
0.07720133662223816,
-0.11188369989395142,
0.24609766900539398,
0.11027911305427551,
-0.2348881959915161,
0.03764833137392998,
0.06229720637202263,
0.03234138339757919,
-0.47261983156204224,
-0.033909060060977936,
-0.01791476458311081,
-0.03570743650197983,
-0.2311563789844513,
-0.31435155868530273,
-0.3256326913833618,
-0.20000092685222626,
0.39670127630233765,
-0.18392468988895416,
-0.04147958755493164,
-0.10314153879880905,
0.10379685461521149,
-0.20374208688735962,
0.4009208083152771,
-0.0012792758643627167,
-0.048774056136608124,
-0.18057382106781006,
-0.3484097123146057,
-0.6281153559684753,
-0.17638054490089417,
0.19028908014297485,
0.27309751510620117,
0.2901347279548645,
0.3190838396549225,
0.10678216814994812,
0.2363722026348114,
0.04811742901802063,
-0.1655464768409729,
0.060449980199337006,
0.16694237291812897,
-0.48399701714515686,
-0.055055368691682816,
-0.23804150521755219,
-0.0825289934873581,
0.08078711479902267,
-0.223597913980484,
0.3787861466407776,
0.03146609663963318,
-0.021783487871289253,
-0.02704640105366707,
0.024269424378871918,
0.1191302090883255,
-0.08523763716220856,
0.26565825939178467,
-0.03167557716369629,
-0.1191275417804718,
-0.17069581151008606,
-0.0872500017285347,
-0.13838370144367218,
0.12166514992713928,
-0.09723073989152908,
0.007900990545749664,
-0.09417122602462769,
0.6941490173339844,
0.10017737746238708,
0.19730091094970703,
-0.21334269642829895,
0.32017749547958374,
0.12070804834365845,
-0.043180592358112335,
-0.3755734860897064,
0.1888711005449295,
-0.03252711147069931,
0.2789391577243805,
-0.3385317325592041,
-0.04186902940273285,
-0.052422404289245605,
0.0787535160779953,
-0.372336208820343,
-0.2589491903781891,
0.8516616821289062,
-0.26724451780319214,
0.059396300464868546,
-0.15231646597385406,
0.21189987659454346,
0.48705440759658813,
-0.13229042291641235,
-0.7999453544616699,
-0.021381162106990814,
0.08522160351276398,
0.07383382320404053,
0.0021498948335647583,
0.4625934958457947,
-0.10497801005840302,
0.07484348118305206,
-0.11920735239982605,
0.18227322399616241,
-0.07282041758298874,
-0.0821005254983902,
0.2213854193687439,
-0.3238770365715027
] |
https://github.com/huggingface/datasets/issues/5380 | Improve dataset `.skip()` speed in streaming mode | @versae `Dataset.push_to_hub` writes shards in Parquet, so this solution would also work for such datasets (immediately after the push). | ### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals. | 19 | Improve dataset `.skip()` speed in streaming mode
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
@versae `Dataset.push_to_hub` writes shards in Parquet, so this solution would also work for such datasets (immediately after the push). | [
-0.4675789475440979,
-0.11333110928535461,
-0.07190035283565521,
0.049206964671611786,
0.09520457684993744,
-0.12068299204111099,
-0.025064345449209213,
0.21249571442604065,
-0.4733547866344452,
0.1948888599872589,
0.12715639173984528,
0.4321051836013794,
-0.20072615146636963,
0.29336854815483093,
0.23754127323627472,
-0.18691648542881012,
0.1014246791601181,
0.023498013615608215,
-0.05678430199623108,
-0.10559811443090439,
0.08566856384277344,
0.04959430918097496,
-0.2841648757457733,
-0.29785460233688354,
0.14838194847106934,
-0.03354918211698532,
-0.010242033749818802,
0.20590844750404358,
-0.13787038624286652,
-0.1140342652797699,
0.005202794447541237,
0.42277541756629944,
0.009833339601755142,
0.1738007366657257,
-0.0001158587692771107,
-0.06374704837799072,
0.32518959045410156,
-0.16020074486732483,
-0.272769033908844,
0.10324373841285706,
-0.6738684177398682,
0.1851550042629242,
-0.283841609954834,
-0.10394828021526337,
-0.07239717245101929,
0.21168629825115204,
-0.0954577624797821,
-0.2842347025871277,
0.13248994946479797,
0.08974599838256836,
0.09682510793209076,
0.2933482527732849,
-0.07388957589864731,
0.13856925070285797,
0.5238581895828247,
0.4839226007461548,
-0.3417300879955292,
-0.19052255153656006,
0.5224524736404419,
0.4766138792037964,
-0.11002067476511002,
0.5432323217391968,
0.009524280205368996,
-0.04147060588002205,
0.20975124835968018,
-0.2051832675933838,
-0.3933013081550598,
-0.09219352900981903,
0.03712587431073189,
0.38418659567832947,
0.3281756639480591,
-0.4160146117210388,
-0.32779836654663086,
-0.35593944787979126,
0.1642809361219406,
-0.5020895600318909,
0.15501350164413452,
-0.11635594069957733,
-0.002506174147129059,
0.04957050830125809,
-0.32259249687194824,
-0.23622269928455353,
-0.054272428154945374,
-0.2740573287010193,
0.25417664647102356,
-0.010315798223018646,
0.19068826735019684,
-0.03172634541988373,
0.34262675046920776,
-0.15504144132137299,
0.2480212152004242,
0.0038146376609802246,
-0.0019000247120857239,
0.03702776879072189,
-0.4547107219696045,
-0.39561760425567627,
0.12677767872810364,
0.3063965141773224,
0.1517622172832489,
0.37501955032348633,
0.3156815767288208,
0.5279361009597778,
0.21628455817699432,
0.11705107241868973,
0.03448830917477608,
-0.4174215495586395,
0.22704505920410156,
-0.15027499198913574,
0.21514524519443512,
0.25375667214393616,
0.1271495521068573,
0.1485138237476349,
-0.04113902524113655,
-0.04395800828933716,
-0.31681394577026367,
0.11085326969623566,
0.0431310310959816,
-0.22764867544174194,
-0.01694420352578163,
0.0951775461435318,
0.07810314744710922,
-0.09141650050878525,
0.11873962730169296,
0.2626911997795105,
0.09852536767721176,
0.05919051170349121,
-0.5344714522361755,
-0.1378864347934723,
-0.1617998629808426,
-0.5190361738204956,
-0.18551062047481537,
-0.09595933556556702,
0.10347571969032288,
0.24300959706306458,
0.17939940094947815,
-0.055702682584524155,
0.05963445454835892,
-0.0891757383942604,
0.0564093254506588,
0.32324910163879395,
0.27289217710494995,
-0.14545001089572906,
-0.12673869729042053,
0.09600543230772018,
-0.1694631427526474,
-0.05775041878223419,
-0.23429445922374725,
0.22593803703784943,
-0.258006751537323,
0.3640364110469818,
-0.13168007135391235,
-0.37607860565185547,
0.15792928636074066,
0.09420828521251678,
-0.266342431306839,
-0.050175443291664124,
-0.5211341977119446,
0.5042600631713867,
-0.21095559000968933,
-0.2881549894809723,
-0.06784822791814804,
0.048173632472753525,
-0.39552071690559387,
-0.09829433262348175,
0.420942485332489,
0.23513497412204742,
-0.5752098560333252,
-0.21564598381519318,
-0.1476881355047226,
-0.06709536910057068,
0.34585627913475037,
0.25565847754478455,
-0.20967847108840942,
-0.04596053808927536,
-0.0281590037047863,
0.48453545570373535,
0.6078327298164368,
-0.15420876443386078,
-0.2777132987976074,
-0.08363587409257889,
-0.060534872114658356,
0.20151765644550323,
0.22241075336933136,
-0.07204105705022812,
0.6903414726257324,
-0.006999376695603132,
-0.1269833892583847,
0.5141637921333313,
-0.20892834663391113,
0.2418808937072754,
-0.43791359663009644,
-0.2431780993938446,
0.12660905718803406,
0.35417529940605164,
-0.07115432620048523,
-0.36242786049842834,
0.03355468437075615,
0.06656086444854736,
0.33529260754585266,
-0.10307244956493378,
0.20899102091789246,
0.23471039533615112,
0.49097317457199097,
-0.14558355510234833,
-0.07542258501052856,
-0.00451861135661602,
-0.17925751209259033,
0.15278497338294983,
0.27422788739204407,
0.014416810125112534,
0.007295884191989899,
-0.37432360649108887,
0.10058443248271942,
-0.10814137011766434,
-0.0765783041715622,
-0.015181533992290497,
0.08634187281131744,
0.0006147623062133789,
-0.11080877482891083,
-0.08502271771430969,
-0.20980486273765564,
0.14487110078334808,
-0.2971632480621338,
0.09154628962278366,
-0.47817543148994446,
0.46773919463157654,
0.19724157452583313,
-0.2459956407546997,
0.02810521423816681,
0.09522198140621185,
0.016422029584646225,
-0.35392871499061584,
-0.16110143065452576,
0.4105474650859833,
0.2959055006504059,
0.6416019797325134,
0.13137391209602356,
0.21279475092887878,
0.3153459429740906,
-0.11733481287956238,
0.12632092833518982,
0.07111164182424545,
0.06909602135419846,
-0.11158314347267151,
-0.48292937874794006,
0.3498345911502838,
0.11420474946498871,
0.22931763529777527,
0.1780708283185959,
-0.10717012733221054,
0.08890722692012787,
0.1806960552930832,
-0.17634785175323486,
0.016388244926929474,
0.14228017628192902,
-0.18207624554634094,
0.05798446759581566,
0.26787248253822327,
-0.23334543406963348,
0.29942944645881653,
0.6766772270202637,
-0.007943486794829369,
-0.19108954071998596,
0.4925577938556671,
0.08591258525848389,
-0.36014822125434875,
0.46765220165252686,
0.5202629566192627,
0.265888512134552,
0.19402249157428741,
0.12903329730033875,
-0.17458133399486542,
0.08827925473451614,
-0.05230206996202469,
0.2644283175468445,
0.044116612523794174,
0.02033148892223835,
0.04050033539533615,
-0.0450466051697731,
-0.08548232167959213,
-0.2582279443740845,
-0.29283878207206726,
0.3046844005584717,
0.24997292459011078,
-0.09225583076477051,
-0.22996121644973755,
-0.21952711045742035,
0.2069823145866394,
0.04161344841122627,
0.17078396677970886,
-0.18406902253627777,
-0.18322640657424927,
0.33939850330352783,
0.41392195224761963,
-0.2749999761581421,
0.25311124324798584,
0.44583219289779663,
0.3367236852645874,
-0.14011456072330475,
-0.13146889209747314,
-0.3690258264541626,
-0.11667563766241074,
0.04056033119559288,
0.13633589446544647,
0.3270852863788605,
0.5069250464439392,
0.21963314712047577,
0.0050118472427129745,
0.07970432192087173,
-0.3194526731967926,
-0.09141547232866287,
-0.008843060582876205,
-0.07204614579677582,
0.2507268190383911,
0.12516450881958008,
0.16830335557460785,
-0.23008452355861664,
-0.24157275259494781,
0.03523135185241699,
-0.1765172779560089,
-0.07943213731050491,
0.03216005861759186,
-0.1434773951768875,
0.3203340470790863,
0.007841605693101883,
-0.2065037190914154,
-0.2854655981063843,
-0.44854480028152466,
0.13087248802185059,
-0.10979871451854706,
0.19123496115207672,
-0.29977312684059143,
0.012373450212180614,
0.09695596992969513,
0.054930102080106735,
-0.10928583145141602,
-0.027615657076239586,
-0.4983980059623718,
0.22593337297439575,
-0.2930574119091034,
-0.10622832179069519,
-0.10997297614812851,
0.08983936905860901,
0.34752029180526733,
0.3681563138961792,
-0.4480745196342468,
0.22727108001708984,
-0.21326389908790588,
-0.11018477380275726,
-0.25823476910591125,
-0.3627297580242157,
0.44254785776138306,
0.04214634373784065,
-0.025179777294397354,
0.020377635955810547,
-0.2317219376564026,
-0.03308529406785965,
0.21049442887306213,
0.18558762967586517,
-0.002703193575143814,
0.3190957307815552,
0.16988791525363922,
0.7531888484954834,
0.1297576129436493,
-0.019954223185777664,
0.0937902107834816,
0.37505221366882324,
0.01563524827361107,
-0.155875563621521,
0.128048837184906,
0.421833336353302,
0.031107336282730103,
-0.1557120680809021,
0.31154096126556396,
0.001620492897927761,
-0.3322939872741699,
-0.004358045756816864,
-0.25375574827194214,
0.2835792005062103,
-0.3984276354312897,
0.05558621883392334,
-0.02506328374147415,
-0.007727473974227905,
-0.05417126417160034,
0.22478312253952026,
-0.16279350221157074,
-0.13395527005195618,
0.07539977133274078,
0.08899253606796265,
0.3395092487335205,
-0.029604680836200714,
-0.3530825674533844,
0.0899166688323021,
-0.3870479464530945,
0.030618473887443542,
-0.04694583639502525,
0.20831994712352753,
-0.10471303015947342,
-0.1776370108127594,
0.15504872798919678,
0.06817203760147095,
0.5794534087181091,
-0.4329969584941864,
0.06883800029754639,
0.008680183440446854,
0.17117755115032196,
-0.16531533002853394,
0.024378757923841476,
-0.2712266445159912,
0.10736356675624847,
0.06156006082892418,
0.31373894214630127,
-0.22639086842536926,
-0.12066484242677689,
0.08739346265792847,
0.01697695627808571,
0.1376529335975647,
0.01139031257480383,
-0.04199272766709328,
-0.07805819064378738,
-0.5689681768417358,
0.4229220747947693,
0.044232405722141266,
0.031040189787745476,
-0.3591844141483307,
-0.3994157016277313,
0.17153748869895935,
0.13612431287765503,
0.1002933457493782,
0.21652904152870178,
0.39187389612197876,
0.1717061549425125,
0.3534189760684967,
-0.10626699030399323,
-0.215785950422287,
0.28443336486816406,
-0.02841104567050934,
0.317729651927948,
0.016598641872406006,
0.12343475222587585,
-0.03756175562739372,
0.04640474170446396,
0.42378291487693787,
0.0768999457359314,
0.446455717086792,
-0.07326959073543549,
0.2889677584171295,
-0.20566676557064056,
0.1273757368326187,
0.1361391395330429,
-0.058461517095565796,
-0.08919209986925125,
-0.07544658333063126,
0.21787548065185547,
0.10110080242156982,
-0.10680098086595535,
0.47771528363227844,
0.22632279992103577,
-0.15982507169246674,
0.5207783579826355,
0.2567973732948303,
0.9869343638420105,
0.016758177429437637,
-0.1289467066526413,
-0.026781294494867325,
-0.33815068006515503,
0.2791424095630646,
-0.45133525133132935,
-0.03892572596669197,
0.02851322665810585,
-0.4331751763820648,
0.053522154688835144,
0.07618916034698486,
0.2820951044559479,
0.15792140364646912,
-0.4791872203350067,
0.12313281744718552,
0.37565648555755615,
0.5045058131217957,
-0.0018625129014253616,
-0.03374496474862099,
-0.20423524081707,
-0.3297119140625,
-0.013755742460489273,
0.07331126928329468,
-0.13985128700733185,
-0.41092419624328613,
0.1354651153087616,
-0.1869686245918274,
0.2057608962059021,
0.07138900458812714,
-0.3832680583000183,
-0.1490095555782318,
-0.29833441972732544,
-0.020603783428668976,
-0.3953356444835663,
-0.37897223234176636,
0.15968430042266846,
0.1302512288093567,
-0.03702094405889511,
0.18348796665668488,
-0.44147783517837524,
0.47366225719451904,
0.15737473964691162,
0.39804336428642273,
0.007536166347563267,
-0.20089766383171082,
-0.03751664608716965,
-0.11804147809743881,
-0.37056949734687805,
0.02703845500946045,
-0.11982358992099762,
-0.3948090672492981,
0.019914746284484863,
-0.3479958176612854,
0.332428514957428,
0.18211472034454346,
-0.1242855042219162,
0.09992308914661407,
-0.36221078038215637,
-0.39999011158943176,
0.09580570459365845,
-0.039246052503585815,
-0.2767592966556549,
0.41924387216567993,
-0.015517689287662506,
0.0010823756456375122,
-0.15097080171108246,
0.4234634339809418,
-0.09203670173883438,
0.07985483855009079,
0.052214525640010834,
0.04496465250849724,
-0.2989370822906494,
-0.26157036423683167,
0.24941667914390564,
0.0391666479408741,
-0.19494202733039856,
-0.14567172527313232,
-0.2898665964603424,
-0.0587170273065567,
-0.06776996701955795,
-0.3407781720161438,
-0.1399938017129898,
0.06383770704269409,
-0.3808542490005493,
0.05993618071079254,
-0.22760337591171265,
0.09020854532718658,
0.0545525848865509,
0.35049867630004883,
-0.22939780354499817,
0.08218088746070862,
-0.09195832163095474,
0.07098111510276794,
-0.29378294944763184,
0.16086266934871674,
-0.08360614627599716,
0.11911030113697052,
-0.07625208795070648,
0.0523463673889637,
-0.025100573897361755,
-0.059493474662303925,
-0.037899814546108246,
0.314052939414978,
-0.2374695986509323,
-0.11122209578752518,
0.09526702761650085,
0.15717802941799164,
-0.0511355921626091,
0.12313596904277802,
-0.020611554384231567,
0.0702749639749527,
-0.320601224899292,
-0.21391893923282623,
0.20266884565353394,
-0.24142682552337646,
0.019491713494062424,
0.04918520897626877,
0.5960673689842224,
0.038059256970882416,
-0.1283007562160492,
-0.07348575443029404,
0.0954488217830658,
0.054392844438552856,
-0.24311590194702148,
0.14438939094543457,
-0.08510476350784302,
-0.21969544887542725,
0.23374660313129425,
0.08212854713201523,
0.19025731086730957,
0.2667466700077057,
0.1792767345905304,
0.005051061511039734,
-0.17448708415031433,
0.02061806432902813,
0.4242667853832245,
0.3829538822174072,
0.026974141597747803,
-0.3942839801311493,
0.2933485507965088,
0.23269334435462952,
-0.12173840403556824,
-0.4074815511703491,
0.259045273065567,
-0.0037910910323262215,
0.16314534842967987,
-0.030057556927204132,
0.2016904056072235,
-0.004673466086387634,
0.08152777701616287,
0.21231645345687866,
0.4334399104118347,
-0.2737430930137634,
0.24793891608715057,
0.30902841687202454,
-0.23110374808311462,
-0.13118401169776917,
-0.23213350772857666,
-0.06121225282549858,
0.2666948735713959,
0.3713817596435547,
-0.18354812264442444,
0.7697750329971313,
0.13419023156166077,
0.26054543256759644,
0.031593214720487595,
-0.40505796670913696,
-0.08674463629722595,
0.4359356462955475,
0.11464269459247589,
0.1914575695991516,
0.2574414312839508,
0.131128191947937,
0.10444875061511993,
-0.5330348014831543,
-0.2908606231212616,
-0.11511439085006714,
0.1399604082107544,
-0.017755940556526184,
-0.13846468925476074,
-0.02762678638100624,
-0.5393723249435425,
0.004729706794023514,
-0.019522424787282944,
0.25524619221687317,
0.24909067153930664,
-0.01765982061624527,
0.36261409521102905,
-0.19568878412246704,
0.0229650866240263,
-0.18686619400978088,
0.2488284707069397,
-0.18206393718719482,
0.11445789784193039,
0.11770311743021011,
-0.12299026548862457,
0.041069090366363525,
-0.06767109036445618,
-0.1716327667236328,
-0.12206798791885376,
-0.11059306561946869,
0.2552588880062103,
0.012981098145246506,
0.01719317026436329,
0.06231044977903366,
0.2071106880903244,
-0.02783246338367462,
-0.08775289356708527,
0.2593016028404236,
0.0674685686826706,
-0.1352134644985199,
-0.16853338479995728,
0.19486424326896667,
-0.07068374752998352,
-0.304366797208786,
-0.15078970789909363,
0.13085094094276428,
0.0282229483127594,
-0.11853890120983124,
-0.34091511368751526,
-0.3051437735557556,
-0.22293958067893982,
0.30055829882621765,
-0.438071072101593,
-0.09619565308094025,
-0.020205501466989517,
0.073663130402565,
-0.12697795033454895,
0.5593617558479309,
-0.12848913669586182,
-0.11951909214258194,
-0.2527799606323242,
-0.48056983947753906,
-0.5055688619613647,
0.0027263760566711426,
0.0569060854613781,
0.2521897554397583,
0.3376694917678833,
0.36592990159988403,
0.08548550307750702,
0.3216710686683655,
-0.02065005898475647,
-0.09581788629293442,
-0.10924198478460312,
0.17595824599266052,
-0.6611218452453613,
-0.10571324825286865,
-0.18377695977687836,
-0.049282006919384,
0.02000926434993744,
-0.28382256627082825,
0.436099112033844,
0.25850266218185425,
-0.07443444430828094,
-0.035328932106494904,
-0.22455985844135284,
0.23289307951927185,
-0.00784090906381607,
0.1319262981414795,
-0.05588085949420929,
-0.051836177706718445,
-0.19307410717010498,
0.1386151760816574,
-0.156055748462677,
0.053376454859972,
-0.12356036901473999,
-0.0383942574262619,
-0.04989410564303398,
0.42683857679367065,
0.13337589800357819,
-0.22816239297389984,
-0.17463059723377228,
0.18837448954582214,
0.12052658200263977,
0.12067247927188873,
-0.32936328649520874,
0.11090157181024551,
0.06543631106615067,
0.2618374526500702,
-0.36119601130485535,
-0.10062683373689651,
-0.020100079476833344,
0.11203981935977936,
-0.2212565839290619,
-0.29831206798553467,
0.8672853112220764,
-0.03595995530486107,
0.04665899649262428,
-0.22464008629322052,
0.18225178122520447,
0.33511072397232056,
-0.039618559181690216,
-0.6146228313446045,
-0.05312075465917587,
0.047469329088926315,
0.06941008567810059,
0.08352439105510712,
0.4282843768596649,
0.14005590975284576,
0.08199255168437958,
-0.23864521086215973,
0.1268083155155182,
-0.05718190222978592,
-0.03435543552041054,
0.19584526121616364,
-0.3596475124359131
] |
https://github.com/huggingface/datasets/issues/5380 | Improve dataset `.skip()` speed in streaming mode | @mariosasko that is right. However, there are still a good amount of datasets for which the shards are created manually. In our very specific case, we create medium-sized datasets (rarely over 100-200GB) of both text and audio, we prepare the shards by hand and then upload then. It would be great to have immediate access to this download skipping feature for them too. | ### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals. | 63 | Improve dataset `.skip()` speed in streaming mode
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
@mariosasko that is right. However, there are still a good amount of datasets for which the shards are created manually. In our very specific case, we create medium-sized datasets (rarely over 100-200GB) of both text and audio, we prepare the shards by hand and then upload then. It would be great to have immediate access to this download skipping feature for them too. | [
-0.4400532841682434,
-0.07696420699357986,
-0.13384981453418732,
-0.009636543691158295,
0.0904635339975357,
-0.10754100978374481,
-0.06090180203318596,
0.28717005252838135,
-0.25958359241485596,
0.2215568870306015,
0.09721263498067856,
0.3636689782142639,
-0.23289546370506287,
0.2673865258693695,
0.06867972016334534,
-0.250631183385849,
0.004811637103557587,
0.039836250245571136,
-0.09187217056751251,
0.0821799486875534,
0.05389974266290665,
0.0027373358607292175,
-0.24020396173000336,
-0.4466245770454407,
0.07163596153259277,
-0.01388700120151043,
0.06546913087368011,
0.14814221858978271,
-0.1981806606054306,
-0.2755855917930603,
0.04451581835746765,
0.39055582880973816,
0.047490186989307404,
0.06933389604091644,
-0.00010804755584103987,
-0.16718044877052307,
0.4619179368019104,
-0.018836960196495056,
-0.24212685227394104,
0.15559828281402588,
-0.6587046980857849,
0.047150708734989166,
-0.28481483459472656,
-0.07783132046461105,
0.05714727193117142,
0.1449219435453415,
0.0833892896771431,
-0.10605835169553757,
0.2725081443786621,
0.0363226942718029,
0.12983472645282745,
0.13973194360733032,
-0.024608414620161057,
0.17100003361701965,
0.5698742270469666,
0.42467451095581055,
-0.3674231767654419,
0.052187543362379074,
0.43206509947776794,
0.35106974840164185,
-0.34693560004234314,
0.6288278102874756,
-0.21741937100887299,
0.11576332151889801,
0.31389662623405457,
-0.23698396980762482,
-0.4370577931404114,
-0.15495739877223969,
-0.037820592522621155,
0.41338905692100525,
0.40042558312416077,
-0.35189568996429443,
-0.3076425790786743,
-0.37844425439834595,
0.1292765587568283,
-0.5018792748451233,
0.16119380295276642,
-0.12934115529060364,
-0.17186005413532257,
0.14133144915103912,
-0.5571029186248779,
-0.309196799993515,
-0.08215391635894775,
-0.18663455545902252,
0.44469335675239563,
-0.13619986176490784,
0.04077964648604393,
-0.12519341707229614,
0.49500301480293274,
-0.05832064151763916,
0.07894113659858704,
-0.08593431860208511,
-0.044340427964925766,
0.01633547805249691,
-0.3890012502670288,
-0.32968759536743164,
0.04890795797109604,
0.25919654965400696,
0.14167824387550354,
0.49332982301712036,
0.18555200099945068,
0.5270733833312988,
0.26488226652145386,
0.10891682654619217,
-0.1336839348077774,
-0.4046376049518585,
0.2925274968147278,
-0.2791973352432251,
0.2688694894313812,
0.301454097032547,
0.12456819415092468,
0.1843680441379547,
-0.007917392998933792,
-0.03679375350475311,
-0.25115764141082764,
0.07587793469429016,
-0.026341276243329048,
-0.18069197237491608,
0.08140145242214203,
-0.042824599891901016,
-0.11118067800998688,
-0.0957387164235115,
0.021505752578377724,
0.33615386486053467,
0.03726247698068619,
-0.1819116771221161,
-0.42945897579193115,
-0.10360272228717804,
-0.12834574282169342,
-0.4339747130870819,
-0.0947965756058693,
0.005487298592925072,
0.1517985314130783,
0.29928213357925415,
0.19192472100257874,
-0.05146865174174309,
0.06341561675071716,
-0.0999838337302208,
0.07571181654930115,
0.2812887132167816,
0.4124714136123657,
0.0013824701309204102,
-0.17781436443328857,
0.23863999545574188,
-0.15769118070602417,
0.060286618769168854,
-0.32225653529167175,
0.20736588537693024,
-0.09165103733539581,
0.44610774517059326,
0.016715146601200104,
-0.5115154385566711,
0.22701433300971985,
0.18581229448318481,
-0.3982905149459839,
-0.14220570027828217,
-0.31935903429985046,
0.38830605149269104,
-0.0972927138209343,
-0.31363365054130554,
-0.020007669925689697,
0.10895653814077377,
-0.31024593114852905,
-0.1786719262599945,
0.3602718114852905,
0.30949461460113525,
-0.3797586262226105,
-0.1972082108259201,
-0.4335237443447113,
-0.11680077016353607,
0.41980740427970886,
0.001070503145456314,
-0.17801082134246826,
-0.28159287571907043,
-0.04979327321052551,
0.547531008720398,
0.4605899453163147,
-0.06435927003622055,
-0.4058689773082733,
0.2266853153705597,
0.005269214510917664,
0.16217097640037537,
0.45418328046798706,
0.13263575732707977,
0.4426983892917633,
-0.03182533010840416,
-0.18811368942260742,
0.41593384742736816,
-0.1134529560804367,
0.11057227104902267,
-0.44435983896255493,
-0.2974146604537964,
0.0458955317735672,
0.4371302127838135,
-0.1217840313911438,
-0.28263750672340393,
0.05454304814338684,
0.0015413807705044746,
0.3124954104423523,
-0.11877396702766418,
0.13737435638904572,
0.1501595377922058,
0.4410756230354309,
-0.26092076301574707,
-0.10234858840703964,
-0.10732810944318771,
-0.09557826071977615,
0.15156418085098267,
0.2601248323917389,
0.01924600452184677,
0.05142706260085106,
-0.3591575026512146,
0.03220018371939659,
-0.24793483316898346,
-0.021649647504091263,
-0.01079956442117691,
0.09560911357402802,
0.01837988570332527,
-0.070670947432518,
-0.13926613330841064,
-0.11272279918193817,
-0.010934293270111084,
-0.4558762013912201,
0.093059241771698,
-0.37983956933021545,
0.22629280388355255,
0.11797571182250977,
-0.09304864704608917,
0.10936813056468964,
-0.015269123017787933,
-0.05236081779003143,
-0.3023439943790436,
-0.0788784772157669,
0.43223515152931213,
0.23726442456245422,
0.5697934031486511,
0.15786436200141907,
0.29390355944633484,
0.197139173746109,
-0.1165589839220047,
0.21055848896503448,
0.018754420801997185,
-0.01148010604083538,
-0.07898624241352081,
-0.4177803695201874,
0.3815968632698059,
0.13546326756477356,
0.16597872972488403,
0.1283070594072342,
0.006940320134162903,
0.1597452312707901,
0.08345590531826019,
-0.22890672087669373,
-0.025239035487174988,
0.05656969174742699,
-0.27321773767471313,
-0.004261145368218422,
0.3084575831890106,
-0.23848403990268707,
0.287528395652771,
0.5280637145042419,
-0.09575973451137543,
-0.15842396020889282,
0.3377825915813446,
0.05110999196767807,
-0.3668192923069,
0.4083097279071808,
0.7273053526878357,
0.2948639392852783,
0.2875155210494995,
0.16869471967220306,
-0.20003512501716614,
0.12512443959712982,
-0.22110767662525177,
0.2822766602039337,
0.0358348973095417,
-0.08701004087924957,
0.10306459665298462,
-0.061544544994831085,
-0.15203657746315002,
-0.2900572717189789,
-0.33186015486717224,
0.2721989154815674,
0.19933736324310303,
-0.047579143196344376,
-0.273388534784317,
-0.20266607403755188,
-0.18629178404808044,
0.05532919242978096,
0.13590894639492035,
-0.16159138083457947,
-0.19666121900081635,
0.34473633766174316,
0.2926004230976105,
-0.28088486194610596,
0.2653041183948517,
0.4099552631378174,
0.19426384568214417,
-0.28540128469467163,
-0.13556231558322906,
-0.30916452407836914,
0.06920426338911057,
0.07141369581222534,
0.19728617370128632,
0.35237425565719604,
0.5463084578514099,
0.3310386836528778,
-0.017977392300963402,
-0.0403229296207428,
-0.2541464567184448,
-0.07009188085794449,
-0.07199180126190186,
0.02622842788696289,
0.20436282455921173,
0.11002449691295624,
0.1764124035835266,
-0.19648805260658264,
-0.1282975673675537,
-0.03273593634366989,
-0.06794480234384537,
-0.08468672633171082,
0.022235706448554993,
-0.07854599505662918,
0.37200936675071716,
-0.10894452035427094,
-0.3418824076652527,
-0.2518250644207001,
-0.45097827911376953,
0.15177126228809357,
-0.1022045910358429,
0.15134400129318237,
-0.07641224563121796,
0.04039199277758598,
0.16194823384284973,
0.016073448583483696,
-0.04523065686225891,
-0.041032154113054276,
-0.5377722978591919,
0.3273954391479492,
-0.2462206780910492,
-0.10150730609893799,
0.02403939887881279,
0.06233302503824234,
0.08502967655658722,
0.5165233016014099,
-0.45720481872558594,
-0.020246854051947594,
-0.2517220973968506,
-0.10653509199619293,
-0.0787573978304863,
-0.3277187645435333,
0.32282793521881104,
0.0647432878613472,
-0.0799807459115982,
0.026374079287052155,
0.0006874091923236847,
-0.06303787976503372,
0.04313281923532486,
0.308655709028244,
0.0734870582818985,
0.3434769809246063,
0.16795280575752258,
0.9787157773971558,
0.15941613912582397,
0.20103339850902557,
0.014278490096330643,
0.35217103362083435,
0.03917890042066574,
-0.043040208518505096,
0.17527347803115845,
0.4313409924507141,
0.026974767446517944,
-0.22709260880947113,
0.05815628170967102,
0.0444943793118,
-0.2027304768562317,
0.004404794424772263,
-0.15486232936382294,
0.08699952811002731,
-0.30734288692474365,
0.1514437198638916,
-0.058499984443187714,
0.0838887095451355,
0.0332726426422596,
0.26331010460853577,
0.05886157974600792,
-0.13429316878318787,
0.004480481147766113,
0.326582133769989,
0.4290834069252014,
0.015086637809872627,
-0.40795183181762695,
-0.030894730240106583,
-0.3255138397216797,
0.11547596752643585,
0.16840723156929016,
0.03749174252152443,
-0.08559763431549072,
-0.18724793195724487,
0.11017993092536926,
0.09650527685880661,
0.2504422068595886,
-0.4871031641960144,
0.04582240805029869,
0.09024780988693237,
0.09674163162708282,
0.0836186483502388,
0.03483675792813301,
-0.21219901740550995,
0.12156403809785843,
0.12113162875175476,
-0.01876896619796753,
-0.11297999322414398,
-0.11164070665836334,
0.13687899708747864,
0.11842521280050278,
0.13608242571353912,
-0.07930070906877518,
0.056754644960165024,
-0.05613159388303757,
-0.5782445073127747,
0.21018916368484497,
0.0971832349896431,
-0.08879761397838593,
-0.4469638168811798,
-0.3980237543582916,
0.2251083254814148,
0.1729898452758789,
0.2062501311302185,
0.09031215310096741,
0.36739182472229004,
0.0979885533452034,
0.3431759178638458,
-0.09087692201137543,
-0.29054614901542664,
0.3183889091014862,
-0.04341666400432587,
0.2557559609413147,
0.10048345476388931,
0.025093859061598778,
-0.07327341288328171,
0.003450356423854828,
0.31036850810050964,
-0.12383874505758286,
0.32158374786376953,
0.030557818710803986,
0.24431854486465454,
-0.11119475960731506,
0.06104717031121254,
0.03227757662534714,
0.036901745945215225,
-0.09768839180469513,
-0.38460928201675415,
0.3845258951187134,
0.0021410472691059113,
-0.17876821756362915,
0.3347501754760742,
0.09253133088350296,
-0.061334751546382904,
0.40160030126571655,
-0.03437799960374832,
0.8470423221588135,
0.13023924827575684,
-0.1978922337293625,
0.022557564079761505,
-0.017010007053613663,
0.3425307273864746,
-0.4184398055076599,
0.22534500062465668,
0.030649904161691666,
-0.35831448435783386,
0.06016624718904495,
0.0033480748534202576,
0.21905216574668884,
0.18482869863510132,
-0.331281453371048,
0.08587366342544556,
0.28223878145217896,
0.3498033583164215,
-0.07867631316184998,
0.07077544182538986,
-0.2741357684135437,
-0.24799084663391113,
0.009060779586434364,
0.12027950584888458,
-0.05000575631856918,
-0.2619032859802246,
0.2294026017189026,
-0.26638007164001465,
0.15702354907989502,
0.09444843232631683,
-0.4170606732368469,
-0.16718262434005737,
0.02966172620654106,
-0.010475767776370049,
-0.29596394300460815,
-0.30225226283073425,
0.1791016012430191,
0.17968739569187164,
-0.2880704998970032,
0.12319758534431458,
-0.4251578152179718,
0.4617637097835541,
-0.04921732097864151,
0.35705503821372986,
0.14141345024108887,
-0.08348755538463593,
0.036976560950279236,
-0.2252616584300995,
-0.2192174196243286,
0.0075752101838588715,
-0.1825319081544876,
-0.37483781576156616,
0.06475414335727692,
-0.45891088247299194,
0.3394203186035156,
0.1572687327861786,
-0.08778558671474457,
0.0647585391998291,
-0.32607346773147583,
-0.40665900707244873,
0.15747785568237305,
-0.0341106653213501,
-0.1916501224040985,
0.4089162349700928,
0.006630741059780121,
0.035209640860557556,
-0.22655151784420013,
0.37612009048461914,
-0.09674648195505142,
-0.010724110528826714,
0.04986262321472168,
0.025475431233644485,
-0.33618271350860596,
-0.22417396306991577,
0.19829952716827393,
-0.24720150232315063,
-0.007862716913223267,
-0.08660019934177399,
-0.2390233874320984,
0.009998112916946411,
0.00007583166006952524,
-0.28752264380455017,
-0.021284066140651703,
0.12375742197036743,
-0.36355745792388916,
-0.10591505467891693,
-0.21243740618228912,
0.17811456322669983,
0.0761687308549881,
0.33423566818237305,
-0.4373483955860138,
0.04588388651609421,
0.02430582232773304,
0.06317290663719177,
-0.31635984778404236,
0.04376155883073807,
0.001497248187661171,
0.0353880450129509,
0.2135731428861618,
0.11903634667396545,
0.04045737162232399,
0.014699358493089676,
-0.011147133074700832,
0.3051301836967468,
-0.23369786143302917,
-0.11050933599472046,
0.09421537816524506,
0.14243647456169128,
-0.10850443691015244,
0.001325720688328147,
0.053851984441280365,
-0.00960526429116726,
-0.3381926119327545,
-0.12166474759578705,
0.107826828956604,
-0.24959707260131836,
-0.016026392579078674,
0.08991432189941406,
0.4003356695175171,
-0.00442330539226532,
-0.017999043688178062,
0.0171384084969759,
-0.1149427592754364,
0.1519448608160019,
-0.10023750364780426,
0.08885501325130463,
0.06050003692507744,
-0.2035021036863327,
0.29610535502433777,
0.00950206071138382,
0.021632127463817596,
0.1558886468410492,
0.2566341459751129,
0.031184902414679527,
-0.09006533026695251,
0.042139846831560135,
0.47998538613319397,
0.4471602737903595,
0.04940878227353096,
-0.20797203481197357,
0.13983973860740662,
0.28596705198287964,
-0.15500429272651672,
-0.4281872808933258,
0.11188873648643494,
0.06631046533584595,
0.06396402418613434,
-0.128036230802536,
0.10692630708217621,
-0.028429824858903885,
0.08467119187116623,
0.19990992546081543,
0.2776888906955719,
-0.21125835180282593,
0.20283308625221252,
0.2045505791902542,
-0.19797751307487488,
-0.2327766865491867,
-0.12704794108867645,
-0.1130731850862503,
0.3554994761943817,
0.44136756658554077,
-0.37452590465545654,
0.6857469081878662,
0.1907431185245514,
0.32797902822494507,
-0.18718549609184265,
-0.5028455853462219,
-0.1706332117319107,
0.4606630504131317,
-0.15168744325637817,
0.1675933301448822,
0.23712706565856934,
0.32764118909835815,
0.1589484065771103,
-0.3228123188018799,
-0.17604875564575195,
-0.10269644856452942,
0.19955512881278992,
-0.07246750593185425,
0.007009986788034439,
-0.1340796798467636,
-0.40285804867744446,
0.11483995616436005,
0.04076997563242912,
0.2727389931678772,
0.5829412937164307,
-0.042709171772003174,
0.2572336792945862,
-0.2425573617219925,
0.16965222358703613,
-0.20617225766181946,
0.33391645550727844,
-0.31493669748306274,
-0.18321073055267334,
0.18974953889846802,
-0.035648226737976074,
0.11674293875694275,
-0.2913186252117157,
-0.0026011206209659576,
-0.10241171717643738,
0.023770878091454506,
0.18097390234470367,
-0.09821496903896332,
-0.01007130928337574,
-0.12013502418994904,
0.3068009912967682,
0.13317789137363434,
-0.02067892998456955,
0.2007180154323578,
0.09477172791957855,
-0.23624612390995026,
-0.013719700276851654,
0.13105297088623047,
-0.0775393396615982,
-0.4302704632282257,
-0.021350637078285217,
0.10462253540754318,
-0.07104046642780304,
-0.13053615391254425,
-0.25648313760757446,
-0.3321325182914734,
-0.29045069217681885,
0.3475279211997986,
-0.3285443186759949,
-0.1071409210562706,
-0.04023908078670502,
0.1029028668999672,
-0.2806191146373749,
0.4353673458099365,
-0.15830405056476593,
-0.07068362087011337,
-0.15773312747478485,
-0.4359225630760193,
-0.5955533385276794,
-0.21037569642066956,
0.20368237793445587,
0.30261626839637756,
0.28007927536964417,
0.3633687496185303,
0.053341131657361984,
0.3332369923591614,
-0.1280728578567505,
-0.04912155121564865,
-0.1049908846616745,
0.18549007177352905,
-0.4789847135543823,
-0.06917959451675415,
-0.1757618486881256,
-0.07921941578388214,
-0.005851678550243378,
-0.2772596776485443,
0.3885674476623535,
0.21834895014762878,
-0.03696071729063988,
-0.041148193180561066,
-0.18906725943088531,
0.41790294647216797,
-0.05477355420589447,
0.2374282032251358,
-0.055850349366664886,
-0.04594689607620239,
-0.24089878797531128,
-0.047475963830947876,
-0.09085233509540558,
0.08389469236135483,
-0.02901056408882141,
0.005367740988731384,
-0.05115692690014839,
0.6261411905288696,
0.1359797865152359,
0.2679983675479889,
-0.16983309388160706,
0.3397485613822937,
0.012691240757703781,
-0.023339293897151947,
-0.3986356258392334,
-0.011458476074039936,
-0.0998685359954834,
0.33670562505722046,
-0.32685980200767517,
-0.10535671561956406,
0.001882251352071762,
0.08410771191120148,
-0.3625549077987671,
-0.29096633195877075,
0.6975770592689514,
-0.06857570260763168,
0.17119674384593964,
-0.17890386283397675,
0.16312667727470398,
0.35316362977027893,
0.004479454830288887,
-0.7174769043922424,
-0.09075336158275604,
0.12914495170116425,
0.036725424230098724,
0.15021458268165588,
0.46075576543807983,
0.04862159118056297,
0.06485377252101898,
-0.09938222169876099,
0.18196070194244385,
-0.051118865609169006,
-0.070933036506176,
0.11513754725456238,
-0.3684248924255371
] |
https://github.com/huggingface/datasets/issues/5380 | Improve dataset `.skip()` speed in streaming mode | From looking at Arrow's source, it seems Parquet stores metadata at the end, which means one needs to iterate over a Parquet file's data before accessing its metadata. We could mimic Dask to address this "limitation" and write metadata in a `_metadata`/`_common_metadata` file in `to_parquet`/`push_to_hub`, which we could then use to optimize reads (if present). Plus, it's handy that PyArrow can also parse these metadata files. | ### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals. | 66 | Improve dataset `.skip()` speed in streaming mode
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
From looking at Arrow's source, it seems Parquet stores metadata at the end, which means one needs to iterate over a Parquet file's data before accessing its metadata. We could mimic Dask to address this "limitation" and write metadata in a `_metadata`/`_common_metadata` file in `to_parquet`/`push_to_hub`, which we could then use to optimize reads (if present). Plus, it's handy that PyArrow can also parse these metadata files. | [
-0.4156389534473419,
-0.006731167435646057,
-0.08167840540409088,
0.04512714594602585,
0.0637446716427803,
-0.17054511606693268,
-0.056873198598623276,
0.2818978726863861,
-0.3282759189605713,
0.08835439383983612,
0.13442368805408478,
0.7062172293663025,
-0.24183709919452667,
0.17784038186073303,
0.11372952163219452,
-0.25516486167907715,
0.007115110754966736,
0.004522174596786499,
0.00944286584854126,
0.04118514806032181,
0.10684899985790253,
-0.07619605958461761,
-0.2508834898471832,
-0.25294214487075806,
0.05244109034538269,
-0.09009367972612381,
-0.07137810438871384,
0.15129908919334412,
-0.20654700696468353,
-0.4079678952693939,
0.026930181309580803,
0.09792593121528625,
-0.06684783101081848,
0.0994591936469078,
-0.00011011528840754181,
-0.05207444354891777,
0.4758126735687256,
-0.0434497594833374,
-0.1561928689479828,
0.09084632992744446,
-0.23601970076560974,
0.015292469412088394,
-0.04489312320947647,
-0.155758336186409,
0.11870544403791428,
-0.14154992997646332,
-0.06053386628627777,
-0.21718184649944305,
0.25733596086502075,
0.2138940989971161,
0.136517733335495,
0.13125118613243103,
-0.007638152688741684,
0.3179921507835388,
0.6946151852607727,
0.33652621507644653,
-0.2749497890472412,
0.13247627019882202,
0.4980568587779999,
0.18400564789772034,
-0.3246065080165863,
0.47958916425704956,
-0.12210919708013535,
0.00024757906794548035,
0.3499067723751068,
-0.01954694464802742,
-0.10471373051404953,
-0.07241752743721008,
0.027981936931610107,
0.3251136243343353,
0.33488160371780396,
-0.5435506105422974,
-0.2855396866798401,
-0.4351730942726135,
0.2105562686920166,
-0.7002044916152954,
0.0853494182229042,
0.018432380631566048,
-0.1134360283613205,
0.06932500749826431,
-0.1594388782978058,
-0.2288675606250763,
-0.06258118897676468,
-0.2037046104669571,
0.32311493158340454,
0.07706144452095032,
0.12688899040222168,
-0.0680345818400383,
0.2713063657283783,
-0.12414640188217163,
0.10479424893856049,
0.02744869329035282,
-0.060981813818216324,
0.017740439623594284,
-0.3377491235733032,
-0.22194477915763855,
-0.09825370460748672,
0.023334398865699768,
0.11274790018796921,
0.46502387523651123,
0.29535481333732605,
0.4817848801612854,
0.38271787762641907,
0.1615256369113922,
0.08701056241989136,
-0.48936909437179565,
0.1687365472316742,
-0.15223164856433868,
0.04715689271688461,
0.17640289664268494,
0.11542011797428131,
0.025644805282354355,
-0.02012411504983902,
0.06811363995075226,
-0.03787872940301895,
-0.11780693382024765,
0.004883989691734314,
-0.16197682917118073,
0.11356634646654129,
0.06960853189229965,
-0.044749826192855835,
-0.1935696005821228,
0.0562095083296299,
0.3300381898880005,
0.09481886774301529,
-0.05860324203968048,
-0.5657975077629089,
0.10184447467327118,
0.0041260309517383575,
-0.3481961786746979,
-0.12908603250980377,
-0.005975710228085518,
-0.06344781816005707,
0.2221168726682663,
-0.0033899247646331787,
0.0460638701915741,
0.13307197391986847,
0.058903083205223083,
0.08586366474628448,
0.3391544222831726,
0.34218713641166687,
-0.08483903110027313,
-0.14172664284706116,
0.09598442912101746,
-0.34719929099082947,
-0.14502719044685364,
-0.22150646150112152,
0.1871606558561325,
-0.2625853717327118,
0.3642253875732422,
-0.12159765511751175,
-0.34064367413520813,
0.052592188119888306,
0.14239664375782013,
-0.08551806211471558,
-0.12753556668758392,
-0.5815092921257019,
0.4448883533477783,
-0.182701975107193,
-0.32784706354141235,
0.08916047215461731,
0.08722119778394699,
-0.09322447329759598,
-0.27118197083473206,
0.24463263154029846,
0.019720718264579773,
-0.3754485547542572,
-0.14974859356880188,
-0.29153862595558167,
0.01864452473819256,
0.5302539467811584,
0.1411321759223938,
-0.300372838973999,
-0.3914703130722046,
0.022678112611174583,
0.5528517961502075,
0.7764455080032349,
-0.08834250271320343,
-0.3211326003074646,
0.06194194778800011,
-0.022309791296720505,
0.16684351861476898,
0.3982558846473694,
-0.11721611022949219,
0.5160418748855591,
0.0633375495672226,
-0.1732722520828247,
0.3332251310348511,
-0.0931617021560669,
0.056092768907547,
-0.4777073860168457,
-0.2239435464143753,
0.1935638189315796,
0.31891879439353943,
-0.21642298996448517,
-0.4797050356864929,
0.1318376660346985,
-0.2750834822654724,
0.28389474749565125,
-0.010913807898759842,
0.16564874351024628,
0.11506561189889908,
0.32644712924957275,
-0.19859258830547333,
-0.04435381665825844,
-0.11268005520105362,
-0.11652471870183945,
0.15736302733421326,
0.15537101030349731,
-0.0727430135011673,
-0.21478159725666046,
-0.37974387407302856,
0.040930453687906265,
0.04121636599302292,
0.021214891225099564,
-0.07268132269382477,
0.13904206454753876,
-0.005853518843650818,
-0.08465201407670975,
-0.06811878830194473,
-0.2459987998008728,
-0.07525298744440079,
-0.3018330931663513,
0.02893630415201187,
-0.10931271314620972,
0.3996739983558655,
0.16499215364456177,
-0.3226957321166992,
0.15917553007602692,
0.1233179047703743,
-0.07832751423120499,
-0.1631007194519043,
0.044919874519109726,
0.4574629068374634,
0.28064483404159546,
0.44907140731811523,
0.21531549096107483,
0.18496830761432648,
0.17784751951694489,
-0.275086909532547,
0.17638418078422546,
-0.031580302864313126,
-0.010021599940955639,
-0.0019701384007930756,
-0.3850887417793274,
0.267412006855011,
0.24022623896598816,
0.28016650676727295,
0.11062876880168915,
-0.06320618838071823,
0.0155941192060709,
0.23356133699417114,
-0.1511739194393158,
0.13871045410633087,
-0.0753440409898758,
-0.2876504063606262,
0.1925979107618332,
0.25406312942504883,
-0.45211195945739746,
0.35322651267051697,
0.6916902661323547,
-0.058249786496162415,
-0.15422707796096802,
0.3893481194972992,
0.003218121826648712,
-0.4450577199459076,
0.37417179346084595,
0.3353523015975952,
0.08600874245166779,
0.30360355973243713,
0.17460544407367706,
-0.23078221082687378,
0.0358092226088047,
-0.040915992110967636,
0.2513158619403839,
0.1917077898979187,
0.2520201802253723,
0.041593171656131744,
0.17065851390361786,
-0.07481604069471359,
-0.22315430641174316,
-0.3357609212398529,
0.26878032088279724,
0.14107082784175873,
-0.0437304750084877,
-0.04943692684173584,
-0.23179247975349426,
0.07609282433986664,
-0.018422521650791168,
0.13393458724021912,
-0.3047468960285187,
-0.15646176040172577,
0.26985087990760803,
0.20638222992420197,
-0.2698400616645813,
0.1750507950782776,
0.18518905341625214,
0.20158690214157104,
-0.18023373186588287,
-0.31315872073173523,
-0.4132976830005646,
-0.22910532355308533,
-0.05261876434087753,
0.1538921445608139,
0.3951047658920288,
0.5370184779167175,
0.2956368923187256,
0.24943874776363373,
-0.030414558947086334,
-0.2868327796459198,
-0.16683131456375122,
-0.0903073251247406,
-0.08118683844804764,
0.1356901377439499,
0.09197235107421875,
0.1147189661860466,
-0.38418668508529663,
-0.32555684447288513,
0.0752824991941452,
-0.1577690839767456,
-0.10134530812501907,
0.12965990602970123,
-0.06648572534322739,
0.3201290965080261,
-0.036897581070661545,
-0.21486642956733704,
-0.26638513803482056,
-0.4311840832233429,
0.3022187352180481,
0.010530661791563034,
0.15134337544441223,
-0.38304147124290466,
0.04680496081709862,
0.16562463343143463,
-0.14801080524921417,
0.07430930435657501,
0.06022988632321358,
-0.42991235852241516,
0.27473047375679016,
-0.10761498659849167,
-0.057088155299425125,
-0.1405235230922699,
-0.04615270346403122,
0.23092548549175262,
0.48282819986343384,
-0.5091289281845093,
-0.0471111461520195,
-0.07731471955776215,
0.006162937730550766,
-0.23496013879776,
-0.2966954708099365,
0.259541392326355,
0.19302576780319214,
-0.15640147030353546,
0.050264909863471985,
-0.12499649822711945,
0.04183452948927879,
0.1442531943321228,
0.2177627682685852,
0.06616563349962234,
0.2488139271736145,
0.06619000434875488,
1.017937421798706,
-0.04195603355765343,
0.20169976353645325,
0.11689433455467224,
0.11260046809911728,
0.0927719920873642,
-0.08911050111055374,
0.30654314160346985,
0.32621413469314575,
-0.03816834092140198,
-0.08257706463336945,
0.09886248409748077,
-0.11542802304029465,
-0.46556732058525085,
0.10718832910060883,
-0.257368266582489,
0.0059996843338012695,
-0.3186079263687134,
0.17148831486701965,
-0.12229612469673157,
0.02369118481874466,
-0.15557360649108887,
0.24055203795433044,
0.025973893702030182,
0.04302644357085228,
0.24467796087265015,
-0.02277042716741562,
0.20670032501220703,
0.028618458658456802,
-0.33484992384910583,
0.0747540146112442,
-0.35630980134010315,
0.00040621310472488403,
0.025638699531555176,
0.08051083981990814,
0.037587229162454605,
-0.31917959451675415,
0.1423269510269165,
-0.14173929393291473,
0.454603910446167,
-0.23176799714565277,
-0.007486891001462936,
0.17271555960178375,
0.3158192038536072,
-0.23017898201942444,
0.045420702546834946,
-0.26178184151649475,
0.021221408620476723,
0.04130728542804718,
0.11380714178085327,
-0.4061278700828552,
-0.1986795961856842,
0.03983659669756889,
0.028120912611484528,
0.212582528591156,
0.08831063657999039,
-0.0735936239361763,
0.08223503082990646,
-0.43583983182907104,
0.3312941789627075,
0.15063829720020294,
0.017945468425750732,
-0.23327554762363434,
-0.16188465058803558,
0.08730817586183548,
0.12389122694730759,
0.04856659471988678,
0.18584883213043213,
0.5493571758270264,
-0.07877317816019058,
0.2998274564743042,
-0.03861386328935623,
0.007410570979118347,
0.41950175166130066,
0.21661867201328278,
0.20718324184417725,
-0.1399102509021759,
0.07283642888069153,
-0.06137459725141525,
0.2873706519603729,
0.29081419110298157,
0.018495220690965652,
0.3888486921787262,
-0.1599099487066269,
0.19107243418693542,
-0.08985988050699234,
0.07663846015930176,
0.2504950761795044,
-0.12885257601737976,
-0.03950570523738861,
-0.15451759099960327,
0.5169920921325684,
0.017166130244731903,
-0.09611396491527557,
0.41488951444625854,
0.3607632517814636,
-0.005460290238261223,
0.635110080242157,
0.24488386511802673,
0.9891499876976013,
0.07046900689601898,
-0.023197535425424576,
0.26346948742866516,
-0.4508436918258667,
0.16291680932044983,
-0.39708781242370605,
0.04238002002239227,
-0.04360754042863846,
-0.12269267439842224,
0.1683872640132904,
-0.09023471176624298,
0.06238727271556854,
0.23787076771259308,
-0.3259168267250061,
0.01161984819918871,
0.22685100138187408,
0.12546877562999725,
-0.1258353739976883,
0.07867380976676941,
-0.10079871863126755,
-0.21979112923145294,
-0.18756723403930664,
0.09396074712276459,
-0.037649840116500854,
-0.5785980820655823,
0.18197846412658691,
-0.4107556939125061,
0.007113657891750336,
0.010588888078927994,
-0.24742776155471802,
-0.07532636821269989,
-0.09193729609251022,
-0.15583017468452454,
-0.06427502632141113,
-0.45053696632385254,
0.14515864849090576,
-0.047005731612443924,
-0.4210362434387207,
-0.06703051924705505,
-0.3680865168571472,
0.4452537000179291,
0.09666047245264053,
0.2402525246143341,
0.12541618943214417,
-0.11930104345083237,
-0.001680990681052208,
-0.12072917819023132,
-0.16922523081302643,
0.10705719143152237,
-0.30413582921028137,
-0.34098875522613525,
0.23691383004188538,
-0.22581441700458527,
0.4944303035736084,
0.23492899537086487,
0.019315142184495926,
0.06749045848846436,
-0.3837355971336365,
-0.3293023705482483,
0.1485462784767151,
-0.13100247085094452,
-0.11818874627351761,
0.217003732919693,
-0.011037666350603104,
0.06377983093261719,
-0.22879157960414886,
0.24319401383399963,
-0.12679770588874817,
0.15043658018112183,
0.19368605315685272,
0.013736981898546219,
-0.34995537996292114,
-0.23306939005851746,
-0.05404960364103317,
0.123511902987957,
-0.21615219116210938,
-0.09894043952226639,
-0.16966217756271362,
-0.026581518352031708,
0.12452585995197296,
-0.3185425400733948,
-0.038749657571315765,
0.07848290354013443,
-0.3831424117088318,
-0.0020816847681999207,
-0.18929508328437805,
0.38247084617614746,
0.0028913505375385284,
0.3024877607822418,
-0.2777179777622223,
-0.011679315939545631,
-0.14087222516536713,
0.12379895895719528,
-0.34368038177490234,
0.15443336963653564,
0.09141978621482849,
0.1327575296163559,
0.17700523138046265,
0.04265151545405388,
0.13622671365737915,
0.06246412172913551,
0.044877856969833374,
0.27005666494369507,
-0.11564378440380096,
-0.14522099494934082,
0.12532255053520203,
0.1119825541973114,
-0.13531532883644104,
0.13279730081558228,
0.048331912606954575,
0.028202470391988754,
-0.31950417160987854,
-0.15114600956439972,
0.058774109929800034,
-0.33182263374328613,
-0.06888240575790405,
-0.10837011784315109,
0.7338742613792419,
-0.048747651278972626,
-0.22282171249389648,
-0.15351465344429016,
-0.06628668308258057,
0.05295446142554283,
-0.17719736695289612,
0.10635383427143097,
-0.05250261723995209,
-0.19427558779716492,
0.4656194746494293,
-0.015660300850868225,
0.03989765793085098,
0.04999386891722679,
0.2856849431991577,
-0.035885050892829895,
-0.24954372644424438,
0.00887857936322689,
0.3938900828361511,
0.5345864295959473,
0.056685201823711395,
-0.4257434904575348,
0.3205546438694,
0.2680036127567291,
-0.23388539254665375,
-0.4097115993499756,
0.024161625653505325,
0.0060672154650092125,
0.13557744026184082,
-0.07693799585103989,
0.2247893512248993,
0.05834241211414337,
-0.11501467227935791,
0.25854358077049255,
0.20656932890415192,
-0.20812642574310303,
0.09622310101985931,
0.26011648774147034,
-0.08395488560199738,
-0.33220240473747253,
0.020320093259215355,
0.11828693747520447,
0.39579641819000244,
0.2722436189651489,
-0.30643701553344727,
0.5720158219337463,
0.35719335079193115,
0.17129048705101013,
-0.1324290633201599,
-0.32997027039527893,
-0.15828870236873627,
0.4248770773410797,
0.22187530994415283,
0.10336461663246155,
0.27213919162750244,
0.41163092851638794,
0.5872386693954468,
-0.4606950283050537,
-0.02741621620953083,
-0.013656944036483765,
0.13869750499725342,
0.06304919719696045,
0.18180008232593536,
-0.12308059632778168,
-0.42148295044898987,
0.028424490243196487,
-0.025057945400476456,
0.15645326673984528,
0.4494134783744812,
0.006216712296009064,
0.37092697620391846,
-0.23083843290805817,
-0.033946603536605835,
-0.11800061911344528,
0.39593061804771423,
-0.2170604169368744,
0.040289122611284256,
0.17192520201206207,
-0.2424081265926361,
0.0150003582239151,
-0.19542202353477478,
0.14986753463745117,
-0.057971611618995667,
-0.18550197780132294,
0.1000080555677414,
0.061797723174095154,
-0.03908826410770416,
0.029845066368579865,
0.16878020763397217,
0.25272834300994873,
-0.18093560636043549,
0.2965547740459442,
0.10582784563302994,
-0.23318959772586823,
-0.17577402293682098,
0.1384417563676834,
-0.11733224987983704,
-0.2665538787841797,
-0.1469823122024536,
0.19979998469352722,
-0.15841777622699738,
-0.13772927224636078,
-0.34477779269218445,
-0.3483937978744507,
-0.3604893088340759,
0.23084893822669983,
-0.1680459976196289,
-0.18684062361717224,
-0.011383593082427979,
0.11685626208782196,
-0.11335889995098114,
0.624118447303772,
0.013207674026489258,
0.006746131926774979,
-0.2309928983449936,
-0.41673415899276733,
-0.6176356077194214,
-0.06315866857767105,
-0.10605227947235107,
0.09750309586524963,
0.510919451713562,
0.4189917743206024,
0.20051169395446777,
0.29844069480895996,
0.032035715878009796,
0.01640481874346733,
-0.11761458963155746,
0.22361373901367188,
-0.6462913155555725,
0.00519917905330658,
-0.009494051337242126,
-0.13647305965423584,
0.010357420891523361,
-0.23495808243751526,
0.36991962790489197,
0.03456265479326248,
-0.007098127156496048,
0.01437042374163866,
-0.24451903998851776,
0.18217211961746216,
0.04066930338740349,
0.20140577852725983,
-0.21243958175182343,
-0.1723259687423706,
-0.17809808254241943,
0.013968570157885551,
-0.07810017466545105,
-0.007691992912441492,
-0.0533619225025177,
0.08788333833217621,
-0.04549079015851021,
0.5204157829284668,
0.037499815225601196,
-0.014533713459968567,
-0.19562144577503204,
0.1248139888048172,
-0.04282808303833008,
0.04504423215985298,
-0.2897428572177887,
0.1522844284772873,
0.20166483521461487,
0.26074540615081787,
-0.4861374795436859,
-0.14287322759628296,
0.0653589740395546,
0.003334125503897667,
-0.2728486657142639,
-0.29246804118156433,
0.7806239724159241,
-0.13351908326148987,
-0.03990539535880089,
-0.14557549357414246,
0.2138664424419403,
0.5392726063728333,
0.08973784744739532,
-0.7460361123085022,
-0.07822296023368835,
0.1754654049873352,
0.09006504714488983,
0.022685717791318893,
0.22809115052223206,
0.01409183256328106,
0.07804445922374725,
-0.21989700198173523,
0.0887976586818695,
-0.12857821583747864,
0.024137908592820168,
-0.07353277504444122,
-0.40411823987960815
] |
https://github.com/huggingface/datasets/issues/5380 | Improve dataset `.skip()` speed in streaming mode | So if Parquet metadata needs to be in its own file anyway, why not implement this skipping feature by storing the example counts per shard in `dataset_infos.json`? That would allow:
- Support both private and public datasets
- Immediate access to the feature upon uploading of shards
- Use any dataset, not only those uploaded using `.push_to_hub()`
A proper Parquet metadata file could still be created and "overwrite" the `dataset_infos.json` info in the datasets-server. | ### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals. | 74 | Improve dataset `.skip()` speed in streaming mode
### Feature request
Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process.
### Motivation
When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples.
### Your contribution
I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
So if Parquet metadata needs to be in its own file anyway, why not implement this skipping feature by storing the example counts per shard in `dataset_infos.json`? That would allow:
- Support both private and public datasets
- Immediate access to the feature upon uploading of shards
- Use any dataset, not only those uploaded using `.push_to_hub()`
A proper Parquet metadata file could still be created and "overwrite" the `dataset_infos.json` info in the datasets-server. | [
-0.3743216395378113,
-0.050270989537239075,
-0.04929877072572708,
0.12331341207027435,
0.013577418401837349,
-0.08900624513626099,
-0.0389377735555172,
0.19122977554798126,
-0.32040688395500183,
0.15834319591522217,
0.3072514832019806,
0.5442472100257874,
-0.27917662262916565,
0.4029204845428467,
0.09155386686325073,
-0.13602176308631897,
0.025776416063308716,
-0.052411988377571106,
0.11407304555177689,
0.1659906506538391,
0.07142751663923264,
0.09326966106891632,
-0.16912949085235596,
-0.4053276777267456,
0.1010923907160759,
0.0061002206057310104,
-0.09839074313640594,
0.1851089596748352,
-0.10881722718477249,
-0.3656157851219177,
-0.030243724584579468,
0.23056428134441376,
0.01785249635577202,
0.0912398248910904,
-0.00011123444710392505,
-0.12288878113031387,
0.4698583483695984,
-0.10457398742437363,
-0.22600628435611725,
0.005638256669044495,
-0.47374966740608215,
0.00019079074263572693,
-0.1909196972846985,
-0.1922743022441864,
0.0014118403196334839,
0.13694168627262115,
-0.009176665917038918,
-0.22356994450092316,
0.08903604000806808,
0.12366411834955215,
0.11477882415056229,
0.13005827367305756,
-0.15158002078533173,
0.12033435702323914,
0.6526800990104675,
0.4556865096092224,
-0.24109968543052673,
-0.0062545668333768845,
0.5668731927871704,
0.3040437698364258,
-0.23526233434677124,
0.6190251708030701,
-0.1027841791510582,
-0.05771716311573982,
0.35221755504608154,
-0.08524677157402039,
-0.2145167589187622,
0.024433452636003494,
0.11499769985675812,
0.34019240736961365,
0.39507222175598145,
-0.4540072977542877,
-0.19905981421470642,
-0.4998810887336731,
0.12676286697387695,
-0.5556397438049316,
0.13422732055187225,
-0.023403877392411232,
0.1162591278553009,
0.09597869217395782,
-0.3026169538497925,
-0.3187798261642456,
-0.06228156387805939,
-0.3166843056678772,
0.3646824359893799,
0.007257089018821716,
0.03941763564944267,
-0.0357341542840004,
0.19917361438274384,
-0.19610165059566498,
0.011503603309392929,
-0.0778685063123703,
-0.024893920868635178,
-0.025838296860456467,
-0.2503821551799774,
-0.3211328387260437,
0.14541538059711456,
0.20269957184791565,
0.1941363513469696,
0.4865414500236511,
0.12762834131717682,
0.4235343635082245,
0.26594477891921997,
0.17509987950325012,
0.1351785957813263,
-0.6382471919059753,
0.2658495008945465,
-0.1816118061542511,
0.09885936975479126,
0.43286532163619995,
0.11889627575874329,
0.01637505739927292,
0.05331100523471832,
0.145181342959404,
-0.2066812366247177,
-0.039420850574970245,
0.11348520219326019,
-0.30319488048553467,
0.08027266710996628,
0.1034030094742775,
0.03442879021167755,
-0.03261241689324379,
0.11867672950029373,
0.3311416208744049,
0.07971800863742828,
-0.18901309370994568,
-0.5036678314208984,
-0.016835138201713562,
-0.06866596639156342,
-0.5460118651390076,
-0.17634239792823792,
0.13580283522605896,
0.06321810185909271,
0.3385970890522003,
0.05916072800755501,
-0.07442620396614075,
0.10738740861415863,
0.08149272948503494,
0.21995843946933746,
0.21821889281272888,
0.41214388608932495,
-0.105348601937294,
-0.17245787382125854,
0.13459362089633942,
-0.2279331088066101,
0.0011677946895360947,
-0.1654888540506363,
0.09058497846126556,
-0.2639744281768799,
0.3144596517086029,
-0.18703317642211914,
-0.4745771884918213,
0.2307130992412567,
0.15398386120796204,
-0.2761063575744629,
-0.1459634006023407,
-0.5910293459892273,
0.473268061876297,
-0.0886930599808693,
-0.4185367822647095,
-0.08209473639726639,
0.021183479577302933,
-0.22720016539096832,
-0.2144329994916916,
0.22553735971450806,
0.2752549648284912,
-0.3547348082065582,
-0.1449590027332306,
-0.31587404012680054,
0.04451864957809448,
0.5372362732887268,
-0.006417308002710342,
-0.28692692518234253,
-0.3637564480304718,
-0.0853344053030014,
0.4414011836051941,
0.5311286449432373,
-0.2124350517988205,
-0.2102736532688141,
0.13594681024551392,
-0.04302272945642471,
0.2015036940574646,
0.4144769012928009,
-0.1477365344762802,
0.5935831069946289,
-0.0777190700173378,
-0.142595574259758,
0.24497950077056885,
-0.18255798518657684,
0.1424451470375061,
-0.45020535588264465,
-0.2261427640914917,
0.237301766872406,
0.34154942631721497,
-0.11771561205387115,
-0.3825157880783081,
0.02575620263814926,
0.08802441507577896,
0.2668769657611847,
-0.12576712667942047,
0.2170654535293579,
0.18752938508987427,
0.4170375466346741,
-0.07489106059074402,
-0.0638333186507225,
-0.15314793586730957,
-0.055627934634685516,
0.12751269340515137,
0.37952351570129395,
0.06767269223928452,
-0.0025098398327827454,
-0.3953039050102234,
0.04443221911787987,
-0.19116878509521484,
0.0001385211944580078,
-0.17697302997112274,
0.13942287862300873,
0.11080928146839142,
-0.15237902104854584,
-0.24196122586727142,
-0.20454943180084229,
0.08488339185714722,
-0.47602319717407227,
0.059732742607593536,
-0.3893645405769348,
0.3429463803768158,
0.1841239184141159,
-0.2805505394935608,
0.17219889163970947,
0.14213700592517853,
0.04643275588750839,
-0.2724011540412903,
0.05484785512089729,
0.5209304094314575,
0.40144142508506775,
0.46989530324935913,
0.2301383912563324,
0.33323732018470764,
0.19169434905052185,
-0.16322600841522217,
0.1396031528711319,
-0.06350013613700867,
-0.040042031556367874,
0.0057189688086509705,
-0.5886368155479431,
0.3112909495830536,
0.19204992055892944,
0.21327874064445496,
0.08455811440944672,
-0.13003595173358917,
0.10855643451213837,
0.26944679021835327,
-0.3652903139591217,
-0.03863853961229324,
-0.0776776671409607,
-0.2008630633354187,
-0.04086659476161003,
0.18878436088562012,
-0.4140401780605316,
0.36380189657211304,
0.5460113883018494,
0.0649033933877945,
-0.21380752325057983,
0.32652077078819275,
0.1594725251197815,
-0.43538200855255127,
0.367660254240036,
0.4867629110813141,
0.22781071066856384,
0.2645016610622406,
0.20382334291934967,
-0.20913885533809662,
0.060239117592573166,
-0.08324000984430313,
0.2474116086959839,
0.11372919380664825,
0.0180048868060112,
-0.017606064677238464,
0.13069206476211548,
-0.0852130725979805,
-0.22844386100769043,
-0.41737088561058044,
0.24506598711013794,
0.17674894630908966,
-0.12858255207538605,
-0.04481968283653259,
-0.2791211009025574,
-0.010943206027150154,
-0.013712017796933651,
0.24966834485530853,
-0.3867890536785126,
-0.13537034392356873,
0.27479225397109985,
0.2364029884338379,
-0.2528130114078522,
0.07576926052570343,
0.3895029127597809,
0.29327279329299927,
-0.33094578981399536,
-0.26644760370254517,
-0.26840102672576904,
-0.09614751487970352,
-0.003599260002374649,
0.1598365604877472,
0.29619336128234863,
0.5551007986068726,
0.3842710554599762,
0.1450469046831131,
-0.07375629246234894,
-0.4161031246185303,
-0.16868537664413452,
-0.11789453029632568,
0.016901224851608276,
0.11569972336292267,
0.24008409678936005,
0.12103477865457535,
-0.1844300925731659,
-0.13450214266777039,
-0.019914811477065086,
-0.12568949162960052,
-0.00032132677733898163,
-0.02432890422642231,
-0.09824362397193909,
0.43437835574150085,
-0.10329490900039673,
-0.23011961579322815,
-0.18952026963233948,
-0.40646809339523315,
0.12195464968681335,
0.12097574770450592,
0.15569153428077698,
-0.237937793135643,
-0.16458982229232788,
0.10621699690818787,
-0.03544045239686966,
0.05210741609334946,
-0.12285799533128738,
-0.6762720346450806,
0.1553933173418045,
-0.2128267139196396,
-0.02211901545524597,
0.09344024956226349,
0.07006777822971344,
0.263223797082901,
0.41083675622940063,
-0.4056015610694885,
-0.07154776901006699,
-0.04896867275238037,
-0.21008853614330292,
-0.22455847263336182,
-0.2572769522666931,
0.37784069776535034,
0.06896821409463882,
-0.061997026205062866,
0.009908191859722137,
-0.17026387155056,
-0.022511258721351624,
0.2523907423019409,
0.30306753516197205,
0.07554841041564941,
0.3892246186733246,
0.1796221137046814,
0.8226228952407837,
0.14885157346725464,
0.25262945890426636,
0.14834089577198029,
0.20460647344589233,
0.08294999599456787,
-0.13961011171340942,
0.31042155623435974,
0.4231427013874054,
0.02676340937614441,
-0.24012339115142822,
0.2515873312950134,
-0.05915067344903946,
-0.2402334362268448,
0.10051265358924866,
-0.19151918590068817,
0.06516493856906891,
-0.2937249541282654,
0.048726655542850494,
0.07988163828849792,
0.15637150406837463,
-0.07043947279453278,
0.13691622018814087,
-0.09731358289718628,
0.02179703116416931,
0.14173394441604614,
0.3027164936065674,
0.2998397648334503,
0.0946529284119606,
-0.32898518443107605,
0.07523822784423828,
-0.2019709050655365,
-0.04957357048988342,
0.0282076857984066,
0.0045768264681100845,
-0.14699618518352509,
-0.24271562695503235,
0.10184725373983383,
-0.0411941222846508,
0.42491811513900757,
-0.4784168303012848,
0.13877126574516296,
0.16811785101890564,
0.11023057997226715,
-0.027722256258130074,
-0.08904312551021576,
-0.27808257937431335,
0.07212084531784058,
0.1611783355474472,
0.431135356426239,
-0.2766180634498596,
-0.1206718161702156,
0.11229070276021957,
0.03739894554018974,
0.19800224900245667,
0.013524054549634457,
0.0009631775319576263,
0.02308623492717743,
-0.5358716249465942,
0.2776196002960205,
0.21657750010490417,
0.11517896503210068,
-0.23668861389160156,
-0.1554185301065445,
0.23027366399765015,
0.1345890462398529,
0.12063255906105042,
0.1284187287092209,
0.4643510580062866,
0.09831172972917557,
0.27898523211479187,
-0.0977671891450882,
-0.009433604776859283,
0.38724958896636963,
0.14270435273647308,
0.3174964487552643,
-0.11240479350090027,
0.21729996800422668,
-0.07802780717611313,
0.2163640558719635,
0.3479102849960327,
0.04327821359038353,
0.3134687542915344,
-0.11958588659763336,
0.220441073179245,
-0.2524013817310333,
0.11977815628051758,
0.0356544554233551,
-0.11413997411727905,
-0.17946049571037292,
-0.3158722519874573,
0.4589870572090149,
0.059258196502923965,
-0.1262904405593872,
0.22404909133911133,
0.25133854150772095,
-0.21610866487026215,
0.5665055513381958,
0.17786145210266113,
0.9536347389221191,
0.07815779745578766,
-0.10117918252944946,
0.0277220718562603,
-0.29847973585128784,
0.42119282484054565,
-0.6191621422767639,
0.06004932522773743,
-0.05462557077407837,
-0.3560987412929535,
0.08160113543272018,
-0.018203068524599075,
0.27065595984458923,
0.26904281973838806,
-0.3424612581729889,
0.1475050300359726,
0.29737329483032227,
0.32070621848106384,
-0.14079129695892334,
0.07369346171617508,
-0.1486394703388214,
-0.28332453966140747,
-0.1979762315750122,
0.12257365882396698,
-0.01427365094423294,
-0.4951396882534027,
0.16448304057121277,
-0.2919517755508423,
0.06914322078227997,
0.02347075194120407,
-0.36028122901916504,
-0.159396231174469,
0.08299189060926437,
-0.18340086936950684,
-0.11718986928462982,
-0.2555003762245178,
0.2963576912879944,
-0.07503390312194824,
-0.16812466084957123,
0.14250825345516205,
-0.4133341312408447,
0.36853715777397156,
-0.0297587588429451,
0.2416306734085083,
0.07884252816438675,
-0.08348780870437622,
0.08891148865222931,
-0.17800012230873108,
-0.04355993866920471,
0.045950982719659805,
-0.2531146705150604,
-0.2805550992488861,
0.06617328524589539,
-0.3494420051574707,
0.45718371868133545,
0.06401403993368149,
-0.061184924095869064,
0.1033693328499794,
-0.22848518192768097,
-0.36507880687713623,
0.11870443820953369,
-0.011997997760772705,
-0.2608490586280823,
0.21268188953399658,
-0.10110980272293091,
0.05934402346611023,
-0.24512071907520294,
0.26404520869255066,
-0.12018761783838272,
0.10793007910251617,
-0.026524856686592102,
0.08068099617958069,
-0.2535487413406372,
-0.21448123455047607,
0.13075295090675354,
-0.01973824016749859,
0.1049480214715004,
-0.11117444932460785,
-0.10447152704000473,
-0.052314721047878265,
0.13650555908679962,
-0.28377270698547363,
0.018552249297499657,
0.03929593041539192,
-0.3428654372692108,
-0.07029198110103607,
-0.18742252886295319,
0.1323200911283493,
-0.06852099299430847,
0.32151561975479126,
-0.2588309049606323,
0.050899799913167953,
-0.09398121386766434,
-0.05040667951107025,
-0.33145585656166077,
0.08432885259389877,
-0.0327301025390625,
0.17384015023708344,
0.35169532895088196,
0.1295689046382904,
-0.048837702721357346,
0.0501280203461647,
-0.0034417957067489624,
0.24585627019405365,
-0.1139964908361435,
-0.11349910497665405,
0.10205487906932831,
0.11037031561136246,
-0.028657082468271255,
0.252767950296402,
-0.0284014530479908,
0.10297460854053497,
-0.3807747960090637,
-0.1529206931591034,
0.23651856184005737,
-0.35161370038986206,
-0.03102622926235199,
-0.0020600873976945877,
0.641103208065033,
-0.008414864540100098,
-0.1337570697069168,
-0.08890029042959213,
0.006256207823753357,
0.0356474407017231,
-0.1996760070323944,
0.08012187480926514,
-0.17317156493663788,
-0.1801864355802536,
0.30474916100502014,
0.11768106371164322,
-0.005344413220882416,
0.15671133995056152,
0.16029956936836243,
0.03158951550722122,
-0.14357002079486847,
0.299981951713562,
0.43782100081443787,
0.4123663306236267,
0.05376870930194855,
-0.317207932472229,
0.21490055322647095,
0.2327227145433426,
-0.11508900672197342,
-0.4221274256706238,
0.19072364270687103,
0.08485958725214005,
0.10672369599342346,
-0.0030089393258094788,
0.20729047060012817,
0.07617916166782379,
-0.08568724989891052,
0.24200209975242615,
0.45705386996269226,
-0.3041045665740967,
0.2676819860935211,
0.16923820972442627,
-0.24347445368766785,
-0.21676243841648102,
-0.10010341554880142,
0.052242398262023926,
0.35492098331451416,
0.43722498416900635,
-0.12864241003990173,
0.661556601524353,
0.44334736466407776,
0.0978437066078186,
-0.1327538788318634,
-0.4637904763221741,
-0.15265610814094543,
0.4818078577518463,
0.21668922901153564,
0.07640159875154495,
0.15870441496372223,
0.16432617604732513,
0.36047738790512085,
-0.37307465076446533,
-0.11995401978492737,
-0.04375829920172691,
0.15490925312042236,
-0.05659417062997818,
0.20132321119308472,
-0.11862321197986603,
-0.4800608456134796,
0.03580997511744499,
-0.014053862541913986,
0.20023798942565918,
0.29209697246551514,
-0.128426656126976,
0.35962343215942383,
-0.20740260183811188,
-0.12921932339668274,
-0.16984635591506958,
0.34163421392440796,
-0.34450721740722656,
-0.047465912997722626,
0.011744379997253418,
-0.17228195071220398,
0.11145812273025513,
-0.3430044651031494,
0.08132947236299515,
-0.13769441843032837,
-0.039739545434713364,
0.14058107137680054,
-0.10746382176876068,
0.030836990103125572,
0.030720144510269165,
0.11096027493476868,
0.0944991335272789,
-0.10531090199947357,
0.280181884765625,
0.09436841309070587,
-0.15851472318172455,
-0.1561661660671234,
0.20857279002666473,
-0.23102429509162903,
-0.4370773732662201,
-0.1226947084069252,
0.22332510352134705,
0.0031303763389587402,
-0.13216222822666168,
-0.27238479256629944,
-0.3862065076828003,
-0.5519063472747803,
0.274600088596344,
-0.08419276028871536,
-0.07375983148813248,
0.08540461957454681,
0.09927540272474289,
-0.18381533026695251,
0.4117504060268402,
-0.08129766583442688,
-0.34429067373275757,
-0.22421328723430634,
-0.5106684565544128,
-0.6383928656578064,
-0.08593752235174179,
-0.01302950456738472,
0.007009705528616905,
0.4316166937351227,
0.45401427149772644,
0.13132676482200623,
0.27251601219177246,
-0.15036045014858246,
0.02224905975162983,
-0.11440334469079971,
0.17430341243743896,
-0.49198228120803833,
-0.09273229539394379,
-0.15160727500915527,
-0.21320590376853943,
0.07309522479772568,
-0.019302330911159515,
0.29261788725852966,
0.15079784393310547,
-0.018349455669522285,
-0.04106784611940384,
-0.24516859650611877,
0.20035424828529358,
-0.07604192197322845,
0.09850162267684937,
-0.19092489778995514,
-0.12486717104911804,
-0.19441163539886475,
0.007808374240994453,
-0.1890658438205719,
0.10785101354122162,
-0.08740165829658508,
0.2167089879512787,
-0.17270414531230927,
0.5439202785491943,
0.025328630581498146,
0.13336195051670074,
-0.2207091599702835,
0.14041516184806824,
0.0011673197150230408,
-0.08100895583629608,
-0.3511202931404114,
0.16591238975524902,
0.08387070149183273,
0.3455490469932556,
-0.41204047203063965,
-0.14909738302230835,
0.0013245567679405212,
0.023354465141892433,
-0.21012462675571442,
-0.2916133403778076,
0.6961601972579956,
-0.13311156630516052,
-0.04199089854955673,
-0.2707751393318176,
0.27675193548202515,
0.2657258212566376,
-0.009296055883169174,
-0.6157853007316589,
-0.05488576367497444,
0.19116568565368652,
0.1107625961303711,
0.01994350180029869,
0.30482053756713867,
0.06483189761638641,
-0.0013485103845596313,
-0.1947018951177597,
-0.09581872820854187,
-0.041141219437122345,
0.07936246693134308,
0.15297096967697144,
-0.3601949214935303
] |
https://github.com/huggingface/datasets/issues/5378 | The dataset "the_pile", subset "enron_emails" , load_dataset() failure | Thanks for reporting @shaoyuta. We are investigating it.
We are transferring the issue to "the_pile" Community tab on the Hub: https://huggingface.co/datasets/the_pile/discussions/4 | ### Describe the bug
When run
"datasets.load_dataset("the_pile","enron_emails")" failure

### Steps to reproduce the bug
Run below code in python cli:
>>> import datasets
>>> datasets.load_dataset("the_pile","enron_emails")
### Expected behavior
Load dataset "the_pile", "enron_emails" successfully.
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.7.1
- Platform: Linux-5.15.0-53-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- PyArrow version: 10.0.0
- Pandas version: 1.4.3
| 21 | The dataset "the_pile", subset "enron_emails" , load_dataset() failure
### Describe the bug
When run
"datasets.load_dataset("the_pile","enron_emails")" failure

### Steps to reproduce the bug
Run below code in python cli:
>>> import datasets
>>> datasets.load_dataset("the_pile","enron_emails")
### Expected behavior
Load dataset "the_pile", "enron_emails" successfully.
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.7.1
- Platform: Linux-5.15.0-53-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- PyArrow version: 10.0.0
- Pandas version: 1.4.3
Thanks for reporting @shaoyuta. We are investigating it.
We are transferring the issue to "the_pile" Community tab on the Hub: https://huggingface.co/datasets/the_pile/discussions/4 | [
-0.13004441559314728,
0.058350011706352234,
-0.029946403577923775,
0.42602992057800293,
0.2729054093360901,
0.1832219660282135,
0.5798448920249939,
0.1603625863790512,
0.13410986959934235,
0.08196943998336792,
-0.0489475354552269,
0.31444188952445984,
-0.03582872450351715,
0.14714352786540985,
-0.03259853273630142,
-0.13265226781368256,
-0.04740004986524582,
0.02849152684211731,
-0.23051655292510986,
-0.030810825526714325,
-0.28497740626335144,
0.04083618149161339,
-0.2723775804042816,
-0.0160505473613739,
-0.2557905912399292,
-0.09397594630718231,
-0.125512957572937,
0.39701220393180847,
-0.023641811683773994,
-0.15743187069892883,
0.48785096406936646,
-0.07537074387073517,
-0.007632926106452942,
0.5620379447937012,
-0.00009936723654391244,
-0.030056677758693695,
0.3831644058227539,
0.03720824420452118,
-0.39836427569389343,
-0.35730981826782227,
-0.22721770405769348,
-0.3162713348865509,
0.0588444322347641,
-0.18988801538944244,
-0.01596822217106819,
-0.18452772498130798,
-0.04226809740066528,
-0.13721802830696106,
0.30800861120224,
0.30102184414863586,
0.34227484464645386,
0.6412802934646606,
0.14154939353466034,
-0.26687657833099365,
0.044580262154340744,
-0.07576137781143188,
-0.10351312905550003,
0.41497305035591125,
-0.0489373505115509,
-0.03684086352586746,
-0.027278482913970947,
0.03251636028289795,
0.02929539419710636,
0.10770586133003235,
0.19178959727287292,
0.06096022203564644,
0.042548760771751404,
-0.1333233267068863,
-0.02578870952129364,
0.23108631372451782,
0.3723776936531067,
-0.27477237582206726,
-0.2745843529701233,
-0.0706191435456276,
0.045963749289512634,
-0.3461308479309082,
0.1807745099067688,
0.2281598299741745,
0.04797878488898277,
0.15750110149383545,
-0.012674731202423573,
0.18524207174777985,
-0.29082000255584717,
0.26275113224983215,
-0.1437448412179947,
-0.008777275681495667,
-0.12737485766410828,
0.0511915385723114,
-0.11596405506134033,
-0.00011013075709342957,
0.2140052616596222,
-0.1427028328180313,
0.12669731676578522,
0.06886708736419678,
-0.5469681024551392,
0.020954228937625885,
0.15842083096504211,
0.20592010021209717,
0.28844931721687317,
-0.04402734339237213,
0.03653106465935707,
0.1198263019323349,
0.1157483160495758,
0.2714443504810333,
0.5601117610931396,
0.1087823212146759,
-0.0855242982506752,
-0.011100629344582558,
0.31025779247283936,
0.16201135516166687,
-0.17330941557884216,
-0.0019373223185539246,
-0.07391832768917084,
-0.1383569836616516,
0.1991603523492813,
-0.16646412014961243,
0.2819608449935913,
-0.09564337134361267,
-0.46345070004463196,
0.2653163969516754,
-0.07302577793598175,
-0.047582581639289856,
0.00869457796216011,
0.4121759235858917,
-0.021902907639741898,
0.1210315153002739,
-0.033907465636730194,
0.26136255264282227,
0.06730134785175323,
0.1297471821308136,
-0.4315379559993744,
0.10249516367912292,
-0.2236652970314026,
-0.1344495713710785,
0.18654805421829224,
-0.47334548830986023,
0.3028612434864044,
0.06382706016302109,
0.3413800001144409,
-0.12095986306667328,
0.05651193857192993,
-0.1597081869840622,
-0.13809415698051453,
0.3836400508880615,
0.09818905591964722,
0.029599150642752647,
0.21897202730178833,
0.299139142036438,
0.10752870887517929,
0.0970720499753952,
-0.085955910384655,
-0.20063765347003937,
-0.2978888750076294,
0.26453936100006104,
-0.10906682163476944,
0.0026314370334148407,
-0.2308642864227295,
0.04026782140135765,
0.03266996890306473,
0.167234405875206,
-0.05006752163171768,
-0.10902579128742218,
-0.07563360035419464,
-0.3197926878929138,
0.109778992831707,
0.3525325655937195,
-0.27701041102409363,
0.0535624697804451,
-0.16721752285957336,
-0.08121556043624878,
0.10654381662607193,
0.2397909015417099,
-0.3414170742034912,
0.07164476811885834,
-0.25251254439353943,
0.007561184465885162,
0.1313358098268509,
-0.04298227280378342,
-0.4753863513469696,
0.14931538701057434,
-0.12155146896839142,
0.09541522711515427,
-0.10207853466272354,
-0.02126334235072136,
-0.15368232131004333,
-0.11958976089954376,
0.1730017364025116,
0.3991146683692932,
-0.01687639020383358,
0.08474209159612656,
-0.24838027358055115,
-0.265969842672348,
0.14017534255981445,
0.09589992463588715,
0.15807658433914185,
0.1956431269645691,
0.2775211036205292,
-0.13350239396095276,
0.17998039722442627,
-0.11892235279083252,
-0.0955236628651619,
0.10947754234075546,
0.282517671585083,
0.17733940482139587,
0.09865370392799377,
-0.19426926970481873,
-0.5472237467765808,
0.3007715046405792,
-0.18685007095336914,
0.041662923991680145,
-0.058091506361961365,
-0.08544431626796722,
-0.3829854428768158,
0.047616638243198395,
-0.16235163807868958,
-0.14640741050243378,
0.23383042216300964,
0.039424747228622437,
-0.1458006054162979,
0.01052902266383171,
-0.23575493693351746,
0.38567686080932617,
-0.21138796210289001,
0.06439346820116043,
-0.21278336644172668,
0.4754992127418518,
-0.13965950906276703,
-0.11815308034420013,
0.047146908938884735,
-0.014501914381980896,
0.18380433320999146,
-0.14551100134849548,
-0.08987870067358017,
0.44032666087150574,
-0.2546248137950897,
-0.09253434836864471,
-0.08147483319044113,
-0.11264289915561676,
0.2024635374546051,
-0.1885470747947693,
0.12197873741388321,
0.05172187089920044,
0.22355878353118896,
-0.07244808971881866,
-0.17617812752723694,
0.2951643466949463,
-0.08123922348022461,
-0.16332951188087463,
0.030875667929649353,
-0.035390086472034454,
0.23363760113716125,
-0.16890281438827515,
0.09286075830459595,
-0.16093149781227112,
0.042639683932065964,
0.05847477912902832,
0.18398718535900116,
0.1304492950439453,
-0.41360151767730713,
-0.19009318947792053,
0.2857516407966614,
0.09245868027210236,
0.2968360185623169,
0.19204333424568176,
-0.24723228812217712,
-0.24565953016281128,
0.0011376608163118362,
0.13361066579818726,
0.6052660346031189,
0.2153950035572052,
-0.07513652741909027,
0.11510603129863739,
-0.060965634882450104,
-0.09890882670879364,
0.09808866679668427,
0.019913233816623688,
0.27705544233322144,
0.22985464334487915,
0.2830283045768738,
0.08216501772403717,
-0.5346282720565796,
-0.028903592377901077,
0.10295873880386353,
0.2856799364089966,
-0.2567727565765381,
0.00802701897919178,
-0.06201229989528656,
0.012660466134548187,
-0.036067843437194824,
-0.11788224428892136,
0.04546748101711273,
-0.26685982942581177,
-0.10929539799690247,
0.12997686862945557,
-0.12297189235687256,
0.13100318610668182,
-0.1033402681350708,
0.1741747409105301,
0.17271016538143158,
0.15485058724880219,
-0.2830505967140198,
-0.17532311379909515,
-0.14517781138420105,
0.1842889040708542,
0.03615797311067581,
0.3111141324043274,
0.2924952805042267,
0.0394984632730484,
-0.06445477157831192,
-0.1952330768108368,
-0.2351633608341217,
0.08605439215898514,
-0.1500038057565689,
0.520897388458252,
0.1219799742102623,
0.3402632772922516,
-0.21999689936637878,
-0.2285309135913849,
0.305268257856369,
-0.31416454911231995,
-0.15262171626091003,
0.22420354187488556,
0.17615604400634766,
-0.05164489895105362,
-0.06429149210453033,
-0.4292702376842499,
-0.34374791383743286,
-0.3407556414604187,
0.16682858765125275,
-0.06814789772033691,
-0.029906295239925385,
0.36243706941604614,
0.11389295756816864,
0.13500869274139404,
-0.0020461739040911198,
0.031114166602492332,
-0.3831244111061096,
-0.2492937594652176,
0.32682502269744873,
-0.20814946293830872,
-0.5439488291740417,
-0.06259547919034958,
0.021628782153129578,
-0.13520434498786926,
0.16471610963344574,
-0.32408785820007324,
-0.25465700030326843,
-0.29386061429977417,
-0.08700549602508545,
-0.006483554840087891,
0.16401407122612,
0.10242081433534622,
-0.11101962625980377,
-0.24986132979393005,
-0.25058260560035706,
-0.11124859750270844,
0.0908799022436142,
0.13477352261543274,
0.011545643210411072,
0.033005230128765106,
0.43929484486579895,
0.030175957828760147,
0.21364647150039673,
0.12189236283302307,
-0.20848433673381805,
0.5449515581130981,
-0.0377701073884964,
0.4555778205394745,
-0.01598372310400009,
-0.5063183307647705,
0.13286429643630981,
-0.04286688566207886,
-0.08199921250343323,
0.2584986388683319,
-0.09447678178548813,
-0.20075680315494537,
-0.09493115544319153,
-0.07100868225097656,
-0.2398875653743744,
-0.13983577489852905,
-0.043188780546188354,
0.18129697442054749,
0.16442690789699554,
0.11214692890644073,
-0.10782134532928467,
0.02423989400267601,
-0.11112099140882492,
-0.0531185083091259,
0.1345852017402649,
0.07205742597579956,
-0.1006341278553009,
-0.06893471628427505,
0.3094271123409271,
-0.3674628436565399,
0.12194055318832397,
-0.025001440197229385,
0.4818589985370636,
-0.05511648952960968,
-0.013361357152462006,
0.0076050907373428345,
0.08562230318784714,
0.6321118474006653,
-0.12758716940879822,
0.20685330033302307,
0.03166007250547409,
-0.020650817081332207,
-0.48207297921180725,
0.02648371085524559,
-0.19865137338638306,
0.17142508924007416,
0.07517792284488678,
0.42619800567626953,
-0.2811026871204376,
-0.05904441326856613,
0.3914802372455597,
0.2776809632778168,
-0.0005266070365905762,
-0.39866092801094055,
-0.31634947657585144,
-0.2893597185611725,
-0.2642419636249542,
0.145503431558609,
0.20522229373455048,
0.21428559720516205,
-0.10123401135206223,
-0.2154160737991333,
-0.1331406533718109,
-0.20063304901123047,
0.047907982021570206,
0.035711679607629776,
0.25869178771972656,
-0.007231512572616339,
0.17313678562641144,
0.06599485874176025,
0.06121594086289406,
0.5083078145980835,
0.5751943588256836,
-0.17699755728244781,
-0.38382014632225037,
0.03429878503084183,
-0.1671326607465744,
0.19646123051643372,
0.294208824634552,
-0.28397268056869507,
-0.24999010562896729,
-0.2459978461265564,
0.04560934007167816,
0.24554342031478882,
-0.12754292786121368,
0.21587760746479034,
0.0756317749619484,
-0.23821921646595,
-0.30595663189888,
0.40523430705070496,
-0.038581572473049164,
0.06929899752140045,
0.20738695561885834,
0.08031797409057617,
-0.22658441960811615,
0.33011436462402344,
-0.16391223669052124,
0.7150284051895142,
-0.046947650611400604,
0.032427988946437836,
0.1458742320537567,
0.08028236031532288,
0.41858211159706116,
0.052054665982723236,
0.012994041666388512,
-0.37661027908325195,
-0.45223894715309143,
0.0445321723818779,
-0.23885107040405273,
0.19775885343551636,
0.3019070029258728,
-0.0686841830611229,
0.30631184577941895,
-0.32539355754852295,
0.0776958167552948,
0.025493992492556572,
0.17137156426906586,
-0.24322882294654846,
-0.05052410438656807,
-0.5508885979652405,
0.26052626967430115,
0.1791563481092453,
0.026407593861222267,
-0.17290470004081726,
-0.11701628565788269,
-0.12740811705589294,
-0.035775959491729736,
-0.22810758650302887,
0.17957550287246704,
-0.3025034964084625,
0.214759960770607,
0.12874765694141388,
-0.33126944303512573,
0.09070494771003723,
0.2399473488330841,
0.291154682636261,
0.11274625360965729,
-0.15896858274936676,
0.1332952082157135,
-0.1605939269065857,
-0.018660547211766243,
0.046397075057029724,
0.06987185776233673,
0.39486798644065857,
-0.031853001564741135,
-0.22103039920330048,
-0.05780225247144699,
-0.16875863075256348,
-0.26611337065696716,
0.09870873391628265,
0.25770658254623413,
-0.17734943330287933,
-0.3197765052318573,
-0.3089810013771057,
-0.2248665988445282,
0.05988100543618202,
-0.45154789090156555,
0.26572906970977783,
0.17441630363464355,
0.02709866873919964,
0.1010669395327568,
0.015595600008964539,
-0.2646287679672241,
-0.14730776846408844,
0.39946654438972473,
-0.1290247142314911,
-0.02632533386349678,
0.2561430335044861,
0.29557356238365173,
-0.16856649518013,
-0.2890526354312897,
-0.11445807665586472,
0.3067840039730072,
-0.36765795946121216,
0.26419535279273987,
0.020726341754198074,
0.2020399123430252,
0.031303178519010544,
0.3024752736091614,
0.14028683304786682,
0.01716594025492668,
0.012013021856546402,
-0.5651758909225464,
-0.1183190569281578,
-0.021220602095127106,
0.06549856811761856,
0.3000865876674652,
0.05078981816768646,
0.02627900429069996,
0.06125198304653168,
-0.0905369222164154,
-0.45578622817993164,
0.2215171903371811,
-0.35306787490844727,
-0.031902700662612915,
0.1634283810853958,
-0.026582203805446625,
0.33664992451667786,
-0.10569320619106293,
0.2867549955844879,
0.13748422265052795,
-0.06983832269906998,
-0.35490572452545166,
-0.1301824301481247,
0.03611147403717041,
0.131108358502388,
-0.1603766828775406,
0.02673548087477684,
-0.17803065478801727,
-0.24312058091163635,
-0.12708322703838348,
0.2812691628932953,
0.2952975034713745,
-0.0269155353307724,
0.0890488475561142,
0.46991097927093506,
0.16425220668315887,
-0.06858256459236145,
-0.032867804169654846,
-0.18386632204055786,
-0.06118474900722504,
0.002813070546835661,
-0.02046734094619751,
0.05842910706996918,
0.05524259805679321,
-0.022982072085142136,
-0.017968274652957916,
0.045940108597278595,
0.1677757203578949,
0.25217530131340027,
-0.3307778835296631,
-0.18235734105110168,
0.2073049694299698,
0.4151526391506195,
0.29271218180656433,
-0.2571381628513336,
0.049529001116752625,
0.09043999761343002,
0.38224515318870544,
-0.47324520349502563,
-0.11964114755392075,
0.2164744734764099,
-0.07262232899665833,
0.08521699905395508,
-0.016789354383945465,
0.29281774163246155,
-0.1665463149547577,
-0.24112199246883392,
0.11880668252706528,
0.4637322425842285,
-0.1378840059041977,
-0.006874429062008858,
0.22868172824382782,
-0.021107196807861328,
0.004110630601644516,
0.3617410659790039,
0.07376286387443542,
0.2983212471008301,
0.4187098741531372,
0.16987070441246033,
0.13440193235874176,
-0.04809886962175369,
0.13526996970176697,
-0.13095271587371826,
-0.409271776676178,
0.31664037704467773,
0.3682403266429901,
-0.13439391553401947,
-0.07559943944215775,
-0.04716752469539642,
0.4567067325115204,
-0.23693183064460754,
0.232303187251091,
-0.1081986129283905,
0.14536136388778687,
-0.19589763879776,
0.04848330840468407,
0.12864698469638824,
-0.1916397213935852,
-0.049765877425670624,
-0.02522807940840721,
-0.07693709433078766,
-0.22674833238124847,
0.08230787515640259,
0.1283457726240158,
-0.11720487475395203,
-0.5019712448120117,
0.006802687421441078,
0.2687964141368866,
-0.053424425423145294,
-0.2711918354034424,
0.1247749999165535,
0.20048195123672485,
-0.20210373401641846,
0.0015255063772201538,
0.37709566950798035,
0.34725916385650635,
0.15102960169315338,
0.18265585601329803,
0.0002157175913453102,
0.0028374306857585907,
-0.08653047680854797,
-0.18229719996452332,
0.2103588581085205,
0.08206061273813248,
0.11272935569286346,
0.2004755735397339,
0.29768145084381104,
-0.3144739866256714,
0.02820177935063839,
0.12229160964488983,
0.12451602518558502,
-0.3776693046092987,
0.2337692379951477,
-0.17200300097465515,
-0.15161241590976715,
-0.16636984050273895,
-0.10588821023702621,
-0.37422317266464233,
-0.1411576271057129,
0.4792211055755615,
-0.10227139294147491,
0.1857389509677887,
-0.045269373804330826,
0.1764463484287262,
-0.06759124994277954,
0.27991577982902527,
0.4485553801059723,
-0.03988940268754959,
-0.24445104598999023,
-0.06892674416303635,
-0.7463889122009277,
0.30267536640167236,
0.0680755078792572,
0.13327760994434357,
0.1955285370349884,
0.020838888362050056,
0.002826802432537079,
0.018977200612425804,
0.10312530398368835,
0.22902266681194305,
0.007332623936235905,
0.06382820755243301,
-0.4740772843360901,
0.0034369900822639465,
-0.11756202578544617,
0.06572434306144714,
0.009338963776826859,
-0.186884343624115,
0.032534562051296234,
-0.15682166814804077,
0.19058635830879211,
-0.36577433347702026,
-0.17926453053951263,
-0.049028344452381134,
-0.17497316002845764,
0.4360641837120056,
0.06834593415260315,
0.4024479389190674,
-0.09973558783531189,
-0.0944051742553711,
-0.20699867606163025,
-0.32228127121925354,
-0.08634630590677261,
0.14499080181121826,
0.07058582454919815,
0.2061796635389328,
-0.03145848959684372,
-0.2678033709526062,
-0.16047298908233643,
0.11368701606988907,
-0.05964343622326851,
-0.12734965980052948,
-0.23633582890033722,
0.26589110493659973,
-0.10177472233772278,
-0.11050023138523102,
-0.03323216363787651,
0.30220097303390503,
-0.0849330723285675,
0.14967036247253418,
-0.05809701234102249,
-0.40132424235343933,
0.4582567512989044,
-0.436921089887619,
-0.40050363540649414,
-0.20196393132209778,
0.10745903849601746,
-0.08262043446302414,
-0.11053689569234848,
-0.2963533103466034,
0.20803984999656677,
0.23392035067081451,
0.08836875855922699,
-0.348429799079895,
0.14415723085403442,
-0.09896621108055115,
0.22303004562854767,
-0.033518679440021515,
0.16867989301681519,
0.15202835202217102,
-0.1649997979402542,
0.08040671050548553,
-0.15657615661621094
] |
https://github.com/huggingface/datasets/issues/5374 | Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec | The data files are hosted on HF at https://huggingface.co/datasets/allenai/c4/tree/main
You have 200 runs streaming the same files in parallel. So this is probably a Hub limitation. Maybe rate limiting ? cc @julien-c
Maybe you can also try to reduce the number of HTTP requests by increasing the block size of each request. This can be done by increasing `DEFAULT_BLOCK_SIZE` in `fsspec.implementations.http`. Default is `5 * 2**20` (5MiB)
Anyway maybe it's just better to save the dataset locally in that case ? | ### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
``` | 81 | Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
```
The data files are hosted on HF at https://huggingface.co/datasets/allenai/c4/tree/main
You have 200 runs streaming the same files in parallel. So this is probably a Hub limitation. Maybe rate limiting ? cc @julien-c
Maybe you can also try to reduce the number of HTTP requests by increasing the block size of each request. This can be done by increasing `DEFAULT_BLOCK_SIZE` in `fsspec.implementations.http`. Default is `5 * 2**20` (5MiB)
Anyway maybe it's just better to save the dataset locally in that case ? | [
-0.551461935043335,
-0.3695976138114929,
-0.000589270144701004,
0.33152151107788086,
0.2842417359352112,
-0.13825403153896332,
0.3256605267524719,
-0.13050927221775055,
0.09035384654998779,
0.31347161531448364,
-0.12639428675174713,
0.1439402848482132,
0.11891317367553711,
0.02422567643225193,
-0.12238907814025879,
-0.2352752983570099,
0.09363433718681335,
-0.13598589599132538,
-0.19825631380081177,
0.1873239129781723,
-0.04668762534856796,
0.17503118515014648,
0.0428142175078392,
-0.3759547472000122,
-0.16804781556129456,
-0.1216944232583046,
-0.09054594486951828,
0.2507997751235962,
0.3597075045108795,
-0.1599222868680954,
-0.04632551223039627,
0.3228100538253784,
-0.06266346573829651,
0.5648378133773804,
-0.00011238538718316704,
-0.12248381972312927,
0.15394505858421326,
0.07045607268810272,
-0.08176794648170471,
-0.12910638749599457,
0.040857329964637756,
-0.19929078221321106,
0.32122257351875305,
0.0938045009970665,
0.11731674522161484,
0.12522555887699127,
-0.09292241930961609,
-0.1695549488067627,
0.4467252492904663,
0.05747916176915169,
0.18395310640335083,
0.6546831130981445,
-0.03553176671266556,
-0.15542271733283997,
-0.14463728666305542,
-0.292932391166687,
0.010638868436217308,
0.452924519777298,
0.3542293608188629,
0.03964737057685852,
-0.22856560349464417,
0.29368793964385986,
-0.03846965357661247,
0.21136139333248138,
0.22143256664276123,
0.0640779659152031,
-0.3520025312900543,
-0.37990742921829224,
0.11567620187997818,
0.3313954174518585,
0.07681354880332947,
-0.12693428993225098,
-0.0994216650724411,
-0.5810725092887878,
-0.08532418310642242,
-0.22026126086711884,
0.13587015867233276,
-0.025650007650256157,
-0.11480945348739624,
-0.034238044172525406,
-0.2379193902015686,
0.035065218806266785,
0.018079422414302826,
-0.007039092481136322,
-0.11332195997238159,
0.031051259487867355,
-0.12893757224082947,
0.1666335165500641,
0.323163241147995,
0.16885338723659515,
-0.07674530893564224,
-0.03576800227165222,
0.005833052098751068,
-0.23869013786315918,
-0.3206639289855957,
0.1852324903011322,
0.15010826289653778,
0.04191502183675766,
0.16950806975364685,
0.2863319516181946,
0.12235728651285172,
-0.05820793658494949,
0.022679518908262253,
0.05900869518518448,
0.4800371527671814,
-0.12682940065860748,
-0.42206576466560364,
-0.25577935576438904,
0.26634007692337036,
0.44380250573158264,
-0.10377335548400879,
-0.1059344932436943,
0.392086386680603,
-0.21163202822208405,
-0.008660564199090004,
-0.3583309054374695,
0.1157570481300354,
0.10800181329250336,
-0.1622270941734314,
0.33321669697761536,
-0.16179443895816803,
0.1222643107175827,
0.1275155395269394,
0.1616559624671936,
-0.1456538438796997,
0.37786272168159485,
-0.18270419538021088,
-0.003212299197912216,
-0.12149345129728317,
-0.16084590554237366,
-0.3575092852115631,
-0.34151777625083923,
-0.11469303071498871,
-0.07883229106664658,
-0.04335630312561989,
-0.4878535270690918,
0.24507802724838257,
0.36243024468421936,
0.3262866139411926,
-0.1625037044286728,
-0.2854745090007782,
-0.22699567675590515,
-0.19123372435569763,
0.24908378720283508,
0.24452582001686096,
0.15589721500873566,
0.050078436732292175,
0.14459943771362305,
0.0047796666622161865,
-0.3120185434818268,
0.10627592355012894,
-0.26618656516075134,
0.022364946082234383,
0.16698341071605682,
-0.109713114798069,
0.0837022066116333,
-0.13678815960884094,
0.07324883341789246,
0.01466110348701477,
-0.10011258721351624,
0.1874590367078781,
-0.17005284130573273,
-0.3155588209629059,
-0.05205445736646652,
0.05793832242488861,
0.6462308168411255,
0.11452355980873108,
-0.25467973947525024,
0.17071552574634552,
-0.2032572329044342,
0.16716498136520386,
0.3448837399482727,
-0.14157120883464813,
-0.040144287049770355,
-0.19442148506641388,
0.013958238065242767,
0.07771535217761993,
-0.39629316329956055,
-0.5315855741500854,
0.5396789312362671,
-0.3183818459510803,
0.30886363983154297,
0.21673566102981567,
-0.14440931379795074,
0.3577735424041748,
0.051713258028030396,
0.26289671659469604,
0.14791907370090485,
-0.24385583400726318,
0.08449960500001907,
-0.15993037819862366,
-0.3349321782588959,
-0.1387721449136734,
0.22678549587726593,
0.12637504935264587,
0.022317565977573395,
0.24105432629585266,
-0.2721847891807556,
0.4928232431411743,
0.11356419324874878,
0.08490952104330063,
0.19079487025737762,
0.06310156732797623,
0.29270097613334656,
-0.176813542842865,
-0.15959998965263367,
-0.22964665293693542,
0.19388318061828613,
0.43465137481689453,
0.0063979290425777435,
0.11632824689149857,
-0.12304282933473587,
0.008241115137934685,
-0.19095918536186218,
-0.1770535558462143,
-0.06706368923187256,
0.03712619096040726,
0.1775306761264801,
-0.005899446085095406,
0.20814333856105804,
-0.14124684035778046,
0.6346786618232727,
-0.1136990636587143,
0.2460184246301651,
-0.43111568689346313,
0.054832398891448975,
0.055122457444667816,
-0.22794640064239502,
0.054670847952365875,
0.1344209611415863,
0.16517014801502228,
-0.06460891664028168,
-0.01648877188563347,
0.37536466121673584,
-0.040461938828229904,
0.3720625638961792,
-0.17855897545814514,
-0.014900162816047668,
0.39038020372390747,
0.2751885652542114,
-0.14860117435455322,
0.17280234396457672,
0.10750564932823181,
-0.1480574607849121,
0.09149955958127975,
0.12776316702365875,
-0.12363383173942566,
0.173421710729599,
0.02918568253517151,
0.1121678426861763,
0.34958991408348083,
0.08981756865978241,
-0.02365339919924736,
-0.05440255627036095,
0.29352623224258423,
0.028193362057209015,
0.3895416557788849,
-0.16273890435695648,
-0.514579176902771,
0.3988115191459656,
0.022371452301740646,
0.004537731409072876,
-0.1825622022151947,
-0.010477174073457718,
-0.09885566681623459,
-0.09479867666959763,
0.17726533114910126,
0.4124634861946106,
0.6506641507148743,
0.18250495195388794,
0.3294249475002289,
0.35250410437583923,
0.004094037227332592,
-0.4032333195209503,
0.33919575810432434,
0.32245582342147827,
-0.05941181257367134,
0.3206975758075714,
0.08054130524396896,
0.04430166259407997,
-0.42007339000701904,
-0.3042874038219452,
-0.12822458148002625,
0.12263449281454086,
-0.2660692036151886,
0.3460436463356018,
-0.35384276509284973,
-0.16162313520908356,
-0.28032591938972473,
-0.14296098053455353,
-0.39732611179351807,
-0.2540692985057831,
-0.09536120295524597,
0.5506699681282043,
-0.15118145942687988,
0.03357130289077759,
-0.15833640098571777,
0.17945964634418488,
-0.03374733403325081,
0.1763375848531723,
-0.059115998446941376,
0.04882866516709328,
-0.17231935262680054,
0.008940134197473526,
0.1920558512210846,
-0.2734372913837433,
0.39949244260787964,
0.028533728793263435,
-0.20757612586021423,
-0.13663901388645172,
0.13531243801116943,
0.13227532804012299,
-0.001517999917268753,
0.09100385010242462,
0.2602463364601135,
-0.058879315853118896,
0.07089468836784363,
-0.03314259275794029,
0.0940307155251503,
-0.2121460884809494,
0.06221991032361984,
-0.17702995240688324,
-0.049988459795713425,
0.09883511066436768,
-0.07659764587879181,
-0.07944662123918533,
-0.18720842897891998,
-0.44000089168548584,
0.44415855407714844,
-0.07354703545570374,
0.016076821833848953,
0.24642446637153625,
0.12949003279209137,
0.010052920319139957,
-0.16657716035842896,
-0.09765816479921341,
-0.47813931107521057,
-0.41056421399116516,
-0.1882428228855133,
-0.13789214193820953,
-0.34057506918907166,
0.10500594973564148,
0.06158798933029175,
0.26531705260276794,
0.14761024713516235,
-0.4706604480743408,
-0.03474152088165283,
0.004508640617132187,
-0.07370589673519135,
-0.28002768754959106,
0.234083890914917,
0.22954446077346802,
-0.14701370894908905,
-0.02519756369292736,
0.11584503203630447,
0.12251405417919159,
0.09329625219106674,
0.020703207701444626,
0.27578312158584595,
-0.27130889892578125,
0.6182718873023987,
-0.026612475514411926,
0.4672730565071106,
0.14815953373908997,
0.16409412026405334,
0.2833889126777649,
-0.1822010725736618,
0.39813244342803955,
-0.05950301140546799,
-0.32748550176620483,
0.3077651858329773,
-0.20328539609909058,
-0.32476669549942017,
0.23070742189884186,
-0.12832358479499817,
-0.02667125128209591,
-0.2869434654712677,
-0.38104507327079773,
0.08914124220609665,
-0.4175284802913666,
0.061159417033195496,
0.055552683770656586,
0.01426209881901741,
0.03772847726941109,
0.11727205663919449,
0.09857892990112305,
0.031954921782016754,
-0.20815104246139526,
0.18089434504508972,
0.12954062223434448,
-0.015348604880273342,
-0.12989018857479095,
0.3344195783138275,
-0.6926895976066589,
0.21894018352031708,
0.025015804916620255,
0.2408018708229065,
0.05026497319340706,
-0.08135560154914856,
0.07834187895059586,
-0.030013248324394226,
0.6351328492164612,
0.028709255158901215,
0.04334011673927307,
0.03242025524377823,
-0.2693246006965637,
-0.2877529561519623,
-0.26928672194480896,
-0.15558476746082306,
-0.07545488327741623,
0.2784946858882904,
-0.018171869218349457,
-0.306973934173584,
-0.06683199852705002,
0.18866819143295288,
-0.09537649154663086,
-0.07837063074111938,
-0.16208097338676453,
-0.32067427039146423,
-0.30411770939826965,
-0.2584622800350189,
0.33029329776763916,
-0.03597825765609741,
0.21646623313426971,
-0.27948614954948425,
-0.14190945029258728,
0.17962464690208435,
-0.08691971004009247,
-0.0679062008857727,
0.07059857249259949,
-0.03226146847009659,
-0.005976138170808554,
0.2907267212867737,
0.336487740278244,
0.18137970566749573,
0.21233634650707245,
0.3141957223415375,
0.1340583860874176,
-0.27676570415496826,
0.1356983780860901,
0.09075555205345154,
0.11266584694385529,
0.49453112483024597,
0.007806464098393917,
0.27668723464012146,
0.35576504468917847,
0.5317999124526978,
-0.17573925852775574,
0.20053733885288239,
0.33509817719459534,
-0.04383983090519905,
-0.10440578311681747,
-0.31473979353904724,
0.33849474787712097,
-0.07009705901145935,
0.01361999660730362,
0.4263729155063629,
-0.10954360663890839,
-0.12055079638957977,
-0.07807018607854843,
-0.19122037291526794,
0.723599374294281,
0.33681201934814453,
0.2375870645046234,
0.4321748614311218,
-0.5705261826515198,
0.5510436296463013,
-0.1566959023475647,
0.22245080769062042,
-0.21600911021232605,
-0.17743554711341858,
-0.011989051476120949,
0.04587694630026817,
0.072655089199543,
-0.16682875156402588,
0.07340414822101593,
0.32070910930633545,
-0.057373546063899994,
0.5759663581848145,
-0.18178926408290863,
0.042651429772377014,
-0.4129236340522766,
-0.37282460927963257,
-0.4637294113636017,
0.11076982319355011,
-0.06727070361375809,
0.12396401166915894,
-0.34505265951156616,
-0.08534488081932068,
0.26910561323165894,
-0.06916017830371857,
-0.15036174654960632,
-0.16068372130393982,
-0.37874624133110046,
0.04728945717215538,
0.05752241984009743,
-0.25567078590393066,
-0.1352112889289856,
-0.00819890946149826,
-0.13866811990737915,
-0.251691073179245,
-0.10133004188537598,
0.15722134709358215,
-0.20779749751091003,
0.03098412975668907,
0.11341801285743713,
-0.14448074996471405,
0.08179844915866852,
-0.04186351224780083,
-0.26127102971076965,
-0.086728535592556,
0.1705169677734375,
-0.15879839658737183,
0.018099412322044373,
0.28600502014160156,
-0.2599892020225525,
-0.22960270941257477,
-0.06105479598045349,
0.17367839813232422,
0.22634461522102356,
-0.30186405777931213,
0.062097497284412384,
0.1013532429933548,
-0.2360365092754364,
0.2630328834056854,
-0.32883623242378235,
0.0654645711183548,
-0.3722987473011017,
0.6159465312957764,
-0.30525514483451843,
-0.2935335338115692,
-0.03742764890193939,
0.2727518677711487,
-0.17127679288387299,
-0.12336111813783646,
0.08054717630147934,
-0.00871559139341116,
-0.21375909447669983,
0.22348955273628235,
-0.11979659646749496,
-0.017077140510082245,
-0.11919178813695908,
0.08850622177124023,
0.08469725400209427,
-0.1494065225124359,
0.18960453569889069,
-0.15255990624427795,
-0.47176218032836914,
-0.12514440715312958,
0.021186789497733116,
0.005554206669330597,
0.07537254691123962,
0.19245082139968872,
-0.01133577711880207,
0.10425525158643723,
-0.2662350535392761,
0.1503540724515915,
-0.11939654499292374,
-0.20239748060703278,
0.05265245586633682,
-0.3189418315887451,
0.3825032413005829,
-0.04392343387007713,
0.03850822150707245,
0.3273274898529053,
-0.261715292930603,
-0.14010825753211975,
-0.41283002495765686,
0.1291331946849823,
0.05205714702606201,
-0.25534334778785706,
0.03033312037587166,
-0.031216150149703026,
-0.1947370022535324,
-0.1238795667886734,
0.4727124273777008,
0.35078319907188416,
0.1444861888885498,
-0.4117598533630371,
0.24451015889644623,
0.09629100561141968,
-0.19491098821163177,
0.09428589791059494,
0.08855139464139938,
0.23924463987350464,
0.13165996968746185,
-0.07781609892845154,
-0.04872596263885498,
-0.09114543348550797,
0.025884518399834633,
0.09461694955825806,
0.3166133761405945,
-0.12457611411809921,
0.4178113043308258,
-0.1441560685634613,
-0.2287355363368988,
0.2282899171113968,
0.6028565168380737,
0.4555729627609253,
-0.13383257389068604,
-0.1836947798728943,
-0.021670028567314148,
0.14589674770832062,
-0.18772505223751068,
-0.29844963550567627,
0.3814646303653717,
0.24776476621627808,
0.11073222756385803,
0.32416197657585144,
0.2082139253616333,
-0.3461838662624359,
-0.19805987179279327,
0.18185600638389587,
0.4638683795928955,
-0.08157709985971451,
0.09990805387496948,
0.12916773557662964,
0.057581204921007156,
0.247530996799469,
0.3605564832687378,
0.2566181421279907,
0.4648493230342865,
0.4327031373977661,
-0.14789682626724243,
0.1661868691444397,
0.024920212104916573,
-0.005587819963693619,
0.16978564858436584,
-0.6123135089874268,
-0.2667361795902252,
0.02605564147233963,
-0.5781635642051697,
0.08770281821489334,
-0.21403729915618896,
0.29676517844200134,
-0.42243489623069763,
-0.13163694739341736,
-0.3252568542957306,
0.3045586049556732,
-0.22856968641281128,
-0.11561782658100128,
0.30690357089042664,
-0.09796101599931717,
-0.11815737187862396,
0.36531612277030945,
0.11620362102985382,
-0.07771964371204376,
0.34225940704345703,
-0.0652315765619278,
-0.12134230136871338,
-0.25243398547172546,
-0.40235936641693115,
-0.11058536916971207,
0.1340848058462143,
-0.23288965225219727,
-0.12366537004709244,
0.38383418321609497,
-0.11447924375534058,
-0.07352310419082642,
0.25271502137184143,
0.45478805899620056,
-0.13706453144550323,
0.16407951712608337,
-0.010736440308392048,
0.15976566076278687,
0.3089972138404846,
-0.27118775248527527,
0.11687250435352325,
0.13526177406311035,
0.33198025822639465,
0.12606026232242584,
0.07425845414400101,
-0.21602605283260345,
0.2720341384410858,
0.02245757356286049,
0.011828877031803131,
-0.5405001044273376,
0.40146952867507935,
-0.3661404848098755,
0.032008469104766846,
-0.31531527638435364,
0.18220362067222595,
-0.43100234866142273,
0.4288536012172699,
0.3716661036014557,
-0.016770033165812492,
0.26258498430252075,
-0.2550882399082184,
0.054458729922771454,
0.005996875464916229,
0.5521048307418823,
0.0456913560628891,
-0.192975252866745,
-0.11520878225564957,
-0.20322972536087036,
-0.6631151437759399,
0.20605242252349854,
-0.03312620893120766,
0.21085773408412933,
-0.0869269147515297,
0.20485560595989227,
-0.1342911422252655,
0.2521795630455017,
0.07853086292743683,
0.022121818736195564,
0.0875554010272026,
0.1668347418308258,
-0.07516923546791077,
-0.19845682382583618,
-0.5067961812019348,
-0.20080962777137756,
0.19238170981407166,
0.01865270733833313,
0.526016116142273,
-0.2810210585594177,
0.046275556087493896,
0.06712359189987183,
0.06597289443016052,
-0.11384221911430359,
-0.37495410442352295,
0.24628596007823944,
0.17434373497962952,
-0.06554630398750305,
0.10511869937181473,
-0.18954242765903473,
-0.29476916790008545,
-0.04067634418606758,
-0.26140695810317993,
0.013682875782251358,
-0.08891388773918152,
0.21946553885936737,
-0.04794079810380936,
-0.017490442842245102,
-0.3710753321647644,
0.3321780264377594,
0.36141544580459595,
0.08895280212163925,
-0.2770817279815674,
-0.035588450729846954,
0.08595120161771774,
0.3196238577365875,
0.3016517460346222,
0.6037315130233765,
-0.19015534222126007,
0.2100093960762024,
-0.3688625693321228,
-0.4024438261985779,
0.39791762828826904,
-0.25692424178123474,
-0.2564655840396881,
-0.4706611633300781,
0.4407734274864197,
0.33602026104927063,
-0.10687955468893051,
-0.4412232041358948,
0.14931055903434753,
0.09782710671424866,
-0.24345040321350098,
-0.30403706431388855,
0.24691404402256012,
-0.10060104727745056,
-0.23434366285800934,
0.0852205902338028,
0.017192184925079346,
0.23691749572753906,
-0.15177468955516815,
0.49968668818473816,
-0.15878942608833313
] |
https://github.com/huggingface/datasets/issues/5374 | Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec | you don't get an HTTP error code or something in your stack trace? Kinda hard to debug with this info | ### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
``` | 20 | Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
```
you don't get an HTTP error code or something in your stack trace? Kinda hard to debug with this info | [
-0.551461935043335,
-0.3695976138114929,
-0.000589270144701004,
0.33152151107788086,
0.2842417359352112,
-0.13825403153896332,
0.3256605267524719,
-0.13050927221775055,
0.09035384654998779,
0.31347161531448364,
-0.12639428675174713,
0.1439402848482132,
0.11891317367553711,
0.02422567643225193,
-0.12238907814025879,
-0.2352752983570099,
0.09363433718681335,
-0.13598589599132538,
-0.19825631380081177,
0.1873239129781723,
-0.04668762534856796,
0.17503118515014648,
0.0428142175078392,
-0.3759547472000122,
-0.16804781556129456,
-0.1216944232583046,
-0.09054594486951828,
0.2507997751235962,
0.3597075045108795,
-0.1599222868680954,
-0.04632551223039627,
0.3228100538253784,
-0.06266346573829651,
0.5648378133773804,
-0.00011238538718316704,
-0.12248381972312927,
0.15394505858421326,
0.07045607268810272,
-0.08176794648170471,
-0.12910638749599457,
0.040857329964637756,
-0.19929078221321106,
0.32122257351875305,
0.0938045009970665,
0.11731674522161484,
0.12522555887699127,
-0.09292241930961609,
-0.1695549488067627,
0.4467252492904663,
0.05747916176915169,
0.18395310640335083,
0.6546831130981445,
-0.03553176671266556,
-0.15542271733283997,
-0.14463728666305542,
-0.292932391166687,
0.010638868436217308,
0.452924519777298,
0.3542293608188629,
0.03964737057685852,
-0.22856560349464417,
0.29368793964385986,
-0.03846965357661247,
0.21136139333248138,
0.22143256664276123,
0.0640779659152031,
-0.3520025312900543,
-0.37990742921829224,
0.11567620187997818,
0.3313954174518585,
0.07681354880332947,
-0.12693428993225098,
-0.0994216650724411,
-0.5810725092887878,
-0.08532418310642242,
-0.22026126086711884,
0.13587015867233276,
-0.025650007650256157,
-0.11480945348739624,
-0.034238044172525406,
-0.2379193902015686,
0.035065218806266785,
0.018079422414302826,
-0.007039092481136322,
-0.11332195997238159,
0.031051259487867355,
-0.12893757224082947,
0.1666335165500641,
0.323163241147995,
0.16885338723659515,
-0.07674530893564224,
-0.03576800227165222,
0.005833052098751068,
-0.23869013786315918,
-0.3206639289855957,
0.1852324903011322,
0.15010826289653778,
0.04191502183675766,
0.16950806975364685,
0.2863319516181946,
0.12235728651285172,
-0.05820793658494949,
0.022679518908262253,
0.05900869518518448,
0.4800371527671814,
-0.12682940065860748,
-0.42206576466560364,
-0.25577935576438904,
0.26634007692337036,
0.44380250573158264,
-0.10377335548400879,
-0.1059344932436943,
0.392086386680603,
-0.21163202822208405,
-0.008660564199090004,
-0.3583309054374695,
0.1157570481300354,
0.10800181329250336,
-0.1622270941734314,
0.33321669697761536,
-0.16179443895816803,
0.1222643107175827,
0.1275155395269394,
0.1616559624671936,
-0.1456538438796997,
0.37786272168159485,
-0.18270419538021088,
-0.003212299197912216,
-0.12149345129728317,
-0.16084590554237366,
-0.3575092852115631,
-0.34151777625083923,
-0.11469303071498871,
-0.07883229106664658,
-0.04335630312561989,
-0.4878535270690918,
0.24507802724838257,
0.36243024468421936,
0.3262866139411926,
-0.1625037044286728,
-0.2854745090007782,
-0.22699567675590515,
-0.19123372435569763,
0.24908378720283508,
0.24452582001686096,
0.15589721500873566,
0.050078436732292175,
0.14459943771362305,
0.0047796666622161865,
-0.3120185434818268,
0.10627592355012894,
-0.26618656516075134,
0.022364946082234383,
0.16698341071605682,
-0.109713114798069,
0.0837022066116333,
-0.13678815960884094,
0.07324883341789246,
0.01466110348701477,
-0.10011258721351624,
0.1874590367078781,
-0.17005284130573273,
-0.3155588209629059,
-0.05205445736646652,
0.05793832242488861,
0.6462308168411255,
0.11452355980873108,
-0.25467973947525024,
0.17071552574634552,
-0.2032572329044342,
0.16716498136520386,
0.3448837399482727,
-0.14157120883464813,
-0.040144287049770355,
-0.19442148506641388,
0.013958238065242767,
0.07771535217761993,
-0.39629316329956055,
-0.5315855741500854,
0.5396789312362671,
-0.3183818459510803,
0.30886363983154297,
0.21673566102981567,
-0.14440931379795074,
0.3577735424041748,
0.051713258028030396,
0.26289671659469604,
0.14791907370090485,
-0.24385583400726318,
0.08449960500001907,
-0.15993037819862366,
-0.3349321782588959,
-0.1387721449136734,
0.22678549587726593,
0.12637504935264587,
0.022317565977573395,
0.24105432629585266,
-0.2721847891807556,
0.4928232431411743,
0.11356419324874878,
0.08490952104330063,
0.19079487025737762,
0.06310156732797623,
0.29270097613334656,
-0.176813542842865,
-0.15959998965263367,
-0.22964665293693542,
0.19388318061828613,
0.43465137481689453,
0.0063979290425777435,
0.11632824689149857,
-0.12304282933473587,
0.008241115137934685,
-0.19095918536186218,
-0.1770535558462143,
-0.06706368923187256,
0.03712619096040726,
0.1775306761264801,
-0.005899446085095406,
0.20814333856105804,
-0.14124684035778046,
0.6346786618232727,
-0.1136990636587143,
0.2460184246301651,
-0.43111568689346313,
0.054832398891448975,
0.055122457444667816,
-0.22794640064239502,
0.054670847952365875,
0.1344209611415863,
0.16517014801502228,
-0.06460891664028168,
-0.01648877188563347,
0.37536466121673584,
-0.040461938828229904,
0.3720625638961792,
-0.17855897545814514,
-0.014900162816047668,
0.39038020372390747,
0.2751885652542114,
-0.14860117435455322,
0.17280234396457672,
0.10750564932823181,
-0.1480574607849121,
0.09149955958127975,
0.12776316702365875,
-0.12363383173942566,
0.173421710729599,
0.02918568253517151,
0.1121678426861763,
0.34958991408348083,
0.08981756865978241,
-0.02365339919924736,
-0.05440255627036095,
0.29352623224258423,
0.028193362057209015,
0.3895416557788849,
-0.16273890435695648,
-0.514579176902771,
0.3988115191459656,
0.022371452301740646,
0.004537731409072876,
-0.1825622022151947,
-0.010477174073457718,
-0.09885566681623459,
-0.09479867666959763,
0.17726533114910126,
0.4124634861946106,
0.6506641507148743,
0.18250495195388794,
0.3294249475002289,
0.35250410437583923,
0.004094037227332592,
-0.4032333195209503,
0.33919575810432434,
0.32245582342147827,
-0.05941181257367134,
0.3206975758075714,
0.08054130524396896,
0.04430166259407997,
-0.42007339000701904,
-0.3042874038219452,
-0.12822458148002625,
0.12263449281454086,
-0.2660692036151886,
0.3460436463356018,
-0.35384276509284973,
-0.16162313520908356,
-0.28032591938972473,
-0.14296098053455353,
-0.39732611179351807,
-0.2540692985057831,
-0.09536120295524597,
0.5506699681282043,
-0.15118145942687988,
0.03357130289077759,
-0.15833640098571777,
0.17945964634418488,
-0.03374733403325081,
0.1763375848531723,
-0.059115998446941376,
0.04882866516709328,
-0.17231935262680054,
0.008940134197473526,
0.1920558512210846,
-0.2734372913837433,
0.39949244260787964,
0.028533728793263435,
-0.20757612586021423,
-0.13663901388645172,
0.13531243801116943,
0.13227532804012299,
-0.001517999917268753,
0.09100385010242462,
0.2602463364601135,
-0.058879315853118896,
0.07089468836784363,
-0.03314259275794029,
0.0940307155251503,
-0.2121460884809494,
0.06221991032361984,
-0.17702995240688324,
-0.049988459795713425,
0.09883511066436768,
-0.07659764587879181,
-0.07944662123918533,
-0.18720842897891998,
-0.44000089168548584,
0.44415855407714844,
-0.07354703545570374,
0.016076821833848953,
0.24642446637153625,
0.12949003279209137,
0.010052920319139957,
-0.16657716035842896,
-0.09765816479921341,
-0.47813931107521057,
-0.41056421399116516,
-0.1882428228855133,
-0.13789214193820953,
-0.34057506918907166,
0.10500594973564148,
0.06158798933029175,
0.26531705260276794,
0.14761024713516235,
-0.4706604480743408,
-0.03474152088165283,
0.004508640617132187,
-0.07370589673519135,
-0.28002768754959106,
0.234083890914917,
0.22954446077346802,
-0.14701370894908905,
-0.02519756369292736,
0.11584503203630447,
0.12251405417919159,
0.09329625219106674,
0.020703207701444626,
0.27578312158584595,
-0.27130889892578125,
0.6182718873023987,
-0.026612475514411926,
0.4672730565071106,
0.14815953373908997,
0.16409412026405334,
0.2833889126777649,
-0.1822010725736618,
0.39813244342803955,
-0.05950301140546799,
-0.32748550176620483,
0.3077651858329773,
-0.20328539609909058,
-0.32476669549942017,
0.23070742189884186,
-0.12832358479499817,
-0.02667125128209591,
-0.2869434654712677,
-0.38104507327079773,
0.08914124220609665,
-0.4175284802913666,
0.061159417033195496,
0.055552683770656586,
0.01426209881901741,
0.03772847726941109,
0.11727205663919449,
0.09857892990112305,
0.031954921782016754,
-0.20815104246139526,
0.18089434504508972,
0.12954062223434448,
-0.015348604880273342,
-0.12989018857479095,
0.3344195783138275,
-0.6926895976066589,
0.21894018352031708,
0.025015804916620255,
0.2408018708229065,
0.05026497319340706,
-0.08135560154914856,
0.07834187895059586,
-0.030013248324394226,
0.6351328492164612,
0.028709255158901215,
0.04334011673927307,
0.03242025524377823,
-0.2693246006965637,
-0.2877529561519623,
-0.26928672194480896,
-0.15558476746082306,
-0.07545488327741623,
0.2784946858882904,
-0.018171869218349457,
-0.306973934173584,
-0.06683199852705002,
0.18866819143295288,
-0.09537649154663086,
-0.07837063074111938,
-0.16208097338676453,
-0.32067427039146423,
-0.30411770939826965,
-0.2584622800350189,
0.33029329776763916,
-0.03597825765609741,
0.21646623313426971,
-0.27948614954948425,
-0.14190945029258728,
0.17962464690208435,
-0.08691971004009247,
-0.0679062008857727,
0.07059857249259949,
-0.03226146847009659,
-0.005976138170808554,
0.2907267212867737,
0.336487740278244,
0.18137970566749573,
0.21233634650707245,
0.3141957223415375,
0.1340583860874176,
-0.27676570415496826,
0.1356983780860901,
0.09075555205345154,
0.11266584694385529,
0.49453112483024597,
0.007806464098393917,
0.27668723464012146,
0.35576504468917847,
0.5317999124526978,
-0.17573925852775574,
0.20053733885288239,
0.33509817719459534,
-0.04383983090519905,
-0.10440578311681747,
-0.31473979353904724,
0.33849474787712097,
-0.07009705901145935,
0.01361999660730362,
0.4263729155063629,
-0.10954360663890839,
-0.12055079638957977,
-0.07807018607854843,
-0.19122037291526794,
0.723599374294281,
0.33681201934814453,
0.2375870645046234,
0.4321748614311218,
-0.5705261826515198,
0.5510436296463013,
-0.1566959023475647,
0.22245080769062042,
-0.21600911021232605,
-0.17743554711341858,
-0.011989051476120949,
0.04587694630026817,
0.072655089199543,
-0.16682875156402588,
0.07340414822101593,
0.32070910930633545,
-0.057373546063899994,
0.5759663581848145,
-0.18178926408290863,
0.042651429772377014,
-0.4129236340522766,
-0.37282460927963257,
-0.4637294113636017,
0.11076982319355011,
-0.06727070361375809,
0.12396401166915894,
-0.34505265951156616,
-0.08534488081932068,
0.26910561323165894,
-0.06916017830371857,
-0.15036174654960632,
-0.16068372130393982,
-0.37874624133110046,
0.04728945717215538,
0.05752241984009743,
-0.25567078590393066,
-0.1352112889289856,
-0.00819890946149826,
-0.13866811990737915,
-0.251691073179245,
-0.10133004188537598,
0.15722134709358215,
-0.20779749751091003,
0.03098412975668907,
0.11341801285743713,
-0.14448074996471405,
0.08179844915866852,
-0.04186351224780083,
-0.26127102971076965,
-0.086728535592556,
0.1705169677734375,
-0.15879839658737183,
0.018099412322044373,
0.28600502014160156,
-0.2599892020225525,
-0.22960270941257477,
-0.06105479598045349,
0.17367839813232422,
0.22634461522102356,
-0.30186405777931213,
0.062097497284412384,
0.1013532429933548,
-0.2360365092754364,
0.2630328834056854,
-0.32883623242378235,
0.0654645711183548,
-0.3722987473011017,
0.6159465312957764,
-0.30525514483451843,
-0.2935335338115692,
-0.03742764890193939,
0.2727518677711487,
-0.17127679288387299,
-0.12336111813783646,
0.08054717630147934,
-0.00871559139341116,
-0.21375909447669983,
0.22348955273628235,
-0.11979659646749496,
-0.017077140510082245,
-0.11919178813695908,
0.08850622177124023,
0.08469725400209427,
-0.1494065225124359,
0.18960453569889069,
-0.15255990624427795,
-0.47176218032836914,
-0.12514440715312958,
0.021186789497733116,
0.005554206669330597,
0.07537254691123962,
0.19245082139968872,
-0.01133577711880207,
0.10425525158643723,
-0.2662350535392761,
0.1503540724515915,
-0.11939654499292374,
-0.20239748060703278,
0.05265245586633682,
-0.3189418315887451,
0.3825032413005829,
-0.04392343387007713,
0.03850822150707245,
0.3273274898529053,
-0.261715292930603,
-0.14010825753211975,
-0.41283002495765686,
0.1291331946849823,
0.05205714702606201,
-0.25534334778785706,
0.03033312037587166,
-0.031216150149703026,
-0.1947370022535324,
-0.1238795667886734,
0.4727124273777008,
0.35078319907188416,
0.1444861888885498,
-0.4117598533630371,
0.24451015889644623,
0.09629100561141968,
-0.19491098821163177,
0.09428589791059494,
0.08855139464139938,
0.23924463987350464,
0.13165996968746185,
-0.07781609892845154,
-0.04872596263885498,
-0.09114543348550797,
0.025884518399834633,
0.09461694955825806,
0.3166133761405945,
-0.12457611411809921,
0.4178113043308258,
-0.1441560685634613,
-0.2287355363368988,
0.2282899171113968,
0.6028565168380737,
0.4555729627609253,
-0.13383257389068604,
-0.1836947798728943,
-0.021670028567314148,
0.14589674770832062,
-0.18772505223751068,
-0.29844963550567627,
0.3814646303653717,
0.24776476621627808,
0.11073222756385803,
0.32416197657585144,
0.2082139253616333,
-0.3461838662624359,
-0.19805987179279327,
0.18185600638389587,
0.4638683795928955,
-0.08157709985971451,
0.09990805387496948,
0.12916773557662964,
0.057581204921007156,
0.247530996799469,
0.3605564832687378,
0.2566181421279907,
0.4648493230342865,
0.4327031373977661,
-0.14789682626724243,
0.1661868691444397,
0.024920212104916573,
-0.005587819963693619,
0.16978564858436584,
-0.6123135089874268,
-0.2667361795902252,
0.02605564147233963,
-0.5781635642051697,
0.08770281821489334,
-0.21403729915618896,
0.29676517844200134,
-0.42243489623069763,
-0.13163694739341736,
-0.3252568542957306,
0.3045586049556732,
-0.22856968641281128,
-0.11561782658100128,
0.30690357089042664,
-0.09796101599931717,
-0.11815737187862396,
0.36531612277030945,
0.11620362102985382,
-0.07771964371204376,
0.34225940704345703,
-0.0652315765619278,
-0.12134230136871338,
-0.25243398547172546,
-0.40235936641693115,
-0.11058536916971207,
0.1340848058462143,
-0.23288965225219727,
-0.12366537004709244,
0.38383418321609497,
-0.11447924375534058,
-0.07352310419082642,
0.25271502137184143,
0.45478805899620056,
-0.13706453144550323,
0.16407951712608337,
-0.010736440308392048,
0.15976566076278687,
0.3089972138404846,
-0.27118775248527527,
0.11687250435352325,
0.13526177406311035,
0.33198025822639465,
0.12606026232242584,
0.07425845414400101,
-0.21602605283260345,
0.2720341384410858,
0.02245757356286049,
0.011828877031803131,
-0.5405001044273376,
0.40146952867507935,
-0.3661404848098755,
0.032008469104766846,
-0.31531527638435364,
0.18220362067222595,
-0.43100234866142273,
0.4288536012172699,
0.3716661036014557,
-0.016770033165812492,
0.26258498430252075,
-0.2550882399082184,
0.054458729922771454,
0.005996875464916229,
0.5521048307418823,
0.0456913560628891,
-0.192975252866745,
-0.11520878225564957,
-0.20322972536087036,
-0.6631151437759399,
0.20605242252349854,
-0.03312620893120766,
0.21085773408412933,
-0.0869269147515297,
0.20485560595989227,
-0.1342911422252655,
0.2521795630455017,
0.07853086292743683,
0.022121818736195564,
0.0875554010272026,
0.1668347418308258,
-0.07516923546791077,
-0.19845682382583618,
-0.5067961812019348,
-0.20080962777137756,
0.19238170981407166,
0.01865270733833313,
0.526016116142273,
-0.2810210585594177,
0.046275556087493896,
0.06712359189987183,
0.06597289443016052,
-0.11384221911430359,
-0.37495410442352295,
0.24628596007823944,
0.17434373497962952,
-0.06554630398750305,
0.10511869937181473,
-0.18954242765903473,
-0.29476916790008545,
-0.04067634418606758,
-0.26140695810317993,
0.013682875782251358,
-0.08891388773918152,
0.21946553885936737,
-0.04794079810380936,
-0.017490442842245102,
-0.3710753321647644,
0.3321780264377594,
0.36141544580459595,
0.08895280212163925,
-0.2770817279815674,
-0.035588450729846954,
0.08595120161771774,
0.3196238577365875,
0.3016517460346222,
0.6037315130233765,
-0.19015534222126007,
0.2100093960762024,
-0.3688625693321228,
-0.4024438261985779,
0.39791762828826904,
-0.25692424178123474,
-0.2564655840396881,
-0.4706611633300781,
0.4407734274864197,
0.33602026104927063,
-0.10687955468893051,
-0.4412232041358948,
0.14931055903434753,
0.09782710671424866,
-0.24345040321350098,
-0.30403706431388855,
0.24691404402256012,
-0.10060104727745056,
-0.23434366285800934,
0.0852205902338028,
0.017192184925079346,
0.23691749572753906,
-0.15177468955516815,
0.49968668818473816,
-0.15878942608833313
] |
https://github.com/huggingface/datasets/issues/5374 | Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec | You could try to re-run using this `datasets` branch: [raise-err-when-disconnect](https://github.com/huggingface/datasets/compare/raise-err-when-disconnect?expand=1)
It should raise the fsspec error | ### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
``` | 16 | Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
```
You could try to re-run using this `datasets` branch: [raise-err-when-disconnect](https://github.com/huggingface/datasets/compare/raise-err-when-disconnect?expand=1)
It should raise the fsspec error | [
-0.551461935043335,
-0.3695976138114929,
-0.000589270144701004,
0.33152151107788086,
0.2842417359352112,
-0.13825403153896332,
0.3256605267524719,
-0.13050927221775055,
0.09035384654998779,
0.31347161531448364,
-0.12639428675174713,
0.1439402848482132,
0.11891317367553711,
0.02422567643225193,
-0.12238907814025879,
-0.2352752983570099,
0.09363433718681335,
-0.13598589599132538,
-0.19825631380081177,
0.1873239129781723,
-0.04668762534856796,
0.17503118515014648,
0.0428142175078392,
-0.3759547472000122,
-0.16804781556129456,
-0.1216944232583046,
-0.09054594486951828,
0.2507997751235962,
0.3597075045108795,
-0.1599222868680954,
-0.04632551223039627,
0.3228100538253784,
-0.06266346573829651,
0.5648378133773804,
-0.00011238538718316704,
-0.12248381972312927,
0.15394505858421326,
0.07045607268810272,
-0.08176794648170471,
-0.12910638749599457,
0.040857329964637756,
-0.19929078221321106,
0.32122257351875305,
0.0938045009970665,
0.11731674522161484,
0.12522555887699127,
-0.09292241930961609,
-0.1695549488067627,
0.4467252492904663,
0.05747916176915169,
0.18395310640335083,
0.6546831130981445,
-0.03553176671266556,
-0.15542271733283997,
-0.14463728666305542,
-0.292932391166687,
0.010638868436217308,
0.452924519777298,
0.3542293608188629,
0.03964737057685852,
-0.22856560349464417,
0.29368793964385986,
-0.03846965357661247,
0.21136139333248138,
0.22143256664276123,
0.0640779659152031,
-0.3520025312900543,
-0.37990742921829224,
0.11567620187997818,
0.3313954174518585,
0.07681354880332947,
-0.12693428993225098,
-0.0994216650724411,
-0.5810725092887878,
-0.08532418310642242,
-0.22026126086711884,
0.13587015867233276,
-0.025650007650256157,
-0.11480945348739624,
-0.034238044172525406,
-0.2379193902015686,
0.035065218806266785,
0.018079422414302826,
-0.007039092481136322,
-0.11332195997238159,
0.031051259487867355,
-0.12893757224082947,
0.1666335165500641,
0.323163241147995,
0.16885338723659515,
-0.07674530893564224,
-0.03576800227165222,
0.005833052098751068,
-0.23869013786315918,
-0.3206639289855957,
0.1852324903011322,
0.15010826289653778,
0.04191502183675766,
0.16950806975364685,
0.2863319516181946,
0.12235728651285172,
-0.05820793658494949,
0.022679518908262253,
0.05900869518518448,
0.4800371527671814,
-0.12682940065860748,
-0.42206576466560364,
-0.25577935576438904,
0.26634007692337036,
0.44380250573158264,
-0.10377335548400879,
-0.1059344932436943,
0.392086386680603,
-0.21163202822208405,
-0.008660564199090004,
-0.3583309054374695,
0.1157570481300354,
0.10800181329250336,
-0.1622270941734314,
0.33321669697761536,
-0.16179443895816803,
0.1222643107175827,
0.1275155395269394,
0.1616559624671936,
-0.1456538438796997,
0.37786272168159485,
-0.18270419538021088,
-0.003212299197912216,
-0.12149345129728317,
-0.16084590554237366,
-0.3575092852115631,
-0.34151777625083923,
-0.11469303071498871,
-0.07883229106664658,
-0.04335630312561989,
-0.4878535270690918,
0.24507802724838257,
0.36243024468421936,
0.3262866139411926,
-0.1625037044286728,
-0.2854745090007782,
-0.22699567675590515,
-0.19123372435569763,
0.24908378720283508,
0.24452582001686096,
0.15589721500873566,
0.050078436732292175,
0.14459943771362305,
0.0047796666622161865,
-0.3120185434818268,
0.10627592355012894,
-0.26618656516075134,
0.022364946082234383,
0.16698341071605682,
-0.109713114798069,
0.0837022066116333,
-0.13678815960884094,
0.07324883341789246,
0.01466110348701477,
-0.10011258721351624,
0.1874590367078781,
-0.17005284130573273,
-0.3155588209629059,
-0.05205445736646652,
0.05793832242488861,
0.6462308168411255,
0.11452355980873108,
-0.25467973947525024,
0.17071552574634552,
-0.2032572329044342,
0.16716498136520386,
0.3448837399482727,
-0.14157120883464813,
-0.040144287049770355,
-0.19442148506641388,
0.013958238065242767,
0.07771535217761993,
-0.39629316329956055,
-0.5315855741500854,
0.5396789312362671,
-0.3183818459510803,
0.30886363983154297,
0.21673566102981567,
-0.14440931379795074,
0.3577735424041748,
0.051713258028030396,
0.26289671659469604,
0.14791907370090485,
-0.24385583400726318,
0.08449960500001907,
-0.15993037819862366,
-0.3349321782588959,
-0.1387721449136734,
0.22678549587726593,
0.12637504935264587,
0.022317565977573395,
0.24105432629585266,
-0.2721847891807556,
0.4928232431411743,
0.11356419324874878,
0.08490952104330063,
0.19079487025737762,
0.06310156732797623,
0.29270097613334656,
-0.176813542842865,
-0.15959998965263367,
-0.22964665293693542,
0.19388318061828613,
0.43465137481689453,
0.0063979290425777435,
0.11632824689149857,
-0.12304282933473587,
0.008241115137934685,
-0.19095918536186218,
-0.1770535558462143,
-0.06706368923187256,
0.03712619096040726,
0.1775306761264801,
-0.005899446085095406,
0.20814333856105804,
-0.14124684035778046,
0.6346786618232727,
-0.1136990636587143,
0.2460184246301651,
-0.43111568689346313,
0.054832398891448975,
0.055122457444667816,
-0.22794640064239502,
0.054670847952365875,
0.1344209611415863,
0.16517014801502228,
-0.06460891664028168,
-0.01648877188563347,
0.37536466121673584,
-0.040461938828229904,
0.3720625638961792,
-0.17855897545814514,
-0.014900162816047668,
0.39038020372390747,
0.2751885652542114,
-0.14860117435455322,
0.17280234396457672,
0.10750564932823181,
-0.1480574607849121,
0.09149955958127975,
0.12776316702365875,
-0.12363383173942566,
0.173421710729599,
0.02918568253517151,
0.1121678426861763,
0.34958991408348083,
0.08981756865978241,
-0.02365339919924736,
-0.05440255627036095,
0.29352623224258423,
0.028193362057209015,
0.3895416557788849,
-0.16273890435695648,
-0.514579176902771,
0.3988115191459656,
0.022371452301740646,
0.004537731409072876,
-0.1825622022151947,
-0.010477174073457718,
-0.09885566681623459,
-0.09479867666959763,
0.17726533114910126,
0.4124634861946106,
0.6506641507148743,
0.18250495195388794,
0.3294249475002289,
0.35250410437583923,
0.004094037227332592,
-0.4032333195209503,
0.33919575810432434,
0.32245582342147827,
-0.05941181257367134,
0.3206975758075714,
0.08054130524396896,
0.04430166259407997,
-0.42007339000701904,
-0.3042874038219452,
-0.12822458148002625,
0.12263449281454086,
-0.2660692036151886,
0.3460436463356018,
-0.35384276509284973,
-0.16162313520908356,
-0.28032591938972473,
-0.14296098053455353,
-0.39732611179351807,
-0.2540692985057831,
-0.09536120295524597,
0.5506699681282043,
-0.15118145942687988,
0.03357130289077759,
-0.15833640098571777,
0.17945964634418488,
-0.03374733403325081,
0.1763375848531723,
-0.059115998446941376,
0.04882866516709328,
-0.17231935262680054,
0.008940134197473526,
0.1920558512210846,
-0.2734372913837433,
0.39949244260787964,
0.028533728793263435,
-0.20757612586021423,
-0.13663901388645172,
0.13531243801116943,
0.13227532804012299,
-0.001517999917268753,
0.09100385010242462,
0.2602463364601135,
-0.058879315853118896,
0.07089468836784363,
-0.03314259275794029,
0.0940307155251503,
-0.2121460884809494,
0.06221991032361984,
-0.17702995240688324,
-0.049988459795713425,
0.09883511066436768,
-0.07659764587879181,
-0.07944662123918533,
-0.18720842897891998,
-0.44000089168548584,
0.44415855407714844,
-0.07354703545570374,
0.016076821833848953,
0.24642446637153625,
0.12949003279209137,
0.010052920319139957,
-0.16657716035842896,
-0.09765816479921341,
-0.47813931107521057,
-0.41056421399116516,
-0.1882428228855133,
-0.13789214193820953,
-0.34057506918907166,
0.10500594973564148,
0.06158798933029175,
0.26531705260276794,
0.14761024713516235,
-0.4706604480743408,
-0.03474152088165283,
0.004508640617132187,
-0.07370589673519135,
-0.28002768754959106,
0.234083890914917,
0.22954446077346802,
-0.14701370894908905,
-0.02519756369292736,
0.11584503203630447,
0.12251405417919159,
0.09329625219106674,
0.020703207701444626,
0.27578312158584595,
-0.27130889892578125,
0.6182718873023987,
-0.026612475514411926,
0.4672730565071106,
0.14815953373908997,
0.16409412026405334,
0.2833889126777649,
-0.1822010725736618,
0.39813244342803955,
-0.05950301140546799,
-0.32748550176620483,
0.3077651858329773,
-0.20328539609909058,
-0.32476669549942017,
0.23070742189884186,
-0.12832358479499817,
-0.02667125128209591,
-0.2869434654712677,
-0.38104507327079773,
0.08914124220609665,
-0.4175284802913666,
0.061159417033195496,
0.055552683770656586,
0.01426209881901741,
0.03772847726941109,
0.11727205663919449,
0.09857892990112305,
0.031954921782016754,
-0.20815104246139526,
0.18089434504508972,
0.12954062223434448,
-0.015348604880273342,
-0.12989018857479095,
0.3344195783138275,
-0.6926895976066589,
0.21894018352031708,
0.025015804916620255,
0.2408018708229065,
0.05026497319340706,
-0.08135560154914856,
0.07834187895059586,
-0.030013248324394226,
0.6351328492164612,
0.028709255158901215,
0.04334011673927307,
0.03242025524377823,
-0.2693246006965637,
-0.2877529561519623,
-0.26928672194480896,
-0.15558476746082306,
-0.07545488327741623,
0.2784946858882904,
-0.018171869218349457,
-0.306973934173584,
-0.06683199852705002,
0.18866819143295288,
-0.09537649154663086,
-0.07837063074111938,
-0.16208097338676453,
-0.32067427039146423,
-0.30411770939826965,
-0.2584622800350189,
0.33029329776763916,
-0.03597825765609741,
0.21646623313426971,
-0.27948614954948425,
-0.14190945029258728,
0.17962464690208435,
-0.08691971004009247,
-0.0679062008857727,
0.07059857249259949,
-0.03226146847009659,
-0.005976138170808554,
0.2907267212867737,
0.336487740278244,
0.18137970566749573,
0.21233634650707245,
0.3141957223415375,
0.1340583860874176,
-0.27676570415496826,
0.1356983780860901,
0.09075555205345154,
0.11266584694385529,
0.49453112483024597,
0.007806464098393917,
0.27668723464012146,
0.35576504468917847,
0.5317999124526978,
-0.17573925852775574,
0.20053733885288239,
0.33509817719459534,
-0.04383983090519905,
-0.10440578311681747,
-0.31473979353904724,
0.33849474787712097,
-0.07009705901145935,
0.01361999660730362,
0.4263729155063629,
-0.10954360663890839,
-0.12055079638957977,
-0.07807018607854843,
-0.19122037291526794,
0.723599374294281,
0.33681201934814453,
0.2375870645046234,
0.4321748614311218,
-0.5705261826515198,
0.5510436296463013,
-0.1566959023475647,
0.22245080769062042,
-0.21600911021232605,
-0.17743554711341858,
-0.011989051476120949,
0.04587694630026817,
0.072655089199543,
-0.16682875156402588,
0.07340414822101593,
0.32070910930633545,
-0.057373546063899994,
0.5759663581848145,
-0.18178926408290863,
0.042651429772377014,
-0.4129236340522766,
-0.37282460927963257,
-0.4637294113636017,
0.11076982319355011,
-0.06727070361375809,
0.12396401166915894,
-0.34505265951156616,
-0.08534488081932068,
0.26910561323165894,
-0.06916017830371857,
-0.15036174654960632,
-0.16068372130393982,
-0.37874624133110046,
0.04728945717215538,
0.05752241984009743,
-0.25567078590393066,
-0.1352112889289856,
-0.00819890946149826,
-0.13866811990737915,
-0.251691073179245,
-0.10133004188537598,
0.15722134709358215,
-0.20779749751091003,
0.03098412975668907,
0.11341801285743713,
-0.14448074996471405,
0.08179844915866852,
-0.04186351224780083,
-0.26127102971076965,
-0.086728535592556,
0.1705169677734375,
-0.15879839658737183,
0.018099412322044373,
0.28600502014160156,
-0.2599892020225525,
-0.22960270941257477,
-0.06105479598045349,
0.17367839813232422,
0.22634461522102356,
-0.30186405777931213,
0.062097497284412384,
0.1013532429933548,
-0.2360365092754364,
0.2630328834056854,
-0.32883623242378235,
0.0654645711183548,
-0.3722987473011017,
0.6159465312957764,
-0.30525514483451843,
-0.2935335338115692,
-0.03742764890193939,
0.2727518677711487,
-0.17127679288387299,
-0.12336111813783646,
0.08054717630147934,
-0.00871559139341116,
-0.21375909447669983,
0.22348955273628235,
-0.11979659646749496,
-0.017077140510082245,
-0.11919178813695908,
0.08850622177124023,
0.08469725400209427,
-0.1494065225124359,
0.18960453569889069,
-0.15255990624427795,
-0.47176218032836914,
-0.12514440715312958,
0.021186789497733116,
0.005554206669330597,
0.07537254691123962,
0.19245082139968872,
-0.01133577711880207,
0.10425525158643723,
-0.2662350535392761,
0.1503540724515915,
-0.11939654499292374,
-0.20239748060703278,
0.05265245586633682,
-0.3189418315887451,
0.3825032413005829,
-0.04392343387007713,
0.03850822150707245,
0.3273274898529053,
-0.261715292930603,
-0.14010825753211975,
-0.41283002495765686,
0.1291331946849823,
0.05205714702606201,
-0.25534334778785706,
0.03033312037587166,
-0.031216150149703026,
-0.1947370022535324,
-0.1238795667886734,
0.4727124273777008,
0.35078319907188416,
0.1444861888885498,
-0.4117598533630371,
0.24451015889644623,
0.09629100561141968,
-0.19491098821163177,
0.09428589791059494,
0.08855139464139938,
0.23924463987350464,
0.13165996968746185,
-0.07781609892845154,
-0.04872596263885498,
-0.09114543348550797,
0.025884518399834633,
0.09461694955825806,
0.3166133761405945,
-0.12457611411809921,
0.4178113043308258,
-0.1441560685634613,
-0.2287355363368988,
0.2282899171113968,
0.6028565168380737,
0.4555729627609253,
-0.13383257389068604,
-0.1836947798728943,
-0.021670028567314148,
0.14589674770832062,
-0.18772505223751068,
-0.29844963550567627,
0.3814646303653717,
0.24776476621627808,
0.11073222756385803,
0.32416197657585144,
0.2082139253616333,
-0.3461838662624359,
-0.19805987179279327,
0.18185600638389587,
0.4638683795928955,
-0.08157709985971451,
0.09990805387496948,
0.12916773557662964,
0.057581204921007156,
0.247530996799469,
0.3605564832687378,
0.2566181421279907,
0.4648493230342865,
0.4327031373977661,
-0.14789682626724243,
0.1661868691444397,
0.024920212104916573,
-0.005587819963693619,
0.16978564858436584,
-0.6123135089874268,
-0.2667361795902252,
0.02605564147233963,
-0.5781635642051697,
0.08770281821489334,
-0.21403729915618896,
0.29676517844200134,
-0.42243489623069763,
-0.13163694739341736,
-0.3252568542957306,
0.3045586049556732,
-0.22856968641281128,
-0.11561782658100128,
0.30690357089042664,
-0.09796101599931717,
-0.11815737187862396,
0.36531612277030945,
0.11620362102985382,
-0.07771964371204376,
0.34225940704345703,
-0.0652315765619278,
-0.12134230136871338,
-0.25243398547172546,
-0.40235936641693115,
-0.11058536916971207,
0.1340848058462143,
-0.23288965225219727,
-0.12366537004709244,
0.38383418321609497,
-0.11447924375534058,
-0.07352310419082642,
0.25271502137184143,
0.45478805899620056,
-0.13706453144550323,
0.16407951712608337,
-0.010736440308392048,
0.15976566076278687,
0.3089972138404846,
-0.27118775248527527,
0.11687250435352325,
0.13526177406311035,
0.33198025822639465,
0.12606026232242584,
0.07425845414400101,
-0.21602605283260345,
0.2720341384410858,
0.02245757356286049,
0.011828877031803131,
-0.5405001044273376,
0.40146952867507935,
-0.3661404848098755,
0.032008469104766846,
-0.31531527638435364,
0.18220362067222595,
-0.43100234866142273,
0.4288536012172699,
0.3716661036014557,
-0.016770033165812492,
0.26258498430252075,
-0.2550882399082184,
0.054458729922771454,
0.005996875464916229,
0.5521048307418823,
0.0456913560628891,
-0.192975252866745,
-0.11520878225564957,
-0.20322972536087036,
-0.6631151437759399,
0.20605242252349854,
-0.03312620893120766,
0.21085773408412933,
-0.0869269147515297,
0.20485560595989227,
-0.1342911422252655,
0.2521795630455017,
0.07853086292743683,
0.022121818736195564,
0.0875554010272026,
0.1668347418308258,
-0.07516923546791077,
-0.19845682382583618,
-0.5067961812019348,
-0.20080962777137756,
0.19238170981407166,
0.01865270733833313,
0.526016116142273,
-0.2810210585594177,
0.046275556087493896,
0.06712359189987183,
0.06597289443016052,
-0.11384221911430359,
-0.37495410442352295,
0.24628596007823944,
0.17434373497962952,
-0.06554630398750305,
0.10511869937181473,
-0.18954242765903473,
-0.29476916790008545,
-0.04067634418606758,
-0.26140695810317993,
0.013682875782251358,
-0.08891388773918152,
0.21946553885936737,
-0.04794079810380936,
-0.017490442842245102,
-0.3710753321647644,
0.3321780264377594,
0.36141544580459595,
0.08895280212163925,
-0.2770817279815674,
-0.035588450729846954,
0.08595120161771774,
0.3196238577365875,
0.3016517460346222,
0.6037315130233765,
-0.19015534222126007,
0.2100093960762024,
-0.3688625693321228,
-0.4024438261985779,
0.39791762828826904,
-0.25692424178123474,
-0.2564655840396881,
-0.4706611633300781,
0.4407734274864197,
0.33602026104927063,
-0.10687955468893051,
-0.4412232041358948,
0.14931055903434753,
0.09782710671424866,
-0.24345040321350098,
-0.30403706431388855,
0.24691404402256012,
-0.10060104727745056,
-0.23434366285800934,
0.0852205902338028,
0.017192184925079346,
0.23691749572753906,
-0.15177468955516815,
0.49968668818473816,
-0.15878942608833313
] |
https://github.com/huggingface/datasets/issues/5374 | Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec | The weird thing is that I already have it saved locally & it seems to indeed be using the cached one 🧐 ; I'm also using offline mode, so I don't think it has something to do with the Hub.
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
```
| ### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
``` | 68 | Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
```
The weird thing is that I already have it saved locally & it seems to indeed be using the cached one 🧐 ; I'm also using offline mode, so I don't think it has something to do with the Hub.
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
```
| [
-0.551461935043335,
-0.3695976138114929,
-0.000589270144701004,
0.33152151107788086,
0.2842417359352112,
-0.13825403153896332,
0.3256605267524719,
-0.13050927221775055,
0.09035384654998779,
0.31347161531448364,
-0.12639428675174713,
0.1439402848482132,
0.11891317367553711,
0.02422567643225193,
-0.12238907814025879,
-0.2352752983570099,
0.09363433718681335,
-0.13598589599132538,
-0.19825631380081177,
0.1873239129781723,
-0.04668762534856796,
0.17503118515014648,
0.0428142175078392,
-0.3759547472000122,
-0.16804781556129456,
-0.1216944232583046,
-0.09054594486951828,
0.2507997751235962,
0.3597075045108795,
-0.1599222868680954,
-0.04632551223039627,
0.3228100538253784,
-0.06266346573829651,
0.5648378133773804,
-0.00011238538718316704,
-0.12248381972312927,
0.15394505858421326,
0.07045607268810272,
-0.08176794648170471,
-0.12910638749599457,
0.040857329964637756,
-0.19929078221321106,
0.32122257351875305,
0.0938045009970665,
0.11731674522161484,
0.12522555887699127,
-0.09292241930961609,
-0.1695549488067627,
0.4467252492904663,
0.05747916176915169,
0.18395310640335083,
0.6546831130981445,
-0.03553176671266556,
-0.15542271733283997,
-0.14463728666305542,
-0.292932391166687,
0.010638868436217308,
0.452924519777298,
0.3542293608188629,
0.03964737057685852,
-0.22856560349464417,
0.29368793964385986,
-0.03846965357661247,
0.21136139333248138,
0.22143256664276123,
0.0640779659152031,
-0.3520025312900543,
-0.37990742921829224,
0.11567620187997818,
0.3313954174518585,
0.07681354880332947,
-0.12693428993225098,
-0.0994216650724411,
-0.5810725092887878,
-0.08532418310642242,
-0.22026126086711884,
0.13587015867233276,
-0.025650007650256157,
-0.11480945348739624,
-0.034238044172525406,
-0.2379193902015686,
0.035065218806266785,
0.018079422414302826,
-0.007039092481136322,
-0.11332195997238159,
0.031051259487867355,
-0.12893757224082947,
0.1666335165500641,
0.323163241147995,
0.16885338723659515,
-0.07674530893564224,
-0.03576800227165222,
0.005833052098751068,
-0.23869013786315918,
-0.3206639289855957,
0.1852324903011322,
0.15010826289653778,
0.04191502183675766,
0.16950806975364685,
0.2863319516181946,
0.12235728651285172,
-0.05820793658494949,
0.022679518908262253,
0.05900869518518448,
0.4800371527671814,
-0.12682940065860748,
-0.42206576466560364,
-0.25577935576438904,
0.26634007692337036,
0.44380250573158264,
-0.10377335548400879,
-0.1059344932436943,
0.392086386680603,
-0.21163202822208405,
-0.008660564199090004,
-0.3583309054374695,
0.1157570481300354,
0.10800181329250336,
-0.1622270941734314,
0.33321669697761536,
-0.16179443895816803,
0.1222643107175827,
0.1275155395269394,
0.1616559624671936,
-0.1456538438796997,
0.37786272168159485,
-0.18270419538021088,
-0.003212299197912216,
-0.12149345129728317,
-0.16084590554237366,
-0.3575092852115631,
-0.34151777625083923,
-0.11469303071498871,
-0.07883229106664658,
-0.04335630312561989,
-0.4878535270690918,
0.24507802724838257,
0.36243024468421936,
0.3262866139411926,
-0.1625037044286728,
-0.2854745090007782,
-0.22699567675590515,
-0.19123372435569763,
0.24908378720283508,
0.24452582001686096,
0.15589721500873566,
0.050078436732292175,
0.14459943771362305,
0.0047796666622161865,
-0.3120185434818268,
0.10627592355012894,
-0.26618656516075134,
0.022364946082234383,
0.16698341071605682,
-0.109713114798069,
0.0837022066116333,
-0.13678815960884094,
0.07324883341789246,
0.01466110348701477,
-0.10011258721351624,
0.1874590367078781,
-0.17005284130573273,
-0.3155588209629059,
-0.05205445736646652,
0.05793832242488861,
0.6462308168411255,
0.11452355980873108,
-0.25467973947525024,
0.17071552574634552,
-0.2032572329044342,
0.16716498136520386,
0.3448837399482727,
-0.14157120883464813,
-0.040144287049770355,
-0.19442148506641388,
0.013958238065242767,
0.07771535217761993,
-0.39629316329956055,
-0.5315855741500854,
0.5396789312362671,
-0.3183818459510803,
0.30886363983154297,
0.21673566102981567,
-0.14440931379795074,
0.3577735424041748,
0.051713258028030396,
0.26289671659469604,
0.14791907370090485,
-0.24385583400726318,
0.08449960500001907,
-0.15993037819862366,
-0.3349321782588959,
-0.1387721449136734,
0.22678549587726593,
0.12637504935264587,
0.022317565977573395,
0.24105432629585266,
-0.2721847891807556,
0.4928232431411743,
0.11356419324874878,
0.08490952104330063,
0.19079487025737762,
0.06310156732797623,
0.29270097613334656,
-0.176813542842865,
-0.15959998965263367,
-0.22964665293693542,
0.19388318061828613,
0.43465137481689453,
0.0063979290425777435,
0.11632824689149857,
-0.12304282933473587,
0.008241115137934685,
-0.19095918536186218,
-0.1770535558462143,
-0.06706368923187256,
0.03712619096040726,
0.1775306761264801,
-0.005899446085095406,
0.20814333856105804,
-0.14124684035778046,
0.6346786618232727,
-0.1136990636587143,
0.2460184246301651,
-0.43111568689346313,
0.054832398891448975,
0.055122457444667816,
-0.22794640064239502,
0.054670847952365875,
0.1344209611415863,
0.16517014801502228,
-0.06460891664028168,
-0.01648877188563347,
0.37536466121673584,
-0.040461938828229904,
0.3720625638961792,
-0.17855897545814514,
-0.014900162816047668,
0.39038020372390747,
0.2751885652542114,
-0.14860117435455322,
0.17280234396457672,
0.10750564932823181,
-0.1480574607849121,
0.09149955958127975,
0.12776316702365875,
-0.12363383173942566,
0.173421710729599,
0.02918568253517151,
0.1121678426861763,
0.34958991408348083,
0.08981756865978241,
-0.02365339919924736,
-0.05440255627036095,
0.29352623224258423,
0.028193362057209015,
0.3895416557788849,
-0.16273890435695648,
-0.514579176902771,
0.3988115191459656,
0.022371452301740646,
0.004537731409072876,
-0.1825622022151947,
-0.010477174073457718,
-0.09885566681623459,
-0.09479867666959763,
0.17726533114910126,
0.4124634861946106,
0.6506641507148743,
0.18250495195388794,
0.3294249475002289,
0.35250410437583923,
0.004094037227332592,
-0.4032333195209503,
0.33919575810432434,
0.32245582342147827,
-0.05941181257367134,
0.3206975758075714,
0.08054130524396896,
0.04430166259407997,
-0.42007339000701904,
-0.3042874038219452,
-0.12822458148002625,
0.12263449281454086,
-0.2660692036151886,
0.3460436463356018,
-0.35384276509284973,
-0.16162313520908356,
-0.28032591938972473,
-0.14296098053455353,
-0.39732611179351807,
-0.2540692985057831,
-0.09536120295524597,
0.5506699681282043,
-0.15118145942687988,
0.03357130289077759,
-0.15833640098571777,
0.17945964634418488,
-0.03374733403325081,
0.1763375848531723,
-0.059115998446941376,
0.04882866516709328,
-0.17231935262680054,
0.008940134197473526,
0.1920558512210846,
-0.2734372913837433,
0.39949244260787964,
0.028533728793263435,
-0.20757612586021423,
-0.13663901388645172,
0.13531243801116943,
0.13227532804012299,
-0.001517999917268753,
0.09100385010242462,
0.2602463364601135,
-0.058879315853118896,
0.07089468836784363,
-0.03314259275794029,
0.0940307155251503,
-0.2121460884809494,
0.06221991032361984,
-0.17702995240688324,
-0.049988459795713425,
0.09883511066436768,
-0.07659764587879181,
-0.07944662123918533,
-0.18720842897891998,
-0.44000089168548584,
0.44415855407714844,
-0.07354703545570374,
0.016076821833848953,
0.24642446637153625,
0.12949003279209137,
0.010052920319139957,
-0.16657716035842896,
-0.09765816479921341,
-0.47813931107521057,
-0.41056421399116516,
-0.1882428228855133,
-0.13789214193820953,
-0.34057506918907166,
0.10500594973564148,
0.06158798933029175,
0.26531705260276794,
0.14761024713516235,
-0.4706604480743408,
-0.03474152088165283,
0.004508640617132187,
-0.07370589673519135,
-0.28002768754959106,
0.234083890914917,
0.22954446077346802,
-0.14701370894908905,
-0.02519756369292736,
0.11584503203630447,
0.12251405417919159,
0.09329625219106674,
0.020703207701444626,
0.27578312158584595,
-0.27130889892578125,
0.6182718873023987,
-0.026612475514411926,
0.4672730565071106,
0.14815953373908997,
0.16409412026405334,
0.2833889126777649,
-0.1822010725736618,
0.39813244342803955,
-0.05950301140546799,
-0.32748550176620483,
0.3077651858329773,
-0.20328539609909058,
-0.32476669549942017,
0.23070742189884186,
-0.12832358479499817,
-0.02667125128209591,
-0.2869434654712677,
-0.38104507327079773,
0.08914124220609665,
-0.4175284802913666,
0.061159417033195496,
0.055552683770656586,
0.01426209881901741,
0.03772847726941109,
0.11727205663919449,
0.09857892990112305,
0.031954921782016754,
-0.20815104246139526,
0.18089434504508972,
0.12954062223434448,
-0.015348604880273342,
-0.12989018857479095,
0.3344195783138275,
-0.6926895976066589,
0.21894018352031708,
0.025015804916620255,
0.2408018708229065,
0.05026497319340706,
-0.08135560154914856,
0.07834187895059586,
-0.030013248324394226,
0.6351328492164612,
0.028709255158901215,
0.04334011673927307,
0.03242025524377823,
-0.2693246006965637,
-0.2877529561519623,
-0.26928672194480896,
-0.15558476746082306,
-0.07545488327741623,
0.2784946858882904,
-0.018171869218349457,
-0.306973934173584,
-0.06683199852705002,
0.18866819143295288,
-0.09537649154663086,
-0.07837063074111938,
-0.16208097338676453,
-0.32067427039146423,
-0.30411770939826965,
-0.2584622800350189,
0.33029329776763916,
-0.03597825765609741,
0.21646623313426971,
-0.27948614954948425,
-0.14190945029258728,
0.17962464690208435,
-0.08691971004009247,
-0.0679062008857727,
0.07059857249259949,
-0.03226146847009659,
-0.005976138170808554,
0.2907267212867737,
0.336487740278244,
0.18137970566749573,
0.21233634650707245,
0.3141957223415375,
0.1340583860874176,
-0.27676570415496826,
0.1356983780860901,
0.09075555205345154,
0.11266584694385529,
0.49453112483024597,
0.007806464098393917,
0.27668723464012146,
0.35576504468917847,
0.5317999124526978,
-0.17573925852775574,
0.20053733885288239,
0.33509817719459534,
-0.04383983090519905,
-0.10440578311681747,
-0.31473979353904724,
0.33849474787712097,
-0.07009705901145935,
0.01361999660730362,
0.4263729155063629,
-0.10954360663890839,
-0.12055079638957977,
-0.07807018607854843,
-0.19122037291526794,
0.723599374294281,
0.33681201934814453,
0.2375870645046234,
0.4321748614311218,
-0.5705261826515198,
0.5510436296463013,
-0.1566959023475647,
0.22245080769062042,
-0.21600911021232605,
-0.17743554711341858,
-0.011989051476120949,
0.04587694630026817,
0.072655089199543,
-0.16682875156402588,
0.07340414822101593,
0.32070910930633545,
-0.057373546063899994,
0.5759663581848145,
-0.18178926408290863,
0.042651429772377014,
-0.4129236340522766,
-0.37282460927963257,
-0.4637294113636017,
0.11076982319355011,
-0.06727070361375809,
0.12396401166915894,
-0.34505265951156616,
-0.08534488081932068,
0.26910561323165894,
-0.06916017830371857,
-0.15036174654960632,
-0.16068372130393982,
-0.37874624133110046,
0.04728945717215538,
0.05752241984009743,
-0.25567078590393066,
-0.1352112889289856,
-0.00819890946149826,
-0.13866811990737915,
-0.251691073179245,
-0.10133004188537598,
0.15722134709358215,
-0.20779749751091003,
0.03098412975668907,
0.11341801285743713,
-0.14448074996471405,
0.08179844915866852,
-0.04186351224780083,
-0.26127102971076965,
-0.086728535592556,
0.1705169677734375,
-0.15879839658737183,
0.018099412322044373,
0.28600502014160156,
-0.2599892020225525,
-0.22960270941257477,
-0.06105479598045349,
0.17367839813232422,
0.22634461522102356,
-0.30186405777931213,
0.062097497284412384,
0.1013532429933548,
-0.2360365092754364,
0.2630328834056854,
-0.32883623242378235,
0.0654645711183548,
-0.3722987473011017,
0.6159465312957764,
-0.30525514483451843,
-0.2935335338115692,
-0.03742764890193939,
0.2727518677711487,
-0.17127679288387299,
-0.12336111813783646,
0.08054717630147934,
-0.00871559139341116,
-0.21375909447669983,
0.22348955273628235,
-0.11979659646749496,
-0.017077140510082245,
-0.11919178813695908,
0.08850622177124023,
0.08469725400209427,
-0.1494065225124359,
0.18960453569889069,
-0.15255990624427795,
-0.47176218032836914,
-0.12514440715312958,
0.021186789497733116,
0.005554206669330597,
0.07537254691123962,
0.19245082139968872,
-0.01133577711880207,
0.10425525158643723,
-0.2662350535392761,
0.1503540724515915,
-0.11939654499292374,
-0.20239748060703278,
0.05265245586633682,
-0.3189418315887451,
0.3825032413005829,
-0.04392343387007713,
0.03850822150707245,
0.3273274898529053,
-0.261715292930603,
-0.14010825753211975,
-0.41283002495765686,
0.1291331946849823,
0.05205714702606201,
-0.25534334778785706,
0.03033312037587166,
-0.031216150149703026,
-0.1947370022535324,
-0.1238795667886734,
0.4727124273777008,
0.35078319907188416,
0.1444861888885498,
-0.4117598533630371,
0.24451015889644623,
0.09629100561141968,
-0.19491098821163177,
0.09428589791059494,
0.08855139464139938,
0.23924463987350464,
0.13165996968746185,
-0.07781609892845154,
-0.04872596263885498,
-0.09114543348550797,
0.025884518399834633,
0.09461694955825806,
0.3166133761405945,
-0.12457611411809921,
0.4178113043308258,
-0.1441560685634613,
-0.2287355363368988,
0.2282899171113968,
0.6028565168380737,
0.4555729627609253,
-0.13383257389068604,
-0.1836947798728943,
-0.021670028567314148,
0.14589674770832062,
-0.18772505223751068,
-0.29844963550567627,
0.3814646303653717,
0.24776476621627808,
0.11073222756385803,
0.32416197657585144,
0.2082139253616333,
-0.3461838662624359,
-0.19805987179279327,
0.18185600638389587,
0.4638683795928955,
-0.08157709985971451,
0.09990805387496948,
0.12916773557662964,
0.057581204921007156,
0.247530996799469,
0.3605564832687378,
0.2566181421279907,
0.4648493230342865,
0.4327031373977661,
-0.14789682626724243,
0.1661868691444397,
0.024920212104916573,
-0.005587819963693619,
0.16978564858436584,
-0.6123135089874268,
-0.2667361795902252,
0.02605564147233963,
-0.5781635642051697,
0.08770281821489334,
-0.21403729915618896,
0.29676517844200134,
-0.42243489623069763,
-0.13163694739341736,
-0.3252568542957306,
0.3045586049556732,
-0.22856968641281128,
-0.11561782658100128,
0.30690357089042664,
-0.09796101599931717,
-0.11815737187862396,
0.36531612277030945,
0.11620362102985382,
-0.07771964371204376,
0.34225940704345703,
-0.0652315765619278,
-0.12134230136871338,
-0.25243398547172546,
-0.40235936641693115,
-0.11058536916971207,
0.1340848058462143,
-0.23288965225219727,
-0.12366537004709244,
0.38383418321609497,
-0.11447924375534058,
-0.07352310419082642,
0.25271502137184143,
0.45478805899620056,
-0.13706453144550323,
0.16407951712608337,
-0.010736440308392048,
0.15976566076278687,
0.3089972138404846,
-0.27118775248527527,
0.11687250435352325,
0.13526177406311035,
0.33198025822639465,
0.12606026232242584,
0.07425845414400101,
-0.21602605283260345,
0.2720341384410858,
0.02245757356286049,
0.011828877031803131,
-0.5405001044273376,
0.40146952867507935,
-0.3661404848098755,
0.032008469104766846,
-0.31531527638435364,
0.18220362067222595,
-0.43100234866142273,
0.4288536012172699,
0.3716661036014557,
-0.016770033165812492,
0.26258498430252075,
-0.2550882399082184,
0.054458729922771454,
0.005996875464916229,
0.5521048307418823,
0.0456913560628891,
-0.192975252866745,
-0.11520878225564957,
-0.20322972536087036,
-0.6631151437759399,
0.20605242252349854,
-0.03312620893120766,
0.21085773408412933,
-0.0869269147515297,
0.20485560595989227,
-0.1342911422252655,
0.2521795630455017,
0.07853086292743683,
0.022121818736195564,
0.0875554010272026,
0.1668347418308258,
-0.07516923546791077,
-0.19845682382583618,
-0.5067961812019348,
-0.20080962777137756,
0.19238170981407166,
0.01865270733833313,
0.526016116142273,
-0.2810210585594177,
0.046275556087493896,
0.06712359189987183,
0.06597289443016052,
-0.11384221911430359,
-0.37495410442352295,
0.24628596007823944,
0.17434373497962952,
-0.06554630398750305,
0.10511869937181473,
-0.18954242765903473,
-0.29476916790008545,
-0.04067634418606758,
-0.26140695810317993,
0.013682875782251358,
-0.08891388773918152,
0.21946553885936737,
-0.04794079810380936,
-0.017490442842245102,
-0.3710753321647644,
0.3321780264377594,
0.36141544580459595,
0.08895280212163925,
-0.2770817279815674,
-0.035588450729846954,
0.08595120161771774,
0.3196238577365875,
0.3016517460346222,
0.6037315130233765,
-0.19015534222126007,
0.2100093960762024,
-0.3688625693321228,
-0.4024438261985779,
0.39791762828826904,
-0.25692424178123474,
-0.2564655840396881,
-0.4706611633300781,
0.4407734274864197,
0.33602026104927063,
-0.10687955468893051,
-0.4412232041358948,
0.14931055903434753,
0.09782710671424866,
-0.24345040321350098,
-0.30403706431388855,
0.24691404402256012,
-0.10060104727745056,
-0.23434366285800934,
0.0852205902338028,
0.017192184925079346,
0.23691749572753906,
-0.15177468955516815,
0.49968668818473816,
-0.15878942608833313
] |
https://github.com/huggingface/datasets/issues/5374 | Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec | No, you passed `streaming=True` so it streams the data from the Hub.
This message just shows that you use the cached version of the `c4` **module**, aka the python script that is run to generate the examples from the raw data files.
Maybe the offline mode should also disable `fsspec`/`aiohttp` HTTP calls in `datasets` and not just the `requests` ones. | ### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
``` | 60 | Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
```
No, you passed `streaming=True` so it streams the data from the Hub.
This message just shows that you use the cached version of the `c4` **module**, aka the python script that is run to generate the examples from the raw data files.
Maybe the offline mode should also disable `fsspec`/`aiohttp` HTTP calls in `datasets` and not just the `requests` ones. | [
-0.551461935043335,
-0.3695976138114929,
-0.000589270144701004,
0.33152151107788086,
0.2842417359352112,
-0.13825403153896332,
0.3256605267524719,
-0.13050927221775055,
0.09035384654998779,
0.31347161531448364,
-0.12639428675174713,
0.1439402848482132,
0.11891317367553711,
0.02422567643225193,
-0.12238907814025879,
-0.2352752983570099,
0.09363433718681335,
-0.13598589599132538,
-0.19825631380081177,
0.1873239129781723,
-0.04668762534856796,
0.17503118515014648,
0.0428142175078392,
-0.3759547472000122,
-0.16804781556129456,
-0.1216944232583046,
-0.09054594486951828,
0.2507997751235962,
0.3597075045108795,
-0.1599222868680954,
-0.04632551223039627,
0.3228100538253784,
-0.06266346573829651,
0.5648378133773804,
-0.00011238538718316704,
-0.12248381972312927,
0.15394505858421326,
0.07045607268810272,
-0.08176794648170471,
-0.12910638749599457,
0.040857329964637756,
-0.19929078221321106,
0.32122257351875305,
0.0938045009970665,
0.11731674522161484,
0.12522555887699127,
-0.09292241930961609,
-0.1695549488067627,
0.4467252492904663,
0.05747916176915169,
0.18395310640335083,
0.6546831130981445,
-0.03553176671266556,
-0.15542271733283997,
-0.14463728666305542,
-0.292932391166687,
0.010638868436217308,
0.452924519777298,
0.3542293608188629,
0.03964737057685852,
-0.22856560349464417,
0.29368793964385986,
-0.03846965357661247,
0.21136139333248138,
0.22143256664276123,
0.0640779659152031,
-0.3520025312900543,
-0.37990742921829224,
0.11567620187997818,
0.3313954174518585,
0.07681354880332947,
-0.12693428993225098,
-0.0994216650724411,
-0.5810725092887878,
-0.08532418310642242,
-0.22026126086711884,
0.13587015867233276,
-0.025650007650256157,
-0.11480945348739624,
-0.034238044172525406,
-0.2379193902015686,
0.035065218806266785,
0.018079422414302826,
-0.007039092481136322,
-0.11332195997238159,
0.031051259487867355,
-0.12893757224082947,
0.1666335165500641,
0.323163241147995,
0.16885338723659515,
-0.07674530893564224,
-0.03576800227165222,
0.005833052098751068,
-0.23869013786315918,
-0.3206639289855957,
0.1852324903011322,
0.15010826289653778,
0.04191502183675766,
0.16950806975364685,
0.2863319516181946,
0.12235728651285172,
-0.05820793658494949,
0.022679518908262253,
0.05900869518518448,
0.4800371527671814,
-0.12682940065860748,
-0.42206576466560364,
-0.25577935576438904,
0.26634007692337036,
0.44380250573158264,
-0.10377335548400879,
-0.1059344932436943,
0.392086386680603,
-0.21163202822208405,
-0.008660564199090004,
-0.3583309054374695,
0.1157570481300354,
0.10800181329250336,
-0.1622270941734314,
0.33321669697761536,
-0.16179443895816803,
0.1222643107175827,
0.1275155395269394,
0.1616559624671936,
-0.1456538438796997,
0.37786272168159485,
-0.18270419538021088,
-0.003212299197912216,
-0.12149345129728317,
-0.16084590554237366,
-0.3575092852115631,
-0.34151777625083923,
-0.11469303071498871,
-0.07883229106664658,
-0.04335630312561989,
-0.4878535270690918,
0.24507802724838257,
0.36243024468421936,
0.3262866139411926,
-0.1625037044286728,
-0.2854745090007782,
-0.22699567675590515,
-0.19123372435569763,
0.24908378720283508,
0.24452582001686096,
0.15589721500873566,
0.050078436732292175,
0.14459943771362305,
0.0047796666622161865,
-0.3120185434818268,
0.10627592355012894,
-0.26618656516075134,
0.022364946082234383,
0.16698341071605682,
-0.109713114798069,
0.0837022066116333,
-0.13678815960884094,
0.07324883341789246,
0.01466110348701477,
-0.10011258721351624,
0.1874590367078781,
-0.17005284130573273,
-0.3155588209629059,
-0.05205445736646652,
0.05793832242488861,
0.6462308168411255,
0.11452355980873108,
-0.25467973947525024,
0.17071552574634552,
-0.2032572329044342,
0.16716498136520386,
0.3448837399482727,
-0.14157120883464813,
-0.040144287049770355,
-0.19442148506641388,
0.013958238065242767,
0.07771535217761993,
-0.39629316329956055,
-0.5315855741500854,
0.5396789312362671,
-0.3183818459510803,
0.30886363983154297,
0.21673566102981567,
-0.14440931379795074,
0.3577735424041748,
0.051713258028030396,
0.26289671659469604,
0.14791907370090485,
-0.24385583400726318,
0.08449960500001907,
-0.15993037819862366,
-0.3349321782588959,
-0.1387721449136734,
0.22678549587726593,
0.12637504935264587,
0.022317565977573395,
0.24105432629585266,
-0.2721847891807556,
0.4928232431411743,
0.11356419324874878,
0.08490952104330063,
0.19079487025737762,
0.06310156732797623,
0.29270097613334656,
-0.176813542842865,
-0.15959998965263367,
-0.22964665293693542,
0.19388318061828613,
0.43465137481689453,
0.0063979290425777435,
0.11632824689149857,
-0.12304282933473587,
0.008241115137934685,
-0.19095918536186218,
-0.1770535558462143,
-0.06706368923187256,
0.03712619096040726,
0.1775306761264801,
-0.005899446085095406,
0.20814333856105804,
-0.14124684035778046,
0.6346786618232727,
-0.1136990636587143,
0.2460184246301651,
-0.43111568689346313,
0.054832398891448975,
0.055122457444667816,
-0.22794640064239502,
0.054670847952365875,
0.1344209611415863,
0.16517014801502228,
-0.06460891664028168,
-0.01648877188563347,
0.37536466121673584,
-0.040461938828229904,
0.3720625638961792,
-0.17855897545814514,
-0.014900162816047668,
0.39038020372390747,
0.2751885652542114,
-0.14860117435455322,
0.17280234396457672,
0.10750564932823181,
-0.1480574607849121,
0.09149955958127975,
0.12776316702365875,
-0.12363383173942566,
0.173421710729599,
0.02918568253517151,
0.1121678426861763,
0.34958991408348083,
0.08981756865978241,
-0.02365339919924736,
-0.05440255627036095,
0.29352623224258423,
0.028193362057209015,
0.3895416557788849,
-0.16273890435695648,
-0.514579176902771,
0.3988115191459656,
0.022371452301740646,
0.004537731409072876,
-0.1825622022151947,
-0.010477174073457718,
-0.09885566681623459,
-0.09479867666959763,
0.17726533114910126,
0.4124634861946106,
0.6506641507148743,
0.18250495195388794,
0.3294249475002289,
0.35250410437583923,
0.004094037227332592,
-0.4032333195209503,
0.33919575810432434,
0.32245582342147827,
-0.05941181257367134,
0.3206975758075714,
0.08054130524396896,
0.04430166259407997,
-0.42007339000701904,
-0.3042874038219452,
-0.12822458148002625,
0.12263449281454086,
-0.2660692036151886,
0.3460436463356018,
-0.35384276509284973,
-0.16162313520908356,
-0.28032591938972473,
-0.14296098053455353,
-0.39732611179351807,
-0.2540692985057831,
-0.09536120295524597,
0.5506699681282043,
-0.15118145942687988,
0.03357130289077759,
-0.15833640098571777,
0.17945964634418488,
-0.03374733403325081,
0.1763375848531723,
-0.059115998446941376,
0.04882866516709328,
-0.17231935262680054,
0.008940134197473526,
0.1920558512210846,
-0.2734372913837433,
0.39949244260787964,
0.028533728793263435,
-0.20757612586021423,
-0.13663901388645172,
0.13531243801116943,
0.13227532804012299,
-0.001517999917268753,
0.09100385010242462,
0.2602463364601135,
-0.058879315853118896,
0.07089468836784363,
-0.03314259275794029,
0.0940307155251503,
-0.2121460884809494,
0.06221991032361984,
-0.17702995240688324,
-0.049988459795713425,
0.09883511066436768,
-0.07659764587879181,
-0.07944662123918533,
-0.18720842897891998,
-0.44000089168548584,
0.44415855407714844,
-0.07354703545570374,
0.016076821833848953,
0.24642446637153625,
0.12949003279209137,
0.010052920319139957,
-0.16657716035842896,
-0.09765816479921341,
-0.47813931107521057,
-0.41056421399116516,
-0.1882428228855133,
-0.13789214193820953,
-0.34057506918907166,
0.10500594973564148,
0.06158798933029175,
0.26531705260276794,
0.14761024713516235,
-0.4706604480743408,
-0.03474152088165283,
0.004508640617132187,
-0.07370589673519135,
-0.28002768754959106,
0.234083890914917,
0.22954446077346802,
-0.14701370894908905,
-0.02519756369292736,
0.11584503203630447,
0.12251405417919159,
0.09329625219106674,
0.020703207701444626,
0.27578312158584595,
-0.27130889892578125,
0.6182718873023987,
-0.026612475514411926,
0.4672730565071106,
0.14815953373908997,
0.16409412026405334,
0.2833889126777649,
-0.1822010725736618,
0.39813244342803955,
-0.05950301140546799,
-0.32748550176620483,
0.3077651858329773,
-0.20328539609909058,
-0.32476669549942017,
0.23070742189884186,
-0.12832358479499817,
-0.02667125128209591,
-0.2869434654712677,
-0.38104507327079773,
0.08914124220609665,
-0.4175284802913666,
0.061159417033195496,
0.055552683770656586,
0.01426209881901741,
0.03772847726941109,
0.11727205663919449,
0.09857892990112305,
0.031954921782016754,
-0.20815104246139526,
0.18089434504508972,
0.12954062223434448,
-0.015348604880273342,
-0.12989018857479095,
0.3344195783138275,
-0.6926895976066589,
0.21894018352031708,
0.025015804916620255,
0.2408018708229065,
0.05026497319340706,
-0.08135560154914856,
0.07834187895059586,
-0.030013248324394226,
0.6351328492164612,
0.028709255158901215,
0.04334011673927307,
0.03242025524377823,
-0.2693246006965637,
-0.2877529561519623,
-0.26928672194480896,
-0.15558476746082306,
-0.07545488327741623,
0.2784946858882904,
-0.018171869218349457,
-0.306973934173584,
-0.06683199852705002,
0.18866819143295288,
-0.09537649154663086,
-0.07837063074111938,
-0.16208097338676453,
-0.32067427039146423,
-0.30411770939826965,
-0.2584622800350189,
0.33029329776763916,
-0.03597825765609741,
0.21646623313426971,
-0.27948614954948425,
-0.14190945029258728,
0.17962464690208435,
-0.08691971004009247,
-0.0679062008857727,
0.07059857249259949,
-0.03226146847009659,
-0.005976138170808554,
0.2907267212867737,
0.336487740278244,
0.18137970566749573,
0.21233634650707245,
0.3141957223415375,
0.1340583860874176,
-0.27676570415496826,
0.1356983780860901,
0.09075555205345154,
0.11266584694385529,
0.49453112483024597,
0.007806464098393917,
0.27668723464012146,
0.35576504468917847,
0.5317999124526978,
-0.17573925852775574,
0.20053733885288239,
0.33509817719459534,
-0.04383983090519905,
-0.10440578311681747,
-0.31473979353904724,
0.33849474787712097,
-0.07009705901145935,
0.01361999660730362,
0.4263729155063629,
-0.10954360663890839,
-0.12055079638957977,
-0.07807018607854843,
-0.19122037291526794,
0.723599374294281,
0.33681201934814453,
0.2375870645046234,
0.4321748614311218,
-0.5705261826515198,
0.5510436296463013,
-0.1566959023475647,
0.22245080769062042,
-0.21600911021232605,
-0.17743554711341858,
-0.011989051476120949,
0.04587694630026817,
0.072655089199543,
-0.16682875156402588,
0.07340414822101593,
0.32070910930633545,
-0.057373546063899994,
0.5759663581848145,
-0.18178926408290863,
0.042651429772377014,
-0.4129236340522766,
-0.37282460927963257,
-0.4637294113636017,
0.11076982319355011,
-0.06727070361375809,
0.12396401166915894,
-0.34505265951156616,
-0.08534488081932068,
0.26910561323165894,
-0.06916017830371857,
-0.15036174654960632,
-0.16068372130393982,
-0.37874624133110046,
0.04728945717215538,
0.05752241984009743,
-0.25567078590393066,
-0.1352112889289856,
-0.00819890946149826,
-0.13866811990737915,
-0.251691073179245,
-0.10133004188537598,
0.15722134709358215,
-0.20779749751091003,
0.03098412975668907,
0.11341801285743713,
-0.14448074996471405,
0.08179844915866852,
-0.04186351224780083,
-0.26127102971076965,
-0.086728535592556,
0.1705169677734375,
-0.15879839658737183,
0.018099412322044373,
0.28600502014160156,
-0.2599892020225525,
-0.22960270941257477,
-0.06105479598045349,
0.17367839813232422,
0.22634461522102356,
-0.30186405777931213,
0.062097497284412384,
0.1013532429933548,
-0.2360365092754364,
0.2630328834056854,
-0.32883623242378235,
0.0654645711183548,
-0.3722987473011017,
0.6159465312957764,
-0.30525514483451843,
-0.2935335338115692,
-0.03742764890193939,
0.2727518677711487,
-0.17127679288387299,
-0.12336111813783646,
0.08054717630147934,
-0.00871559139341116,
-0.21375909447669983,
0.22348955273628235,
-0.11979659646749496,
-0.017077140510082245,
-0.11919178813695908,
0.08850622177124023,
0.08469725400209427,
-0.1494065225124359,
0.18960453569889069,
-0.15255990624427795,
-0.47176218032836914,
-0.12514440715312958,
0.021186789497733116,
0.005554206669330597,
0.07537254691123962,
0.19245082139968872,
-0.01133577711880207,
0.10425525158643723,
-0.2662350535392761,
0.1503540724515915,
-0.11939654499292374,
-0.20239748060703278,
0.05265245586633682,
-0.3189418315887451,
0.3825032413005829,
-0.04392343387007713,
0.03850822150707245,
0.3273274898529053,
-0.261715292930603,
-0.14010825753211975,
-0.41283002495765686,
0.1291331946849823,
0.05205714702606201,
-0.25534334778785706,
0.03033312037587166,
-0.031216150149703026,
-0.1947370022535324,
-0.1238795667886734,
0.4727124273777008,
0.35078319907188416,
0.1444861888885498,
-0.4117598533630371,
0.24451015889644623,
0.09629100561141968,
-0.19491098821163177,
0.09428589791059494,
0.08855139464139938,
0.23924463987350464,
0.13165996968746185,
-0.07781609892845154,
-0.04872596263885498,
-0.09114543348550797,
0.025884518399834633,
0.09461694955825806,
0.3166133761405945,
-0.12457611411809921,
0.4178113043308258,
-0.1441560685634613,
-0.2287355363368988,
0.2282899171113968,
0.6028565168380737,
0.4555729627609253,
-0.13383257389068604,
-0.1836947798728943,
-0.021670028567314148,
0.14589674770832062,
-0.18772505223751068,
-0.29844963550567627,
0.3814646303653717,
0.24776476621627808,
0.11073222756385803,
0.32416197657585144,
0.2082139253616333,
-0.3461838662624359,
-0.19805987179279327,
0.18185600638389587,
0.4638683795928955,
-0.08157709985971451,
0.09990805387496948,
0.12916773557662964,
0.057581204921007156,
0.247530996799469,
0.3605564832687378,
0.2566181421279907,
0.4648493230342865,
0.4327031373977661,
-0.14789682626724243,
0.1661868691444397,
0.024920212104916573,
-0.005587819963693619,
0.16978564858436584,
-0.6123135089874268,
-0.2667361795902252,
0.02605564147233963,
-0.5781635642051697,
0.08770281821489334,
-0.21403729915618896,
0.29676517844200134,
-0.42243489623069763,
-0.13163694739341736,
-0.3252568542957306,
0.3045586049556732,
-0.22856968641281128,
-0.11561782658100128,
0.30690357089042664,
-0.09796101599931717,
-0.11815737187862396,
0.36531612277030945,
0.11620362102985382,
-0.07771964371204376,
0.34225940704345703,
-0.0652315765619278,
-0.12134230136871338,
-0.25243398547172546,
-0.40235936641693115,
-0.11058536916971207,
0.1340848058462143,
-0.23288965225219727,
-0.12366537004709244,
0.38383418321609497,
-0.11447924375534058,
-0.07352310419082642,
0.25271502137184143,
0.45478805899620056,
-0.13706453144550323,
0.16407951712608337,
-0.010736440308392048,
0.15976566076278687,
0.3089972138404846,
-0.27118775248527527,
0.11687250435352325,
0.13526177406311035,
0.33198025822639465,
0.12606026232242584,
0.07425845414400101,
-0.21602605283260345,
0.2720341384410858,
0.02245757356286049,
0.011828877031803131,
-0.5405001044273376,
0.40146952867507935,
-0.3661404848098755,
0.032008469104766846,
-0.31531527638435364,
0.18220362067222595,
-0.43100234866142273,
0.4288536012172699,
0.3716661036014557,
-0.016770033165812492,
0.26258498430252075,
-0.2550882399082184,
0.054458729922771454,
0.005996875464916229,
0.5521048307418823,
0.0456913560628891,
-0.192975252866745,
-0.11520878225564957,
-0.20322972536087036,
-0.6631151437759399,
0.20605242252349854,
-0.03312620893120766,
0.21085773408412933,
-0.0869269147515297,
0.20485560595989227,
-0.1342911422252655,
0.2521795630455017,
0.07853086292743683,
0.022121818736195564,
0.0875554010272026,
0.1668347418308258,
-0.07516923546791077,
-0.19845682382583618,
-0.5067961812019348,
-0.20080962777137756,
0.19238170981407166,
0.01865270733833313,
0.526016116142273,
-0.2810210585594177,
0.046275556087493896,
0.06712359189987183,
0.06597289443016052,
-0.11384221911430359,
-0.37495410442352295,
0.24628596007823944,
0.17434373497962952,
-0.06554630398750305,
0.10511869937181473,
-0.18954242765903473,
-0.29476916790008545,
-0.04067634418606758,
-0.26140695810317993,
0.013682875782251358,
-0.08891388773918152,
0.21946553885936737,
-0.04794079810380936,
-0.017490442842245102,
-0.3710753321647644,
0.3321780264377594,
0.36141544580459595,
0.08895280212163925,
-0.2770817279815674,
-0.035588450729846954,
0.08595120161771774,
0.3196238577365875,
0.3016517460346222,
0.6037315130233765,
-0.19015534222126007,
0.2100093960762024,
-0.3688625693321228,
-0.4024438261985779,
0.39791762828826904,
-0.25692424178123474,
-0.2564655840396881,
-0.4706611633300781,
0.4407734274864197,
0.33602026104927063,
-0.10687955468893051,
-0.4412232041358948,
0.14931055903434753,
0.09782710671424866,
-0.24345040321350098,
-0.30403706431388855,
0.24691404402256012,
-0.10060104727745056,
-0.23434366285800934,
0.0852205902338028,
0.017192184925079346,
0.23691749572753906,
-0.15177468955516815,
0.49968668818473816,
-0.15878942608833313
] |
https://github.com/huggingface/datasets/issues/5374 | Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec | > This message just shows that you use the cached version of the c4 module
Ah my bad you're right about the module, but it's also using the downloaded & cached c4 dataset. There's no internet during the runs so it wouldn't work otherwise | ### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
``` | 44 | Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
### Describe the bug
`streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐
The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200.
Possibly related:
- https://github.com/huggingface/datasets/pull/3100
- https://github.com/huggingface/datasets/pull/3050
### Steps to reproduce the bug
Running
```python
c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start)
df = pd.DataFrame(c4, index=None)
```
with different start & end arguments on 200 CPUs in parallel yields:
```
WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4.
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20]
WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20]
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │
│ _c4.py:68 in <module> │
│ │
│ 65 │ model.eval() │
│ 66 │ │
│ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │
│ ❱ 68 │ df = pd.DataFrame(c4, index=None) │
│ 69 │ texts = df["text"].to_list() │
│ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │
│ y:684 in __init__ │
│ │
│ 681 │ │ # For data is list-like, or Iterable (will consume into list │
│ 682 │ │ elif is_list_like(data): │
│ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │
│ ❱ 684 │ │ │ │ data = list(data) │
│ 685 │ │ │ if len(data) > 0: │
│ 686 │ │ │ │ if is_dataclass(data[0]): │
│ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │
│ │
│ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │
│ 749 │ │
│ 750 │ def __iter__(self): │
│ ❱ 751 │ │ for key, example in self._iter(): │
│ 752 │ │ │ if self.features: │
│ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │
│ 754 │ │ │ │ # This is done with `_apply_feature_types`. │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │
│ │
│ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │
│ 739 │ │ else: │
│ 740 │ │ │ ex_iterable = self._ex_iterable │
│ ❱ 741 │ │ yield from ex_iterable │
│ 742 │ │
│ 743 │ def _iter_shard(self, shard_idx: int): │
│ 744 │ │ if self._shuffling: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │
│ │
│ 614 │ │ self.n = n │
│ 615 │ │
│ 616 │ def __iter__(self): │
│ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │
│ 618 │ │
│ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │
│ │
│ 591 │ │
│ 592 │ def __iter__(self): │
│ 593 │ │ #ex_iterator = iter(self.ex_iterable) │
│ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │
│ 595 │ │ #for _ in range(self.n): │
│ 596 │ │ # next(ex_iterator) │
│ 597 │ │ #yield from islice(ex_iterator, self.n, None) │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │
│ │
│ 103 │ │ self.kwargs = kwargs │
│ 104 │ │
│ 105 │ def __iter__(self): │
│ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │
│ 107 │ │
│ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │
│ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │
│ │
│ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │
│ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │
│ _generate_examples │
│ │
│ 86 │ │ for filepath in filepaths: │
│ 87 │ │ │ logger.info("generating examples from = %s", filepath) │
│ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │
│ ❱ 89 │ │ │ │ for line in f: │
│ 90 │ │ │ │ │ if line: │
│ 91 │ │ │ │ │ │ example = json.loads(line) │
│ 92 │ │ │ │ │ │ yield id_, example │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │
│ │
│ 310 │ │ │
│ 311 │ │ if size < 0: │
│ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │
│ ❱ 313 │ │ return self._buffer.read1(size) │
│ 314 │ │
│ 315 │ def peek(self, n): │
│ 316 │ │ self._check_not_closed() │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │
│ │
│ 65 │ │
│ 66 │ def readinto(self, b): │
│ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │
│ ❱ 68 │ │ │ data = self.read(len(byte_view)) │
│ 69 │ │ │ byte_view[:len(data)] = data │
│ 70 │ │ return len(data) │
│ 71 │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │
│ │
│ 490 │ │ │ │ self._new_member = False │
│ 491 │ │ │ │
│ 492 │ │ │ # Read a chunk of data from the file │
│ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │
│ 494 │ │ │ │
│ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │
│ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │
│ │
│ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │
│ │
│ 93 │ │ │ read = self._read │
│ 94 │ │ │ self._read = None │
│ 95 │ │ │ return self._buffer[read:] + \ │
│ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │
│ 97 │ │
│ 98 │ def prepend(self, prepend=b''): │
│ 99 │ │ if self._read is None: │
│ │
│ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │
│ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │
│ 365 in read_with_retries │
│ │
│ 362 │ │ │ │ ) │
│ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │
│ 364 │ │ else: │
│ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │
│ 366 │ │ return out │
│ 367 │ │
│ 368 │ file_obj.read = read_with_retries │
╰──────────────────────────────────────────────────────────────────────────────╯
ConnectionError: Server Disconnected
```
### Expected behavior
There should be no disconnect I think.
### Environment info
```
datasets=2.7.0
Python 3.9.12
```
> This message just shows that you use the cached version of the c4 module
Ah my bad you're right about the module, but it's also using the downloaded & cached c4 dataset. There's no internet during the runs so it wouldn't work otherwise | [
-0.551461935043335,
-0.3695976138114929,
-0.000589270144701004,
0.33152151107788086,
0.2842417359352112,
-0.13825403153896332,
0.3256605267524719,
-0.13050927221775055,
0.09035384654998779,
0.31347161531448364,
-0.12639428675174713,
0.1439402848482132,
0.11891317367553711,
0.02422567643225193,
-0.12238907814025879,
-0.2352752983570099,
0.09363433718681335,
-0.13598589599132538,
-0.19825631380081177,
0.1873239129781723,
-0.04668762534856796,
0.17503118515014648,
0.0428142175078392,
-0.3759547472000122,
-0.16804781556129456,
-0.1216944232583046,
-0.09054594486951828,
0.2507997751235962,
0.3597075045108795,
-0.1599222868680954,
-0.04632551223039627,
0.3228100538253784,
-0.06266346573829651,
0.5648378133773804,
-0.00011238538718316704,
-0.12248381972312927,
0.15394505858421326,
0.07045607268810272,
-0.08176794648170471,
-0.12910638749599457,
0.040857329964637756,
-0.19929078221321106,
0.32122257351875305,
0.0938045009970665,
0.11731674522161484,
0.12522555887699127,
-0.09292241930961609,
-0.1695549488067627,
0.4467252492904663,
0.05747916176915169,
0.18395310640335083,
0.6546831130981445,
-0.03553176671266556,
-0.15542271733283997,
-0.14463728666305542,
-0.292932391166687,
0.010638868436217308,
0.452924519777298,
0.3542293608188629,
0.03964737057685852,
-0.22856560349464417,
0.29368793964385986,
-0.03846965357661247,
0.21136139333248138,
0.22143256664276123,
0.0640779659152031,
-0.3520025312900543,
-0.37990742921829224,
0.11567620187997818,
0.3313954174518585,
0.07681354880332947,
-0.12693428993225098,
-0.0994216650724411,
-0.5810725092887878,
-0.08532418310642242,
-0.22026126086711884,
0.13587015867233276,
-0.025650007650256157,
-0.11480945348739624,
-0.034238044172525406,
-0.2379193902015686,
0.035065218806266785,
0.018079422414302826,
-0.007039092481136322,
-0.11332195997238159,
0.031051259487867355,
-0.12893757224082947,
0.1666335165500641,
0.323163241147995,
0.16885338723659515,
-0.07674530893564224,
-0.03576800227165222,
0.005833052098751068,
-0.23869013786315918,
-0.3206639289855957,
0.1852324903011322,
0.15010826289653778,
0.04191502183675766,
0.16950806975364685,
0.2863319516181946,
0.12235728651285172,
-0.05820793658494949,
0.022679518908262253,
0.05900869518518448,
0.4800371527671814,
-0.12682940065860748,
-0.42206576466560364,
-0.25577935576438904,
0.26634007692337036,
0.44380250573158264,
-0.10377335548400879,
-0.1059344932436943,
0.392086386680603,
-0.21163202822208405,
-0.008660564199090004,
-0.3583309054374695,
0.1157570481300354,
0.10800181329250336,
-0.1622270941734314,
0.33321669697761536,
-0.16179443895816803,
0.1222643107175827,
0.1275155395269394,
0.1616559624671936,
-0.1456538438796997,
0.37786272168159485,
-0.18270419538021088,
-0.003212299197912216,
-0.12149345129728317,
-0.16084590554237366,
-0.3575092852115631,
-0.34151777625083923,
-0.11469303071498871,
-0.07883229106664658,
-0.04335630312561989,
-0.4878535270690918,
0.24507802724838257,
0.36243024468421936,
0.3262866139411926,
-0.1625037044286728,
-0.2854745090007782,
-0.22699567675590515,
-0.19123372435569763,
0.24908378720283508,
0.24452582001686096,
0.15589721500873566,
0.050078436732292175,
0.14459943771362305,
0.0047796666622161865,
-0.3120185434818268,
0.10627592355012894,
-0.26618656516075134,
0.022364946082234383,
0.16698341071605682,
-0.109713114798069,
0.0837022066116333,
-0.13678815960884094,
0.07324883341789246,
0.01466110348701477,
-0.10011258721351624,
0.1874590367078781,
-0.17005284130573273,
-0.3155588209629059,
-0.05205445736646652,
0.05793832242488861,
0.6462308168411255,
0.11452355980873108,
-0.25467973947525024,
0.17071552574634552,
-0.2032572329044342,
0.16716498136520386,
0.3448837399482727,
-0.14157120883464813,
-0.040144287049770355,
-0.19442148506641388,
0.013958238065242767,
0.07771535217761993,
-0.39629316329956055,
-0.5315855741500854,
0.5396789312362671,
-0.3183818459510803,
0.30886363983154297,
0.21673566102981567,
-0.14440931379795074,
0.3577735424041748,
0.051713258028030396,
0.26289671659469604,
0.14791907370090485,
-0.24385583400726318,
0.08449960500001907,
-0.15993037819862366,
-0.3349321782588959,
-0.1387721449136734,
0.22678549587726593,
0.12637504935264587,
0.022317565977573395,
0.24105432629585266,
-0.2721847891807556,
0.4928232431411743,
0.11356419324874878,
0.08490952104330063,
0.19079487025737762,
0.06310156732797623,
0.29270097613334656,
-0.176813542842865,
-0.15959998965263367,
-0.22964665293693542,
0.19388318061828613,
0.43465137481689453,
0.0063979290425777435,
0.11632824689149857,
-0.12304282933473587,
0.008241115137934685,
-0.19095918536186218,
-0.1770535558462143,
-0.06706368923187256,
0.03712619096040726,
0.1775306761264801,
-0.005899446085095406,
0.20814333856105804,
-0.14124684035778046,
0.6346786618232727,
-0.1136990636587143,
0.2460184246301651,
-0.43111568689346313,
0.054832398891448975,
0.055122457444667816,
-0.22794640064239502,
0.054670847952365875,
0.1344209611415863,
0.16517014801502228,
-0.06460891664028168,
-0.01648877188563347,
0.37536466121673584,
-0.040461938828229904,
0.3720625638961792,
-0.17855897545814514,
-0.014900162816047668,
0.39038020372390747,
0.2751885652542114,
-0.14860117435455322,
0.17280234396457672,
0.10750564932823181,
-0.1480574607849121,
0.09149955958127975,
0.12776316702365875,
-0.12363383173942566,
0.173421710729599,
0.02918568253517151,
0.1121678426861763,
0.34958991408348083,
0.08981756865978241,
-0.02365339919924736,
-0.05440255627036095,
0.29352623224258423,
0.028193362057209015,
0.3895416557788849,
-0.16273890435695648,
-0.514579176902771,
0.3988115191459656,
0.022371452301740646,
0.004537731409072876,
-0.1825622022151947,
-0.010477174073457718,
-0.09885566681623459,
-0.09479867666959763,
0.17726533114910126,
0.4124634861946106,
0.6506641507148743,
0.18250495195388794,
0.3294249475002289,
0.35250410437583923,
0.004094037227332592,
-0.4032333195209503,
0.33919575810432434,
0.32245582342147827,
-0.05941181257367134,
0.3206975758075714,
0.08054130524396896,
0.04430166259407997,
-0.42007339000701904,
-0.3042874038219452,
-0.12822458148002625,
0.12263449281454086,
-0.2660692036151886,
0.3460436463356018,
-0.35384276509284973,
-0.16162313520908356,
-0.28032591938972473,
-0.14296098053455353,
-0.39732611179351807,
-0.2540692985057831,
-0.09536120295524597,
0.5506699681282043,
-0.15118145942687988,
0.03357130289077759,
-0.15833640098571777,
0.17945964634418488,
-0.03374733403325081,
0.1763375848531723,
-0.059115998446941376,
0.04882866516709328,
-0.17231935262680054,
0.008940134197473526,
0.1920558512210846,
-0.2734372913837433,
0.39949244260787964,
0.028533728793263435,
-0.20757612586021423,
-0.13663901388645172,
0.13531243801116943,
0.13227532804012299,
-0.001517999917268753,
0.09100385010242462,
0.2602463364601135,
-0.058879315853118896,
0.07089468836784363,
-0.03314259275794029,
0.0940307155251503,
-0.2121460884809494,
0.06221991032361984,
-0.17702995240688324,
-0.049988459795713425,
0.09883511066436768,
-0.07659764587879181,
-0.07944662123918533,
-0.18720842897891998,
-0.44000089168548584,
0.44415855407714844,
-0.07354703545570374,
0.016076821833848953,
0.24642446637153625,
0.12949003279209137,
0.010052920319139957,
-0.16657716035842896,
-0.09765816479921341,
-0.47813931107521057,
-0.41056421399116516,
-0.1882428228855133,
-0.13789214193820953,
-0.34057506918907166,
0.10500594973564148,
0.06158798933029175,
0.26531705260276794,
0.14761024713516235,
-0.4706604480743408,
-0.03474152088165283,
0.004508640617132187,
-0.07370589673519135,
-0.28002768754959106,
0.234083890914917,
0.22954446077346802,
-0.14701370894908905,
-0.02519756369292736,
0.11584503203630447,
0.12251405417919159,
0.09329625219106674,
0.020703207701444626,
0.27578312158584595,
-0.27130889892578125,
0.6182718873023987,
-0.026612475514411926,
0.4672730565071106,
0.14815953373908997,
0.16409412026405334,
0.2833889126777649,
-0.1822010725736618,
0.39813244342803955,
-0.05950301140546799,
-0.32748550176620483,
0.3077651858329773,
-0.20328539609909058,
-0.32476669549942017,
0.23070742189884186,
-0.12832358479499817,
-0.02667125128209591,
-0.2869434654712677,
-0.38104507327079773,
0.08914124220609665,
-0.4175284802913666,
0.061159417033195496,
0.055552683770656586,
0.01426209881901741,
0.03772847726941109,
0.11727205663919449,
0.09857892990112305,
0.031954921782016754,
-0.20815104246139526,
0.18089434504508972,
0.12954062223434448,
-0.015348604880273342,
-0.12989018857479095,
0.3344195783138275,
-0.6926895976066589,
0.21894018352031708,
0.025015804916620255,
0.2408018708229065,
0.05026497319340706,
-0.08135560154914856,
0.07834187895059586,
-0.030013248324394226,
0.6351328492164612,
0.028709255158901215,
0.04334011673927307,
0.03242025524377823,
-0.2693246006965637,
-0.2877529561519623,
-0.26928672194480896,
-0.15558476746082306,
-0.07545488327741623,
0.2784946858882904,
-0.018171869218349457,
-0.306973934173584,
-0.06683199852705002,
0.18866819143295288,
-0.09537649154663086,
-0.07837063074111938,
-0.16208097338676453,
-0.32067427039146423,
-0.30411770939826965,
-0.2584622800350189,
0.33029329776763916,
-0.03597825765609741,
0.21646623313426971,
-0.27948614954948425,
-0.14190945029258728,
0.17962464690208435,
-0.08691971004009247,
-0.0679062008857727,
0.07059857249259949,
-0.03226146847009659,
-0.005976138170808554,
0.2907267212867737,
0.336487740278244,
0.18137970566749573,
0.21233634650707245,
0.3141957223415375,
0.1340583860874176,
-0.27676570415496826,
0.1356983780860901,
0.09075555205345154,
0.11266584694385529,
0.49453112483024597,
0.007806464098393917,
0.27668723464012146,
0.35576504468917847,
0.5317999124526978,
-0.17573925852775574,
0.20053733885288239,
0.33509817719459534,
-0.04383983090519905,
-0.10440578311681747,
-0.31473979353904724,
0.33849474787712097,
-0.07009705901145935,
0.01361999660730362,
0.4263729155063629,
-0.10954360663890839,
-0.12055079638957977,
-0.07807018607854843,
-0.19122037291526794,
0.723599374294281,
0.33681201934814453,
0.2375870645046234,
0.4321748614311218,
-0.5705261826515198,
0.5510436296463013,
-0.1566959023475647,
0.22245080769062042,
-0.21600911021232605,
-0.17743554711341858,
-0.011989051476120949,
0.04587694630026817,
0.072655089199543,
-0.16682875156402588,
0.07340414822101593,
0.32070910930633545,
-0.057373546063899994,
0.5759663581848145,
-0.18178926408290863,
0.042651429772377014,
-0.4129236340522766,
-0.37282460927963257,
-0.4637294113636017,
0.11076982319355011,
-0.06727070361375809,
0.12396401166915894,
-0.34505265951156616,
-0.08534488081932068,
0.26910561323165894,
-0.06916017830371857,
-0.15036174654960632,
-0.16068372130393982,
-0.37874624133110046,
0.04728945717215538,
0.05752241984009743,
-0.25567078590393066,
-0.1352112889289856,
-0.00819890946149826,
-0.13866811990737915,
-0.251691073179245,
-0.10133004188537598,
0.15722134709358215,
-0.20779749751091003,
0.03098412975668907,
0.11341801285743713,
-0.14448074996471405,
0.08179844915866852,
-0.04186351224780083,
-0.26127102971076965,
-0.086728535592556,
0.1705169677734375,
-0.15879839658737183,
0.018099412322044373,
0.28600502014160156,
-0.2599892020225525,
-0.22960270941257477,
-0.06105479598045349,
0.17367839813232422,
0.22634461522102356,
-0.30186405777931213,
0.062097497284412384,
0.1013532429933548,
-0.2360365092754364,
0.2630328834056854,
-0.32883623242378235,
0.0654645711183548,
-0.3722987473011017,
0.6159465312957764,
-0.30525514483451843,
-0.2935335338115692,
-0.03742764890193939,
0.2727518677711487,
-0.17127679288387299,
-0.12336111813783646,
0.08054717630147934,
-0.00871559139341116,
-0.21375909447669983,
0.22348955273628235,
-0.11979659646749496,
-0.017077140510082245,
-0.11919178813695908,
0.08850622177124023,
0.08469725400209427,
-0.1494065225124359,
0.18960453569889069,
-0.15255990624427795,
-0.47176218032836914,
-0.12514440715312958,
0.021186789497733116,
0.005554206669330597,
0.07537254691123962,
0.19245082139968872,
-0.01133577711880207,
0.10425525158643723,
-0.2662350535392761,
0.1503540724515915,
-0.11939654499292374,
-0.20239748060703278,
0.05265245586633682,
-0.3189418315887451,
0.3825032413005829,
-0.04392343387007713,
0.03850822150707245,
0.3273274898529053,
-0.261715292930603,
-0.14010825753211975,
-0.41283002495765686,
0.1291331946849823,
0.05205714702606201,
-0.25534334778785706,
0.03033312037587166,
-0.031216150149703026,
-0.1947370022535324,
-0.1238795667886734,
0.4727124273777008,
0.35078319907188416,
0.1444861888885498,
-0.4117598533630371,
0.24451015889644623,
0.09629100561141968,
-0.19491098821163177,
0.09428589791059494,
0.08855139464139938,
0.23924463987350464,
0.13165996968746185,
-0.07781609892845154,
-0.04872596263885498,
-0.09114543348550797,
0.025884518399834633,
0.09461694955825806,
0.3166133761405945,
-0.12457611411809921,
0.4178113043308258,
-0.1441560685634613,
-0.2287355363368988,
0.2282899171113968,
0.6028565168380737,
0.4555729627609253,
-0.13383257389068604,
-0.1836947798728943,
-0.021670028567314148,
0.14589674770832062,
-0.18772505223751068,
-0.29844963550567627,
0.3814646303653717,
0.24776476621627808,
0.11073222756385803,
0.32416197657585144,
0.2082139253616333,
-0.3461838662624359,
-0.19805987179279327,
0.18185600638389587,
0.4638683795928955,
-0.08157709985971451,
0.09990805387496948,
0.12916773557662964,
0.057581204921007156,
0.247530996799469,
0.3605564832687378,
0.2566181421279907,
0.4648493230342865,
0.4327031373977661,
-0.14789682626724243,
0.1661868691444397,
0.024920212104916573,
-0.005587819963693619,
0.16978564858436584,
-0.6123135089874268,
-0.2667361795902252,
0.02605564147233963,
-0.5781635642051697,
0.08770281821489334,
-0.21403729915618896,
0.29676517844200134,
-0.42243489623069763,
-0.13163694739341736,
-0.3252568542957306,
0.3045586049556732,
-0.22856968641281128,
-0.11561782658100128,
0.30690357089042664,
-0.09796101599931717,
-0.11815737187862396,
0.36531612277030945,
0.11620362102985382,
-0.07771964371204376,
0.34225940704345703,
-0.0652315765619278,
-0.12134230136871338,
-0.25243398547172546,
-0.40235936641693115,
-0.11058536916971207,
0.1340848058462143,
-0.23288965225219727,
-0.12366537004709244,
0.38383418321609497,
-0.11447924375534058,
-0.07352310419082642,
0.25271502137184143,
0.45478805899620056,
-0.13706453144550323,
0.16407951712608337,
-0.010736440308392048,
0.15976566076278687,
0.3089972138404846,
-0.27118775248527527,
0.11687250435352325,
0.13526177406311035,
0.33198025822639465,
0.12606026232242584,
0.07425845414400101,
-0.21602605283260345,
0.2720341384410858,
0.02245757356286049,
0.011828877031803131,
-0.5405001044273376,
0.40146952867507935,
-0.3661404848098755,
0.032008469104766846,
-0.31531527638435364,
0.18220362067222595,
-0.43100234866142273,
0.4288536012172699,
0.3716661036014557,
-0.016770033165812492,
0.26258498430252075,
-0.2550882399082184,
0.054458729922771454,
0.005996875464916229,
0.5521048307418823,
0.0456913560628891,
-0.192975252866745,
-0.11520878225564957,
-0.20322972536087036,
-0.6631151437759399,
0.20605242252349854,
-0.03312620893120766,
0.21085773408412933,
-0.0869269147515297,
0.20485560595989227,
-0.1342911422252655,
0.2521795630455017,
0.07853086292743683,
0.022121818736195564,
0.0875554010272026,
0.1668347418308258,
-0.07516923546791077,
-0.19845682382583618,
-0.5067961812019348,
-0.20080962777137756,
0.19238170981407166,
0.01865270733833313,
0.526016116142273,
-0.2810210585594177,
0.046275556087493896,
0.06712359189987183,
0.06597289443016052,
-0.11384221911430359,
-0.37495410442352295,
0.24628596007823944,
0.17434373497962952,
-0.06554630398750305,
0.10511869937181473,
-0.18954242765903473,
-0.29476916790008545,
-0.04067634418606758,
-0.26140695810317993,
0.013682875782251358,
-0.08891388773918152,
0.21946553885936737,
-0.04794079810380936,
-0.017490442842245102,
-0.3710753321647644,
0.3321780264377594,
0.36141544580459595,
0.08895280212163925,
-0.2770817279815674,
-0.035588450729846954,
0.08595120161771774,
0.3196238577365875,
0.3016517460346222,
0.6037315130233765,
-0.19015534222126007,
0.2100093960762024,
-0.3688625693321228,
-0.4024438261985779,
0.39791762828826904,
-0.25692424178123474,
-0.2564655840396881,
-0.4706611633300781,
0.4407734274864197,
0.33602026104927063,
-0.10687955468893051,
-0.4412232041358948,
0.14931055903434753,
0.09782710671424866,
-0.24345040321350098,
-0.30403706431388855,
0.24691404402256012,
-0.10060104727745056,
-0.23434366285800934,
0.0852205902338028,
0.017192184925079346,
0.23691749572753906,
-0.15177468955516815,
0.49968668818473816,
-0.15878942608833313
] |
https://github.com/huggingface/datasets/issues/5362 | Run 'GPT-J' failure due to download dataset fail (' ConnectionError: Couldn't reach http://eaidata.bmk.sh/data/enron_emails.jsonl.zst ' ) | Thanks for reporting, @shaoyuta.
We have checked and yes, apparently there is an issue with the server hosting the data of the "enron_emails" subset of "the_pile" dataset: http://eaidata.bmk.sh/data/enron_emails.jsonl.zst
It seems to be down: The connection has timed out.
Please note that at the Hugging Face Hub, we are not hosting their data for this dataset, but only a script that downloads the data from their servers. We are updating the data URL to one in another server.
In the meantime, please note that you can train your model in the entire "the_pile" dataset, by passing the "all" config (instead of the "enron_emails" one). | ### Describe the bug
Run model "GPT-J" with dataset "the_pile" fail.
The fail out is as below:

Looks like which is due to "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst" unreachable .
### Steps to reproduce the bug
Steps to reproduce this issue:
git clone https://github.com/huggingface/transformers
cd transformers
python examples/pytorch/language-modeling/run_clm.py --model_name_or_path EleutherAI/gpt-j-6B --dataset_name the_pile --dataset_config_name enron_emails --do_eval --output_dir /tmp/output --overwrite_output_dir
### Expected behavior
This issue looks like due to "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst " couldn't be reached.
Is there another way to download the dataset "the_pile" ?
Is there another way to cache the dataset "the_pile" but not let the hg to download it when runtime ?
### Environment info
huggingface_hub version: 0.11.1
Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.35
Python version: 3.9.12
Running in iPython ?: No
Running in notebook ?: No
Running in Google Colab ?: No
Token path ?: /home/taosy/.huggingface/token
Has saved token ?: False
Configured git credential helpers:
FastAI: N/A
Tensorflow: N/A
Torch: N/A
Jinja2: N/A
Graphviz: N/A
Pydot: N/A | 103 | Run 'GPT-J' failure due to download dataset fail (' ConnectionError: Couldn't reach http://eaidata.bmk.sh/data/enron_emails.jsonl.zst ' )
### Describe the bug
Run model "GPT-J" with dataset "the_pile" fail.
The fail out is as below:

Looks like which is due to "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst" unreachable .
### Steps to reproduce the bug
Steps to reproduce this issue:
git clone https://github.com/huggingface/transformers
cd transformers
python examples/pytorch/language-modeling/run_clm.py --model_name_or_path EleutherAI/gpt-j-6B --dataset_name the_pile --dataset_config_name enron_emails --do_eval --output_dir /tmp/output --overwrite_output_dir
### Expected behavior
This issue looks like due to "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst " couldn't be reached.
Is there another way to download the dataset "the_pile" ?
Is there another way to cache the dataset "the_pile" but not let the hg to download it when runtime ?
### Environment info
huggingface_hub version: 0.11.1
Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.35
Python version: 3.9.12
Running in iPython ?: No
Running in notebook ?: No
Running in Google Colab ?: No
Token path ?: /home/taosy/.huggingface/token
Has saved token ?: False
Configured git credential helpers:
FastAI: N/A
Tensorflow: N/A
Torch: N/A
Jinja2: N/A
Graphviz: N/A
Pydot: N/A
Thanks for reporting, @shaoyuta.
We have checked and yes, apparently there is an issue with the server hosting the data of the "enron_emails" subset of "the_pile" dataset: http://eaidata.bmk.sh/data/enron_emails.jsonl.zst
It seems to be down: The connection has timed out.
Please note that at the Hugging Face Hub, we are not hosting their data for this dataset, but only a script that downloads the data from their servers. We are updating the data URL to one in another server.
In the meantime, please note that you can train your model in the entire "the_pile" dataset, by passing the "all" config (instead of the "enron_emails" one). | [
-0.25053131580352783,
-0.2583848834037781,
0.08290211856365204,
0.5174923539161682,
0.26875245571136475,
0.08009343594312668,
0.22383201122283936,
0.26260459423065186,
0.17710934579372406,
0.04458042234182358,
-0.17173485457897186,
0.1463269293308258,
0.13832341134548187,
0.042824648320674896,
0.2327374517917633,
-0.20288875699043274,
-0.07129678875207901,
-0.137156143784523,
-0.29680344462394714,
-0.04129564017057419,
-0.01761779561638832,
0.28687721490859985,
0.15444964170455933,
0.0662500187754631,
-0.19433046877384186,
-0.22599896788597107,
-0.018915725871920586,
0.12414415180683136,
0.11120149493217468,
-0.03205454722046852,
0.29969605803489685,
-0.1906958371400833,
-0.03782132267951965,
0.5804466605186462,
-0.0001241716236108914,
0.12486200034618378,
0.19708585739135742,
-0.2748381197452545,
-0.3649383783340454,
-0.3890101909637451,
0.02526584267616272,
-0.2031765580177307,
-0.09984713047742844,
-0.1346311718225479,
-0.2504321038722992,
0.16577230393886566,
0.1869886964559555,
-0.1720048189163208,
0.5227330327033997,
0.26189419627189636,
0.06946289539337158,
0.6596393585205078,
0.4395063817501068,
-0.04377777874469757,
0.12653130292892456,
-0.0830976665019989,
-0.3128722906112671,
0.46082445979118347,
0.0009776875376701355,
-0.003958325833082199,
0.029540956020355225,
0.2216000258922577,
0.21435049176216125,
0.0226864293217659,
0.40361830592155457,
0.1949344128370285,
0.08141915500164032,
-0.14812204241752625,
-0.2530151903629303,
0.14706286787986755,
0.21562829613685608,
-0.5116925835609436,
-0.49305760860443115,
-0.28786665201187134,
-0.1070350930094719,
-0.15291598439216614,
0.4660677909851074,
0.06025562435388565,
-0.288208544254303,
0.25945812463760376,
-0.28308776021003723,
-0.19955745339393616,
-0.3348972797393799,
0.20139512419700623,
0.09871405363082886,
0.08359929174184799,
-0.03615351393818855,
0.22743555903434753,
-0.08724437654018402,
0.31960010528564453,
-0.1707085222005844,
-0.14807002246379852,
0.062358446419239044,
0.28926753997802734,
-0.3356439769268036,
-0.3410123288631439,
0.1394069492816925,
-0.0437784418463707,
0.37071505188941956,
0.09462226927280426,
-0.0604490265250206,
-0.17747065424919128,
0.1830788105726242,
0.18538913130760193,
0.32261571288108826,
0.3900674283504486,
-0.33020687103271484,
0.015278325416147709,
0.3052946925163269,
0.23235097527503967,
0.12704743444919586,
-0.1399388611316681,
0.15835455060005188,
0.1254933625459671,
0.12711279094219208,
0.07030712068080902,
0.24209390580654144,
-0.18435974419116974,
-0.11572033166885376,
0.25715142488479614,
-0.1488690972328186,
-0.04130347818136215,
-0.0013941982761025429,
0.2247886061668396,
-0.34871435165405273,
-0.0418303981423378,
0.13476544618606567,
0.011444877833127975,
-0.06479720771312714,
-0.04683810472488403,
-0.2399953305721283,
0.0554199293255806,
-0.1143537312746048,
0.20258864760398865,
0.25770270824432373,
-0.15936744213104248,
0.4429526627063751,
-0.06315722316503525,
0.30138707160949707,
-0.16064411401748657,
0.07734046876430511,
-0.16171400249004364,
-0.21614587306976318,
0.4155758023262024,
-0.0494052954018116,
0.1800546646118164,
0.14111539721488953,
0.311745285987854,
-0.28210219740867615,
-0.14315584301948547,
-0.23096224665641785,
-0.2523947060108185,
0.13707442581653595,
-0.02725565806031227,
-0.2259504795074463,
0.062149450182914734,
-0.1788305640220642,
-0.013410232961177826,
0.24260318279266357,
-0.050198666751384735,
0.026513174176216125,
-0.029962748289108276,
0.0227980874478817,
-0.08552256226539612,
0.31051987409591675,
0.45190995931625366,
-0.08203281462192535,
-0.2539873719215393,
0.10703132301568985,
-0.01812100037932396,
0.120603047311306,
0.37631475925445557,
-0.1896558403968811,
0.4003399610519409,
-0.27578088641166687,
-0.08460833877325058,
0.085497185587883,
-0.38678115606307983,
-0.755221962928772,
0.11963371187448502,
-0.3356696367263794,
0.2859222888946533,
-0.06515625864267349,
0.0788041204214096,
-0.07332959771156311,
-0.15636135637760162,
-0.06594258546829224,
0.3610967993736267,
-0.1689729541540146,
0.08117929100990295,
-0.2794108986854553,
-0.41214463114738464,
0.016159027814865112,
0.08296264708042145,
0.137565478682518,
0.2522463798522949,
-0.037147797644138336,
0.3534834384918213,
0.1376316100358963,
0.07345788925886154,
0.04073423892259598,
0.21669477224349976,
0.2802612781524658,
-0.09765389561653137,
0.07547026127576828,
-0.1893482208251953,
-0.6716777682304382,
0.28743889927864075,
-0.3182690143585205,
0.2852229177951813,
-0.2926720976829529,
-0.07662477344274521,
-0.2266465723514557,
0.002606423571705818,
0.08826161175966263,
-0.15066470205783844,
0.007732603698968887,
0.18827912211418152,
0.2752721607685089,
0.10529555380344391,
-0.05369625985622406,
0.5441612005233765,
0.11742177605628967,
0.20070789754390717,
-0.41814765334129333,
0.31091850996017456,
-0.2708723247051239,
-0.20545805990695953,
-0.13858209550380707,
-0.14291593432426453,
0.17826959490776062,
-0.35378220677375793,
-0.2467980980873108,
0.34621691703796387,
-0.24333612620830536,
-0.007787711918354034,
-0.2814735174179077,
0.310970664024353,
0.3119480311870575,
-0.09339459240436554,
-0.05900311470031738,
0.2784287929534912,
0.05763237178325653,
-0.010114304721355438,
-0.10759786516427994,
0.19291174411773682,
0.17158924043178558,
0.06486200541257858,
0.029635503888130188,
-0.08406755328178406,
0.16703012585639954,
-0.18464620411396027,
0.004624160006642342,
0.15037542581558228,
0.29185521602630615,
0.038360483944416046,
0.13280203938484192,
-0.27851611375808716,
-0.2952187657356262,
0.037629012018442154,
0.841013491153717,
0.10342656075954437,
0.1696573942899704,
0.15214169025421143,
-0.05396977812051773,
-0.15902066230773926,
0.176973357796669,
-0.011918298900127411,
0.42606043815612793,
0.030177727341651917,
-0.09762918949127197,
0.33191996812820435,
-0.3457180857658386,
-0.10232705622911453,
0.11124057322740555,
0.08250201493501663,
0.2581489384174347,
0.38101306557655334,
0.08806219696998596,
0.10518424212932587,
-0.14038825035095215,
-0.31104162335395813,
-0.007332509849220514,
0.25277963280677795,
-0.3177182972431183,
0.20062868297100067,
0.04383905977010727,
0.11215493828058243,
-0.10595100373029709,
0.008607705123722553,
-0.4367102086544037,
-0.08191393315792084,
0.014771072193980217,
0.3725526034832001,
-0.10574856400489807,
0.060526423156261444,
0.133324533700943,
0.2936849892139435,
0.08959776163101196,
-0.2120918333530426,
-0.4797717034816742,
-0.11126799881458282,
-0.2372027337551117,
-0.09611199796199799,
0.04641168937087059,
-0.1907934844493866,
0.2732245624065399,
-0.1628657877445221,
-0.3237663507461548,
-0.05263952910900116,
-0.30612143874168396,
0.3286924958229065,
-0.005434311926364899,
0.5185131430625916,
0.14031890034675598,
0.5101966857910156,
-0.03664016351103783,
-0.19274429976940155,
0.26920023560523987,
-0.4048556387424469,
-0.24123014509677887,
-0.07162986695766449,
0.02241612784564495,
0.12746037542819977,
-0.15771155059337616,
-0.28842756152153015,
-0.2734697759151459,
-0.3736982047557831,
0.4562304615974426,
-0.09017521888017654,
0.08964155614376068,
0.3674132823944092,
0.05601200833916664,
0.2124953418970108,
0.03231105953454971,
0.18148894608020782,
-0.2102465033531189,
-0.2773285210132599,
0.20862266421318054,
-0.08478028327226639,
-0.350516676902771,
-0.18258565664291382,
0.19950227439403534,
0.17253001034259796,
0.11108355969190598,
-0.6851046085357666,
-0.3055466115474701,
-0.1702772080898285,
-0.07560940086841583,
-0.10740537941455841,
0.010975532233715057,
0.3580257296562195,
-0.30418097972869873,
0.11044418811798096,
-0.12869688868522644,
-0.03790625184774399,
0.33683833479881287,
-0.008169230073690414,
0.41956397891044617,
0.216752827167511,
0.6319989562034607,
0.04911230877041817,
0.4296244978904724,
0.2154473215341568,
-0.04605966433882713,
0.25571781396865845,
0.1720828115940094,
0.20402635633945465,
-0.13937780261039734,
-0.27164801955223083,
-0.04046626761555672,
-0.14489638805389404,
-0.1526765376329422,
0.12650981545448303,
-0.016918346285820007,
-0.07174701243638992,
-0.3525877594947815,
-0.25391092896461487,
0.25387775897979736,
-0.46311503648757935,
0.1413746476173401,
0.28252923488616943,
0.14586962759494781,
0.21909593045711517,
0.048987776041030884,
-0.12764990329742432,
-0.029322143644094467,
0.25678446888923645,
0.3135262727737427,
0.05997180566191673,
0.1663786619901657,
-0.27579042315483093,
-0.21275590360164642,
-0.6251093745231628,
0.07347168773412704,
-0.024933643639087677,
0.43859490752220154,
-0.1699465811252594,
0.2136329710483551,
0.09055641293525696,
-0.16167838871479034,
0.751741886138916,
0.010046474635601044,
0.38547492027282715,
-0.09246011078357697,
-0.2018440216779709,
-0.3023972809314728,
-0.06300517171621323,
-0.23788733780384064,
0.00910312682390213,
0.567997395992279,
0.6143867373466492,
-0.7203027606010437,
-0.10759609192609787,
0.2564588189125061,
0.059996798634529114,
-0.09395165741443634,
-0.09915897995233536,
-0.1786227971315384,
-0.3865126371383667,
-0.3763265013694763,
0.31911009550094604,
0.4108630120754242,
0.15430328249931335,
0.10939690470695496,
-0.001205161213874817,
0.1477179080247879,
0.05911322683095932,
-0.11831484735012054,
-0.0424293577671051,
0.11227761954069138,
-0.09718910604715347,
0.15259455144405365,
0.2118959277868271,
0.2432348132133484,
0.0636274442076683,
0.4289166331291199,
-0.003400404006242752,
-0.4924846887588501,
0.20204991102218628,
0.025935206562280655,
-0.04924391955137253,
0.3770879805088043,
-0.015929657965898514,
0.023477613925933838,
0.1820841133594513,
0.23701277375221252,
0.12881897389888763,
0.0654602199792862,
0.011210081167519093,
0.140745609998703,
-0.3100155293941498,
-0.21531438827514648,
0.3395400643348694,
-0.05807768926024437,
0.04490567743778229,
0.45918330550193787,
-0.06449724733829498,
-0.3787951171398163,
0.28580039739608765,
0.0813685953617096,
1.2617452144622803,
0.2529797852039337,
0.20824654400348663,
0.18828582763671875,
-0.13511011004447937,
0.7088477611541748,
-0.4936922788619995,
0.26724332571029663,
-0.2709903120994568,
-0.28638628125190735,
-0.08436199277639389,
-0.30598849058151245,
0.08065198361873627,
0.14214132726192474,
-0.22791287302970886,
0.27893930673599243,
-0.08413123339414597,
0.30726519227027893,
0.06256149709224701,
0.39089444279670715,
-0.2832830548286438,
-0.08414264023303986,
-0.29448723793029785,
0.011975381523370743,
-0.16780376434326172,
0.46976521611213684,
-0.13843733072280884,
-0.2970007658004761,
-0.08343487977981567,
-0.2694741487503052,
-0.5190274119377136,
0.14505362510681152,
-0.6132718920707703,
0.03851808235049248,
0.024622712284326553,
-0.19696825742721558,
0.08112446963787079,
-0.16909542679786682,
0.3757842183113098,
0.17110396921634674,
-0.44925016164779663,
0.15194498002529144,
-0.5696387887001038,
-0.027736343443393707,
0.08625072985887527,
0.02223217487335205,
0.38494759798049927,
-0.1348448097705841,
-0.3216628432273865,
-0.11556590348482132,
-0.2684559226036072,
-0.41405630111694336,
0.21592757105827332,
-0.22784928977489471,
-0.027918405830860138,
-0.045107755810022354,
0.17313914000988007,
-0.034477367997169495,
-0.018979214131832123,
-0.36703258752822876,
0.04960985854268074,
0.13384069502353668,
-0.17523279786109924,
0.019178785383701324,
-0.0016945824027061462,
-0.17727255821228027,
-0.060581717640161514,
0.4666273593902588,
-0.04103652387857437,
0.019597038626670837,
0.3593161702156067,
0.37275606393814087,
-0.20105324685573578,
-0.1117333248257637,
-0.31463363766670227,
0.17955893278121948,
-0.9052026867866516,
0.291935533285141,
-0.3308214545249939,
-0.043282926082611084,
-0.3927529752254486,
0.24134734272956848,
0.46293699741363525,
0.02089635282754898,
-0.08685721457004547,
-0.4336250126361847,
-0.2785257399082184,
0.09040401130914688,
0.21030743420124054,
0.22713777422904968,
0.15251195430755615,
0.19477619230747223,
-0.009532620199024677,
0.13807089626789093,
-0.2085724174976349,
-0.11390367895364761,
-0.35845962166786194,
-0.031877972185611725,
0.30220237374305725,
-0.12799930572509766,
0.5163117051124573,
-0.018011633306741714,
-0.08778345584869385,
0.2505083680152893,
-0.27682071924209595,
-0.05078107491135597,
-0.1806962490081787,
0.2200266420841217,
0.08600805699825287,
-0.21165011823177338,
-0.015283150598406792,
-0.30291491746902466,
-0.042734529823064804,
-0.07923609018325806,
0.3015458881855011,
0.06666513532400131,
0.12266501784324646,
0.014645176939666271,
0.1699357032775879,
0.2746932804584503,
-0.2444450706243515,
-0.040111079812049866,
-0.000008538365364074707,
0.09367284178733826,
-0.005991338286548853,
0.10690857470035553,
-0.026973610743880272,
0.027822166681289673,
-0.5455781817436218,
0.06352303922176361,
0.10638805478811264,
0.35301172733306885,
0.3803251087665558,
-0.059132128953933716,
-0.19416332244873047,
0.06172020733356476,
0.13489702343940735,
-0.06606557965278625,
-0.14634233713150024,
-0.09642363339662552,
0.25103887915611267,
0.10562504827976227,
-0.20827969908714294,
-0.16843700408935547,
0.47836533188819885,
-0.028675608336925507,
0.034243565052747726,
0.20746290683746338,
0.195467010140419,
0.06653308868408203,
0.17589306831359863,
0.05010040104389191,
0.8969423174858093,
0.05360644683241844,
0.07640272378921509,
0.37700414657592773,
-0.1416306495666504,
0.2571678161621094,
0.35535821318626404,
0.015789184719324112,
0.30095359683036804,
0.0018005222082138062,
-0.0873233750462532,
-0.3254835307598114,
-0.2732076942920685,
0.12775468826293945,
-0.05865613371133804,
-0.08913111686706543,
-0.10891629755496979,
0.25646984577178955,
-0.07805947959423065,
0.1803005486726761,
-0.15159152448177338,
0.1605570763349533,
-0.18947815895080566,
-0.04700760543346405,
-0.2680937647819519,
0.32727453112602234,
-0.1543634831905365,
0.18552108108997345,
0.012540299445390701,
-0.06783647835254669,
-0.0194290392100811,
0.10068503022193909,
0.032125331461429596,
-0.28210097551345825,
0.1456051766872406,
0.10819593071937561,
-0.035926491022109985,
-0.26498791575431824,
-0.045340925455093384,
0.1182294562458992,
0.12172600626945496,
-0.24085599184036255,
0.3917900621891022,
0.20852448046207428,
-0.26489487290382385,
-0.4539630711078644,
0.40010866522789,
0.2341046929359436,
0.06512407958507538,
0.19163697957992554,
0.0955822691321373,
0.23421238362789154,
0.08658209443092346,
-0.19970490038394928,
0.2745822072029114,
0.11345183104276657,
-0.19191299378871918,
0.11380042135715485,
0.014111815020442009,
-0.1019720733165741,
-0.07947403192520142,
-0.039352621883153915,
-0.010640991851687431,
-0.06692042946815491,
0.7021782398223877,
-0.23365524411201477,
-0.21065300703048706,
0.028461262583732605,
-0.08909042924642563,
-0.35613077878952026,
0.02269202284514904,
0.2404709756374359,
-0.3010903000831604,
0.1771795153617859,
-0.09344299137592316,
0.046072766184806824,
-0.21515801548957825,
0.4259449243545532,
0.39279356598854065,
0.02572227641940117,
-0.2396601140499115,
0.08255968987941742,
-0.28726643323898315,
0.3776581585407257,
0.08515694737434387,
-0.017637748271226883,
0.1520138382911682,
0.15942268073558807,
-0.22791749238967896,
-0.007543671876192093,
0.13438476622104645,
-0.030685339123010635,
-0.15375366806983948,
0.27898263931274414,
-0.35292431712150574,
-0.03562861308455467,
-0.1979093700647354,
0.30140432715415955,
0.2361234724521637,
-0.2214513123035431,
0.26142603158950806,
0.22582632303237915,
-0.05484223738312721,
-0.3473634719848633,
0.06604604423046112,
0.08691981434822083,
-0.2445054054260254,
0.3279295861721039,
0.1843641698360443,
0.43334174156188965,
0.01595376431941986,
-0.31199610233306885,
-0.1683303713798523,
-0.17413267493247986,
-0.24050964415073395,
-0.06569076329469681,
-0.12212058901786804,
0.3709176182746887,
-0.1384049952030182,
-0.500939667224884,
-0.48395150899887085,
0.09479571133852005,
0.008017737418413162,
-0.2094164490699768,
-0.11725917458534241,
0.036169782280921936,
-0.34379205107688904,
0.06250561773777008,
0.1663418412208557,
0.35514795780181885,
-0.01880059391260147,
0.020121539011597633,
-0.40333110094070435,
-0.12923738360404968,
0.6133039593696594,
-0.33850592374801636,
-0.3766467571258545,
-0.026546791195869446,
0.19169974327087402,
-0.027130737900733948,
-0.20963354408740997,
-0.4085819125175476,
0.06967680901288986,
0.2504015862941742,
0.11476577073335648,
-0.36843860149383545,
0.29577767848968506,
-0.025694526731967926,
0.08524659276008606,
0.11185570061206818,
0.352890282869339,
0.07394935190677643,
-0.39049389958381653,
0.10733833909034729,
-0.20761454105377197
] |
https://github.com/huggingface/datasets/issues/5362 | Run 'GPT-J' failure due to download dataset fail (' ConnectionError: Couldn't reach http://eaidata.bmk.sh/data/enron_emails.jsonl.zst ' ) | We have transferred this issue to the corresponding dataset Community tab: https://huggingface.co/datasets/the_pile/discussions/2
Please, follow the updates there. | ### Describe the bug
Run model "GPT-J" with dataset "the_pile" fail.
The fail out is as below:

Looks like which is due to "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst" unreachable .
### Steps to reproduce the bug
Steps to reproduce this issue:
git clone https://github.com/huggingface/transformers
cd transformers
python examples/pytorch/language-modeling/run_clm.py --model_name_or_path EleutherAI/gpt-j-6B --dataset_name the_pile --dataset_config_name enron_emails --do_eval --output_dir /tmp/output --overwrite_output_dir
### Expected behavior
This issue looks like due to "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst " couldn't be reached.
Is there another way to download the dataset "the_pile" ?
Is there another way to cache the dataset "the_pile" but not let the hg to download it when runtime ?
### Environment info
huggingface_hub version: 0.11.1
Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.35
Python version: 3.9.12
Running in iPython ?: No
Running in notebook ?: No
Running in Google Colab ?: No
Token path ?: /home/taosy/.huggingface/token
Has saved token ?: False
Configured git credential helpers:
FastAI: N/A
Tensorflow: N/A
Torch: N/A
Jinja2: N/A
Graphviz: N/A
Pydot: N/A | 17 | Run 'GPT-J' failure due to download dataset fail (' ConnectionError: Couldn't reach http://eaidata.bmk.sh/data/enron_emails.jsonl.zst ' )
### Describe the bug
Run model "GPT-J" with dataset "the_pile" fail.
The fail out is as below:

Looks like which is due to "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst" unreachable .
### Steps to reproduce the bug
Steps to reproduce this issue:
git clone https://github.com/huggingface/transformers
cd transformers
python examples/pytorch/language-modeling/run_clm.py --model_name_or_path EleutherAI/gpt-j-6B --dataset_name the_pile --dataset_config_name enron_emails --do_eval --output_dir /tmp/output --overwrite_output_dir
### Expected behavior
This issue looks like due to "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst " couldn't be reached.
Is there another way to download the dataset "the_pile" ?
Is there another way to cache the dataset "the_pile" but not let the hg to download it when runtime ?
### Environment info
huggingface_hub version: 0.11.1
Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.35
Python version: 3.9.12
Running in iPython ?: No
Running in notebook ?: No
Running in Google Colab ?: No
Token path ?: /home/taosy/.huggingface/token
Has saved token ?: False
Configured git credential helpers:
FastAI: N/A
Tensorflow: N/A
Torch: N/A
Jinja2: N/A
Graphviz: N/A
Pydot: N/A
We have transferred this issue to the corresponding dataset Community tab: https://huggingface.co/datasets/the_pile/discussions/2
Please, follow the updates there. | [
-0.25053131580352783,
-0.2583848834037781,
0.08290211856365204,
0.5174923539161682,
0.26875245571136475,
0.08009343594312668,
0.22383201122283936,
0.26260459423065186,
0.17710934579372406,
0.04458042234182358,
-0.17173485457897186,
0.1463269293308258,
0.13832341134548187,
0.042824648320674896,
0.2327374517917633,
-0.20288875699043274,
-0.07129678875207901,
-0.137156143784523,
-0.29680344462394714,
-0.04129564017057419,
-0.01761779561638832,
0.28687721490859985,
0.15444964170455933,
0.0662500187754631,
-0.19433046877384186,
-0.22599896788597107,
-0.018915725871920586,
0.12414415180683136,
0.11120149493217468,
-0.03205454722046852,
0.29969605803489685,
-0.1906958371400833,
-0.03782132267951965,
0.5804466605186462,
-0.0001241716236108914,
0.12486200034618378,
0.19708585739135742,
-0.2748381197452545,
-0.3649383783340454,
-0.3890101909637451,
0.02526584267616272,
-0.2031765580177307,
-0.09984713047742844,
-0.1346311718225479,
-0.2504321038722992,
0.16577230393886566,
0.1869886964559555,
-0.1720048189163208,
0.5227330327033997,
0.26189419627189636,
0.06946289539337158,
0.6596393585205078,
0.4395063817501068,
-0.04377777874469757,
0.12653130292892456,
-0.0830976665019989,
-0.3128722906112671,
0.46082445979118347,
0.0009776875376701355,
-0.003958325833082199,
0.029540956020355225,
0.2216000258922577,
0.21435049176216125,
0.0226864293217659,
0.40361830592155457,
0.1949344128370285,
0.08141915500164032,
-0.14812204241752625,
-0.2530151903629303,
0.14706286787986755,
0.21562829613685608,
-0.5116925835609436,
-0.49305760860443115,
-0.28786665201187134,
-0.1070350930094719,
-0.15291598439216614,
0.4660677909851074,
0.06025562435388565,
-0.288208544254303,
0.25945812463760376,
-0.28308776021003723,
-0.19955745339393616,
-0.3348972797393799,
0.20139512419700623,
0.09871405363082886,
0.08359929174184799,
-0.03615351393818855,
0.22743555903434753,
-0.08724437654018402,
0.31960010528564453,
-0.1707085222005844,
-0.14807002246379852,
0.062358446419239044,
0.28926753997802734,
-0.3356439769268036,
-0.3410123288631439,
0.1394069492816925,
-0.0437784418463707,
0.37071505188941956,
0.09462226927280426,
-0.0604490265250206,
-0.17747065424919128,
0.1830788105726242,
0.18538913130760193,
0.32261571288108826,
0.3900674283504486,
-0.33020687103271484,
0.015278325416147709,
0.3052946925163269,
0.23235097527503967,
0.12704743444919586,
-0.1399388611316681,
0.15835455060005188,
0.1254933625459671,
0.12711279094219208,
0.07030712068080902,
0.24209390580654144,
-0.18435974419116974,
-0.11572033166885376,
0.25715142488479614,
-0.1488690972328186,
-0.04130347818136215,
-0.0013941982761025429,
0.2247886061668396,
-0.34871435165405273,
-0.0418303981423378,
0.13476544618606567,
0.011444877833127975,
-0.06479720771312714,
-0.04683810472488403,
-0.2399953305721283,
0.0554199293255806,
-0.1143537312746048,
0.20258864760398865,
0.25770270824432373,
-0.15936744213104248,
0.4429526627063751,
-0.06315722316503525,
0.30138707160949707,
-0.16064411401748657,
0.07734046876430511,
-0.16171400249004364,
-0.21614587306976318,
0.4155758023262024,
-0.0494052954018116,
0.1800546646118164,
0.14111539721488953,
0.311745285987854,
-0.28210219740867615,
-0.14315584301948547,
-0.23096224665641785,
-0.2523947060108185,
0.13707442581653595,
-0.02725565806031227,
-0.2259504795074463,
0.062149450182914734,
-0.1788305640220642,
-0.013410232961177826,
0.24260318279266357,
-0.050198666751384735,
0.026513174176216125,
-0.029962748289108276,
0.0227980874478817,
-0.08552256226539612,
0.31051987409591675,
0.45190995931625366,
-0.08203281462192535,
-0.2539873719215393,
0.10703132301568985,
-0.01812100037932396,
0.120603047311306,
0.37631475925445557,
-0.1896558403968811,
0.4003399610519409,
-0.27578088641166687,
-0.08460833877325058,
0.085497185587883,
-0.38678115606307983,
-0.755221962928772,
0.11963371187448502,
-0.3356696367263794,
0.2859222888946533,
-0.06515625864267349,
0.0788041204214096,
-0.07332959771156311,
-0.15636135637760162,
-0.06594258546829224,
0.3610967993736267,
-0.1689729541540146,
0.08117929100990295,
-0.2794108986854553,
-0.41214463114738464,
0.016159027814865112,
0.08296264708042145,
0.137565478682518,
0.2522463798522949,
-0.037147797644138336,
0.3534834384918213,
0.1376316100358963,
0.07345788925886154,
0.04073423892259598,
0.21669477224349976,
0.2802612781524658,
-0.09765389561653137,
0.07547026127576828,
-0.1893482208251953,
-0.6716777682304382,
0.28743889927864075,
-0.3182690143585205,
0.2852229177951813,
-0.2926720976829529,
-0.07662477344274521,
-0.2266465723514557,
0.002606423571705818,
0.08826161175966263,
-0.15066470205783844,
0.007732603698968887,
0.18827912211418152,
0.2752721607685089,
0.10529555380344391,
-0.05369625985622406,
0.5441612005233765,
0.11742177605628967,
0.20070789754390717,
-0.41814765334129333,
0.31091850996017456,
-0.2708723247051239,
-0.20545805990695953,
-0.13858209550380707,
-0.14291593432426453,
0.17826959490776062,
-0.35378220677375793,
-0.2467980980873108,
0.34621691703796387,
-0.24333612620830536,
-0.007787711918354034,
-0.2814735174179077,
0.310970664024353,
0.3119480311870575,
-0.09339459240436554,
-0.05900311470031738,
0.2784287929534912,
0.05763237178325653,
-0.010114304721355438,
-0.10759786516427994,
0.19291174411773682,
0.17158924043178558,
0.06486200541257858,
0.029635503888130188,
-0.08406755328178406,
0.16703012585639954,
-0.18464620411396027,
0.004624160006642342,
0.15037542581558228,
0.29185521602630615,
0.038360483944416046,
0.13280203938484192,
-0.27851611375808716,
-0.2952187657356262,
0.037629012018442154,
0.841013491153717,
0.10342656075954437,
0.1696573942899704,
0.15214169025421143,
-0.05396977812051773,
-0.15902066230773926,
0.176973357796669,
-0.011918298900127411,
0.42606043815612793,
0.030177727341651917,
-0.09762918949127197,
0.33191996812820435,
-0.3457180857658386,
-0.10232705622911453,
0.11124057322740555,
0.08250201493501663,
0.2581489384174347,
0.38101306557655334,
0.08806219696998596,
0.10518424212932587,
-0.14038825035095215,
-0.31104162335395813,
-0.007332509849220514,
0.25277963280677795,
-0.3177182972431183,
0.20062868297100067,
0.04383905977010727,
0.11215493828058243,
-0.10595100373029709,
0.008607705123722553,
-0.4367102086544037,
-0.08191393315792084,
0.014771072193980217,
0.3725526034832001,
-0.10574856400489807,
0.060526423156261444,
0.133324533700943,
0.2936849892139435,
0.08959776163101196,
-0.2120918333530426,
-0.4797717034816742,
-0.11126799881458282,
-0.2372027337551117,
-0.09611199796199799,
0.04641168937087059,
-0.1907934844493866,
0.2732245624065399,
-0.1628657877445221,
-0.3237663507461548,
-0.05263952910900116,
-0.30612143874168396,
0.3286924958229065,
-0.005434311926364899,
0.5185131430625916,
0.14031890034675598,
0.5101966857910156,
-0.03664016351103783,
-0.19274429976940155,
0.26920023560523987,
-0.4048556387424469,
-0.24123014509677887,
-0.07162986695766449,
0.02241612784564495,
0.12746037542819977,
-0.15771155059337616,
-0.28842756152153015,
-0.2734697759151459,
-0.3736982047557831,
0.4562304615974426,
-0.09017521888017654,
0.08964155614376068,
0.3674132823944092,
0.05601200833916664,
0.2124953418970108,
0.03231105953454971,
0.18148894608020782,
-0.2102465033531189,
-0.2773285210132599,
0.20862266421318054,
-0.08478028327226639,
-0.350516676902771,
-0.18258565664291382,
0.19950227439403534,
0.17253001034259796,
0.11108355969190598,
-0.6851046085357666,
-0.3055466115474701,
-0.1702772080898285,
-0.07560940086841583,
-0.10740537941455841,
0.010975532233715057,
0.3580257296562195,
-0.30418097972869873,
0.11044418811798096,
-0.12869688868522644,
-0.03790625184774399,
0.33683833479881287,
-0.008169230073690414,
0.41956397891044617,
0.216752827167511,
0.6319989562034607,
0.04911230877041817,
0.4296244978904724,
0.2154473215341568,
-0.04605966433882713,
0.25571781396865845,
0.1720828115940094,
0.20402635633945465,
-0.13937780261039734,
-0.27164801955223083,
-0.04046626761555672,
-0.14489638805389404,
-0.1526765376329422,
0.12650981545448303,
-0.016918346285820007,
-0.07174701243638992,
-0.3525877594947815,
-0.25391092896461487,
0.25387775897979736,
-0.46311503648757935,
0.1413746476173401,
0.28252923488616943,
0.14586962759494781,
0.21909593045711517,
0.048987776041030884,
-0.12764990329742432,
-0.029322143644094467,
0.25678446888923645,
0.3135262727737427,
0.05997180566191673,
0.1663786619901657,
-0.27579042315483093,
-0.21275590360164642,
-0.6251093745231628,
0.07347168773412704,
-0.024933643639087677,
0.43859490752220154,
-0.1699465811252594,
0.2136329710483551,
0.09055641293525696,
-0.16167838871479034,
0.751741886138916,
0.010046474635601044,
0.38547492027282715,
-0.09246011078357697,
-0.2018440216779709,
-0.3023972809314728,
-0.06300517171621323,
-0.23788733780384064,
0.00910312682390213,
0.567997395992279,
0.6143867373466492,
-0.7203027606010437,
-0.10759609192609787,
0.2564588189125061,
0.059996798634529114,
-0.09395165741443634,
-0.09915897995233536,
-0.1786227971315384,
-0.3865126371383667,
-0.3763265013694763,
0.31911009550094604,
0.4108630120754242,
0.15430328249931335,
0.10939690470695496,
-0.001205161213874817,
0.1477179080247879,
0.05911322683095932,
-0.11831484735012054,
-0.0424293577671051,
0.11227761954069138,
-0.09718910604715347,
0.15259455144405365,
0.2118959277868271,
0.2432348132133484,
0.0636274442076683,
0.4289166331291199,
-0.003400404006242752,
-0.4924846887588501,
0.20204991102218628,
0.025935206562280655,
-0.04924391955137253,
0.3770879805088043,
-0.015929657965898514,
0.023477613925933838,
0.1820841133594513,
0.23701277375221252,
0.12881897389888763,
0.0654602199792862,
0.011210081167519093,
0.140745609998703,
-0.3100155293941498,
-0.21531438827514648,
0.3395400643348694,
-0.05807768926024437,
0.04490567743778229,
0.45918330550193787,
-0.06449724733829498,
-0.3787951171398163,
0.28580039739608765,
0.0813685953617096,
1.2617452144622803,
0.2529797852039337,
0.20824654400348663,
0.18828582763671875,
-0.13511011004447937,
0.7088477611541748,
-0.4936922788619995,
0.26724332571029663,
-0.2709903120994568,
-0.28638628125190735,
-0.08436199277639389,
-0.30598849058151245,
0.08065198361873627,
0.14214132726192474,
-0.22791287302970886,
0.27893930673599243,
-0.08413123339414597,
0.30726519227027893,
0.06256149709224701,
0.39089444279670715,
-0.2832830548286438,
-0.08414264023303986,
-0.29448723793029785,
0.011975381523370743,
-0.16780376434326172,
0.46976521611213684,
-0.13843733072280884,
-0.2970007658004761,
-0.08343487977981567,
-0.2694741487503052,
-0.5190274119377136,
0.14505362510681152,
-0.6132718920707703,
0.03851808235049248,
0.024622712284326553,
-0.19696825742721558,
0.08112446963787079,
-0.16909542679786682,
0.3757842183113098,
0.17110396921634674,
-0.44925016164779663,
0.15194498002529144,
-0.5696387887001038,
-0.027736343443393707,
0.08625072985887527,
0.02223217487335205,
0.38494759798049927,
-0.1348448097705841,
-0.3216628432273865,
-0.11556590348482132,
-0.2684559226036072,
-0.41405630111694336,
0.21592757105827332,
-0.22784928977489471,
-0.027918405830860138,
-0.045107755810022354,
0.17313914000988007,
-0.034477367997169495,
-0.018979214131832123,
-0.36703258752822876,
0.04960985854268074,
0.13384069502353668,
-0.17523279786109924,
0.019178785383701324,
-0.0016945824027061462,
-0.17727255821228027,
-0.060581717640161514,
0.4666273593902588,
-0.04103652387857437,
0.019597038626670837,
0.3593161702156067,
0.37275606393814087,
-0.20105324685573578,
-0.1117333248257637,
-0.31463363766670227,
0.17955893278121948,
-0.9052026867866516,
0.291935533285141,
-0.3308214545249939,
-0.043282926082611084,
-0.3927529752254486,
0.24134734272956848,
0.46293699741363525,
0.02089635282754898,
-0.08685721457004547,
-0.4336250126361847,
-0.2785257399082184,
0.09040401130914688,
0.21030743420124054,
0.22713777422904968,
0.15251195430755615,
0.19477619230747223,
-0.009532620199024677,
0.13807089626789093,
-0.2085724174976349,
-0.11390367895364761,
-0.35845962166786194,
-0.031877972185611725,
0.30220237374305725,
-0.12799930572509766,
0.5163117051124573,
-0.018011633306741714,
-0.08778345584869385,
0.2505083680152893,
-0.27682071924209595,
-0.05078107491135597,
-0.1806962490081787,
0.2200266420841217,
0.08600805699825287,
-0.21165011823177338,
-0.015283150598406792,
-0.30291491746902466,
-0.042734529823064804,
-0.07923609018325806,
0.3015458881855011,
0.06666513532400131,
0.12266501784324646,
0.014645176939666271,
0.1699357032775879,
0.2746932804584503,
-0.2444450706243515,
-0.040111079812049866,
-0.000008538365364074707,
0.09367284178733826,
-0.005991338286548853,
0.10690857470035553,
-0.026973610743880272,
0.027822166681289673,
-0.5455781817436218,
0.06352303922176361,
0.10638805478811264,
0.35301172733306885,
0.3803251087665558,
-0.059132128953933716,
-0.19416332244873047,
0.06172020733356476,
0.13489702343940735,
-0.06606557965278625,
-0.14634233713150024,
-0.09642363339662552,
0.25103887915611267,
0.10562504827976227,
-0.20827969908714294,
-0.16843700408935547,
0.47836533188819885,
-0.028675608336925507,
0.034243565052747726,
0.20746290683746338,
0.195467010140419,
0.06653308868408203,
0.17589306831359863,
0.05010040104389191,
0.8969423174858093,
0.05360644683241844,
0.07640272378921509,
0.37700414657592773,
-0.1416306495666504,
0.2571678161621094,
0.35535821318626404,
0.015789184719324112,
0.30095359683036804,
0.0018005222082138062,
-0.0873233750462532,
-0.3254835307598114,
-0.2732076942920685,
0.12775468826293945,
-0.05865613371133804,
-0.08913111686706543,
-0.10891629755496979,
0.25646984577178955,
-0.07805947959423065,
0.1803005486726761,
-0.15159152448177338,
0.1605570763349533,
-0.18947815895080566,
-0.04700760543346405,
-0.2680937647819519,
0.32727453112602234,
-0.1543634831905365,
0.18552108108997345,
0.012540299445390701,
-0.06783647835254669,
-0.0194290392100811,
0.10068503022193909,
0.032125331461429596,
-0.28210097551345825,
0.1456051766872406,
0.10819593071937561,
-0.035926491022109985,
-0.26498791575431824,
-0.045340925455093384,
0.1182294562458992,
0.12172600626945496,
-0.24085599184036255,
0.3917900621891022,
0.20852448046207428,
-0.26489487290382385,
-0.4539630711078644,
0.40010866522789,
0.2341046929359436,
0.06512407958507538,
0.19163697957992554,
0.0955822691321373,
0.23421238362789154,
0.08658209443092346,
-0.19970490038394928,
0.2745822072029114,
0.11345183104276657,
-0.19191299378871918,
0.11380042135715485,
0.014111815020442009,
-0.1019720733165741,
-0.07947403192520142,
-0.039352621883153915,
-0.010640991851687431,
-0.06692042946815491,
0.7021782398223877,
-0.23365524411201477,
-0.21065300703048706,
0.028461262583732605,
-0.08909042924642563,
-0.35613077878952026,
0.02269202284514904,
0.2404709756374359,
-0.3010903000831604,
0.1771795153617859,
-0.09344299137592316,
0.046072766184806824,
-0.21515801548957825,
0.4259449243545532,
0.39279356598854065,
0.02572227641940117,
-0.2396601140499115,
0.08255968987941742,
-0.28726643323898315,
0.3776581585407257,
0.08515694737434387,
-0.017637748271226883,
0.1520138382911682,
0.15942268073558807,
-0.22791749238967896,
-0.007543671876192093,
0.13438476622104645,
-0.030685339123010635,
-0.15375366806983948,
0.27898263931274414,
-0.35292431712150574,
-0.03562861308455467,
-0.1979093700647354,
0.30140432715415955,
0.2361234724521637,
-0.2214513123035431,
0.26142603158950806,
0.22582632303237915,
-0.05484223738312721,
-0.3473634719848633,
0.06604604423046112,
0.08691981434822083,
-0.2445054054260254,
0.3279295861721039,
0.1843641698360443,
0.43334174156188965,
0.01595376431941986,
-0.31199610233306885,
-0.1683303713798523,
-0.17413267493247986,
-0.24050964415073395,
-0.06569076329469681,
-0.12212058901786804,
0.3709176182746887,
-0.1384049952030182,
-0.500939667224884,
-0.48395150899887085,
0.09479571133852005,
0.008017737418413162,
-0.2094164490699768,
-0.11725917458534241,
0.036169782280921936,
-0.34379205107688904,
0.06250561773777008,
0.1663418412208557,
0.35514795780181885,
-0.01880059391260147,
0.020121539011597633,
-0.40333110094070435,
-0.12923738360404968,
0.6133039593696594,
-0.33850592374801636,
-0.3766467571258545,
-0.026546791195869446,
0.19169974327087402,
-0.027130737900733948,
-0.20963354408740997,
-0.4085819125175476,
0.06967680901288986,
0.2504015862941742,
0.11476577073335648,
-0.36843860149383545,
0.29577767848968506,
-0.025694526731967926,
0.08524659276008606,
0.11185570061206818,
0.352890282869339,
0.07394935190677643,
-0.39049389958381653,
0.10733833909034729,
-0.20761454105377197
] |
https://github.com/huggingface/datasets/issues/5361 | How concatenate `Audio` elements using batch mapping | You can try something like this ?
```python
def mapper_function(batch):
return {"concatenated_audio": [np.concatenate([audio["array"] for audio in batch["audio"]])]}
dataset = dataset.map(
mapper_function,
batched=True,
batch_size=3,
remove_columns=list(dataset.features),
)
``` | ### Describe the bug
I am trying to do concatenate audios in a dataset e.g. `google/fleurs`.
```python
print(dataset)
# Dataset({
# features: ['path', 'audio'],
# num_rows: 24
# })
def mapper_function(batch):
# to merge every 3 audio
# np.concatnate(audios[i: i+3]) for i in range(i, len(batch), 3)
dataset = dataset.map(mapper_function, batch=True, batch_size=24)
print(dataset)
# Expected output:
# Dataset({
# features: ['path', 'audio'],
# num_rows: 8
# })
```
I tried to construct `result={}` dictionary inside the mapper function, I just found it will not work because it needs `byte` also needed :((
I'd appreciate if your share any use cases similar to my problem or any solutions really. Thanks!
cc: @lhoestq
### Steps to reproduce the bug
1. load audio dataset
2. try to merge every k audios and return as one
### Expected behavior
Merged dataset with a fewer rows. If we merge every 3 rows, then `n // 3` number of examples.
### Environment info
- `datasets` version: 2.1.0
- Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid
- Python version: 3.7.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5 | 26 | How concatenate `Audio` elements using batch mapping
### Describe the bug
I am trying to do concatenate audios in a dataset e.g. `google/fleurs`.
```python
print(dataset)
# Dataset({
# features: ['path', 'audio'],
# num_rows: 24
# })
def mapper_function(batch):
# to merge every 3 audio
# np.concatnate(audios[i: i+3]) for i in range(i, len(batch), 3)
dataset = dataset.map(mapper_function, batch=True, batch_size=24)
print(dataset)
# Expected output:
# Dataset({
# features: ['path', 'audio'],
# num_rows: 8
# })
```
I tried to construct `result={}` dictionary inside the mapper function, I just found it will not work because it needs `byte` also needed :((
I'd appreciate if your share any use cases similar to my problem or any solutions really. Thanks!
cc: @lhoestq
### Steps to reproduce the bug
1. load audio dataset
2. try to merge every k audios and return as one
### Expected behavior
Merged dataset with a fewer rows. If we merge every 3 rows, then `n // 3` number of examples.
### Environment info
- `datasets` version: 2.1.0
- Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid
- Python version: 3.7.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5
You can try something like this ?
```python
def mapper_function(batch):
return {"concatenated_audio": [np.concatenate([audio["array"] for audio in batch["audio"]])]}
dataset = dataset.map(
mapper_function,
batched=True,
batch_size=3,
remove_columns=list(dataset.features),
)
``` | [
-0.21313877403736115,
-0.1674511432647705,
-0.025562547147274017,
0.27073144912719727,
-0.014795087277889252,
0.1587909460067749,
0.20670372247695923,
0.1842883974313736,
-0.23407350480556488,
0.26536571979522705,
-0.17259377241134644,
0.3468688726425171,
-0.03206654265522957,
-0.05392073839902878,
-0.019855167716741562,
0.012179955840110779,
0.3002506196498871,
0.37028852105140686,
0.07205956429243088,
0.011724419891834259,
-0.4837925136089325,
0.12983843684196472,
-0.5368191003799438,
-0.0072671473026275635,
-0.2877599596977234,
0.2535306513309479,
-0.3430282175540924,
-0.08592506498098373,
0.07085531204938889,
-0.20046056807041168,
0.20153816044330597,
-0.04526285454630852,
-0.0157232116907835,
0.6369069218635559,
-0.00012791345943696797,
-0.1775917410850525,
0.2053724080324173,
-0.1085159108042717,
-0.22172465920448303,
-0.1502930074930191,
-0.6444510817527771,
-0.41403141617774963,
-0.39954105019569397,
0.03881519287824631,
0.19950494170188904,
-0.2822723984718323,
-0.1220155656337738,
-0.6879696249961853,
0.015513353049755096,
0.15656985342502594,
-0.018304098397493362,
0.07136750221252441,
0.0271095372736454,
0.22086934745311737,
0.04336853325366974,
0.2312142699956894,
0.14580217003822327,
-0.12462727725505829,
0.4778182804584503,
-0.17306958138942719,
0.3226950764656067,
0.049180347472429276,
-0.14095190167427063,
-0.1224580705165863,
0.058085668832063675,
0.35415780544281006,
0.06579633802175522,
-0.6768523454666138,
0.05470127612352371,
0.21409383416175842,
0.31055089831352234,
-0.15171360969543457,
-0.29347920417785645,
-0.2289036214351654,
-0.05556632950901985,
-0.29848527908325195,
0.023562707006931305,
0.479050874710083,
-0.12453767657279968,
-0.033789318054914474,
-0.26009267568588257,
0.2465207278728485,
0.029093563556671143,
0.28903841972351074,
0.14329828321933746,
0.436353862285614,
0.04087454825639725,
0.06989693641662598,
0.15065450966358185,
-0.3315136432647705,
0.13677527010440826,
-0.391897976398468,
-0.2172853648662567,
0.4094371199607849,
-0.29238301515579224,
0.025469690561294556,
0.05496702343225479,
-0.11312162131071091,
0.18538326025009155,
-0.6119527220726013,
-0.07263418287038803,
-0.07282773405313492,
-0.018444186076521873,
0.3016701638698578,
0.22130607068538666,
0.025423403829336166,
0.37649595737457275,
0.1900012046098709,
-0.03987640142440796,
-0.1052756980061531,
0.09362353384494781,
0.17672577500343323,
0.040447525680065155,
-0.214641734957695,
0.3554047644138336,
-0.010069875046610832,
0.19203300774097443,
0.19552645087242126,
0.09947486966848373,
-0.14425456523895264,
-0.4988395571708679,
-0.21775540709495544,
-0.0531412698328495,
-0.15746304392814636,
0.058992788195610046,
0.23427113890647888,
0.174785777926445,
0.2108200490474701,
0.3911106288433075,
0.1254551261663437,
0.13574442267417908,
-0.26606565713882446,
-0.16165979206562042,
-0.027757374569773674,
0.012359336018562317,
-0.1583588719367981,
-0.0778186023235321,
0.2974883019924164,
0.32203662395477295,
-0.013558797538280487,
-0.3009489178657532,
0.027401823550462723,
0.16370856761932373,
-0.04469095543026924,
0.24098694324493408,
-0.05075996741652489,
-0.14183856546878815,
0.0038408152759075165,
0.005615986883640289,
0.2531909644603729,
-0.14439713954925537,
0.02505418285727501,
-0.46887314319610596,
0.007730873301625252,
0.026051044464111328,
0.19112497568130493,
-0.2947770655155182,
0.11427219212055206,
0.45967692136764526,
0.004809100180864334,
-0.04333152621984482,
-0.06659400463104248,
-0.5038902163505554,
-0.12986697256565094,
0.13711488246917725,
-0.09964016079902649,
-0.17423169314861298,
-0.10114113241434097,
0.18196606636047363,
0.24526360630989075,
0.45802274346351624,
0.31402522325515747,
-0.06828607618808746,
0.3045540452003479,
-0.30636152625083923,
0.24305646121501923,
0.4785819947719574,
-0.2509545385837555,
-0.3570109009742737,
0.17548558115959167,
-0.13149787485599518,
0.3424200117588043,
0.1392749845981598,
-0.10016664862632751,
0.3185032606124878,
-0.09397057443857193,
0.7875937223434448,
0.5085933208465576,
-0.17767563462257385,
0.08603619039058685,
0.04890279844403267,
-0.13633319735527039,
0.290799081325531,
-0.20689481496810913,
-0.4083895683288574,
0.26495304703712463,
-0.07166285067796707,
-0.6204352378845215,
0.3668651282787323,
-0.3575787842273712,
0.5229240655899048,
-0.044254496693611145,
-0.011637512594461441,
0.18139737844467163,
0.11054335534572601,
-0.04970972612500191,
-0.32121410965919495,
0.05045434832572937,
-0.47218644618988037,
-0.0691334679722786,
-0.27951592206954956,
-0.37652909755706787,
0.28311648964881897,
-0.02540598250925541,
-0.14311662316322327,
0.17833417654037476,
-0.06837300956249237,
0.10403525084257126,
0.07005590200424194,
-0.31983742117881775,
-0.037954483181238174,
-0.00311962328851223,
0.5084161758422852,
-0.03504481539130211,
-0.3404653072357178,
0.055705174803733826,
0.1672784984111786,
0.022788792848587036,
-0.006516795605421066,
0.3403136730194092,
0.1915629506111145,
0.11259157955646515,
-0.025148268789052963,
0.3642779290676117,
-0.07589713484048843,
-0.10676807165145874,
-0.0672949030995369,
-0.12351541221141815,
0.0889974981546402,
0.1632351279258728,
0.18013490736484528,
0.13276444375514984,
0.14777681231498718,
-0.3033284842967987,
0.03345448523759842,
0.1943940669298172,
0.4510544538497925,
0.389299601316452,
-0.16440944373607635,
0.22330260276794434,
0.1480279117822647,
-0.007081527262926102,
-0.24980692565441132,
-0.05906229838728905,
-0.13255524635314941,
-0.41090428829193115,
0.11163488030433655,
0.3696215748786926,
-0.24875696003437042,
-0.014234550297260284,
0.3032204210758209,
-0.17379912734031677,
-0.09143009036779404,
0.32226118445396423,
-0.32294508814811707,
-0.08897092938423157,
-0.23202890157699585,
-0.049152277410030365,
0.39129018783569336,
0.11455629765987396,
0.052549269050359726,
0.0003547966480255127,
0.2733972668647766,
0.06675360351800919,
0.17993676662445068,
0.3572133779525757,
0.12265168130397797,
0.29430320858955383,
0.2966897189617157,
0.05094385892152786,
0.21167415380477905,
-0.18272855877876282,
0.11463748663663864,
-0.2009611427783966,
-0.27407488226890564,
-0.03297477960586548,
-0.30071431398391724,
-0.24112248420715332,
-0.09400282800197601,
-0.6241529583930969,
-0.10640642046928406,
-0.09255895018577576,
-0.3276703953742981,
0.15617501735687256,
0.0019386671483516693,
0.1567302793264389,
0.3113648593425751,
0.2525094151496887,
0.1468813270330429,
-0.11386580020189285,
-0.2093295007944107,
0.2589030861854553,
-0.15740209817886353,
-0.11980018019676208,
0.09044810384511948,
-0.0822337344288826,
-0.031029319390654564,
0.15325334668159485,
0.12308758497238159,
-0.38611260056495667,
0.09516733139753342,
-0.049193933606147766,
-0.14165204763412476,
-0.0676867812871933,
0.25984472036361694,
-0.17672564089298248,
-0.269134521484375,
-0.4320554733276367,
0.13877473771572113,
0.4844568967819214,
-0.07388351857662201,
0.23347634077072144,
0.17333035171031952,
-0.21243144571781158,
-0.14202482998371124,
0.06331674754619598,
-0.4500356912612915,
-0.2381855994462967,
0.1924772709608078,
-0.24472369253635406,
0.30575230717658997,
0.12760794162750244,
-0.007699346169829369,
-0.22201324999332428,
0.03731018304824829,
-0.13195402920246124,
-0.19937193393707275,
-0.29490551352500916,
0.5167879462242126,
0.0068189590238034725,
-0.050470020622015,
-0.19745062291622162,
-0.3042186498641968,
0.10428458452224731,
0.35157310962677,
0.09169045090675354,
0.2225436121225357,
-0.0817037969827652,
0.13607317209243774,
-0.1342049390077591,
0.27605172991752625,
0.09251908957958221,
0.3497768044471741,
0.06738042831420898,
-0.19555822014808655,
-0.0861729234457016,
0.024074099957942963,
0.2916771471500397,
0.5378679633140564,
0.3542543649673462,
0.36895549297332764,
-0.08884763717651367,
0.3364827632904053,
0.4768359065055847,
-0.16936883330345154,
-0.06424316763877869,
-0.1190275028347969,
-0.04016907140612602,
0.0518050380051136,
-0.4640164077281952,
-0.2759834825992584,
-0.067108154296875,
0.0808105617761612,
-0.07299147546291351,
0.020551664754748344,
-0.07197888195514679,
-0.07574138045310974,
0.19030910730361938,
-0.156817227602005,
-0.26092302799224854,
0.1636601835489273,
-0.5702655911445618,
0.4101032316684723,
-0.04544532299041748,
-0.11578413844108582,
-0.025756951421499252,
0.11173192411661148,
-0.12272396683692932,
-0.1382574886083603,
0.3710018992424011,
-0.13704080879688263,
-0.10139650106430054,
-0.5774657726287842,
-0.613866925239563,
0.42126578092575073,
0.38184091448783875,
0.7076692581176758,
0.27511879801750183,
0.04306669533252716,
-0.21692092716693878,
0.36646193265914917,
0.8846911191940308,
-0.16011036932468414,
-0.207808718085289,
0.2609565258026123,
0.3037528097629547,
0.007399184629321098,
-0.15038327872753143,
-0.02641124278306961,
0.25813284516334534,
0.1358499675989151,
0.26399654150009155,
-0.11949421465396881,
0.04437262937426567,
0.02570553496479988,
0.2620820105075836,
0.0388450063765049,
-0.13042408227920532,
-0.21183833479881287,
0.06259485334157944,
-0.4544297158718109,
-0.31529614329338074,
0.13868102431297302,
0.37717729806900024,
0.02280368283390999,
-0.33261728286743164,
0.298082560300827,
-0.0532960407435894,
0.3227187693119049,
-0.15930388867855072,
0.3301517963409424,
0.3675602674484253,
0.26352474093437195,
-0.11861597001552582,
-0.0004785209894180298,
0.3546622097492218,
0.09247948229312897,
0.11074365675449371,
-0.38511958718299866,
-0.19081121683120728,
-0.22868049144744873,
0.8005936741828918,
-0.11617857217788696,
-0.15178030729293823,
0.11596819758415222,
0.04164309799671173,
0.3199385702610016,
-0.0971917137503624,
-0.11266704648733139,
0.5000013709068298,
0.20511022210121155,
-0.6841661334037781,
-0.22856555879116058,
0.3346165120601654,
0.3721133768558502,
-0.048717763274908066,
0.5282231569290161,
-0.35910892486572266,
-0.3993411958217621,
0.12295176088809967,
-0.18796557188034058,
0.8104744553565979,
0.280656635761261,
0.2869448661804199,
0.2068529725074768,
0.019179508090019226,
-0.12068600207567215,
0.28284841775894165,
0.16294778883457184,
0.11750003695487976,
0.04826820269227028,
-0.26682478189468384,
-0.2325393408536911,
-0.15438005328178406,
0.2788066565990448,
-0.6055030226707458,
0.2223595678806305,
-0.33289557695388794,
0.061420198529958725,
0.03287111222743988,
-0.2326422780752182,
0.2286873161792755,
-0.6395847797393799,
-0.12245765328407288,
-0.09738405048847198,
0.061601053923368454,
0.054873187094926834,
-0.020205028355121613,
-0.2629017233848572,
-0.19230403006076813,
-0.1365160346031189,
-0.0900750458240509,
0.16124200820922852,
-0.17854242026805878,
0.17143569886684418,
0.2142772078514099,
-0.1753576695919037,
0.0911441296339035,
0.1776401400566101,
-0.27320051193237305,
0.17918221652507782,
0.2041134387254715,
-0.12833541631698608,
0.43495526909828186,
0.24687571823596954,
0.1129528284072876,
-0.25414374470710754,
0.019156470894813538,
0.2852339446544647,
-0.1597881317138672,
0.14704182744026184,
0.031526174396276474,
-0.2091851681470871,
-0.04016976058483124,
0.16761744022369385,
0.008690286427736282,
-0.3766920566558838,
-0.2941875159740448,
0.10019488632678986,
-0.09422150254249573,
-0.06760986894369125,
-0.02199661359190941,
0.11766809225082397,
-0.550072968006134,
0.5298992991447449,
-0.3257920742034912,
-0.0920272022485733,
0.030916566029191017,
0.2868727147579193,
0.27528542280197144,
-0.3729330599308014,
0.22273695468902588,
0.07295683026313782,
0.015599410980939865,
0.11458059400320053,
0.06938918679952621,
-0.38830649852752686,
0.18555563688278198,
0.2872679829597473,
0.20035454630851746,
0.09972138702869415,
-0.02034795470535755,
-0.04059121385216713,
-0.24874262511730194,
0.36328303813934326,
-0.1900269240140915,
-0.34681016206741333,
-0.5044994950294495,
0.003893911838531494,
0.19778765738010406,
0.18186074495315552,
-0.10507490485906601,
0.34944015741348267,
0.040806084871292114,
0.084446981549263,
-0.09710069000720978,
-0.13857820630073547,
0.08761683106422424,
0.2524101138114929,
0.2205836921930313,
0.28693729639053345,
-0.11553215235471725,
-0.14550524950027466,
-0.034776076674461365,
0.16809801757335663,
0.13376283645629883,
-0.055093344300985336,
0.05548962578177452,
0.13866712152957916,
0.30425259470939636,
-0.1774454116821289,
0.031832508742809296,
-0.07655367255210876,
-0.2714015245437622,
-0.3482481837272644,
-0.10105706751346588,
0.00920594111084938,
-0.06653055548667908,
-0.19172869622707367,
0.03806884586811066,
-0.14423134922981262,
0.28482115268707275,
-0.012489620596170425,
-0.03966161608695984,
-0.03954024612903595,
-0.20134684443473816,
0.2996276319026947,
-0.0722724050283432,
-0.01967974752187729,
-0.26619526743888855,
-0.07133582979440689,
0.37603116035461426,
-0.09857963770627975,
0.5121336579322815,
-0.15848025679588318,
-0.2799876630306244,
0.21699373424053192,
0.07284202426671982,
0.23147828876972198,
-0.3594455122947693,
0.09668668359518051,
-0.048317328095436096,
0.03508060798048973,
-0.19266986846923828,
-0.3877370059490204,
-0.035237643867731094,
-0.01731126382946968,
-0.021328985691070557,
0.05333753675222397,
-0.14787064492702484,
-0.3486165702342987,
-0.1669047772884369,
-0.0969751849770546,
0.04740755632519722,
-0.1768180876970291,
0.18455274403095245,
0.524527907371521,
0.3312748074531555,
0.2638002634048462,
0.12991897761821747,
0.28146153688430786,
0.04834481328725815,
0.40947437286376953,
0.15553361177444458,
0.11562153697013855,
0.494770348072052,
-0.26334893703460693,
0.10264864563941956,
-0.2168617844581604,
-0.207335963845253,
0.4737355411052704,
-0.16766297817230225,
0.25005701184272766,
0.34097790718078613,
0.07408727705478668,
-0.5041530132293701,
-0.14054512977600098,
0.25270313024520874,
0.2754362225532532,
0.0031443871557712555,
0.07327021658420563,
0.040868863463401794,
0.10470230132341385,
-0.003263317048549652,
-0.2869075536727905,
0.36756235361099243,
0.030222482979297638,
0.10282260924577713,
-0.04029300808906555,
0.1476946622133255,
0.13835443556308746,
-0.18091222643852234,
0.4327227473258972,
0.2085508108139038,
-0.3468816876411438,
-0.13699352741241455,
0.08077534288167953,
0.008060470223426819,
0.06880457699298859,
0.2673420011997223,
0.7353456020355225,
0.47099295258522034,
-0.08034861087799072,
0.34656333923339844,
-0.20745275914669037,
-0.11526215076446533,
0.012971997261047363,
0.10472936183214188,
0.11227504163980484,
-0.45358434319496155,
0.06616121530532837,
0.03642503172159195,
0.07664299011230469,
-0.03401092067360878,
0.1388607621192932,
0.33112478256225586,
-0.13408108055591583,
0.17784225940704346,
-0.21207116544246674,
-0.4543561637401581,
-0.13652826845645905,
-0.1410660743713379,
-0.17926117777824402,
-0.1258239597082138,
0.48747721314430237,
0.14314775168895721,
0.19470715522766113,
0.001763948705047369,
-0.006573682650923729,
0.1740042269229889,
0.16537468135356903,
0.4579635560512543,
0.0651826411485672,
-0.15763507783412933,
-0.29888224601745605,
-0.2382708042860031,
-0.3639291822910309,
0.07475971430540085,
-0.12177539616823196,
-0.0349104069173336,
0.05977720767259598,
-0.012490108609199524,
0.04215974360704422,
0.14633920788764954,
-0.0013370144879445434,
-0.14173464477062225,
0.19474834203720093,
-0.09352697432041168,
-0.18935173749923706,
0.07817526906728745,
0.4411728084087372,
-0.0268916804343462,
-0.3187960684299469,
0.38160738348960876,
-0.027791541069746017,
-0.0901377946138382,
-0.25334298610687256,
0.0815291702747345,
-0.024979325011372566,
0.0942310094833374,
0.10467690229415894,
0.2586115896701813,
0.16938745975494385,
-0.41768863797187805,
0.30351364612579346,
0.1725321263074875,
0.1287553608417511,
0.06643428653478622,
-0.009832561016082764,
0.06763956695795059,
0.08844857662916183,
-0.2443585991859436,
0.18266013264656067,
-0.09707127511501312,
-0.12463098764419556,
0.12613725662231445,
-0.10953838378190994,
-0.23908431828022003,
0.2102508395910263,
-0.28275585174560547,
0.10766306519508362,
-0.10643702000379562,
0.007354214787483215,
-0.07768487930297852,
0.09901466965675354,
-0.10699343681335449,
-0.3929286301136017,
0.31380540132522583,
-0.04756046086549759,
-0.6750685572624207,
-0.37799257040023804,
0.26865023374557495,
-0.3399238884449005,
0.10736147314310074,
-0.2142764925956726,
-0.24119427800178528,
0.2308560460805893,
0.007687816396355629,
-0.16700534522533417,
0.062431175261735916,
-0.195654034614563,
0.06539011001586914,
-0.16781969368457794,
0.11392833292484283,
0.049714259803295135,
-0.15973639488220215,
0.10680201649665833,
-0.2904764413833618
] |
https://github.com/huggingface/datasets/issues/5361 | How concatenate `Audio` elements using batch mapping | Thanks for the snippet!
One more question. I wonder why those two mappers are working so different that one taking 4 sec while other taking over 1 min :
```python
%%time
def mapper_function1(batch):
# list_audio
return {
"audio": [
{
"array": np.concatenate([audio["array"] for audio in batch["audio"]]),
"sampling_rate": 16_000,
}
]
}
dataset.map(
mapper_function1,
batched=True,
batch_size=3,
remove_columns=list(dataset.features),
)
# 100%
# 135/135 [01:13<00:00, 1.93ba/s]
# CPU times: user 1min 10s, sys: 3.21 s, total: 1min 13s
# Wall time: 1min 13s
# Dataset({
# features: ['audio'],
# num_rows: 135
# })
# --------------------------------
%%time
def mapper_function2(batch):
# list_audio
return {"audio": [np.concatenate([audio["array"] for audio in batch["audio"]])]}
dataset.map(
mapper_function2,
batched=True,
batch_size=3,
remove_columns=list(dataset.features),
)
# 100%
# 135/135 [00:03<00:00, 40.69ba/s]
# CPU times: user 1.88 s, sys: 1.48 s, total: 3.36 s
# Wall time: 4.8 s
# Dataset({
# features: ['audio'],
# num_rows: 135
# })
```
| ### Describe the bug
I am trying to do concatenate audios in a dataset e.g. `google/fleurs`.
```python
print(dataset)
# Dataset({
# features: ['path', 'audio'],
# num_rows: 24
# })
def mapper_function(batch):
# to merge every 3 audio
# np.concatnate(audios[i: i+3]) for i in range(i, len(batch), 3)
dataset = dataset.map(mapper_function, batch=True, batch_size=24)
print(dataset)
# Expected output:
# Dataset({
# features: ['path', 'audio'],
# num_rows: 8
# })
```
I tried to construct `result={}` dictionary inside the mapper function, I just found it will not work because it needs `byte` also needed :((
I'd appreciate if your share any use cases similar to my problem or any solutions really. Thanks!
cc: @lhoestq
### Steps to reproduce the bug
1. load audio dataset
2. try to merge every k audios and return as one
### Expected behavior
Merged dataset with a fewer rows. If we merge every 3 rows, then `n // 3` number of examples.
### Environment info
- `datasets` version: 2.1.0
- Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid
- Python version: 3.7.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5 | 144 | How concatenate `Audio` elements using batch mapping
### Describe the bug
I am trying to do concatenate audios in a dataset e.g. `google/fleurs`.
```python
print(dataset)
# Dataset({
# features: ['path', 'audio'],
# num_rows: 24
# })
def mapper_function(batch):
# to merge every 3 audio
# np.concatnate(audios[i: i+3]) for i in range(i, len(batch), 3)
dataset = dataset.map(mapper_function, batch=True, batch_size=24)
print(dataset)
# Expected output:
# Dataset({
# features: ['path', 'audio'],
# num_rows: 8
# })
```
I tried to construct `result={}` dictionary inside the mapper function, I just found it will not work because it needs `byte` also needed :((
I'd appreciate if your share any use cases similar to my problem or any solutions really. Thanks!
cc: @lhoestq
### Steps to reproduce the bug
1. load audio dataset
2. try to merge every k audios and return as one
### Expected behavior
Merged dataset with a fewer rows. If we merge every 3 rows, then `n // 3` number of examples.
### Environment info
- `datasets` version: 2.1.0
- Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid
- Python version: 3.7.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5
Thanks for the snippet!
One more question. I wonder why those two mappers are working so different that one taking 4 sec while other taking over 1 min :
```python
%%time
def mapper_function1(batch):
# list_audio
return {
"audio": [
{
"array": np.concatenate([audio["array"] for audio in batch["audio"]]),
"sampling_rate": 16_000,
}
]
}
dataset.map(
mapper_function1,
batched=True,
batch_size=3,
remove_columns=list(dataset.features),
)
# 100%
# 135/135 [01:13<00:00, 1.93ba/s]
# CPU times: user 1min 10s, sys: 3.21 s, total: 1min 13s
# Wall time: 1min 13s
# Dataset({
# features: ['audio'],
# num_rows: 135
# })
# --------------------------------
%%time
def mapper_function2(batch):
# list_audio
return {"audio": [np.concatenate([audio["array"] for audio in batch["audio"]])]}
dataset.map(
mapper_function2,
batched=True,
batch_size=3,
remove_columns=list(dataset.features),
)
# 100%
# 135/135 [00:03<00:00, 40.69ba/s]
# CPU times: user 1.88 s, sys: 1.48 s, total: 3.36 s
# Wall time: 4.8 s
# Dataset({
# features: ['audio'],
# num_rows: 135
# })
```
| [
-0.17016559839248657,
-0.15794973075389862,
-0.0626489520072937,
0.2809954881668091,
-0.11684735119342804,
0.03813529014587402,
0.2849518656730652,
0.1214766651391983,
-0.237911194562912,
0.35157859325408936,
-0.20486149191856384,
0.33640116453170776,
-0.02771107107400894,
-0.1652984917163849,
-0.04270452633500099,
-0.07086101919412613,
0.32561194896698,
0.4328076243400574,
0.05878294259309769,
-0.07467189431190491,
-0.37684008479118347,
0.10875910520553589,
-0.5113759636878967,
-0.05846436321735382,
-0.22041456401348114,
0.38313600420951843,
-0.34105390310287476,
-0.11359535902738571,
0.03223336488008499,
-0.23912577331066132,
0.20421132445335388,
0.0020282454788684845,
-0.04311096668243408,
0.719174325466156,
-0.00012709834845736623,
-0.13581421971321106,
0.29546093940734863,
-0.04954952746629715,
-0.20460982620716095,
-0.06594537198543549,
-0.6522868871688843,
-0.47585833072662354,
-0.4084460735321045,
-0.017431527376174927,
0.13961973786354065,
-0.26187095046043396,
-0.11681374907493591,
-0.6928625702857971,
-0.021204575896263123,
0.11894793063402176,
0.010900001972913742,
0.20457099378108978,
-0.05122201144695282,
0.19858752191066742,
0.12066818028688431,
0.10360142588615417,
0.12695814669132233,
-0.0664733350276947,
0.4834338426589966,
-0.10399236530065536,
0.1731528639793396,
0.09824135899543762,
-0.20873472094535828,
-0.048867326229810715,
0.09933964908123016,
0.34004780650138855,
0.04605952277779579,
-0.7255227565765381,
0.060074303299188614,
0.2267645001411438,
0.2752753496170044,
0.00971127673983574,
-0.2357688844203949,
-0.23049142956733704,
-0.21215596795082092,
-0.2604464888572693,
0.08165684342384338,
0.400323748588562,
-0.08544096350669861,
-0.09338274598121643,
-0.3079587519168854,
0.4142787754535675,
0.0706605613231659,
0.23991674184799194,
0.06777089834213257,
0.42005088925361633,
0.003725434187799692,
0.12386251240968704,
0.26613911986351013,
-0.31753742694854736,
0.20462217926979065,
-0.5269666314125061,
-0.12502533197402954,
0.4479247033596039,
-0.28555139899253845,
0.0011752545833587646,
0.12566730380058289,
-0.09869573265314102,
0.07018044590950012,
-0.4734489321708679,
-0.059780821204185486,
-0.08875089138746262,
0.021890930831432343,
0.21382299065589905,
0.11598263680934906,
0.03435398265719414,
0.3824915587902069,
0.21293403208255768,
-0.08376552164554596,
-0.12704342603683472,
-0.009615536779165268,
0.22261521220207214,
0.16203288733959198,
-0.2607884705066681,
0.3857443928718567,
0.004526693373918533,
0.07996900379657745,
0.17115917801856995,
0.13308802247047424,
-0.1212620660662651,
-0.4913787543773651,
-0.3188154995441437,
-0.012175462208688259,
-0.21958941221237183,
0.020815342664718628,
0.29797860980033875,
0.1332937479019165,
0.17578063905239105,
0.27823010087013245,
0.11542139202356339,
0.11916305869817734,
-0.23358963429927826,
-0.12482088804244995,
0.03328598663210869,
0.003885619342327118,
-0.16079401969909668,
-0.016722355037927628,
0.24461592733860016,
0.28190070390701294,
0.05234188586473465,
-0.2668716609477997,
-0.05175267532467842,
0.1755477637052536,
-0.12274906039237976,
0.22012126445770264,
0.0032513923943042755,
-0.21639083325862885,
-0.012750260531902313,
-0.044950589537620544,
0.25306782126426697,
-0.08637057989835739,
0.056413229554891586,
-0.2868708074092865,
0.029495354741811752,
0.09256279468536377,
0.19516156613826752,
-0.317528635263443,
0.10735833644866943,
0.41694027185440063,
-0.07518436014652252,
-0.06955607980489731,
-0.08214689791202545,
-0.4633476436138153,
-0.16867244243621826,
0.08230924606323242,
-0.13506890833377838,
-0.1543625146150589,
-0.07604075968265533,
0.20710591971874237,
0.2857499420642853,
0.5362300872802734,
0.3726899027824402,
-0.12398912757635117,
0.320896714925766,
-0.2635490894317627,
0.2650464177131653,
0.49922484159469604,
-0.2686048746109009,
-0.3449772000312805,
0.20538848638534546,
-0.14873087406158447,
0.3701866567134857,
0.18183648586273193,
-0.07343489676713943,
0.28987419605255127,
-0.1253245770931244,
0.7303541898727417,
0.47252702713012695,
-0.1268734335899353,
0.1328486204147339,
-0.008443236351013184,
-0.16139809787273407,
0.33338284492492676,
-0.20641931891441345,
-0.38308092951774597,
0.16022203862667084,
-0.18932831287384033,
-0.654544472694397,
0.33446842432022095,
-0.33974409103393555,
0.41139301657676697,
0.037792906165122986,
-0.09863248467445374,
0.08648879826068878,
0.05377937853336334,
0.0387984961271286,
-0.2899525761604309,
0.0536462664604187,
-0.6115187406539917,
0.00482279434800148,
-0.1620384305715561,
-0.3199235796928406,
0.2696380019187927,
-0.08757396042346954,
-0.13722245395183563,
0.12407061457633972,
-0.06966666877269745,
0.1751149743795395,
0.24663329124450684,
-0.34598690271377563,
0.055174317210912704,
-0.008778246119618416,
0.5440781712532043,
-0.008764205500483513,
-0.3287902772426605,
0.05240747332572937,
0.07209532707929611,
0.06554781645536423,
-0.04932021722197533,
0.24851375818252563,
0.21272346377372742,
0.033536601811647415,
-0.09354829788208008,
0.3538007140159607,
-0.04463578015565872,
-0.06803169846534729,
-0.034401021897792816,
-0.2056346982717514,
0.13258244097232819,
0.2159268856048584,
0.23757115006446838,
0.20986789464950562,
0.17205747961997986,
-0.36650604009628296,
-0.028145521879196167,
0.2025192528963089,
0.47896161675453186,
0.48606204986572266,
-0.05415976792573929,
0.040579333901405334,
0.050248004496097565,
0.04070549085736275,
-0.26680633425712585,
-0.014820326119661331,
-0.058955173939466476,
-0.36188602447509766,
0.2569860816001892,
0.4801790118217468,
-0.19218593835830688,
0.05404511094093323,
0.38370877504348755,
-0.1964738816022873,
-0.25650978088378906,
0.2684885561466217,
-0.3155168294906616,
-0.19969353079795837,
-0.20842158794403076,
-0.04273877292871475,
0.4600096344947815,
0.06673554331064224,
0.17146191000938416,
-0.13244880735874176,
0.24681128561496735,
0.015239696949720383,
0.2743273973464966,
0.3214274048805237,
0.06409064680337906,
0.1911793351173401,
0.3182375431060791,
0.045376330614089966,
0.18472912907600403,
-0.20503373444080353,
0.0217860396951437,
-0.2065284252166748,
-0.14082016050815582,
-0.07219211012125015,
-0.2794473469257355,
-0.2792675793170929,
-0.1014380231499672,
-0.6716275215148926,
-0.10982505977153778,
-0.16932089626789093,
-0.39897656440734863,
0.1369291990995407,
0.017490893602371216,
0.127046599984169,
0.3463212549686432,
0.21955035626888275,
0.07624033838510513,
0.007600933313369751,
-0.22172679007053375,
0.3229312598705292,
-0.22060731053352356,
-0.12065470218658447,
0.08348172903060913,
-0.12340641766786575,
-0.052029915153980255,
0.11516451090574265,
0.09348940849304199,
-0.2853197157382965,
0.01833578199148178,
-0.0653747096657753,
-0.08086956292390823,
-0.07457810640335083,
0.22097350656986237,
-0.15821202099323273,
-0.21184508502483368,
-0.4311574399471283,
0.15777112543582916,
0.4719129502773285,
-0.08690941333770752,
0.12531009316444397,
0.2335677146911621,
-0.26243916153907776,
-0.13134272396564484,
0.07190464437007904,
-0.43993574380874634,
-0.24886786937713623,
0.15771213173866272,
-0.2005433291196823,
0.30060890316963196,
0.03241908177733421,
-0.026625096797943115,
-0.16110728681087494,
0.1176968663930893,
0.0025868434458971024,
-0.1931384652853012,
-0.33095642924308777,
0.5374590158462524,
-0.04802171140909195,
-0.09442411363124847,
-0.34029388427734375,
-0.24258416891098022,
0.1275477558374405,
0.2749788165092468,
0.0877804160118103,
0.2230948656797409,
-0.2196677327156067,
0.07852572202682495,
-0.01441260427236557,
0.3302769660949707,
0.10030584782361984,
0.362506240606308,
0.04063980281352997,
-0.1553400754928589,
-0.15977084636688232,
-0.02574322372674942,
0.24455678462982178,
0.4129009544849396,
0.3246130049228668,
0.33786740899086,
-0.13452614843845367,
0.4479981064796448,
0.48533499240875244,
-0.18602916598320007,
-0.16028617322444916,
-0.05117103457450867,
-0.10801945626735687,
-0.06787344068288803,
-0.4334074556827545,
-0.27651047706604004,
-0.03236454725265503,
0.11486086249351501,
-0.043093398213386536,
0.010820630937814713,
-0.12930814921855927,
-0.1287342607975006,
0.1741189956665039,
-0.08210815489292145,
-0.21229715645313263,
0.10182442516088486,
-0.41368916630744934,
0.28480640053749084,
0.0044868104159832,
-0.04474836587905884,
-0.1529305875301361,
0.08850376307964325,
-0.21381695568561554,
-0.16936908662319183,
0.40964019298553467,
-0.19505222141742706,
-0.22142037749290466,
-0.5357655882835388,
-0.6561461687088013,
0.4270249605178833,
0.3589061200618744,
0.6147245168685913,
0.34498080611228943,
-0.07560870051383972,
-0.19315756857395172,
0.23123712837696075,
0.7751865983009338,
-0.12111862748861313,
-0.26657283306121826,
0.22646263241767883,
0.24473658204078674,
-0.014491235837340355,
-0.1654282659292221,
0.037800054997205734,
0.28737303614616394,
0.0947570949792862,
0.2812591791152954,
-0.11216451972723007,
-0.05016443505883217,
0.11237264424562454,
0.2589048743247986,
0.15605930984020233,
-0.08858145773410797,
-0.17333918809890747,
0.13020658493041992,
-0.363256573677063,
-0.335263729095459,
0.021829599514603615,
0.40518707036972046,
0.006653605494648218,
-0.34778285026550293,
0.37284377217292786,
-0.02286616712808609,
0.3344293534755707,
-0.1729336827993393,
0.2737187445163727,
0.26445555686950684,
0.31042152643203735,
-0.1573215276002884,
0.06614892929792404,
0.26813575625419617,
0.09437279403209686,
-0.015994630753993988,
-0.335061252117157,
-0.12853986024856567,
-0.20650483667850494,
0.7268482446670532,
0.05250172317028046,
-0.0988616868853569,
0.14450040459632874,
0.05835142731666565,
0.33645009994506836,
-0.08486262708902359,
-0.09164749085903168,
0.5579478740692139,
0.186829075217247,
-0.6624073386192322,
-0.2528345584869385,
0.36542651057243347,
0.4887158274650574,
-0.07483796775341034,
0.5661669373512268,
-0.4689587950706482,
-0.3855637311935425,
0.12675844132900238,
-0.2457783818244934,
0.9346653819084167,
0.32886719703674316,
0.35885632038116455,
0.2246602177619934,
-0.05153431370854378,
-0.13254371285438538,
0.2557830810546875,
0.18188928067684174,
0.17908957600593567,
0.06888221204280853,
-0.2399117648601532,
-0.29964977502822876,
-0.16024845838546753,
0.35179615020751953,
-0.5347778797149658,
0.24928779900074005,
-0.2570182681083679,
0.14791181683540344,
-0.038331449031829834,
-0.09475594758987427,
0.2853483557701111,
-0.6206601858139038,
-0.08843030780553818,
-0.09875588119029999,
0.181013286113739,
0.09194549918174744,
-0.03749340400099754,
-0.23875461518764496,
-0.31776008009910583,
-0.1317257583141327,
0.03599640727043152,
0.19617602229118347,
-0.13395972549915314,
0.21391694247722626,
0.17359058558940887,
-0.21970388293266296,
0.010129265487194061,
0.12707661092281342,
-0.38773804903030396,
0.13769342005252838,
0.27131637930870056,
-0.1398352086544037,
0.4465336799621582,
0.3493371605873108,
0.1488342434167862,
-0.3656536638736725,
0.059643130749464035,
0.2537408471107483,
-0.04189775139093399,
0.10100381821393967,
-0.09254161268472672,
-0.28590577840805054,
-0.16336362063884735,
0.28016984462738037,
0.08638719469308853,
-0.3504601716995239,
-0.3331255316734314,
0.1783141791820526,
-0.23216085135936737,
-0.0026979856193065643,
-0.014927353709936142,
0.06939463317394257,
-0.44963571429252625,
0.5447465181350708,
-0.26372087001800537,
-0.17772752046585083,
-0.017158690840005875,
0.2866984009742737,
0.3793790340423584,
-0.37995579838752747,
0.23091274499893188,
-0.035638660192489624,
-0.09435465186834335,
0.09408629685640335,
0.0031790807843208313,
-0.36705029010772705,
0.0887020006775856,
0.3216210603713989,
0.054794587194919586,
0.08689387142658234,
0.05533871427178383,
-0.05194305256009102,
-0.2145605832338333,
0.35134831070899963,
-0.21933357417583466,
-0.2589380145072937,
-0.5297731161117554,
-0.024506621062755585,
0.193766787648201,
0.17375437915325165,
-0.1590903252363205,
0.3350036144256592,
-0.006320873275399208,
0.11429125815629959,
-0.10525020956993103,
-0.1346692442893982,
0.12459255009889603,
0.2485215812921524,
0.18899409472942352,
0.20247074961662292,
-0.12259800732135773,
-0.05465580150485039,
-0.01495929155498743,
0.16554489731788635,
0.05383295193314552,
-0.04730893671512604,
0.08637991547584534,
0.15108852088451385,
0.26319003105163574,
-0.31449729204177856,
0.07230585813522339,
-0.12749075889587402,
-0.17486590147018433,
-0.3702867329120636,
-0.11733432114124298,
-0.07124792039394379,
-0.021087028086185455,
-0.3484354019165039,
0.05390691012144089,
-0.1694881021976471,
0.24144630134105682,
0.07860176265239716,
-0.07520647346973419,
-0.02391926944255829,
-0.16242794692516327,
0.2869649827480316,
-0.001356032444164157,
-0.04149787127971649,
-0.1807192862033844,
-0.020725451409816742,
0.39941173791885376,
-0.03911929577589035,
0.5384325981140137,
-0.168013334274292,
-0.2721349596977234,
0.18366284668445587,
0.05889243632555008,
0.28167736530303955,
-0.3275935649871826,
0.07997173815965652,
-0.10202143341302872,
0.05068047344684601,
-0.11638650298118591,
-0.3945155441761017,
-0.01181928999722004,
-0.07228519767522812,
0.04700512811541557,
0.025875627994537354,
-0.12429071962833405,
-0.159254789352417,
-0.06254951655864716,
-0.021573752164840698,
0.08085250109434128,
-0.17300623655319214,
0.20394469797611237,
0.4979678988456726,
0.3763646185398102,
0.29790180921554565,
0.26250743865966797,
0.24226467311382294,
0.041768379509449005,
0.2499815970659256,
0.19334366917610168,
0.2080855518579483,
0.4883682429790497,
-0.2532099485397339,
0.10462753474712372,
-0.13753429055213928,
-0.15240390598773956,
0.6168693900108337,
-0.14979183673858643,
0.2428971529006958,
0.3618442118167877,
0.1017579734325409,
-0.6362923979759216,
-0.16120757162570953,
0.2823162078857422,
0.30140221118927,
0.019457073882222176,
-0.0077295564115047455,
0.03767979145050049,
0.045474015176296234,
-0.049990080296993256,
-0.2450697273015976,
0.2871274948120117,
0.11207354068756104,
0.12536683678627014,
-0.07124349474906921,
0.21049940586090088,
0.18410196900367737,
-0.26106545329093933,
0.2699683904647827,
0.24708786606788635,
-0.2791520953178406,
-0.09995415061712265,
0.03743605315685272,
0.04299067705869675,
0.060966894030570984,
0.3084298074245453,
0.6963815689086914,
0.5438324809074402,
-0.08814798295497894,
0.3172680139541626,
-0.10919475555419922,
-0.13919594883918762,
0.02249617502093315,
0.20886370539665222,
0.05410941690206528,
-0.5537596344947815,
0.10320395231246948,
0.04166875034570694,
0.007703923620283604,
-0.07382652163505554,
0.22625064849853516,
0.24538445472717285,
-0.17741942405700684,
0.16343075037002563,
-0.22127020359039307,
-0.44239169359207153,
-0.06461254507303238,
-0.1854383647441864,
-0.24330469965934753,
-0.11899782717227936,
0.4111427962779999,
0.12048223614692688,
0.16946551203727722,
-0.03502539545297623,
-0.00343218632042408,
0.16659602522850037,
0.14258261024951935,
0.4711622893810272,
0.1245996430516243,
-0.2006102204322815,
-0.34664201736450195,
-0.2434123307466507,
-0.40017417073249817,
0.017358992248773575,
-0.08846016228199005,
-0.178528293967247,
0.18050344288349152,
0.050390031188726425,
0.01534665934741497,
0.22256039083003998,
-0.01891550049185753,
-0.12859685719013214,
0.1405571699142456,
-0.0884990245103836,
-0.06354890763759613,
0.16874960064888,
0.3285411596298218,
-0.02219747006893158,
-0.3887808620929718,
0.4622872769832611,
0.011199423111975193,
-0.053377702832221985,
-0.2711458206176758,
0.16443534195423126,
0.13227218389511108,
0.12203454226255417,
0.07852335274219513,
0.2516920566558838,
0.20034343004226685,
-0.3998298645019531,
0.18424886465072632,
0.19957926869392395,
0.27621302008628845,
0.05248915031552315,
-0.06054616719484329,
0.05801897495985031,
0.09085989743471146,
-0.21291714906692505,
0.17240968346595764,
-0.07924872636795044,
-0.1003289520740509,
0.08544154465198517,
-0.05603271350264549,
-0.155989408493042,
0.1393197923898697,
-0.33629629015922546,
0.09713970124721527,
-0.020542653277516365,
0.02990664914250374,
0.0007373020052909851,
0.09094565361738205,
-0.21135440468788147,
-0.35155388712882996,
0.31546351313591003,
-0.04377463459968567,
-0.6137723326683044,
-0.4005880057811737,
0.17093676328659058,
-0.3775891959667206,
0.2485962063074112,
-0.24846306443214417,
-0.30906838178634644,
0.22070534527301788,
-0.05664700269699097,
-0.1489904224872589,
0.14180967211723328,
-0.11051763594150543,
0.03147907927632332,
-0.1836828887462616,
0.07768884301185608,
0.05077645927667618,
-0.18372654914855957,
0.10393798351287842,
-0.26325589418411255
] |
https://github.com/huggingface/datasets/issues/5361 | How concatenate `Audio` elements using batch mapping | In the first one you get a dataset with an Audio type, and in the second one you get a dataset with a sequence of floats type.
The Audio type encodes the data as WAV to save disk space, so it takes more time to create.
The Audio type is automatically inferred because you modify the column "audio" which was already an Audio type. If you name it to something else, type inference will use a type struct with array and sampling rate fields. | ### Describe the bug
I am trying to do concatenate audios in a dataset e.g. `google/fleurs`.
```python
print(dataset)
# Dataset({
# features: ['path', 'audio'],
# num_rows: 24
# })
def mapper_function(batch):
# to merge every 3 audio
# np.concatnate(audios[i: i+3]) for i in range(i, len(batch), 3)
dataset = dataset.map(mapper_function, batch=True, batch_size=24)
print(dataset)
# Expected output:
# Dataset({
# features: ['path', 'audio'],
# num_rows: 8
# })
```
I tried to construct `result={}` dictionary inside the mapper function, I just found it will not work because it needs `byte` also needed :((
I'd appreciate if your share any use cases similar to my problem or any solutions really. Thanks!
cc: @lhoestq
### Steps to reproduce the bug
1. load audio dataset
2. try to merge every k audios and return as one
### Expected behavior
Merged dataset with a fewer rows. If we merge every 3 rows, then `n // 3` number of examples.
### Environment info
- `datasets` version: 2.1.0
- Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid
- Python version: 3.7.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5 | 84 | How concatenate `Audio` elements using batch mapping
### Describe the bug
I am trying to do concatenate audios in a dataset e.g. `google/fleurs`.
```python
print(dataset)
# Dataset({
# features: ['path', 'audio'],
# num_rows: 24
# })
def mapper_function(batch):
# to merge every 3 audio
# np.concatnate(audios[i: i+3]) for i in range(i, len(batch), 3)
dataset = dataset.map(mapper_function, batch=True, batch_size=24)
print(dataset)
# Expected output:
# Dataset({
# features: ['path', 'audio'],
# num_rows: 8
# })
```
I tried to construct `result={}` dictionary inside the mapper function, I just found it will not work because it needs `byte` also needed :((
I'd appreciate if your share any use cases similar to my problem or any solutions really. Thanks!
cc: @lhoestq
### Steps to reproduce the bug
1. load audio dataset
2. try to merge every k audios and return as one
### Expected behavior
Merged dataset with a fewer rows. If we merge every 3 rows, then `n // 3` number of examples.
### Environment info
- `datasets` version: 2.1.0
- Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid
- Python version: 3.7.12
- PyArrow version: 8.0.0
- Pandas version: 1.3.5
In the first one you get a dataset with an Audio type, and in the second one you get a dataset with a sequence of floats type.
The Audio type encodes the data as WAV to save disk space, so it takes more time to create.
The Audio type is automatically inferred because you modify the column "audio" which was already an Audio type. If you name it to something else, type inference will use a type struct with array and sampling rate fields. | [
-0.283815860748291,
-0.1815246194601059,
0.011311966925859451,
0.2613030672073364,
-0.0016877278685569763,
0.11715421825647354,
0.2005549818277359,
0.22513148188591003,
-0.1712481826543808,
0.31333786249160767,
-0.15931467711925507,
0.3396158218383789,
-0.015544786117970943,
-0.07089093327522278,
-0.05252022296190262,
-0.003914434462785721,
0.2702396512031555,
0.3639756441116333,
-0.011989466845989227,
0.02608565241098404,
-0.5162801146507263,
0.13902437686920166,
-0.49496495723724365,
-0.028034232556819916,
-0.27592167258262634,
0.26414692401885986,
-0.30738604068756104,
-0.08235607296228409,
-0.021723421290516853,
-0.1709412932395935,
0.18200545012950897,
-0.015934675931930542,
0.024098563939332962,
0.6651003956794739,
-0.00012843280273955315,
-0.20193004608154297,
0.20775434374809265,
-0.11867007613182068,
-0.20364737510681152,
-0.13181711733341217,
-0.7043360471725464,
-0.36989837884902954,
-0.38473308086395264,
0.04431528598070145,
0.16552075743675232,
-0.23904767632484436,
-0.09822674095630646,
-0.7081454992294312,
0.0544026643037796,
0.16916461288928986,
-0.029787126928567886,
0.0836307629942894,
0.027657192200422287,
0.16940245032310486,
0.12863712012767792,
0.25641345977783203,
0.16966933012008667,
-0.08173266053199768,
0.4951854646205902,
-0.15741504728794098,
0.2695179581642151,
0.08020037412643433,
-0.15283168852329254,
-0.09740307927131653,
0.05799597501754761,
0.34992510080337524,
0.11846161633729935,
-0.6955716609954834,
0.06079813838005066,
0.2259400486946106,
0.30855292081832886,
-0.06635451316833496,
-0.25712257623672485,
-0.19407057762145996,
-0.0756673663854599,
-0.23914659023284912,
0.08366719633340836,
0.4223213195800781,
-0.1655101329088211,
-0.046941470354795456,
-0.2423926740884781,
0.30381715297698975,
0.031757794320583344,
0.29884788393974304,
0.05624735355377197,
0.44086188077926636,
0.048945698887109756,
0.09919916093349457,
0.151950404047966,
-0.33478981256484985,
0.08495588600635529,
-0.4052501320838928,
-0.2619454264640808,
0.4365193843841553,
-0.22896911203861237,
0.014664851129055023,
0.07025855779647827,
-0.11817663162946701,
0.1580338478088379,
-0.6103867292404175,
-0.052388645708560944,
-0.05399022251367569,
0.009998627938330173,
0.315372109413147,
0.24763411283493042,
-0.04200965166091919,
0.27584338188171387,
0.18974938988685608,
-0.05814632028341293,
-0.16733823716640472,
0.036910634487867355,
0.18213003873825073,
0.05277638137340546,
-0.2116316556930542,
0.2923212945461273,
-0.03453928604722023,
0.153082475066185,
0.16719774901866913,
0.12399507313966751,
-0.1191122904419899,
-0.5270594358444214,
-0.16118842363357544,
-0.06728432327508926,
-0.1397867500782013,
0.005931105464696884,
0.27508342266082764,
0.19488327205181122,
0.2418128401041031,
0.35846710205078125,
0.117599718272686,
0.15196840465068817,
-0.27142149209976196,
-0.1553264707326889,
-0.05622347444295883,
-0.009730987250804901,
-0.08832402527332306,
-0.12592968344688416,
0.3321196436882019,
0.26431548595428467,
-0.021036416292190552,
-0.31773674488067627,
-0.03454044461250305,
0.1912584751844406,
-0.029126811772584915,
0.17554035782814026,
-0.03164294362068176,
-0.12988980114459991,
-0.04025110602378845,
-0.06032906472682953,
0.2823551297187805,
-0.15454575419425964,
0.018650110810995102,
-0.4640361964702606,
-0.004249874502420425,
0.04599146544933319,
0.19167953729629517,
-0.3521248400211334,
0.2047988623380661,
0.44550296664237976,
-0.035430412739515305,
-0.07273159176111221,
-0.14672933518886566,
-0.48760104179382324,
-0.13657145202159882,
0.12849116325378418,
-0.12299598753452301,
-0.22572171688079834,
-0.13450609147548676,
0.14368842542171478,
0.2758380174636841,
0.49142012000083923,
0.2910346984863281,
-0.07238156348466873,
0.3360373079776764,
-0.3152756989002228,
0.26536858081817627,
0.4487372934818268,
-0.21498622000217438,
-0.3184657692909241,
0.15483322739601135,
-0.13751928508281708,
0.3557891547679901,
0.15973009169101715,
-0.0798644945025444,
0.3668464720249176,
-0.12370599806308746,
0.812995195388794,
0.5227500200271606,
-0.21358245611190796,
0.08934592455625534,
0.03155815973877907,
-0.13511091470718384,
0.22565212845802307,
-0.23821687698364258,
-0.36167171597480774,
0.3391442596912384,
-0.02004699409008026,
-0.633117139339447,
0.2932814061641693,
-0.3440135717391968,
0.49367251992225647,
-0.09249605238437653,
0.06189136952161789,
0.15134558081626892,
0.09227015823125839,
-0.08198793977499008,
-0.32291334867477417,
0.022028014063835144,
-0.4983680546283722,
0.020033009350299835,
-0.24651364982128143,
-0.3453139066696167,
0.2772196829319,
-0.059302687644958496,
-0.03338119760155678,
0.2451217770576477,
-0.0910261943936348,
0.12836268544197083,
0.054236408323049545,
-0.3368086516857147,
-0.016482677310705185,
-0.05637558549642563,
0.4772779941558838,
-0.053846586495637894,
-0.31789660453796387,
-0.00909752119332552,
0.12654538452625275,
0.022183768451213837,
-0.009494796395301819,
0.33577513694763184,
0.11349015682935715,
0.10218123346567154,
-0.04516390338540077,
0.33875495195388794,
-0.05660247430205345,
-0.07862614095211029,
-0.12420559674501419,
-0.1413521021604538,
0.052479811012744904,
0.1869884580373764,
0.10524619370698929,
0.030336208641529083,
0.16319388151168823,
-0.33162060379981995,
0.09445831179618835,
0.2114095538854599,
0.508465588092804,
0.4020009934902191,
-0.16716942191123962,
0.21916860342025757,
0.16772010922431946,
0.018249232321977615,
-0.22509454190731049,
-0.07636129856109619,
-0.16642798483371735,
-0.32721489667892456,
0.09556861221790314,
0.3956843614578247,
-0.2736125588417053,
-0.038311950862407684,
0.27323225140571594,
-0.1527053713798523,
-0.07183549553155899,
0.31751155853271484,
-0.35170018672943115,
-0.11452388018369675,
-0.22429928183555603,
0.02272375300526619,
0.4585934281349182,
0.12233339250087738,
0.08296222984790802,
-0.08348988741636276,
0.2250315397977829,
0.06863464415073395,
0.21562427282333374,
0.30751103162765503,
0.014801195822656155,
0.2961430847644806,
0.27425673604011536,
0.08628112077713013,
0.20518702268600464,
-0.10871332883834839,
0.131268709897995,
-0.23053082823753357,
-0.35350853204727173,
-0.01869543269276619,
-0.283757746219635,
-0.23199844360351562,
-0.15184691548347473,
-0.6291466951370239,
-0.07404385507106781,
-0.1615118384361267,
-0.2945975661277771,
0.2403368055820465,
-0.0717574954032898,
0.17215058207511902,
0.270818293094635,
0.37439632415771484,
0.10201045870780945,
-0.09487878531217575,
-0.2185034453868866,
0.26134324073791504,
-0.20294183492660522,
-0.1166045069694519,
0.11107843369245529,
-0.029550187289714813,
-0.044536225497722626,
0.13609929382801056,
0.10698476433753967,
-0.3722061514854431,
0.029312536120414734,
-0.04319041222333908,
-0.12696482241153717,
0.009463544003665447,
0.3032430410385132,
-0.1091098040342331,
-0.2381356656551361,
-0.4503907263278961,
0.14214612543582916,
0.47700464725494385,
-0.1351582258939743,
0.23522421717643738,
0.11838547140359879,
-0.21630099415779114,
-0.1465994417667389,
0.09983853250741959,
-0.4202345013618469,
-0.24120371043682098,
0.1330231875181198,
-0.207675501704216,
0.32337772846221924,
0.10508719831705093,
-0.019611448049545288,
-0.21210496127605438,
0.010200146585702896,
-0.09913704544305801,
-0.21204768121242523,
-0.3320525884628296,
0.5174047350883484,
0.04562341794371605,
-0.03776786848902702,
-0.18180499970912933,
-0.3491618037223816,
0.07152026146650314,
0.36215847730636597,
0.07031157612800598,
0.21447573602199554,
-0.09522051364183426,
0.1610831767320633,
-0.11159868538379669,
0.28717076778411865,
0.11545228958129883,
0.36129030585289,
0.08110341429710388,
-0.22061890363693237,
-0.02362632565200329,
0.021959908306598663,
0.31543686985969543,
0.5353954434394836,
0.3279586732387543,
0.290348082780838,
-0.1436610370874405,
0.3779679536819458,
0.4514121115207672,
-0.23361177742481232,
-0.05785360187292099,
-0.10363199561834335,
-0.013364080339670181,
-0.0334240198135376,
-0.4013793170452118,
-0.27527058124542236,
-0.08725246787071228,
0.09780294448137283,
-0.028527110815048218,
0.011134224012494087,
-0.10080724209547043,
-0.09050215780735016,
0.32476428151130676,
-0.14349311590194702,
-0.30468904972076416,
0.24035267531871796,
-0.5670802593231201,
0.30588823556900024,
-0.028939520940184593,
-0.11049142479896545,
-0.07778266817331314,
0.1009809821844101,
-0.11796458065509796,
-0.14980219304561615,
0.33479970693588257,
-0.1649322807788849,
-0.12162582576274872,
-0.5629473328590393,
-0.6440073251724243,
0.45776820182800293,
0.4149538278579712,
0.6578949093818665,
0.23522533476352692,
0.0012799836695194244,
-0.21415333449840546,
0.3738365173339844,
0.8084638118743896,
-0.18380573391914368,
-0.2668491005897522,
0.22295206785202026,
0.3545176088809967,
0.10304004698991776,
-0.10703170299530029,
-0.07934794574975967,
0.19719694554805756,
0.1351449191570282,
0.2253023087978363,
-0.13477928936481476,
0.056878190487623215,
0.07456862926483154,
0.24191710352897644,
0.11008276045322418,
-0.10636009275913239,
-0.1911955624818802,
0.10712072998285294,
-0.38366174697875977,
-0.2689319849014282,
0.20420962572097778,
0.3560035526752472,
-0.014638150110840797,
-0.3672742247581482,
0.22476929426193237,
-0.02036813274025917,
0.35270315408706665,
-0.14495883882045746,
0.31342488527297974,
0.38613271713256836,
0.2588476240634918,
-0.12678994238376617,
0.04879601299762726,
0.3722516894340515,
0.1231304407119751,
0.031405188143253326,
-0.3566075563430786,
-0.13147225975990295,
-0.20312127470970154,
0.7737074494361877,
-0.02795960009098053,
-0.11772242188453674,
0.12308052182197571,
0.09526900202035904,
0.31879353523254395,
-0.18286702036857605,
-0.020641794428229332,
0.5071491599082947,
0.23693600296974182,
-0.6285685896873474,
-0.2824726104736328,
0.3228762447834015,
0.35944366455078125,
-0.08256630599498749,
0.5756607055664062,
-0.33313989639282227,
-0.4335421323776245,
0.18927112221717834,
-0.16375485062599182,
0.880272388458252,
0.2902829051017761,
0.28453612327575684,
0.20080092549324036,
0.03588247299194336,
-0.07642265409231186,
0.3590623140335083,
0.18264766037464142,
0.10930049419403076,
0.07582992315292358,
-0.2854415476322174,
-0.24800314009189606,
-0.13031819462776184,
0.24857810139656067,
-0.636628270149231,
0.14116907119750977,
-0.2809978723526001,
0.12060311436653137,
0.014521317556500435,
-0.25250884890556335,
0.182397723197937,
-0.6509038805961609,
-0.0909966230392456,
-0.10261144489049911,
0.08628135919570923,
0.06063198298215866,
-0.024119794368743896,
-0.22595006227493286,
-0.2410888373851776,
-0.17924052476882935,
-0.13653984665870667,
0.1532415747642517,
-0.15338611602783203,
0.20414280891418457,
0.20419049263000488,
-0.13011616468429565,
0.09639354050159454,
0.1492404192686081,
-0.29769253730773926,
0.1587730050086975,
0.18676097691059113,
-0.1048596203327179,
0.5139611959457397,
0.2632794678211212,
0.16161684691905975,
-0.2859598398208618,
0.08896107226610184,
0.2944660782814026,
-0.1404714584350586,
0.1580822467803955,
-0.021365061402320862,
-0.2339499592781067,
-0.020788758993148804,
0.1630333960056305,
0.06557736545801163,
-0.3918907642364502,
-0.3811924457550049,
0.07737184315919876,
-0.08946329355239868,
-0.05482619255781174,
-0.030208628624677658,
0.09307588636875153,
-0.5130077600479126,
0.5587892532348633,
-0.342769056558609,
-0.16541936993598938,
0.02181144803762436,
0.25128597021102905,
0.2344224452972412,
-0.30896714329719543,
0.21967841684818268,
0.08011122047901154,
-0.005374360829591751,
0.11993331462144852,
0.1081501916050911,
-0.31739526987075806,
0.10536044090986252,
0.2717124819755554,
0.18644176423549652,
-0.006601616740226746,
-0.026151088997721672,
0.08420884609222412,
-0.18548166751861572,
0.32143470644950867,
-0.1811046451330185,
-0.36872363090515137,
-0.4986552298069,
0.06169566512107849,
0.17320087552070618,
0.20247849822044373,
-0.10910028964281082,
0.3475346565246582,
0.020740577951073647,
0.13388928771018982,
-0.09789640456438065,
-0.1493310034275055,
0.04695870727300644,
0.28110042214393616,
0.15331824123859406,
0.3081718981266022,
-0.1139591634273529,
-0.13520359992980957,
-0.049094170331954956,
0.19340690970420837,
0.07658776640892029,
-0.036453455686569214,
0.052296232432127,
0.16114255785942078,
0.2840389609336853,
-0.18681468069553375,
0.034363631159067154,
-0.09731420874595642,
-0.26595011353492737,
-0.3761548697948456,
-0.11258137226104736,
0.03704555332660675,
-0.13153180480003357,
-0.29867327213287354,
0.0465489998459816,
-0.1325097680091858,
0.27861249446868896,
0.06402149051427841,
-0.021785736083984375,
-0.03674304485321045,
-0.2622641324996948,
0.28733184933662415,
-0.12459812313318253,
-0.02632719650864601,
-0.18151505291461945,
0.015479035675525665,
0.42817938327789307,
-0.10666073113679886,
0.5078242421150208,
-0.10295282304286957,
-0.27221834659576416,
0.23676176369190216,
0.05637983977794647,
0.2512068748474121,
-0.30140578746795654,
0.09350310266017914,
0.005129773169755936,
0.028877990320324898,
-0.157041996717453,
-0.3504379689693451,
-0.03237856924533844,
-0.03646098077297211,
0.009180121123790741,
0.09887564927339554,
-0.15444597601890564,
-0.28004440665245056,
-0.1955137401819229,
-0.1048196330666542,
0.016061976552009583,
-0.1432490050792694,
0.1864168494939804,
0.49462196230888367,
0.3157990276813507,
0.29826971888542175,
0.12438604980707169,
0.32124125957489014,
0.05558392405509949,
0.3230133652687073,
0.12572966516017914,
0.05059216544032097,
0.4345259964466095,
-0.2600647211074829,
0.13677872717380524,
-0.2805715799331665,
-0.027670200914144516,
0.5576369762420654,
-0.17263278365135193,
0.3074008822441101,
0.4383294880390167,
0.11702392250299454,
-0.6108904480934143,
-0.1534562110900879,
0.17982695996761322,
0.21478721499443054,
0.009697960689663887,
0.033939704298973083,
-0.0183562021702528,
0.0993940457701683,
-0.018189214169979095,
-0.3164633810520172,
0.3479952812194824,
0.0660642459988594,
0.14714641869068146,
-0.05182654410600662,
0.21871410310268402,
0.1015131026506424,
-0.2567126452922821,
0.3661137819290161,
0.1850006878376007,
-0.3729875981807709,
-0.06917247921228409,
0.005235128104686737,
-0.00957036018371582,
0.16706760227680206,
0.3015521466732025,
0.7364449501037598,
0.5379815697669983,
-0.06817084550857544,
0.3230406939983368,
-0.18951819837093353,
-0.14004641771316528,
-0.014555444940924644,
0.13476577401161194,
0.12359653413295746,
-0.4878964424133301,
0.12805797159671783,
0.04160076379776001,
0.05728922039270401,
-0.06907887756824493,
0.13207373023033142,
0.376272588968277,
-0.10584242641925812,
0.16235339641571045,
-0.22438055276870728,
-0.42899036407470703,
-0.05945029854774475,
-0.13880228996276855,
-0.16060195863246918,
-0.07013490796089172,
0.3756902813911438,
0.028400853276252747,
0.18358924984931946,
0.049064069986343384,
-0.014622656628489494,
0.23899903893470764,
0.17543572187423706,
0.4632709324359894,
0.0805380791425705,
-0.17476309835910797,
-0.27852970361709595,
-0.3019404411315918,
-0.3352416753768921,
0.07294301688671112,
-0.1163712590932846,
-0.08545394986867905,
0.05674903839826584,
0.08033743500709534,
0.08987350761890411,
0.13440833985805511,
-0.043188173323869705,
-0.1144789382815361,
0.22655458748340607,
-0.11508576571941376,
-0.19930395483970642,
0.08175470679998398,
0.43407684564590454,
-0.09384777396917343,
-0.33439239859580994,
0.42103028297424316,
0.01904863864183426,
-0.09391085803508759,
-0.17917858064174652,
0.06231445074081421,
-0.00634746253490448,
0.053355395793914795,
0.05245550721883774,
0.2913382053375244,
0.286285400390625,
-0.4179270565509796,
0.3123035132884979,
0.1822241097688675,
0.08548056334257126,
0.05136599764227867,
-0.041774503886699677,
0.04707489535212517,
0.17143680155277252,
-0.2600693106651306,
0.19383907318115234,
-0.08134352415800095,
-0.15460842847824097,
0.14524702727794647,
-0.11197750270366669,
-0.339926540851593,
0.25100576877593994,
-0.36802488565444946,
0.13605499267578125,
-0.05717485025525093,
0.026186831295490265,
-0.058859653770923615,
0.1198803186416626,
-0.06273624300956726,
-0.42915645241737366,
0.30834317207336426,
-0.11946311593055725,
-0.6631954908370972,
-0.4045039117336273,
0.2630123496055603,
-0.38464802503585815,
0.14822497963905334,
-0.29608795046806335,
-0.26210325956344604,
0.19069629907608032,
-0.024998068809509277,
-0.12197983264923096,
0.07589653134346008,
-0.1520998626947403,
0.040875788778066635,
-0.22188182175159454,
0.18372541666030884,
0.01609032042324543,
-0.11129127442836761,
0.0631662905216217,
-0.341238796710968
] |
https://github.com/huggingface/datasets/issues/5360 | IterableDataset returns duplicated data using PyTorch DDP | If you use huggingface trainer, you will find the trainer has wrapped a `IterableDatasetShard` to avoid duplication.
See:
https://github.com/huggingface/transformers/blob/dfd818420dcbad68e05a502495cf666d338b2bfb/src/transformers/trainer.py#L835
| As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()` | 19 | IterableDataset returns duplicated data using PyTorch DDP
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
If you use huggingface trainer, you will find the trainer has wrapped a `IterableDatasetShard` to avoid duplication.
See:
https://github.com/huggingface/transformers/blob/dfd818420dcbad68e05a502495cf666d338b2bfb/src/transformers/trainer.py#L835
| [
-0.2054106891155243,
-0.6485092639923096,
-0.039012398570775986,
0.5450439453125,
0.18843498826026917,
-0.24366050958633423,
0.3833633363246918,
0.19024330377578735,
-0.1375221610069275,
0.3084796071052551,
-0.2490679919719696,
0.37759658694267273,
-0.07860704511404037,
0.08367696404457092,
0.18503421545028687,
-0.10264363884925842,
-0.09887086600065231,
0.05796410143375397,
-0.4747410714626312,
-0.1112917810678482,
-0.04930029809474945,
0.3540259897708893,
0.09849922358989716,
-0.24866996705532074,
-0.47420474886894226,
0.10485146939754486,
-0.347602903842926,
0.2176995873451233,
0.21229058504104614,
-0.23203693330287933,
0.2931748926639557,
0.12325289845466614,
-0.14268791675567627,
0.5608821511268616,
-0.00010908127296715975,
0.12395288050174713,
-0.037771739065647125,
0.06315920501947403,
-0.13434652984142303,
-0.08914925158023834,
0.21731504797935486,
-0.016845840960741043,
0.07947903126478195,
-0.2099572867155075,
-0.3113585114479065,
-0.2595774233341217,
-0.05450107157230377,
-0.11025124788284302,
0.5691199898719788,
0.13385041058063507,
0.2412479668855667,
0.5066378116607666,
-0.1751299947500229,
-0.06488651782274246,
-0.08085115998983383,
0.2806302309036255,
0.06372363120317459,
0.3473808169364929,
0.2466638833284378,
0.28397780656814575,
-0.27712658047676086,
0.3412993848323822,
0.08822751045227051,
0.30431655049324036,
0.16760560870170593,
-0.013306989334523678,
-0.1605270802974701,
-0.06119652837514877,
0.3744896650314331,
0.298776775598526,
0.18648457527160645,
-0.30981382727622986,
-0.031264983117580414,
-0.40201646089553833,
0.0732765942811966,
-0.042631521821022034,
0.03820355609059334,
0.11006220430135727,
0.03320198133587837,
-0.16071228682994843,
-0.3463342487812042,
0.2909385561943054,
-0.17590264976024628,
-0.1452626883983612,
-0.0029605738818645477,
0.3332239091396332,
-0.17893630266189575,
0.2330995500087738,
0.17546086013317108,
0.1613142490386963,
0.1662435531616211,
-0.06766939163208008,
0.18483124673366547,
-0.08150556683540344,
-0.14393308758735657,
-0.21729424595832825,
0.10882258415222168,
-0.09226176887750626,
0.17718490958213806,
0.07617108523845673,
0.13576999306678772,
0.17630958557128906,
0.14611589908599854,
-0.02974686771631241,
0.26706376671791077,
0.15872259438037872,
-0.14742472767829895,
0.19382774829864502,
0.1124667078256607,
-0.09816788882017136,
-0.17034588754177094,
-0.02674553543329239,
0.16950055956840515,
-0.025018546730279922,
0.1551334708929062,
-0.12457358092069626,
0.26794642210006714,
-0.08231140673160553,
-0.21754150092601776,
-0.19772969186306,
-0.1985832154750824,
-0.14061355590820312,
0.0400066077709198,
0.26851871609687805,
-0.11732948571443558,
0.05456817150115967,
-0.0789300948381424,
0.09700479358434677,
-0.16065941751003265,
0.10393016040325165,
-0.3797427713871002,
-0.13593368232250214,
0.00006002560257911682,
0.1395314335823059,
0.16696898639202118,
-0.4020610451698303,
0.6379592418670654,
0.12355297058820724,
0.22950591146945953,
-0.1509474813938141,
0.042188048362731934,
0.05609346553683281,
0.3107345998287201,
0.0032447874546051025,
0.02717619761824608,
-0.09018898010253906,
0.04474496468901634,
0.16031435132026672,
-0.13624216616153717,
-0.0560845211148262,
-0.1088777408003807,
-0.3889714181423187,
-0.03548508137464523,
0.2411920130252838,
-0.069968581199646,
0.043040432035923004,
0.051716528832912445,
0.1772170215845108,
0.24935343861579895,
-0.040198612958192825,
0.08334216475486755,
-0.04226420819759369,
-0.4896843731403351,
-0.09207948297262192,
0.07978609204292297,
0.26915591955184937,
0.20922625064849854,
-0.31383562088012695,
0.23943045735359192,
-0.0470244474709034,
-0.06391417235136032,
0.42185020446777344,
-0.22264547646045685,
0.2273334264755249,
-0.4089610278606415,
-0.09505096077919006,
0.012635305523872375,
-0.1803000420331955,
-0.3831321895122528,
0.1960325986146927,
-0.11052622646093369,
0.1661043018102646,
0.07760481536388397,
0.1755932718515396,
0.08265937119722366,
0.09688587486743927,
-0.025068871676921844,
-0.07026224583387375,
-0.03614071011543274,
0.06739213317632675,
-0.23457196354866028,
0.17808817327022552,
0.2598249316215515,
0.0721464604139328,
0.00861426442861557,
0.13233567774295807,
0.006400555372238159,
0.06637386232614517,
0.38963720202445984,
-0.056049417704343796,
-0.07339922338724136,
0.25245970487594604,
-0.11159925162792206,
-0.2060418576002121,
0.24891462922096252,
-0.15828675031661987,
-0.24998679757118225,
0.17574509978294373,
-0.3192289471626282,
0.004589460790157318,
0.035410597920417786,
-0.2896537184715271,
-0.15081346035003662,
0.055434226989746094,
-0.30232229828834534,
-0.3299762010574341,
0.16932305693626404,
0.30329659581184387,
0.34820881485939026,
-0.3366217315196991,
-0.15575920045375824,
0.2911013960838318,
-0.40790894627571106,
-0.22565867006778717,
-0.4968259334564209,
0.20528535544872284,
-0.11760056763887405,
0.06397591531276703,
0.24113288521766663,
0.48313528299331665,
0.2001630961894989,
-0.27063074707984924,
0.07222257554531097,
0.19402918219566345,
-0.30599644780158997,
0.13497976958751678,
-0.07866308838129044,
0.15578852593898773,
0.3634623885154724,
-0.14704811573028564,
-0.08223932236433029,
0.22445283830165863,
0.14785845577716827,
-0.18425965309143066,
-0.27938634157180786,
0.29586195945739746,
-0.04053869470953941,
0.023309819400310516,
0.1357247680425644,
-0.17197667062282562,
0.03194081783294678,
-0.009698037058115005,
-0.17165446281433105,
-0.07560915499925613,
0.09764255583286285,
-0.1032475084066391,
0.4498829245567322,
0.2730778753757477,
-0.48365476727485657,
0.1899382472038269,
0.4379222095012665,
-0.07672791928052902,
-0.00224478542804718,
0.10122378915548325,
-0.12040445953607559,
-0.2354741394519806,
0.16166093945503235,
-0.03866475075483322,
0.39061444997787476,
0.2930872440338135,
0.24073921144008636,
0.18435488641262054,
0.007165146060287952,
-0.09474527090787888,
0.005770295858383179,
0.0031164363026618958,
0.022315751761198044,
0.24044513702392578,
0.33066442608833313,
-0.10401325672864914,
-0.597690224647522,
0.050236959010362625,
-0.093732550740242,
0.09800000488758087,
-0.10965095460414886,
0.19700537621974945,
-0.10875062644481659,
-0.20324888825416565,
-0.41630008816719055,
0.11487971991300583,
-0.37459027767181396,
-0.1382369101047516,
0.11073289811611176,
0.5184716582298279,
0.061111513525247574,
0.24795211851596832,
0.38939619064331055,
0.17045581340789795,
-0.048505254089832306,
-0.002506054937839508,
-0.13994061946868896,
-0.018993660807609558,
-0.2765485346317291,
0.1417369395494461,
-0.05244693532586098,
-0.23255744576454163,
0.5555954575538635,
-0.15392252802848816,
-0.1030973345041275,
-0.48351049423217773,
-0.23984208703041077,
0.2585902810096741,
-0.16828788816928864,
-0.280987948179245,
0.08903858065605164,
-0.018536843359470367,
-0.06016433984041214,
-0.10285291075706482,
0.20228487253189087,
-0.3616122603416443,
-0.23789513111114502,
-0.005959764122962952,
-0.09378185868263245,
-0.2005482167005539,
-0.1453372836112976,
-0.3986855447292328,
-0.053606607019901276,
-0.07587960362434387,
0.37284207344055176,
0.04357253387570381,
0.24076709151268005,
0.3557662069797516,
0.012283063493669033,
0.2583398222923279,
0.08687599003314972,
0.008617212995886803,
-0.4226168096065521,
-0.48198625445365906,
0.06714924424886703,
-0.1678086519241333,
-0.4566257894039154,
-0.39395397901535034,
-0.15079265832901,
0.32226288318634033,
-0.0014318237081170082,
-0.501510739326477,
-0.561872661113739,
-0.23808301985263824,
-0.040026936680078506,
-0.07891996949911118,
0.1936110556125641,
0.5717711448669434,
-0.08941327035427094,
-0.16392594575881958,
-0.040557291358709335,
-0.1956295520067215,
0.29474374651908875,
0.13316869735717773,
0.18890206515789032,
-0.0788419172167778,
0.0194043330848217,
0.11842420697212219,
0.5329096913337708,
0.4655194580554962,
-0.1656447947025299,
0.2027636170387268,
-0.45879456400871277,
0.3244868814945221,
-0.14133378863334656,
-0.40692564845085144,
0.23081092536449432,
-0.14231547713279724,
-0.0015588346868753433,
0.3831501007080078,
-0.034278810024261475,
0.040995288640260696,
0.029669709503650665,
-0.06453046202659607,
-0.050703831017017365,
-0.16808851063251495,
-0.07386010140180588,
0.06843456625938416,
0.19928237795829773,
0.08601784706115723,
0.22617387771606445,
-0.05115132033824921,
-0.09238675981760025,
0.02234070748090744,
-0.1847047060728073,
0.03951208293437958,
0.002669218461960554,
-0.12917466461658478,
-0.11010425537824631,
-0.6856524348258972,
0.2755320072174072,
0.1727047711610794,
0.0181074570864439,
-0.0791279673576355,
-0.06825657933950424,
0.33660322427749634,
-0.14970070123672485,
0.6023070216178894,
0.2310895323753357,
-0.011852055788040161,
-0.1209162175655365,
-0.5233232975006104,
-0.4959404468536377,
0.1674278974533081,
-0.1542690098285675,
0.31044694781303406,
0.11486251652240753,
0.45970797538757324,
-0.32126477360725403,
-0.1933741420507431,
0.127388596534729,
0.2193792164325714,
-0.1998244673013687,
-0.11065243184566498,
-0.4420347809791565,
-0.42558765411376953,
-0.19458763301372528,
0.09732724726200104,
0.07796474546194077,
0.2915194034576416,
0.12511776387691498,
-0.10085136443376541,
-0.03854744881391525,
-0.2378692924976349,
0.08335693180561066,
0.29029229283332825,
0.23376747965812683,
0.054939091205596924,
0.07114098966121674,
0.3356132209300995,
0.3652399182319641,
-0.06408656388521194,
0.6547994017601013,
-0.165018230676651,
0.031232934445142746,
0.0415104478597641,
-0.13080459833145142,
0.14320260286331177,
0.3922737240791321,
-0.005431578494608402,
-0.06433714181184769,
0.06039516255259514,
0.0992828756570816,
-0.32620787620544434,
-0.023382052779197693,
0.334086537361145,
0.09998896718025208,
-0.1091032400727272,
-0.2716418206691742,
0.34754079580307007,
-0.038363587111234665,
0.007236406207084656,
0.42452937364578247,
0.08270157128572464,
-0.034727856516838074,
0.14917191863059998,
0.007057741284370422,
0.865419864654541,
-0.012391358613967896,
0.12010760605335236,
0.345674067735672,
-0.24749380350112915,
0.17818699777126312,
-0.02963995561003685,
0.27271443605422974,
-0.36859458684921265,
-0.11536532640457153,
0.12400166690349579,
0.08255033195018768,
-0.21449145674705505,
0.035187821835279465,
-0.07892468571662903,
0.20731982588768005,
0.2389390915632248,
0.026204196736216545,
-0.26259881258010864,
0.45144420862197876,
-0.15262217819690704,
-0.09572897851467133,
-0.24890318512916565,
0.2164391279220581,
-0.16605031490325928,
0.39071062207221985,
0.028424814343452454,
-0.06213076412677765,
0.35324370861053467,
-0.33327317237854004,
-0.1332387626171112,
0.10928919166326523,
-0.10120268911123276,
0.16583724319934845,
0.18516728281974792,
-0.5421772003173828,
-0.24489445984363556,
0.31468555331230164,
0.300976425409317,
-0.17349669337272644,
-0.13825756311416626,
0.05084537714719772,
-0.2763374447822571,
0.32789546251296997,
-0.2031797617673874,
0.023840367794036865,
-0.07547995448112488,
-0.10003729164600372,
-0.17585556209087372,
-0.21158114075660706,
0.2656823992729187,
-0.24073442816734314,
-0.08788692951202393,
0.2594660520553589,
-0.13512977957725525,
-0.2466682344675064,
0.3155216872692108,
0.1268237978219986,
-0.2976054251194,
-0.374419242143631,
0.13558842241764069,
-0.06902483105659485,
-0.34186121821403503,
0.05237749218940735,
0.14565163850784302,
-0.37465909123420715,
-0.13219121098518372,
0.5126069784164429,
0.26970207691192627,
0.3249761760234833,
0.2407386600971222,
0.0735379159450531,
0.0059957355260849,
-0.1745385229587555,
-0.13617858290672302,
0.2040434628725052,
-0.49827122688293457,
0.142323300242424,
-0.12041718512773514,
0.013571098446846008,
-0.17790570855140686,
0.38022559881210327,
-0.08077891170978546,
0.22547033429145813,
-0.12663228809833527,
0.020039550960063934,
-0.566292405128479,
-0.07936717569828033,
0.126181498169899,
0.46065208315849304,
0.1604924201965332,
0.13149766623973846,
0.09286057949066162,
0.3630307912826538,
-0.3979354202747345,
-0.1283336579799652,
-0.16312111914157867,
0.10880277305841446,
-0.043300382792949677,
-0.3321964144706726,
0.3382328450679779,
0.014949236065149307,
0.16826075315475464,
0.2863260507583618,
-0.052786312997341156,
-0.30327939987182617,
-0.19484271109104156,
0.05381840467453003,
-0.006546568125486374,
0.014195750467479229,
-0.1927136331796646,
0.05564519017934799,
-0.03264862671494484,
-0.2947843670845032,
0.49407774209976196,
0.26725253462791443,
0.19861698150634766,
0.19428479671478271,
0.03723616898059845,
-0.10866519063711166,
0.020085103809833527,
-0.3772954046726227,
0.001243583858013153,
-0.08567777276039124,
0.0068858894519507885,
-0.04975227266550064,
-0.005415160208940506,
-0.14764168858528137,
0.16886113584041595,
0.058294445276260376,
0.4914007782936096,
-0.12027139216661453,
-0.041758328676223755,
-0.05364236980676651,
-0.20642295479774475,
-0.019622093066573143,
0.613155722618103,
0.10255885124206543,
-0.07486673444509506,
-0.0517580583691597,
-0.03932929039001465,
0.1938282698392868,
-0.4144286811351776,
-0.1897837519645691,
0.07170072942972183,
0.06925023347139359,
0.1841362565755844,
0.3440256714820862,
0.1801801472902298,
0.07794879376888275,
0.35055798292160034,
0.04195142537355423,
0.20896874368190765,
-0.5064526796340942,
0.010629583150148392,
0.0003652311861515045,
-0.0239061638712883,
-0.1337602436542511,
0.3898269236087799,
0.07576659321784973,
0.1957971155643463,
0.23217006027698517,
-0.1491786539554596,
0.5302514433860779,
-0.29407423734664917,
0.06795220077037811,
0.43252795934677124,
0.04120616987347603,
-0.09546032547950745,
-0.2085970938205719,
-0.11451627314090729,
0.0006883293390274048,
0.06120752543210983,
0.29861149191856384,
-0.27169808745384216,
-0.24176982045173645,
-0.21691012382507324,
0.11934798955917358,
-0.37749183177948,
-0.04116327688097954,
0.19693434238433838,
-0.04123936593532562,
-0.0028169751167297363,
0.11766386032104492,
0.08988699316978455,
-0.19822745025157928,
0.37951529026031494,
-0.04568643122911453,
-0.2845958471298218,
-0.29394200444221497,
-0.10911960154771805,
0.17388257384300232,
0.1398106813430786,
-0.02342558465898037,
0.20075657963752747,
0.37063759565353394,
0.0024815723299980164,
-0.1345922201871872,
0.5820794701576233,
0.31671881675720215,
-0.12004527449607849,
-0.11337174475193024,
0.30867284536361694,
-0.03761652112007141,
-0.04091031476855278,
-0.2248762845993042,
0.11776886135339737,
-0.19143003225326538,
-0.1915239542722702,
0.2899274528026581,
0.12319587171077728,
-0.17286404967308044,
0.0842088982462883,
0.055540286004543304,
0.06820163130760193,
-0.2200031727552414,
0.549874484539032,
-0.27670302987098694,
-0.043112218379974365,
-0.2036253809928894,
-0.03136666119098663,
-0.4145219027996063,
-0.0786866769194603,
0.11085765063762665,
0.006379998289048672,
0.2380024790763855,
-0.23016685247421265,
0.10392739623785019,
-0.14364303648471832,
0.4734821021556854,
0.16181619465351105,
0.042281243950128555,
-0.1944364458322525,
-0.043553438037633896,
-0.5446593761444092,
0.21157142519950867,
-0.08774051070213318,
0.16375504434108734,
-0.05974484980106354,
0.27897611260414124,
-0.18852034211158752,
-0.05342854559421539,
0.001706831157207489,
-0.054196178913116455,
0.20748065412044525,
0.037557460367679596,
-0.23253817856311798,
-0.006652176380157471,
-0.2980732321739197,
-0.12364250421524048,
0.2594502568244934,
-0.1027037501335144,
0.17152459919452667,
-0.17884352803230286,
0.11482318490743637,
-0.009020373225212097,
0.0408128947019577,
-0.1684129238128662,
-0.14527195692062378,
-0.0235164612531662,
0.18181297183036804,
0.12627963721752167,
-0.24146410822868347,
0.12094614654779434,
-0.04370645061135292,
-0.05002167820930481,
-0.3452831506729126,
0.34877535700798035,
0.14851424098014832,
0.1977091133594513,
0.007098369300365448,
-0.3770191967487335,
-0.22437788546085358,
0.3592913746833801,
0.3247789144515991,
0.025677816942334175,
-0.09954412281513214,
0.28119710087776184,
-0.1880502700805664,
0.21656003594398499,
0.012071768753230572,
0.5568797588348389,
0.13430389761924744,
-0.022226663306355476,
-0.23369626700878143,
-0.39030158519744873,
0.6481671333312988,
-0.49538469314575195,
-0.29802218079566956,
-0.1565643846988678,
0.20605501532554626,
0.3010116219520569,
-0.2667711079120636,
-0.6273277997970581,
0.04340282827615738,
0.21607916057109833,
-0.3173049986362457,
0.016885612159967422,
0.07916821539402008,
-0.17933374643325806,
-0.017449814826250076,
-0.08493778109550476,
0.4183071553707123,
0.3241426646709442,
-0.33526933193206787,
0.46632829308509827,
-0.3187906742095947
] |
https://github.com/huggingface/datasets/issues/5360 | IterableDataset returns duplicated data using PyTorch DDP | If you want to support it by datasets natively, maybe we also need to change the code in `transformers` ? | As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()` | 20 | IterableDataset returns duplicated data using PyTorch DDP
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
If you want to support it by datasets natively, maybe we also need to change the code in `transformers` ? | [
-0.40853017568588257,
-0.47679805755615234,
-0.04256485402584076,
0.42825520038604736,
0.12753143906593323,
-0.28422248363494873,
0.5116775035858154,
0.22381606698036194,
-0.15025341510772705,
0.28548431396484375,
-0.22655971348285675,
0.4095022976398468,
-0.05505572259426117,
-0.005839124321937561,
0.1281213015317917,
-0.07633116841316223,
-0.14054101705551147,
0.1560586839914322,
-0.5604352951049805,
-0.08102308958768845,
-0.06409209221601486,
0.27484777569770813,
-0.015454597771167755,
-0.20360608398914337,
-0.4306703209877014,
0.10375150293111801,
-0.223523810505867,
0.11495767533779144,
0.21865494549274445,
-0.22645144164562225,
0.34600338339805603,
0.149615079164505,
-0.0023864367976784706,
0.6020572185516357,
-0.00010743011807790026,
0.2121204286813736,
0.15056288242340088,
0.07394900918006897,
-0.09786596894264221,
-0.08736442029476166,
0.08811069279909134,
-0.06629721075296402,
-0.003940620459616184,
-0.2362796664237976,
-0.32556605339050293,
-0.35391291975975037,
-0.036284394562244415,
-0.15061861276626587,
0.4239468574523926,
0.04076608270406723,
0.2441524863243103,
0.5099508762359619,
-0.1824076622724533,
-0.05639643967151642,
-0.1029447540640831,
0.4415351152420044,
0.017528673633933067,
0.1715279072523117,
0.3597279191017151,
0.19490040838718414,
-0.34657779335975647,
0.37732797861099243,
0.03228450566530228,
0.36847183108329773,
0.06116985157132149,
-0.07074993848800659,
-0.15807569026947021,
-0.07369274646043777,
0.35325688123703003,
0.3125743269920349,
0.40709441900253296,
-0.36431217193603516,
-0.10223856568336487,
-0.349710613489151,
-0.09480146318674088,
-0.07326703518629074,
0.05812320485711098,
0.11480898410081863,
0.01075584627687931,
-0.0886191576719284,
-0.3696250319480896,
0.19483743607997894,
-0.22536009550094604,
-0.1421334445476532,
0.04342459887266159,
0.4195755124092102,
-0.049568962305784225,
0.25068119168281555,
0.06132907047867775,
0.09170438349246979,
0.4222010672092438,
-0.10000791400671005,
0.1302347332239151,
-0.0898628979921341,
-0.265351802110672,
-0.2821922302246094,
0.036646224558353424,
-0.1469152867794037,
0.23131272196769714,
0.03857119008898735,
0.06627993285655975,
0.18177300691604614,
0.11728739738464355,
0.02605918049812317,
0.37387681007385254,
0.12918038666248322,
-0.13477766513824463,
0.36445486545562744,
0.1964348405599594,
-0.19117628037929535,
-0.04770944267511368,
-0.05944415181875229,
0.18285734951496124,
-0.07381492853164673,
0.24847711622714996,
-0.016266021877527237,
0.33829301595687866,
-0.07859578728675842,
-0.12983718514442444,
-0.3616189658641815,
-0.09649533033370972,
-0.17890691757202148,
0.03945121169090271,
0.19397306442260742,
-0.00796634890139103,
0.14178498089313507,
-0.17063800990581512,
0.0832836776971817,
-0.19299598038196564,
-0.012055447325110435,
-0.31805068254470825,
-0.125947505235672,
-0.05833557993173599,
0.06430454552173615,
0.18144236505031586,
-0.2001855969429016,
0.5387805104255676,
0.05491583049297333,
0.14040741324424744,
-0.07638096809387207,
0.15739236772060394,
-0.06420418620109558,
0.26998171210289,
0.06507308781147003,
0.025763120502233505,
-0.06552235037088394,
-0.040780242532491684,
0.17101313173770905,
-0.11773549020290375,
0.0960731953382492,
-0.09551588445901871,
-0.40320608019828796,
-0.17722241580486298,
0.24409045279026031,
-0.061337996274232864,
-0.04927860200405121,
-0.011842519044876099,
0.19991712272167206,
0.35993826389312744,
-0.17861859500408173,
0.09935256838798523,
-0.023029308766126633,
-0.45391950011253357,
-0.03230294585227966,
0.02759571559727192,
0.2858111262321472,
0.09932452440261841,
-0.25631409883499146,
0.07856582850217819,
-0.02701140195131302,
0.0077932849526405334,
0.3689493238925934,
-0.3103477358818054,
0.2194432020187378,
-0.393408864736557,
-0.15460628271102905,
0.13232815265655518,
-0.11838309466838837,
-0.41270115971565247,
0.2106553316116333,
-0.03696706146001816,
0.10792598873376846,
0.06630754470825195,
0.1691603809595108,
0.21843935549259186,
0.037374090403318405,
-0.1032051146030426,
0.08494141697883606,
-0.08028469234704971,
0.1706162840127945,
-0.1724252849817276,
0.14178311824798584,
0.2939140796661377,
0.14331918954849243,
0.14961981773376465,
0.21921420097351074,
0.07239670306444168,
0.05220167338848114,
0.3252606987953186,
-0.10234977304935455,
0.03195963054895401,
0.18837234377861023,
-0.05365758016705513,
-0.3585250973701477,
0.3414638638496399,
-0.259309321641922,
-0.35401901602745056,
0.20976638793945312,
-0.25034746527671814,
-0.023364365100860596,
-0.04468889534473419,
-0.27959638833999634,
-0.1587122678756714,
0.07715724408626556,
-0.29747819900512695,
-0.24327033758163452,
0.1453237682580948,
0.20982696115970612,
0.22128722071647644,
-0.41633141040802,
-0.21230672299861908,
0.200773224234581,
-0.21096648275852203,
-0.3102330267429352,
-0.4504089057445526,
0.18217097222805023,
-0.11840840429067612,
0.06287316232919693,
0.16714613139629364,
0.3280462324619293,
0.19193562865257263,
-0.28344810009002686,
-0.02487066015601158,
0.17352457344532013,
-0.2647601366043091,
0.20046064257621765,
0.034149810671806335,
0.23967108130455017,
0.4621393382549286,
-0.23804424703121185,
-0.03006509505212307,
0.34662511944770813,
0.15439534187316895,
-0.15214039385318756,
-0.3011460304260254,
0.2446163147687912,
-0.14151804149150848,
0.03400692343711853,
0.0192485973238945,
-0.11916223168373108,
0.24565458297729492,
-0.09187011420726776,
-0.12582983076572418,
-0.053872000426054,
-0.012415837496519089,
-0.10713793337345123,
0.3968150019645691,
0.22477877140045166,
-0.3986845016479492,
0.13324281573295593,
0.38158512115478516,
-0.04543134570121765,
0.11106666922569275,
0.10618840157985687,
-0.13720646500587463,
-0.2410126030445099,
0.30103620886802673,
0.05230805650353432,
0.3136424422264099,
0.2952994108200073,
0.2826535701751709,
0.054411936551332474,
0.08996377140283585,
-0.022447753697633743,
0.04504469782114029,
0.0010279566049575806,
0.11512665450572968,
0.33782556653022766,
0.3232688307762146,
-0.1462230682373047,
-0.6289019584655762,
-0.07383810728788376,
0.044534847140312195,
0.08658283948898315,
-0.05293617397546768,
0.14647850394248962,
-0.07477454096078873,
-0.1520971655845642,
-0.37929001450538635,
0.12491750717163086,
-0.29915696382522583,
-0.041387055069208145,
0.08543066680431366,
0.5875350832939148,
0.03332966938614845,
0.36928266286849976,
0.35197871923446655,
0.22141526639461517,
0.08127807080745697,
-0.1132400706410408,
-0.2018365114927292,
-0.08939523249864578,
-0.21661442518234253,
0.16951462626457214,
-0.06962454319000244,
-0.264114648103714,
0.49621909856796265,
-0.02919245883822441,
0.014610476791858673,
-0.5004310607910156,
-0.21823933720588684,
0.26020002365112305,
-0.002109639346599579,
-0.2755863070487976,
0.053822439163923264,
-0.1465620994567871,
0.05777130275964737,
-0.06676796078681946,
0.0767604261636734,
-0.34939438104629517,
-0.1766868531703949,
0.085105299949646,
-0.20625558495521545,
-0.21675612032413483,
-0.21514689922332764,
-0.3733786940574646,
-0.16577833890914917,
-0.17080622911453247,
0.2259983867406845,
-0.04745405167341232,
0.2879575490951538,
0.44935086369514465,
0.035141050815582275,
0.10010629147291183,
0.2767721116542816,
-0.12713804841041565,
-0.3675900101661682,
-0.3807832598686218,
0.16376495361328125,
-0.21646322309970856,
-0.4232163429260254,
-0.42681214213371277,
-0.22720009088516235,
0.21884840726852417,
0.20281164348125458,
-0.3593253493309021,
-0.49569496512413025,
-0.2769087553024292,
-0.050839878618717194,
-0.025801315903663635,
0.22698785364627838,
0.5931354761123657,
-0.04100673645734787,
-0.15396200120449066,
-0.10315701365470886,
-0.1412767618894577,
0.18120607733726501,
0.19149476289749146,
0.2826157510280609,
0.1262427419424057,
0.06804195791482925,
0.16180843114852905,
0.5666408538818359,
0.433589905500412,
-0.12426714599132538,
0.2934859097003937,
-0.35742631554603577,
0.32634788751602173,
-0.09334117919206619,
-0.4197898805141449,
0.08878035843372345,
-0.13350841403007507,
-0.1191425696015358,
0.2604653537273407,
-0.0856475830078125,
-0.19964805245399475,
0.005078345537185669,
-0.12229296565055847,
-0.03641423583030701,
-0.18320496380329132,
-0.07582620531320572,
0.047464124858379364,
0.28904277086257935,
0.11815854907035828,
0.18065553903579712,
-0.12933404743671417,
-0.06171109527349472,
0.060729045420885086,
-0.14795361459255219,
0.10757437348365784,
-0.043748192489147186,
-0.13444510102272034,
0.042392000555992126,
-0.5742619633674622,
0.2591649293899536,
0.2207409292459488,
0.1630621999502182,
0.018954690545797348,
-0.019949359819293022,
0.26695865392684937,
-0.16153651475906372,
0.7025196552276611,
-0.0016857422888278961,
0.017761249095201492,
-0.1685972660779953,
-0.4498933255672455,
-0.4046272337436676,
0.15158802270889282,
-0.11786924302577972,
0.4038054943084717,
0.10710297524929047,
0.40172576904296875,
-0.33442384004592896,
-0.18058699369430542,
0.13742154836654663,
0.1188117116689682,
-0.22644434869289398,
-0.18840637803077698,
-0.3189988136291504,
-0.3829910159111023,
-0.2744764983654022,
0.0804569274187088,
0.15472231805324554,
0.21744376420974731,
0.1308738738298416,
-0.16394774615764618,
-0.15263576805591583,
-0.18683528900146484,
-0.005877315998077393,
0.33210453391075134,
0.18368080258369446,
-0.017125552520155907,
0.11003750562667847,
0.3286232352256775,
0.1544855833053589,
-0.07635791599750519,
0.6376247406005859,
-0.09963390231132507,
-0.1681736707687378,
0.08226998150348663,
-0.15588602423667908,
0.11970625817775726,
0.2964494228363037,
0.046146001666784286,
-0.12123788148164749,
0.021546609699726105,
-0.06189805269241333,
-0.33810117840766907,
-0.10544748604297638,
0.1839607208967209,
0.13381406664848328,
-0.2729586362838745,
-0.27823418378829956,
0.3519607484340668,
-0.05464160069823265,
-0.06615163385868073,
0.4695011377334595,
-0.044130757451057434,
-0.09941203892230988,
0.3154488205909729,
0.00437154620885849,
0.7874935269355774,
-0.03465326130390167,
-0.03986097499728203,
0.14622727036476135,
-0.2561379075050354,
0.13027511537075043,
-0.013437207788228989,
0.24772845208644867,
-0.4234829545021057,
-0.19280050694942474,
0.05524752289056778,
0.03527819737792015,
-0.15953755378723145,
0.16382725536823273,
-0.08727940917015076,
0.2736712396144867,
0.2624896764755249,
0.012574899941682816,
-0.1677854061126709,
0.49968093633651733,
-0.13783396780490875,
-0.16351328790187836,
-0.010565683245658875,
0.21579846739768982,
-0.3368496894836426,
0.37948623299598694,
-0.01897766813635826,
-0.12543073296546936,
0.46008285880088806,
-0.3042389750480652,
-0.20028504729270935,
0.19275081157684326,
0.0720401257276535,
0.2810550332069397,
0.2069932073354721,
-0.5035490393638611,
-0.16935423016548157,
0.19964778423309326,
0.31289732456207275,
-0.16812726855278015,
-0.15994371473789215,
0.12571461498737335,
-0.21697482466697693,
0.36879923939704895,
-0.31319597363471985,
0.030126597732305527,
-0.010614646598696709,
0.0022109299898147583,
-0.21498045325279236,
-0.3202241063117981,
0.2663751244544983,
-0.35071247816085815,
-0.01796543598175049,
0.09444712847471237,
0.001207444816827774,
-0.1941114217042923,
0.3592006266117096,
0.11773681640625,
-0.3109014630317688,
-0.39915186166763306,
0.14609846472740173,
-0.06196694076061249,
-0.3108958303928375,
0.19194383919239044,
0.08744166791439056,
-0.22783614695072174,
-0.07193788886070251,
0.3833930492401123,
0.3181595206260681,
0.37269750237464905,
0.09603595733642578,
0.1097428947687149,
-0.07399871200323105,
-0.17848193645477295,
-0.13607417047023773,
0.18739713728427887,
-0.5396482348442078,
0.22985625267028809,
-0.18515177071094513,
-0.06969695538282394,
-0.0865519642829895,
0.375470370054245,
-0.09442150592803955,
0.27874791622161865,
-0.22022010385990143,
-0.05612405762076378,
-0.4942413866519928,
-0.00783829391002655,
0.06173311918973923,
0.5148574709892273,
0.1652156114578247,
-0.034952789545059204,
0.04654473811388016,
0.3383164703845978,
-0.4056800603866577,
-0.14499647915363312,
-0.08684135973453522,
0.22040359675884247,
-0.04630173742771149,
-0.44517144560813904,
0.2185775339603424,
-0.027666384354233742,
0.12964418530464172,
0.27876415848731995,
-0.048415374010801315,
-0.306047648191452,
-0.14187198877334595,
0.05248492956161499,
-0.0036074575036764145,
0.00879401620477438,
-0.2671891152858734,
-0.1019238829612732,
-0.05267911031842232,
-0.3313632607460022,
0.4586564600467682,
0.21107807755470276,
0.09395566582679749,
0.2762552797794342,
0.1897086203098297,
-0.21916577219963074,
-0.08056799322366714,
-0.266592800617218,
0.002514101564884186,
-0.12399286031723022,
-0.010905006900429726,
0.06633423268795013,
0.045324862003326416,
-0.0928816944360733,
0.06714828312397003,
0.06535415351390839,
0.6176265478134155,
-0.10223790258169174,
0.08738457411527634,
-0.0675058513879776,
-0.08840438723564148,
0.09635764360427856,
0.6353734731674194,
0.05893506482243538,
-0.06623628735542297,
-0.048568665981292725,
-0.034535203129053116,
0.22882553935050964,
-0.46482130885124207,
-0.31333911418914795,
0.07975813746452332,
0.05376885458827019,
0.23241877555847168,
0.3064138889312744,
0.28245773911476135,
0.06581926345825195,
0.44134312868118286,
0.08274608105421066,
0.4171854555606842,
-0.6305537223815918,
-0.013615267351269722,
0.004274692386388779,
-0.04372602701187134,
-0.20553670823574066,
0.4318128824234009,
0.061735667288303375,
0.2022767812013626,
0.35551363229751587,
-0.08878543227910995,
0.5330276489257812,
-0.06295853853225708,
0.1351330429315567,
0.44066745042800903,
-0.03640027716755867,
0.09564776718616486,
-0.32689037919044495,
-0.008778885006904602,
0.026406530290842056,
0.20957888662815094,
0.03298233449459076,
-0.2074866145849228,
-0.07296490669250488,
-0.22784523665905,
0.05971556156873703,
-0.31362444162368774,
-0.03758390247821808,
0.19679155945777893,
-0.00398591160774231,
0.02179551124572754,
0.04570300504565239,
0.10238972306251526,
-0.10060621798038483,
0.3344119191169739,
-0.0031411275267601013,
-0.23395301401615143,
-0.24244217574596405,
0.1027965173125267,
0.195362389087677,
0.06289619207382202,
-0.08735448122024536,
0.1382381170988083,
0.3701321482658386,
-0.014983490109443665,
-0.22642964124679565,
0.683382511138916,
0.27661392092704773,
-0.03778964281082153,
-0.25270089507102966,
0.2538808286190033,
-0.08503791689872742,
-0.08061036467552185,
-0.22310353815555573,
0.1414850652217865,
-0.25988176465034485,
-0.19603681564331055,
0.21260152757167816,
0.11518725752830505,
-0.14594347774982452,
0.038924653083086014,
0.09293100237846375,
-0.0996377170085907,
-0.07710614800453186,
0.4736950993537903,
-0.11509433388710022,
-0.08418113738298416,
-0.12591634690761566,
-0.11607729643583298,
-0.29568618535995483,
-0.22355534136295319,
0.30420568585395813,
-0.19304901361465454,
0.18158823251724243,
-0.21185913681983948,
0.11283880472183228,
-0.20273159444332123,
0.3188742399215698,
0.13621501624584198,
0.08445560932159424,
-0.16195328533649445,
0.06069238483905792,
-0.5098162889480591,
0.22400128841400146,
-0.058456193655729294,
0.16554881632328033,
0.07806763052940369,
0.3099471628665924,
-0.23103970289230347,
0.032131340354681015,
-0.07362665235996246,
-0.061242591589689255,
0.2601928412914276,
0.18085238337516785,
-0.2257600575685501,
0.00268598273396492,
-0.1696959137916565,
-0.05873468518257141,
0.25637927651405334,
-0.31271639466285706,
0.20999093353748322,
-0.09174409508705139,
0.11949916929006577,
-0.09069040417671204,
-0.09105055034160614,
0.0076019614934921265,
-0.183355450630188,
0.02208121493458748,
0.17236709594726562,
0.165937602519989,
-0.24301934242248535,
0.2517305016517639,
-0.11049489676952362,
-0.17558833956718445,
-0.3961523175239563,
0.25718098878860474,
0.20319826900959015,
0.21528993546962738,
0.015580154955387115,
-0.3293839395046234,
-0.2571989893913269,
0.26554811000823975,
0.22344620525836945,
0.03509794548153877,
-0.1807621419429779,
0.2909303307533264,
-0.35717448592185974,
0.24954572319984436,
-0.1442452222108841,
0.4161841571331024,
0.1552293598651886,
0.07165168225765228,
-0.2138318419456482,
-0.4829587936401367,
0.5765565037727356,
-0.4179704487323761,
-0.4078618586063385,
-0.21445584297180176,
0.16334033012390137,
0.23080360889434814,
-0.24398142099380493,
-0.5445712208747864,
0.043036364018917084,
0.2350221574306488,
-0.2819283604621887,
0.11937040090560913,
0.1260441541671753,
-0.011244334280490875,
0.056217070668935776,
-0.17415525019168854,
0.4395734369754791,
0.2754192650318146,
-0.36468297243118286,
0.31228452920913696,
-0.29983586072921753
] |
https://github.com/huggingface/datasets/issues/5360 | IterableDataset returns duplicated data using PyTorch DDP | Maybe something like this then ?
```python
from datasets.distributed import split_dataset_by_node
ds = split_dataset_by_node(ds, rank=rank, world_size=world_size)
```
For map-style datasets the implementation is trivial (it can simply use `.shard()`).
For iterable datasets we would need to implement a new ExamplesIterable that would only iterate on a subset of the (possibly shuffled and re-shuffled after each epoch) list of shards, based on the rank and world size. | As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()` | 66 | IterableDataset returns duplicated data using PyTorch DDP
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
Maybe something like this then ?
```python
from datasets.distributed import split_dataset_by_node
ds = split_dataset_by_node(ds, rank=rank, world_size=world_size)
```
For map-style datasets the implementation is trivial (it can simply use `.shard()`).
For iterable datasets we would need to implement a new ExamplesIterable that would only iterate on a subset of the (possibly shuffled and re-shuffled after each epoch) list of shards, based on the rank and world size. | [
-0.42459025979042053,
-0.38009610772132874,
-0.09296974539756775,
0.3532482981681824,
-0.06343212723731995,
-0.22699549794197083,
0.42851459980010986,
0.26404568552970886,
-0.01557669322937727,
0.28691598773002625,
-0.20376035571098328,
0.5371483564376831,
-0.275293231010437,
0.10282861441373825,
0.15183858573436737,
-0.05704165995121002,
-0.14554694294929504,
0.10899554938077927,
-0.4493676722049713,
-0.1354730725288391,
-0.08252003788948059,
0.1722479909658432,
0.02732459455728531,
-0.37724608182907104,
-0.2699929177761078,
-0.07250364869832993,
-0.36268648505210876,
0.23311933875083923,
0.27501043677330017,
-0.12093988806009293,
0.2388056367635727,
0.1812358945608139,
-0.046636469662189484,
0.5116966366767883,
-0.00010669026960385963,
0.05463118851184845,
-0.10374210774898529,
0.0016290917992591858,
-0.1263071447610855,
-0.038132816553115845,
-0.04826647415757179,
-0.10139985382556915,
-0.05340029299259186,
-0.3567456305027008,
-0.21956074237823486,
-0.3666113615036011,
-0.06905603408813477,
-0.11619460582733154,
0.45495378971099854,
-0.06529504805803299,
0.22377467155456543,
0.3690335750579834,
-0.21480007469654083,
-0.06974714249372482,
-0.015065744519233704,
0.27115607261657715,
0.003466101363301277,
0.1360456943511963,
0.27216464281082153,
0.2691810429096222,
-0.2676566243171692,
0.43620699644088745,
-0.1404077410697937,
0.47365230321884155,
0.08003829419612885,
-0.12372248619794846,
-0.2842731773853302,
-0.173730731010437,
0.19254103302955627,
0.42225801944732666,
0.11038806289434433,
-0.40777164697647095,
-0.07891787588596344,
-0.45041441917419434,
-0.058020658791065216,
-0.1832229197025299,
0.0165778286755085,
0.2327171117067337,
-0.0030882079154253006,
-0.15130144357681274,
-0.30983275175094604,
0.21935611963272095,
-0.033067550510168076,
-0.10328230261802673,
-0.03167039155960083,
0.4381011426448822,
0.006193174514919519,
0.21707692742347717,
0.19954562187194824,
0.11103863269090652,
0.23975369334220886,
0.06626465916633606,
0.10838392376899719,
-0.03683340176939964,
-0.32443922758102417,
-0.35582783818244934,
0.04610463231801987,
0.003380507230758667,
0.24316611886024475,
0.0620914101600647,
0.12023253738880157,
0.19165804982185364,
0.22237849235534668,
0.0540766566991806,
0.3092134892940521,
-0.06855002045631409,
-0.021602369844913483,
0.20207789540290833,
0.04623493552207947,
-0.26891079545021057,
-0.14680036902427673,
0.09041003882884979,
0.1241743266582489,
-0.22115953266620636,
0.285165935754776,
0.026030072942376137,
0.2383948117494583,
-0.009404715150594711,
-0.25575247406959534,
-0.1691000610589981,
-0.19301924109458923,
-0.135447695851326,
-0.011414541862905025,
0.19158907234668732,
0.01973014324903488,
-0.13916733860969543,
-0.24436993896961212,
0.05906242877244949,
-0.19059507548809052,
-0.12400338053703308,
-0.2568177580833435,
-0.08451126515865326,
-0.028853313997387886,
0.25772881507873535,
0.2242995947599411,
-0.2378006875514984,
0.4342508614063263,
0.0992778018116951,
0.1225450336933136,
-0.13384786248207092,
0.13245999813079834,
-0.05429057776927948,
0.32057344913482666,
0.015276506543159485,
0.08965787291526794,
-0.19182097911834717,
0.04451341554522514,
0.12373790144920349,
-0.22796481847763062,
-0.026747025549411774,
-0.08103633671998978,
-0.45873087644577026,
-0.06151381880044937,
0.23898570239543915,
-0.13615120947360992,
-0.041530631482601166,
-0.11604232341051102,
0.2575990855693817,
0.27283716201782227,
-0.06623518466949463,
0.03441942483186722,
-0.06601689755916595,
-0.4559239149093628,
-0.10353098064661026,
0.1332337111234665,
0.33693134784698486,
0.0034966692328453064,
-0.06543216109275818,
0.05594482645392418,
0.01752319186925888,
0.030974477529525757,
0.3386249244213104,
-0.09130706638097763,
0.10687783360481262,
-0.34502696990966797,
-0.006207950413227081,
0.00889509916305542,
0.0436408556997776,
-0.2965046465396881,
0.2054012417793274,
0.03757880628108978,
0.05543467402458191,
0.13601116836071014,
0.1540922373533249,
0.3758338391780853,
-0.05442545562982559,
-0.1922481656074524,
0.0711514875292778,
-0.13999590277671814,
-0.014629241079092026,
-0.16192342340946198,
0.09918747842311859,
0.17579452693462372,
0.16481614112854004,
0.1749517172574997,
0.08822732418775558,
0.11020667105913162,
-0.128433957695961,
0.47025036811828613,
-0.05035505071282387,
0.03699681907892227,
0.05955687165260315,
-0.06191748008131981,
-0.11786137521266937,
0.2932664752006531,
-0.505497395992279,
-0.1519899070262909,
0.26180335879325867,
-0.13001635670661926,
-0.0839974582195282,
-0.06669484078884125,
-0.3694709539413452,
-0.19313156604766846,
0.03317089378833771,
-0.24592174589633942,
-0.12688647210597992,
0.1683729887008667,
0.06623116880655289,
0.3744047284126282,
-0.3255690634250641,
-0.2413388043642044,
0.0731784999370575,
-0.49177032709121704,
-0.2423550933599472,
-0.34842318296432495,
0.2940223515033722,
0.08818291872739792,
-0.02639075741171837,
0.16040851175785065,
0.42625585198402405,
0.17643579840660095,
-0.3269917666912079,
0.12494876980781555,
0.11698392778635025,
-0.060385774821043015,
0.22116076946258545,
0.04484158754348755,
0.23630325496196747,
0.33884748816490173,
-0.10460841655731201,
0.019799018278717995,
0.2255471795797348,
0.0040256064385175705,
-0.11498896032571793,
-0.25594592094421387,
0.4016392230987549,
-0.08120472729206085,
0.14058807492256165,
-0.05129683390259743,
-0.013104631565511227,
0.13677111268043518,
-0.09856635332107544,
-0.047652728855609894,
-0.12448963522911072,
0.03653881698846817,
-0.2801225781440735,
0.1971808224916458,
0.15280288457870483,
-0.3732093572616577,
0.2613731026649475,
0.33011722564697266,
-0.11077836155891418,
0.18655237555503845,
-0.14621448516845703,
-0.10050962120294571,
-0.06377305090427399,
0.30908364057540894,
0.37268996238708496,
0.21781376004219055,
0.24190086126327515,
0.3000282347202301,
0.07088346034288406,
0.017048094421625137,
0.02584664896130562,
-0.0028442516922950745,
-0.030133672058582306,
0.22225943207740784,
0.30108553171157837,
0.1370081901550293,
-0.14527730643749237,
-0.5617941617965698,
-0.08672873675823212,
-0.02439744770526886,
0.12059521675109863,
0.029917653650045395,
0.10376439243555069,
-0.20774587988853455,
-0.13703539967536926,
-0.3971386253833771,
0.2175326943397522,
-0.19235411286354065,
-0.2373960316181183,
0.1315627098083496,
0.5909484624862671,
-0.04381975159049034,
0.28282198309898376,
0.424791544675827,
0.14537633955478668,
-0.017758145928382874,
-0.03978237509727478,
-0.08577267825603485,
-0.19970180094242096,
0.03540283814072609,
0.17774391174316406,
0.06391939520835876,
0.01244593970477581,
0.6421810388565063,
-0.09477748721837997,
-0.1259443312883377,
-0.5593742728233337,
-0.1081065982580185,
0.18191009759902954,
-0.23606519401073456,
-0.22378481924533844,
0.07102631777524948,
-0.07927513122558594,
-0.06428512930870056,
-0.044905804097652435,
0.030116654932498932,
-0.346151202917099,
-0.09811057895421982,
0.10158786922693253,
-0.15894532203674316,
-0.195717915892601,
-0.0886911004781723,
-0.41690024733543396,
-0.3038371503353119,
-0.13816863298416138,
0.17177580296993256,
0.09660227596759796,
0.4317663311958313,
0.0806698277592659,
-0.04100559651851654,
0.08125504106283188,
0.2301619052886963,
-0.07336967438459396,
-0.3546982705593109,
-0.3861566483974457,
0.18334250152111053,
-0.3362327218055725,
-0.32179197669029236,
-0.291721910238266,
-0.18392153084278107,
0.1347644180059433,
0.31174135208129883,
-0.3619658946990967,
-0.5650659203529358,
-0.15814991295337677,
-0.11994501948356628,
0.06879015266895294,
0.01724514365196228,
0.517208993434906,
0.04810582473874092,
-0.11405662447214127,
-0.013091742992401123,
0.08316284418106079,
0.2175408899784088,
0.12935388088226318,
0.031147390604019165,
0.16577768325805664,
0.16664192080497742,
0.2639923095703125,
0.7290483117103577,
0.4838169813156128,
-0.05915908142924309,
0.14833548665046692,
-0.3877587616443634,
0.17849993705749512,
-0.06634748727083206,
-0.32234981656074524,
0.1541667878627777,
-0.13672694563865662,
-0.1751222014427185,
0.2572161853313446,
-0.05553171783685684,
-0.1285344958305359,
0.11309170722961426,
-0.015825413167476654,
-0.0845477432012558,
-0.2856596112251282,
0.03180759400129318,
-0.008209660649299622,
0.37744128704071045,
0.02402714639902115,
0.2604692280292511,
-0.09072491526603699,
-0.11236762255430222,
-0.04732625558972359,
-0.03478400409221649,
0.222550630569458,
-0.06029905751347542,
-0.16473205387592316,
0.06518763303756714,
-0.45358115434646606,
0.2682102918624878,
0.22046715021133423,
0.07467541843652725,
-0.012023810297250748,
-0.1198074072599411,
0.21851453185081482,
-0.06742256134748459,
0.550881564617157,
-0.09116068482398987,
0.09155508130788803,
-0.18017564713954926,
-0.34289616346359253,
-0.42725038528442383,
0.08605478703975677,
-0.16197876632213593,
0.48076531291007996,
0.012079916894435883,
0.20772990584373474,
-0.387347012758255,
-0.08531816303730011,
0.20580291748046875,
0.2158488780260086,
-0.22142063081264496,
-0.10327963531017303,
-0.15956562757492065,
-0.3042621910572052,
-0.24269062280654907,
0.20343762636184692,
0.03557595610618591,
0.13115696609020233,
0.09032139182090759,
-0.15364065766334534,
-0.15771572291851044,
-0.09172122180461884,
0.2278161495923996,
0.38892054557800293,
0.177615225315094,
-0.07360195368528366,
0.2673683166503906,
0.22252050042152405,
0.1323125660419464,
-0.04359348863363266,
0.6270586848258972,
-0.18746237456798553,
-0.03823745250701904,
-0.11740691214799881,
-0.1825329214334488,
0.16194558143615723,
0.3191688060760498,
-0.10152071714401245,
-0.1294163465499878,
-0.16598889231681824,
0.10972985625267029,
-0.5027834177017212,
-0.3332507014274597,
0.20210827887058258,
0.10225136578083038,
-0.22588975727558136,
-0.43851321935653687,
0.3617623448371887,
0.004902807995676994,
-0.12370565533638,
0.4914611279964447,
0.08718512952327728,
-0.03699447959661484,
0.42845553159713745,
0.030452612787485123,
0.7945742011070251,
-0.03039953112602234,
-0.21218746900558472,
0.2564001679420471,
0.1538744866847992,
0.14340583980083466,
0.05849647521972656,
0.28935182094573975,
-0.3297138214111328,
-0.19452649354934692,
0.008775150403380394,
0.025025013834238052,
-0.14698117971420288,
0.2591487765312195,
-0.00608491525053978,
0.2244526892900467,
0.12663176655769348,
-0.07969705760478973,
-0.27603641152381897,
0.32910844683647156,
-0.3133971095085144,
-0.10621240735054016,
-0.015499386936426163,
0.2228374481201172,
-0.2571415901184082,
0.2508997619152069,
0.0444733202457428,
-0.013515796512365341,
0.36131522059440613,
-0.00019368156790733337,
-0.3157525062561035,
0.03632936626672745,
0.13769012689590454,
0.32710206508636475,
0.07039321213960648,
-0.6328721046447754,
-0.2570042610168457,
0.19784985482692719,
0.1529020071029663,
-0.15071599185466766,
0.05723141133785248,
0.08322329819202423,
-0.15718764066696167,
0.2526627480983734,
-0.14905406534671783,
0.019506212323904037,
0.080567367374897,
-0.0025772973895072937,
-0.1786927580833435,
-0.3500838279724121,
0.39168038964271545,
-0.4045143127441406,
-0.1542629599571228,
0.17844058573246002,
0.06983015686273575,
-0.1828765869140625,
0.4283890724182129,
0.16667884588241577,
-0.36255374550819397,
-0.3447535037994385,
0.13059532642364502,
-0.10542246699333191,
-0.29168543219566345,
0.3703019917011261,
-0.07135315239429474,
-0.19183120131492615,
-0.06854341924190521,
0.1968318223953247,
0.26844170689582825,
0.47776487469673157,
0.048156723380088806,
0.1560579091310501,
-0.07853719592094421,
-0.3009938895702362,
-0.07345523685216904,
-0.04626869782805443,
-0.3138890862464905,
0.22215205430984497,
-0.3732576370239258,
0.11071710288524628,
0.028821229934692383,
0.15224136412143707,
-0.013635843992233276,
0.2787747085094452,
-0.18404202163219452,
-0.21227572858333588,
-0.12608063220977783,
0.000811159610748291,
0.26629266142845154,
0.47251206636428833,
0.04360359162092209,
0.0508623830974102,
-0.12060341238975525,
0.4208650290966034,
-0.4037799835205078,
0.002421123906970024,
-0.028369368985295296,
0.25338515639305115,
0.02947322279214859,
-0.26011624932289124,
0.11859108507633209,
-0.07719892263412476,
0.11085882782936096,
0.271756112575531,
-0.03862074017524719,
-0.2971065938472748,
-0.16887891292572021,
0.060893766582012177,
-0.07382214069366455,
0.031894251704216,
-0.20226949453353882,
-0.0909409299492836,
-0.06187085434794426,
-0.4518495500087738,
0.4404398500919342,
0.2111034393310547,
0.09837652742862701,
0.20798934996128082,
0.5214086771011353,
-0.1246706172823906,
-0.04028468579053879,
-0.18049679696559906,
-0.07251448929309845,
-0.06785447895526886,
-0.15314704179763794,
0.12729522585868835,
0.12288910895586014,
-0.13935796916484833,
0.17812605202198029,
0.12430305033922195,
0.4809141755104065,
-0.22148093581199646,
0.23864778876304626,
0.04436524584889412,
-0.09098607301712036,
0.06800810247659683,
0.8363503217697144,
0.24010975658893585,
0.049043361097574234,
-0.06379620730876923,
0.029933614656329155,
0.267544150352478,
-0.37997472286224365,
-0.25322386622428894,
0.23720267415046692,
0.30547767877578735,
0.3346497416496277,
0.42937734723091125,
0.24899175763130188,
-0.019135914742946625,
0.10204080492258072,
-0.007482475601136684,
0.39855989813804626,
-0.766533374786377,
0.05753130093216896,
0.018630631268024445,
0.03290041908621788,
-0.2499806433916092,
0.3310494124889374,
-0.03803824260830879,
0.2962469160556793,
0.39228910207748413,
-0.13710612058639526,
0.8777897953987122,
0.1356542557477951,
0.07077495753765106,
0.5342543125152588,
-0.08068466186523438,
0.05957522988319397,
-0.18116551637649536,
-0.05293317139148712,
0.09852477163076401,
0.14160053431987762,
0.20953825116157532,
-0.37898701429367065,
-0.19326335191726685,
-0.23818360269069672,
0.19352586567401886,
-0.19009709358215332,
0.06482405960559845,
0.0669282078742981,
-0.09958229959011078,
-0.04102177172899246,
0.03527779504656792,
0.2288176715373993,
-0.3839624524116516,
0.4242904782295227,
0.02585339918732643,
-0.11855661869049072,
-0.26660963892936707,
0.058591581881046295,
0.011404633522033691,
0.3336520791053772,
-0.2066037952899933,
-0.02546360157430172,
0.3480174243450165,
0.10101500153541565,
-0.12198494374752045,
0.45839259028434753,
0.22672636806964874,
-0.13539402186870575,
-0.35748061537742615,
0.31354182958602905,
-0.11650773882865906,
-0.04820437356829643,
-0.28102025389671326,
0.09783356636762619,
-0.4731914699077606,
-0.14963720738887787,
0.35482367873191833,
0.13186031579971313,
-0.14197786152362823,
-0.07587818801403046,
0.2012249231338501,
0.0024491939693689346,
-0.08917808532714844,
0.5231309533119202,
-0.05073124170303345,
-0.07669993489980698,
-0.05478857457637787,
-0.11521125584840775,
-0.2870793342590332,
-0.24679230153560638,
0.28182798624038696,
-0.2140929400920868,
0.1858140230178833,
-0.10121100395917892,
0.11900563538074493,
-0.22010767459869385,
0.34054896235466003,
0.03002467192709446,
0.09956991672515869,
-0.10929836332798004,
-0.041907552629709244,
-0.5274523496627808,
0.1193806454539299,
-0.238417387008667,
-0.001450270414352417,
-0.024640660732984543,
0.40215516090393066,
-0.12369867414236069,
0.17055286467075348,
-0.20000050961971283,
-0.03176606819033623,
0.038819149136543274,
0.2582041919231415,
-0.33302798867225647,
-0.10418368875980377,
-0.2667384743690491,
-0.1654060333967209,
0.2315615713596344,
-0.2907096743583679,
0.17448793351650238,
-0.19317254424095154,
0.1105143204331398,
0.029611987993121147,
-0.1896597295999527,
0.04824558272957802,
-0.24836131930351257,
0.017329014837741852,
0.13922108709812164,
0.18163907527923584,
-0.21254032850265503,
0.13918794691562653,
-0.1980804204940796,
-0.18382158875465393,
-0.4456295967102051,
0.4828336238861084,
0.15525732934474945,
0.13928532600402832,
-0.021916676312685013,
-0.3004358112812042,
-0.14653341472148895,
0.4564704895019531,
0.07016346603631973,
0.20772357285022736,
-0.10897096991539001,
0.18524804711341858,
-0.30184274911880493,
0.4254222810268402,
-0.07669147104024887,
0.4459361732006073,
0.05083504319190979,
0.150541752576828,
-0.013253867626190186,
-0.4428137242794037,
0.3959476351737976,
-0.5470529794692993,
-0.19596712291240692,
-0.20248503983020782,
0.22284084558486938,
0.19768303632736206,
-0.09981800615787506,
-0.39968034625053406,
-0.07577554881572723,
0.24119830131530762,
-0.33599942922592163,
0.2740348279476166,
0.08173346519470215,
0.09644442796707153,
-0.17412212491035461,
-0.11099426448345184,
0.22688452899456024,
0.2063387930393219,
-0.5090668797492981,
0.31142809987068176,
-0.38020843267440796
] |
https://github.com/huggingface/datasets/issues/5360 | IterableDataset returns duplicated data using PyTorch DDP | My plan is to skip examples by default to not end up with duplicates.
And if a dataset has a number of shards that is a factor of the world size, then I'd make it more optimized by distributing the shards evenly across nodes instead. | As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()` | 45 | IterableDataset returns duplicated data using PyTorch DDP
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
My plan is to skip examples by default to not end up with duplicates.
And if a dataset has a number of shards that is a factor of the world size, then I'd make it more optimized by distributing the shards evenly across nodes instead. | [
-0.3472557067871094,
-0.4932483732700348,
-0.021575041115283966,
0.43531787395477295,
-0.01511462777853012,
-0.25848397612571716,
0.3807191550731659,
0.2001602053642273,
-0.12273423373699188,
0.22154441475868225,
-0.14768804609775543,
0.5018040537834167,
-0.1701531708240509,
0.04441013187170029,
0.15988630056381226,
-0.02906244993209839,
-0.1288488805294037,
0.08084817230701447,
-0.4780859053134918,
-0.15211132168769836,
-0.04787439852952957,
0.21947908401489258,
0.03361956775188446,
-0.28888529539108276,
-0.4899807572364807,
0.017593322321772575,
-0.25828567147254944,
0.3701726496219635,
0.25121620297431946,
-0.28072869777679443,
0.32866448163986206,
0.13171151280403137,
-0.12229504436254501,
0.4695352613925934,
-0.00011145928874611855,
0.0803033858537674,
0.08578868210315704,
0.019919848069548607,
-0.10679930448532104,
0.04112081974744797,
-0.01661183498799801,
-0.07863659411668777,
-0.009800783358514309,
-0.26966944336891174,
-0.23337072134017944,
-0.47455161809921265,
-0.11449730396270752,
-0.010821636766195297,
0.30488258600234985,
-0.003105727955698967,
0.1827397495508194,
0.39490172266960144,
-0.14718975126743317,
-0.04181613773107529,
-0.018529817461967468,
0.31188327074050903,
0.022433361038565636,
0.32014334201812744,
0.3593100607395172,
0.34005722403526306,
-0.2672503590583801,
0.3852364718914032,
-0.1142110675573349,
0.4651845395565033,
0.05142853781580925,
-0.15288794040679932,
-0.21267130970954895,
-0.09104904532432556,
0.3378015160560608,
0.3878301680088043,
0.3020239770412445,
-0.31780877709388733,
-0.030144209042191505,
-0.40447908639907837,
0.015267929062247276,
-0.09893296658992767,
0.051974572241306305,
0.13069221377372742,
-0.008127633482217789,
-0.14733687043190002,
-0.3895947337150574,
0.18900461494922638,
-0.1503119170665741,
-0.16573213040828705,
0.031027860939502716,
0.29374128580093384,
-0.020892437547445297,
0.22496679425239563,
0.1795709729194641,
0.08180283010005951,
0.17945607006549835,
-0.013406377285718918,
0.032200731337070465,
-0.1689092069864273,
-0.21055160462856293,
-0.2809027135372162,
0.016961894929409027,
-0.030709795653820038,
0.25524666905403137,
0.05365560203790665,
0.10942570120096207,
0.25352296233177185,
0.30227479338645935,
0.004208046942949295,
0.23452623188495636,
-0.023449912667274475,
0.012357011437416077,
0.19546668231487274,
0.18774881958961487,
-0.3029491901397705,
-0.10848073661327362,
0.11340755969285965,
0.12706246972084045,
-0.11134175956249237,
0.25494274497032166,
-0.1330406367778778,
0.36067432165145874,
-0.1852482557296753,
-0.21459902822971344,
-0.2850462794303894,
-0.26743870973587036,
-0.2129141241312027,
-0.03283892944455147,
0.1862177550792694,
0.010285374708473682,
-0.11427881568670273,
-0.31446969509124756,
0.09567700326442719,
-0.1657291203737259,
-0.13899561762809753,
-0.33225637674331665,
-0.05567258968949318,
0.020819734781980515,
0.13113169372081757,
0.26717609167099,
-0.25925213098526,
0.5146579742431641,
0.15195433795452118,
0.015707436949014664,
-0.10250354558229446,
0.19770731031894684,
0.0010804645717144012,
0.24360907077789307,
0.14074255526065826,
0.019506186246871948,
-0.143234983086586,
-0.0863727331161499,
0.1586080640554428,
-0.1537783443927765,
0.11491835862398148,
-0.207692950963974,
-0.5288491249084473,
-0.1383778601884842,
0.19597020745277405,
-0.21715235710144043,
-0.017809107899665833,
-0.06141390651464462,
0.25009483098983765,
0.3539170026779175,
-0.03674846887588501,
-0.06780009716749191,
-0.06122812628746033,
-0.5243683457374573,
-0.11488142609596252,
0.11099424213171005,
0.2954593598842621,
-0.020678333938121796,
-0.05423276126384735,
0.20858412981033325,
0.030477287247776985,
0.1012488380074501,
0.46431416273117065,
-0.22025509178638458,
0.23929136991500854,
-0.3482900559902191,
-0.03604939579963684,
-0.01958932727575302,
0.038286734372377396,
-0.44009023904800415,
0.12779223918914795,
0.019084475934505463,
0.06307794153690338,
0.1286253035068512,
0.12247778475284576,
0.3128184676170349,
-0.03941040858626366,
-0.07582105696201324,
-0.017778854817152023,
-0.059460632503032684,
0.04070137441158295,
-0.34099316596984863,
0.1874387115240097,
0.2360609620809555,
0.24779285490512848,
0.02006734535098076,
0.07010193914175034,
0.07460960745811462,
0.0039749108254909515,
0.27209532260894775,
-0.0868159681558609,
-0.06688850373029709,
0.07667861878871918,
-0.016367275267839432,
-0.3128659725189209,
0.35182541608810425,
-0.3357621133327484,
-0.2965860664844513,
0.29604387283325195,
-0.21430909633636475,
-0.15782341361045837,
0.016124464571475983,
-0.3016456961631775,
-0.1420278549194336,
0.02380830980837345,
-0.30321285128593445,
-0.2123541384935379,
0.10166426002979279,
0.1071549579501152,
0.40681055188179016,
-0.3428554832935333,
-0.19955046474933624,
0.17274869978427887,
-0.583372175693512,
-0.25525975227355957,
-0.32876378297805786,
0.19016188383102417,
0.06275605410337448,
-0.0579114630818367,
0.1993652731180191,
0.4529871642589569,
0.1409740149974823,
-0.35449233651161194,
0.04939732328057289,
0.12415038794279099,
-0.14246827363967896,
0.19584572315216064,
0.09733841568231583,
0.23991906642913818,
0.3575851619243622,
-0.09570719301700592,
0.04108550027012825,
0.1910746842622757,
0.032763075083494186,
-0.13401974737644196,
-0.2634272575378418,
0.2920953035354614,
-0.014208987355232239,
0.07097997516393661,
-0.02473454177379608,
-0.11118903011083603,
0.12955044209957123,
-0.122744619846344,
-0.07951153069734573,
-0.05082014203071594,
0.1469736546278,
-0.3369879722595215,
0.33347082138061523,
0.3646104633808136,
-0.46430209279060364,
0.22449013590812683,
0.29091760516166687,
-0.14636419713497162,
0.13464729487895966,
0.07482602447271347,
-0.05244117230176926,
-0.2052507996559143,
0.31676191091537476,
0.23085813224315643,
0.27613401412963867,
0.30569326877593994,
0.2522517442703247,
0.048545293509960175,
-0.008448014967143536,
-0.07649248838424683,
-0.038392193615436554,
-0.08583958446979523,
0.16877694427967072,
0.26607972383499146,
0.26019278168678284,
-0.08596361428499222,
-0.6122269630432129,
0.03693506494164467,
0.0499599352478981,
0.16006071865558624,
-0.07627125829458237,
0.0615512952208519,
-0.2485843002796173,
-0.19752654433250427,
-0.25863465666770935,
0.30826613306999207,
-0.26242193579673767,
-0.14453217387199402,
0.12019442021846771,
0.631844699382782,
-0.030654504895210266,
0.3064052164554596,
0.4116280674934387,
0.22240419685840607,
-0.11183883994817734,
-0.07804987579584122,
-0.17096006870269775,
-0.06746871024370193,
-0.1962709128856659,
0.1298973113298416,
0.09499745070934296,
-0.0691874548792839,
0.6685636639595032,
-0.10792083293199539,
-0.059223562479019165,
-0.5418435335159302,
-0.21609213948249817,
0.21305373311042786,
-0.05239863693714142,
-0.2170230895280838,
0.053813643753528595,
-0.16225917637348175,
-0.10568162053823471,
-0.06007007136940956,
0.1231747418642044,
-0.22741739451885223,
-0.15303996205329895,
0.12534810602664948,
-0.3123573064804077,
-0.16309736669063568,
-0.10277752578258514,
-0.3549613356590271,
-0.21589291095733643,
-0.15329577028751373,
0.1833024024963379,
-0.05310609191656113,
0.3992730975151062,
0.2723514437675476,
-0.08174120634794235,
0.1850089579820633,
0.08734100311994553,
-0.038110971450805664,
-0.365498423576355,
-0.4348738193511963,
0.22348003089427948,
-0.16978713870048523,
-0.4827099144458771,
-0.40759700536727905,
-0.19566641747951508,
0.19991397857666016,
0.33509689569473267,
-0.4836426377296448,
-0.6593692898750305,
-0.25667238235473633,
-0.10910192131996155,
-0.00017291679978370667,
0.05683070048689842,
0.5137141942977905,
-0.07723315805196762,
-0.12072202563285828,
0.009318731725215912,
-0.07300320267677307,
0.35879600048065186,
0.2804521918296814,
0.17692694067955017,
0.1776580512523651,
0.10701824724674225,
0.19788916409015656,
0.6790722012519836,
0.6134926676750183,
-0.08614204823970795,
0.2554175853729248,
-0.32217490673065186,
0.2689201831817627,
-0.106923408806324,
-0.3043760061264038,
0.21928927302360535,
-0.10455819964408875,
-0.07516352832317352,
0.24212950468063354,
-0.012288818135857582,
-0.15862447023391724,
0.14986178278923035,
-0.11954961717128754,
-0.0016865730285644531,
-0.1449040025472641,
-0.0010028518736362457,
-0.019807152450084686,
0.2584483027458191,
0.05425787344574928,
0.21966898441314697,
0.022475074976682663,
-0.10587805509567261,
0.02965262532234192,
-0.06546959280967712,
0.222976952791214,
0.05476443096995354,
-0.15190955996513367,
-0.017631610855460167,
-0.6560468673706055,
0.20367784798145294,
0.10687948018312454,
0.15824338793754578,
-0.15233565866947174,
-0.015116726979613304,
0.3801807165145874,
-0.1443508118391037,
0.6375607848167419,
0.014222392812371254,
0.055070266127586365,
-0.18778152763843536,
-0.478883296251297,
-0.48222827911376953,
0.06693559885025024,
-0.13499143719673157,
0.579679548740387,
-0.006088715046644211,
0.3889375627040863,
-0.31342414021492004,
-0.10944795608520508,
0.1739771068096161,
0.3057713806629181,
-0.19543880224227905,
-0.10607991367578506,
-0.2743671238422394,
-0.4998411536216736,
-0.3233688175678253,
0.20676083862781525,
0.07274577766656876,
0.12913118302822113,
0.18790370225906372,
-0.19745343923568726,
-0.13205213844776154,
-0.10069078207015991,
0.15193022787570953,
0.3928559124469757,
0.25208255648612976,
-0.14913040399551392,
0.3351112902164459,
0.2830903232097626,
0.149431049823761,
0.004635713994503021,
0.6331284642219543,
-0.09817631542682648,
0.024464182555675507,
0.0037246979773044586,
-0.17967545986175537,
0.28194132447242737,
0.3062559962272644,
-0.09238062053918839,
-0.2611292004585266,
-0.21070577204227448,
0.07028672099113464,
-0.45321109890937805,
-0.18350118398666382,
0.20462742447853088,
0.16289743781089783,
-0.1864132136106491,
-0.26921743154525757,
0.38499152660369873,
0.026798970997333527,
-0.0705590695142746,
0.49064093828201294,
0.12801742553710938,
0.0303198155015707,
0.33086180686950684,
0.10674013197422028,
0.7394798994064331,
0.018604502081871033,
-0.14950327575206757,
0.2236868441104889,
-0.04661458730697632,
0.13924908638000488,
0.07781248539686203,
0.18356356024742126,
-0.2786572575569153,
-0.13654416799545288,
0.11013944447040558,
-0.022316481918096542,
-0.14773061871528625,
0.13542234897613525,
0.025388125330209732,
0.21704557538032532,
0.23551131784915924,
-0.12697233259677887,
-0.21429124474525452,
0.5361114740371704,
-0.18356168270111084,
-0.11067099869251251,
0.01577027142047882,
0.17655791342258453,
-0.3284895420074463,
0.278949499130249,
0.0726986676454544,
0.08268601447343826,
0.46644797921180725,
-0.17533144354820251,
-0.24896612763404846,
0.10598447173833847,
0.11497041583061218,
0.2975059747695923,
0.06703701615333557,
-0.7207549214363098,
-0.19772642850875854,
0.24400649964809418,
0.18919803202152252,
-0.1886506974697113,
-0.0376892164349556,
0.07611053436994553,
-0.1158134713768959,
0.3180420398712158,
-0.10672575235366821,
-0.011912379413843155,
-0.021880334243178368,
-0.12462246417999268,
-0.14227980375289917,
-0.37807199358940125,
0.33632010221481323,
-0.38156813383102417,
-0.09861473739147186,
0.11144165694713593,
-0.010321669280529022,
-0.015489773824810982,
0.3384568989276886,
0.05405299365520477,
-0.29935503005981445,
-0.356324702501297,
0.10739675164222717,
0.016802620142698288,
-0.32393157482147217,
0.28264468908309937,
0.011188782751560211,
-0.2766417860984802,
-0.08096380531787872,
0.3137466013431549,
0.3909626007080078,
0.47274234890937805,
0.1407952904701233,
0.06155633553862572,
-0.023285401985049248,
-0.1917746365070343,
-0.019210144877433777,
0.09471341222524643,
-0.3815043568611145,
0.2260502576828003,
-0.2288423329591751,
-0.021547257900238037,
-0.1061755120754242,
0.20375995337963104,
-0.06312716752290726,
0.11867810785770416,
-0.2103886902332306,
-0.10097411274909973,
-0.38962632417678833,
0.09051389992237091,
0.2607361376285553,
0.5076242685317993,
0.0027551427483558655,
-0.1158587783575058,
-0.06657439470291138,
0.3116370737552643,
-0.3670714199542999,
-0.08138101547956467,
-0.018965689465403557,
0.17510807514190674,
-0.014346066862344742,
-0.32178550958633423,
0.2145145833492279,
0.032381780445575714,
0.06924912333488464,
0.1949455887079239,
-0.07544095814228058,
-0.2602742314338684,
-0.1200798749923706,
0.06372036784887314,
-0.0650714859366417,
0.04818263649940491,
-0.1827664077281952,
-0.15559692680835724,
-0.039707135409116745,
-0.3161546289920807,
0.4914206862449646,
0.20971384644508362,
0.08356435596942902,
0.12881892919540405,
0.35189396142959595,
-0.1629306972026825,
0.039520569145679474,
-0.16300718486309052,
-0.06896960735321045,
-0.10691912472248077,
-0.10098933428525925,
0.06227937713265419,
0.11569095402956009,
-0.15345239639282227,
0.2560013234615326,
0.011522844433784485,
0.414955735206604,
-0.21201050281524658,
0.027292128652334213,
-0.004510641098022461,
-0.06254297494888306,
0.051909949630498886,
0.6901230812072754,
0.08082932233810425,
-0.05043167993426323,
-0.18125180900096893,
-0.00008230563253164291,
0.18084916472434998,
-0.39940205216407776,
-0.3634869158267975,
0.1461501568555832,
0.1847575306892395,
0.17007534205913544,
0.3360412120819092,
0.310799777507782,
0.09665676951408386,
0.20871855318546295,
0.033782657235860825,
0.39234474301338196,
-0.7315682768821716,
0.017449669539928436,
-0.05902983620762825,
-0.14201848208904266,
-0.2615372836589813,
0.3731982111930847,
0.08565974235534668,
0.2183123230934143,
0.42314010858535767,
-0.04637690633535385,
0.8138617277145386,
0.043202221393585205,
0.16477474570274353,
0.4761594831943512,
-0.04078273847699165,
0.13448235392570496,
-0.15205270051956177,
-0.06125202775001526,
0.060533057898283005,
0.11896544694900513,
0.22841128706932068,
-0.35805127024650574,
-0.29761162400245667,
-0.25642088055610657,
0.005513716489076614,
-0.3106750249862671,
0.03240436688065529,
0.11865119636058807,
0.006130866706371307,
0.01592111587524414,
0.08681578934192657,
0.049136653542518616,
-0.23389972746372223,
0.39444002509117126,
-0.026885345578193665,
-0.2402239292860031,
-0.2057649791240692,
-0.005067154765129089,
0.08803324401378632,
0.19661271572113037,
-0.06370942294597626,
0.18656066060066223,
0.3219464421272278,
-0.008480601012706757,
-0.18846498429775238,
0.4951399266719818,
0.32434114813804626,
-0.05902998894453049,
-0.2554798126220703,
0.24814464151859283,
-0.027153272181749344,
-0.020729368552565575,
-0.24115364253520966,
0.23572468757629395,
-0.33816275000572205,
-0.21697376668453217,
0.3084709942340851,
0.06599809974431992,
-0.10889043658971786,
-0.13365092873573303,
0.14598549902439117,
-0.06273017823696136,
-0.009931720793247223,
0.4986516833305359,
-0.1610441952943802,
-0.1231648176908493,
0.03753138706088066,
-0.04954259842634201,
-0.24106773734092712,
-0.3347645401954651,
0.30131441354751587,
-0.0997496098279953,
0.12144691497087479,
-0.09712281823158264,
0.10811987519264221,
-0.29981765151023865,
0.4943065345287323,
0.07933999598026276,
0.09920842945575714,
-0.14975644648075104,
0.01775561273097992,
-0.6058890223503113,
0.17325113713741302,
-0.2712297737598419,
0.11155009269714355,
0.155212864279747,
0.3709072172641754,
-0.14411261677742004,
0.13215261697769165,
-0.1261959671974182,
0.05199742689728737,
0.12757842242717743,
0.05635465309023857,
-0.32507094740867615,
-0.06452572345733643,
-0.23527981340885162,
-0.1458999067544937,
0.13788212835788727,
-0.28499022126197815,
0.37663206458091736,
-0.1423780918121338,
0.03650858253240585,
-0.007344851270318031,
-0.12963557243347168,
0.15741077065467834,
-0.23918938636779785,
0.0031837373971939087,
0.20126061141490936,
0.16750511527061462,
-0.16243311762809753,
0.13086724281311035,
-0.0961754322052002,
-0.10657384991645813,
-0.39780059456825256,
0.3838825821876526,
0.13503529131412506,
0.19216452538967133,
0.017566580325365067,
-0.3507038950920105,
-0.11696727573871613,
0.5167585015296936,
0.13468001782894135,
0.08194821327924728,
-0.02350734733045101,
0.2657819986343384,
-0.15778939425945282,
0.30491915345191956,
-0.11175990849733353,
0.39795470237731934,
0.13429167866706848,
-0.009203230030834675,
-0.14814597368240356,
-0.44271838665008545,
0.6408781409263611,
-0.4343436062335968,
-0.1860610842704773,
-0.23336799442768097,
0.32257866859436035,
0.15407325327396393,
-0.15070267021656036,
-0.4669991433620453,
-0.10750323534011841,
0.18955354392528534,
-0.3828691244125366,
0.17417223751544952,
0.2206583023071289,
0.04692327231168747,
-0.10661640018224716,
-0.10569804906845093,
0.40639445185661316,
0.09495842456817627,
-0.4816311299800873,
0.38887566328048706,
-0.32122349739074707
] |
https://github.com/huggingface/datasets/issues/5360 | IterableDataset returns duplicated data using PyTorch DDP | Opened a PR here: https://github.com/huggingface/datasets/pull/5369
feel free to play with it and share your feedbacks :) | As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()` | 16 | IterableDataset returns duplicated data using PyTorch DDP
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
Opened a PR here: https://github.com/huggingface/datasets/pull/5369
feel free to play with it and share your feedbacks :) | [
-0.2953227162361145,
-0.5206161737442017,
-0.09636051952838898,
0.5269635319709778,
0.08554467558860779,
-0.24271738529205322,
0.3260631263256073,
0.22798503935337067,
-0.05602581799030304,
0.288725346326828,
-0.23174051940441132,
0.487846702337265,
-0.02539021149277687,
0.026707319542765617,
0.09653032571077347,
-0.027277112007141113,
-0.10531491786241531,
0.05562799051403999,
-0.49368104338645935,
-0.17707133293151855,
-0.0424186997115612,
0.2656983733177185,
0.10306312143802643,
-0.2554622292518616,
-0.37324076890945435,
0.0430421307682991,
-0.2998434007167816,
0.26467806100845337,
0.11911867558956146,
-0.19247010350227356,
0.26789766550064087,
0.13145701587200165,
-0.11771191656589508,
0.613540768623352,
-0.00010762654710561037,
0.05029894411563873,
0.03215394169092178,
0.06786838173866272,
-0.05312803387641907,
-0.08976824581623077,
0.15363237261772156,
-0.0072527192533016205,
0.040606774389743805,
-0.1668606400489807,
-0.3360464870929718,
-0.3860040307044983,
-0.11095745861530304,
-0.19380411505699158,
0.39828914403915405,
0.057942334562540054,
0.24876189231872559,
0.45002979040145874,
-0.20196373760700226,
-0.03486654907464981,
-0.08115343004465103,
0.2761794924736023,
0.042982250452041626,
0.3325135111808777,
0.40234237909317017,
0.25714367628097534,
-0.3301681578159332,
0.42479121685028076,
0.02343023382127285,
0.38042840361595154,
0.11742086708545685,
-0.07934886962175369,
-0.24273383617401123,
-0.11377087235450745,
0.42501696944236755,
0.2734978199005127,
0.2862042486667633,
-0.2913680970668793,
-0.004128568340092897,
-0.2663630545139313,
0.00438902759924531,
-0.12652207911014557,
0.06846371293067932,
0.17478260397911072,
0.01522626169025898,
-0.13431672751903534,
-0.3422965705394745,
0.22443751990795135,
-0.2222180962562561,
-0.12285622954368591,
0.014763832092285156,
0.2697035074234009,
-0.09643804281949997,
0.20021280646324158,
0.1083846464753151,
0.07021785527467728,
0.21769112348556519,
-0.04323048144578934,
0.06548640877008438,
-0.06288991868495941,
-0.18463143706321716,
-0.20761242508888245,
0.11965002119541168,
-0.03320000320672989,
0.2358783781528473,
0.07828104496002197,
0.18207044899463654,
0.2484656572341919,
0.0995350256562233,
-0.012740515172481537,
0.3147328794002533,
0.07671533524990082,
-0.11298928409814835,
0.09791755676269531,
0.1635008454322815,
-0.2024831771850586,
-0.2161150425672531,
-0.037229396402835846,
0.19504380226135254,
-0.1102064847946167,
0.20604045689105988,
-0.10382416099309921,
0.28567373752593994,
-0.1547834426164627,
-0.17265966534614563,
-0.17945078015327454,
-0.19341394305229187,
-0.15540026128292084,
0.016815347597002983,
0.30248957872390747,
-0.027420178055763245,
-0.02664223685860634,
-0.1264764815568924,
0.16442479193210602,
-0.13581256568431854,
0.026387512683868408,
-0.3506760597229004,
-0.10789509117603302,
-0.041774407029151917,
0.06038577854633331,
0.18492881953716278,
-0.3752790093421936,
0.6563866138458252,
0.20102432370185852,
0.06952503323554993,
-0.12636464834213257,
0.13819287717342377,
0.007323306053876877,
0.3574718236923218,
-0.026503633707761765,
0.12067893147468567,
-0.0834183320403099,
0.008095338940620422,
0.2044883519411087,
-0.0636010393500328,
-0.014594882726669312,
-0.09144917875528336,
-0.35094815492630005,
-0.13096779584884644,
0.2503870725631714,
-0.05802381411194801,
-0.002504948526620865,
0.11003658175468445,
0.19284673035144806,
0.295449435710907,
-0.018408581614494324,
0.05499231070280075,
0.02571156620979309,
-0.4320865571498871,
-0.07341843098402023,
0.023726513609290123,
0.27801692485809326,
0.11429251730442047,
-0.13936544954776764,
0.1834191530942917,
0.056586071848869324,
-0.018964678049087524,
0.38665908575057983,
-0.1529427021741867,
0.21738070249557495,
-0.3971262574195862,
-0.0695500373840332,
0.06623005121946335,
-0.06779061257839203,
-0.3211427927017212,
0.2497200220823288,
-0.0631590485572815,
0.09929247945547104,
0.05540771782398224,
0.16098718345165253,
0.13039445877075195,
0.12375413626432419,
0.045239247381687164,
-0.07858593761920929,
-0.04737415164709091,
0.09406264871358871,
-0.29109108448028564,
0.18608704209327698,
0.23345185816287994,
0.07919003069400787,
0.02435014769434929,
0.12543044984340668,
0.060804300010204315,
-0.13901841640472412,
0.3251551687717438,
-0.1290757805109024,
-0.06101188808679581,
0.23041637241840363,
-0.06754222512245178,
-0.24349097907543182,
0.2453288733959198,
-0.22931087017059326,
-0.20822030305862427,
0.14485210180282593,
-0.23871584236621857,
-0.0018302053213119507,
0.05466018244624138,
-0.2840377986431122,
-0.23349159955978394,
0.023639315739274025,
-0.31691014766693115,
-0.2618504762649536,
0.185808926820755,
0.22701892256736755,
0.19368338584899902,
-0.34565019607543945,
-0.1687554270029068,
0.14314813911914825,
-0.35778069496154785,
-0.2877490520477295,
-0.4195088744163513,
0.12303909659385681,
-0.1383850872516632,
0.0011767242103815079,
0.2856644093990326,
0.39107537269592285,
0.22140878438949585,
-0.25659269094467163,
0.07535554468631744,
0.1450209766626358,
-0.2738972306251526,
0.26069164276123047,
0.0911611020565033,
0.1565103530883789,
0.38505467772483826,
-0.12035921216011047,
-0.002833368256688118,
0.21443377435207367,
0.12494687736034393,
-0.15403538942337036,
-0.2690633237361908,
0.3288458585739136,
-0.11343610286712646,
0.0317738875746727,
0.06715627759695053,
-0.1312974989414215,
0.14962489902973175,
-0.06639988720417023,
-0.08729220181703568,
-0.07129094004631042,
0.15946131944656372,
-0.1466897577047348,
0.3739912509918213,
0.2510996460914612,
-0.5776472687721252,
0.3063203692436218,
0.34847989678382874,
0.048087190836668015,
0.05162191018462181,
0.042578838765621185,
-0.09861546009778976,
-0.25996872782707214,
0.30028122663497925,
-0.05982024222612381,
0.3128480315208435,
0.32782790064811707,
0.2951044738292694,
0.11086338013410568,
0.06070587784051895,
-0.07345087826251984,
0.02639925479888916,
-0.07646679878234863,
0.05241742730140686,
0.3331100344657898,
0.3231782615184784,
-0.19752353429794312,
-0.7035129070281982,
0.10133528709411621,
-0.053976938128471375,
0.09951089322566986,
-0.11109447479248047,
0.11774500459432602,
-0.1327866017818451,
-0.22252410650253296,
-0.30511903762817383,
0.05949265509843826,
-0.31560707092285156,
-0.13984894752502441,
0.16611908376216888,
0.6495715975761414,
0.024881858378648758,
0.2722960412502289,
0.337056428194046,
0.1545584797859192,
0.003156932070851326,
0.022133447229862213,
-0.15402573347091675,
-0.11319249123334885,
-0.21198487281799316,
0.17789946496486664,
-0.01119766104966402,
-0.13007183372974396,
0.639920175075531,
-0.08643898367881775,
-0.04926413670182228,
-0.5231807827949524,
-0.21297305822372437,
0.22543632984161377,
-0.10533380508422852,
-0.2039860486984253,
0.10560470074415207,
-0.002428576350212097,
-0.04471087083220482,
-0.05849676951766014,
0.12262370437383652,
-0.31065720319747925,
-0.2138315737247467,
0.00649552047252655,
-0.1968117654323578,
-0.21943055093288422,
-0.17816627025604248,
-0.49931302666664124,
-0.04639343172311783,
-0.10881614685058594,
0.2827482223510742,
0.015933692455291748,
0.2880729138851166,
0.28699979186058044,
0.062253061681985855,
0.14589132368564606,
0.17396199703216553,
-0.00523790717124939,
-0.48854202032089233,
-0.5464925765991211,
0.0962807834148407,
-0.24118949472904205,
-0.5097435712814331,
-0.3455222249031067,
-0.07575181871652603,
0.3466196060180664,
0.11400403827428818,
-0.4616110920906067,
-0.5891146659851074,
-0.1581767201423645,
0.037305619567632675,
-0.024504758417606354,
0.11574500799179077,
0.48850715160369873,
-0.05097690597176552,
-0.2070160061120987,
-0.10082022845745087,
-0.12040993571281433,
0.30922409892082214,
0.12323183566331863,
0.2777712941169739,
0.013798070140182972,
0.09160202741622925,
0.08755315840244293,
0.4970444440841675,
0.4967855215072632,
-0.09959395229816437,
0.34565773606300354,
-0.4505421221256256,
0.341135174036026,
-0.11561056226491928,
-0.4457215964794159,
0.20588484406471252,
-0.12091249227523804,
-0.038839228451251984,
0.3557654619216919,
-0.009298622608184814,
-0.06989184021949768,
0.056468307971954346,
-0.08851678669452667,
-0.09155786037445068,
-0.13350938260555267,
-0.0641617551445961,
0.028924351558089256,
0.2150874137878418,
0.11076872050762177,
0.23754549026489258,
-0.11844223737716675,
-0.14758837223052979,
-0.0038626552559435368,
-0.1290234625339508,
0.09696760773658752,
-0.04133714362978935,
-0.11422818899154663,
0.0192919559776783,
-0.7010717391967773,
0.27236971259117126,
0.14541231095790863,
0.06763405352830887,
-0.10714001953601837,
0.017406675964593887,
0.3073215186595917,
-0.1597905308008194,
0.628571629524231,
0.03241831436753273,
0.04078712686896324,
-0.1606748104095459,
-0.4369056820869446,
-0.4474433362483978,
0.23350729048252106,
-0.09753595292568207,
0.4639080762863159,
0.2006392627954483,
0.37283992767333984,
-0.3248874545097351,
-0.15241549909114838,
0.07967864722013474,
0.2108406126499176,
-0.1800832748413086,
-0.08813045173883438,
-0.33527329564094543,
-0.44428032636642456,
-0.22782745957374573,
0.11325914412736893,
0.05933251976966858,
0.18511304259300232,
0.14076057076454163,
-0.19512560963630676,
-0.06864459812641144,
-0.0837433785200119,
0.14326588809490204,
0.3583211302757263,
0.28074735403060913,
-0.034410230815410614,
0.13239911198616028,
0.25386878848075867,
0.3074507713317871,
0.032174088060855865,
0.6966295838356018,
-0.1764538288116455,
0.0673312395811081,
0.027110544964671135,
-0.30576473474502563,
0.14718949794769287,
0.3519380986690521,
-0.00981306005269289,
-0.14792868494987488,
-0.0499480739235878,
-0.0062821730971336365,
-0.343045175075531,
-0.09824252873659134,
0.28744345903396606,
0.1448666751384735,
-0.15649539232254028,
-0.25924649834632874,
0.29968640208244324,
-0.05495312809944153,
-0.053206916898489,
0.522110104560852,
-0.08063444495201111,
-0.05072075128555298,
0.2138839215040207,
0.046199943870306015,
0.8227047324180603,
0.08295222371816635,
-0.04398808255791664,
0.2750171422958374,
-0.2638709843158722,
0.045492023229599,
0.03305912762880325,
0.15963014960289001,
-0.3992983102798462,
-0.14931254088878632,
0.100147545337677,
0.06831103563308716,
-0.24179887771606445,
0.05690641328692436,
-0.06326200067996979,
0.24105052649974823,
0.22628556191921234,
-0.08242952823638916,
-0.29111382365226746,
0.4740123152732849,
-0.18770070374011993,
-0.07671400904655457,
-0.11305712163448334,
0.24063268303871155,
-0.2935779094696045,
0.38121575117111206,
0.004972752183675766,
-0.08212035149335861,
0.3363915979862213,
-0.2840285897254944,
-0.17828607559204102,
0.11989141255617142,
0.02777470275759697,
0.15738868713378906,
0.012038171291351318,
-0.6096798181533813,
-0.2779250144958496,
0.21123597025871277,
0.314619779586792,
-0.2002875953912735,
-0.1424839049577713,
0.07622770965099335,
-0.1138906255364418,
0.3317713439464569,
-0.1790393590927124,
0.03838736191391945,
-0.06451382488012314,
-0.12046831101179123,
-0.1933765709400177,
-0.2884632647037506,
0.3017905354499817,
-0.23109844326972961,
-0.12286195904016495,
0.1690809726715088,
-0.06766714155673981,
-0.22718214988708496,
0.28167933225631714,
0.11526330560445786,
-0.2910956144332886,
-0.41764676570892334,
0.1541450023651123,
-0.0550626665353775,
-0.2928530275821686,
0.17645736038684845,
0.1599218100309372,
-0.2790156304836273,
-0.1361653208732605,
0.4702260494232178,
0.2637604773044586,
0.36610686779022217,
0.1508813202381134,
0.18231533467769623,
-0.05820135027170181,
-0.2331339716911316,
-0.1053197979927063,
0.22437690198421478,
-0.4487394690513611,
0.19472521543502808,
-0.15526974201202393,
-0.021057210862636566,
-0.11136384308338165,
0.35960936546325684,
-0.1130775511264801,
0.2423667013645172,
-0.10666701197624207,
-0.03871645778417587,
-0.48196500539779663,
-0.0305289626121521,
0.16977837681770325,
0.4715263247489929,
0.03715486079454422,
0.018317624926567078,
0.06155037879943848,
0.29302576184272766,
-0.418330579996109,
-0.05552399158477783,
-0.09709126502275467,
0.17861363291740417,
-0.049964576959609985,
-0.3308046758174896,
0.2587633728981018,
-0.06478036940097809,
0.15711213648319244,
0.1862003356218338,
-0.06524422019720078,
-0.3275213837623596,
-0.12475582957267761,
0.04729282855987549,
-0.06786467134952545,
-0.01267855055630207,
-0.1543133705854416,
-0.09229176491498947,
-0.05547143891453743,
-0.2979852557182312,
0.4293729066848755,
0.23961284756660461,
0.13892720639705658,
0.13875555992126465,
0.09221426397562027,
-0.12601885199546814,
0.07767552882432938,
-0.3644236624240875,
-0.016019336879253387,
-0.07578100264072418,
-0.09000934660434723,
-0.06707552075386047,
0.040473125874996185,
-0.1855434775352478,
0.21840719878673553,
0.02794540673494339,
0.44803082942962646,
-0.05678334832191467,
0.05420004576444626,
-0.02742517739534378,
-0.1284070909023285,
0.07691270112991333,
0.6626666784286499,
0.12182779610157013,
-0.07713653147220612,
-0.03673093765974045,
-0.1193375214934349,
0.2528719902038574,
-0.432729572057724,
-0.21439893543720245,
0.039090655744075775,
0.010001574642956257,
0.19143235683441162,
0.24695074558258057,
0.2178487777709961,
0.050184667110443115,
0.27590930461883545,
0.06724168360233307,
0.32414278388023376,
-0.6465654373168945,
-0.03725041449069977,
-0.08785758912563324,
-0.057504165917634964,
-0.18238075077533722,
0.41322633624076843,
0.10680632293224335,
0.07072308659553528,
0.31057053804397583,
-0.06319449096918106,
0.5540820956230164,
-0.005648370832204819,
0.12255023419857025,
0.4117302894592285,
0.07689742743968964,
0.0339297279715538,
-0.1812227964401245,
-0.03824789822101593,
0.0803825780749321,
0.19669629633426666,
0.2482765018939972,
-0.26403701305389404,
-0.29051506519317627,
-0.2078804224729538,
0.1358538120985031,
-0.38225844502449036,
-0.013097960501909256,
0.04984254390001297,
-0.1170826256275177,
0.07017101347446442,
0.10491818189620972,
0.10620453953742981,
-0.13730394840240479,
0.3101676106452942,
-0.015808232128620148,
-0.25211429595947266,
-0.40396443009376526,
-0.0356205478310585,
0.09462754428386688,
0.13895440101623535,
-0.01696709915995598,
0.221964493393898,
0.3896227478981018,
0.032666340470314026,
-0.11775889992713928,
0.6610410213470459,
0.36121368408203125,
-0.05502960830926895,
-0.18454217910766602,
0.30662059783935547,
-0.065639927983284,
-0.12158182263374329,
-0.27119773626327515,
0.1341206431388855,
-0.2076593041419983,
-0.25937727093696594,
0.3052680194377899,
0.12481392920017242,
-0.15573832392692566,
0.09793969988822937,
0.13069142401218414,
0.0005682799965143204,
-0.0038509517908096313,
0.42795035243034363,
-0.1979449838399887,
-0.10392273962497711,
-0.18044732511043549,
-0.156638503074646,
-0.3342137932777405,
-0.14691494405269623,
0.16676338016986847,
-0.09132641553878784,
0.2476901113986969,
-0.2515743672847748,
0.11985914409160614,
-0.18535785377025604,
0.4115782082080841,
0.08455519378185272,
0.03415067866444588,
-0.20037098228931427,
-0.0633925050497055,
-0.5617351531982422,
0.20113754272460938,
-0.09495317935943604,
0.10376985371112823,
-0.026404406875371933,
0.3172440230846405,
-0.18844756484031677,
-0.06539419293403625,
0.028594449162483215,
-0.01605878956615925,
0.24344313144683838,
0.16379085183143616,
-0.3820866346359253,
-0.004071895033121109,
-0.19832934439182281,
-0.043194204568862915,
0.23809069395065308,
-0.1569591909646988,
0.20834337174892426,
-0.20574156939983368,
0.12938007712364197,
-0.013012465089559555,
-0.07350114732980728,
-0.09622399508953094,
-0.09853723645210266,
0.04982733726501465,
0.1745857298374176,
0.10179951041936874,
-0.3105756342411041,
0.11889056116342545,
-0.07195715606212616,
-0.1725025773048401,
-0.3506554961204529,
0.41517746448516846,
0.26666826009750366,
0.18831463158130646,
0.0578889399766922,
-0.3922247588634491,
-0.16387595236301422,
0.40352076292037964,
0.24941836297512054,
0.08677957206964493,
-0.11634458601474762,
0.2893611192703247,
-0.16575190424919128,
0.21294920146465302,
-0.17217785120010376,
0.49364200234413147,
0.1348901093006134,
0.11651292443275452,
-0.20832660794258118,
-0.474391371011734,
0.6339017748832703,
-0.3735446631908417,
-0.2931442856788635,
-0.12764400243759155,
0.1956232637166977,
0.3143691420555115,
-0.23377293348312378,
-0.5813478231430054,
0.03612380474805832,
0.21948082745075226,
-0.33807122707366943,
0.09229861199855804,
0.12296837568283081,
-0.18591441214084625,
0.0007576271891593933,
-0.12177246809005737,
0.3735511898994446,
0.3590345084667206,
-0.3998163342475891,
0.42438769340515137,
-0.2644822299480438
] |
https://github.com/huggingface/datasets/issues/5360 | IterableDataset returns duplicated data using PyTorch DDP | @lhoestq I add shuffle after split_dataset_by_node, duplicated data still exist.
For example, we have a directory named `mock_pretraining_data`, which has three files, `part-00000`, `part-00002`,`part-00002`.
Text in `part-00000` is like this:
{"id": 0}
{"id": 1}
{"id": 2}
{"id": 3}
{"id": 4}
{"id": 5}
{"id": 6}
{"id": 7}
{"id": 8}
{"id": 9}
and `part-00001`
{"id": 10}
{"id": 11}
{"id": 12}
{"id": 13}
{"id": 14}
{"id": 15}
{"id": 16}
{"id": 17}
{"id": 18}
{"id": 19}
and `part-00002`
{"id": 20}
{"id": 21}
{"id": 22}
{"id": 23}
{"id": 24}
{"id": 25}
{"id": 26}
{"id": 27}
{"id": 28}
{"id": 29}
And code in `test_dist.py` like this,
```python
import torch
from torch.utils.data import Dataset, DataLoader
from datasets import load_dataset
import os
from transformers import AutoTokenizer, NezhaForPreTraining
from transformers import AdamW, get_linear_schedule_with_warmup
import torch.nn.functional as F
import torch.nn as nn
import torch.distributed as dist
from datasets.distributed import split_dataset_by_node
from torch.nn.parallel import DistributedDataParallel as DDP
os.environ["CUDA_VISIBLE_DEVICES"] = '5,6,7'
dist.init_process_group("nccl")
local_rank = int(os.environ['LOCAL_RANK'])
world_size = torch.distributed.get_world_size()
device = torch.device('cuda', local_rank)
data_dir = './'
def load_trainset(train_path):
dataset = load_dataset('json', data_dir=os.path.join(data_dir, train_path), split='train', streaming=True)
return dataset
def collate_fn(examples):
input_ids = []
for example in examples:
input_ids.append(example['id'])
return torch.LongTensor(input_ids).to(device)
dataset = load_trainset('mock_pretraining_data')
dataset = split_dataset_by_node(dataset, rank=local_rank, world_size=world_size).shuffle(buffer_size=512)
# train_sampler = torch.utils.data.distributed.DistributedSampler(dataset)
batch_size = 3
print('batch_size: {}'.format(batch_size))
train_dataloader = DataLoader(dataset, batch_size=batch_size, collate_fn=collate_fn)
for x in train_dataloader:
print({'rank': local_rank, 'id': x})
```
run `python -m torch.distributed.launch --nproc_per_node=3 test_dist.py`
The output is
```
{'rank': 1, 'id': tensor([12, 15, 14], device='cuda:1')}
{'rank': 1, 'id': tensor([16, 10, 18], device='cuda:1')}
{'rank': 1, 'id': tensor([17, 13, 19], device='cuda:1')}
{'rank': 1, 'id': tensor([11], device='cuda:1')}
{'rank': 0, 'id': tensor([0, 2, 9], device='cuda:0')}
{'rank': 0, 'id': tensor([4, 8, 1], device='cuda:0')}
{'rank': 0, 'id': tensor([5, 3, 6], device='cuda:0')}
{'rank': 0, 'id': tensor([7], device='cuda:0')}
{'rank': 2, 'id': tensor([13, 15, 14], device='cuda:2')}
{'rank': 2, 'id': tensor([19, 17, 18], device='cuda:2')}
{'rank': 2, 'id': tensor([12, 16, 11], device='cuda:2')}
{'rank': 2, 'id': tensor([10], device='cuda:2')}
```
`part-00001` is loaded twice, `part-00002` isn't loaded.
If I run `python -m torch.distributed.launch --nproc_per_node=2 test_dist.py`
The output is weirder,many numbers appear twice
```
{'rank': 1, 'id': tensor([26, 8, 13], device='cuda:1')}
{'rank': 1, 'id': tensor([22, 19, 20], device='cuda:1')}
{'rank': 1, 'id': tensor([12, 28, 11], device='cuda:1')}
{'rank': 1, 'id': tensor([24, 2, 14], device='cuda:1')}
{'rank': 1, 'id': tensor([ 6, 27, 3], device='cuda:1')}
{'rank': 0, 'id': tensor([ 8, 25, 1], device='cuda:0')}
{'rank': 0, 'id': tensor([20, 4, 12], device='cuda:0')}
{'rank': 0, 'id': tensor([14, 29, 5], device='cuda:0')}
{'rank': 0, 'id': tensor([ 7, 18, 23], device='cuda:0')}
{'rank': 0, 'id': tensor([19, 17, 11], device='cuda:0')}
``` | As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()` | 403 | IterableDataset returns duplicated data using PyTorch DDP
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
@lhoestq I add shuffle after split_dataset_by_node, duplicated data still exist.
For example, we have a directory named `mock_pretraining_data`, which has three files, `part-00000`, `part-00002`,`part-00002`.
Text in `part-00000` is like this:
{"id": 0}
{"id": 1}
{"id": 2}
{"id": 3}
{"id": 4}
{"id": 5}
{"id": 6}
{"id": 7}
{"id": 8}
{"id": 9}
and `part-00001`
{"id": 10}
{"id": 11}
{"id": 12}
{"id": 13}
{"id": 14}
{"id": 15}
{"id": 16}
{"id": 17}
{"id": 18}
{"id": 19}
and `part-00002`
{"id": 20}
{"id": 21}
{"id": 22}
{"id": 23}
{"id": 24}
{"id": 25}
{"id": 26}
{"id": 27}
{"id": 28}
{"id": 29}
And code in `test_dist.py` like this,
```python
import torch
from torch.utils.data import Dataset, DataLoader
from datasets import load_dataset
import os
from transformers import AutoTokenizer, NezhaForPreTraining
from transformers import AdamW, get_linear_schedule_with_warmup
import torch.nn.functional as F
import torch.nn as nn
import torch.distributed as dist
from datasets.distributed import split_dataset_by_node
from torch.nn.parallel import DistributedDataParallel as DDP
os.environ["CUDA_VISIBLE_DEVICES"] = '5,6,7'
dist.init_process_group("nccl")
local_rank = int(os.environ['LOCAL_RANK'])
world_size = torch.distributed.get_world_size()
device = torch.device('cuda', local_rank)
data_dir = './'
def load_trainset(train_path):
dataset = load_dataset('json', data_dir=os.path.join(data_dir, train_path), split='train', streaming=True)
return dataset
def collate_fn(examples):
input_ids = []
for example in examples:
input_ids.append(example['id'])
return torch.LongTensor(input_ids).to(device)
dataset = load_trainset('mock_pretraining_data')
dataset = split_dataset_by_node(dataset, rank=local_rank, world_size=world_size).shuffle(buffer_size=512)
# train_sampler = torch.utils.data.distributed.DistributedSampler(dataset)
batch_size = 3
print('batch_size: {}'.format(batch_size))
train_dataloader = DataLoader(dataset, batch_size=batch_size, collate_fn=collate_fn)
for x in train_dataloader:
print({'rank': local_rank, 'id': x})
```
run `python -m torch.distributed.launch --nproc_per_node=3 test_dist.py`
The output is
```
{'rank': 1, 'id': tensor([12, 15, 14], device='cuda:1')}
{'rank': 1, 'id': tensor([16, 10, 18], device='cuda:1')}
{'rank': 1, 'id': tensor([17, 13, 19], device='cuda:1')}
{'rank': 1, 'id': tensor([11], device='cuda:1')}
{'rank': 0, 'id': tensor([0, 2, 9], device='cuda:0')}
{'rank': 0, 'id': tensor([4, 8, 1], device='cuda:0')}
{'rank': 0, 'id': tensor([5, 3, 6], device='cuda:0')}
{'rank': 0, 'id': tensor([7], device='cuda:0')}
{'rank': 2, 'id': tensor([13, 15, 14], device='cuda:2')}
{'rank': 2, 'id': tensor([19, 17, 18], device='cuda:2')}
{'rank': 2, 'id': tensor([12, 16, 11], device='cuda:2')}
{'rank': 2, 'id': tensor([10], device='cuda:2')}
```
`part-00001` is loaded twice, `part-00002` isn't loaded.
If I run `python -m torch.distributed.launch --nproc_per_node=2 test_dist.py`
The output is weirder,many numbers appear twice
```
{'rank': 1, 'id': tensor([26, 8, 13], device='cuda:1')}
{'rank': 1, 'id': tensor([22, 19, 20], device='cuda:1')}
{'rank': 1, 'id': tensor([12, 28, 11], device='cuda:1')}
{'rank': 1, 'id': tensor([24, 2, 14], device='cuda:1')}
{'rank': 1, 'id': tensor([ 6, 27, 3], device='cuda:1')}
{'rank': 0, 'id': tensor([ 8, 25, 1], device='cuda:0')}
{'rank': 0, 'id': tensor([20, 4, 12], device='cuda:0')}
{'rank': 0, 'id': tensor([14, 29, 5], device='cuda:0')}
{'rank': 0, 'id': tensor([ 7, 18, 23], device='cuda:0')}
{'rank': 0, 'id': tensor([19, 17, 11], device='cuda:0')}
``` | [
-0.2204432636499405,
-0.3701728582382202,
0.006940644234418869,
0.5591898560523987,
-0.010643567889928818,
-0.09040876477956772,
0.3263974189758301,
0.20362789928913116,
-0.27641287446022034,
0.1877831518650055,
-0.30991217494010925,
0.6718085408210754,
-0.1850050389766693,
-0.05659216642379761,
0.21775880455970764,
-0.02125181257724762,
-0.11976256221532822,
0.013318926095962524,
-0.2795076370239258,
-0.13088549673557281,
-0.028589431196451187,
0.09406596422195435,
-0.24035637080669403,
-0.36836451292037964,
-0.4888012707233429,
0.011370042338967323,
-0.3553655743598938,
0.2606196999549866,
-0.0033185333013534546,
-0.19116252660751343,
0.20408368110656738,
0.37247347831726074,
-0.07752557098865509,
0.44564566016197205,
-0.00011916130461031571,
0.02529805898666382,
-0.06519176810979843,
-0.014390864409506321,
-0.18791724741458893,
-0.18324275314807892,
0.14241859316825867,
0.07038130611181259,
-0.054641857743263245,
-0.2262386679649353,
-0.1539703607559204,
-0.5743809938430786,
-0.13747064769268036,
-0.16077455878257751,
0.5182165503501892,
0.09590411931276321,
0.08619660884141922,
0.16993601620197296,
-0.14472056925296783,
0.12494687736034393,
0.10681390017271042,
0.4107990860939026,
0.08196260035037994,
0.3390547037124634,
0.27149567008018494,
0.23682290315628052,
-0.23753562569618225,
0.2942749559879303,
-0.10631582140922546,
0.42558491230010986,
0.024278119206428528,
-0.05515918880701065,
-0.198196142911911,
-0.10159286856651306,
0.2005504071712494,
0.3863625228404999,
0.26615920662879944,
-0.3673340380191803,
-0.056472353637218475,
-0.46685540676116943,
0.20043332874774933,
-0.11390621215105057,
-0.07717568427324295,
0.07562242448329926,
-0.021152785047888756,
-0.30247050523757935,
-0.44052520394325256,
0.21730376780033112,
-0.030028417706489563,
-0.043183691799640656,
0.17681404948234558,
0.3841848373413086,
0.024614408612251282,
0.2689569294452667,
0.2707926630973816,
0.18184195458889008,
0.5485450029373169,
-0.16439172625541687,
0.13081365823745728,
0.06823469698429108,
-0.24211685359477997,
-0.3110646903514862,
-0.18797633051872253,
-0.1583668291568756,
0.3138158917427063,
0.02240041270852089,
0.23660588264465332,
0.14230790734291077,
0.21386441588401794,
-0.12441808730363846,
0.3795885741710663,
0.2505417466163635,
-0.1756443977355957,
0.27992331981658936,
0.013151496648788452,
-0.08188904076814651,
-0.10724565386772156,
0.0551232248544693,
0.15033058822155,
-0.02314891666173935,
0.22218717634677887,
0.016778117045760155,
0.31930965185165405,
-0.056845761835575104,
-0.33089959621429443,
-0.3518744111061096,
-0.270438015460968,
-0.43134811520576477,
0.06656631082296371,
0.1190953254699707,
-0.027203742414712906,
0.023174496367573738,
-0.24756568670272827,
0.13357606530189514,
-0.23573412001132965,
0.023346133530139923,
-0.2861725687980652,
-0.030983686447143555,
-0.07881439477205276,
0.09138287603855133,
0.312197208404541,
-0.16598452627658844,
0.4718315005302429,
0.24940405786037445,
0.0110023133456707,
-0.2959872782230377,
0.2287275195121765,
-0.09967099130153656,
0.34747111797332764,
-0.10043865442276001,
0.03977901116013527,
0.0029912330210208893,
-0.0868232250213623,
0.2940406799316406,
-0.1601928174495697,
0.23124480247497559,
-0.2871192395687103,
-0.27568599581718445,
0.04969978332519531,
0.15855450928211212,
-0.16138510406017303,
-0.06783992052078247,
-0.1717890202999115,
0.11903530359268188,
0.2904612123966217,
-0.2074151337146759,
0.04023626446723938,
-0.2051326483488083,
-0.494953989982605,
-0.08641967177391052,
0.09280005842447281,
0.22297655045986176,
0.14595741033554077,
-0.22906863689422607,
0.08681458234786987,
0.06795499473810196,
0.21663030982017517,
0.4889887869358063,
-0.14094041287899017,
0.34383049607276917,
-0.3916383683681488,
-0.2268032431602478,
0.1607227921485901,
-0.09500591456890106,
-0.41296884417533875,
0.05089627206325531,
-0.03320563584566116,
0.2920551300048828,
0.1674085259437561,
0.2294771522283554,
0.33039790391921997,
-0.011005416512489319,
0.10326240956783295,
0.028352603316307068,
-0.2012188881635666,
-0.046238675713539124,
-0.19738881289958954,
0.12831568717956543,
0.4250328540802002,
0.19935841858386993,
-0.11335137486457825,
0.021107278764247894,
0.02387627214193344,
0.056230612099170685,
0.49866750836372375,
0.03728810325264931,
-0.08818262070417404,
-0.010478276759386063,
-0.235364630818367,
-0.17175976932048798,
0.23832017183303833,
-0.3121982216835022,
-0.3289402723312378,
0.17957517504692078,
-0.07502000033855438,
-0.2100214660167694,
-0.08565473556518555,
-0.2538340091705322,
-0.0981534868478775,
-0.20006206631660461,
-0.45976731181144714,
-0.4157158434391022,
0.058880843222141266,
0.2885279357433319,
0.31932735443115234,
-0.34591853618621826,
-0.13383005559444427,
0.23613287508487701,
-0.4419953525066376,
-0.23159311711788177,
-0.4998653531074524,
0.3137710988521576,
0.004973849281668663,
-0.02750714123249054,
0.1958126425743103,
0.614888608455658,
0.21475812792778015,
-0.2752532362937927,
-0.028023861348628998,
0.19252407550811768,
0.059910427778959274,
-0.056300729513168335,
-0.03348191827535629,
0.022925302386283875,
0.3444010317325592,
-0.16980092227458954,
-0.02769029326736927,
0.16350437700748444,
0.078571617603302,
-0.12319006025791168,
-0.132919579744339,
0.38502198457717896,
-0.2899424135684967,
0.015743963420391083,
-0.0004569441080093384,
-0.20440573990345,
0.05864545702934265,
-0.07950187474489212,
0.06385541707277298,
-0.06527794897556305,
0.2106989324092865,
-0.0555206723511219,
0.3574131727218628,
0.2829684913158417,
-0.28375592827796936,
0.17130345106124878,
0.49114418029785156,
-0.18780343234539032,
-0.09576421231031418,
-0.1624343991279602,
-0.13471496105194092,
-0.25932082533836365,
0.15362980961799622,
0.26782095432281494,
0.4206371307373047,
0.23637232184410095,
0.2101050168275833,
0.08203630894422531,
0.056070853024721146,
0.04084480181336403,
-0.08266999572515488,
-0.0547967255115509,
0.11508402973413467,
0.35976696014404297,
0.267075777053833,
-0.05373040959239006,
-0.5064829587936401,
-0.018158141523599625,
0.18495038151741028,
0.3055945634841919,
0.004472620785236359,
0.06954067200422287,
-0.28639882802963257,
-0.14527931809425354,
-0.4047061502933502,
0.07325919717550278,
-0.2231762409210205,
-0.01197832077741623,
0.14213943481445312,
0.7531253099441528,
0.12486964464187622,
0.34820428490638733,
0.53948575258255,
0.13163575530052185,
-0.08216826617717743,
-0.19670364260673523,
-0.1479135900735855,
-0.10012824088335037,
-0.18176090717315674,
0.11064960062503815,
0.02605309709906578,
-0.06300875544548035,
0.5675128102302551,
-0.08952750265598297,
-0.12133336812257767,
-0.489610493183136,
-0.11344645172357559,
0.16849079728126526,
-0.15380792319774628,
-0.22363631427288055,
-0.03170552849769592,
-0.20017345249652863,
0.00515718013048172,
-0.22452473640441895,
0.05292116478085518,
-0.33873632550239563,
-0.23175296187400818,
0.10581031441688538,
-0.16593173146247864,
-0.13570737838745117,
-0.05638585984706879,
-0.5304595828056335,
-0.231795534491539,
-0.08271221816539764,
0.10249555110931396,
-0.06988226622343063,
0.3062886595726013,
0.21559657156467438,
-0.10009375959634781,
0.005310894921422005,
0.06805788725614548,
-0.05415331572294235,
-0.471931129693985,
-0.3669569194316864,
0.10227903723716736,
-0.08395184576511383,
-0.30005601048469543,
-0.38575479388237,
-0.22385308146476746,
0.14659707248210907,
0.3975972533226013,
-0.30425000190734863,
-0.3262803256511688,
-0.07431215792894363,
-0.08079718053340912,
-0.13824284076690674,
0.07230592519044876,
0.6332018375396729,
0.05999080464243889,
0.005513867363333702,
-0.03908739238977432,
-0.14862559735774994,
0.11481627076864243,
0.3315282464027405,
0.3547472059726715,
-0.0020581483840942383,
-0.0408906564116478,
0.17976386845111847,
0.7232661843299866,
0.47460201382637024,
-0.1340510994195938,
0.09977692365646362,
-0.3383253812789917,
0.3113304674625397,
-0.23994171619415283,
-0.3561899960041046,
0.11902446299791336,
-0.0268746018409729,
0.020089074969291687,
0.33939826488494873,
-0.18413686752319336,
-0.22596991062164307,
0.06183207780122757,
-0.012487877160310745,
-0.020294826477766037,
-0.14339226484298706,
-0.07846482843160629,
-0.012485779821872711,
0.20115181803703308,
0.09118148684501648,
0.26816290616989136,
0.043635834008455276,
-0.22068089246749878,
-0.09258927404880524,
-0.07484152913093567,
0.18154221773147583,
0.06978540867567062,
-0.36966145038604736,
-0.16949456930160522,
-0.5637670159339905,
0.1672961413860321,
0.30394744873046875,
0.2584049701690674,
-0.016317859292030334,
0.10603464394807816,
0.41785097122192383,
-0.023557016626000404,
0.6677477955818176,
0.03525527939200401,
0.10858507454395294,
-0.0507364496588707,
-0.27841413021087646,
-0.3292595446109772,
0.12511670589447021,
-0.16716830432415009,
0.29550617933273315,
0.20504702627658844,
0.27834975719451904,
-0.3059888780117035,
-0.13444626331329346,
0.226138636469841,
0.2866712808609009,
-0.12445086240768433,
-0.07048337906599045,
-0.2206711769104004,
-0.3585335314273834,
-0.32280227541923523,
0.16108965873718262,
0.07756620645523071,
0.131477952003479,
0.029439635574817657,
-0.11767950654029846,
0.03257793188095093,
-0.1462242603302002,
0.06734921038150787,
0.28595542907714844,
0.28502020239830017,
0.11027342081069946,
0.2801380157470703,
0.6081899404525757,
0.07767429947853088,
0.13442499935626984,
0.527870237827301,
-0.13721585273742676,
-0.08044703304767609,
-0.012614678591489792,
-0.16260792315006256,
0.11736982315778732,
0.2982909083366394,
-0.03493575006723404,
-0.140951007604599,
-0.16906136274337769,
0.004438966512680054,
-0.36954060196876526,
-0.13142244517803192,
0.4054948389530182,
0.05212485417723656,
-0.4470268785953522,
-0.5972707867622375,
0.09397095441818237,
-0.03866487368941307,
-0.034084394574165344,
0.49325957894325256,
-0.11985793709754944,
-0.05145401507616043,
0.3679577708244324,
-0.14570873975753784,
0.8287718296051025,
-0.0013723522424697876,
0.07295078784227371,
0.15389102697372437,
-0.22079657018184662,
0.23826825618743896,
0.0523998960852623,
0.2564561069011688,
-0.25569918751716614,
-0.23676416277885437,
0.05309242010116577,
-0.0003383941948413849,
-0.1947619616985321,
0.17819556593894958,
-0.04964737594127655,
0.31964871287345886,
0.325508713722229,
-0.19040291011333466,
-0.2062937170267105,
0.4915347099304199,
-0.11821898072957993,
0.032047197222709656,
0.2642160654067993,
0.014117080718278885,
-0.371846079826355,
0.3941541910171509,
0.17041969299316406,
0.055843535810709,
0.3355690836906433,
-0.18125537037849426,
-0.170875683426857,
0.12805891036987305,
-0.12365254759788513,
0.264960378408432,
-0.11980102956295013,
-0.6550426483154297,
-0.2289341390132904,
0.26140227913856506,
0.10886681079864502,
-0.18569616973400116,
0.015093183144927025,
0.15749499201774597,
0.021840691566467285,
0.31206056475639343,
-0.15441669523715973,
-0.056322336196899414,
-0.04169534146785736,
0.053400591015815735,
-0.20088276267051697,
-0.4011836051940918,
0.3398771286010742,
-0.5783895254135132,
-0.05681435018777847,
0.16137562692165375,
0.11858084052801132,
-0.1677159070968628,
0.37232521176338196,
0.14601221680641174,
-0.2987714409828186,
-0.32786911725997925,
0.030144471675157547,
-0.034271255135536194,
-0.3193107545375824,
0.23167234659194946,
-0.1824389547109604,
-0.29471027851104736,
-0.1253088116645813,
0.3457094728946686,
0.43015405535697937,
0.4357088506221771,
0.23326198756694794,
-0.06590414047241211,
0.006338190287351608,
-0.1774938404560089,
-0.07954038679599762,
0.09503334015607834,
-0.38577383756637573,
0.19057489931583405,
-0.1466263085603714,
0.07353007793426514,
-0.03518969193100929,
0.17541390657424927,
-0.17776323854923248,
0.2991641163825989,
-0.1411764919757843,
-0.20523998141288757,
-0.45120030641555786,
0.04592733830213547,
0.29477089643478394,
0.5125938653945923,
0.1855810582637787,
0.15989014506340027,
-0.11205526441335678,
0.4082106947898865,
-0.27340269088745117,
0.06820894032716751,
0.15241850912570953,
0.27028417587280273,
-0.09931356459856033,
-0.3644404709339142,
0.18424445390701294,
-0.05775999277830124,
0.04606453329324722,
0.2511250972747803,
0.03522226959466934,
-0.18411418795585632,
-0.18100129067897797,
0.08473177254199982,
-0.041604556143283844,
0.06576742231845856,
-0.2647445499897003,
-0.25039613246917725,
0.00039507076144218445,
-0.2922420799732208,
0.45541954040527344,
0.3138631284236908,
0.19365060329437256,
0.22480089962482452,
0.31109946966171265,
-0.17133194208145142,
0.003664575517177582,
-0.14323902130126953,
-0.2333659827709198,
-0.1835954636335373,
0.058782029896974564,
0.09989000856876373,
-0.05529552698135376,
-0.10738548636436462,
-0.0885981023311615,
-0.18807998299598694,
0.4906459450721741,
-0.20409968495368958,
0.04974191263318062,
-0.02565319836139679,
-0.1220874935388565,
-0.056016985327005386,
0.6006749868392944,
0.2648804187774658,
-0.07441781461238861,
-0.3125258982181549,
0.03654659539461136,
0.07455364614725113,
-0.3530775010585785,
-0.3163609504699707,
-0.001812901347875595,
0.17654983699321747,
0.23143550753593445,
0.37737178802490234,
0.1856875866651535,
0.03938790410757065,
0.20432260632514954,
-0.023199530318379402,
0.3162897527217865,
-0.6186318397521973,
0.17523428797721863,
0.06435433775186539,
-0.03680525720119476,
-0.3377307653427124,
0.34453126788139343,
-0.020132586359977722,
0.030953601002693176,
0.2945193648338318,
-0.008500337600708008,
0.6394296288490295,
0.12187455594539642,
0.13746576011180878,
0.3598272204399109,
-0.10333085060119629,
-0.0038993731141090393,
0.0962875634431839,
-0.08283323049545288,
0.1654093861579895,
0.22726620733737946,
0.10733715444803238,
-0.25592494010925293,
-0.14181047677993774,
-0.04919825494289398,
0.03393649309873581,
-0.19835346937179565,
0.06273233890533447,
0.22067373991012573,
-0.1133788600564003,
-0.1456724852323532,
0.10257720947265625,
0.04743197187781334,
-0.26240378618240356,
0.2984001040458679,
0.0166047103703022,
-0.3898863196372986,
-0.3712078332901001,
0.026579536497592926,
0.21149110794067383,
0.08156121522188187,
-0.12710624933242798,
0.18616238236427307,
0.15491507947444916,
-0.00859776884317398,
0.08740998804569244,
0.5372384190559387,
0.15857908129692078,
-0.11974935233592987,
-0.23686248064041138,
0.2537488341331482,
-0.05819057300686836,
-0.02279655821621418,
-0.044653818011283875,
0.28376874327659607,
-0.1540578305721283,
-0.2548013925552368,
0.17287304997444153,
0.03834419697523117,
-0.10744264721870422,
-0.13431410491466522,
0.3463446795940399,
-0.21157172322273254,
-0.0833311378955841,
0.6828867197036743,
-0.06684072315692902,
-0.07723279297351837,
0.05050215870141983,
0.02441062033176422,
-0.3534006178379059,
-0.22744721174240112,
0.023417707532644272,
-0.03302000090479851,
0.11474893242120743,
-0.05968673527240753,
0.05516679584980011,
-0.270175963640213,
0.2592147886753082,
0.16537806391716003,
-0.02954183518886566,
-0.2989187240600586,
-0.10143354535102844,
-0.6029174327850342,
0.12780456244945526,
-0.13438183069229126,
0.13146455585956573,
0.04068312793970108,
0.29523733258247375,
-0.22404605150222778,
0.11079055815935135,
-0.045015379786491394,
-0.04197501763701439,
0.22398820519447327,
0.2405429482460022,
-0.32402101159095764,
-0.08143472671508789,
-0.20959584414958954,
-0.02787253074347973,
0.1278170645236969,
-0.29009824991226196,
0.25659969449043274,
-0.013254199177026749,
-0.08949540555477142,
0.13271600008010864,
-0.06959861516952515,
0.07698999345302582,
-0.08160683512687683,
-0.07522565126419067,
0.1802774965763092,
0.3495948016643524,
-0.06666281074285507,
0.23828718066215515,
-0.06496076285839081,
0.0034307187888771296,
-0.4242773652076721,
0.39815759658813477,
0.35711780190467834,
0.2637587785720825,
0.0243618655949831,
-0.2357039898633957,
-0.23370371758937836,
0.4841715395450592,
0.07219092547893524,
-0.017389433458447456,
-0.33360522985458374,
0.3536663055419922,
-0.16901704668998718,
0.4828948378562927,
-0.100777767598629,
0.5463788509368896,
0.03491887450218201,
0.0047657545655965805,
-0.2653559148311615,
-0.2812313735485077,
0.582544207572937,
-0.4220717251300812,
-0.2246037870645523,
-0.28314459323883057,
0.3189723491668701,
0.29892033338546753,
-0.062106817960739136,
-0.35977959632873535,
0.05938684195280075,
0.3025478422641754,
-0.28503283858299255,
0.21851643919944763,
0.21184420585632324,
-0.1546066701412201,
0.06190066412091255,
-0.04633864015340805,
0.5093628168106079,
0.2280074656009674,
-0.3902292251586914,
0.44603049755096436,
-0.3857215642929077
] |
https://github.com/huggingface/datasets/issues/5360 | IterableDataset returns duplicated data using PyTorch DDP | Hi ! Thanks for reporting, you need to pass `seed=` to `shuffle()` or the processes won't use the same seed to shuffle the shards order before assigning each shard to a node.
The issue is that the workers are not using the same seed to shuffle the shards before splitting the shards list by node. | As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()` | 55 | IterableDataset returns duplicated data using PyTorch DDP
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
Hi ! Thanks for reporting, you need to pass `seed=` to `shuffle()` or the processes won't use the same seed to shuffle the shards order before assigning each shard to a node.
The issue is that the workers are not using the same seed to shuffle the shards before splitting the shards list by node. | [
-0.21982364356517792,
-0.5668027400970459,
-0.05250830948352814,
0.506003201007843,
-0.01659645512700081,
-0.27572229504585266,
0.4127112925052643,
0.1547837108373642,
-0.1684759557247162,
0.35836261510849,
-0.25319531559944153,
0.49590787291526794,
-0.06351693719625473,
-0.03370492532849312,
0.06780419498682022,
-0.07447011768817902,
-0.11935170739889145,
-0.009605199098587036,
-0.42902204394340515,
-0.2626069188117981,
-0.013103390112519264,
0.23837783932685852,
-0.013592146337032318,
-0.24372781813144684,
-0.4529248774051666,
0.08144988119602203,
-0.3069067597389221,
0.34067630767822266,
0.18450360000133514,
-0.14299479126930237,
0.09952358901500702,
0.18769027292728424,
-0.23412391543388367,
0.5940554141998291,
-0.00010720775026129559,
-0.006417714059352875,
0.1465109884738922,
0.033627405762672424,
0.001545666716992855,
0.00693918764591217,
-0.047090306878089905,
0.09119647741317749,
-0.1868717223405838,
-0.28119099140167236,
-0.2124553918838501,
-0.31317830085754395,
-0.036449968814849854,
0.024966061115264893,
0.36709851026535034,
-0.02072303742170334,
0.21436016261577606,
0.2691167891025543,
-0.05094897747039795,
-0.010991190560162067,
0.19144873321056366,
0.256218820810318,
0.03900166600942612,
0.23250490427017212,
0.18273897469043732,
0.3474128544330597,
-0.2578829526901245,
0.27509042620658875,
-0.007954537868499756,
0.4876587986946106,
0.03890763223171234,
-0.032470282167196274,
-0.2272416651248932,
-0.1641557812690735,
0.26087823510169983,
0.2820932865142822,
0.16433098912239075,
-0.2500471770763397,
0.00239017466083169,
-0.3025110065937042,
-0.10312411934137344,
-0.1792379915714264,
0.016071755439043045,
0.185063898563385,
0.00032902881503105164,
-0.2484632432460785,
-0.28932061791419983,
0.20835520327091217,
-0.07250729203224182,
-0.1689472198486328,
0.1052057147026062,
0.3332892656326294,
0.011658210307359695,
0.2156369984149933,
0.18472172319889069,
0.14185306429862976,
0.302992582321167,
-0.049454279243946075,
-0.00020608305931091309,
-0.10222061723470688,
-0.3257863223552704,
-0.11664432287216187,
0.0011538788676261902,
0.09041259437799454,
0.15448254346847534,
0.01857796497642994,
0.10406409204006195,
0.30819401144981384,
0.21932663023471832,
0.007269032299518585,
0.1918148547410965,
-0.031003670766949654,
0.03136608004570007,
0.19669237732887268,
0.040889982134103775,
-0.298783540725708,
-0.17018984258174896,
0.02605205401778221,
0.2587050199508667,
-0.19636522233486176,
0.11949403584003448,
0.013934154063463211,
0.22768862545490265,
-0.10037390887737274,
-0.15341760218143463,
-0.3204207718372345,
-0.1034860908985138,
-0.16371876001358032,
-0.06616123765707016,
0.2955041527748108,
-0.054802581667900085,
-0.13764134049415588,
-0.20277105271816254,
0.0561077818274498,
-0.23392337560653687,
0.010987752117216587,
-0.3390228748321533,
-0.11780273914337158,
-0.08891363441944122,
0.19687466323375702,
0.11107343435287476,
-0.22726115584373474,
0.4669286012649536,
0.2176443338394165,
0.152427077293396,
-0.1775091290473938,
0.14855270087718964,
0.033581580966711044,
0.22767433524131775,
0.03340451791882515,
0.0567888580262661,
-0.02844821847975254,
-0.08088721334934235,
0.18559880554676056,
-0.03967276215553284,
0.04864031448960304,
-0.25582608580589294,
-0.35357990860939026,
-0.0197994876652956,
0.2349151074886322,
-0.08718729019165039,
0.07379670441150665,
-0.09679009765386581,
-0.0171373151242733,
0.37110191583633423,
-0.01824597641825676,
-0.14734721183776855,
-0.0911174938082695,
-0.4622008502483368,
-0.16629253327846527,
0.021837571635842323,
0.22838784754276276,
0.08652196824550629,
-0.0857212245464325,
0.06806819140911102,
0.07353858649730682,
0.17118889093399048,
0.4673674404621124,
-0.13444730639457703,
0.08260578662157059,
-0.3421808183193207,
0.19336949288845062,
-0.1226532831788063,
0.179679274559021,
-0.35206732153892517,
0.0767221450805664,
-0.05707629770040512,
0.023240378126502037,
0.1513301432132721,
0.16694191098213196,
0.4173465967178345,
0.016796551644802094,
-0.1281820386648178,
-0.035028550773859024,
-0.008377296850085258,
0.1021561399102211,
-0.38716477155685425,
0.23705801367759705,
0.14467774331569672,
0.09625361859798431,
-0.009177658706903458,
0.20583534240722656,
0.15171054005622864,
-0.054979439824819565,
0.43513479828834534,
-0.10118833184242249,
0.05237127095460892,
0.08840382099151611,
0.08538565039634705,
-0.06561839580535889,
0.359965980052948,
-0.23479804396629333,
-0.14050868153572083,
0.2800895869731903,
-0.2800428867340088,
-0.005811065435409546,
-0.0008661523461341858,
-0.2581799030303955,
-0.20702385902404785,
-0.07895645499229431,
-0.32533496618270874,
-0.14406681060791016,
0.12852250039577484,
0.2642940282821655,
0.22093549370765686,
-0.40961939096450806,
-0.11929099261760712,
0.15750594437122345,
-0.549745500087738,
-0.3122628629207611,
-0.37750884890556335,
0.2677435576915741,
-0.1615609973669052,
-0.15823499858379364,
0.21774891018867493,
0.3411794900894165,
0.21376806497573853,
-0.30688661336898804,
0.08678785711526871,
0.16477756202220917,
-0.10222341865301132,
0.148197740316391,
0.0032310746610164642,
0.1507289856672287,
0.3297590911388397,
-0.0700119361281395,
-0.014964325353503227,
0.16563454270362854,
0.04199243709445,
-0.19686192274093628,
-0.10827086120843887,
0.4603762626647949,
-0.17786575853824615,
0.06122320517897606,
-0.061548978090286255,
-0.07172302901744843,
0.11660456657409668,
-0.1006879210472107,
0.06703237444162369,
-0.0001373589038848877,
0.17931842803955078,
-0.20960627496242523,
0.1364925056695938,
0.2595478594303131,
-0.41392889618873596,
0.3022444248199463,
0.4368928372859955,
-0.017649469897150993,
0.011486038565635681,
-0.17486217617988586,
0.07134886831045151,
-0.13410237431526184,
0.24740630388259888,
0.29299187660217285,
0.3476664423942566,
0.3019776940345764,
0.20138874650001526,
0.042533814907073975,
0.08211751282215118,
-0.14439043402671814,
-0.11542797833681107,
-0.10333909094333649,
0.14136597514152527,
0.36116841435432434,
0.2180035263299942,
-0.2444164901971817,
-0.5375485420227051,
0.0397958941757679,
0.1876378208398819,
0.1735134869813919,
-0.07934729009866714,
0.030684230849146843,
-0.18131881952285767,
-0.050328198820352554,
-0.4382384717464447,
0.1183546781539917,
-0.3715004622936249,
-0.18370620906352997,
0.21104583144187927,
0.6610949635505676,
0.003347158432006836,
0.3474430441856384,
0.5371230840682983,
0.1327236294746399,
-0.031822964549064636,
0.14342187345027924,
-0.2893103361129761,
-0.0835062637925148,
-0.0955856516957283,
0.13401983678340912,
0.10334461182355881,
0.046725839376449585,
0.4674719572067261,
-0.11662207543849945,
-0.16409209370613098,
-0.506072998046875,
-0.0894630178809166,
0.17837947607040405,
-0.21029914915561676,
-0.18468840420246124,
-0.006068229675292969,
-0.024741753935813904,
-0.03454966098070145,
-0.21393199265003204,
0.19714729487895966,
-0.3525625467300415,
-0.275513619184494,
0.15522003173828125,
-0.2042924165725708,
-0.2863699495792389,
-0.13043217360973358,
-0.4965328276157379,
-0.049139924347400665,
-0.1496688425540924,
0.19656606018543243,
0.08900225162506104,
0.45039618015289307,
0.12615971267223358,
-0.046394798904657364,
-0.04206777736544609,
0.0830095037817955,
-0.030457014217972755,
-0.39562177658081055,
-0.44871336221694946,
0.1256847381591797,
-0.2963451147079468,
-0.5138738751411438,
-0.2851543128490448,
-0.005413345992565155,
0.2002924531698227,
0.33303308486938477,
-0.2755661606788635,
-0.44775012135505676,
-0.23229436576366425,
-0.10720570385456085,
0.07507489621639252,
0.020450370386242867,
0.4776258170604706,
-0.075620636343956,
-0.11482450366020203,
-0.10748985409736633,
-0.022092819213867188,
0.37618595361709595,
0.2849108874797821,
0.24232831597328186,
0.10860991477966309,
0.1834399402141571,
0.15949450433254242,
0.8117365837097168,
0.35702991485595703,
-0.09478764235973358,
0.16312728822231293,
-0.36101076006889343,
0.11739495396614075,
-0.17708078026771545,
-0.29390090703964233,
0.2972117066383362,
0.01695941388607025,
-0.07538391649723053,
0.2451680451631546,
-0.07974597066640854,
-0.11887846142053604,
0.22444966435432434,
-0.05939212441444397,
-0.14033383131027222,
-0.17959430813789368,
-0.05462174117565155,
0.1279735565185547,
0.2624555230140686,
0.07085052132606506,
0.20926639437675476,
0.003352472558617592,
-0.19226455688476562,
0.0006739553064107895,
0.006920859217643738,
0.22717422246932983,
-0.010951614938676357,
-0.19087202847003937,
-0.01498840656131506,
-0.47862154245376587,
0.28007209300994873,
0.15878552198410034,
0.141471266746521,
-0.07700856029987335,
0.009211752563714981,
0.4655870199203491,
-0.10632364451885223,
0.6470567584037781,
0.007074547931551933,
0.07891283929347992,
-0.10543613135814667,
-0.3503694236278534,
-0.34000223875045776,
0.015253543853759766,
-0.141013503074646,
0.4527372121810913,
0.145438551902771,
0.22449497878551483,
-0.3758201599121094,
-0.09155557304620743,
0.05023729056119919,
0.15906745195388794,
-0.22441551089286804,
-0.03796914219856262,
-0.41266459226608276,
-0.4260343909263611,
-0.286691278219223,
0.10423926264047623,
0.04300533980131149,
0.27595263719558716,
-0.008869728073477745,
-0.13844013214111328,
-0.12106166779994965,
-0.17939653992652893,
0.08243781328201294,
0.32336580753326416,
0.3744303584098816,
-0.04861254245042801,
0.13889245688915253,
0.22639043629169464,
0.22664541006088257,
-0.03761143982410431,
0.4390692114830017,
-0.07263028621673584,
0.164626806974411,
0.05925222858786583,
-0.37149345874786377,
0.05823628604412079,
0.31573572754859924,
-0.023386947810649872,
-0.13162681460380554,
-0.12739789485931396,
0.11154322326183319,
-0.3103441298007965,
-0.2765381336212158,
0.285127192735672,
0.07983478158712387,
-0.1515299677848816,
-0.3193572759628296,
0.20938703417778015,
-0.048898838460445404,
-0.15657076239585876,
0.41237667202949524,
0.0437508188188076,
-0.02806270681321621,
0.4740559458732605,
0.07081282883882523,
0.8807395100593567,
-0.19059555232524872,
-0.14262688159942627,
0.2245132327079773,
-0.06413784623146057,
0.008838837035000324,
0.11076749861240387,
0.36857640743255615,
-0.5301856398582458,
-0.2388731986284256,
0.10789854824542999,
0.0009634979069232941,
-0.19983765482902527,
0.19538111984729767,
0.037125956267118454,
0.12662141025066376,
0.17990539968013763,
-0.15101096034049988,
-0.32600638270378113,
0.47935277223587036,
-0.15125761926174164,
0.01009626965969801,
0.11090928316116333,
0.2221832573413849,
-0.23662550747394562,
0.3905158042907715,
0.013092400506138802,
-0.021531689912080765,
0.23679813742637634,
-0.11972873657941818,
-0.1496935486793518,
0.19694647192955017,
0.2230798453092575,
0.3465229868888855,
0.0006223730742931366,
-0.5804371237754822,
-0.29841357469558716,
0.24952125549316406,
0.20504017174243927,
-0.20480558276176453,
0.05909333378076553,
0.15568231046199799,
-0.0030253902077674866,
0.15760521590709686,
-0.14844828844070435,
-0.023723814636468887,
-0.05339299142360687,
-0.12702561914920807,
-0.22324687242507935,
-0.3764232099056244,
0.3818153142929077,
-0.5752122402191162,
-0.3816409111022949,
0.2312452793121338,
0.006451889872550964,
-0.11415122449398041,
0.3213771879673004,
0.13697099685668945,
-0.3567117750644684,
-0.2817560136318207,
0.16037572920322418,
-0.09564381837844849,
-0.3952311873435974,
0.3524022400379181,
-0.0194954015314579,
-0.2598627209663391,
-0.016515500843524933,
0.3412512242794037,
0.3429032564163208,
0.4625832140445709,
0.19799943268299103,
0.079079270362854,
-0.04691080376505852,
-0.20345622301101685,
-0.2140631377696991,
0.026910854503512383,
-0.4062638282775879,
0.1855715662240982,
-0.2972349524497986,
0.07797156274318695,
-0.03026595525443554,
0.23904739320278168,
-0.1555282026529312,
0.3710823357105255,
-0.31424471735954285,
-0.13616172969341278,
-0.208516925573349,
-0.026327013969421387,
0.1969677060842514,
0.4375816881656647,
-0.04321925342082977,
0.0887511819601059,
-0.022519797086715698,
0.3476506471633911,
-0.4096381962299347,
-0.028665153309702873,
-0.05832458287477493,
0.2985652685165405,
-0.012134511023759842,
-0.386086106300354,
0.08836270123720169,
-0.05603908747434616,
0.13327805697917938,
0.2619422376155853,
-0.03759600967168808,
-0.25559595227241516,
-0.025655854493379593,
0.04654322564601898,
-0.0232456773519516,
0.12188579142093658,
-0.37649890780448914,
-0.13341885805130005,
-0.11561086773872375,
-0.2405892163515091,
0.4311123490333557,
0.2671668827533722,
0.0047992318868637085,
0.12434971332550049,
0.5266587138175964,
-0.0817522183060646,
0.08669717609882355,
-0.1481306254863739,
-0.07858724892139435,
-0.1797751635313034,
-0.07027935236692429,
0.06091183051466942,
0.06737425178289413,
-0.1173645555973053,
0.25777533650398254,
0.04349321499466896,
0.35920095443725586,
-0.1789596676826477,
0.1470024436712265,
-0.12020786106586456,
-0.09110052138566971,
-0.015666194260120392,
0.8297221660614014,
0.12540829181671143,
0.08998839557170868,
-0.21156036853790283,
0.024491410702466965,
0.23406165838241577,
-0.3311086595058441,
-0.3207305073738098,
0.2105502486228943,
0.13629010319709778,
0.14107836782932281,
0.2788051664829254,
0.1950245201587677,
-0.03421514853835106,
0.04787902161478996,
0.12068922072649002,
0.32907232642173767,
-0.8664827346801758,
-0.003355792723596096,
-0.194373220205307,
-0.07366494089365005,
-0.24256710708141327,
0.5249354243278503,
-0.10817493498325348,
-0.03665030747652054,
0.41223227977752686,
-0.048443324863910675,
0.7630724906921387,
-0.02570732682943344,
0.05662313476204872,
0.4348650872707367,
-0.014062698930501938,
0.034520454704761505,
-0.022043228149414062,
0.026905015110969543,
0.12510515749454498,
0.10224208235740662,
0.2943997085094452,
-0.25448599457740784,
-0.25968968868255615,
-0.19162409007549286,
0.17010587453842163,
-0.38541775941848755,
0.02530599758028984,
-0.021343711763620377,
-0.0895489752292633,
-0.03331843391060829,
0.03728831186890602,
0.1472092717885971,
-0.10144849121570587,
0.468965083360672,
0.04591198265552521,
-0.31133705377578735,
-0.20544512569904327,
-0.0806681364774704,
0.12723717093467712,
0.2739666998386383,
-0.11074851453304291,
0.10903366655111313,
0.13245072960853577,
0.027559790760278702,
-0.028923112899065018,
0.3772856295108795,
0.18854695558547974,
0.017175110056996346,
-0.1997404247522354,
0.31939584016799927,
-0.0017420090734958649,
-0.0440673753619194,
-0.22341227531433105,
0.2864835560321808,
-0.2494177520275116,
-0.1348869353532791,
0.20217852294445038,
0.12926237285137177,
-0.19487567245960236,
-0.188344344496727,
0.1963878571987152,
0.012618090957403183,
0.07014641165733337,
0.5093013644218445,
-0.26737573742866516,
-0.198415607213974,
-0.11132200062274933,
-0.013552248477935791,
-0.3619112968444824,
-0.3207177519798279,
0.1412476897239685,
-0.1570427268743515,
0.1464284062385559,
-0.18951945006847382,
0.11215284466743469,
-0.2890703082084656,
0.38552233576774597,
-0.05029362812638283,
0.08774097263813019,
-0.14989015460014343,
-0.1178000271320343,
-0.5382962226867676,
0.2378298044204712,
-0.16379211843013763,
0.17743343114852905,
-0.02262384071946144,
0.48977935314178467,
-0.20057892799377441,
-0.035083919763565063,
-0.11090360581874847,
-0.046737976372241974,
0.02435866743326187,
0.28883934020996094,
-0.34645724296569824,
0.0500776506960392,
-0.24350325763225555,
-0.2250295877456665,
0.18703627586364746,
-0.17014122009277344,
0.26650962233543396,
-0.05111110582947731,
0.12422237545251846,
0.09081998467445374,
-0.012638166546821594,
0.09849604964256287,
-0.28669556975364685,
-0.13583409786224365,
0.21570329368114471,
0.23931507766246796,
-0.1660154163837433,
0.1485372632741928,
-0.151035875082016,
-0.25236400961875916,
-0.466581255197525,
0.26102226972579956,
0.21861201524734497,
0.284665048122406,
0.17392216622829437,
-0.26771488785743713,
-0.34312987327575684,
0.5817391872406006,
0.11130473017692566,
0.10950794816017151,
-0.032404810190200806,
0.23453521728515625,
-0.2296501100063324,
0.3133182227611542,
-0.09588602185249329,
0.3800375163555145,
0.21847984194755554,
0.07408316433429718,
-0.17802849411964417,
-0.430601567029953,
0.6276659965515137,
-0.4553913474082947,
-0.22275124490261078,
-0.21557359397411346,
0.3235706686973572,
0.1306064873933792,
-0.1927901804447174,
-0.42130938172340393,
-0.14269977807998657,
0.13207966089248657,
-0.2775459885597229,
0.20648059248924255,
0.13506287336349487,
0.005973709747195244,
-0.04063263162970543,
-0.1022147536277771,
0.24886643886566162,
0.26109957695007324,
-0.43300265073776245,
0.3178138732910156,
-0.2726782560348511
] |
https://github.com/huggingface/datasets/issues/5360 | IterableDataset returns duplicated data using PyTorch DDP | I have the same issue
```
ds['train'] = load_dataset(streaming=True)
ds['train'] = split_dataset_by_node(ds['train'], rank=int(os.environ["RANK"]), world_size=int(os.environ["WORLD_SIZE"]))
vectorized_datasets = ds.map(
prepare_dataset,
remove_columns=raw_datasets_features,
).with_format("torch")
vectorized_datasets["train"] = vectorized_datasets["train"].shuffle(
buffer_size=500,
seed=42,
)
def prepare_dataset(batch):
....
print(f"sentence: {batch['sentence']}, target_text: {batch['target_text']}")
return batch
```
When using split_dataset_by_node(), the data being read is indeed different for each GPU ID.
```
trainer = Trainer(
model=model,
data_collator=data_collator,
args=training_args,
compute_metrics=compute_metrics,
train_dataset=vectorized_datasets["train"] if training_args.do_train else None,
eval_dataset=vectorized_datasets["eval"] if training_args.do_eval else None,
tokenizer=processor,
callbacks=[ShuffleCallback()],
)
...
train_result = trainer.train(resume_from_checkpoint=checkpoint)
```
However, when I execute trainer.train(), the data being read is different from what I expected.
Because I print the batch value in prepare_dataset() , I observe that the data is the same for each GPU ID.
How should I handle this issue?
| As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()` | 118 | IterableDataset returns duplicated data using PyTorch DDP
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
I have the same issue
```
ds['train'] = load_dataset(streaming=True)
ds['train'] = split_dataset_by_node(ds['train'], rank=int(os.environ["RANK"]), world_size=int(os.environ["WORLD_SIZE"]))
vectorized_datasets = ds.map(
prepare_dataset,
remove_columns=raw_datasets_features,
).with_format("torch")
vectorized_datasets["train"] = vectorized_datasets["train"].shuffle(
buffer_size=500,
seed=42,
)
def prepare_dataset(batch):
....
print(f"sentence: {batch['sentence']}, target_text: {batch['target_text']}")
return batch
```
When using split_dataset_by_node(), the data being read is indeed different for each GPU ID.
```
trainer = Trainer(
model=model,
data_collator=data_collator,
args=training_args,
compute_metrics=compute_metrics,
train_dataset=vectorized_datasets["train"] if training_args.do_train else None,
eval_dataset=vectorized_datasets["eval"] if training_args.do_eval else None,
tokenizer=processor,
callbacks=[ShuffleCallback()],
)
...
train_result = trainer.train(resume_from_checkpoint=checkpoint)
```
However, when I execute trainer.train(), the data being read is different from what I expected.
Because I print the batch value in prepare_dataset() , I observe that the data is the same for each GPU ID.
How should I handle this issue?
| [
-0.20593838393688202,
-0.4232088327407837,
0.025581851601600647,
0.6578265428543091,
0.13198640942573547,
-0.1360633373260498,
0.3936678171157837,
0.15741828083992004,
-0.24781762063503265,
0.11619254946708679,
-0.27916285395622253,
0.6520861983299255,
-0.05532820522785187,
0.040957674384117126,
0.24098971486091614,
-0.09226919710636139,
0.06512442231178284,
-0.05353283882141113,
-0.27285075187683105,
-0.21443462371826172,
0.011606678366661072,
0.22680629789829254,
-0.20022448897361755,
-0.2545742392539978,
-0.495413213968277,
-0.05024629086256027,
-0.2919442057609558,
0.0756094753742218,
-0.0024382006376981735,
-0.20815642178058624,
0.44902777671813965,
0.14013956487178802,
0.009919855743646622,
0.6154701113700867,
-0.00012347933079581708,
0.10790884494781494,
-0.1242782324552536,
0.016299275681376457,
-0.029406853020191193,
-0.16057558357715607,
0.19258195161819458,
0.026968954131007195,
0.06501079350709915,
-0.28226542472839355,
-0.15067702531814575,
-0.5488583445549011,
-0.1461191028356552,
-0.1359197497367859,
0.3745056390762329,
0.1116834431886673,
0.05383845791220665,
0.2654649615287781,
-0.19856607913970947,
0.19185970723628998,
-0.09139778465032578,
0.25554925203323364,
0.05493473261594772,
0.4546956717967987,
0.15564846992492676,
0.26577597856521606,
-0.30739685893058777,
0.3291161358356476,
-0.08940368890762329,
0.4013734459877014,
-0.06363188475370407,
0.12403847277164459,
-0.028322264552116394,
-0.10547153651714325,
0.24828988313674927,
0.24627453088760376,
0.09635265171527863,
-0.37062421441078186,
-0.029116014018654823,
-0.40726006031036377,
0.13216906785964966,
-0.2922382056713104,
-0.15483397245407104,
0.24368946254253387,
-0.10207538306713104,
-0.16200518608093262,
-0.44574347138404846,
0.3087017238140106,
-0.15007507801055908,
-0.07793204486370087,
0.006564736366271973,
0.3911045491695404,
-0.04698026925325394,
0.32844972610473633,
0.12629148364067078,
0.32151806354522705,
0.5320414900779724,
-0.12719391286373138,
0.08680033683776855,
-0.07259868830442429,
-0.2870502471923828,
-0.1296466737985611,
-0.18945184350013733,
-0.27423712611198425,
0.2982620298862457,
0.02644265443086624,
0.14796049892902374,
0.032940033823251724,
0.28695017099380493,
-0.10697618871927261,
0.4446907639503479,
0.21425789594650269,
-0.2019440233707428,
0.42445117235183716,
-0.09669694304466248,
-0.1017913669347763,
-0.33709457516670227,
0.07411476969718933,
0.1432293951511383,
0.06257172673940659,
0.36174821853637695,
-0.015724916011095047,
0.3188133239746094,
-0.03147594630718231,
-0.18917438387870789,
-0.20977512001991272,
-0.48679402470588684,
-0.32229143381118774,
0.011589768342673779,
0.022522035986185074,
-0.03160089999437332,
0.19267147779464722,
-0.21189084649085999,
0.19221912324428558,
-0.25340911746025085,
-0.04958100616931915,
-0.3044207990169525,
-0.16099251806735992,
-0.11759266257286072,
0.1428229659795761,
0.2595248222351074,
-0.27790045738220215,
0.5160329937934875,
0.2724410891532898,
0.039343059062957764,
-0.4039950370788574,
0.12894882261753082,
-0.18926313519477844,
0.5291696786880493,
-0.08874525129795074,
0.15427127480506897,
0.0799042358994484,
0.10062095522880554,
0.241519495844841,
-0.08807913959026337,
0.2652246654033661,
-0.19738030433654785,
-0.2982735335826874,
0.10376662015914917,
0.08071976155042648,
-0.06435070931911469,
-0.0817001461982727,
-0.27022019028663635,
0.24908652901649475,
0.2855667769908905,
-0.059850871562957764,
0.10154999047517776,
-0.2631329298019409,
-0.5297895669937134,
-0.14664429426193237,
0.16413573920726776,
0.20051944255828857,
0.071022629737854,
-0.15075016021728516,
0.3571832776069641,
0.060431938618421555,
0.28751611709594727,
0.5131663084030151,
-0.20508813858032227,
0.391836941242218,
-0.34494373202323914,
-0.2024538516998291,
0.06482468545436859,
-0.25327345728874207,
-0.469426691532135,
0.3092775046825409,
0.016050919890403748,
0.2932423949241638,
0.1617746353149414,
0.21173393726348877,
0.36389583349227905,
0.1376631110906601,
0.1652919352054596,
0.013307840563356876,
-0.21585030853748322,
-0.033795252442359924,
-0.1795126348733902,
0.006681663915514946,
0.4401921033859253,
0.09307774901390076,
0.01784420758485794,
0.12240244448184967,
0.031934332102537155,
-0.022980540990829468,
0.6587081551551819,
0.02431561052799225,
-0.184652641415596,
-0.01073039323091507,
-0.1510959416627884,
-0.1400553584098816,
0.2328048050403595,
-0.1929595172405243,
-0.23875537514686584,
0.16083434224128723,
-0.2480834275484085,
-0.1371472179889679,
0.014889143407344818,
-0.27793455123901367,
-0.07913598418235779,
-0.13410905003547668,
-0.4529682695865631,
-0.3320266306400299,
0.020855601876974106,
0.18842178583145142,
0.34495651721954346,
-0.16341018676757812,
-0.129546120762825,
0.25895431637763977,
-0.5301515460014343,
-0.16265788674354553,
-0.2866119146347046,
0.23812173306941986,
0.07744327187538147,
-0.04671606421470642,
0.18688911199569702,
0.4812116026878357,
0.28924065828323364,
-0.150856614112854,
-0.08414474874734879,
0.2245946228504181,
0.08254820108413696,
-0.05799362063407898,
-0.14957761764526367,
0.03858688473701477,
0.3825157582759857,
-0.06785031408071518,
0.017216188833117485,
0.10272873938083649,
0.10578710585832596,
-0.14121922850608826,
0.004067949950695038,
0.33762747049331665,
-0.07412424683570862,
0.12290634959936142,
0.004770670086145401,
-0.18416482210159302,
0.05567047744989395,
-0.02161630243062973,
0.05263357609510422,
-0.07572276145219803,
0.16932113468647003,
-0.10203461349010468,
0.4239121675491333,
0.2520909905433655,
-0.44300806522369385,
0.2572309374809265,
0.4093824326992035,
-0.20765388011932373,
-0.10196156054735184,
-0.2457025647163391,
-0.11694439500570297,
-0.2182711958885193,
0.165227010846138,
0.26153260469436646,
0.4138583540916443,
0.1535269021987915,
0.2137220948934555,
0.19991908967494965,
0.005583159625530243,
0.012990735471248627,
-0.019859321415424347,
0.04948217794299126,
0.15859727561473846,
0.24112966656684875,
0.14999786019325256,
-0.0893140584230423,
-0.4595111310482025,
0.25116321444511414,
0.2304193675518036,
0.18918126821517944,
-0.050562597811222076,
0.24799777567386627,
-0.311886727809906,
-0.2697915732860565,
-0.5665397644042969,
0.10659763216972351,
-0.1734493374824524,
-0.03917586803436279,
-0.13000863790512085,
0.666915774345398,
0.3172115385532379,
0.25663045048713684,
0.29560020565986633,
0.21149273216724396,
-0.16000841557979584,
-0.14419589936733246,
0.09120310842990875,
-0.1005421057343483,
-0.3584708571434021,
0.019762925803661346,
0.020741675049066544,
-0.04997626692056656,
0.5030819773674011,
-0.0728687047958374,
-0.0383954793214798,
-0.42557984590530396,
-0.1432492434978485,
0.21627257764339447,
-0.21103687584400177,
-0.09836633503437042,
-0.10264162719249725,
-0.12573525309562683,
-0.11654403060674667,
-0.07960379868745804,
0.07509889453649521,
-0.2857702970504761,
-0.14688155055046082,
-0.06542401760816574,
-0.19708941876888275,
-0.29002219438552856,
-0.03178677335381508,
-0.5300987958908081,
-0.2443516105413437,
0.05621786788105965,
0.04468654841184616,
-0.12069569528102875,
0.22586530447006226,
0.16108697652816772,
-0.06721010059118271,
0.043467018753290176,
0.22164751589298248,
-0.18489676713943481,
-0.37779223918914795,
-0.4081725478172302,
0.05330485850572586,
-0.16009794175624847,
-0.30497607588768005,
-0.33448052406311035,
-0.1153993308544159,
0.22391965985298157,
0.29417914152145386,
-0.5306447744369507,
-0.28530651330947876,
-0.09101395308971405,
-0.0518537200987339,
-0.057024113833904266,
0.03687354549765587,
0.44263872504234314,
-0.1275581568479538,
0.10469187796115875,
-0.04300858825445175,
-0.2410171627998352,
0.23400607705116272,
0.17466238141059875,
0.2054341435432434,
0.08857737481594086,
-0.001246921718120575,
0.19001881778240204,
0.7327920198440552,
0.5567893981933594,
-0.1158146858215332,
0.08399894833564758,
-0.4833182096481323,
0.27221494913101196,
-0.169030100107193,
-0.3567667603492737,
0.08104051649570465,
-0.17111346125602722,
-0.126045823097229,
0.2442740947008133,
-0.14991912245750427,
-0.23042120039463043,
0.08764056861400604,
-0.026990139856934547,
-0.06520804017782211,
-0.20514728128910065,
-0.04417313635349274,
-0.006850406527519226,
0.3016720414161682,
0.04691268131136894,
0.3494262397289276,
0.03140775486826897,
-0.13990139961242676,
-0.06505917012691498,
-0.1050189733505249,
0.12502914667129517,
0.1482953578233719,
-0.3340511918067932,
-0.26122379302978516,
-0.6239334940910339,
0.19755256175994873,
0.3247831463813782,
0.3487253785133362,
-0.02154475450515747,
0.13546884059906006,
0.40269750356674194,
-0.03382036089897156,
0.665630578994751,
0.126882866024971,
0.08389738947153091,
-0.04724061116576195,
-0.4772544503211975,
-0.28117191791534424,
-0.10712556540966034,
-0.1792111098766327,
0.24962706863880157,
0.08757857233285904,
0.2262307107448578,
-0.20621433854103088,
-0.1610502302646637,
0.25104179978370667,
0.13222278654575348,
-0.26739147305488586,
-0.06638089567422867,
-0.23692256212234497,
-0.3589131534099579,
-0.10173480957746506,
0.16215059161186218,
0.0433807447552681,
0.20962323248386383,
-0.06224767118692398,
-0.1087740957736969,
-0.04339958727359772,
0.03647641837596893,
0.09411057829856873,
0.2985594570636749,
0.32391729950904846,
0.12676186859607697,
0.2207353115081787,
0.46632274985313416,
0.14310526847839355,
0.10613556951284409,
0.5308254361152649,
-0.2831275165081024,
-0.15410229563713074,
-0.04283449798822403,
-0.3208977282047272,
0.23728039860725403,
0.3243229389190674,
-0.10623634606599808,
-0.03936959058046341,
-0.0004010852426290512,
-0.08312894403934479,
-0.3956049084663391,
-0.11938892304897308,
0.5411580801010132,
0.15029369294643402,
-0.42101261019706726,
-0.7114791870117188,
0.23982346057891846,
0.1341921091079712,
0.014248199760913849,
0.5268241167068481,
-0.09994781017303467,
-0.12637841701507568,
0.30055636167526245,
-0.12164578586816788,
0.6946184039115906,
0.04652407020330429,
0.11905695497989655,
0.2947651743888855,
-0.2370023876428604,
0.21279843151569366,
0.16055573523044586,
0.3106987476348877,
-0.4196247458457947,
-0.1427667737007141,
-0.07611441612243652,
-0.04097893089056015,
-0.13306400179862976,
0.06289620697498322,
0.09614101052284241,
0.2703305780887604,
0.08936552703380585,
-0.1410595327615738,
-0.18789654970169067,
0.4016363322734833,
0.028550270944833755,
0.029053762555122375,
0.06353101134300232,
0.00493873655796051,
-0.3160055875778198,
0.2937003970146179,
0.10886314511299133,
0.00902040395885706,
0.1961248517036438,
-0.13346678018569946,
-0.22119934856891632,
0.02942277491092682,
-0.2578045129776001,
0.28946685791015625,
-0.1107841283082962,
-0.6848688721656799,
-0.3326708972454071,
0.2763984501361847,
0.2438397854566574,
-0.24962137639522552,
-0.0023914724588394165,
0.0498371347784996,
0.019094478338956833,
0.36672884225845337,
-0.03458122909069061,
-0.18423999845981598,
0.028812769800424576,
0.09802266210317612,
-0.23331663012504578,
-0.4442060589790344,
0.2634389400482178,
-0.42690426111221313,
-0.1828947216272354,
0.11330847442150116,
0.07761679589748383,
-0.22945599257946014,
0.3117341697216034,
0.1340341866016388,
-0.2687169909477234,
-0.2380862683057785,
-0.022547300904989243,
-0.16084024310112,
-0.29089462757110596,
0.22641071677207947,
-0.07423019409179688,
-0.3688862919807434,
-0.04611383005976677,
0.3392794728279114,
0.47200947999954224,
0.28142300248146057,
0.303498238325119,
-0.003581233322620392,
0.09977562725543976,
-0.08625242114067078,
-0.054037924855947495,
0.0815446525812149,
-0.3138003647327423,
0.14796140789985657,
-0.24067938327789307,
0.2419702559709549,
-0.007763425819575787,
0.1505785435438156,
-0.14951449632644653,
0.3145236372947693,
-0.1214418113231659,
-0.11131897568702698,
-0.37887662649154663,
-0.07562495768070221,
0.12822332978248596,
0.32854539155960083,
0.28867092728614807,
0.14892923831939697,
-0.04136456176638603,
0.273026704788208,
-0.20207658410072327,
0.028127074241638184,
0.09545376151800156,
0.17080432176589966,
-0.18472005426883698,
-0.2393166720867157,
0.27345818281173706,
-0.00045689288526773453,
0.0036336109042167664,
0.3190838694572449,
0.10893523693084717,
-0.12294083088636398,
-0.31080785393714905,
0.12471670657396317,
0.039817556738853455,
0.052050746977329254,
-0.17616844177246094,
-0.28976309299468994,
-0.09718935191631317,
-0.24164435267448425,
0.5009248852729797,
0.47749030590057373,
0.2614402770996094,
0.17441557347774506,
0.08850512653589249,
0.031465668231248856,
-0.08526559174060822,
-0.13746562600135803,
-0.15722781419754028,
-0.13272741436958313,
0.20101091265678406,
0.08855407685041428,
0.048682406544685364,
-0.1081833690404892,
-0.09721605479717255,
-0.23680630326271057,
0.4138485789299011,
-0.1219015046954155,
0.09651896357536316,
-0.09046407043933868,
0.011588897556066513,
-0.0775795429944992,
0.5478377342224121,
0.22602570056915283,
-0.12632742524147034,
-0.27239367365837097,
-0.007156167179346085,
0.0011105034500360489,
-0.20987185835838318,
-0.26524755358695984,
0.11274544894695282,
0.06660665571689606,
0.056044112890958786,
0.5249437689781189,
0.26538705825805664,
0.14478710293769836,
-0.014946229755878448,
-0.11411406099796295,
0.3405730426311493,
-0.5289105176925659,
0.23733532428741455,
0.0335594117641449,
0.07813116908073425,
-0.14992491900920868,
0.27801021933555603,
0.15900351107120514,
-0.03191760927438736,
0.3439689874649048,
0.02537870779633522,
0.4914323389530182,
0.1573827713727951,
0.08270822465419769,
0.39609700441360474,
-0.030623266473412514,
-0.24349282681941986,
-0.025412291288375854,
-0.3696403503417969,
0.2644515037536621,
-0.002873651683330536,
0.22544294595718384,
-0.3410261571407318,
-0.2874771058559418,
-0.10861042141914368,
-0.009805630892515182,
-0.3298105001449585,
0.11531421542167664,
-0.04574764519929886,
0.00677306205034256,
-0.04530300199985504,
0.15868131816387177,
0.052684251219034195,
-0.34832626581192017,
0.20041055977344513,
0.11870136857032776,
-0.45864832401275635,
-0.3032262325286865,
-0.2525910437107086,
0.2155674397945404,
0.11225910484790802,
-0.07390785217285156,
0.1819210946559906,
0.08584120124578476,
-0.06690774857997894,
0.04395950585603714,
0.5641317367553711,
0.25805526971817017,
0.04648129642009735,
-0.19608712196350098,
0.16483891010284424,
0.13582812249660492,
0.05928073078393936,
0.07654281705617905,
0.1865483522415161,
-0.03319956362247467,
-0.13030081987380981,
0.15728504955768585,
-0.02633504942059517,
0.02268098294734955,
-0.04337478056550026,
0.4233413338661194,
-0.010144798085093498,
-0.14329195022583008,
0.7041874527931213,
-0.2032584697008133,
0.043955788016319275,
-0.08934686332941055,
0.06393606960773468,
-0.42125028371810913,
-0.2197510004043579,
0.3059011995792389,
0.005419573746621609,
0.21938467025756836,
-0.06020231544971466,
0.018824327737092972,
-0.20588791370391846,
0.3759964108467102,
0.13539369404315948,
0.011407297104597092,
-0.3402739465236664,
0.058464258909225464,
-0.5472113490104675,
0.14095935225486755,
-0.14838306605815887,
0.07046576589345932,
-0.00238634180277586,
0.2534915506839752,
-0.2684006989002228,
-0.009723886847496033,
-0.02867157757282257,
-0.10213486850261688,
0.21183378994464874,
0.377647340297699,
-0.26226869225502014,
-0.07507038116455078,
-0.3222041130065918,
-0.046026356518268585,
0.014465879648923874,
-0.24020683765411377,
0.36822304129600525,
-0.07527796924114227,
-0.12996605038642883,
0.16809208691120148,
-0.08785475790500641,
0.15782088041305542,
-0.05750436335802078,
-0.09735707938671112,
0.22728359699249268,
0.4583134353160858,
0.11539798229932785,
0.10894852131605148,
-0.06001748517155647,
0.02636917307972908,
-0.4286615252494812,
0.40828296542167664,
0.19567079842090607,
0.2108624279499054,
-0.011884311214089394,
-0.27378711104393005,
-0.28449249267578125,
0.36540117859840393,
0.1858336329460144,
-0.16239430010318756,
-0.16696101427078247,
0.19408538937568665,
-0.11370009183883667,
0.2821443974971771,
0.16090133786201477,
0.6654710173606873,
0.06393303722143173,
0.12730440497398376,
-0.1639249622821808,
-0.21444754302501678,
0.5090369582176208,
-0.7387733459472656,
-0.24112772941589355,
-0.27869823575019836,
0.2296026349067688,
0.35895633697509766,
-0.01331169344484806,
-0.3929630219936371,
-0.07989265024662018,
0.2813650369644165,
-0.4445851743221283,
0.14865712821483612,
0.21945112943649292,
-0.10698112845420837,
0.08001887798309326,
-0.019268613308668137,
0.33926334977149963,
0.23554351925849915,
-0.4814664423465729,
0.44135934114456177,
-0.40118861198425293
] |
https://github.com/huggingface/datasets/issues/5360 | IterableDataset returns duplicated data using PyTorch DDP | There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ? | As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()` | 111 | IterableDataset returns duplicated data using PyTorch DDP
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ? | [
-0.4017648994922638,
-0.4471844434738159,
-0.009538866579532623,
0.4609394073486328,
-0.013252373784780502,
-0.15441933274269104,
0.36216679215431213,
0.26854002475738525,
-0.14060305058956146,
0.13369432091712952,
-0.12570005655288696,
0.5460296869277954,
-0.010062207467854023,
0.09737544506788254,
0.2010989785194397,
-0.12740735709667206,
-0.08783111721277237,
0.10398364812135696,
-0.3483526408672333,
-0.11048749089241028,
-0.06095472723245621,
0.2808663845062256,
-0.008465565741062164,
-0.2740402817726135,
-0.49736928939819336,
-0.1329195499420166,
-0.24455882608890533,
0.11329450458288193,
0.1863190084695816,
-0.2904975414276123,
0.2058887928724289,
0.23358707129955292,
0.021343663334846497,
0.4172443151473999,
-0.00011279353930149227,
0.10989174246788025,
-0.08079038560390472,
-0.12355773895978928,
-0.1053658276796341,
0.0422310009598732,
0.04885084182024002,
0.043521955609321594,
-0.14412853121757507,
-0.19627666473388672,
-0.3667502999305725,
-0.5492908954620361,
-0.09566463530063629,
-0.21552622318267822,
0.36566394567489624,
0.04801872745156288,
0.16586154699325562,
0.2764844000339508,
-0.19439461827278137,
-0.056001029908657074,
-0.05455898493528366,
0.27917003631591797,
-0.0745227113366127,
0.2190999686717987,
0.30620574951171875,
0.18048366904258728,
-0.201533704996109,
0.41676658391952515,
0.02164505235850811,
0.452701598405838,
-0.021283917129039764,
-0.058821722865104675,
-0.20427799224853516,
-0.2037605345249176,
0.13604924082756042,
0.2516067624092102,
0.14938472211360931,
-0.32066279649734497,
-0.1283894181251526,
-0.48735737800598145,
0.01640041545033455,
-0.16269782185554504,
-0.08829248696565628,
0.2679196000099182,
-0.13301719725131989,
-0.16594867408275604,
-0.3182068467140198,
0.1750466376543045,
-0.15230536460876465,
-0.26555025577545166,
0.16319623589515686,
0.41634902358055115,
-0.014911900274455547,
0.30246931314468384,
0.15639805793762207,
0.33721375465393066,
0.23893088102340698,
0.06695137917995453,
-0.032613787800073624,
-0.311020165681839,
-0.3614771068096161,
-0.16619345545768738,
0.0008548051118850708,
-0.16635549068450928,
0.3881761133670807,
0.21193437278270721,
0.1671207994222641,
0.14552657306194305,
0.4477326571941376,
-0.07961384207010269,
0.33967217803001404,
-0.08861435949802399,
0.008401475846767426,
0.21000683307647705,
0.014088999480009079,
-0.14999999105930328,
-0.11450599133968353,
0.02602425403892994,
0.1676115244626999,
-0.1358216106891632,
0.0038669146597385406,
-0.010590113699436188,
0.40364378690719604,
-0.118446484208107,
-0.24848929047584534,
-0.3548804521560669,
-0.14586719870567322,
-0.07324962317943573,
-0.04480598866939545,
0.243910014629364,
0.0036667478270828724,
-0.05907449871301651,
-0.3030778765678406,
0.1411878913640976,
-0.2352897822856903,
-0.22031685709953308,
-0.24449847638607025,
-0.10336540639400482,
-0.08109836280345917,
0.3226536214351654,
0.2503525912761688,
-0.2507413625717163,
0.4703271687030792,
0.2562636137008667,
0.2061544805765152,
-0.28279879689216614,
0.2743978798389435,
-0.03753582388162613,
0.2856180667877197,
0.07998265326023102,
0.21079255640506744,
-0.046925898641347885,
-0.0030646324157714844,
0.22894613444805145,
-0.2090846747159958,
0.14508765935897827,
-0.11074025183916092,
-0.4627093970775604,
-0.0009488221257925034,
0.152578666806221,
0.03678888455033302,
0.05596102774143219,
-0.11413732916116714,
0.23741672933101654,
0.3183216452598572,
-0.06648874282836914,
-0.03249221295118332,
-0.12971216440200806,
-0.4436720311641693,
-0.18086275458335876,
0.21156369149684906,
0.3324241638183594,
0.013462342321872711,
-0.15281164646148682,
0.27230995893478394,
0.028147760778665543,
0.14647811651229858,
0.4881839454174042,
-0.16433334350585938,
0.14137551188468933,
-0.4611113369464874,
-0.035253025591373444,
-0.0826401636004448,
-0.028015173971652985,
-0.3213212490081787,
0.27275753021240234,
-0.0011867210268974304,
0.14713849127292633,
0.2551097273826599,
0.11789005994796753,
0.3768421411514282,
0.04901651665568352,
-0.07655392587184906,
0.11101140826940536,
-0.3066743314266205,
-0.011549532413482666,
-0.2465151697397232,
0.14398698508739471,
0.28196004033088684,
0.10490673780441284,
0.015418052673339844,
0.17090407013893127,
-0.1129823550581932,
-0.08379799127578735,
0.4906454384326935,
-0.1648274064064026,
0.004155279137194157,
0.021788211539387703,
0.15800032019615173,
-0.26899319887161255,
0.26788920164108276,
-0.22370409965515137,
-0.23483258485794067,
0.26851585507392883,
-0.2792116403579712,
-0.05475524067878723,
-0.012530714273452759,
-0.4785429835319519,
-0.1048448458313942,
-0.07656098902225494,
-0.25737595558166504,
-0.35449591279029846,
0.05619587004184723,
0.17887401580810547,
0.3961448073387146,
-0.39908722043037415,
-0.16718466579914093,
0.2818554937839508,
-0.6005212664604187,
-0.16986416280269623,
-0.29874560236930847,
0.17104066908359528,
0.02635512501001358,
-0.12664684653282166,
0.22584903240203857,
0.3310054838657379,
0.18281696736812592,
-0.4185977876186371,
0.10114405304193497,
0.1689039170742035,
0.06769675016403198,
0.02214435487985611,
-0.028752125799655914,
0.12144532799720764,
0.4297448396682739,
-0.0734633207321167,
-0.08139202743768692,
0.1519325226545334,
-0.13466887176036835,
-0.1384599208831787,
-0.10054349154233932,
0.516506016254425,
-0.05520395562052727,
0.234122633934021,
-0.010117553174495697,
0.0030776578933000565,
0.0953528881072998,
-0.014387357980012894,
-0.011825893074274063,
-0.06358165293931961,
0.03604796901345253,
-0.3024124503135681,
0.36761966347694397,
0.16093215346336365,
-0.5155284404754639,
0.31997543573379517,
0.2676152288913727,
0.02739393711090088,
0.07386231422424316,
-0.08352037519216537,
0.03228195011615753,
-0.11845420300960541,
0.346246600151062,
0.20136187970638275,
0.30597251653671265,
0.21385550498962402,
0.22074206173419952,
0.0532500185072422,
-0.0801655724644661,
-0.0455031655728817,
-0.039386965334415436,
-0.02855868637561798,
0.22839012742042542,
0.31084081530570984,
-0.023850807920098305,
-0.2054414451122284,
-0.46011078357696533,
0.08146461844444275,
0.150559201836586,
0.07125089317560196,
-0.06255694478750229,
0.18905097246170044,
-0.2422468513250351,
-0.22447291016578674,
-0.43430331349372864,
0.3088054358959198,
-0.27191683650016785,
-0.03200449049472809,
0.0992521420121193,
0.5391977429389954,
0.04209623858332634,
0.40698927640914917,
0.41178637742996216,
0.3487589359283447,
-0.10408639162778854,
0.06661541014909744,
-0.10227090120315552,
-0.05690612643957138,
-0.09612687677145004,
0.09560103714466095,
0.10885298997163773,
-0.09657812863588333,
0.6192424297332764,
-0.10305604338645935,
-0.04955481365323067,
-0.5598989725112915,
-0.16448384523391724,
0.22520741820335388,
-0.2002125084400177,
-0.07463891804218292,
-0.020619846880435944,
-0.18242065608501434,
0.040916696190834045,
-0.02458256110548973,
0.07340285181999207,
-0.3437272608280182,
-0.05026358366012573,
-0.061091773211956024,
-0.2841723561286926,
-0.17016012966632843,
-0.049204420298337936,
-0.5014329552650452,
-0.09255385398864746,
-0.1447218507528305,
0.19497328996658325,
-0.036642707884311676,
0.37986940145492554,
0.03233220428228378,
0.035491541028022766,
-0.04440517723560333,
0.11851175874471664,
-0.05967317521572113,
-0.2299855798482895,
-0.32721924781799316,
0.05807890370488167,
-0.41716834902763367,
-0.4147810637950897,
-0.26449713110923767,
-0.04024612158536911,
0.3277391493320465,
0.4089115858078003,
-0.38160741329193115,
-0.5251926183700562,
-0.018898801878094673,
-0.216884046792984,
-0.04494968056678772,
-0.0483989417552948,
0.4086974263191223,
-0.1316760927438736,
-0.036791879683732986,
-0.038968488574028015,
-0.1523521989583969,
0.33588331937789917,
0.13462400436401367,
0.17969369888305664,
0.1145477369427681,
0.21074992418289185,
0.26593342423439026,
0.7945094704627991,
0.683654248714447,
-0.0433415062725544,
0.14420375227928162,
-0.33750542998313904,
0.21979816257953644,
-0.16462963819503784,
-0.16459587216377258,
0.16413280367851257,
-0.1817185878753662,
-0.05180150270462036,
0.21577662229537964,
-0.0621274933218956,
-0.11019954830408096,
0.1976141333580017,
0.10535423457622528,
0.0023384466767311096,
-0.27230241894721985,
0.11124417185783386,
-0.019602015614509583,
0.39584532380104065,
0.08251309394836426,
0.2871035635471344,
0.014736853539943695,
0.0515151172876358,
0.017001017928123474,
-0.1424013376235962,
0.42353105545043945,
0.04152395948767662,
-0.27512386441230774,
-0.01743006333708763,
-0.5060791373252869,
0.23331046104431152,
0.07640398293733597,
0.2763665020465851,
-0.15492458641529083,
0.017327364534139633,
0.33348092436790466,
-0.06071186438202858,
0.6736999750137329,
0.014154925011098385,
-0.11803928017616272,
-0.05488185957074165,
-0.5241423845291138,
-0.25134801864624023,
0.032996099442243576,
-0.0732891634106636,
0.574788510799408,
0.045713044703006744,
0.17522872984409332,
-0.2664644718170166,
-0.22417448461055756,
0.21826618909835815,
0.17004990577697754,
-0.2517380118370056,
-0.00011851266026496887,
-0.2383221834897995,
-0.444790244102478,
-0.28018027544021606,
0.29604560136795044,
0.1968812644481659,
0.18120893836021423,
-0.050239525735378265,
-0.1687224805355072,
-0.2464076727628708,
-0.08411918580532074,
0.10153685510158539,
0.2881676256656647,
0.34494367241859436,
-0.0890251100063324,
0.3361593186855316,
0.3048989474773407,
0.16034555435180664,
0.13649624586105347,
0.5504667162895203,
-0.08313076198101044,
-0.11049105226993561,
0.12963370978832245,
-0.19129173457622528,
0.2207072675228119,
0.4080978035926819,
-0.10075259953737259,
-0.1691063642501831,
-0.21273048222064972,
0.08001551032066345,
-0.4868675470352173,
-0.19160935282707214,
0.24500672519207,
0.0133448401466012,
-0.3930104076862335,
-0.4910362958908081,
0.28617703914642334,
0.08449012041091919,
-0.04592892527580261,
0.6183525919914246,
0.134316086769104,
-0.086637943983078,
0.4172843098640442,
0.15674376487731934,
0.7350829243659973,
-0.11250203847885132,
-0.019531723111867905,
0.14535671472549438,
-0.08864376693964005,
0.24770291149616241,
-0.10521876811981201,
0.4048697352409363,
-0.43355846405029297,
-0.27564767003059387,
0.05627661198377609,
-0.07969968020915985,
0.02171463891863823,
0.31618285179138184,
0.08732420206069946,
0.21318799257278442,
0.1430990993976593,
-0.13137182593345642,
-0.22276313602924347,
0.5174346566200256,
-0.07284362614154816,
-0.18031634390354156,
0.04272489994764328,
0.12159332633018494,
-0.28643667697906494,
0.2723059356212616,
-0.04504282400012016,
-0.05501244217157364,
0.35563620924949646,
-0.07181233167648315,
-0.2523069977760315,
0.0002496466040611267,
-0.08067940175533295,
0.3233412504196167,
0.022665172815322876,
-0.7364503145217896,
-0.0996466726064682,
0.20524588227272034,
0.22802437841892242,
-0.2169843465089798,
0.019148588180541992,
0.12829820811748505,
-0.10704339295625687,
-0.006151808891445398,
-0.16282953321933746,
-0.12630456686019897,
-0.014707809314131737,
-0.06733651459217072,
-0.1119203045964241,
-0.3744121789932251,
0.35121580958366394,
-0.5366030931472778,
-0.14653801918029785,
0.11920899152755737,
-0.030761398375034332,
-0.09345285594463348,
0.2855699360370636,
0.10482089221477509,
-0.20228399336338043,
-0.3541383743286133,
0.07681719213724136,
-0.01257835328578949,
-0.33955588936805725,
0.2865580916404724,
0.01118115708231926,
-0.2986394166946411,
-0.09631627798080444,
0.11452329903841019,
0.33526143431663513,
0.1567043662071228,
0.09768867492675781,
0.11063142120838165,
0.046292535960674286,
-0.2084161937236786,
-0.16722992062568665,
0.11282537132501602,
-0.4840853214263916,
0.20655927062034607,
-0.3638010323047638,
0.13451795279979706,
-0.0711870789527893,
0.09893189370632172,
-0.021497465670108795,
0.28101634979248047,
-0.12839792668819427,
-0.11763156950473785,
-0.21829596161842346,
-0.036987148225307465,
0.1303337663412094,
0.42679837346076965,
0.14680135250091553,
-0.04679619148373604,
-0.061531417071819305,
0.46560314297676086,
-0.3212393522262573,
-0.11916769295930862,
-0.012359023094177246,
0.24667330086231232,
-0.028381094336509705,
-0.15301784873008728,
0.08768108487129211,
0.05626927688717842,
0.001956287771463394,
0.38195812702178955,
0.033602070063352585,
-0.21767014265060425,
-0.135219544172287,
0.08399470150470734,
0.01139709074050188,
0.06913654506206512,
-0.1764403134584427,
-0.05936001241207123,
-0.16689205169677734,
-0.27018871903419495,
0.5094728469848633,
0.13489878177642822,
0.13250091671943665,
0.05523126944899559,
0.3166762590408325,
-0.121796153485775,
-0.0990409106016159,
-0.013872954994440079,
-0.019358351826667786,
-0.05281922221183777,
0.1321120709180832,
0.1393420398235321,
0.043308716267347336,
-0.1181250512599945,
0.16231748461723328,
-0.005145341157913208,
0.4218701720237732,
-0.14147788286209106,
0.014732293784618378,
0.01409817859530449,
0.016564011573791504,
0.008055876940488815,
0.6369079351425171,
0.1887798011302948,
-0.04556669667363167,
-0.026021812111139297,
-0.008892806246876717,
0.17143547534942627,
-0.2498696744441986,
-0.23557481169700623,
0.11655892431735992,
0.17348343133926392,
0.17674881219863892,
0.5824245810508728,
0.5355024337768555,
0.2237243950366974,
0.2216532826423645,
-0.02063671126961708,
0.264423668384552,
-0.6515341401100159,
0.20170095562934875,
-0.1613699197769165,
-0.05363760516047478,
-0.08875611424446106,
0.3038974702358246,
0.11179940402507782,
0.24527549743652344,
0.3403364419937134,
-0.13629305362701416,
0.7768131494522095,
0.1401728093624115,
-0.010697174817323685,
0.446505069732666,
-0.08188635855913162,
-0.0644824355840683,
-0.1771329939365387,
-0.0607425719499588,
0.10517562925815582,
-0.008003681898117065,
0.1635231077671051,
-0.40839847922325134,
-0.4421388804912567,
-0.19083864986896515,
0.06319662928581238,
-0.2965381145477295,
-0.011412636376917362,
0.0030964910984039307,
-0.005294419825077057,
-0.12024161964654922,
0.10411247611045837,
0.10976961255073547,
-0.34642869234085083,
0.3085864186286926,
-0.025057323276996613,
-0.2662160396575928,
-0.19460082054138184,
-0.0527331680059433,
0.12535721063613892,
0.21280992031097412,
-0.1315719187259674,
0.10910573601722717,
0.15740302205085754,
-0.0010762512683868408,
-0.07593545317649841,
0.3968510031700134,
0.3210650384426117,
-0.057591237127780914,
-0.3047412037849426,
0.3125004172325134,
0.02317124791443348,
0.12631258368492126,
-0.1644391268491745,
0.13938340544700623,
-0.1963840126991272,
-0.10363125801086426,
0.27432775497436523,
0.06418495625257492,
-0.049503449350595474,
-0.25816795229911804,
0.2891269326210022,
-0.04286074638366699,
-0.16630327701568604,
0.5855550765991211,
-0.2560786306858063,
-0.12757986783981323,
-0.020757857710123062,
0.037077173590660095,
-0.2579934298992157,
-0.26802101731300354,
0.42259255051612854,
-0.16849569976329803,
0.05411824584007263,
-0.041971005499362946,
0.08004706352949142,
-0.26909592747688293,
0.40331214666366577,
-0.15615420043468475,
0.14880186319351196,
-0.34532779455184937,
-0.14285236597061157,
-0.44164150953292847,
0.15803733468055725,
-0.24631452560424805,
0.051025062799453735,
0.05814807862043381,
0.452244371175766,
-0.08730902522802353,
0.11645229905843735,
-0.16650860011577606,
-0.07377468049526215,
0.1989404261112213,
0.3589242696762085,
-0.28479328751564026,
-0.03886910155415535,
-0.45608681440353394,
-0.035577110946178436,
0.2081119567155838,
-0.2552807033061981,
0.2831224501132965,
-0.02566942200064659,
-0.04404517263174057,
0.01682572439312935,
-0.03172258660197258,
0.28494811058044434,
-0.21361416578292847,
-0.014962509274482727,
0.17758500576019287,
0.3151988983154297,
0.010601554065942764,
0.004398919641971588,
-0.22776636481285095,
-0.1990547776222229,
-0.4733898341655731,
0.4720607399940491,
0.18203863501548767,
0.11892449855804443,
0.02736225165426731,
-0.39598724246025085,
-0.386140376329422,
0.5372756719589233,
0.21547843515872955,
-0.0013676759554073215,
0.000645861029624939,
0.3058305084705353,
-0.23966196179389954,
0.31152498722076416,
0.2598342001438141,
0.49557724595069885,
0.07636445760726929,
-0.03229586407542229,
-0.18306294083595276,
-0.4011509418487549,
0.4483071267604828,
-0.4467073678970337,
-0.2452038824558258,
-0.16746756434440613,
0.36094486713409424,
0.23509502410888672,
-0.18012045323848724,
-0.45380717515945435,
-0.19095657765865326,
0.20006147027015686,
-0.44723212718963623,
0.20944659411907196,
0.1907266527414322,
0.049889806658029556,
-0.18507231771945953,
-0.10621318221092224,
0.26263177394866943,
0.09559310227632523,
-0.5158378481864929,
0.3037494421005249,
-0.38957786560058594
] |
https://github.com/huggingface/datasets/issues/5354 | Consider using "Sequence" instead of "List" | Hi! Linking a comment to provide more info on the issue: https://stackoverflow.com/a/39458225. This means we should replace all (most of) the occurrences of `List` with `Sequence` in function signatures.
@tranhd95 Would you be interested in submitting a PR? | ### Feature request
Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below.
**How to reproduce**
```py
list_of_filenames = ["foo.parquet", "bar.parquet"]
ds = Dataset.from_parquet(list_of_filenames)
```
**Expected mypy output:**
```
Success: no issues found
```
**Actual mypy output:**
```py
test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type]
test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
test.py:19: note: Consider using "Sequence" instead, which is covariant
```
**Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1 | 38 | Consider using "Sequence" instead of "List"
### Feature request
Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below.
**How to reproduce**
```py
list_of_filenames = ["foo.parquet", "bar.parquet"]
ds = Dataset.from_parquet(list_of_filenames)
```
**Expected mypy output:**
```
Success: no issues found
```
**Actual mypy output:**
```py
test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type]
test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
test.py:19: note: Consider using "Sequence" instead, which is covariant
```
**Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1
Hi! Linking a comment to provide more info on the issue: https://stackoverflow.com/a/39458225. This means we should replace all (most of) the occurrences of `List` with `Sequence` in function signatures.
@tranhd95 Would you be interested in submitting a PR? | [
-0.23202967643737793,
-0.00011301040649414062,
-0.011046944186091423,
0.12061987817287445,
0.2614006996154785,
-0.052483730018138885,
0.13928277790546417,
0.15850599110126495,
0.06648603081703186,
0.027699925005435944,
0.23363997042179108,
0.6865089535713196,
-0.24881647527217865,
0.21528398990631104,
-0.08080287277698517,
-0.14273269474506378,
0.06818994134664536,
-0.08071303367614746,
0.10777819156646729,
-0.03757740557193756,
-0.22490566968917847,
0.08787764608860016,
-0.19492360949516296,
0.01197899878025055,
0.2061772346496582,
-0.2452511489391327,
-0.03841431438922882,
0.08540867269039154,
-0.019183123484253883,
-0.4359603822231293,
0.06967680156230927,
0.09437792748212814,
-0.06929579377174377,
0.22890713810920715,
-0.00010700672282837331,
-0.09596733003854752,
0.5224927663803101,
-0.017886962741613388,
-0.17377379536628723,
-0.2139446884393692,
-0.07680390030145645,
-0.17716480791568756,
0.3604115843772888,
-0.137956440448761,
-0.08424469828605652,
-0.36915966868400574,
-0.21446438133716583,
-0.5233720541000366,
0.2320156991481781,
0.31606489419937134,
0.20040461421012878,
0.31453782320022583,
0.23028935492038727,
-0.2318524569272995,
0.32229605317115784,
0.2457292675971985,
-0.10172934830188751,
-0.06850653886795044,
0.5256820917129517,
-0.051280491054058075,
0.1647021621465683,
0.1138685941696167,
-0.06577815115451813,
-0.14647607505321503,
0.2234800159931183,
0.11783605068922043,
0.07401120662689209,
-0.08586011826992035,
-0.23400849103927612,
0.16171900928020477,
0.22372660040855408,
-0.2837323546409607,
-0.33070874214172363,
-0.2870803475379944,
-0.12126019597053528,
-0.207065612077713,
0.16694532334804535,
0.09174604713916779,
-0.07538600265979767,
0.025073150172829628,
0.21576997637748718,
0.21260225772857666,
-0.07640618085861206,
0.24613380432128906,
0.07761606574058533,
-0.08014294505119324,
-0.16435398161411285,
0.21622833609580994,
0.22473709285259247,
-0.4460732936859131,
-0.26701197028160095,
-0.24189519882202148,
0.016595814377069473,
0.10094121843576431,
-0.2777039408683777,
-0.1855308562517166,
0.011540114879608154,
0.09589153528213501,
0.30356302857398987,
0.2319549322128296,
-0.2006126046180725,
0.12889297306537628,
-0.09937939047813416,
0.10391485691070557,
0.5295342206954956,
-0.013874566182494164,
-0.09000978618860245,
0.17230696976184845,
-0.20438523590564728,
0.16751441359519958,
0.06019996479153633,
-0.07971546798944473,
0.2988501787185669,
-0.11788250505924225,
0.030990030616521835,
-0.008327120915055275,
0.32775551080703735,
-0.23813019692897797,
-0.2429037243127823,
0.17486801743507385,
-0.07899254560470581,
-0.10482874512672424,
0.19548434019088745,
0.5240350961685181,
0.016106195747852325,
0.15563932061195374,
-0.06198587268590927,
0.2773998975753784,
0.09211606532335281,
-0.16553327441215515,
-0.2871114909648895,
0.15085984766483307,
-0.1252550482749939,
-0.12318279594182968,
0.006622828543186188,
-0.05340878292918205,
0.046381548047065735,
0.3165265619754791,
0.5536227822303772,
0.0937555581331253,
0.019832829013466835,
-0.2808901369571686,
0.3205678164958954,
-0.17390459775924683,
-0.29835301637649536,
0.050790831446647644,
0.43433719873428345,
-0.026677776128053665,
-0.29928430914878845,
-0.219294011592865,
-0.36731916666030884,
-0.176859512925148,
-0.20988093316555023,
0.16803839802742004,
-0.007294226437807083,
-0.0380132719874382,
-0.5944050550460815,
-0.035291437059640884,
0.11770432442426682,
0.10462817549705505,
-0.16484028100967407,
-0.18725384771823883,
0.08319692313671112,
-0.294211745262146,
-0.020652540028095245,
0.19892047345638275,
0.030622366815805435,
-0.04196786880493164,
-0.1442069709300995,
0.024646157398819923,
0.37800928950309753,
0.3378133475780487,
-0.241254523396492,
-0.19152113795280457,
-0.26640865206718445,
0.1638805866241455,
0.5002208948135376,
-0.12753833830356598,
0.13699312508106232,
0.32225462794303894,
0.1234196275472641,
0.18365444242954254,
0.06340713053941727,
-0.24112538993358612,
0.4065227210521698,
-0.3952619433403015,
0.07221713662147522,
-0.04619115591049194,
0.025826340541243553,
0.16206064820289612,
-0.2924339175224304,
-0.35377609729766846,
0.16591876745224,
-0.09664912521839142,
-0.3778371810913086,
-0.02703551948070526,
0.0374116376042366,
-0.2889762818813324,
0.2332909107208252,
-0.3248445391654968,
-0.10515814274549484,
0.21432127058506012,
0.25980985164642334,
0.2865515351295471,
-0.10487405955791473,
-0.22662290930747986,
-0.4985651969909668,
0.01618460938334465,
0.013192936778068542,
0.004452332854270935,
-0.3212246298789978,
-0.2249128669500351,
-0.12950552999973297,
0.1772453486919403,
-0.08888742327690125,
0.12344084680080414,
0.2380969524383545,
0.2942037880420685,
-0.12151819467544556,
-0.004217103123664856,
-0.17774030566215515,
0.095909483730793,
-0.3705845773220062,
-0.10963450372219086,
-0.18691234290599823,
0.35015571117401123,
0.08004700392484665,
-0.2365495264530182,
0.09213131666183472,
0.22366172075271606,
0.22071564197540283,
0.012589799240231514,
0.16588428616523743,
0.2135096788406372,
0.4568914473056793,
-0.05413593351840973,
-0.215610533952713,
0.22727163136005402,
0.01233422290533781,
-0.14821934700012207,
-0.1677832305431366,
0.09682230651378632,
0.06712589412927628,
0.10899802297353745,
-0.2674404978752136,
0.4569156765937805,
0.003290437161922455,
0.2689244747161865,
-0.07119793444871902,
-0.006511780433356762,
0.2365017533302307,
0.2863362729549408,
-0.3341050446033478,
-0.22291049361228943,
-0.014277148991823196,
0.2738851308822632,
0.03964609280228615,
-0.005360504612326622,
-0.6815007925033569,
-0.010723963379859924,
0.478695809841156,
0.11973735690116882,
0.22503963112831116,
0.1974416971206665,
0.21202689409255981,
-0.033536870032548904,
-0.04990920424461365,
0.0421694852411747,
0.22904975712299347,
0.2902868688106537,
-0.16578182578086853,
-0.2248290777206421,
-0.24132975935935974,
0.08041989803314209,
0.22343039512634277,
0.2418329119682312,
0.0274819303303957,
-0.19393599033355713,
0.2914084792137146,
-0.06448139250278473,
-0.1270984709262848,
-0.14987139403820038,
-0.26900994777679443,
0.090423583984375,
-0.41811105608940125,
0.19221970438957214,
-0.4476639926433563,
-0.0012919753789901733,
-0.22239384055137634,
0.028736919164657593,
-0.14981332421302795,
-0.41461795568466187,
-0.24206767976284027,
0.0924566239118576,
-0.1857919842004776,
0.30054664611816406,
0.10740336775779724,
0.1592033952474594,
0.13048027455806732,
-0.34489691257476807,
-0.029828067868947983,
-0.15279428660869598,
-0.1330084502696991,
0.1529790461063385,
0.23742692172527313,
-0.015134366229176521,
0.3120101988315582,
0.11063786596059799,
-0.12935219705104828,
-0.47018131613731384,
-0.23608887195587158,
0.17984949052333832,
-0.25599056482315063,
0.07296893000602722,
0.5362650156021118,
0.21132618188858032,
0.006644822657108307,
-0.47631585597991943,
0.22711865603923798,
-0.0004955064505338669,
-0.1812758892774582,
0.1182066798210144,
0.06796318292617798,
0.00823179166764021,
-0.11356742680072784,
-0.1699974536895752,
-0.06575744599103928,
-0.3643592298030853,
0.4171794652938843,
0.3367013931274414,
0.084266297519207,
-0.10683225095272064,
0.011074925772845745,
0.04247424006462097,
-0.3699530065059662,
0.4199836850166321,
-0.2856515944004059,
-0.06658323854207993,
0.1912716031074524,
0.10413795709609985,
-0.24912531673908234,
-0.013054873794317245,
-0.17261460423469543,
-0.011462058871984482,
0.0921683982014656,
-0.059852272272109985,
-0.49202021956443787,
0.005773384124040604,
0.02785443887114525,
0.005391974002122879,
0.13375549018383026,
0.20613577961921692,
0.06851212680339813,
-0.12750107049942017,
-0.16788482666015625,
-0.07122775167226791,
0.16819064319133759,
0.0871904194355011,
0.2471407651901245,
0.31416043639183044,
0.3137957751750946,
-0.02183728665113449,
0.32141736149787903,
0.40881460905075073,
-0.3970085382461548,
0.3154434263706207,
-0.18755967915058136,
0.13518226146697998,
-0.3686164915561676,
-0.2997654974460602,
-0.07616814970970154,
-0.11991497874259949,
0.05835843086242676,
0.06053880974650383,
-0.2915303409099579,
-0.17888659238815308,
0.11979441344738007,
0.3636949956417084,
-0.06749797612428665,
-0.352775901556015,
0.08077611029148102,
0.21856331825256348,
0.18302661180496216,
-0.09467177093029022,
-0.03332309424877167,
-0.25872883200645447,
-0.03672444075345993,
0.20093689858913422,
0.23492860794067383,
0.051906123757362366,
-0.26276764273643494,
-0.3753790855407715,
0.1131458505988121,
-0.20901677012443542,
0.40724605321884155,
0.1864742934703827,
0.2059813290834427,
0.036989692598581314,
-0.4265381097793579,
-0.23600448668003082,
0.052319008857011795,
0.5415259599685669,
-0.31024619936943054,
-0.1959976851940155,
0.24154579639434814,
-0.03925534710288048,
-0.21043215692043304,
0.07530413568019867,
-0.38565388321876526,
-0.041806723922491074,
-0.08871994912624359,
0.43998220562934875,
-0.7102998495101929,
-0.2600889205932617,
0.017761003226041794,
0.1243828684091568,
0.15841402113437653,
0.22078102827072144,
-0.2842859625816345,
0.01194799691438675,
-0.4045889377593994,
0.1373991221189499,
0.27902036905288696,
0.28033876419067383,
0.007359623443335295,
0.16816341876983643,
-0.2623112201690674,
-0.10109364986419678,
0.007842369377613068,
0.03740624710917473,
0.7784503698348999,
-0.07923854887485504,
0.013320274651050568,
-0.2448301613330841,
0.5213333368301392,
0.44263696670532227,
0.2616947889328003,
-0.205916628241539,
-0.6962100863456726,
0.06713569164276123,
-0.35291343927383423,
0.14645113050937653,
0.09475298225879669,
-0.2386821061372757,
0.238969624042511,
-0.17794989049434662,
0.1110064908862114,
-0.2966846823692322,
0.03812667727470398,
0.4289299547672272,
-0.21566887199878693,
-0.15317313373088837,
-0.5802802443504333,
0.32069334387779236,
0.24205021560192108,
-0.14572693407535553,
0.3734133541584015,
0.21435905992984772,
-0.2134089171886444,
0.5147705078125,
0.3650476932525635,
0.827659547328949,
0.14346066117286682,
-0.008988391607999802,
0.42085906863212585,
0.029248617589473724,
0.3777559995651245,
0.17279160022735596,
-0.018627747893333435,
-0.25100448727607727,
-0.1887231320142746,
-0.027911607176065445,
-0.2861829698085785,
0.16553840041160583,
0.21091175079345703,
-0.5052657127380371,
0.16571038961410522,
-0.0301508866250515,
0.11343221366405487,
-0.20079036056995392,
0.2717469036579132,
-0.004821931943297386,
-0.22152483463287354,
-0.5722160935401917,
0.15175758302211761,
0.09267596900463104,
-0.33345121145248413,
-0.003053106367588043,
-0.24038369953632355,
0.03245187923312187,
-0.39475589990615845,
-0.34373897314071655,
-0.1114501804113388,
-0.209774449467659,
0.0026541817933321,
0.24080322682857513,
-0.04353925213217735,
0.4412354528903961,
0.14400503039360046,
0.2032301276922226,
0.11159062385559082,
-0.10471369326114655,
-0.1757604032754898,
0.0646340548992157,
0.2449779510498047,
-0.20253218710422516,
-0.24058261513710022,
0.09998992830514908,
0.12361501902341843,
0.049781717360019684,
0.03662201017141342,
-0.10678431391716003,
-0.3739451766014099,
-0.1103515699505806,
0.15819522738456726,
0.21460290253162384,
-0.3992505371570587,
-0.2456856369972229,
0.05038264021277428,
-0.1954679936170578,
-0.05494950711727142,
0.1428365707397461,
0.2221549153327942,
-0.08014706522226334,
0.24991053342819214,
0.08371847867965698,
-0.06051342189311981,
-0.11740341782569885,
0.10268926620483398,
-0.08216947317123413,
0.022167064249515533,
0.34020674228668213,
0.25035417079925537,
-0.32675832509994507,
-0.3413330316543579,
-0.06509291380643845,
0.20629319548606873,
-0.37167835235595703,
0.27737778425216675,
-0.039400599896907806,
-0.19518297910690308,
0.16868168115615845,
0.5929250717163086,
-0.022138461470603943,
0.3043958246707916,
-0.010582465678453445,
-0.18887625634670258,
-0.00876648910343647,
0.42151010036468506,
-0.12236891686916351,
0.21158187091350555,
0.028078705072402954,
0.12723024189472198,
-0.1766335815191269,
-0.3905814588069916,
-0.3909631073474884,
0.014414826408028603,
-0.26908135414123535,
0.19861935079097748,
0.18054752051830292,
-0.01123620942234993,
0.3944891095161438,
0.03534870967268944,
0.20285235345363617,
0.13341349363327026,
-0.1874389350414276,
-0.22108352184295654,
0.10857844352722168,
0.08754625916481018,
-0.179773211479187,
0.22504465281963348,
-0.0617988146841526,
-0.11876391619443893,
-0.07970795035362244,
-0.24265486001968384,
0.08002756536006927,
-0.19351685047149658,
-0.20513184368610382,
-0.023615894839167595,
0.40145668387413025,
0.0711870789527893,
-0.09041565656661987,
-0.22726160287857056,
-0.18598604202270508,
-0.1120225191116333,
0.08239005506038666,
-0.016444280743598938,
-0.2012714296579361,
-0.08657731115818024,
0.1103733479976654,
0.3801569640636444,
0.09015807509422302,
0.2094181776046753,
0.17662572860717773,
-0.018627747893333435,
-0.488773375749588,
0.2811225354671478,
0.5064010620117188,
0.3739394545555115,
-0.11114329099655151,
-0.20627130568027496,
0.13688039779663086,
0.22839361429214478,
-0.22592444717884064,
-0.18002410233020782,
0.15706953406333923,
0.09666536748409271,
0.3268413245677948,
0.47813352942466736,
-0.05778428912162781,
0.14199353754520416,
0.1076866090297699,
-0.06530025601387024,
0.43706390261650085,
-0.35547906160354614,
0.29976749420166016,
0.23252451419830322,
0.12198533117771149,
-0.07893402874469757,
0.07463492453098297,
0.307268887758255,
0.24434426426887512,
0.03265558183193207,
0.007779821753501892,
0.13517126441001892,
0.37519869208335876,
-0.028928715735673904,
0.2056725025177002,
-0.23628102242946625,
0.2718581259250641,
0.4547061324119568,
0.2355026751756668,
0.0671161636710167,
0.20649485290050507,
0.20273277163505554,
0.2900402247905731,
-0.436539888381958,
-0.1796112358570099,
0.16124027967453003,
0.002241365611553192,
-0.08075384795665741,
-0.051489122211933136,
-0.20362068712711334,
-0.23400291800498962,
-0.3377070426940918,
-0.008123807609081268,
-0.1499166488647461,
0.19582244753837585,
-0.13566207885742188,
0.48765480518341064,
-0.38187506794929504,
-0.02974744141101837,
-0.05132642388343811,
0.4778444468975067,
-0.0722036212682724,
0.1534411460161209,
0.1523798704147339,
0.009140156209468842,
0.1780417114496231,
0.1496577262878418,
0.41247978806495667,
0.30839213728904724,
0.16202884912490845,
-0.13160617649555206,
0.025531716644763947,
-0.060235559940338135,
0.011589763686060905,
-0.10616587102413177,
-0.20049995183944702,
-0.10276660323143005,
0.4747079610824585,
0.22998812794685364,
-0.07689391821622849,
0.12377089262008667,
-0.12497322261333466,
-0.002875249832868576,
-0.2688676714897156,
0.5929949879646301,
0.07584203779697418,
0.05361044406890869,
-0.17267584800720215,
0.0588359571993351,
-0.22421282529830933,
-0.11261335760354996,
0.20024578273296356,
0.22536130249500275,
0.16883346438407898,
0.14387814700603485,
0.1492069512605667,
0.24850280582904816,
0.23229080438613892,
0.2441035658121109,
-0.1330190896987915,
-0.19078080356121063,
-0.16822737455368042,
-0.4181647300720215,
0.10295271873474121,
-0.16465725004673004,
-0.18066611886024475,
0.28515514731407166,
0.4649676978588104,
0.32493698596954346,
0.3501279950141907,
0.1327974647283554,
-0.06511775404214859,
-0.14769048988819122,
0.3208712935447693,
-0.43343687057495117,
-0.07438041269779205,
0.30409732460975647,
-0.05901120603084564,
0.14661863446235657,
-0.09743872284889221,
-0.06921273469924927,
0.08148179203271866,
0.203306645154953,
-0.11881029605865479,
-0.15978342294692993,
-0.3479084372520447,
-0.11637544631958008,
-0.023521505296230316,
0.192964568734169,
-0.05609343945980072,
-0.09245005249977112,
-0.23813019692897797,
-0.022916939109563828,
-0.3286024332046509,
-0.03495258837938309,
0.548859715461731,
-0.14830230176448822,
0.33062124252319336,
-0.08604741841554642,
0.07522159814834595,
-0.3476261496543884,
-0.17824946343898773,
0.13883604109287262,
-0.12342079728841782,
-0.49430185556411743,
0.45681092143058777,
0.10810365527868271,
-0.10544370114803314,
-0.38590455055236816,
0.15726026892662048,
0.11977005749940872,
0.19132478535175323,
0.0815398097038269,
-0.3732036352157593,
0.545850396156311,
-0.3493613600730896,
-0.3176489770412445,
-0.0569879375398159,
0.11761509627103806,
-0.1165022924542427,
-0.03906683623790741,
-0.4210919141769409,
-0.1125219315290451,
0.25345098972320557,
0.017139514908194542,
-0.07786212861537933,
-0.060977693647146225,
0.053737252950668335,
-0.012378085404634476,
-0.18052321672439575,
-0.010622680187225342,
0.06211908161640167,
0.026459189131855965,
0.12753018736839294,
-0.31764066219329834
] |
https://github.com/huggingface/datasets/issues/5354 | Consider using "Sequence" instead of "List" | Hi all! I tried to reproduce this issue and didn't work for me. Also in your example i noticed that the variables have different names: `list_of_filenames` and `list_of_files`, could this be related to that?
```python
#I found random data in parquet format:
!wget "https://github.com/Teradata/kylo/raw/master/samples/sample-data/parquet/userdata1.parquet"
!wget "https://github.com/Teradata/kylo/raw/master/samples/sample-data/parquet/userdata2.parquet"
#Then i try reproduce
list_of_files = ["userdata1.parquet", "userdata2.parquet"]
ds = Dataset.from_parquet(list_of_files)
```
**My output:**
```python
WARNING:datasets.builder:Using custom data configuration default-e287d097dc54e046
Downloading and preparing dataset parquet/default to /root/.cache/huggingface/datasets/parquet/default-e287d097dc54e046/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec...
Downloading data files: 100%
1/1 [00:00<00:00, 40.38it/s]
Extracting data files: 100%
1/1 [00:00<00:00, 23.43it/s]
Dataset parquet downloaded and prepared to /root/.cache/huggingface/datasets/parquet/default-e287d097dc54e046/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec. Subsequent calls will reuse this data.
```
P.S. This is my first experience with open source. So do not judge strictly if I do not understand something) | ### Feature request
Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below.
**How to reproduce**
```py
list_of_filenames = ["foo.parquet", "bar.parquet"]
ds = Dataset.from_parquet(list_of_filenames)
```
**Expected mypy output:**
```
Success: no issues found
```
**Actual mypy output:**
```py
test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type]
test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
test.py:19: note: Consider using "Sequence" instead, which is covariant
```
**Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1 | 121 | Consider using "Sequence" instead of "List"
### Feature request
Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below.
**How to reproduce**
```py
list_of_filenames = ["foo.parquet", "bar.parquet"]
ds = Dataset.from_parquet(list_of_filenames)
```
**Expected mypy output:**
```
Success: no issues found
```
**Actual mypy output:**
```py
test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type]
test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
test.py:19: note: Consider using "Sequence" instead, which is covariant
```
**Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1
Hi all! I tried to reproduce this issue and didn't work for me. Also in your example i noticed that the variables have different names: `list_of_filenames` and `list_of_files`, could this be related to that?
```python
#I found random data in parquet format:
!wget "https://github.com/Teradata/kylo/raw/master/samples/sample-data/parquet/userdata1.parquet"
!wget "https://github.com/Teradata/kylo/raw/master/samples/sample-data/parquet/userdata2.parquet"
#Then i try reproduce
list_of_files = ["userdata1.parquet", "userdata2.parquet"]
ds = Dataset.from_parquet(list_of_files)
```
**My output:**
```python
WARNING:datasets.builder:Using custom data configuration default-e287d097dc54e046
Downloading and preparing dataset parquet/default to /root/.cache/huggingface/datasets/parquet/default-e287d097dc54e046/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec...
Downloading data files: 100%
1/1 [00:00<00:00, 40.38it/s]
Extracting data files: 100%
1/1 [00:00<00:00, 23.43it/s]
Dataset parquet downloaded and prepared to /root/.cache/huggingface/datasets/parquet/default-e287d097dc54e046/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec. Subsequent calls will reuse this data.
```
P.S. This is my first experience with open source. So do not judge strictly if I do not understand something) | [
-0.1178000420331955,
-0.05131741613149643,
0.010852660983800888,
0.24352386593818665,
0.26680997014045715,
-0.0728779211640358,
0.056258391588926315,
0.18381518125534058,
0.016596969217061996,
0.1468183994293213,
0.25834399461746216,
0.6618990898132324,
-0.20305277407169342,
0.1374817043542862,
-0.11441516876220703,
-0.12466971576213837,
-0.0017673000693321228,
-0.08508998155593872,
0.13486599922180176,
-0.14073537290096283,
-0.18218572437763214,
0.08253243565559387,
-0.13628888130187988,
0.06981173902750015,
0.17734083533287048,
-0.2060861736536026,
-0.24207407236099243,
0.1674097180366516,
-0.10042550414800644,
-0.34691786766052246,
0.1315932422876358,
0.10666590929031372,
-0.1735941767692566,
0.2912016808986664,
-0.00010564325930317864,
-0.15330955386161804,
0.3584336042404175,
-0.10103367269039154,
-0.15534134209156036,
-0.41797447204589844,
0.09139425307512283,
-0.16884583234786987,
0.2914656400680542,
-0.22861376404762268,
-0.09394694864749908,
-0.4577491581439972,
-0.20349739491939545,
-0.4764065444469452,
0.17041949927806854,
0.21687227487564087,
0.2125779688358307,
0.2560270428657532,
0.20528770983219147,
-0.2285662740468979,
0.5407085418701172,
0.14492738246917725,
-0.04568120092153549,
-0.10317550599575043,
0.3960704505443573,
0.07795778661966324,
0.24028238654136658,
-0.03799136355519295,
-0.08279880881309509,
-0.006805837154388428,
0.13534709811210632,
0.23913346230983734,
-0.039109013974666595,
-0.15219132602214813,
-0.137510746717453,
0.33327344059944153,
0.1954537332057953,
-0.2920583486557007,
-0.32188981771469116,
-0.2379947006702423,
-0.10220834612846375,
-0.15587666630744934,
0.16677623987197876,
0.275704950094223,
-0.12156815826892853,
0.014531999826431274,
0.17333659529685974,
0.39766544103622437,
0.03200259804725647,
0.2874170243740082,
0.003604896366596222,
-0.06501515209674835,
-0.1818118393421173,
0.28095391392707825,
0.0649978294968605,
-0.39275383949279785,
-0.24212723970413208,
-0.314541757106781,
-0.08059416711330414,
0.062397535890340805,
-0.3139644265174866,
-0.21744337677955627,
-0.03479558974504471,
-0.013701163232326508,
0.30625855922698975,
0.1284136176109314,
-0.15253350138664246,
-0.0006016865372657776,
-0.013402795419096947,
0.16971418261528015,
0.543560802936554,
-0.082969531416893,
-0.2183174192905426,
0.19412332773208618,
-0.24908937513828278,
0.06206556037068367,
-0.07299195975065231,
-0.10566981881856918,
0.29000595211982727,
-0.17817138135433197,
-0.004605788737535477,
-0.005938669666647911,
0.4503788948059082,
-0.21886850893497467,
-0.35594284534454346,
0.1144198328256607,
-0.13188207149505615,
-0.007883384823799133,
0.1188923791050911,
0.5356327295303345,
-0.07502666860818863,
0.09344804286956787,
-0.03656550496816635,
0.2741366922855377,
0.07998330146074295,
-0.1563088595867157,
-0.3237539529800415,
0.15064403414726257,
-0.05259174853563309,
-0.1806170642375946,
-0.00041025131940841675,
0.11203092336654663,
0.09765871614217758,
0.3610539138317108,
0.32927972078323364,
0.026440754532814026,
0.10605606436729431,
-0.3274228274822235,
0.313833087682724,
-0.1840667873620987,
-0.1485486775636673,
0.0680914893746376,
0.37986063957214355,
-0.005332179367542267,
-0.3180777132511139,
-0.19660401344299316,
-0.4753527045249939,
-0.037839215248823166,
0.05157169699668884,
0.20576417446136475,
0.040799811482429504,
-0.05474582314491272,
-0.5035325288772583,
-0.011490855365991592,
0.021321050822734833,
0.12603554129600525,
-0.21427127718925476,
-0.21843750774860382,
0.20427370071411133,
-0.3595494031906128,
-0.025305602699518204,
0.21294325590133667,
-0.03458819538354874,
-0.020197786390781403,
-0.03695987910032272,
0.047226496040821075,
0.4563213884830475,
0.23422977328300476,
-0.2172153741121292,
-0.1056487038731575,
-0.2706015706062317,
0.10942010581493378,
0.4952184855937958,
-0.08300714194774628,
0.08128969371318817,
0.3276923596858978,
0.09894528985023499,
0.13889867067337036,
0.14874374866485596,
-0.294748991727829,
0.4229004979133606,
-0.31505343317985535,
0.01954801380634308,
0.06068897619843483,
-0.020252062007784843,
0.11535634845495224,
-0.357895165681839,
-0.42199191451072693,
0.12943461537361145,
-0.0930948257446289,
-0.32434502243995667,
-0.07949443906545639,
0.21298614144325256,
-0.2618961036205292,
0.25545820593833923,
-0.3382626473903656,
-0.05367008596658707,
0.14133070409297943,
0.28862860798835754,
0.3383197784423828,
-0.05622819811105728,
-0.17220616340637207,
-0.38450178503990173,
0.0008295141160488129,
0.0007867105305194855,
-0.11073803901672363,
-0.2832237482070923,
-0.22224515676498413,
-0.02806038036942482,
0.0551886111497879,
-0.1341402679681778,
0.06318451464176178,
0.3182218372821808,
0.3246052861213684,
-0.034748055040836334,
-0.10634289681911469,
-0.11387543380260468,
-0.00974511168897152,
-0.3513984978199005,
-0.13458171486854553,
-0.17534402012825012,
0.3799986243247986,
0.09220368415117264,
-0.33674800395965576,
0.15837639570236206,
0.13943926990032196,
0.3048161566257477,
-0.027506757527589798,
0.1459377408027649,
0.2715822756290436,
0.4689972996711731,
0.03580791503190994,
0.0012987703084945679,
0.11128776520490646,
-0.04982572793960571,
-0.08816614001989365,
-0.07878342270851135,
0.12769940495491028,
0.10234206169843674,
0.1853800117969513,
-0.14190012216567993,
0.4515623450279236,
-0.005106281489133835,
0.19102999567985535,
-0.05807008594274521,
-0.04077732563018799,
0.3479558229446411,
0.16009773313999176,
-0.13871736824512482,
-0.10725677758455276,
0.013696055859327316,
0.35004091262817383,
0.085201695561409,
-0.026708772405982018,
-0.6833874583244324,
0.06791415810585022,
0.4747905135154724,
0.11024139821529388,
0.235801100730896,
0.08160732686519623,
0.15065926313400269,
0.015523802489042282,
-0.24635279178619385,
0.24303089082241058,
0.3330354690551758,
0.3343693017959595,
-0.17330749332904816,
-0.18769851326942444,
-0.14062802493572235,
-0.014085373841226101,
0.21401523053646088,
0.281507670879364,
-0.07204312086105347,
-0.07819176465272903,
0.24431373178958893,
-0.07202228158712387,
-0.1385093778371811,
-0.0982305109500885,
-0.1612679809331894,
0.1203097552061081,
-0.2985367178916931,
0.24073143303394318,
-0.5004183650016785,
0.20274701714515686,
-0.3123174011707306,
0.09686962515115738,
-0.012010283768177032,
-0.3350949287414551,
-0.2761055827140808,
0.06924538314342499,
-0.266020268201828,
0.21338635683059692,
0.2249707281589508,
0.1806144267320633,
0.12702485918998718,
-0.2282186895608902,
-0.0439370721578598,
-0.16266098618507385,
-0.26106563210487366,
0.161081463098526,
0.19094036519527435,
-0.0028563302475959063,
0.4152224659919739,
0.009909160435199738,
-0.050651952624320984,
-0.4977327585220337,
-0.14681482315063477,
0.1697119027376175,
-0.26546669006347656,
0.2469847947359085,
0.5065009593963623,
0.12602528929710388,
-0.09340281784534454,
-0.42179691791534424,
0.32829049229621887,
-0.07331910729408264,
-0.16082680225372314,
0.18844224512577057,
0.15238483250141144,
-0.1353665143251419,
-0.06766808778047562,
-0.3155207633972168,
-0.25514617562294006,
-0.28079500794410706,
0.31716763973236084,
0.4161294400691986,
0.10677426308393478,
-0.1676633059978485,
0.14027567207813263,
0.07089537382125854,
-0.32439517974853516,
0.3804846704006195,
-0.3097439408302307,
-0.2195284366607666,
0.16759110987186432,
0.07184972614049911,
-0.2890007495880127,
-0.01355663686990738,
-0.17870356142520905,
-0.16936388611793518,
0.23003925383090973,
-0.07537820190191269,
-0.33695921301841736,
-0.037518084049224854,
0.06289114058017731,
0.05921917408704758,
0.14441145956516266,
0.2240390181541443,
0.06693143397569656,
-0.17934222519397736,
-0.27269452810287476,
0.0843593180179596,
0.15273626148700714,
0.16478469967842102,
0.27698400616645813,
0.2735373079776764,
0.2731354832649231,
0.035620298236608505,
0.402238667011261,
0.3104802370071411,
-0.3309072256088257,
0.3016243577003479,
-0.1535816788673401,
0.1795659363269806,
-0.27076998353004456,
-0.271122545003891,
-0.0826796293258667,
-0.10148721933364868,
0.002741999924182892,
0.2062043398618698,
-0.2916950583457947,
-0.1302519589662552,
0.02941807359457016,
0.17764373123645782,
-0.16066356003284454,
-0.31126588582992554,
0.01995525136590004,
0.4106062352657318,
0.08403708040714264,
-0.03486446663737297,
0.039047613739967346,
-0.2597207725048065,
-0.09080462157726288,
0.09651261568069458,
0.2592809498310089,
-0.037434227764606476,
-0.20034587383270264,
-0.28238698840141296,
0.06239555403590202,
-0.1348673701286316,
0.36708295345306396,
0.03360142186284065,
0.17027129232883453,
0.1286705583333969,
-0.34750163555145264,
-0.12006166577339172,
-0.027613133192062378,
0.610862672328949,
-0.1984189748764038,
-0.07655899226665497,
0.16614586114883423,
-0.0336628220975399,
-0.22173109650611877,
-0.04163103178143501,
-0.6096855401992798,
-0.08929989486932755,
-0.12384170293807983,
0.4223179221153259,
-0.8040568828582764,
-0.21799850463867188,
-0.02650374546647072,
0.20917855203151703,
0.038966622203588486,
0.19009822607040405,
-0.26760345697402954,
0.001802980899810791,
-0.4105004370212555,
0.05825629457831383,
0.1556953489780426,
0.29406967759132385,
-0.14808766543865204,
0.035927530378103256,
-0.3144010305404663,
-0.022855333983898163,
0.12826226651668549,
0.04264981672167778,
0.8101851940155029,
-0.13732784986495972,
0.046400006860494614,
-0.23930072784423828,
0.5806225538253784,
0.49562570452690125,
0.3170899748802185,
-0.09784184396266937,
-0.5398920774459839,
0.15258660912513733,
-0.42488712072372437,
0.07720749825239182,
0.11246991157531738,
-0.3050387501716614,
0.22108206152915955,
-0.28077349066734314,
0.19005733728408813,
-0.24432173371315002,
0.06677012145519257,
0.5280675292015076,
-0.27535468339920044,
0.02191939577460289,
-0.5499076247215271,
0.24384275078773499,
0.11545328795909882,
-0.171264186501503,
0.3881862163543701,
0.126900315284729,
-0.30838000774383545,
0.5624316334724426,
0.31668218970298767,
0.8339457511901855,
0.18077939748764038,
-0.03176647052168846,
0.4170657992362976,
-0.1049928218126297,
0.3381383717060089,
0.10772578418254852,
-0.009216850623488426,
-0.30790016055107117,
-0.14712093770503998,
0.0047434251755476,
-0.28887295722961426,
0.29008233547210693,
0.3008619546890259,
-0.5962507724761963,
0.16528987884521484,
0.01582404226064682,
0.03521307185292244,
-0.17631547152996063,
0.26328858733177185,
-0.0015643797814846039,
-0.17667149007320404,
-0.5554369688034058,
0.172990620136261,
0.08680512011051178,
-0.2756635844707489,
0.08511652052402496,
-0.23847900331020355,
-0.23895049095153809,
-0.3081578016281128,
-0.18640035390853882,
-0.02953100949525833,
-0.1938060075044632,
0.031992245465517044,
0.16139627993106842,
-0.09748023748397827,
0.14305070042610168,
0.03639005869626999,
0.07805207371711731,
0.18239077925682068,
-0.06818442046642303,
-0.03176869824528694,
0.053137414157390594,
0.15410396456718445,
-0.0872916430234909,
-0.21338900923728943,
0.05525463819503784,
0.07802979648113251,
0.002294868230819702,
0.06387307494878769,
-0.09509878605604172,
-0.19299310445785522,
-0.13611923158168793,
0.05610820651054382,
0.18596534430980682,
-0.45140060782432556,
-0.3572675585746765,
-0.024895742535591125,
-0.2975030839443207,
-0.12624527513980865,
0.16194778680801392,
0.15138277411460876,
-0.09581224620342255,
0.2350841760635376,
0.11258260905742645,
-0.10344191640615463,
-0.12757915258407593,
0.054088011384010315,
-0.003326151520013809,
0.29902011156082153,
0.3919885754585266,
0.09946869313716888,
-0.25283992290496826,
-0.33408352732658386,
0.07476427406072617,
0.18938860297203064,
-0.4162035286426544,
0.3191711902618408,
-0.08747459948062897,
-0.07649187743663788,
0.19555926322937012,
0.49605146050453186,
0.055025748908519745,
0.23644664883613586,
0.02804729714989662,
-0.32053089141845703,
0.16914312541484833,
0.23425698280334473,
0.0021211691200733185,
0.24655668437480927,
0.08019085228443146,
0.19127139449119568,
-0.18016169965267181,
-0.3138910233974457,
-0.4017062187194824,
0.011291678063571453,
-0.21793970465660095,
0.24602194130420685,
0.08189119398593903,
0.036878593266010284,
0.2413945347070694,
0.07931090891361237,
0.22297434508800507,
0.0539780929684639,
-0.09509648382663727,
-0.27279800176620483,
0.045977991074323654,
0.05530090630054474,
-0.14119461178779602,
0.2505641281604767,
-0.17671018838882446,
-0.15992332994937897,
-0.04608992859721184,
-0.22953157126903534,
0.07140965759754181,
-0.20967277884483337,
-0.18440736830234528,
-0.023149264976382256,
0.46737709641456604,
0.02517518773674965,
-0.16890259087085724,
-0.1305948942899704,
-0.16346561908721924,
-0.1563630849123001,
0.04955260828137398,
-0.05197105556726456,
-0.15033091604709625,
-0.07512810081243515,
0.12288860976696014,
0.25400856137275696,
0.007656358182430267,
0.24651917815208435,
0.21256676316261292,
-0.057391904294490814,
-0.38568997383117676,
0.2952094078063965,
0.37969133257865906,
0.514035701751709,
-0.09581242501735687,
-0.2219221293926239,
0.16362759470939636,
0.24350842833518982,
-0.2253837287425995,
-0.08728008717298508,
0.2632558047771454,
0.17408660054206848,
0.29709815979003906,
0.367544949054718,
-0.054673582315444946,
0.018085911870002747,
-0.04587419331073761,
-0.06874814629554749,
0.5191537141799927,
-0.2537596821784973,
0.2256172001361847,
0.3036191165447235,
0.1768326759338379,
-0.016810115426778793,
0.06205365061759949,
0.27012765407562256,
0.2201474905014038,
0.11178913712501526,
0.01084958016872406,
0.03866562247276306,
0.34799033403396606,
-0.10148768126964569,
0.14586606621742249,
-0.27308914065361023,
0.37933242321014404,
0.3737596571445465,
0.1601770520210266,
0.024158980697393417,
0.07683055102825165,
0.16677060723304749,
0.27200451493263245,
-0.3154991865158081,
-0.24213865399360657,
0.2067888379096985,
-0.008277501910924911,
-0.11414676904678345,
-0.08965050429105759,
-0.26805809140205383,
-0.27141058444976807,
-0.3058599531650543,
0.0403672531247139,
-0.1356457769870758,
-0.05088129639625549,
-0.0884227603673935,
0.38882923126220703,
-0.32995471358299255,
-0.026042811572551727,
-0.09860662370920181,
0.3726773262023926,
-0.15190932154655457,
0.1675974726676941,
0.19790929555892944,
0.026438165456056595,
0.1764463484287262,
0.12747898697853088,
0.3352421224117279,
0.36912378668785095,
0.05324069783091545,
-0.16421188414096832,
0.074599489569664,
-0.0920526385307312,
0.007211897522211075,
-0.07871823757886887,
-0.19773831963539124,
-0.11655040085315704,
0.4659416377544403,
0.271724671125412,
-0.1588367521762848,
-0.13604189455509186,
0.02737484872341156,
-0.06050774082541466,
-0.3029211461544037,
0.45987749099731445,
0.1119627058506012,
0.026668503880500793,
-0.023613180965185165,
0.03521189093589783,
-0.47736138105392456,
-0.1619301736354828,
0.12558576464653015,
0.20263312757015228,
0.20047223567962646,
0.15775634348392487,
0.15809430181980133,
0.15552185475826263,
0.25372931361198425,
0.11558059602975845,
-0.18619349598884583,
-0.18826188147068024,
-0.08886183798313141,
-0.5255123376846313,
0.1554661989212036,
-0.2373535931110382,
-0.3002319037914276,
0.15057502686977386,
0.5623865127563477,
0.32924091815948486,
0.2617160677909851,
0.03110792487859726,
0.003201295156031847,
-0.05605321004986763,
0.41814836859703064,
-0.4542931616306305,
-0.20847389101982117,
0.18042847514152527,
-0.004504045471549034,
0.13774801790714264,
-0.13142362236976624,
-0.0012945793569087982,
-0.017375163733959198,
0.24683761596679688,
-0.08677060157060623,
-0.21187184751033783,
-0.17918457090854645,
-0.25081533193588257,
-0.013674318790435791,
0.11635207384824753,
0.07679576426744461,
-0.15773609280586243,
-0.18732811510562897,
-0.1238507330417633,
-0.27729445695877075,
0.05259346589446068,
0.4956633746623993,
-0.06607431173324585,
0.2805604338645935,
-0.044290028512477875,
0.04058065265417099,
-0.33119747042655945,
-0.0818680003285408,
0.09128907322883606,
-0.08941628038883209,
-0.30830058455467224,
0.44032421708106995,
0.15266531705856323,
-0.07984364032745361,
-0.297834187746048,
0.13899275660514832,
0.030722612515091896,
0.21613788604736328,
0.08294126391410828,
-0.3198103606700897,
0.45929816365242004,
-0.4806850254535675,
-0.2602068781852722,
-0.16453473269939423,
0.1682378351688385,
-0.02148972451686859,
0.12340907752513885,
-0.23059430718421936,
0.0973588153719902,
0.2904128134250641,
0.03085695393383503,
0.04616459086537361,
-0.04293212667107582,
0.06118524447083473,
0.03111680969595909,
-0.10502859950065613,
-0.08150111138820648,
0.09162643551826477,
-0.006419727578759193,
0.14169175922870636,
-0.17430467903614044
] |
https://github.com/huggingface/datasets/issues/5354 | Consider using "Sequence" instead of "List" | @dantema There is indeed a typo in variable names. Nevertheless, I'm sorry if I was not clear but the output is from `mypy` type checker. You can run the code snippet without issues. The problem is with the type checking. | ### Feature request
Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below.
**How to reproduce**
```py
list_of_filenames = ["foo.parquet", "bar.parquet"]
ds = Dataset.from_parquet(list_of_filenames)
```
**Expected mypy output:**
```
Success: no issues found
```
**Actual mypy output:**
```py
test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type]
test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
test.py:19: note: Consider using "Sequence" instead, which is covariant
```
**Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1 | 40 | Consider using "Sequence" instead of "List"
### Feature request
Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below.
**How to reproduce**
```py
list_of_filenames = ["foo.parquet", "bar.parquet"]
ds = Dataset.from_parquet(list_of_filenames)
```
**Expected mypy output:**
```
Success: no issues found
```
**Actual mypy output:**
```py
test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type]
test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
test.py:19: note: Consider using "Sequence" instead, which is covariant
```
**Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1
@dantema There is indeed a typo in variable names. Nevertheless, I'm sorry if I was not clear but the output is from `mypy` type checker. You can run the code snippet without issues. The problem is with the type checking. | [
-0.16263283789157867,
-0.0622689314186573,
-0.02001432701945305,
0.2077740728855133,
0.25862589478492737,
-0.0005732327699661255,
0.12707367539405823,
0.1766902506351471,
0.006396817043423653,
0.06248638406395912,
0.24633429944515228,
0.7310899496078491,
-0.14743535220623016,
0.20690633356571198,
-0.13167767226696014,
-0.13095349073410034,
0.05271891877055168,
-0.05693128705024719,
0.08395060896873474,
-0.07081121951341629,
-0.1966247707605362,
0.1643242985010147,
-0.15976279973983765,
0.12215042859315872,
0.1702345460653305,
-0.22901690006256104,
-0.09788445383310318,
0.1267852932214737,
-0.0650692954659462,
-0.3800191581249237,
0.14737370610237122,
0.035611167550086975,
-0.08607275038957596,
0.2648298740386963,
-0.00010478120384505019,
-0.15205617249011993,
0.38976699113845825,
-0.049228593707084656,
-0.12447591125965118,
-0.26834315061569214,
-0.06174500286579132,
-0.11596409231424332,
0.38063594698905945,
-0.2150634527206421,
-0.032748572528362274,
-0.38021793961524963,
-0.20711305737495422,
-0.5332545638084412,
0.2170099914073944,
0.30451685190200806,
0.22487963736057281,
0.2841148376464844,
0.23651184141635895,
-0.24018673598766327,
0.35432466864585876,
0.12543240189552307,
-0.08583610504865646,
-0.09354224801063538,
0.404387503862381,
0.024136191233992577,
0.18759103119373322,
0.06011415272951126,
-0.06950894743204117,
-0.05003788694739342,
0.18997237086296082,
0.22156381607055664,
0.04732287675142288,
-0.07766646146774292,
-0.17509272694587708,
0.1722518503665924,
0.2632758617401123,
-0.36121678352355957,
-0.29839542508125305,
-0.22261813282966614,
-0.14244233071804047,
-0.18937793374061584,
0.15729141235351562,
0.15702864527702332,
-0.10795626044273376,
-0.008899014443159103,
0.2307935506105423,
0.2670662999153137,
-0.07792797684669495,
0.25493568181991577,
0.1365220844745636,
-0.07717080414295197,
-0.18083952367305756,
0.2573429346084595,
0.09696416556835175,
-0.3620379567146301,
-0.20738911628723145,
-0.22742384672164917,
0.013464037328958511,
0.059652965515851974,
-0.3041441738605499,
-0.15044668316841125,
-0.03908646106719971,
0.023005571216344833,
0.26918187737464905,
0.13601180911064148,
-0.13689638674259186,
0.01567859947681427,
-0.02585645206272602,
0.20497772097587585,
0.5424138903617859,
-0.040665484964847565,
-0.07616247981786728,
0.1866636723279953,
-0.28211092948913574,
0.14164462685585022,
0.010898031294345856,
-0.13196539878845215,
0.27051040530204773,
-0.23353077471256256,
0.026812300086021423,
-0.029029417783021927,
0.4644134044647217,
-0.23958498239517212,
-0.3648534119129181,
0.18456774950027466,
-0.08203338086605072,
-0.08371096849441528,
0.14103330671787262,
0.5204458236694336,
-0.06650132685899734,
0.06080958992242813,
-0.037903573364019394,
0.28985971212387085,
0.06603678315877914,
-0.1807783991098404,
-0.3372354507446289,
0.17746584117412567,
-0.08499754965305328,
-0.12897484004497528,
-0.052420519292354584,
-0.0351036861538887,
0.10298037528991699,
0.3001426160335541,
0.4868779182434082,
0.07148939371109009,
0.05258120596408844,
-0.31035315990448,
0.2544490396976471,
-0.17787835001945496,
-0.17982761561870575,
0.06329029053449631,
0.43583235144615173,
-0.08054331690073013,
-0.24177560210227966,
-0.1992681324481964,
-0.427211195230484,
-0.1252075582742691,
-0.11244778335094452,
0.19872096180915833,
0.028861109167337418,
-0.06628211587667465,
-0.609538197517395,
-0.06021726503968239,
0.12763668596744537,
0.08165225386619568,
-0.1669725477695465,
-0.18051858246326447,
0.1451072245836258,
-0.3571906089782715,
0.026455091312527657,
0.24672099947929382,
-0.075418621301651,
-0.01567446067929268,
-0.09881468117237091,
-0.00026144087314605713,
0.40649086236953735,
0.2815028429031372,
-0.19920961558818817,
-0.14622849225997925,
-0.28631511330604553,
0.15976101160049438,
0.5028743147850037,
-0.14705973863601685,
0.16777299344539642,
0.30145856738090515,
0.05937020480632782,
0.056468114256858826,
0.08569873124361038,
-0.3180713355541229,
0.3823340833187103,
-0.31337812542915344,
0.014568254351615906,
-0.041429899632930756,
-0.02734781615436077,
0.12603476643562317,
-0.3294841945171356,
-0.3225782513618469,
0.1664866805076599,
-0.11007490754127502,
-0.31181231141090393,
-0.05810580402612686,
0.1298503577709198,
-0.238946795463562,
0.29125985503196716,
-0.2820536196231842,
-0.026321418583393097,
0.24350506067276,
0.30786657333374023,
0.3016902506351471,
0.013422830030322075,
-0.20485231280326843,
-0.492652952671051,
-0.007499251514673233,
0.07234048843383789,
-0.06770741194486618,
-0.30801182985305786,
-0.17403969168663025,
-0.13135431706905365,
0.15229254961013794,
-0.1745857298374176,
0.09451961517333984,
0.27518612146377563,
0.3316645324230194,
-0.09879574179649353,
-0.10820147395133972,
-0.17740097641944885,
0.09375948458909988,
-0.3805354833602905,
-0.10880400985479355,
-0.21341562271118164,
0.3840975761413574,
0.0016771964728832245,
-0.2600874602794647,
0.14003385603427887,
0.14658384025096893,
0.28132176399230957,
0.03229661285877228,
0.15490752458572388,
0.29980143904685974,
0.36639076471328735,
-0.025646865367889404,
-0.0950666144490242,
0.07467629760503769,
-0.15806610882282257,
-0.24149052798748016,
-0.0910126343369484,
0.07294875383377075,
0.11145065724849701,
0.15285104513168335,
-0.23538178205490112,
0.4500511884689331,
-0.09381905198097229,
0.24791598320007324,
-0.08235965669155121,
-0.00967969186604023,
0.21495360136032104,
0.20943385362625122,
-0.22574278712272644,
-0.22283700108528137,
0.052165884524583817,
0.22584809362888336,
0.08826857805252075,
-0.1104595810174942,
-0.6449365615844727,
0.044376831501722336,
0.4571276605129242,
0.11288326978683472,
0.15163132548332214,
0.11777596920728683,
0.19532540440559387,
0.02265964075922966,
-0.167398139834404,
0.17155569791793823,
0.31080639362335205,
0.3322639763355255,
-0.18457582592964172,
-0.19398176670074463,
-0.19220112264156342,
0.021211940795183182,
0.2135576605796814,
0.2580617070198059,
0.03422378748655319,
-0.11641529947519302,
0.23208065330982208,
-0.11170875281095505,
-0.1854129433631897,
-0.12251834571361542,
-0.15815255045890808,
0.15607541799545288,
-0.3858501613140106,
0.2639651596546173,
-0.4303373694419861,
0.0395207405090332,
-0.33035847544670105,
0.09964130818843842,
-0.09733769297599792,
-0.3958883583545685,
-0.24344779551029205,
0.06953058391809464,
-0.215633824467659,
0.28897708654403687,
0.14830432832241058,
0.10856448113918304,
0.17554982006549835,
-0.32632681727409363,
-0.04706841707229614,
-0.13519512116909027,
-0.20886027812957764,
0.1629892885684967,
0.18142887949943542,
-0.020163659006357193,
0.3426734209060669,
0.05244135856628418,
-0.06646278500556946,
-0.5237239599227905,
-0.15378907322883606,
0.1892808973789215,
-0.2652653455734253,
0.13085556030273438,
0.4886435866355896,
0.16624590754508972,
-0.0939348116517067,
-0.4483329951763153,
0.32546475529670715,
-0.0847984254360199,
-0.1905433088541031,
0.14240580797195435,
0.144108846783638,
-0.0867551788687706,
-0.06082779914140701,
-0.30172768235206604,
-0.150271475315094,
-0.3210803270339966,
0.3432372808456421,
0.40997323393821716,
0.13076111674308777,
-0.15700292587280273,
0.03611277416348457,
0.06882219761610031,
-0.3646325170993805,
0.4014613628387451,
-0.31118181347846985,
-0.12737323343753815,
0.18218651413917542,
0.05442136153578758,
-0.3255561888217926,
0.04915698990225792,
-0.14297357201576233,
0.005264647305011749,
0.09083738923072815,
-0.08812682330608368,
-0.38090431690216064,
0.04180029779672623,
0.0026406049728393555,
-0.04133458435535431,
0.16612882912158966,
0.2065584808588028,
0.06988246738910675,
-0.1602790653705597,
-0.28663480281829834,
-0.050113074481487274,
0.19694283604621887,
0.14969924092292786,
0.2501480281352997,
0.2042628526687622,
0.3722626566886902,
-0.00273001566529274,
0.3384212255477905,
0.35066133737564087,
-0.22993282973766327,
0.3508007526397705,
-0.21785295009613037,
0.18198880553245544,
-0.26498299837112427,
-0.26446717977523804,
-0.06652961671352386,
-0.0877428948879242,
0.023297887295484543,
0.14580038189888,
-0.2913331687450409,
-0.11156431585550308,
0.045692525804042816,
0.26766619086265564,
-0.1521265208721161,
-0.31633487343788147,
0.006733126938343048,
0.31376397609710693,
0.13505889475345612,
-0.012627005577087402,
-0.031155718490481377,
-0.2705964148044586,
-0.07189857214689255,
0.15518462657928467,
0.2306431531906128,
-0.011394456028938293,
-0.17447376251220703,
-0.30744507908821106,
0.11855442821979523,
-0.1568486988544464,
0.38772428035736084,
0.02992202527821064,
0.17442908883094788,
0.053871866315603256,
-0.4044218063354492,
-0.17566709220409393,
0.034550439566373825,
0.6312416195869446,
-0.20522817969322205,
-0.11149285733699799,
0.22224421799182892,
0.028604522347450256,
-0.3078228235244751,
0.021849844604730606,
-0.5094413161277771,
0.007665370125323534,
-0.12238650023937225,
0.37883082032203674,
-0.7275360822677612,
-0.23723027110099792,
0.07548492401838303,
0.1912737935781479,
0.035828422755002975,
0.20347578823566437,
-0.31745973229408264,
0.029769912362098694,
-0.4060795307159424,
0.09657663851976395,
0.19371715188026428,
0.3549330234527588,
-0.012771539390087128,
0.1551159769296646,
-0.24851076304912567,
-0.08169833570718765,
0.06427264213562012,
0.06570549309253693,
0.816518247127533,
-0.12718059122562408,
0.009278222918510437,
-0.2620413899421692,
0.5678999423980713,
0.49056875705718994,
0.2765904366970062,
-0.13133877515792847,
-0.5725163817405701,
0.11999357491731644,
-0.4142570197582245,
0.2131505161523819,
0.08945754915475845,
-0.2806650996208191,
0.18891488015651703,
-0.14875930547714233,
0.2345399260520935,
-0.2065032720565796,
0.07759501785039902,
0.4891945719718933,
-0.1784602701663971,
-0.10199110209941864,
-0.5477871894836426,
0.3227117359638214,
0.15553796291351318,
-0.13403449952602386,
0.3651306629180908,
0.3083946406841278,
-0.24582265317440033,
0.5114414691925049,
0.3496699631214142,
0.7970788478851318,
0.12971672415733337,
-0.0738678127527237,
0.46564799547195435,
-0.008661318570375443,
0.40442970395088196,
0.133964404463768,
0.006006867624819279,
-0.2954504191875458,
-0.14435718953609467,
0.005553329363465309,
-0.27094778418540955,
0.21563148498535156,
0.23588672280311584,
-0.5397058129310608,
0.24220570921897888,
0.028257042169570923,
0.1141766905784607,
-0.1801145076751709,
0.19540554285049438,
0.03323100507259369,
-0.19963040947914124,
-0.47514379024505615,
0.16930453479290009,
0.09244859218597412,
-0.314272403717041,
0.004476746544241905,
-0.23180605471134186,
-0.06622519344091415,
-0.4153011441230774,
-0.25976064801216125,
-0.04578176513314247,
-0.20398838818073273,
0.028872743248939514,
0.1538933515548706,
-0.10789009928703308,
0.2877587378025055,
0.15680035948753357,
0.20726341009140015,
0.05945917218923569,
-0.08312799781560898,
-0.14816398918628693,
0.003205426037311554,
0.14007475972175598,
-0.16238723695278168,
-0.23956237733364105,
0.09052633494138718,
0.06936222314834595,
0.0466475710272789,
0.039446212351322174,
-0.07597371935844421,
-0.3314897418022156,
-0.02264849841594696,
0.14154285192489624,
0.19009675085544586,
-0.45912691950798035,
-0.2901737689971924,
-0.07471141219139099,
-0.18707996606826782,
-0.1624853014945984,
0.15449896454811096,
0.19930268824100494,
-0.1449427604675293,
0.2033596932888031,
0.09634731709957123,
-0.07122340798377991,
-0.12400439381599426,
0.05992964655160904,
-0.020333420485258102,
0.1355362832546234,
0.44677749276161194,
0.2734321653842926,
-0.2723725736141205,
-0.34171047806739807,
-0.0705152302980423,
0.1864863932132721,
-0.4243082106113434,
0.3075612187385559,
-0.04521586000919342,
-0.10517707467079163,
0.19519872963428497,
0.5323383808135986,
0.042689912021160126,
0.3140575587749481,
-0.01053173840045929,
-0.3167017102241516,
0.008955949917435646,
0.31969696283340454,
-0.10848714411258698,
0.12463997304439545,
0.0726139023900032,
0.1545114368200302,
-0.12238647043704987,
-0.3730005919933319,
-0.4098815619945526,
0.0016792407259345055,
-0.25680041313171387,
0.20576182007789612,
0.2073592096567154,
0.0014948174357414246,
0.37216484546661377,
0.06720902025699615,
0.21847549080848694,
0.047115929424762726,
-0.12618955969810486,
-0.2605806291103363,
0.07694980502128601,
0.07162443548440933,
-0.1310180127620697,
0.22332270443439484,
-0.13479623198509216,
-0.14408636093139648,
-0.11710017919540405,
-0.2478579878807068,
0.08122099936008453,
-0.1696375012397766,
-0.1795690506696701,
-0.013731186278164387,
0.4066691994667053,
-0.02904348075389862,
-0.1168610155582428,
-0.27272242307662964,
-0.12983115017414093,
-0.1128465086221695,
0.019085943698883057,
0.029379043728113174,
-0.20647673308849335,
-0.10930145531892776,
0.14802932739257812,
0.3221241533756256,
0.009032167494297028,
0.2301221489906311,
0.13073000311851501,
-0.11702440679073334,
-0.44485601782798767,
0.2968038320541382,
0.5474381446838379,
0.42360958456993103,
-0.08198973536491394,
-0.16572430729866028,
0.11761672794818878,
0.2321045696735382,
-0.2981692850589752,
-0.15743586421012878,
0.20118127763271332,
0.10145588964223862,
0.26063451170921326,
0.43354734778404236,
-0.0936126559972763,
0.0758943259716034,
0.03206496685743332,
-0.03629665821790695,
0.49000635743141174,
-0.3342295289039612,
0.314261794090271,
0.25898662209510803,
0.16624191403388977,
0.012430131435394287,
0.09242846071720123,
0.36142316460609436,
0.2737669348716736,
0.13711586594581604,
-0.03484936058521271,
0.06763317435979843,
0.36667439341545105,
-0.09854425489902496,
0.1276809275150299,
-0.26026657223701477,
0.28879448771476746,
0.3732494115829468,
0.2315000593662262,
-0.011840730905532837,
0.12546151876449585,
0.2496303915977478,
0.27904853224754333,
-0.3273443877696991,
-0.27710479497909546,
0.1582074612379074,
-0.07454950362443924,
-0.09029775857925415,
-0.06716122478246689,
-0.22457340359687805,
-0.23208747804164886,
-0.2366032749414444,
0.01434367150068283,
-0.16966350376605988,
0.08555460721254349,
-0.12911313772201538,
0.4305681586265564,
-0.32564276456832886,
-0.0008616112172603607,
0.0245974101126194,
0.35503098368644714,
-0.12605825066566467,
0.13626916706562042,
0.15359124541282654,
-0.01270834356546402,
0.13833756744861603,
0.15975084900856018,
0.4096135199069977,
0.31472939252853394,
0.10203211009502411,
-0.1378965526819229,
0.03427537530660629,
-0.11621971428394318,
0.07401694357395172,
-0.11691914498806,
-0.1883808970451355,
-0.07798849046230316,
0.48497846722602844,
0.2781509459018707,
-0.13187642395496368,
-0.025536637753248215,
0.024727512151002884,
0.027548417448997498,
-0.2123846411705017,
0.4347800016403198,
0.012673802673816681,
0.06603790074586868,
-0.1620277613401413,
0.06124761328101158,
-0.3697071969509125,
-0.17303895950317383,
0.21524932980537415,
0.25818559527397156,
0.19260931015014648,
0.175636887550354,
0.15474973618984222,
0.1771523505449295,
0.25681328773498535,
0.19779054820537567,
-0.1344766914844513,
-0.2381468415260315,
-0.13677026331424713,
-0.48527854681015015,
0.18462033569812775,
-0.1822655200958252,
-0.2876409590244293,
0.2692779004573822,
0.5252520442008972,
0.36572685837745667,
0.24974675476551056,
0.16729159653186798,
0.025460679084062576,
-0.0933588370680809,
0.30872905254364014,
-0.41743478178977966,
-0.1987430900335312,
0.2859235405921936,
-0.042783357203006744,
0.1829356849193573,
-0.1196294054389,
-0.021900568157434464,
-0.018343139439821243,
0.2011396288871765,
-0.0821153074502945,
-0.1659843921661377,
-0.3076983690261841,
-0.24782204627990723,
-0.028182819485664368,
0.10485269874334335,
0.017107002437114716,
-0.1287146508693695,
-0.1672855019569397,
-0.08134663105010986,
-0.36514362692832947,
-0.008624988608062267,
0.5828030705451965,
-0.08890014886856079,
0.3240489363670349,
-0.0984560027718544,
0.042506925761699677,
-0.346677303314209,
-0.16095401346683502,
0.1228395402431488,
-0.1325104981660843,
-0.40594279766082764,
0.5031878352165222,
0.1511962115764618,
-0.09831462800502777,
-0.3349251449108124,
0.09942355751991272,
0.07506001740694046,
0.23976106941699982,
0.05929595232009888,
-0.40971216559410095,
0.6024704575538635,
-0.39825060963630676,
-0.3050605356693268,
-0.07598628848791122,
0.19872945547103882,
0.0919729471206665,
-0.045534566044807434,
-0.3796684145927429,
0.0037649422883987427,
0.2507653534412384,
0.07265453785657883,
-0.11952780187129974,
-0.08467176556587219,
-0.025254633277654648,
0.040703874081373215,
-0.06610016524791718,
-0.007537342607975006,
0.08451151847839355,
-0.04895346611738205,
0.1363667994737625,
-0.26464664936065674
] |
https://github.com/huggingface/datasets/issues/5354 | Consider using "Sequence" instead of "List" | However, I found out that the type annotation is actually misleading. The [`from_parquet`](https://github.com/huggingface/datasets/blob/5ef1ab1cc06c2b7a574bf2df454cd9fcb071ccb2/src/datasets/arrow_dataset.py#L1039) method should also accept list of [`PathLike`](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/typing.py#L8) objects which includes [`os.PathLike`](https://docs.python.org/3/library/os.html#os.PathLike). But if I would ran the code snippet below, an exception is thrown.
**Code**
```py
from pathlib import Path
list_of_filenames = [Path("foo.parquet"), Path("bar.parquet")]
ds = Dataset.from_parquet(list_of_filenames)
```
**Output**
```py
[/usr/local/lib/python3.8/dist-packages/datasets/arrow_dataset.py](https://localhost:8080/#) in from_parquet(path_or_paths, split, features, cache_dir, keep_in_memory, columns, **kwargs)
1071 from .io.parquet import ParquetDatasetReader
1072
-> 1073 return ParquetDatasetReader(
1074 path_or_paths,
1075 split=split,
[/usr/local/lib/python3.8/dist-packages/datasets/io/parquet.py](https://localhost:8080/#) in __init__(self, path_or_paths, split, features, cache_dir, keep_in_memory, streaming, **kwargs)
35 path_or_paths = path_or_paths if isinstance(path_or_paths, dict) else {self.split: path_or_paths}
36 hash = _PACKAGED_DATASETS_MODULES["parquet"][1]
---> 37 self.builder = Parquet(
38 cache_dir=cache_dir,
39 data_files=path_or_paths,
[/usr/local/lib/python3.8/dist-packages/datasets/builder.py](https://localhost:8080/#) in __init__(self, cache_dir, config_name, hash, base_path, info, features, use_auth_token, repo_id, data_files, data_dir, name, **config_kwargs)
298
299 if data_files is not None and not isinstance(data_files, DataFilesDict):
--> 300 data_files = DataFilesDict.from_local_or_remote(
301 sanitize_patterns(data_files), base_path=base_path, use_auth_token=use_auth_token
302 )
[/usr/local/lib/python3.8/dist-packages/datasets/data_files.py](https://localhost:8080/#) in from_local_or_remote(cls, patterns, base_path, allowed_extensions, use_auth_token)
794 for key, patterns_for_key in patterns.items():
795 out[key] = (
--> 796 DataFilesList.from_local_or_remote(
797 patterns_for_key,
798 base_path=base_path,
[/usr/local/lib/python3.8/dist-packages/datasets/data_files.py](https://localhost:8080/#) in from_local_or_remote(cls, patterns, base_path, allowed_extensions, use_auth_token)
762 ) -> "DataFilesList":
763 base_path = base_path if base_path is not None else str(Path().resolve())
--> 764 data_files = resolve_patterns_locally_or_by_urls(base_path, patterns, allowed_extensions)
765 origin_metadata = _get_origin_metadata_locally_or_by_urls(data_files, use_auth_token=use_auth_token)
766 return cls(data_files, origin_metadata)
[/usr/local/lib/python3.8/dist-packages/datasets/data_files.py](https://localhost:8080/#) in resolve_patterns_locally_or_by_urls(base_path, patterns, allowed_extensions)
357 data_files = []
358 for pattern in patterns:
--> 359 if is_remote_url(pattern):
360 data_files.append(Url(pattern))
361 else:
[/usr/local/lib/python3.8/dist-packages/datasets/utils/file_utils.py](https://localhost:8080/#) in is_remote_url(url_or_filename)
62
63 def is_remote_url(url_or_filename: str) -> bool:
---> 64 parsed = urlparse(url_or_filename)
65 return parsed.scheme in ("http", "https", "s3", "gs", "hdfs", "ftp")
66
[/usr/lib/python3.8/urllib/parse.py](https://localhost:8080/#) in urlparse(url, scheme, allow_fragments)
373 Note that we don't break the components up in smaller bits
374 (e.g. netloc is a single string) and we don't expand % escapes."""
--> 375 url, scheme, _coerce_result = _coerce_args(url, scheme)
376 splitresult = urlsplit(url, scheme, allow_fragments)
377 scheme, netloc, url, query, fragment = splitresult
[/usr/lib/python3.8/urllib/parse.py](https://localhost:8080/#) in _coerce_args(*args)
125 if str_input:
126 return args + (_noop,)
--> 127 return _decode_args(args) + (_encode_result,)
128
129 # Result objects are more helpful than simple tuples
[/usr/lib/python3.8/urllib/parse.py](https://localhost:8080/#) in _decode_args(args, encoding, errors)
109 def _decode_args(args, encoding=_implicit_encoding,
110 errors=_implicit_errors):
--> 111 return tuple(x.decode(encoding, errors) if x else '' for x in args)
112
113 def _coerce_args(*args):
[/usr/lib/python3.8/urllib/parse.py](https://localhost:8080/#) in <genexpr>(.0)
109 def _decode_args(args, encoding=_implicit_encoding,
110 errors=_implicit_errors):
--> 111 return tuple(x.decode(encoding, errors) if x else '' for x in args)
112
113 def _coerce_args(*args):
AttributeError: 'PosixPath' object has no attribute 'decode'
```
@mariosasko Should I create a new issue? | ### Feature request
Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below.
**How to reproduce**
```py
list_of_filenames = ["foo.parquet", "bar.parquet"]
ds = Dataset.from_parquet(list_of_filenames)
```
**Expected mypy output:**
```
Success: no issues found
```
**Actual mypy output:**
```py
test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type]
test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
test.py:19: note: Consider using "Sequence" instead, which is covariant
```
**Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1 | 405 | Consider using "Sequence" instead of "List"
### Feature request
Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below.
**How to reproduce**
```py
list_of_filenames = ["foo.parquet", "bar.parquet"]
ds = Dataset.from_parquet(list_of_filenames)
```
**Expected mypy output:**
```
Success: no issues found
```
**Actual mypy output:**
```py
test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type]
test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
test.py:19: note: Consider using "Sequence" instead, which is covariant
```
**Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1
However, I found out that the type annotation is actually misleading. The [`from_parquet`](https://github.com/huggingface/datasets/blob/5ef1ab1cc06c2b7a574bf2df454cd9fcb071ccb2/src/datasets/arrow_dataset.py#L1039) method should also accept list of [`PathLike`](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/typing.py#L8) objects which includes [`os.PathLike`](https://docs.python.org/3/library/os.html#os.PathLike). But if I would ran the code snippet below, an exception is thrown.
**Code**
```py
from pathlib import Path
list_of_filenames = [Path("foo.parquet"), Path("bar.parquet")]
ds = Dataset.from_parquet(list_of_filenames)
```
**Output**
```py
[/usr/local/lib/python3.8/dist-packages/datasets/arrow_dataset.py](https://localhost:8080/#) in from_parquet(path_or_paths, split, features, cache_dir, keep_in_memory, columns, **kwargs)
1071 from .io.parquet import ParquetDatasetReader
1072
-> 1073 return ParquetDatasetReader(
1074 path_or_paths,
1075 split=split,
[/usr/local/lib/python3.8/dist-packages/datasets/io/parquet.py](https://localhost:8080/#) in __init__(self, path_or_paths, split, features, cache_dir, keep_in_memory, streaming, **kwargs)
35 path_or_paths = path_or_paths if isinstance(path_or_paths, dict) else {self.split: path_or_paths}
36 hash = _PACKAGED_DATASETS_MODULES["parquet"][1]
---> 37 self.builder = Parquet(
38 cache_dir=cache_dir,
39 data_files=path_or_paths,
[/usr/local/lib/python3.8/dist-packages/datasets/builder.py](https://localhost:8080/#) in __init__(self, cache_dir, config_name, hash, base_path, info, features, use_auth_token, repo_id, data_files, data_dir, name, **config_kwargs)
298
299 if data_files is not None and not isinstance(data_files, DataFilesDict):
--> 300 data_files = DataFilesDict.from_local_or_remote(
301 sanitize_patterns(data_files), base_path=base_path, use_auth_token=use_auth_token
302 )
[/usr/local/lib/python3.8/dist-packages/datasets/data_files.py](https://localhost:8080/#) in from_local_or_remote(cls, patterns, base_path, allowed_extensions, use_auth_token)
794 for key, patterns_for_key in patterns.items():
795 out[key] = (
--> 796 DataFilesList.from_local_or_remote(
797 patterns_for_key,
798 base_path=base_path,
[/usr/local/lib/python3.8/dist-packages/datasets/data_files.py](https://localhost:8080/#) in from_local_or_remote(cls, patterns, base_path, allowed_extensions, use_auth_token)
762 ) -> "DataFilesList":
763 base_path = base_path if base_path is not None else str(Path().resolve())
--> 764 data_files = resolve_patterns_locally_or_by_urls(base_path, patterns, allowed_extensions)
765 origin_metadata = _get_origin_metadata_locally_or_by_urls(data_files, use_auth_token=use_auth_token)
766 return cls(data_files, origin_metadata)
[/usr/local/lib/python3.8/dist-packages/datasets/data_files.py](https://localhost:8080/#) in resolve_patterns_locally_or_by_urls(base_path, patterns, allowed_extensions)
357 data_files = []
358 for pattern in patterns:
--> 359 if is_remote_url(pattern):
360 data_files.append(Url(pattern))
361 else:
[/usr/local/lib/python3.8/dist-packages/datasets/utils/file_utils.py](https://localhost:8080/#) in is_remote_url(url_or_filename)
62
63 def is_remote_url(url_or_filename: str) -> bool:
---> 64 parsed = urlparse(url_or_filename)
65 return parsed.scheme in ("http", "https", "s3", "gs", "hdfs", "ftp")
66
[/usr/lib/python3.8/urllib/parse.py](https://localhost:8080/#) in urlparse(url, scheme, allow_fragments)
373 Note that we don't break the components up in smaller bits
374 (e.g. netloc is a single string) and we don't expand % escapes."""
--> 375 url, scheme, _coerce_result = _coerce_args(url, scheme)
376 splitresult = urlsplit(url, scheme, allow_fragments)
377 scheme, netloc, url, query, fragment = splitresult
[/usr/lib/python3.8/urllib/parse.py](https://localhost:8080/#) in _coerce_args(*args)
125 if str_input:
126 return args + (_noop,)
--> 127 return _decode_args(args) + (_encode_result,)
128
129 # Result objects are more helpful than simple tuples
[/usr/lib/python3.8/urllib/parse.py](https://localhost:8080/#) in _decode_args(args, encoding, errors)
109 def _decode_args(args, encoding=_implicit_encoding,
110 errors=_implicit_errors):
--> 111 return tuple(x.decode(encoding, errors) if x else '' for x in args)
112
113 def _coerce_args(*args):
[/usr/lib/python3.8/urllib/parse.py](https://localhost:8080/#) in <genexpr>(.0)
109 def _decode_args(args, encoding=_implicit_encoding,
110 errors=_implicit_errors):
--> 111 return tuple(x.decode(encoding, errors) if x else '' for x in args)
112
113 def _coerce_args(*args):
AttributeError: 'PosixPath' object has no attribute 'decode'
```
@mariosasko Should I create a new issue? | [
-0.2030874788761139,
-0.1410224735736847,
0.011913791298866272,
0.17528721690177917,
0.22994039952754974,
-0.05431585758924484,
0.017584048211574554,
0.05332110822200775,
0.007895398885011673,
-0.029454290866851807,
0.1882508248090744,
0.7056482434272766,
-0.28169843554496765,
0.11585428565740585,
-0.10242389887571335,
-0.16527500748634338,
0.08595174551010132,
-0.1068824827671051,
0.05902032554149628,
-0.041435226798057556,
-0.20867225527763367,
0.14839331805706024,
-0.13709470629692078,
0.00034292787313461304,
0.22812657058238983,
-0.19859899580478668,
-0.07812546193599701,
0.07830889523029327,
0.016146674752235413,
-0.4278160035610199,
0.1324242204427719,
0.09179549664258957,
-0.03339209407567978,
0.23763391375541687,
-0.0001102026435546577,
-0.11527213454246521,
0.5466265678405762,
0.006229886785149574,
-0.14189735054969788,
-0.31860607862472534,
-0.18513047695159912,
-0.10506589710712433,
0.5078597664833069,
-0.15015842020511627,
-0.07645055651664734,
-0.23396368324756622,
-0.12270605564117432,
-0.48547959327697754,
0.2352287322282791,
0.3113119304180145,
0.16115961968898773,
0.33402782678604126,
0.24371202290058136,
-0.2741125524044037,
0.3567275404930115,
0.24707850813865662,
-0.1656206250190735,
-0.025556016713380814,
0.5820097923278809,
0.14354091882705688,
0.19171354174613953,
0.07169963419437408,
-0.0849890410900116,
-0.17909684777259827,
0.29688122868537903,
0.14064176380634308,
0.13453322649002075,
0.026186279952526093,
-0.2782983183860779,
0.1966204047203064,
0.12692584097385406,
-0.24127057194709778,
-0.3313237130641937,
-0.30801641941070557,
-0.19402822852134705,
-0.16453607380390167,
0.13856494426727295,
0.06690815091133118,
-0.09678423404693604,
0.02211782895028591,
0.1803659349679947,
0.24987369775772095,
-0.09371575713157654,
0.25730711221694946,
0.08299024403095245,
-0.0029284805059432983,
-0.2065185159444809,
0.2263481318950653,
0.25298798084259033,
-0.3761819005012512,
-0.2748411297798157,
-0.2516500651836395,
0.10347042977809906,
0.16065451502799988,
-0.22181792557239532,
-0.18491587042808533,
0.0013969317078590393,
0.13796481490135193,
0.34516507387161255,
0.1713372766971588,
-0.10528746992349625,
0.11912745982408524,
-0.11186255514621735,
0.08357083797454834,
0.48740360140800476,
0.0362376943230629,
-0.08657284826040268,
0.0904574766755104,
-0.3190158009529114,
0.3136710226535797,
0.07867495715618134,
-0.06601040810346603,
0.2465522289276123,
-0.10787861794233322,
-0.09438569843769073,
0.015240460634231567,
0.2894957661628723,
-0.16732291877269745,
-0.3295137584209442,
0.06819219887256622,
-0.1311403214931488,
-0.07362300902605057,
0.24921146035194397,
0.5178279280662537,
-0.03315882384777069,
0.06807300448417664,
-0.09811946749687195,
0.2996109127998352,
0.15539613366127014,
-0.1682455986738205,
-0.2812212109565735,
0.1329997032880783,
-0.1312941163778305,
-0.14099030196666718,
-0.048673469573259354,
-0.06666421890258789,
0.07294042408466339,
0.28680849075317383,
0.5066787600517273,
0.10987216234207153,
-0.07060804963111877,
-0.2355337142944336,
0.3630064129829407,
-0.2226296216249466,
-0.339792937040329,
0.059492580592632294,
0.46599745750427246,
-0.015832629054784775,
-0.3420983552932739,
-0.2513267993927002,
-0.386746346950531,
-0.2580728232860565,
-0.1263759285211563,
0.12818896770477295,
0.024418268352746964,
-0.03156138211488724,
-0.5234134197235107,
-0.04732098802924156,
0.06742355227470398,
0.1444220393896103,
-0.17138031125068665,
-0.09565748274326324,
0.09800693392753601,
-0.2837940454483032,
0.015144499018788338,
0.1611316204071045,
0.16517241299152374,
-0.10234315693378448,
-0.17439037561416626,
0.049257729202508926,
0.5092448592185974,
0.3420567214488983,
-0.21303986012935638,
-0.24497419595718384,
-0.3141986131668091,
0.18776656687259674,
0.4422511160373688,
-0.10672762989997864,
0.22628256678581238,
0.42904549837112427,
0.08466944098472595,
0.29366761445999146,
0.1781969666481018,
-0.26295703649520874,
0.2758472263813019,
-0.436280757188797,
0.18564468622207642,
-0.0857624039053917,
0.02188846468925476,
0.06955526024103165,
-0.3192043900489807,
-0.43902093172073364,
0.1042998731136322,
-0.1700601577758789,
-0.38273927569389343,
-0.010026343166828156,
0.049764808267354965,
-0.2291099578142166,
0.3592071235179901,
-0.26744696497917175,
-0.11217173933982849,
0.2560803294181824,
0.1972942352294922,
0.31496647000312805,
-0.147751584649086,
-0.2246464192867279,
-0.522102415561676,
0.007405027747154236,
-0.08581060916185379,
-0.03303212672472,
-0.33698540925979614,
-0.2967461347579956,
-0.16853460669517517,
0.15690526366233826,
-0.13777965307235718,
0.10837553441524506,
0.20332235097885132,
0.31291642785072327,
-0.04771588742733002,
-0.08038879930973053,
-0.11273004859685898,
0.037151336669921875,
-0.439757764339447,
-0.07376804947853088,
-0.2220333218574524,
0.29319316148757935,
0.060801245272159576,
-0.17939431965351105,
0.08934295177459717,
0.3003316819667816,
0.2196195423603058,
-0.01601129211485386,
0.22948208451271057,
0.26986655592918396,
0.43207138776779175,
0.06065969169139862,
-0.30302396416664124,
0.19814743101596832,
-0.02225060574710369,
-0.10882053524255753,
-0.2764550745487213,
0.12943816184997559,
0.02181612327694893,
0.13234880566596985,
-0.2534157335758209,
0.43180131912231445,
-0.05531807616353035,
0.3414689600467682,
-0.01864606887102127,
-0.026502875611186028,
0.21627604961395264,
0.2992430627346039,
-0.379506915807724,
-0.2935390770435333,
0.09452777355909348,
0.38288983702659607,
0.02989393100142479,
-0.0028225015848875046,
-0.6685479283332825,
-0.051813267171382904,
0.36546215415000916,
0.15900307893753052,
0.16674086451530457,
0.19308465719223022,
0.20944052934646606,
-0.02093263529241085,
-0.025759397074580193,
0.08300787210464478,
0.23386606574058533,
0.2936341166496277,
-0.059858571738004684,
-0.23737704753875732,
-0.2627222239971161,
-0.01749781146645546,
0.23733893036842346,
0.300790399312973,
0.08108551055192947,
-0.1922096610069275,
0.2794399857521057,
-0.05578484758734703,
-0.12052619457244873,
-0.11798489093780518,
-0.265688955783844,
0.041241638362407684,
-0.3981871008872986,
0.16538886725902557,
-0.45551252365112305,
-0.052443698048591614,
-0.2783762514591217,
0.007426534779369831,
-0.15434630215168,
-0.39235538244247437,
-0.2693353295326233,
0.08726286888122559,
-0.2079954445362091,
0.3184469938278198,
0.12259317934513092,
0.0782681405544281,
0.09368236362934113,
-0.4008203446865082,
-0.04346735030412674,
-0.08692213147878647,
-0.11892657727003098,
0.12051792442798615,
0.22507406771183014,
-0.11888374388217926,
0.2804429531097412,
0.02570715732872486,
-0.1622355729341507,
-0.43058642745018005,
-0.2484615445137024,
0.21845172345638275,
-0.1954878717660904,
0.019061226397752762,
0.5680441856384277,
0.13208919763565063,
0.0059325918555259705,
-0.5357127785682678,
0.2688875198364258,
0.026659240946173668,
-0.19326293468475342,
0.0740436390042305,
0.02581263892352581,
0.03555576503276825,
-0.08421337604522705,
-0.11706637591123581,
-0.024182414636015892,
-0.3781414330005646,
0.5313284993171692,
0.4508023262023926,
0.10234136879444122,
-0.045900315046310425,
-0.02305535599589348,
0.08780116587877274,
-0.4409629702568054,
0.477588951587677,
-0.2720922529697418,
-0.04140862450003624,
0.15796500444412231,
0.13194629549980164,
-0.23157350718975067,
-0.050628501921892166,
-0.23336581885814667,
0.05061032250523567,
0.11691271513700485,
-0.03032265603542328,
-0.4516774117946625,
-0.03252936154603958,
0.04519742354750633,
0.001706741750240326,
0.0824904814362526,
0.318534791469574,
0.04207771643996239,
-0.11657829582691193,
-0.10497400164604187,
-0.0009183119982481003,
0.20612624287605286,
0.04437236487865448,
0.254803329706192,
0.3707248568534851,
0.3553447425365448,
0.031177032738924026,
0.2851155400276184,
0.4209878146648407,
-0.31832361221313477,
0.3194289207458496,
-0.20212353765964508,
0.09336062520742416,
-0.3789486885070801,
-0.22104088962078094,
-0.11814476549625397,
-0.14650973677635193,
0.032380715012550354,
0.11867472529411316,
-0.2208186686038971,
-0.10062861442565918,
0.140381321310997,
0.2791573703289032,
-0.0011865943670272827,
-0.36158308386802673,
0.02784794010221958,
0.2370653599500656,
0.19998882710933685,
-0.07509166747331619,
-0.06776363402605057,
-0.18443436920642853,
-0.056298062205314636,
0.22276344895362854,
0.32119932770729065,
0.08296303451061249,
-0.20615755021572113,
-0.26469185948371887,
0.1251191794872284,
-0.30641090869903564,
0.3962025046348572,
0.19876109063625336,
0.18491418659687042,
0.05032987520098686,
-0.4155668318271637,
-0.1398659199476242,
0.09109456837177277,
0.5331657528877258,
-0.11789572983980179,
-0.1861443817615509,
0.15211676061153412,
-0.05016571283340454,
-0.32456523180007935,
0.13898833096027374,
-0.4161679446697235,
-0.05801253020763397,
-0.04544129595160484,
0.5337913036346436,
-0.799766480922699,
-0.27999746799468994,
-0.022427167743444443,
0.12746542692184448,
0.19255244731903076,
0.2420036643743515,
-0.270170122385025,
0.041098929941654205,
-0.32213616371154785,
0.10945877432823181,
0.3085978925228119,
0.33568066358566284,
0.03624913841485977,
0.15786954760551453,
-0.20802295207977295,
-0.1504165679216385,
-0.00734662264585495,
-0.04396653175354004,
0.7986945509910583,
-0.08984410762786865,
-0.006390269845724106,
-0.2691642642021179,
0.637014627456665,
0.3820084035396576,
0.23659798502922058,
-0.20420531928539276,
-0.5895353555679321,
0.07580401003360748,
-0.3678967356681824,
0.1571749597787857,
0.1544783115386963,
-0.23189286887645721,
0.2887076139450073,
-0.0650983601808548,
0.07145408540964127,
-0.30918440222740173,
0.07745299488306046,
0.4487321078777313,
-0.23944981396198273,
-0.023469947278499603,
-0.5082976818084717,
0.36081191897392273,
0.2677675783634186,
-0.1760079711675644,
0.2622607350349426,
0.37153899669647217,
-0.3389797508716583,
0.4065926671028137,
0.4544239938259125,
0.850272536277771,
0.21795696020126343,
0.09493367373943329,
0.46829313039779663,
-0.006903663277626038,
0.41138017177581787,
0.3269617557525635,
0.005785731598734856,
-0.17749877274036407,
-0.05610785633325577,
-0.029879294335842133,
-0.26989316940307617,
0.16718599200248718,
0.1629246324300766,
-0.5240278840065002,
0.08471165597438812,
-0.006306730210781097,
0.17512331902980804,
-0.13358984887599945,
0.16260969638824463,
-0.10622347146272659,
-0.24589625000953674,
-0.5297647714614868,
0.06618544459342957,
0.13516110181808472,
-0.3130621910095215,
0.011691948398947716,
-0.22645069658756256,
-0.010372228920459747,
-0.37827402353286743,
-0.29707062244415283,
-0.18724119663238525,
-0.3124329149723053,
0.01316211000084877,
0.20799170434474945,
-0.14900773763656616,
0.3665151000022888,
0.1717575490474701,
0.2236299216747284,
-0.021493013948202133,
-0.13227887451648712,
-0.17725785076618195,
0.005658172070980072,
0.1874241828918457,
-0.22766369581222534,
-0.3294667899608612,
0.06583867222070694,
0.11050606518983841,
0.20215439796447754,
-0.0038382038474082947,
-0.18037305772304535,
-0.3739390969276428,
-0.13313937187194824,
0.14599210023880005,
0.22369424998760223,
-0.3003351390361786,
-0.35115134716033936,
0.08308165520429611,
-0.1959521323442459,
-0.06456421315670013,
0.10234686732292175,
0.19653289020061493,
-0.09553898125886917,
0.08679727464914322,
0.11587287485599518,
-0.05022859945893288,
-0.15032823383808136,
0.11309260874986649,
-0.027315527200698853,
0.04012046754360199,
0.3866281807422638,
0.20325179398059845,
-0.33331727981567383,
-0.27629339694976807,
0.006410084664821625,
0.29985588788986206,
-0.36613866686820984,
0.2302200049161911,
-0.04728153720498085,
-0.21795427799224854,
0.1332068294286728,
0.6884278655052185,
0.07090061157941818,
0.3363649249076843,
-0.06676237285137177,
-0.16108834743499756,
-0.040535472333431244,
0.47546929121017456,
-0.13780620694160461,
0.20894815027713776,
0.006834428757429123,
0.2072553187608719,
-0.1542186588048935,
-0.44833794236183167,
-0.35268962383270264,
-0.03336573392152786,
-0.21900536119937897,
0.1184365525841713,
0.15812934935092926,
0.04067087918519974,
0.46825501322746277,
0.07710416615009308,
0.16323234140872955,
0.12853500247001648,
-0.13267260789871216,
-0.1799284815788269,
0.041905101388692856,
0.11191166937351227,
-0.13036897778511047,
0.19821150600910187,
-0.03710472583770752,
-0.07545298337936401,
-0.08839181065559387,
-0.23775696754455566,
0.07761165499687195,
-0.16370318830013275,
-0.17391276359558105,
-0.07679248601198196,
0.47408726811408997,
0.1164281889796257,
-0.14284531772136688,
-0.268067866563797,
-0.1653464436531067,
-0.09444168210029602,
0.049332983791828156,
-0.040053002536296844,
-0.32941168546676636,
-0.06255734711885452,
0.2428387552499771,
0.3614863157272339,
0.08086545020341873,
0.25470656156539917,
0.14826606214046478,
-0.010073304176330566,
-0.5274479985237122,
0.19106124341487885,
0.509425163269043,
0.283047080039978,
-0.03919348865747452,
-0.2756060063838959,
0.10574069619178772,
0.1756015419960022,
-0.19696296751499176,
-0.20814652740955353,
0.08696043491363525,
0.06132959574460983,
0.36845269799232483,
0.5124986171722412,
-0.1086983010172844,
0.12155976891517639,
0.1196160688996315,
-0.028108373284339905,
0.41668012738227844,
-0.2794191837310791,
0.3002438247203827,
0.2436470240354538,
0.20724497735500336,
-0.018860328942537308,
0.0285294558852911,
0.2856725752353668,
0.31811872124671936,
-0.05866331607103348,
-0.06484069675207138,
0.15104056894779205,
0.3404069244861603,
-0.020506780594587326,
0.2810330092906952,
-0.14419884979724884,
0.13760891556739807,
0.44833269715309143,
0.23451603949069977,
0.09123599529266357,
0.15768888592720032,
0.25754570960998535,
0.19565851986408234,
-0.3679192066192627,
-0.15035143494606018,
0.11044853925704956,
0.008601957932114601,
-0.19548067450523376,
-0.1262434422969818,
-0.28129810094833374,
-0.2301834225654602,
-0.4027511477470398,
0.021166572347283363,
-0.18769510090351105,
0.1715506762266159,
-0.20322005450725555,
0.6086530089378357,
-0.36251530051231384,
-0.017245791852474213,
-0.05214957892894745,
0.4659387767314911,
-0.07524894177913666,
0.24231630563735962,
0.12991133332252502,
0.009344741702079773,
0.17631787061691284,
0.08770987391471863,
0.31003811955451965,
0.28962427377700806,
0.2521143853664398,
-0.19287221133708954,
0.03355890139937401,
-0.059052854776382446,
0.000888187438249588,
-0.1473429650068283,
-0.15262985229492188,
-0.17207364737987518,
0.4958156645298004,
0.1914147436618805,
-0.06360817700624466,
0.1464679092168808,
-0.07561205327510834,
0.003987118601799011,
-0.2614823877811432,
0.6293074488639832,
-0.054594457149505615,
0.03117670863866806,
-0.02350175380706787,
0.09929230809211731,
-0.2973082661628723,
-0.05905444920063019,
0.002941122278571129,
0.12651456892490387,
0.1822810173034668,
0.2266356498003006,
0.12364298105239868,
0.2782300114631653,
0.22192104160785675,
0.18903687596321106,
-0.1780557930469513,
-0.23101277649402618,
-0.24532091617584229,
-0.3872886300086975,
0.09859930723905563,
-0.07801316678524017,
-0.1928083300590515,
0.29472172260284424,
0.4392843246459961,
0.27828413248062134,
0.3009676933288574,
0.1458313763141632,
-0.0663360133767128,
-0.16527409851551056,
0.21530070900917053,
-0.319670706987381,
-0.1664833426475525,
0.38124293088912964,
-0.09740877896547318,
0.10055015981197357,
-0.04595180228352547,
-0.044325511902570724,
0.055007729679346085,
0.15990787744522095,
-0.031844593584537506,
-0.06919032335281372,
-0.34285837411880493,
-0.11722399294376373,
-0.14696857333183289,
0.21701686084270477,
-0.12134937942028046,
-0.1304457187652588,
-0.24702206254005432,
-0.05955749377608299,
-0.33951547741889954,
-0.008269481360912323,
0.5439873933792114,
-0.18798145651817322,
0.3111099302768707,
-0.14428415894508362,
0.015193764120340347,
-0.3233795166015625,
-0.0874769315123558,
0.15412333607673645,
-0.24400891363620758,
-0.4966824948787689,
0.5437154769897461,
0.04615186154842377,
-0.09462630748748779,
-0.36980581283569336,
0.23692303895950317,
0.1561463624238968,
0.14780905842781067,
0.1282704621553421,
-0.3975001871585846,
0.5763635635375977,
-0.42481815814971924,
-0.24985124170780182,
0.02950136363506317,
0.1113259419798851,
-0.00687766820192337,
-0.0435812771320343,
-0.3158411681652069,
-0.13024720549583435,
0.27782994508743286,
0.06972740590572357,
-0.08656060695648193,
-0.1297963261604309,
0.01525962259620428,
-0.08216629177331924,
-0.21948754787445068,
0.01531510055065155,
0.09344074130058289,
-0.04729294776916504,
0.1574247032403946,
-0.3361402153968811
] |
https://github.com/huggingface/datasets/issues/5354 | Consider using "Sequence" instead of "List" | @avinashsai Hi, I've assigned you the issue.
@tranhd95 Yes, feel free to report this in a new issue. | ### Feature request
Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below.
**How to reproduce**
```py
list_of_filenames = ["foo.parquet", "bar.parquet"]
ds = Dataset.from_parquet(list_of_filenames)
```
**Expected mypy output:**
```
Success: no issues found
```
**Actual mypy output:**
```py
test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type]
test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
test.py:19: note: Consider using "Sequence" instead, which is covariant
```
**Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1 | 18 | Consider using "Sequence" instead of "List"
### Feature request
Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below.
**How to reproduce**
```py
list_of_filenames = ["foo.parquet", "bar.parquet"]
ds = Dataset.from_parquet(list_of_filenames)
```
**Expected mypy output:**
```
Success: no issues found
```
**Actual mypy output:**
```py
test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type]
test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
test.py:19: note: Consider using "Sequence" instead, which is covariant
```
**Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1
@avinashsai Hi, I've assigned you the issue.
@tranhd95 Yes, feel free to report this in a new issue. | [
-0.2621647119522095,
-0.08718342334032059,
0.0008164048194885254,
0.17863884568214417,
0.30044102668762207,
-0.04939528927206993,
0.13694769144058228,
0.20783884823322296,
0.025842078030109406,
0.05628248304128647,
0.21992896497249603,
0.6769357919692993,
-0.1844073086977005,
0.19362172484397888,
-0.12086497247219086,
-0.08035272359848022,
0.04631383344531059,
-0.049817293882369995,
0.05270681157708168,
-0.09214390814304352,
-0.21026355028152466,
0.14265285432338715,
-0.1723370999097824,
0.06643684953451157,
0.1459258645772934,
-0.2367311418056488,
-0.07748518884181976,
0.1139238029718399,
-0.06626106053590775,
-0.3749940097332001,
0.2173500508069992,
0.02232849784195423,
-0.06827180832624435,
0.22331225872039795,
-0.0001060011563822627,
-0.12152557075023651,
0.42910856008529663,
-0.024769634008407593,
-0.20608080923557281,
-0.29854321479797363,
0.010331004858016968,
-0.12143295258283615,
0.3816360533237457,
-0.12737317383289337,
-0.05775335058569908,
-0.40577811002731323,
-0.2421926110982895,
-0.4630890488624573,
0.20403221249580383,
0.300410658121109,
0.21833617985248566,
0.3223022222518921,
0.2445249706506729,
-0.2720804214477539,
0.3688032627105713,
0.18136101961135864,
-0.09503551572561264,
-0.09123450517654419,
0.40110212564468384,
0.0007070302963256836,
0.1814558207988739,
0.05443023890256882,
-0.08238436281681061,
-0.06697769463062286,
0.12403583526611328,
0.1958792358636856,
0.08861809968948364,
-0.0555485337972641,
-0.16150930523872375,
0.23909741640090942,
0.23024076223373413,
-0.2635304629802704,
-0.28845205903053284,
-0.2667175531387329,
-0.1498870551586151,
-0.1437814086675644,
0.1755160242319107,
0.17024481296539307,
-0.08561693131923676,
0.03081239014863968,
0.24077089130878448,
0.26544079184532166,
-0.0663343071937561,
0.2509918212890625,
0.05411031097173691,
-0.08887647092342377,
-0.18887752294540405,
0.24541610479354858,
0.18440856039524078,
-0.401650071144104,
-0.2415415644645691,
-0.2459595501422882,
-0.03300319239497185,
0.07135636359453201,
-0.3260127305984497,
-0.18501310050487518,
0.009610727429389954,
0.03300348296761513,
0.3122062385082245,
0.14373824000358582,
-0.15336067974567413,
0.09965088963508606,
-0.0495462492108345,
0.20398512482643127,
0.5488956570625305,
-0.029465466737747192,
-0.09548135846853256,
0.2007623016834259,
-0.25539207458496094,
0.13682837784290314,
-0.0037907324731349945,
-0.09534341841936111,
0.29560232162475586,
-0.18458999693393707,
0.004208844155073166,
-0.08529791235923767,
0.4370219111442566,
-0.23803895711898804,
-0.38578978180885315,
0.14767175912857056,
-0.05889810249209404,
-0.056642502546310425,
0.21592704951763153,
0.48769548535346985,
-0.0009691441664472222,
0.11779391020536423,
-0.06545524299144745,
0.29051387310028076,
0.04695836454629898,
-0.14305175840854645,
-0.31684744358062744,
0.18039387464523315,
-0.06736449897289276,
-0.1929711401462555,
0.0251978300511837,
-0.04952342435717583,
0.05187895894050598,
0.3508875072002411,
0.45856618881225586,
0.08609533309936523,
0.033086955547332764,
-0.3072636127471924,
0.29515472054481506,
-0.14336054027080536,
-0.1938752979040146,
0.0719911977648735,
0.47947078943252563,
-0.08363064378499985,
-0.3027334213256836,
-0.2470826506614685,
-0.40255776047706604,
-0.1543441265821457,
-0.08417513221502304,
0.2018641233444214,
0.0465153306722641,
-0.0538836270570755,
-0.578603982925415,
-0.0672052800655365,
0.08205519616603851,
0.10136650502681732,
-0.19820362329483032,
-0.18197469413280487,
0.1411723494529724,
-0.3390500545501709,
0.01547246240079403,
0.1831117570400238,
-0.07749959826469421,
-0.03861027956008911,
-0.11052662879228592,
0.004703458398580551,
0.41693854331970215,
0.3162592053413391,
-0.24456621706485748,
-0.21266567707061768,
-0.29996246099472046,
0.14326231181621552,
0.5063993334770203,
-0.10481496155261993,
0.1174035593867302,
0.30984222888946533,
0.051462285220623016,
0.10234033316373825,
0.06321459263563156,
-0.2878707945346832,
0.37891680002212524,
-0.3319110572338104,
0.011411152780056,
0.03262149542570114,
-0.03228331357240677,
0.11480129510164261,
-0.3366566598415375,
-0.30351513624191284,
0.1448969841003418,
-0.0869104415178299,
-0.31291353702545166,
-0.06718050688505173,
0.12038324028253555,
-0.24430230259895325,
0.24538454413414001,
-0.26765191555023193,
-0.012803437188267708,
0.17217393219470978,
0.3377259075641632,
0.2629568576812744,
-0.04272006079554558,
-0.24051672220230103,
-0.4554291367530823,
0.011759955435991287,
0.06466555595397949,
-0.04481588304042816,
-0.32983988523483276,
-0.21941153705120087,
-0.10703791677951813,
0.14540033042430878,
-0.15224921703338623,
0.07810588926076889,
0.2772236764431,
0.2883870005607605,
-0.08277789503335953,
-0.05295386165380478,
-0.15445761382579803,
0.056298673152923584,
-0.3798747956752777,
-0.09995068609714508,
-0.17962750792503357,
0.38411760330200195,
0.04424751549959183,
-0.2774910032749176,
0.10371246933937073,
0.1640494465827942,
0.2917512059211731,
0.008770100772380829,
0.1593870222568512,
0.2783079445362091,
0.34490618109703064,
0.004380971193313599,
-0.09895258396863937,
0.09550319612026215,
-0.09180036187171936,
-0.1746215969324112,
-0.16941747069358826,
0.06109006702899933,
0.10480128973722458,
0.12775316834449768,
-0.18760064244270325,
0.4688827395439148,
-0.05354675278067589,
0.25441843271255493,
-0.025984611362218857,
0.02449527196586132,
0.28504759073257446,
0.22638151049613953,
-0.22496382892131805,
-0.22926591336727142,
0.026845881715416908,
0.24428869783878326,
0.02888185903429985,
-0.033243827521800995,
-0.6476359367370605,
0.05292873829603195,
0.5127435326576233,
0.1434561312198639,
0.2075824737548828,
0.1651778221130371,
0.1782606691122055,
0.017764363437891006,
-0.134317085146904,
0.158150777220726,
0.28489309549331665,
0.30276793241500854,
-0.08496078848838806,
-0.2020712047815323,
-0.23886926472187042,
0.005570497363805771,
0.2418915331363678,
0.236053928732872,
0.0027511941734701395,
-0.130905419588089,
0.2495671510696411,
-0.11202017217874527,
-0.20041382312774658,
-0.03484965115785599,
-0.20006220042705536,
0.1140800192952156,
-0.35484638810157776,
0.21446995437145233,
-0.5113261938095093,
0.10492262989282608,
-0.2953008711338043,
0.05717087537050247,
-0.06280209124088287,
-0.3617804944515228,
-0.24758364260196686,
0.10557891428470612,
-0.1768258661031723,
0.28859126567840576,
0.1421845704317093,
0.11561991274356842,
0.18688298761844635,
-0.33089160919189453,
-0.0006168261170387268,
-0.12391088902950287,
-0.22911757230758667,
0.16902224719524384,
0.20967330038547516,
-0.04990046098828316,
0.33599981665611267,
0.06192412227392197,
-0.06585121154785156,
-0.523892879486084,
-0.1618345081806183,
0.18012791872024536,
-0.28887391090393066,
0.0901077538728714,
0.4786544442176819,
0.18013766407966614,
-0.07884678989648819,
-0.44228556752204895,
0.33075466752052307,
-0.10860913246870041,
-0.180522158741951,
0.19223196804523468,
0.09424395114183426,
-0.07496073842048645,
-0.09718124568462372,
-0.2634543776512146,
-0.1246364489197731,
-0.344369113445282,
0.38319534063339233,
0.3522877097129822,
0.08883626013994217,
-0.1569441854953766,
0.08141119033098221,
0.0541461706161499,
-0.402177095413208,
0.40219846367836,
-0.3021696209907532,
-0.10525572299957275,
0.17253819108009338,
0.08873913437128067,
-0.28705018758773804,
0.0348137803375721,
-0.188343346118927,
-0.002502851188182831,
0.12361803650856018,
-0.0602184496819973,
-0.37478160858154297,
-0.0012900959700345993,
0.06190112605690956,
-0.03007376939058304,
0.1510552018880844,
0.2772503197193146,
0.0796680748462677,
-0.15554462373256683,
-0.2404816746711731,
-0.011522913351655006,
0.16296504437923431,
0.11566171050071716,
0.23995745182037354,
0.1993873417377472,
0.37756794691085815,
0.01659059152007103,
0.3493872880935669,
0.33719611167907715,
-0.2968485951423645,
0.3553513288497925,
-0.17867977917194366,
0.1773659586906433,
-0.29558265209198,
-0.3377322554588318,
-0.07535204291343689,
-0.11704930663108826,
0.05343957990407944,
0.15095412731170654,
-0.2821178734302521,
-0.13990359008312225,
0.052737146615982056,
0.2821246385574341,
-0.14276492595672607,
-0.33917394280433655,
0.02910595014691353,
0.33877769112586975,
0.14334776997566223,
-0.04093308001756668,
-0.02487805113196373,
-0.23593634366989136,
-0.028853246942162514,
0.1417083740234375,
0.22399365901947021,
-0.027475371956825256,
-0.2362596094608307,
-0.308308869600296,
0.08106434345245361,
-0.11638142913579941,
0.39660537242889404,
0.06244651973247528,
0.18908162415027618,
0.03997138515114784,
-0.39994993805885315,
-0.18333186209201813,
0.03183363750576973,
0.6463867425918579,
-0.21708084642887115,
-0.12473006546497345,
0.19034792482852936,
-0.004966571927070618,
-0.34504637122154236,
0.0325763113796711,
-0.48680922389030457,
-0.04184882342815399,
-0.08021163940429688,
0.3983393609523773,
-0.7736865878105164,
-0.23803888261318207,
0.03374553844332695,
0.1598779410123825,
0.12200643122196198,
0.22780568897724152,
-0.2987461984157562,
0.011054456233978271,
-0.36757132411003113,
0.11940230429172516,
0.19745756685733795,
0.322214275598526,
-0.10045526921749115,
0.1050703227519989,
-0.2926459312438965,
-0.09684683382511139,
0.058723293244838715,
0.037480052560567856,
0.8122414946556091,
-0.12294626981019974,
0.04838184639811516,
-0.2807987332344055,
0.5477871894836426,
0.513166606426239,
0.30919158458709717,
-0.091668039560318,
-0.589968740940094,
0.10644518584012985,
-0.386563241481781,
0.1437138468027115,
0.0812351256608963,
-0.3297387957572937,
0.24227669835090637,
-0.21901017427444458,
0.14780667424201965,
-0.27107417583465576,
0.04981782287359238,
0.4995388388633728,
-0.18965043127536774,
-0.08902308344841003,
-0.5138902068138123,
0.35767731070518494,
0.16494318842887878,
-0.11596222221851349,
0.328794002532959,
0.29505980014801025,
-0.21548011898994446,
0.5077584385871887,
0.3135118782520294,
0.7759166955947876,
0.16375790536403656,
-0.04165251925587654,
0.47057217359542847,
0.014819137752056122,
0.3624024987220764,
0.15632963180541992,
0.03879426047205925,
-0.28044670820236206,
-0.1467696875333786,
-0.022062931209802628,
-0.2782588005065918,
0.24647343158721924,
0.23320640623569489,
-0.5234225988388062,
0.16954317688941956,
0.02416403591632843,
0.11377544701099396,
-0.16560016572475433,
0.24762216210365295,
-0.0356905460357666,
-0.21645429730415344,
-0.5390291810035706,
0.167815163731575,
0.09500681608915329,
-0.29991912841796875,
0.02477055788040161,
-0.20593087375164032,
-0.055240437388420105,
-0.4370574355125427,
-0.27441316843032837,
-0.06229957193136215,
-0.16120168566703796,
0.04659731686115265,
0.21782873570919037,
-0.11449845880270004,
0.31486985087394714,
0.100761279463768,
0.19087934494018555,
0.08486808091402054,
-0.10121732950210571,
-0.10662104189395905,
0.017161909490823746,
0.15768365561962128,
-0.18234893679618835,
-0.21343350410461426,
0.09603936970233917,
0.0893346443772316,
0.022024624049663544,
-0.010253190994262695,
-0.07951628416776657,
-0.2621668577194214,
-0.06775332987308502,
0.14013445377349854,
0.18025535345077515,
-0.4719694256782532,
-0.31019824743270874,
-0.07810719311237335,
-0.1981358528137207,
-0.1729578822851181,
0.15540269017219543,
0.1835859715938568,
-0.11392536759376526,
0.22430413961410522,
0.13696785271167755,
-0.05572402477264404,
-0.1092536449432373,
0.11303479969501495,
-0.09547119587659836,
0.1681261658668518,
0.4140668511390686,
0.22209645807743073,
-0.2849646806716919,
-0.33680835366249084,
-0.034602344036102295,
0.22395852208137512,
-0.3936846852302551,
0.3014633059501648,
-0.008247822523117065,
-0.13118432462215424,
0.19334128499031067,
0.5272523164749146,
0.05328257754445076,
0.31942135095596313,
-0.02594449184834957,
-0.24690711498260498,
0.04394789785146713,
0.3573727011680603,
-0.10151274502277374,
0.14775261282920837,
0.06300331652164459,
0.14607608318328857,
-0.11200018972158432,
-0.35811421275138855,
-0.40108612179756165,
0.03372906893491745,
-0.2675277292728424,
0.23137788474559784,
0.13162167370319366,
-0.03024083375930786,
0.3817526400089264,
0.05345568060874939,
0.22741472721099854,
0.08233508467674255,
-0.1420399397611618,
-0.2519487142562866,
0.09257897734642029,
0.0710250586271286,
-0.16325542330741882,
0.23754863440990448,
-0.12015052884817123,
-0.11196029931306839,
-0.09072980284690857,
-0.23895412683486938,
0.0709463506937027,
-0.23932573199272156,
-0.20034106075763702,
-0.03464330732822418,
0.4414221942424774,
0.012513842433691025,
-0.11144714802503586,
-0.22421663999557495,
-0.2228396236896515,
-0.15305113792419434,
0.04324283078312874,
-0.030342325568199158,
-0.19314096868038177,
-0.10912463814020157,
0.13463306427001953,
0.31613627076148987,
0.05989910289645195,
0.18556201457977295,
0.17671605944633484,
-0.09793466329574585,
-0.47927308082580566,
0.27985426783561707,
0.5501894950866699,
0.3861314356327057,
-0.0540340356528759,
-0.17665250599384308,
0.12206146866083145,
0.2305990606546402,
-0.2600754499435425,
-0.12917037308216095,
0.2617485821247101,
0.12534399330615997,
0.326425701379776,
0.43528276681900024,
-0.09633578360080719,
0.04782634973526001,
0.06762956082820892,
-0.024104846641421318,
0.476788729429245,
-0.3509477376937866,
0.2803100347518921,
0.2640278935432434,
0.14621023833751678,
-0.036275219172239304,
0.11126849055290222,
0.28040996193885803,
0.2815098464488983,
0.09799560159444809,
-0.0839080736041069,
0.09697477519512177,
0.3420616388320923,
-0.10048975050449371,
0.14373894035816193,
-0.30158376693725586,
0.2730349004268646,
0.3508031964302063,
0.19098801910877228,
-0.03002840280532837,
0.1104196235537529,
0.2892654538154602,
0.25024908781051636,
-0.3424322307109833,
-0.22799751162528992,
0.16158723831176758,
-0.0772462859749794,
-0.10797591507434845,
-0.07631084322929382,
-0.24327760934829712,
-0.21111567318439484,
-0.28985437750816345,
0.04431605711579323,
-0.11637932062149048,
0.05629092454910278,
-0.1320285201072693,
0.4452430009841919,
-0.35880839824676514,
0.0010402128100395203,
-0.031192071735858917,
0.3723387122154236,
-0.08976449072360992,
0.15687456727027893,
0.19839325547218323,
0.009304225444793701,
0.1362648457288742,
0.15800657868385315,
0.38437438011169434,
0.32230398058891296,
0.058211877942085266,
-0.13297855854034424,
0.040128402411937714,
-0.10064859688282013,
0.020831286907196045,
-0.12243673205375671,
-0.2273714542388916,
-0.06325261294841766,
0.440975546836853,
0.278299480676651,
-0.13851352035999298,
0.026812123134732246,
-0.06832452118396759,
-0.009617701172828674,
-0.27016738057136536,
0.464167058467865,
0.03404537960886955,
0.055521681904792786,
-0.1682511866092682,
0.0556461364030838,
-0.30225902795791626,
-0.15724003314971924,
0.23572878539562225,
0.2344788908958435,
0.20264872908592224,
0.1494426727294922,
0.15344209969043732,
0.22237767279148102,
0.22468867897987366,
0.17101825773715973,
-0.1696189045906067,
-0.20353250205516815,
-0.1177745908498764,
-0.49940577149391174,
0.17409035563468933,
-0.21013906598091125,
-0.23801538348197937,
0.2430582493543625,
0.5388332009315491,
0.3614084720611572,
0.2657257914543152,
0.1427118182182312,
-0.0034417242277413607,
-0.06106635555624962,
0.30800822377204895,
-0.4151655435562134,
-0.1625925898551941,
0.2695198655128479,
-0.09875492751598358,
0.14567029476165771,
-0.11780701577663422,
-0.030970077961683273,
0.025592278689146042,
0.21679410338401794,
-0.07478749006986618,
-0.1520911604166031,
-0.3162161111831665,
-0.24812722206115723,
-0.041756317019462585,
0.14598365128040314,
0.010715901851654053,
-0.12134024500846863,
-0.17066389322280884,
-0.0742439329624176,
-0.3458023965358734,
-0.0005225976929068565,
0.5442630052566528,
-0.11847531795501709,
0.3531465232372284,
-0.09073102474212646,
0.04442862793803215,
-0.3395136296749115,
-0.15503929555416107,
0.1313026398420334,
-0.13917946815490723,
-0.3856278657913208,
0.4941498339176178,
0.1489674150943756,
-0.13624030351638794,
-0.3637370765209198,
0.1303550899028778,
0.08469215035438538,
0.21883057057857513,
0.08976955711841583,
-0.45753413438796997,
0.5386456251144409,
-0.39192163944244385,
-0.342896431684494,
-0.044811543077230453,
0.1575389802455902,
0.03542082756757736,
-0.04921187460422516,
-0.35333648324012756,
-0.03318116441369057,
0.2597874104976654,
0.055893197655677795,
-0.044733863323926926,
-0.11487148702144623,
0.04426123946905136,
0.03451399877667427,
-0.12405873835086823,
-0.016326330602169037,
0.07527229189872742,
0.002214202657341957,
0.1695394366979599,
-0.27460741996765137
] |
https://github.com/huggingface/datasets/issues/5354 | Consider using "Sequence" instead of "List" | @avinashsai Are you still working on this? If not I would like to give it a try. | ### Feature request
Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below.
**How to reproduce**
```py
list_of_filenames = ["foo.parquet", "bar.parquet"]
ds = Dataset.from_parquet(list_of_filenames)
```
**Expected mypy output:**
```
Success: no issues found
```
**Actual mypy output:**
```py
test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type]
test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
test.py:19: note: Consider using "Sequence" instead, which is covariant
```
**Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1 | 17 | Consider using "Sequence" instead of "List"
### Feature request
Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below.
**How to reproduce**
```py
list_of_filenames = ["foo.parquet", "bar.parquet"]
ds = Dataset.from_parquet(list_of_filenames)
```
**Expected mypy output:**
```
Success: no issues found
```
**Actual mypy output:**
```py
test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type]
test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
test.py:19: note: Consider using "Sequence" instead, which is covariant
```
**Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1
@avinashsai Are you still working on this? If not I would like to give it a try. | [
-0.28768685460090637,
-0.06751748919487,
-0.010348198935389519,
0.14013820886611938,
0.29745763540267944,
-0.04490745812654495,
0.1444271206855774,
0.15872754156589508,
0.005887283012270927,
0.06571336835622787,
0.22005876898765564,
0.6785486340522766,
-0.20780858397483826,
0.19505374133586884,
-0.12195686995983124,
-0.1015896201133728,
0.028758056461811066,
-0.031344011425971985,
0.07728999853134155,
-0.0950099378824234,
-0.1949450522661209,
0.12256209552288055,
-0.168827623128891,
0.05799926817417145,
0.16718646883964539,
-0.2633086144924164,
-0.09536705166101456,
0.09679806977510452,
-0.05444230139255524,
-0.38701295852661133,
0.19858799874782562,
0.06422540545463562,
-0.051042329519987106,
0.2101668119430542,
-0.00010625461436575279,
-0.13611973822116852,
0.42931365966796875,
-0.03281349688768387,
-0.18464316427707672,
-0.2946200370788574,
-0.041357651352882385,
-0.14849647879600525,
0.3732694983482361,
-0.15548665821552277,
-0.09692750871181488,
-0.3998395800590515,
-0.22606270015239716,
-0.49333253502845764,
0.20915603637695312,
0.3040328919887543,
0.21515217423439026,
0.3017035126686096,
0.22711138427257538,
-0.2764270305633545,
0.40179792046546936,
0.19205859303474426,
-0.12063746899366379,
-0.09640826284885406,
0.44715186953544617,
0.00033925287425518036,
0.15133672952651978,
0.07591624557971954,
-0.0621614083647728,
-0.06830312311649323,
0.13196603953838348,
0.22034937143325806,
0.07204890251159668,
-0.06020120531320572,
-0.18526488542556763,
0.25302669405937195,
0.24969139695167542,
-0.2865413725376129,
-0.3184643089771271,
-0.28375694155693054,
-0.1365543156862259,
-0.16853956878185272,
0.12584224343299866,
0.16915877163410187,
-0.07768838107585907,
0.022109610959887505,
0.22948779165744781,
0.23479266464710236,
-0.10558126866817474,
0.2611311078071594,
0.05418047308921814,
-0.07066553831100464,
-0.19592009484767914,
0.23950204253196716,
0.19671085476875305,
-0.4253154397010803,
-0.23611603677272797,
-0.2388211190700531,
-0.006324023008346558,
0.09241914749145508,
-0.31141796708106995,
-0.19303439557552338,
0.01158544048666954,
0.045096807181835175,
0.34239688515663147,
0.14144539833068848,
-0.18136301636695862,
0.08450458943843842,
-0.06221869960427284,
0.19625309109687805,
0.5448218584060669,
-0.02092737704515457,
-0.10610384494066238,
0.2078729122877121,
-0.22427134215831757,
0.14233022928237915,
-0.0001724623143672943,
-0.10867158323526382,
0.2833556532859802,
-0.15792502462863922,
-0.013042360544204712,
-0.06043391674757004,
0.42424535751342773,
-0.20815075933933258,
-0.36017468571662903,
0.1381019800901413,
-0.027765415608882904,
-0.0669131651520729,
0.19950804114341736,
0.5162588357925415,
-0.016865333542227745,
0.10352472960948944,
-0.08377716690301895,
0.2688772678375244,
0.05444052070379257,
-0.1457108110189438,
-0.3235015571117401,
0.17523136734962463,
-0.08598162233829498,
-0.17207090556621552,
0.02307708188891411,
-0.05101105943322182,
0.05319422483444214,
0.3230430781841278,
0.5060369968414307,
0.11616267263889313,
0.039114706218242645,
-0.29622915387153625,
0.288779079914093,
-0.16178014874458313,
-0.18713852763175964,
0.06814859062433243,
0.4369097948074341,
-0.07612643390893936,
-0.29941633343696594,
-0.2541481554508209,
-0.4025319218635559,
-0.14685772359371185,
-0.0920255184173584,
0.19463686645030975,
0.048369720578193665,
-0.0593130961060524,
-0.5786683559417725,
-0.018769782036542892,
0.08081309497356415,
0.12806583940982819,
-0.1930217146873474,
-0.15490686893463135,
0.14485399425029755,
-0.33761951327323914,
0.03350110352039337,
0.18883755803108215,
-0.05433155596256256,
-0.053703032433986664,
-0.0984957218170166,
0.008945271372795105,
0.4069739282131195,
0.29702380299568176,
-0.22926191985607147,
-0.19969946146011353,
-0.2781608998775482,
0.1467639058828354,
0.5085753202438354,
-0.11618204414844513,
0.13834162056446075,
0.3242901861667633,
0.04851856082677841,
0.12077903002500534,
0.08620113879442215,
-0.28144416213035583,
0.4050026535987854,
-0.3337772488594055,
0.014010347425937653,
0.057698894292116165,
-0.03793754428625107,
0.12916947901248932,
-0.3049474358558655,
-0.3441336154937744,
0.1389823853969574,
-0.07011574506759644,
-0.30865445733070374,
-0.07794030755758286,
0.11425618827342987,
-0.2652070224285126,
0.2610403001308441,
-0.29778581857681274,
-0.00795578770339489,
0.19275015592575073,
0.32814356684684753,
0.2732357084751129,
-0.05297805368900299,
-0.25388339161872864,
-0.4831281900405884,
0.010599981993436813,
0.09429793804883957,
-0.04534506797790527,
-0.3123183846473694,
-0.2546679973602295,
-0.09392119199037552,
0.13578693568706512,
-0.17063452303409576,
0.0763440728187561,
0.27735719084739685,
0.2987639904022217,
-0.10853089392185211,
-0.058484312146902084,
-0.1637173295021057,
0.0819287896156311,
-0.3530302941799164,
-0.11407479643821716,
-0.21422554552555084,
0.3777475953102112,
0.05603755638003349,
-0.284607857465744,
0.12024448812007904,
0.17689499258995056,
0.26871395111083984,
-0.007971378043293953,
0.2001182734966278,
0.25730007886886597,
0.36279720067977905,
0.022605322301387787,
-0.11200281232595444,
0.12472422420978546,
-0.06448865681886673,
-0.17959080636501312,
-0.15779317915439606,
0.03849053382873535,
0.07224319875240326,
0.12598136067390442,
-0.22774472832679749,
0.49248743057250977,
-0.04633932188153267,
0.26695242524147034,
-0.018581166863441467,
0.006099654361605644,
0.29836729168891907,
0.22295311093330383,
-0.2420063465833664,
-0.23656901717185974,
0.006834927946329117,
0.23618409037590027,
0.03465411439538002,
-0.05030456930398941,
-0.6536704897880554,
0.05210590735077858,
0.5065629482269287,
0.15076756477355957,
0.19674146175384521,
0.17089340090751648,
0.1694953441619873,
0.012216821312904358,
-0.12268583476543427,
0.14250202476978302,
0.24099063873291016,
0.33147019147872925,
-0.06935331225395203,
-0.21067103743553162,
-0.24007727205753326,
0.02975575625896454,
0.23651689291000366,
0.23678983747959137,
0.00575542077422142,
-0.12723135948181152,
0.2569108307361603,
-0.10489926487207413,
-0.18306368589401245,
-0.09880902618169785,
-0.21384993195533752,
0.11463852226734161,
-0.3498689830303192,
0.18697991967201233,
-0.4961026906967163,
0.08067084848880768,
-0.23531174659729004,
0.03261925280094147,
-0.038676705211400986,
-0.3383084237575531,
-0.2389744371175766,
0.10627962648868561,
-0.1761927604675293,
0.3017592430114746,
0.13107292354106903,
0.15071022510528564,
0.1826213002204895,
-0.3279101550579071,
-0.024070963263511658,
-0.1644800454378128,
-0.18927153944969177,
0.18459756672382355,
0.18234020471572876,
-0.04983801394701004,
0.3527204692363739,
0.0905216634273529,
-0.03984852135181427,
-0.5106878876686096,
-0.1686803251504898,
0.18172679841518402,
-0.2675129175186157,
0.07480243593454361,
0.47436967492103577,
0.19499824941158295,
-0.07040382921695709,
-0.46469324827194214,
0.3157429099082947,
-0.06368294358253479,
-0.1911107897758484,
0.16140277683734894,
0.08946932107210159,
-0.062146373093128204,
-0.072574183344841,
-0.2380286157131195,
-0.12584838271141052,
-0.35343414545059204,
0.39156389236450195,
0.3861123323440552,
0.09173280000686646,
-0.14150024950504303,
0.08943288773298264,
0.047810256481170654,
-0.4028022587299347,
0.4247649312019348,
-0.2934976816177368,
-0.11798818409442902,
0.18591614067554474,
0.07050362974405289,
-0.2692220211029053,
0.01663646474480629,
-0.20127572119235992,
-0.008374091237783432,
0.14483772218227386,
-0.039800889790058136,
-0.38203975558280945,
0.015071258880198002,
0.0654754489660263,
-0.026513144373893738,
0.16505415737628937,
0.2820923924446106,
0.08215878158807755,
-0.1454388052225113,
-0.22575563192367554,
-0.02401786670088768,
0.16336938738822937,
0.11311417073011398,
0.2203478068113327,
0.2232183814048767,
0.37527620792388916,
0.008287914097309113,
0.36119771003723145,
0.34310072660446167,
-0.30034080147743225,
0.34179553389549255,
-0.20665626227855682,
0.16694913804531097,
-0.2989807426929474,
-0.3305816650390625,
-0.06801999360322952,
-0.09557005763053894,
0.056032925844192505,
0.14482823014259338,
-0.2577836811542511,
-0.1492205560207367,
0.06246454268693924,
0.30217716097831726,
-0.12190824002027512,
-0.3334803879261017,
0.023582343012094498,
0.3443056344985962,
0.14214393496513367,
-0.04795888438820839,
-0.04076778143644333,
-0.24008555710315704,
-0.024048257619142532,
0.1345175802707672,
0.22689761221408844,
-0.01282569020986557,
-0.23902516067028046,
-0.2935573160648346,
0.12094936519861221,
-0.16274455189704895,
0.3658679723739624,
0.06878246366977692,
0.1577477902173996,
0.05529020354151726,
-0.3934495449066162,
-0.1759287267923355,
0.017178799957036972,
0.6451866030693054,
-0.2218412458896637,
-0.13552945852279663,
0.2129763513803482,
-0.03495386242866516,
-0.31723588705062866,
0.06199464574456215,
-0.4781336486339569,
-0.04681336134672165,
-0.0976267009973526,
0.4208510220050812,
-0.7685402035713196,
-0.2658562958240509,
0.03466116264462471,
0.1475607007741928,
0.11258745193481445,
0.2402096837759018,
-0.28864172101020813,
0.009975582361221313,
-0.36076828837394714,
0.12101469933986664,
0.18935459852218628,
0.308620810508728,
-0.07292681932449341,
0.0795280784368515,
-0.31084108352661133,
-0.09486689418554306,
0.03905769810080528,
0.04360485076904297,
0.8056740164756775,
-0.12136805802583694,
0.07123252749443054,
-0.24143534898757935,
0.5259929299354553,
0.5028424859046936,
0.2703983187675476,
-0.12162277102470398,
-0.605824887752533,
0.08829907327890396,
-0.38375917077064514,
0.1524655967950821,
0.05826982855796814,
-0.3017275631427765,
0.23797589540481567,
-0.23434659838676453,
0.1579834222793579,
-0.2841537892818451,
0.07292047142982483,
0.4736413061618805,
-0.21773071587085724,
-0.09332507848739624,
-0.5384572744369507,
0.3575320243835449,
0.1490688920021057,
-0.1377796232700348,
0.3392559587955475,
0.2852380871772766,
-0.2539529800415039,
0.5103901028633118,
0.32162678241729736,
0.7695141434669495,
0.17199471592903137,
-0.027043815702199936,
0.4442611336708069,
0.028641700744628906,
0.37478694319725037,
0.11763477325439453,
0.00028151459991931915,
-0.29184505343437195,
-0.146372452378273,
-0.02001166343688965,
-0.2641388475894928,
0.23755192756652832,
0.2504243552684784,
-0.5270818471908569,
0.16329465806484222,
0.05160447955131531,
0.09916189312934875,
-0.17299260199069977,
0.2540273666381836,
-0.016699353232979774,
-0.258239209651947,
-0.5175244808197021,
0.15892308950424194,
0.09800298511981964,
-0.3445076644420624,
0.027481526136398315,
-0.20933187007904053,
-0.02313130721449852,
-0.3914330005645752,
-0.27903711795806885,
-0.0692899152636528,
-0.17413835227489471,
0.050090424716472626,
0.2127033770084381,
-0.1287972629070282,
0.3191204071044922,
0.10559627413749695,
0.19989651441574097,
0.08041410893201828,
-0.12363313138484955,
-0.08543127775192261,
0.006408296525478363,
0.167020782828331,
-0.186783105134964,
-0.2392929345369339,
0.07256864756345749,
0.09440674632787704,
0.03815954178571701,
-0.011493340134620667,
-0.06789694726467133,
-0.27675920724868774,
-0.056689463555812836,
0.1159193143248558,
0.21675758063793182,
-0.43876686692237854,
-0.2867461144924164,
-0.0064276158809661865,
-0.19130843877792358,
-0.1532619297504425,
0.15368948876857758,
0.2100672572851181,
-0.11632120609283447,
0.2528034448623657,
0.13555707037448883,
-0.04431349039077759,
-0.108975350856781,
0.12709134817123413,
-0.06608814001083374,
0.1271013468503952,
0.37361350655555725,
0.21944211423397064,
-0.3135458827018738,
-0.3438413143157959,
-0.0028630271553993225,
0.24319079518318176,
-0.36835944652557373,
0.2827679216861725,
0.01889764331281185,
-0.14385363459587097,
0.19898225367069244,
0.534404456615448,
0.02435791678726673,
0.30439382791519165,
-0.02096329815685749,
-0.24043165147304535,
0.016988439485430717,
0.3642171621322632,
-0.1000196784734726,
0.16452714800834656,
0.06749803572893143,
0.12144492566585541,
-0.12549614906311035,
-0.3501165211200714,
-0.40520015358924866,
0.028734583407640457,
-0.23563313484191895,
0.2064107060432434,
0.15228626132011414,
-0.02459103614091873,
0.36428317427635193,
0.05890073999762535,
0.22783446311950684,
0.0768863633275032,
-0.13362060487270355,
-0.258735716342926,
0.08182157576084137,
0.06404085457324982,
-0.15943458676338196,
0.24293825030326843,
-0.11399216949939728,
-0.11140001565217972,
-0.09346313774585724,
-0.2590176463127136,
0.09790308773517609,
-0.2215982973575592,
-0.19148753583431244,
-0.019694194197654724,
0.435198575258255,
0.019179698079824448,
-0.1076027974486351,
-0.24142923951148987,
-0.19083726406097412,
-0.15986622869968414,
0.056635405868291855,
-0.016457904130220413,
-0.19318550825119019,
-0.10730665177106857,
0.17441494762897491,
0.3147083520889282,
0.062025412917137146,
0.17266136407852173,
0.20158660411834717,
-0.06813888251781464,
-0.4809441566467285,
0.29368460178375244,
0.5532020330429077,
0.36960020661354065,
-0.06575518846511841,
-0.17275910079479218,
0.14151611924171448,
0.2405027151107788,
-0.2797577381134033,
-0.167776420712471,
0.26003363728523254,
0.12658219039440155,
0.3435233235359192,
0.4020381271839142,
-0.12034812569618225,
0.05199533700942993,
0.09028281271457672,
-0.04220807924866676,
0.49030983448028564,
-0.34720683097839355,
0.28882259130477905,
0.24060647189617157,
0.15090720355510712,
-0.058766383677721024,
0.09267475455999374,
0.3340042531490326,
0.30100688338279724,
0.12196481227874756,
-0.09915869683027267,
0.103530652821064,
0.3528071343898773,
-0.07488773763179779,
0.14748913049697876,
-0.2906671464443207,
0.27813324332237244,
0.36583423614501953,
0.18586738407611847,
-0.03257057070732117,
0.11676475405693054,
0.24781867861747742,
0.29305168986320496,
-0.3428539037704468,
-0.20168082416057587,
0.15521207451820374,
-0.04396896809339523,
-0.13347424566745758,
-0.060496143996715546,
-0.22826120257377625,
-0.20555651187896729,
-0.32413432002067566,
0.022683903574943542,
-0.15447555482387543,
0.0614713616669178,
-0.15253278613090515,
0.48316192626953125,
-0.37220656871795654,
0.048480477184057236,
-0.03210914880037308,
0.394173800945282,
-0.09206359833478928,
0.1602701097726822,
0.20289042592048645,
0.020401619374752045,
0.12009713053703308,
0.14260190725326538,
0.3439798355102539,
0.2858678698539734,
0.0747055783867836,
-0.10513514280319214,
0.04234721511602402,
-0.11717557907104492,
0.003833569586277008,
-0.1439528912305832,
-0.21872368454933167,
-0.07313698530197144,
0.4464709758758545,
0.27158457040786743,
-0.13681229948997498,
0.07203172892332077,
-0.04399387910962105,
-0.053910527378320694,
-0.25150737166404724,
0.43626585602760315,
0.06452981382608414,
0.03704380989074707,
-0.1274510771036148,
0.051755428314208984,
-0.2985452115535736,
-0.1666666716337204,
0.23046107590198517,
0.19190721213817596,
0.19223541021347046,
0.14211995899677277,
0.15539443492889404,
0.2322576940059662,
0.21967799961566925,
0.16883473098278046,
-0.17128556966781616,
-0.19910986721515656,
-0.14266227185726166,
-0.4755266010761261,
0.13900890946388245,
-0.1845213770866394,
-0.24505728483200073,
0.23573993146419525,
0.5468617677688599,
0.34826958179473877,
0.27901458740234375,
0.1336199790239334,
0.013082796707749367,
-0.05950002372264862,
0.3130784332752228,
-0.42272379994392395,
-0.13986949622631073,
0.27801230549812317,
-0.06518451869487762,
0.13823577761650085,
-0.09837812185287476,
-0.03491639718413353,
0.03378382697701454,
0.2126508355140686,
-0.10410434007644653,
-0.1372573971748352,
-0.30319079756736755,
-0.2627744972705841,
-0.040958911180496216,
0.12663592398166656,
-0.01900845766067505,
-0.1433500349521637,
-0.14200636744499207,
-0.08049359917640686,
-0.35624516010284424,
0.006722983904182911,
0.51167231798172,
-0.09535668790340424,
0.3400762975215912,
-0.07863278687000275,
0.04268583655357361,
-0.3240329325199127,
-0.1779353767633438,
0.13128620386123657,
-0.13844729959964752,
-0.3821546137332916,
0.5155968070030212,
0.15553462505340576,
-0.12717992067337036,
-0.40129002928733826,
0.12021594494581223,
0.06940822303295135,
0.21374745666980743,
0.09456110000610352,
-0.4559878408908844,
0.5366535186767578,
-0.38673868775367737,
-0.32590892910957336,
-0.05057379975914955,
0.15891635417938232,
0.032343052327632904,
-0.02069144882261753,
-0.3131518065929413,
-0.010847717523574829,
0.2740781903266907,
0.03642084822058678,
-0.05476360395550728,
-0.09202560782432556,
0.04613190516829491,
0.027660537511110306,
-0.13959549367427826,
-0.030317939817905426,
0.08592473715543747,
0.001626608893275261,
0.14167721569538116,
-0.3004189133644104
] |
https://github.com/huggingface/datasets/issues/5354 | Consider using "Sequence" instead of "List" | Hi @tranhd95 @mariosasko ,I hope you all are doing well.
I am interested in this issue, is this still open and unresolved ?
Thanks and Regards | ### Feature request
Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below.
**How to reproduce**
```py
list_of_filenames = ["foo.parquet", "bar.parquet"]
ds = Dataset.from_parquet(list_of_filenames)
```
**Expected mypy output:**
```
Success: no issues found
```
**Actual mypy output:**
```py
test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type]
test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
test.py:19: note: Consider using "Sequence" instead, which is covariant
```
**Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1 | 26 | Consider using "Sequence" instead of "List"
### Feature request
Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below.
**How to reproduce**
```py
list_of_filenames = ["foo.parquet", "bar.parquet"]
ds = Dataset.from_parquet(list_of_filenames)
```
**Expected mypy output:**
```
Success: no issues found
```
**Actual mypy output:**
```py
test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type]
test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
test.py:19: note: Consider using "Sequence" instead, which is covariant
```
**Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1
Hi @tranhd95 @mariosasko ,I hope you all are doing well.
I am interested in this issue, is this still open and unresolved ?
Thanks and Regards | [
-0.15149293839931488,
-0.15031515061855316,
0.028739195317029953,
0.2622712254524231,
0.19432999193668365,
-0.020484913140535355,
0.18442153930664062,
0.09012670069932938,
-0.011840240098536015,
-0.05534839630126953,
0.3023826777935028,
0.5749340653419495,
-0.28419309854507446,
0.1816883087158203,
-0.0696505680680275,
-0.21603816747665405,
0.17000652849674225,
-0.19439160823822021,
0.18414339423179626,
0.03970078378915787,
-0.23768550157546997,
0.09855219721794128,
-0.35757017135620117,
-0.00831180065870285,
0.20595799386501312,
-0.23026451468467712,
-0.05626145750284195,
-0.053004153072834015,
0.02515488862991333,
-0.5265622138977051,
0.1519201248884201,
0.0829559788107872,
0.04942636936903,
0.20573170483112335,
-0.00012010186037514359,
-0.16041290760040283,
0.6219069957733154,
0.004082424566149712,
-0.13930465281009674,
-0.2918609380722046,
-0.2816809415817261,
-0.08056410402059555,
0.4662438929080963,
-0.09705870598554611,
-0.006047071889042854,
-0.34913504123687744,
-0.22207148373126984,
-0.5168724060058594,
0.16576546430587769,
0.3423265516757965,
0.0812610387802124,
0.2627105414867401,
0.198238804936409,
-0.18958111107349396,
0.3083311915397644,
0.3505452871322632,
-0.02582636848092079,
-0.010022256523370743,
0.6812008619308472,
0.03669255971908569,
0.29331278800964355,
0.059939395636320114,
-0.10438898950815201,
-0.23536555469036102,
0.2555221915245056,
0.04131743311882019,
0.10626648366451263,
-0.10303017497062683,
-0.3028639853000641,
0.15907713770866394,
0.3638930320739746,
-0.20761841535568237,
-0.24713414907455444,
-0.21251291036605835,
-0.1731034368276596,
-0.1635003238916397,
0.22005799412727356,
-0.0024502836167812347,
-0.11576032638549805,
0.060345180332660675,
0.15619909763336182,
0.16167014837265015,
-0.18322265148162842,
0.3533187508583069,
0.12463149428367615,
-0.1612459123134613,
-0.1387028992176056,
0.2849663496017456,
0.25832444429397583,
-0.47359877824783325,
-0.14911140501499176,
-0.3137492537498474,
0.04236072674393654,
0.17836828529834747,
-0.3809489905834198,
-0.2498718798160553,
-0.027904830873012543,
0.10189172625541687,
0.3732950687408447,
0.25057488679885864,
-0.25324365496635437,
0.1469203233718872,
-0.20765772461891174,
0.07871928811073303,
0.6181580424308777,
0.07043422758579254,
0.012621067464351654,
0.1410495638847351,
-0.3130040168762207,
0.1514207273721695,
0.04187691584229469,
-0.05127492547035217,
0.3108299672603607,
-0.11662184447050095,
0.07260532677173615,
0.14361506700515747,
0.340600848197937,
-0.36040180921554565,
-0.1913180649280548,
0.14957424998283386,
-0.191876620054245,
-0.14573818445205688,
0.22321383655071259,
0.46019554138183594,
0.0028740614652633667,
0.2034870982170105,
-0.04394713416695595,
0.37775641679763794,
0.1838017851114273,
-0.23427355289459229,
-0.1627814918756485,
0.08389496058225632,
-0.1214628666639328,
-0.14707091450691223,
-0.02156543917953968,
-0.056706104427576065,
0.01208239234983921,
0.32254618406295776,
0.5844627022743225,
0.029438748955726624,
-0.10609652101993561,
-0.3551805019378662,
0.27581357955932617,
-0.26979631185531616,
-0.37904539704322815,
0.05411309748888016,
0.41815418004989624,
0.05556420981884003,
-0.2649383842945099,
-0.13347679376602173,
-0.4641590714454651,
-0.2406967431306839,
-0.17857657372951508,
0.02476094849407673,
0.017719365656375885,
-0.04750876873731613,
-0.7484517693519592,
-0.06770111620426178,
0.1341380774974823,
0.09668420255184174,
-0.20087525248527527,
-0.2254532426595688,
0.049340058118104935,
-0.298775315284729,
-0.14431160688400269,
0.21615397930145264,
0.061071109026670456,
0.0303025022149086,
-0.12363482266664505,
0.14011035859584808,
0.4518483877182007,
0.41015157103538513,
-0.26997503638267517,
-0.21408221125602722,
-0.28610777854919434,
0.10830995440483093,
0.5282672643661499,
-0.21151340007781982,
0.2288137525320053,
0.3660292327404022,
0.22063030302524567,
0.21131901443004608,
0.08657772094011307,
-0.25595515966415405,
0.37634655833244324,
-0.4584331512451172,
0.13397622108459473,
-0.062073707580566406,
0.02714378945529461,
0.10030067712068558,
-0.28717106580734253,
-0.42624133825302124,
0.20845049619674683,
-0.17006196081638336,
-0.4025507867336273,
0.11803027987480164,
-0.008673757314682007,
-0.37254539132118225,
0.19275519251823425,
-0.22168931365013123,
-0.1381288319826126,
0.189253032207489,
0.250257283449173,
0.4033035635948181,
-0.06496326625347137,
-0.21100518107414246,
-0.480480432510376,
-0.03752440959215164,
-0.045565132051706314,
0.01259353756904602,
-0.32442402839660645,
-0.20246949791908264,
-0.11857882142066956,
0.16699141263961792,
-0.0496368370950222,
0.2637505531311035,
0.07857350260019302,
0.15480050444602966,
-0.06846463680267334,
0.046876270323991776,
-0.11520732194185257,
0.15979841351509094,
-0.4672193229198456,
-0.07096567749977112,
-0.21018467843532562,
0.34479016065597534,
0.13688813149929047,
-0.23347318172454834,
-0.008392859250307083,
0.1853775978088379,
0.25515878200531006,
-0.02884751744568348,
0.10858994722366333,
0.21457338333129883,
0.5320034623146057,
-0.0355648398399353,
-0.3146757483482361,
0.17760078608989716,
0.06395407766103745,
-0.28124213218688965,
-0.20582114160060883,
0.103043332695961,
0.09554752707481384,
0.08849916607141495,
-0.17146986722946167,
0.3698181211948395,
-0.09672664105892181,
0.36043402552604675,
-0.13986703753471375,
-0.012706316076219082,
0.13916809856891632,
0.29400545358657837,
-0.37961116433143616,
-0.15143713355064392,
0.01550118625164032,
0.3966023623943329,
-0.04190859571099281,
-0.08759896457195282,
-0.6895713210105896,
-0.061655499041080475,
0.44306132197380066,
0.16532078385353088,
0.1625104546546936,
0.29662418365478516,
0.25668781995773315,
-0.057914555072784424,
-0.005897181108593941,
-0.040991827845573425,
0.3124336004257202,
0.21848030388355255,
-0.23557928204536438,
-0.23481595516204834,
-0.2290204018354416,
0.14522875845432281,
0.2294463813304901,
0.33512240648269653,
0.05465146526694298,
-0.24805986881256104,
0.28892117738723755,
-0.03744245693087578,
0.01392320916056633,
-0.16160356998443604,
-0.3084745705127716,
0.0547233521938324,
-0.5318394899368286,
0.19017226994037628,
-0.5485708117485046,
-0.10963396728038788,
-0.22658424079418182,
-0.02337636798620224,
-0.12568743526935577,
-0.36598336696624756,
-0.3411604166030884,
0.0952058732509613,
-0.03564365580677986,
0.2580299377441406,
0.12083226442337036,
0.17149892449378967,
0.15805214643478394,
-0.3023245334625244,
0.04319607466459274,
-0.11992151290178299,
-0.13685211539268494,
0.022668592631816864,
0.30988478660583496,
-0.06188618764281273,
0.25939106941223145,
0.04202406108379364,
-0.22024822235107422,
-0.38387331366539,
-0.2184309959411621,
0.17630687355995178,
-0.14202181994915009,
0.09655459970235825,
0.518036961555481,
0.16905562579631805,
0.019711002707481384,
-0.465080201625824,
0.17998313903808594,
0.11125829815864563,
-0.15412631630897522,
0.10005626827478409,
0.03874612972140312,
0.12952129542827606,
0.015727121382951736,
-0.09569212049245834,
-0.08827104419469833,
-0.26875555515289307,
0.38930267095565796,
0.33511415123939514,
0.06353402137756348,
-0.12483491748571396,
0.0030092597007751465,
0.008167164400219917,
-0.35178232192993164,
0.3779192268848419,
-0.2543453276157379,
-0.07182332128286362,
0.09255779534578323,
0.17235589027404785,
-0.19802305102348328,
0.012117113918066025,
-0.22259069979190826,
-0.11277379095554352,
0.13103258609771729,
-0.047934334725141525,
-0.5075815320014954,
0.008284201845526695,
0.039384182542562485,
0.03693443164229393,
0.03083048015832901,
0.23597130179405212,
0.04604010283946991,
0.027573460713028908,
-0.11582589894533157,
-0.0413963720202446,
0.19326676428318024,
0.13820207118988037,
0.29782354831695557,
0.5537928342819214,
0.40211477875709534,
-0.0775533989071846,
0.3213028907775879,
0.4667797088623047,
-0.40967562794685364,
0.3344206213951111,
-0.18111208081245422,
-0.037806082516908646,
-0.4250340163707733,
-0.3366813361644745,
-0.21391862630844116,
-0.18962785601615906,
0.05899430811405182,
0.0449773371219635,
-0.3211553692817688,
-0.2271265983581543,
0.10549084842205048,
0.35470813512802124,
-0.03241106867790222,
-0.3691081404685974,
0.05324479192495346,
0.10482992231845856,
0.2767085134983063,
-0.12116360664367676,
-0.08710828423500061,
-0.24450045824050903,
-0.1280670166015625,
0.1673310548067093,
0.35004550218582153,
0.039444029331207275,
-0.3028557300567627,
-0.39971309900283813,
0.039951447397470474,
-0.12680009007453918,
0.48219019174575806,
0.2720629870891571,
0.3420853316783905,
0.05635026469826698,
-0.2935875952243805,
-0.11283954977989197,
0.16354534029960632,
0.5733670592308044,
-0.40380075573921204,
-0.21893052756786346,
0.21702894568443298,
-0.03429201617836952,
-0.1008438989520073,
0.061871882528066635,
-0.33594509959220886,
-0.05555759370326996,
-0.14482255280017853,
0.4629349112510681,
-0.6556307673454285,
-0.2843317985534668,
-0.007013943046331406,
0.12899994850158691,
0.2034941017627716,
0.185293510556221,
-0.16876648366451263,
0.1624343991279602,
-0.36591604351997375,
0.10936670750379562,
0.2933478355407715,
0.3496582806110382,
0.004473306238651276,
0.16368339955806732,
-0.2588282525539398,
-0.04667077213525772,
0.022971250116825104,
-0.07088210433721542,
0.7480787634849548,
-0.10806155949831009,
0.038474176079034805,
-0.31532564759254456,
0.450675904750824,
0.5531877875328064,
0.10157696157693863,
-0.1770005077123642,
-0.7149988412857056,
0.02233780175447464,
-0.2939418852329254,
0.23898649215698242,
0.07805663347244263,
-0.2368498593568802,
0.32749801874160767,
-0.1437998265028,
0.011551067233085632,
-0.30077970027923584,
-0.051145561039447784,
0.4716964662075043,
-0.15053361654281616,
-0.22707591950893402,
-0.6283225417137146,
0.3232664167881012,
0.2683948278427124,
-0.15272346138954163,
0.411558598279953,
0.20486614108085632,
-0.23315182328224182,
0.5023426413536072,
0.38391634821891785,
0.9809184074401855,
0.236298605799675,
-0.04463465139269829,
0.3554089367389679,
0.10712920129299164,
0.4090757369995117,
0.28629636764526367,
0.034224025905132294,
-0.26865509152412415,
-0.18918703496456146,
-0.07121962308883667,
-0.4074293076992035,
0.2616695463657379,
0.1587749421596527,
-0.5276250839233398,
0.12423611432313919,
-0.08148673176765442,
0.0957190990447998,
-0.19221721589565277,
0.166647270321846,
0.016263647004961967,
-0.14456813037395477,
-0.4877767562866211,
0.00966227799654007,
0.07208683341741562,
-0.26559191942214966,
-0.03177713602781296,
-0.21620452404022217,
-0.008193854242563248,
-0.4179620146751404,
-0.43228209018707275,
-0.21339121460914612,
-0.14862926304340363,
0.04522525519132614,
0.32372012734413147,
-0.08377253264188766,
0.6499789357185364,
0.2572837471961975,
0.3076694905757904,
-0.01144765317440033,
-0.17763082683086395,
-0.2727295458316803,
0.09731116890907288,
0.17938992381095886,
-0.18501900136470795,
-0.2783474624156952,
0.10653962939977646,
0.17074784636497498,
0.03702760487794876,
0.07505649328231812,
-0.090079665184021,
-0.47694385051727295,
-0.24277091026306152,
0.16102886199951172,
0.25857383012771606,
-0.4587023854255676,
-0.40117478370666504,
0.09522596001625061,
-0.1854718029499054,
0.01426536962389946,
0.0115750627592206,
0.2756683826446533,
-0.09630583971738815,
0.35332098603248596,
0.12146958708763123,
-0.04430074244737625,
-0.04447301849722862,
0.03267043083906174,
0.005346251651644707,
-0.050767768174409866,
0.349335640668869,
0.33797115087509155,
-0.3028380274772644,
-0.21765565872192383,
0.004908256232738495,
0.09521710127592087,
-0.4630785286426544,
0.24090895056724548,
-0.04703497886657715,
-0.11009250581264496,
0.12256532162427902,
0.667633593082428,
-0.010669063776731491,
0.36338940262794495,
0.040401991456747055,
-0.19277748465538025,
-0.001088777557015419,
0.4523392915725708,
-0.19923201203346252,
0.16683557629585266,
-0.05360543727874756,
0.084107905626297,
-0.12318556755781174,
-0.4354896545410156,
-0.22672735154628754,
0.050260260701179504,
-0.2814071476459503,
0.2748761773109436,
0.14910438656806946,
0.018188955262303352,
0.3469143211841583,
0.04849684238433838,
0.05591827630996704,
0.11132209748029709,
-0.1505812108516693,
-0.06943461298942566,
0.13658536970615387,
0.17300906777381897,
-0.141127347946167,
0.13786126673221588,
-0.06356125324964523,
-0.16871820390224457,
-0.010903283953666687,
-0.16890230774879456,
-0.02321512997150421,
-0.18469011783599854,
-0.22312574088573456,
0.004700801335275173,
0.46710193157196045,
0.05588214099407196,
-0.1603681445121765,
-0.03962817043066025,
-0.19505587220191956,
-0.10780242085456848,
0.061086151748895645,
-0.0201520174741745,
-0.19106747210025787,
-0.10396454483270645,
-0.04703366756439209,
0.4457154870033264,
0.07553030550479889,
0.16350242495536804,
0.20930373668670654,
-0.048696160316467285,
-0.3667962849140167,
0.2055814266204834,
0.42106330394744873,
0.3165096640586853,
-0.08455391228199005,
-0.18357570469379425,
0.13974007964134216,
0.05923232436180115,
-0.13389578461647034,
-0.18612712621688843,
0.1969567835330963,
0.08594697713851929,
0.20958387851715088,
0.5224586725234985,
-0.08276734501123428,
0.15635612607002258,
0.22762544453144073,
-0.10609523206949234,
0.477766215801239,
-0.26403599977493286,
0.28733476996421814,
0.3196823000907898,
0.11192905902862549,
-0.05299791321158409,
0.04786562919616699,
0.35537827014923096,
0.1999792754650116,
-0.09931513667106628,
0.09181520342826843,
0.04117314890027046,
0.4360939860343933,
-0.03518568351864815,
0.2425028681755066,
-0.2491535097360611,
0.24371911585330963,
0.564867377281189,
0.21463462710380554,
0.10678461939096451,
0.20171257853507996,
0.1838514357805252,
0.35449376702308655,
-0.45147839188575745,
-0.1266890913248062,
0.10949261486530304,
0.029753107577562332,
-0.07747845351696014,
-0.09985040128231049,
-0.1930662989616394,
-0.18194693326950073,
-0.3442496955394745,
-0.06056585535407066,
-0.1279715746641159,
0.212185800075531,
-0.09472982585430145,
0.47330743074417114,
-0.3662354052066803,
0.00545593723654747,
-0.05568109452724457,
0.44450587034225464,
-0.04573262110352516,
0.20570579171180725,
0.016617558896541595,
0.09120554476976395,
0.20869608223438263,
0.18791909515857697,
0.4033289849758148,
0.40578722953796387,
0.15735188126564026,
-0.13884954154491425,
0.05389584228396416,
-0.029965240508317947,
0.1433040201663971,
-0.06675833463668823,
-0.16597232222557068,
-0.1450573354959488,
0.41589152812957764,
0.09516832232475281,
0.06417559832334518,
0.18284232914447784,
-0.08305513858795166,
0.015779880806803703,
-0.36991286277770996,
0.6407435536384583,
-0.014374461024999619,
0.018645599484443665,
-0.08215795457363129,
0.1096082404255867,
-0.2041139006614685,
-0.02429329603910446,
0.14966288208961487,
0.19851170480251312,
0.15356320142745972,
0.2843434810638428,
0.05967727303504944,
0.1448822319507599,
0.15699124336242676,
0.30040088295936584,
-0.10990392416715622,
-0.21800413727760315,
-0.24326670169830322,
-0.3184310495853424,
0.036540865898132324,
-0.07422225177288055,
-0.10788485407829285,
0.4143694341182709,
0.36223334074020386,
0.2955828905105591,
0.38889795541763306,
0.181415393948555,
-0.14040499925613403,
-0.2563241422176361,
0.46298420429229736,
-0.3644021153450012,
-0.10219766199588776,
0.37256282567977905,
-0.012553086504340172,
0.04344455897808075,
-0.07486429065465927,
-0.04899688437581062,
0.15061314404010773,
0.04742558300495148,
-0.10530246794223785,
-0.10008583217859268,
-0.34815216064453125,
-0.025081142783164978,
-0.10419470071792603,
0.26955974102020264,
0.034722983837127686,
0.10233282297849655,
-0.24557451903820038,
0.07510645687580109,
-0.40736809372901917,
0.09101472795009613,
0.6418159604072571,
-0.19638575613498688,
0.2854117453098297,
-0.19461257755756378,
0.07090137898921967,
-0.3001400828361511,
-0.16974064707756042,
0.14219319820404053,
-0.20110638439655304,
-0.5854470729827881,
0.3897329270839691,
0.01759692281484604,
-0.14694702625274658,
-0.29802265763282776,
0.10935735702514648,
0.13043782114982605,
0.21166527271270752,
0.09799568355083466,
-0.21406744420528412,
0.4833102524280548,
-0.3599196970462799,
-0.32342907786369324,
-0.07772260159254074,
0.051564767956733704,
-0.12525174021720886,
-0.060938261449337006,
-0.3554759919643402,
-0.23507159948349,
0.3072326183319092,
0.030986491590738297,
0.03930775448679924,
-0.07064734399318695,
0.11879800260066986,
-0.006125468760728836,
-0.1937880963087082,
-0.06009337306022644,
0.04184655845165253,
0.13730454444885254,
0.09830573201179504,
-0.3382004499435425
] |
https://github.com/huggingface/datasets/issues/5352 | __init__() got an unexpected keyword argument 'input_size' | Hi @J-shel, thanks for reporting.
I think the issue comes from your call to `load_dataset`. As first argument, you should pass:
- either the name of your dataset ("mrf") if this is already published on the Hub
- or the path to the loading script of your dataset ("path/to/your/local/mrf.py"). | ### Describe the bug
I try to define a custom configuration with a input_size attribute following the instructions by "Specifying several dataset configurations" in https://huggingface.co/docs/datasets/v1.2.1/add_dataset.html
But when I load the dataset, I got an error "__init__() got an unexpected keyword argument 'input_size'"
### Steps to reproduce the bug
Following is the code to define the dataset:
class CsvConfig(datasets.BuilderConfig):
"""BuilderConfig for CSV."""
input_size: int = 2048
class MRF(datasets.ArrowBasedBuilder):
"""Archival MRF data"""
BUILDER_CONFIG_CLASS = CsvConfig
VERSION = datasets.Version("1.0.0")
BUILDER_CONFIGS = [
CsvConfig(name="default", version=VERSION, description="MRF data", input_size=2048),
]
...
def _generate_examples(self):
input_size = self.config.input_size
if input_size > 1000:
numin = 10000
else:
numin = 15000
Below is the code to load the dataset:
reader = load_dataset("default", input_size=1024)
### Expected behavior
I hope to pass the "input_size" parameter to MRF datasets, and change "input_size" to any value when loading the datasets.
### Environment info
- `datasets` version: 2.5.1
- Platform: Linux-4.18.0-305.3.1.el8.x86_64-x86_64-with-glibc2.31
- Python version: 3.9.12
- PyArrow version: 9.0.0
- Pandas version: 1.5.0 | 49 | __init__() got an unexpected keyword argument 'input_size'
### Describe the bug
I try to define a custom configuration with a input_size attribute following the instructions by "Specifying several dataset configurations" in https://huggingface.co/docs/datasets/v1.2.1/add_dataset.html
But when I load the dataset, I got an error "__init__() got an unexpected keyword argument 'input_size'"
### Steps to reproduce the bug
Following is the code to define the dataset:
class CsvConfig(datasets.BuilderConfig):
"""BuilderConfig for CSV."""
input_size: int = 2048
class MRF(datasets.ArrowBasedBuilder):
"""Archival MRF data"""
BUILDER_CONFIG_CLASS = CsvConfig
VERSION = datasets.Version("1.0.0")
BUILDER_CONFIGS = [
CsvConfig(name="default", version=VERSION, description="MRF data", input_size=2048),
]
...
def _generate_examples(self):
input_size = self.config.input_size
if input_size > 1000:
numin = 10000
else:
numin = 15000
Below is the code to load the dataset:
reader = load_dataset("default", input_size=1024)
### Expected behavior
I hope to pass the "input_size" parameter to MRF datasets, and change "input_size" to any value when loading the datasets.
### Environment info
- `datasets` version: 2.5.1
- Platform: Linux-4.18.0-305.3.1.el8.x86_64-x86_64-with-glibc2.31
- Python version: 3.9.12
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Hi @J-shel, thanks for reporting.
I think the issue comes from your call to `load_dataset`. As first argument, you should pass:
- either the name of your dataset ("mrf") if this is already published on the Hub
- or the path to the loading script of your dataset ("path/to/your/local/mrf.py"). | [
-0.01033906638622284,
-0.6569042205810547,
0.09153135120868683,
0.46397513151168823,
0.20673991739749908,
0.08880756050348282,
0.22345010936260223,
0.004850694909691811,
-0.11013616621494293,
0.10432355105876923,
0.124519482254982,
0.13606610894203186,
-0.14453665912151337,
0.29950863122940063,
0.14465446770191193,
-0.07274339348077774,
-0.008848831057548523,
0.06192166730761528,
-0.2531186640262604,
0.08993180096149445,
-0.2256287783384323,
0.43068909645080566,
-0.15607845783233643,
-0.14308901131153107,
-0.21582253277301788,
-0.03389628231525421,
-0.09499155730009079,
0.22805047035217285,
-0.2670668363571167,
-0.44024544954299927,
0.3136831223964691,
-0.015163604170084,
-0.049573276191949844,
0.4860709011554718,
-0.00012435750977601856,
0.03861233592033386,
0.15920144319534302,
-0.12939941883087158,
-0.3373616635799408,
-0.09071376919746399,
-0.04957118257880211,
-0.07403568923473358,
0.24771365523338318,
-0.09404069930315018,
-0.009192049503326416,
-0.2564789354801178,
-0.322769433259964,
-0.006043296307325363,
0.3721272349357605,
0.19001764059066772,
0.14271458983421326,
0.19806693494319916,
-0.05535716190934181,
-0.14215688407421112,
-0.10602583736181259,
0.4701841473579407,
-0.139656201004982,
0.1081264317035675,
-0.017582006752490997,
0.1864508092403412,
0.023148976266384125,
0.09829740226268768,
0.02939709834754467,
0.1042649894952774,
0.7815552949905396,
-0.019607670605182648,
-0.08915702253580093,
-0.12908309698104858,
0.05910671129822731,
0.28211355209350586,
0.35406866669654846,
-0.23176759481430054,
-0.2807346284389496,
-0.4919198751449585,
0.03722073882818222,
-0.34507885575294495,
0.2394980490207672,
0.06892049312591553,
-0.25747087597846985,
0.09742814302444458,
-0.09093402326107025,
-0.15619899332523346,
-0.12745609879493713,
0.25658929347991943,
0.13055428862571716,
-0.0008023083209991455,
-0.3612358570098877,
0.1909695863723755,
0.21441741287708282,
-0.348291277885437,
-0.2982630431652069,
-0.17042575776576996,
-0.054593827575445175,
0.312456339597702,
-0.2065712958574295,
0.03533904254436493,
0.10793507099151611,
0.3198544979095459,
0.49257898330688477,
-0.07672017812728882,
0.07879454642534256,
-0.27525606751441956,
0.034205157309770584,
-0.029540888965129852,
0.05971595644950867,
0.39398708939552307,
-0.09656376391649246,
-0.05032176151871681,
-0.06747537106275558,
0.25231167674064636,
0.029051069170236588,
-0.09151307493448257,
0.2063799798488617,
-0.32557249069213867,
0.29943180084228516,
-0.30831655859947205,
0.5973243117332458,
0.020156938582658768,
0.0030849743634462357,
0.16371895372867584,
-0.044574715197086334,
0.008699975907802582,
0.08500377833843231,
0.329293429851532,
0.005497070960700512,
-0.028647102415561676,
0.06649770587682724,
0.3160649538040161,
-0.11622608453035355,
-0.17992444336414337,
-0.22601525485515594,
0.08978094160556793,
-0.16502562165260315,
0.02081817016005516,
0.20714354515075684,
-0.28584080934524536,
0.32143595814704895,
0.3331330418586731,
0.4332031011581421,
-0.2560529410839081,
-0.20818495750427246,
0.09652100503444672,
0.01835593581199646,
0.1223595142364502,
-0.2888224720954895,
0.06149011850357056,
0.25181132555007935,
-0.26287102699279785,
-0.14198827743530273,
0.058530211448669434,
-0.2816399037837982,
-0.3440787196159363,
-0.23698322474956512,
0.08190557360649109,
-0.12033335864543915,
0.053960561752319336,
-0.38874003291130066,
0.41874611377716064,
0.14316383004188538,
0.1089482307434082,
0.1076686903834343,
-0.09911476075649261,
-0.23789258301258087,
-0.2690771222114563,
0.16457554697990417,
0.548581600189209,
-0.4854917526245117,
-0.23544113337993622,
0.08268240094184875,
0.08447489887475967,
-0.14060059189796448,
0.05913033336400986,
-0.317660391330719,
0.24560332298278809,
-0.20736397802829742,
0.13896913826465607,
0.30185070633888245,
-0.22735029458999634,
-0.3982056677341461,
0.2580461800098419,
0.007850535213947296,
0.11337894946336746,
0.3058220148086548,
-0.11413619667291641,
0.06027271971106529,
0.2541496455669403,
0.2270662933588028,
0.13158079981803894,
-0.030561452731490135,
0.04176279157400131,
-0.1600397825241089,
-0.3593123257160187,
-0.06869233399629593,
-0.1420067846775055,
0.04593295231461525,
0.04250727593898773,
-0.0323711633682251,
-0.287647545337677,
0.11094740778207779,
-0.03425465151667595,
0.09724979847669601,
0.2938252091407776,
-0.08108843863010406,
0.02888016402721405,
0.2327922135591507,
0.017511118203401566,
-0.5418198704719543,
0.3054026663303375,
0.1677778959274292,
0.08720757067203522,
-0.07309916615486145,
-0.15264664590358734,
-0.6694720387458801,
0.13964056968688965,
-0.14539596438407898,
-0.12575000524520874,
0.0010163970291614532,
0.1118788868188858,
-0.03951215744018555,
-0.05301209166646004,
-0.3568476736545563,
0.3226403594017029,
-0.2106129378080368,
0.2623629868030548,
-0.3033193051815033,
-0.045138463377952576,
0.1065516546368599,
0.03537631779909134,
-0.17003346979618073,
0.04174390807747841,
0.20059359073638916,
-0.0817582905292511,
-0.2983276844024658,
0.42698296904563904,
0.06636971235275269,
-0.05697105824947357,
-0.2224026322364807,
0.1255214661359787,
0.09832633286714554,
-0.056683484464883804,
-0.002423817291855812,
-0.061739224940538406,
0.25935545563697815,
-0.12122397124767303,
-0.010878108441829681,
0.31980735063552856,
0.10220246016979218,
0.13363686203956604,
-0.13580039143562317,
-0.06962081044912338,
0.09231486171483994,
0.021338392049074173,
-0.242591992020607,
-0.38578668236732483,
0.05226034298539162,
-0.16732332110404968,
0.31293052434921265,
0.16452160477638245,
-0.4524986743927002,
-0.31065449118614197,
0.08675365149974823,
-0.0038145780563354492,
-0.16166487336158752,
0.20192229747772217,
-0.14526903629302979,
0.19125685095787048,
0.002801809459924698,
0.21717436611652374,
0.6604634523391724,
0.1557895541191101,
-0.3976055681705475,
0.2696765661239624,
-0.009922708384692669,
0.018515631556510925,
0.2446081042289734,
0.05917169898748398,
0.15762941539287567,
0.1125040054321289,
0.16943836212158203,
0.06034678965806961,
-0.3071911036968231,
0.060386668890714645,
0.05979791283607483,
0.03931069374084473,
-0.659235417842865,
0.13583318889141083,
-0.25216206908226013,
-0.1558859944343567,
-0.1834900975227356,
-0.09693457931280136,
-0.21542029082775116,
-0.1302761286497116,
-0.11487138271331787,
-0.0484173558652401,
0.2260397970676422,
0.06950642168521881,
-0.19633817672729492,
0.4000813961029053,
-0.02145187184214592,
-0.3265138864517212,
0.02358906716108322,
0.2505054473876953,
-0.14521652460098267,
-0.10989013314247131,
0.11148408055305481,
-0.02595396339893341,
0.38536912202835083,
0.03658950328826904,
-0.015650689601898193,
-0.016603240743279457,
-0.37258070707321167,
0.20780697464942932,
-0.12408290803432465,
0.6330329775810242,
0.3935284912586212,
-0.012842774391174316,
-0.10191962122917175,
-0.14915066957473755,
0.15995217859745026,
0.24963697791099548,
-0.08714160323143005,
-0.014659453183412552,
-0.23688139021396637,
-0.22054240107536316,
-0.24701747298240662,
0.08658745139837265,
0.0680064931511879,
-0.15468229353427887,
0.24623267352581024,
0.17561106383800507,
-0.11741903424263,
0.5675930976867676,
0.2574353814125061,
0.15761439502239227,
0.12292958050966263,
0.3270135223865509,
-0.2779344618320465,
-0.3723590075969696,
0.3082242012023926,
-0.26001158356666565,
-0.2153947800397873,
0.016260389238595963,
-0.31626349687576294,
0.2249741554260254,
-0.055869437754154205,
-0.47733837366104126,
-0.17898410558700562,
-0.31162944436073303,
0.23553210496902466,
-0.14911620318889618,
0.11901795119047165,
0.1820022463798523,
-0.17864705622196198,
0.13468921184539795,
-0.28041648864746094,
-0.6229135394096375,
0.2143557071685791,
0.14118993282318115,
0.2529182434082031,
0.1511521339416504,
0.3197225034236908,
-0.1354258507490158,
0.6674479246139526,
-0.013818446546792984,
-0.1526680886745453,
0.3494233787059784,
-0.2507806718349457,
0.39926809072494507,
-0.1909400224685669,
-0.43384087085723877,
-0.059531792998313904,
0.049615733325481415,
-0.19052612781524658,
0.09719877690076828,
0.054229386150836945,
0.19196990132331848,
0.028604842722415924,
0.059393201023340225,
-0.1469428688287735,
-0.17919957637786865,
-0.09652972221374512,
0.018104633316397667,
0.008541814982891083,
0.08071933686733246,
0.11164727061986923,
-0.30908605456352234,
0.08391401171684265,
-0.06735582649707794,
0.28907310962677,
-0.2664909064769745,
0.10628775507211685,
-0.16288721561431885,
-0.09294238686561584,
-0.4057493805885315,
0.24561481177806854,
0.006062786094844341,
0.032363660633563995,
0.1577557623386383,
0.03442208468914032,
0.2557585835456848,
0.1835419088602066,
0.5962024331092834,
0.010236120782792568,
-0.3227425217628479,
0.1289113461971283,
0.02296825498342514,
-0.45975133776664734,
-0.2065611630678177,
0.20800048112869263,
0.39855775237083435,
0.17159779369831085,
0.5532456040382385,
-0.40216732025146484,
-0.2726263999938965,
0.25119253993034363,
0.18398520350456238,
-0.19343289732933044,
-0.27736616134643555,
-0.27503493428230286,
-0.40697094798088074,
-0.3360787034034729,
0.11542456597089767,
0.23784182965755463,
0.34965798258781433,
0.29783183336257935,
0.3024011254310608,
-0.12252722680568695,
-0.06123859062790871,
0.2336389422416687,
0.27295586466789246,
0.3273506164550781,
0.12481831014156342,
0.05248188599944115,
-0.07405036687850952,
0.07893916964530945,
0.000624530017375946,
0.6693803071975708,
-0.05266355350613594,
-0.44449084997177124,
-0.19958308339118958,
-0.10616661608219147,
0.3953627347946167,
0.3867638111114502,
-0.17753157019615173,
0.26086023449897766,
0.034130167216062546,
0.2878382205963135,
-0.1355336457490921,
0.04785795882344246,
0.3809802830219269,
-0.096063032746315,
-0.2645255923271179,
-0.4083310663700104,
0.49957332015037537,
-0.21324315667152405,
-0.019257865846157074,
0.5857564806938171,
0.7769864797592163,
-0.23597174882888794,
0.29510003328323364,
-0.08993155509233475,
0.9313654899597168,
0.2426123023033142,
0.11502332985401154,
0.49530863761901855,
0.011052362620830536,
0.15559567511081696,
0.26959919929504395,
-0.13600857555866241,
-0.2527117133140564,
0.09028612822294235,
0.06035154312849045,
-0.08251569420099258,
0.21673542261123657,
-0.14789168536663055,
-0.34641653299331665,
0.08686065673828125,
-0.3294256031513214,
0.1940857470035553,
-0.15912938117980957,
0.041308969259262085,
-0.18702255189418793,
-0.4736197888851166,
-0.3520471453666687,
0.06367934495210648,
0.030162904411554337,
0.14940111339092255,
-0.13541251420974731,
-0.11203353852033615,
-0.010545272380113602,
-0.41638219356536865,
-0.2779701352119446,
-0.2951102554798126,
-0.6135258674621582,
0.017550427466630936,
0.5721887350082397,
-0.1316947638988495,
0.33328190445899963,
0.4256322979927063,
0.2347366213798523,
0.11027605831623077,
-0.1622505933046341,
0.10375295579433441,
-0.09643801301717758,
-0.017620733007788658,
-0.2651245892047882,
-0.09924910962581635,
0.32684004306793213,
0.14315715432167053,
-0.20497792959213257,
0.043189939111471176,
-0.08369383960962296,
-0.06012231111526489,
0.10044953227043152,
-0.24015553295612335,
-0.22627563774585724,
-0.67439204454422,
-0.5236490964889526,
-0.20018380880355835,
0.29345768690109253,
-0.15656542778015137,
0.019612077623605728,
-0.03609128296375275,
0.06789775937795639,
0.054273925721645355,
0.3176615536212921,
-0.3841373920440674,
-0.03537583723664284,
0.029061105102300644,
-0.18409085273742676,
-0.022637592628598213,
0.6379597187042236,
0.1261781007051468,
0.035827308893203735,
-0.02065177448093891,
0.21617767214775085,
0.11924465745687485,
-0.45366862416267395,
0.28455647826194763,
0.28612226247787476,
0.059418708086013794,
-0.0005439218948595226,
0.39407289028167725,
0.40764325857162476,
0.07866692543029785,
0.27834948897361755,
-0.147325336933136,
-0.30854788422584534,
0.10907143354415894,
-0.22890780866146088,
0.07752420753240585,
0.0866045132279396,
0.07197553664445877,
0.0077697113156318665,
0.16194194555282593,
-0.20647871494293213,
0.18172606825828552,
-0.05271784961223602,
-0.16830359399318695,
0.4341646134853363,
0.2605399787425995,
0.1695876121520996,
0.03291350603103638,
-0.001378638669848442,
0.06051788479089737,
-0.2787804901599884,
-0.11990468204021454,
-0.6848210692405701,
0.18560856580734253,
0.1241925060749054,
0.05415237694978714,
0.1268870234489441,
-0.20572564005851746,
-0.09474657475948334,
-0.20097993314266205,
0.2723327577114105,
0.3169648349285126,
-0.007935233414173126,
0.2399204522371292,
0.07957130670547485,
-0.006230004131793976,
-0.13395875692367554,
0.06679143011569977,
0.28450167179107666,
0.27068519592285156,
0.16656219959259033,
0.09329347312450409,
-0.1197550967335701,
0.014209941029548645,
-0.26613110303878784,
0.305362343788147,
-0.14051547646522522,
-0.10355030745267868,
0.07839369773864746,
-0.2821797728538513,
0.1678101271390915,
0.23663823306560516,
0.19042158126831055,
0.16208195686340332,
-0.26985272765159607,
0.38978615403175354,
-0.04626511409878731,
0.06862092018127441,
-0.1605187952518463,
-0.011052439920604229,
0.27482855319976807,
0.20452231168746948,
0.051876265555620193,
0.39008545875549316,
0.16108475625514984,
0.07319533824920654,
-0.2793194651603699,
-0.017445702105760574,
-0.001990754157304764,
-0.028935104608535767,
0.11083954572677612,
0.5633798837661743,
-0.14322367310523987,
0.16399700939655304,
0.6363410353660583,
0.30175718665122986,
0.24401086568832397,
0.24987415969371796,
-0.21320638060569763,
0.11829977482557297,
-0.09693045169115067,
0.1307772696018219,
0.00454799085855484,
-0.4607865512371063,
0.4521958529949188,
0.11545582115650177,
-0.11742568016052246,
-0.07393268495798111,
0.016249507665634155,
0.6843680143356323,
0.06723635643720627,
-0.0629781112074852,
-0.2309277355670929,
0.0691908672451973,
-0.21332353353500366,
-0.28962990641593933,
-0.12259858846664429,
-0.15939325094223022,
-0.13157404959201813,
-0.057543642818927765,
-0.20338264107704163,
-0.30042797327041626,
0.3200901746749878,
-0.07236617803573608,
-0.0046992674469947815,
-0.39345261454582214,
0.009443681687116623,
0.12500691413879395,
0.09218538552522659,
-0.3816663324832916,
0.06909354031085968,
0.05319416522979736,
-0.06464134156703949,
0.225303053855896,
0.31633254885673523,
0.6001690626144409,
0.3411564528942108,
-0.05930256471037865,
-0.1195473000407219,
0.02911454066634178,
-0.04650384932756424,
0.03578563779592514,
-0.021820276975631714,
0.17991361021995544,
0.3761671483516693,
0.28540199995040894,
0.038066521286964417,
-0.09704682976007462,
-0.010211639106273651,
0.18525542318820953,
0.2537009119987488,
-0.6493118405342102,
-0.0008760690689086914,
-0.3627111315727234,
0.02294091135263443,
-0.29486924409866333,
0.3832211494445801,
-0.33221718668937683,
0.06969346851110458,
0.6697449684143066,
0.26637086272239685,
0.22853651642799377,
-0.18687981367111206,
0.036288801580667496,
0.027560312300920486,
0.4141587018966675,
0.28638702630996704,
-0.1378706395626068,
-0.3437494933605194,
0.021460838615894318,
-0.6871740221977234,
-0.014740608632564545,
0.002258751541376114,
-0.17990685999393463,
0.3078550398349762,
0.2853337228298187,
0.05241658166050911,
-0.010152783244848251,
0.22295024991035461,
-0.25482580065727234,
0.045025113970041275,
0.267048180103302,
-0.04950729012489319,
-0.3688541650772095,
-0.19682098925113678,
-0.0038237981498241425,
0.15519417822360992,
-0.13849478960037231,
-0.1476150006055832,
-0.037501011043787,
-0.1043490543961525,
-0.23226462304592133,
0.16350042819976807,
0.12942594289779663,
-0.10526023805141449,
0.20924144983291626,
-0.13503088057041168,
0.4617272913455963,
-0.002566002309322357,
-0.09816791862249374,
-0.22879540920257568,
-0.1855861246585846,
-0.33842602372169495,
0.05583592504262924,
-0.14645546674728394,
0.4243098497390747,
-0.3237145245075226,
-0.22113697230815887,
-0.15409114956855774,
0.03260207548737526,
0.23581592738628387,
-0.3194955289363861,
-0.2915128767490387,
0.39799395203590393,
-0.3223298192024231,
0.06336908042430878,
0.26512596011161804,
0.40190330147743225,
-0.24702799320220947,
0.3230206072330475,
0.06638945639133453,
-0.3401300311088562,
0.7292880415916443,
-0.1945580393075943,
-0.29093411564826965,
0.0027595371939241886,
0.07832787930965424,
0.20809003710746765,
-0.4235180914402008,
-0.5677452087402344,
0.05732252448797226,
0.2554726302623749,
-0.1060512587428093,
-0.1516406387090683,
0.40301454067230225,
-0.1529250293970108,
0.05247706547379494,
-0.04030925780534744,
0.20176328718662262,
0.047239288687705994,
-0.08742168545722961,
0.012893334031105042,
-0.3078998327255249
] |
https://github.com/huggingface/datasets/issues/5352 | __init__() got an unexpected keyword argument 'input_size' | Hi, following your suggestion, I changed my call to load_dataset. Below is the latest:
reader = load_dataset('data/mrf.py',"default", input_size=1024, split=split, streaming=True, keep_in_memory=None)
However, I still got the same error.
I have one question that is if I only define input_size=2048 in BUILDER_CONFIGS, may I specify input_size=1024 when loading the dataset? Cause I found that I could only specify name="default" since I only define name="default" in BUILDER_CONFIGS. | ### Describe the bug
I try to define a custom configuration with a input_size attribute following the instructions by "Specifying several dataset configurations" in https://huggingface.co/docs/datasets/v1.2.1/add_dataset.html
But when I load the dataset, I got an error "__init__() got an unexpected keyword argument 'input_size'"
### Steps to reproduce the bug
Following is the code to define the dataset:
class CsvConfig(datasets.BuilderConfig):
"""BuilderConfig for CSV."""
input_size: int = 2048
class MRF(datasets.ArrowBasedBuilder):
"""Archival MRF data"""
BUILDER_CONFIG_CLASS = CsvConfig
VERSION = datasets.Version("1.0.0")
BUILDER_CONFIGS = [
CsvConfig(name="default", version=VERSION, description="MRF data", input_size=2048),
]
...
def _generate_examples(self):
input_size = self.config.input_size
if input_size > 1000:
numin = 10000
else:
numin = 15000
Below is the code to load the dataset:
reader = load_dataset("default", input_size=1024)
### Expected behavior
I hope to pass the "input_size" parameter to MRF datasets, and change "input_size" to any value when loading the datasets.
### Environment info
- `datasets` version: 2.5.1
- Platform: Linux-4.18.0-305.3.1.el8.x86_64-x86_64-with-glibc2.31
- Python version: 3.9.12
- PyArrow version: 9.0.0
- Pandas version: 1.5.0 | 65 | __init__() got an unexpected keyword argument 'input_size'
### Describe the bug
I try to define a custom configuration with a input_size attribute following the instructions by "Specifying several dataset configurations" in https://huggingface.co/docs/datasets/v1.2.1/add_dataset.html
But when I load the dataset, I got an error "__init__() got an unexpected keyword argument 'input_size'"
### Steps to reproduce the bug
Following is the code to define the dataset:
class CsvConfig(datasets.BuilderConfig):
"""BuilderConfig for CSV."""
input_size: int = 2048
class MRF(datasets.ArrowBasedBuilder):
"""Archival MRF data"""
BUILDER_CONFIG_CLASS = CsvConfig
VERSION = datasets.Version("1.0.0")
BUILDER_CONFIGS = [
CsvConfig(name="default", version=VERSION, description="MRF data", input_size=2048),
]
...
def _generate_examples(self):
input_size = self.config.input_size
if input_size > 1000:
numin = 10000
else:
numin = 15000
Below is the code to load the dataset:
reader = load_dataset("default", input_size=1024)
### Expected behavior
I hope to pass the "input_size" parameter to MRF datasets, and change "input_size" to any value when loading the datasets.
### Environment info
- `datasets` version: 2.5.1
- Platform: Linux-4.18.0-305.3.1.el8.x86_64-x86_64-with-glibc2.31
- Python version: 3.9.12
- PyArrow version: 9.0.0
- Pandas version: 1.5.0
Hi, following your suggestion, I changed my call to load_dataset. Below is the latest:
reader = load_dataset('data/mrf.py',"default", input_size=1024, split=split, streaming=True, keep_in_memory=None)
However, I still got the same error.
I have one question that is if I only define input_size=2048 in BUILDER_CONFIGS, may I specify input_size=1024 when loading the dataset? Cause I found that I could only specify name="default" since I only define name="default" in BUILDER_CONFIGS. | [
-0.0031092092394828796,
-0.610080361366272,
0.08474177122116089,
0.43197429180145264,
0.22831253707408905,
0.08452815562486649,
0.25838616490364075,
-0.010628856718540192,
-0.14234106242656708,
0.10592211782932281,
0.11637122929096222,
0.1483895629644394,
-0.14506681263446808,
0.2759251892566681,
0.12328696995973587,
-0.04333634674549103,
-0.008886769413948059,
0.039320193231105804,
-0.23724892735481262,
0.09822934865951538,
-0.23413053154945374,
0.41954508423805237,
-0.17307144403457642,
-0.16919739544391632,
-0.17487138509750366,
-0.022521184757351875,
-0.08187110722064972,
0.22033768892288208,
-0.24893836677074432,
-0.4662763178348541,
0.30231693387031555,
0.01408621110022068,
-0.08054608106613159,
0.46694859862327576,
-0.00012447529297787696,
0.07583409547805786,
0.18020100891590118,
-0.12944862246513367,
-0.36150631308555603,
-0.08815392851829529,
-0.03503505885601044,
-0.05492311716079712,
0.23609252274036407,
-0.11317789554595947,
0.008641950786113739,
-0.28573545813560486,
-0.2855357825756073,
-0.011731293052434921,
0.33277878165245056,
0.2066534459590912,
0.13591189682483673,
0.2106209546327591,
-0.07016072422266006,
-0.14115940034389496,
-0.11826329678297043,
0.4663967490196228,
-0.1322031170129776,
0.10124525427818298,
-0.027639776468276978,
0.1938536912202835,
-0.016378827393054962,
0.09456032514572144,
0.016683431342244148,
0.13080856204032898,
0.7559492588043213,
-0.024211514741182327,
-0.08995269984006882,
-0.10166659951210022,
0.0643412321805954,
0.2737434506416321,
0.32553330063819885,
-0.2379159927368164,
-0.2981339991092682,
-0.5226919054985046,
0.017977770417928696,
-0.32105886936187744,
0.2098860740661621,
0.06476832926273346,
-0.28412264585494995,
0.1066952496767044,
-0.1015310138463974,
-0.13220730423927307,
-0.12221769243478775,
0.25759100914001465,
0.06829319894313812,
0.02341209352016449,
-0.3631916642189026,
0.20162659883499146,
0.19494368135929108,
-0.3502243757247925,
-0.3056177496910095,
-0.17359936237335205,
-0.025448057800531387,
0.28893131017684937,
-0.19781510531902313,
0.06788000464439392,
0.14851006865501404,
0.32655104994773865,
0.4981793165206909,
-0.11287885904312134,
0.08896312862634659,
-0.2782657742500305,
0.04052361100912094,
-0.03496219217777252,
0.026218177750706673,
0.3811255991458893,
-0.08850803226232529,
-0.04028044641017914,
-0.06863697618246078,
0.2690049409866333,
0.03551545366644859,
-0.07681126147508621,
0.21704454720020294,
-0.29644134640693665,
0.2976158559322357,
-0.31675752997398376,
0.6379781365394592,
0.05955910310149193,
-0.034480758011341095,
0.15303422510623932,
-0.04086100682616234,
0.008514532819390297,
0.1016804501414299,
0.34791383147239685,
-0.030558381229639053,
-0.019132036715745926,
0.030179709196090698,
0.3119959235191345,
-0.12247341126203537,
-0.14155244827270508,
-0.22865186631679535,
0.08357757329940796,
-0.1317412406206131,
0.003017655573785305,
0.2026519775390625,
-0.2810606062412262,
0.3270341753959656,
0.32053256034851074,
0.42074859142303467,
-0.21664774417877197,
-0.20401319861412048,
0.09977774322032928,
0.04066905379295349,
0.11440236866474152,
-0.27464306354522705,
0.06967476010322571,
0.238514244556427,
-0.2728400230407715,
-0.1263493150472641,
0.054909128695726395,
-0.2702142596244812,
-0.32830628752708435,
-0.21391910314559937,
0.09312041848897934,
-0.14433038234710693,
0.043816037476062775,
-0.34755679965019226,
0.41782471537590027,
0.14660996198654175,
0.08951246738433838,
0.10412286221981049,
-0.09708486497402191,
-0.26639193296432495,
-0.28832393884658813,
0.18258711695671082,
0.5590406060218811,
-0.457487553358078,
-0.2756882607936859,
0.09187507629394531,
0.08162371814250946,
-0.160776287317276,
0.031019177287817,
-0.3180929124355316,
0.21996617317199707,
-0.21682462096214294,
0.15452489256858826,
0.29846227169036865,
-0.24208973348140717,
-0.41598278284072876,
0.2724955379962921,
-0.009167931973934174,
0.13713985681533813,
0.3405938744544983,
-0.14064106345176697,
0.06300194561481476,
0.24882863461971283,
0.2570907175540924,
0.119358591735363,
-0.013239262625575066,
0.06248834729194641,
-0.15577146410942078,
-0.3547319769859314,
-0.05928646773099899,
-0.12690098583698273,
0.04241888225078583,
0.0022922828793525696,
-0.013036094605922699,
-0.2640243470668793,
0.14680665731430054,
-0.018629495054483414,
0.0964265763759613,
0.2928934097290039,
-0.09136757254600525,
-0.004504024982452393,
0.22699867188930511,
0.014313094317913055,
-0.5408082008361816,
0.297276109457016,
0.17958641052246094,
0.09420280903577805,
-0.0973275750875473,
-0.1869231015443802,
-0.6841019988059998,
0.13898621499538422,
-0.15389665961265564,
-0.12212273478507996,
0.012009967118501663,
0.16499535739421844,
-0.06628445535898209,
-0.02975599095225334,
-0.3305853009223938,
0.3423440158367157,
-0.2003752738237381,
0.24762152135372162,
-0.316455215215683,
-0.07537171989679337,
0.10632966458797455,
0.050001196563243866,
-0.1857578158378601,
0.03057171404361725,
0.1880027949810028,
-0.08344394713640213,
-0.27147820591926575,
0.40997982025146484,
0.07685905694961548,
-0.03504715859889984,
-0.2648617923259735,
0.10930922627449036,
0.11578692495822906,
-0.011822998523712158,
-0.018156247213482857,
-0.05172763392329216,
0.2552652657032013,
-0.12825994193553925,
-0.039473094046115875,
0.31219273805618286,
0.13229092955589294,
0.13750869035720825,
-0.09965915977954865,
-0.08579044044017792,
0.08697526901960373,
0.024558816105127335,
-0.2579900324344635,
-0.39583390951156616,
0.0372239425778389,
-0.15447066724300385,
0.3217011094093323,
0.1951528787612915,
-0.44148337841033936,
-0.2569131553173065,
0.11182922124862671,
0.005784139037132263,
-0.1567925214767456,
0.17248481512069702,
-0.14827415347099304,
0.16571393609046936,
-0.004856979474425316,
0.24238483607769012,
0.6590372323989868,
0.14451801776885986,
-0.34767410159111023,
0.27588436007499695,
-0.011907744221389294,
0.003844037652015686,
0.2463786005973816,
0.08090199530124664,
0.14465081691741943,
0.1268945336341858,
0.20242521166801453,
0.03990941494703293,
-0.28396981954574585,
0.06526462733745575,
0.09519916027784348,
0.0228109173476696,
-0.6773803234100342,
0.1429298371076584,
-0.28804218769073486,
-0.14882157742977142,
-0.17576220631599426,
-0.11279095709323883,
-0.18472960591316223,
-0.16538244485855103,
-0.11253343522548676,
-0.03320913389325142,
0.22493812441825867,
0.09176324307918549,
-0.20954519510269165,
0.35832279920578003,
-0.021526016294956207,
-0.3604031503200531,
0.04650720953941345,
0.26189282536506653,
-0.1309681236743927,
-0.10216520726680756,
0.0914326012134552,
-0.03712764382362366,
0.3782993257045746,
0.03451564162969589,
-0.02924867533147335,
-0.015110554173588753,
-0.3935800790786743,
0.20679083466529846,
-0.11517511308193207,
0.6414684653282166,
0.44865620136260986,
-0.04601117968559265,
-0.0800948292016983,
-0.13006791472434998,
0.12506699562072754,
0.27006158232688904,
-0.08310671150684357,
-0.00130564346909523,
-0.24643096327781677,
-0.21332477033138275,
-0.24409262835979462,
0.08698253333568573,
0.04395084083080292,
-0.17123886942863464,
0.22821640968322754,
0.1658315658569336,
-0.12415745854377747,
0.5772456526756287,
0.23459677398204803,
0.17506571114063263,
0.11535072326660156,
0.3448258340358734,
-0.26151376962661743,
-0.34423309564590454,
0.30405277013778687,
-0.24961824715137482,
-0.20210468769073486,
-0.00849100574851036,
-0.3319951295852661,
0.22563757002353668,
-0.02619248256087303,
-0.47275876998901367,
-0.19734583795070648,
-0.31586554646492004,
0.25080376863479614,
-0.1399611383676529,
0.12169612944126129,
0.19032855331897736,
-0.18708929419517517,
0.13631635904312134,
-0.3010251224040985,
-0.6353939771652222,
0.1870260238647461,
0.1397247165441513,
0.2335532009601593,
0.15024203062057495,
0.2969815135002136,
-0.08136507868766785,
0.6495429277420044,
-0.02310219779610634,
-0.15846242010593414,
0.3365696966648102,
-0.2697994112968445,
0.41673603653907776,
-0.16445469856262207,
-0.4377078413963318,
-0.06182229146361351,
0.06974442303180695,
-0.2008039355278015,
0.09014398604631424,
0.03961944207549095,
0.20575301349163055,
0.023230649530887604,
0.02201925590634346,
-0.1418961137533188,
-0.18554776906967163,
-0.11491328477859497,
0.05360215902328491,
0.02426915615797043,
0.09688888490200043,
0.15462547540664673,
-0.3081059753894806,
0.09500402957201004,
-0.10471557080745697,
0.310329407453537,
-0.2598285377025604,
0.1247226819396019,
-0.14924350380897522,
-0.06958150863647461,
-0.4088665843009949,
0.229905903339386,
0.038179393857717514,
0.03687594458460808,
0.1892348676919937,
-0.005306735634803772,
0.23145443201065063,
0.14274436235427856,
0.5945146679878235,
0.029529336839914322,
-0.2974015474319458,
0.14645271003246307,
0.04567290097475052,
-0.4767987132072449,
-0.19928786158561707,
0.22742173075675964,
0.39132845401763916,
0.1638660579919815,
0.5560709238052368,
-0.3933298885822296,
-0.27935469150543213,
0.2437819391489029,
0.19388556480407715,
-0.19403159618377686,
-0.2538847029209137,
-0.26968103647232056,
-0.44448569416999817,
-0.34173816442489624,
0.10138554871082306,
0.23257146775722504,
0.33254432678222656,
0.2869221568107605,
0.31436827778816223,
-0.11644050478935242,
-0.06586963683366776,
0.2329007089138031,
0.28002798557281494,
0.29590559005737305,
0.1181148961186409,
0.06012338027358055,
-0.09207172691822052,
0.05356863513588905,
0.01351061463356018,
0.6635940074920654,
-0.04620608314871788,
-0.45205169916152954,
-0.20808297395706177,
-0.0897437259554863,
0.36124280095100403,
0.38379526138305664,
-0.20046484470367432,
0.27035969495773315,
0.05392228811979294,
0.2706148028373718,
-0.12181160598993301,
0.07058967649936676,
0.37713727355003357,
-0.12427040934562683,
-0.2710622549057007,
-0.40739312767982483,
0.4901058077812195,
-0.21532461047172546,
-0.03511762246489525,
0.5423192977905273,
0.755952775478363,
-0.24971188604831696,
0.2809772491455078,
-0.11016441136598587,
0.8453896045684814,
0.280009388923645,
0.12833534181118011,
0.5142931342124939,
0.008153226226568222,
0.13451503217220306,
0.29502081871032715,
-0.141959547996521,
-0.23494146764278412,
0.1091805249452591,
0.062380559742450714,
-0.07331036031246185,
0.20013999938964844,
-0.15422846376895905,
-0.35320523381233215,
0.10364562273025513,
-0.31089675426483154,
0.19155891239643097,
-0.13564978539943695,
0.059148840606212616,
-0.20067919790744781,
-0.4605884850025177,
-0.348773330450058,
0.06053929775953293,
0.02217049151659012,
0.1439746618270874,
-0.11310410499572754,
-0.1108538955450058,
0.021538641303777695,
-0.43484413623809814,
-0.266793817281723,
-0.3086513876914978,
-0.6278384327888489,
0.007154161110520363,
0.5623368620872498,
-0.13007548451423645,
0.31073734164237976,
0.4206055700778961,
0.2174118012189865,
0.12093448638916016,
-0.14585186541080475,
0.11038704216480255,
-0.10646987706422806,
0.004679013043642044,
-0.23708635568618774,
-0.11440540850162506,
0.3655933737754822,
0.16441446542739868,
-0.20257604122161865,
0.010362856090068817,
-0.08862453699111938,
-0.039961885660886765,
0.08253258466720581,
-0.23736698925495148,
-0.21616153419017792,
-0.6749003529548645,
-0.5138638019561768,
-0.22765964269638062,
0.269945353269577,
-0.162471204996109,
0.011031253263354301,
-0.04341866075992584,
0.06818120926618576,
0.0585591122508049,
0.28393664956092834,
-0.38138630986213684,
-0.042428772896528244,
0.04934616759419441,
-0.19796302914619446,
-0.03616482391953468,
0.6283177137374878,
0.10717302560806274,
0.035183779895305634,
-0.009209208190441132,
0.2126074731349945,
0.11022477596998215,
-0.42218756675720215,
0.27917543053627014,
0.2841988205909729,
0.06829950213432312,
-0.003941320348531008,
0.36574411392211914,
0.3581397533416748,
0.07397274672985077,
0.2736096978187561,
-0.14814454317092896,
-0.3248218595981598,
0.11850934475660324,
-0.21584893763065338,
0.0521915927529335,
0.1328035593032837,
0.06200156733393669,
0.022962385788559914,
0.12118150293827057,
-0.2024640291929245,
0.2064041644334793,
-0.03352024778723717,
-0.1719173789024353,
0.42767447233200073,
0.25182443857192993,
0.17633838951587677,
0.04551074281334877,
0.014377975836396217,
0.05238237977027893,
-0.2587994635105133,
-0.11783625185489655,
-0.713110089302063,
0.18349583446979523,
0.1135898008942604,
0.04636600613594055,
0.13936607539653778,
-0.20714013278484344,
-0.09002931416034698,
-0.18792641162872314,
0.3132321238517761,
0.3316281735897064,
-0.024035945534706116,
0.25721919536590576,
0.06418298929929733,
0.01921733468770981,
-0.10037165880203247,
0.06342901289463043,
0.2869755029678345,
0.2523738145828247,
0.1653658002614975,
0.13208232820034027,
-0.13655385375022888,
0.03311477601528168,
-0.2596937119960785,
0.2944498062133789,
-0.15512697398662567,
-0.10321532934904099,
0.0793776884675026,
-0.28987473249435425,
0.1597680151462555,
0.2224898338317871,
0.19688284397125244,
0.15949374437332153,
-0.2809351980686188,
0.3861880600452423,
-0.0533113107085228,
0.06698723137378693,
-0.1511322557926178,
-0.021304724738001823,
0.28059837222099304,
0.198240727186203,
0.08943811058998108,
0.4041703939437866,
0.15364724397659302,
0.06758292019367218,
-0.2580820322036743,
-0.010713623836636543,
0.018319062888622284,
-0.03287240117788315,
0.1066652238368988,
0.5956264138221741,
-0.15788671374320984,
0.1592271775007248,
0.60831218957901,
0.28972116112709045,
0.2624349296092987,
0.28437477350234985,
-0.19617429375648499,
0.14525075256824493,
-0.08500600606203079,
0.10892961174249649,
0.00022010505199432373,
-0.45060521364212036,
0.46692439913749695,
0.11807683110237122,
-0.14835885167121887,
-0.04394801706075668,
0.051298413425683975,
0.6744087338447571,
0.07795168459415436,
-0.03391546010971069,
-0.2017831951379776,
0.049400694668293,
-0.2046419084072113,
-0.33084067702293396,
-0.10200852155685425,
-0.17148056626319885,
-0.12683621048927307,
-0.06788425892591476,
-0.210113525390625,
-0.3000602722167969,
0.3041471540927887,
-0.08290956914424896,
-0.004926688969135284,
-0.39815792441368103,
0.01719285547733307,
0.10243979096412659,
0.10131999850273132,
-0.3880249261856079,
0.06859566271305084,
0.078135184943676,
-0.058914393186569214,
0.2360226809978485,
0.2832283079624176,
0.6160981059074402,
0.3115790784358978,
-0.06364387273788452,
-0.13077007234096527,
0.017406094819307327,
-0.050160448998212814,
-0.005860261619091034,
-0.04944591224193573,
0.1555444300174713,
0.37878623604774475,
0.28729355335235596,
0.038845837116241455,
-0.09787694364786148,
0.0222801323980093,
0.20363211631774902,
0.20260152220726013,
-0.6582410931587219,
0.029949672520160675,
-0.3798646926879883,
0.028363771736621857,
-0.27830904722213745,
0.4129995107650757,
-0.3311865031719208,
0.07074519991874695,
0.6913146376609802,
0.27974456548690796,
0.2505752146244049,
-0.1862475872039795,
0.038256995379924774,
0.04147937893867493,
0.40751972794532776,
0.2589505910873413,
-0.14376142621040344,
-0.30050694942474365,
0.05495716631412506,
-0.6939618587493896,
-0.010499060153961182,
0.01823476329445839,
-0.1613008975982666,
0.30795368552207947,
0.27167463302612305,
0.05526547133922577,
-0.013882100582122803,
0.2099117636680603,
-0.25179073214530945,
0.06808239966630936,
0.2641485929489136,
-0.024792253971099854,
-0.40208572149276733,
-0.1794346421957016,
-0.025086263194680214,
0.16566774249076843,
-0.16899153590202332,
-0.14730192720890045,
-0.06365995109081268,
-0.09051286429166794,
-0.262535035610199,
0.17755027115345,
0.15256595611572266,
-0.1178370863199234,
0.18748323619365692,
-0.13033710420131683,
0.45993679761886597,
-0.028294479474425316,
-0.10848936438560486,
-0.2544725239276886,
-0.16650733351707458,
-0.35653048753738403,
0.04297402501106262,
-0.17224685847759247,
0.421083927154541,
-0.29344189167022705,
-0.23285023868083954,
-0.13629063963890076,
0.012495984323322773,
0.25565797090530396,
-0.3281130790710449,
-0.2642578184604645,
0.4283559322357178,
-0.33927929401397705,
0.07031240314245224,
0.24203698337078094,
0.4027779698371887,
-0.24517741799354553,
0.32952943444252014,
0.05801407992839813,
-0.3807920217514038,
0.7252452969551086,
-0.18566571176052094,
-0.29006779193878174,
-0.015673628076910973,
0.06133041903376579,
0.157978355884552,
-0.4194142520427704,
-0.5889689326286316,
0.07669349759817123,
0.2874698042869568,
-0.11169559508562088,
-0.1717577874660492,
0.3925468623638153,
-0.14593681693077087,
0.043537165969610214,
-0.05769672244787216,
0.18818095326423645,
0.0561206191778183,
-0.09912245720624924,
0.022048305720090866,
-0.29625117778778076
] |
https://github.com/huggingface/datasets/issues/5351 | Do we need to implement `_prepare_split`? | Hi! `DatasetBuilder` is a parent class for concrete builders: `GeneratorBasedBuilder`, `ArrowBasedBuilder` and `BeamBasedBuilder`. When writing a builder script, these classes are the ones you should inherit from. And since all of them implement `_prepare_split`, you only have to implement the three methods mentioned above. | ### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
| 44 | Do we need to implement `_prepare_split`?
### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
Hi! `DatasetBuilder` is a parent class for concrete builders: `GeneratorBasedBuilder`, `ArrowBasedBuilder` and `BeamBasedBuilder`. When writing a builder script, these classes are the ones you should inherit from. And since all of them implement `_prepare_split`, you only have to implement the three methods mentioned above. | [
-0.39684659242630005,
0.028263568878173828,
0.038606513291597366,
0.26486533880233765,
0.14727875590324402,
0.2111169397830963,
0.5743995904922485,
0.3013264238834381,
-0.35358813405036926,
0.27159470319747925,
0.09605718404054642,
0.13665761053562164,
-0.08747748285531998,
-0.15181736648082733,
0.14780128002166748,
-0.42070913314819336,
0.14535833895206451,
0.1660146415233612,
0.16208773851394653,
-0.1653870940208435,
-0.3060036599636078,
0.1335560530424118,
-0.28613731265068054,
-0.018275029957294464,
-0.014041372574865818,
-0.19102515280246735,
-0.3446138799190521,
0.2566714584827423,
0.015331882052123547,
-0.01015452016144991,
0.19002343714237213,
0.14374659955501556,
0.012923896312713623,
0.29963812232017517,
-0.00011747405369533226,
0.022941559553146362,
0.18693788349628448,
0.037026211619377136,
-0.28322234749794006,
0.1104830652475357,
-0.37851041555404663,
-0.1806396096944809,
0.021225344389677048,
-0.13775314390659332,
-0.1588188111782074,
-0.1996767222881317,
-0.061121128499507904,
0.09741990268230438,
0.4871101379394531,
-0.11936972290277481,
0.17597708106040955,
0.02434464916586876,
0.27351364493370056,
-0.23213663697242737,
0.36309370398521423,
0.1646580994129181,
-0.2933652102947235,
0.0010855542495846748,
-0.3826949894428253,
0.37199515104293823,
0.0005425959825515747,
0.14257007837295532,
0.01083565317094326,
0.15484939515590668,
0.15728209912776947,
0.21359305083751678,
-0.22176891565322876,
-0.41140177845954895,
-0.18386536836624146,
0.22885140776634216,
0.1845511794090271,
-0.06408900767564774,
-0.6015823483467102,
-0.40237295627593994,
-0.08474969863891602,
-0.39087918400764465,
0.2498781979084015,
0.08445042371749878,
0.08495074510574341,
0.13040415942668915,
0.18502093851566315,
-0.3826562464237213,
-0.08255728334188461,
0.015825849026441574,
0.06130083650350571,
0.2952607572078705,
-0.06226996332406998,
0.1560605764389038,
0.2717878520488739,
0.16989749670028687,
0.21911954879760742,
-0.1744018942117691,
-0.06355585157871246,
0.19579550623893738,
-0.1356973648071289,
-0.31445595622062683,
-0.2376558482646942,
-0.008966110646724701,
-0.1408722698688507,
0.20624682307243347,
-0.06777498126029968,
0.0807190090417862,
0.42259854078292847,
0.25069308280944824,
0.148600772023201,
-0.04463319480419159,
-0.016697287559509277,
0.48730266094207764,
0.2475123554468155,
-0.04061730578541756,
0.052557382732629776,
-0.11991200596094131,
-0.09080676734447479,
-0.24119935929775238,
-0.010137056931853294,
0.10603164881467819,
0.12858586013317108,
-0.06924451887607574,
-0.26513412594795227,
-0.21649104356765747,
-0.5023368000984192,
-0.21063846349716187,
0.21955257654190063,
0.10517436265945435,
0.1284000724554062,
0.064239501953125,
0.03324189782142639,
0.022569913417100906,
-0.35357993841171265,
-0.40791329741477966,
-0.14177419245243073,
0.10359297692775726,
-0.2609596252441406,
0.23590043187141418,
0.004826676100492477,
-0.35990655422210693,
-0.09566053748130798,
0.22641710937023163,
0.18358878791332245,
0.09278200566768646,
0.314890593290329,
-0.1250021755695343,
0.07167699933052063,
0.45175570249557495,
0.10588033497333527,
-0.09202926605939865,
0.06544142216444016,
0.073043093085289,
-0.21463599801063538,
-0.08073849231004715,
-0.10297957807779312,
-0.5045248866081238,
-0.049303025007247925,
0.15910503268241882,
0.16796211898326874,
0.2293487787246704,
-0.031487904489040375,
0.1408950239419937,
0.5039725303649902,
-0.1939413696527481,
-0.05727396160364151,
-0.17013923823833466,
-0.026260968297719955,
-0.18988627195358276,
0.3036646544933319,
0.2773198187351227,
-0.401644766330719,
0.09226536750793457,
-0.7184799313545227,
-0.16774006187915802,
0.5405654907226562,
0.14763866364955902,
-0.0746159479022026,
0.2311374843120575,
-0.26274338364601135,
0.3361905813217163,
0.48538774251937866,
0.017970960587263107,
-0.036314792931079865,
0.5023655891418457,
0.11890998482704163,
0.10742569714784622,
0.333443820476532,
-0.08776962757110596,
0.14591141045093536,
-0.20631597936153412,
-0.052705079317092896,
0.2896369695663452,
-0.31835824251174927,
-0.3146226406097412,
-0.21228303015232086,
-0.17161352932453156,
0.0773966833949089,
0.16674552857875824,
0.28786981105804443,
0.1822900027036667,
0.06606683880090714,
0.10566171258687973,
0.19938117265701294,
-0.18416602909564972,
0.0943569615483284,
-0.04461175203323364,
0.3000200688838959,
0.23335805535316467,
-0.04686537757515907,
-0.10540944337844849,
-0.15513670444488525,
-0.029079973697662354,
-0.1268458068370819,
-0.012344986200332642,
0.2983875870704651,
-0.42012810707092285,
0.11186052113771439,
-0.14578871428966522,
-0.38800016045570374,
-0.13781365752220154,
0.04966399073600769,
-0.19142234325408936,
0.03738008067011833,
-0.38862380385398865,
-0.06873836368322372,
0.20474745333194733,
-0.28792521357536316,
0.4126656949520111,
-0.32395315170288086,
0.3116569519042969,
-0.142796128988266,
-0.043284717947244644,
-0.20283591747283936,
0.2716238498687744,
0.14596334099769592,
-0.2830008566379547,
-0.06441003829240799,
0.5136758685112,
0.291328102350235,
-0.24997763335704803,
-0.059897281229496,
-0.2693110704421997,
0.08354587107896805,
-0.15337182581424713,
0.042650770395994186,
0.031973011791706085,
-0.02706761658191681,
-0.051615532487630844,
0.14399263262748718,
0.4913005232810974,
0.366813063621521,
0.11045161634683609,
0.2624824643135071,
0.08640622347593307,
0.05055227875709534,
0.19224467873573303,
-0.025131959468126297,
-0.5075973272323608,
-0.14128746092319489,
-0.1288161277770996,
0.36693763732910156,
0.037243615835905075,
-0.23756958544254303,
0.12378554791212082,
0.33912959694862366,
-0.0939384400844574,
0.0564550943672657,
-0.002696774899959564,
0.032512366771698,
-0.03267534822225571,
0.19626852869987488,
0.6504374146461487,
0.46662062406539917,
0.16019925475120544,
0.18037693202495575,
0.20965346693992615,
-0.08586877584457397,
-0.14688369631767273,
0.33640286326408386,
0.2990989089012146,
0.13856849074363708,
-0.06140373647212982,
-0.33035337924957275,
0.06392353028059006,
-0.3187515139579773,
0.0926380604505539,
0.17019931972026825,
0.07574108242988586,
-0.272845059633255,
0.20274867117404938,
-0.25227856636047363,
0.11746247857809067,
-0.05071716755628586,
-0.08012167364358902,
-0.1913539171218872,
-0.35754266381263733,
0.03426313400268555,
0.0016134455800056458,
-0.29701390862464905,
0.16204673051834106,
-0.18612495064735413,
0.18825514614582062,
-0.12258162349462509,
0.023716170340776443,
0.04185888171195984,
0.3042150139808655,
-0.2979263365268707,
0.057803910225629807,
0.16507954895496368,
-0.1444491147994995,
0.3168366551399231,
-0.03936731070280075,
-0.1276976764202118,
-0.08117051422595978,
-0.5159487724304199,
0.2702007293701172,
-0.2245928794145584,
0.2663232684135437,
0.4786919057369232,
-0.4132232666015625,
0.04565294086933136,
-0.4948858320713043,
0.1087316945195198,
-0.15118210017681122,
-0.09252903610467911,
-0.05147195979952812,
-0.11129637062549591,
0.0948367565870285,
-0.35219115018844604,
-0.4680473506450653,
-0.11007628589868546,
-0.4203089475631714,
-0.12111446261405945,
-0.07681912183761597,
0.238184854388237,
0.1925923377275467,
-0.13644681870937347,
0.00296865776181221,
-0.028139689937233925,
-0.132253497838974,
-0.327067494392395,
0.015882376581430435,
0.2679441571235657,
-0.6211180686950684,
-0.10632839798927307,
0.044059086591005325,
-0.3742111921310425,
0.33532145619392395,
0.28402459621429443,
0.04607991874217987,
0.14194205403327942,
-0.19706767797470093,
-0.05222194641828537,
-0.15237724781036377,
0.06522414833307266,
0.1761888861656189,
0.14206793904304504,
0.026619983837008476,
-0.0661187618970871,
0.1303909868001938,
0.23738199472427368,
-0.11329738050699234,
0.2719256281852722,
-0.23288428783416748,
0.5564010739326477,
-0.05160555988550186,
1.0884464979171753,
-0.03055630996823311,
0.035857267677783966,
0.056173793971538544,
0.1555497795343399,
0.2330702692270279,
-0.057868726551532745,
-0.3012399673461914,
0.15010754764080048,
0.0013234466314315796,
-0.20803478360176086,
0.21802037954330444,
0.008280155248939991,
-0.29986992478370667,
-0.02094067446887493,
0.15389686822891235,
-0.0890190601348877,
-0.43301600217819214,
-0.1505630761384964,
-0.2020646631717682,
0.4340951144695282,
-0.03510919585824013,
0.4342504143714905,
0.0068663060665130615,
0.16457009315490723,
-0.3399643003940582,
0.37511032819747925,
0.3924174904823303,
-0.08463743329048157,
0.06664139032363892,
-0.006820078939199448,
-0.13740777969360352,
0.4405192732810974,
0.1433136910200119,
0.26458853483200073,
-0.09999056905508041,
-0.16890555620193481,
0.09111547470092773,
-0.10114522278308868,
0.37898099422454834,
-0.35058319568634033,
-0.2927839159965515,
0.19355928897857666,
-0.2848760485649109,
-0.2273978292942047,
-0.22696629166603088,
-0.18112404644489288,
0.03454948961734772,
0.07233735918998718,
-0.3326079845428467,
-0.3115488290786743,
-0.3117128014564514,
0.7352997064590454,
-0.1864841878414154,
-0.08025507628917694,
-0.15027150511741638,
-0.186609148979187,
-0.3156912922859192,
-0.20027951896190643,
-0.016922980546951294,
-0.038802534341812134,
0.03560464084148407,
-0.2930353581905365,
-0.13759002089500427,
-0.08352375030517578,
-0.13190388679504395,
0.23352229595184326,
0.018593162298202515,
0.22021484375,
-0.2994156777858734,
0.18879397213459015,
0.13807091116905212,
0.06922152638435364,
0.3746967911720276,
0.15566593408584595,
-0.1372116059064865,
-0.07001984119415283,
0.27345797419548035,
-0.1669098138809204,
0.5717335939407349,
0.37936145067214966,
-0.47992101311683655,
0.2568068504333496,
-0.04967688024044037,
0.09850376099348068,
-0.23076754808425903,
-0.11333414912223816,
0.42127928137779236,
-0.17206160724163055,
-0.13391220569610596,
-0.7076979279518127,
0.2136102020740509,
0.20300352573394775,
-0.10186022520065308,
0.23167762160301208,
0.22539229691028595,
-0.36115118861198425,
0.1966238170862198,
0.160946324467659,
0.8526101112365723,
0.40424132347106934,
0.14474493265151978,
0.37336477637290955,
0.10990853607654572,
0.15516865253448486,
-0.1633453667163849,
0.39535099267959595,
-0.2653314769268036,
-0.06914123892784119,
-0.1323762685060501,
-0.09144262969493866,
0.6105437278747559,
0.10514269769191742,
-0.11441493034362793,
0.37567275762557983,
-0.24762585759162903,
0.17863868176937103,
-0.016957847401499748,
0.148300901055336,
-0.35417428612709045,
-0.38956543803215027,
-0.026333242654800415,
0.07703375816345215,
0.1757497787475586,
0.08829361945390701,
-0.15674766898155212,
-0.1366119086742401,
0.02816503867506981,
-0.1252015084028244,
-0.12678304314613342,
0.1978612244129181,
-0.018866870552301407,
0.236222505569458,
-0.10481336712837219,
-0.31014519929885864,
0.6872695684432983,
-0.4096830189228058,
0.24755938351154327,
0.304944783449173,
0.0910269021987915,
0.1516876220703125,
-0.15852829813957214,
0.20086835324764252,
-0.11514471471309662,
0.02387591078877449,
0.4507102370262146,
0.006011147052049637,
0.09194812923669815,
-0.27010664343833923,
-0.1529843509197235,
-0.2632179856300354,
-0.3791462779045105,
-0.051137641072273254,
0.11800803244113922,
-0.43072620034217834,
0.2948971092700958,
0.2032589465379715,
-0.22466377913951874,
-0.3728600740432739,
0.0763261467218399,
-0.06998500227928162,
-0.35993242263793945,
0.13210003077983856,
-0.2497638612985611,
-0.020405709743499756,
-0.21844890713691711,
0.17189612984657288,
0.15930604934692383,
0.16388572752475739,
0.4034930169582367,
-0.15477028489112854,
-0.12025928497314453,
-0.302217960357666,
0.14502179622650146,
0.32768961787223816,
-0.12282606959342957,
0.3003813624382019,
-0.21188987791538239,
0.006112918257713318,
0.1101454421877861,
-0.11704540252685547,
-0.04472004622220993,
0.07933100312948227,
-0.22398877143859863,
-0.19217652082443237,
-0.08170261234045029,
-0.010356642305850983,
-0.21533407270908356,
0.1972702443599701,
-0.21680712699890137,
0.3763892650604248,
0.07182951271533966,
0.19365482032299042,
-0.22428423166275024,
-0.09890946000814438,
0.02029835619032383,
0.06778893619775772,
-0.02216079831123352,
-0.056873202323913574,
0.19304463267326355,
0.16252413392066956,
0.07697032392024994,
0.07965201139450073,
-0.3189263939857483,
-0.060413699597120285,
-0.21295052766799927,
0.18530257046222687,
0.11001823097467422,
-0.09662133455276489,
0.31255385279655457,
0.08876194059848785,
-0.37014085054397583,
-0.0990389883518219,
0.31608182191848755,
-0.2115386724472046,
0.11043918877840042,
0.11254756897687912,
0.19580259919166565,
0.13446107506752014,
-0.2702717185020447,
0.025054309517145157,
-0.10753525793552399,
0.3602887988090515,
0.1304396390914917,
0.14243780076503754,
-0.06978088617324829,
-0.08430250734090805,
0.18649837374687195,
0.053292885422706604,
0.2982028126716614,
-0.15321823954582214,
0.40533119440078735,
-0.1756361573934555,
-0.026646088808774948,
-0.05578995123505592,
0.38835304975509644,
0.4179706275463104,
0.21598200500011444,
-0.02876782976090908,
-0.04850960150361061,
0.0975499376654625,
-0.2621464431285858,
0.23145081102848053,
0.2486339807510376,
-0.09036275744438171,
0.1260383576154709,
0.36638525128364563,
0.21712136268615723,
0.30793288350105286,
-0.2600180506706238,
0.06923069804906845,
0.2204747349023819,
-0.16709645092487335,
0.49665242433547974,
0.6812312602996826,
-0.2562094032764435,
0.506624698638916,
0.4170609712600708,
-0.2192816436290741,
0.17629927396774292,
0.7710938453674316,
-0.10133420675992966,
0.5054677128791809,
0.006250767037272453,
0.08802285045385361,
0.5239155292510986,
-0.4708459973335266,
0.05059971660375595,
0.45790430903434753,
0.31243619322776794,
0.21886670589447021,
-0.230309396982193,
0.19095326960086823,
-0.4291228950023651,
-0.29887279868125916,
-0.20175571739673615,
0.06405621767044067,
-0.16324126720428467,
0.07221753895282745,
-0.2666558623313904,
-0.14774951338768005,
-0.4448676109313965,
-0.19850973784923553,
0.07937085628509521,
-0.19554825127124786,
0.16981947422027588,
-0.041035495698451996,
0.2174406200647354,
-0.07026989012956619,
0.2881234884262085,
-0.08341920375823975,
0.16043278574943542,
-0.2754333019256592,
0.12206503748893738,
0.013622723519802094,
-0.1374799758195877,
0.021209079772233963,
0.17514926195144653,
0.1924545168876648,
0.17036470770835876,
0.05143723264336586,
-0.410894513130188,
0.05936511233448982,
0.0014554057270288467,
0.04533660411834717,
0.21977128088474274,
-0.1882709562778473,
0.30919817090034485,
0.2778536379337311,
-0.007198825478553772,
-0.1041703149676323,
-0.08708453178405762,
0.14009322226047516,
0.10781171917915344,
-0.4092733860015869,
0.7780476212501526,
-0.029169932007789612,
-0.20097365975379944,
0.08572432398796082,
0.1971348226070404,
-0.2530081868171692,
-0.16706696152687073,
0.48852258920669556,
-0.10039472579956055,
-0.11850722879171371,
-0.1684749573469162,
0.038122039288282394,
0.2037205696105957,
0.40691885352134705,
-0.05005224421620369,
-0.13753679394721985,
-0.39415183663368225,
-0.17585864663124084,
-0.3969167470932007,
0.04594259709119797,
-0.2047019898891449,
0.2516385614871979,
-0.020550910383462906,
0.1873529553413391,
0.21092861890792847,
0.10794918984174728,
0.1958669126033783,
0.12780113518238068,
0.19902560114860535,
-0.08972078561782837,
-0.16321620345115662,
-0.09867282211780548,
-0.17237991094589233,
-0.3820716440677643,
-0.08784329891204834,
-0.5605083703994751,
-0.04321451112627983,
0.06417323648929596,
-0.18777000904083252,
0.16980622708797455,
-0.034658316522836685,
0.4984592795372009,
-0.3298732042312622,
0.3147025406360626,
0.33581796288490295,
0.37883004546165466,
-0.05621699243783951,
-0.17933006584644318,
0.0020495839416980743,
-0.2026621401309967,
-0.44123709201812744,
0.19634240865707397,
-0.18474486470222473,
0.23628774285316467,
-0.03987347334623337,
-0.21886934340000153,
-0.4237116277217865,
0.38215264678001404,
0.1402457356452942,
0.20525914430618286,
-0.4020426571369171,
0.5393438935279846,
-0.33294954895973206,
-0.020708199590444565,
0.628118097782135,
0.18077662587165833,
-0.152317076921463,
0.009607557207345963,
-0.3768947124481201,
-0.3352760970592499,
0.25488489866256714,
-0.18355348706245422,
-0.15989592671394348,
-0.399797260761261,
0.3308413624763489,
0.394873708486557,
-0.101162388920784,
-0.19357898831367493,
-0.3101695477962494,
0.23071829974651337,
-0.24430489540100098,
0.14887379109859467,
0.13992339372634888,
0.5106886625289917,
-0.30973681807518005,
-0.14695678651332855,
0.04485289752483368,
-0.14280760288238525,
-0.23397992551326752,
0.2674015462398529,
-0.23542192578315735
] |
https://github.com/huggingface/datasets/issues/5351 | Do we need to implement `_prepare_split`? | Thanks so much @mariosasko for the fast response! I've been referencing [this page in the docs](https://huggingface.co/docs/datasets/v2.4.0/en/about_dataset_load) because it it pretty comprehensive in terms of what we have to do and I figured since we subclass the `BuilderConfig` the same pattern would hold, but I've also seen the page with those sub-classed builders as well, so that fills in a knowledge gap for me. | ### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
| 63 | Do we need to implement `_prepare_split`?
### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
Thanks so much @mariosasko for the fast response! I've been referencing [this page in the docs](https://huggingface.co/docs/datasets/v2.4.0/en/about_dataset_load) because it it pretty comprehensive in terms of what we have to do and I figured since we subclass the `BuilderConfig` the same pattern would hold, but I've also seen the page with those sub-classed builders as well, so that fills in a knowledge gap for me. | [
-0.39684659242630005,
0.028263568878173828,
0.038606513291597366,
0.26486533880233765,
0.14727875590324402,
0.2111169397830963,
0.5743995904922485,
0.3013264238834381,
-0.35358813405036926,
0.27159470319747925,
0.09605718404054642,
0.13665761053562164,
-0.08747748285531998,
-0.15181736648082733,
0.14780128002166748,
-0.42070913314819336,
0.14535833895206451,
0.1660146415233612,
0.16208773851394653,
-0.1653870940208435,
-0.3060036599636078,
0.1335560530424118,
-0.28613731265068054,
-0.018275029957294464,
-0.014041372574865818,
-0.19102515280246735,
-0.3446138799190521,
0.2566714584827423,
0.015331882052123547,
-0.01015452016144991,
0.19002343714237213,
0.14374659955501556,
0.012923896312713623,
0.29963812232017517,
-0.00011747405369533226,
0.022941559553146362,
0.18693788349628448,
0.037026211619377136,
-0.28322234749794006,
0.1104830652475357,
-0.37851041555404663,
-0.1806396096944809,
0.021225344389677048,
-0.13775314390659332,
-0.1588188111782074,
-0.1996767222881317,
-0.061121128499507904,
0.09741990268230438,
0.4871101379394531,
-0.11936972290277481,
0.17597708106040955,
0.02434464916586876,
0.27351364493370056,
-0.23213663697242737,
0.36309370398521423,
0.1646580994129181,
-0.2933652102947235,
0.0010855542495846748,
-0.3826949894428253,
0.37199515104293823,
0.0005425959825515747,
0.14257007837295532,
0.01083565317094326,
0.15484939515590668,
0.15728209912776947,
0.21359305083751678,
-0.22176891565322876,
-0.41140177845954895,
-0.18386536836624146,
0.22885140776634216,
0.1845511794090271,
-0.06408900767564774,
-0.6015823483467102,
-0.40237295627593994,
-0.08474969863891602,
-0.39087918400764465,
0.2498781979084015,
0.08445042371749878,
0.08495074510574341,
0.13040415942668915,
0.18502093851566315,
-0.3826562464237213,
-0.08255728334188461,
0.015825849026441574,
0.06130083650350571,
0.2952607572078705,
-0.06226996332406998,
0.1560605764389038,
0.2717878520488739,
0.16989749670028687,
0.21911954879760742,
-0.1744018942117691,
-0.06355585157871246,
0.19579550623893738,
-0.1356973648071289,
-0.31445595622062683,
-0.2376558482646942,
-0.008966110646724701,
-0.1408722698688507,
0.20624682307243347,
-0.06777498126029968,
0.0807190090417862,
0.42259854078292847,
0.25069308280944824,
0.148600772023201,
-0.04463319480419159,
-0.016697287559509277,
0.48730266094207764,
0.2475123554468155,
-0.04061730578541756,
0.052557382732629776,
-0.11991200596094131,
-0.09080676734447479,
-0.24119935929775238,
-0.010137056931853294,
0.10603164881467819,
0.12858586013317108,
-0.06924451887607574,
-0.26513412594795227,
-0.21649104356765747,
-0.5023368000984192,
-0.21063846349716187,
0.21955257654190063,
0.10517436265945435,
0.1284000724554062,
0.064239501953125,
0.03324189782142639,
0.022569913417100906,
-0.35357993841171265,
-0.40791329741477966,
-0.14177419245243073,
0.10359297692775726,
-0.2609596252441406,
0.23590043187141418,
0.004826676100492477,
-0.35990655422210693,
-0.09566053748130798,
0.22641710937023163,
0.18358878791332245,
0.09278200566768646,
0.314890593290329,
-0.1250021755695343,
0.07167699933052063,
0.45175570249557495,
0.10588033497333527,
-0.09202926605939865,
0.06544142216444016,
0.073043093085289,
-0.21463599801063538,
-0.08073849231004715,
-0.10297957807779312,
-0.5045248866081238,
-0.049303025007247925,
0.15910503268241882,
0.16796211898326874,
0.2293487787246704,
-0.031487904489040375,
0.1408950239419937,
0.5039725303649902,
-0.1939413696527481,
-0.05727396160364151,
-0.17013923823833466,
-0.026260968297719955,
-0.18988627195358276,
0.3036646544933319,
0.2773198187351227,
-0.401644766330719,
0.09226536750793457,
-0.7184799313545227,
-0.16774006187915802,
0.5405654907226562,
0.14763866364955902,
-0.0746159479022026,
0.2311374843120575,
-0.26274338364601135,
0.3361905813217163,
0.48538774251937866,
0.017970960587263107,
-0.036314792931079865,
0.5023655891418457,
0.11890998482704163,
0.10742569714784622,
0.333443820476532,
-0.08776962757110596,
0.14591141045093536,
-0.20631597936153412,
-0.052705079317092896,
0.2896369695663452,
-0.31835824251174927,
-0.3146226406097412,
-0.21228303015232086,
-0.17161352932453156,
0.0773966833949089,
0.16674552857875824,
0.28786981105804443,
0.1822900027036667,
0.06606683880090714,
0.10566171258687973,
0.19938117265701294,
-0.18416602909564972,
0.0943569615483284,
-0.04461175203323364,
0.3000200688838959,
0.23335805535316467,
-0.04686537757515907,
-0.10540944337844849,
-0.15513670444488525,
-0.029079973697662354,
-0.1268458068370819,
-0.012344986200332642,
0.2983875870704651,
-0.42012810707092285,
0.11186052113771439,
-0.14578871428966522,
-0.38800016045570374,
-0.13781365752220154,
0.04966399073600769,
-0.19142234325408936,
0.03738008067011833,
-0.38862380385398865,
-0.06873836368322372,
0.20474745333194733,
-0.28792521357536316,
0.4126656949520111,
-0.32395315170288086,
0.3116569519042969,
-0.142796128988266,
-0.043284717947244644,
-0.20283591747283936,
0.2716238498687744,
0.14596334099769592,
-0.2830008566379547,
-0.06441003829240799,
0.5136758685112,
0.291328102350235,
-0.24997763335704803,
-0.059897281229496,
-0.2693110704421997,
0.08354587107896805,
-0.15337182581424713,
0.042650770395994186,
0.031973011791706085,
-0.02706761658191681,
-0.051615532487630844,
0.14399263262748718,
0.4913005232810974,
0.366813063621521,
0.11045161634683609,
0.2624824643135071,
0.08640622347593307,
0.05055227875709534,
0.19224467873573303,
-0.025131959468126297,
-0.5075973272323608,
-0.14128746092319489,
-0.1288161277770996,
0.36693763732910156,
0.037243615835905075,
-0.23756958544254303,
0.12378554791212082,
0.33912959694862366,
-0.0939384400844574,
0.0564550943672657,
-0.002696774899959564,
0.032512366771698,
-0.03267534822225571,
0.19626852869987488,
0.6504374146461487,
0.46662062406539917,
0.16019925475120544,
0.18037693202495575,
0.20965346693992615,
-0.08586877584457397,
-0.14688369631767273,
0.33640286326408386,
0.2990989089012146,
0.13856849074363708,
-0.06140373647212982,
-0.33035337924957275,
0.06392353028059006,
-0.3187515139579773,
0.0926380604505539,
0.17019931972026825,
0.07574108242988586,
-0.272845059633255,
0.20274867117404938,
-0.25227856636047363,
0.11746247857809067,
-0.05071716755628586,
-0.08012167364358902,
-0.1913539171218872,
-0.35754266381263733,
0.03426313400268555,
0.0016134455800056458,
-0.29701390862464905,
0.16204673051834106,
-0.18612495064735413,
0.18825514614582062,
-0.12258162349462509,
0.023716170340776443,
0.04185888171195984,
0.3042150139808655,
-0.2979263365268707,
0.057803910225629807,
0.16507954895496368,
-0.1444491147994995,
0.3168366551399231,
-0.03936731070280075,
-0.1276976764202118,
-0.08117051422595978,
-0.5159487724304199,
0.2702007293701172,
-0.2245928794145584,
0.2663232684135437,
0.4786919057369232,
-0.4132232666015625,
0.04565294086933136,
-0.4948858320713043,
0.1087316945195198,
-0.15118210017681122,
-0.09252903610467911,
-0.05147195979952812,
-0.11129637062549591,
0.0948367565870285,
-0.35219115018844604,
-0.4680473506450653,
-0.11007628589868546,
-0.4203089475631714,
-0.12111446261405945,
-0.07681912183761597,
0.238184854388237,
0.1925923377275467,
-0.13644681870937347,
0.00296865776181221,
-0.028139689937233925,
-0.132253497838974,
-0.327067494392395,
0.015882376581430435,
0.2679441571235657,
-0.6211180686950684,
-0.10632839798927307,
0.044059086591005325,
-0.3742111921310425,
0.33532145619392395,
0.28402459621429443,
0.04607991874217987,
0.14194205403327942,
-0.19706767797470093,
-0.05222194641828537,
-0.15237724781036377,
0.06522414833307266,
0.1761888861656189,
0.14206793904304504,
0.026619983837008476,
-0.0661187618970871,
0.1303909868001938,
0.23738199472427368,
-0.11329738050699234,
0.2719256281852722,
-0.23288428783416748,
0.5564010739326477,
-0.05160555988550186,
1.0884464979171753,
-0.03055630996823311,
0.035857267677783966,
0.056173793971538544,
0.1555497795343399,
0.2330702692270279,
-0.057868726551532745,
-0.3012399673461914,
0.15010754764080048,
0.0013234466314315796,
-0.20803478360176086,
0.21802037954330444,
0.008280155248939991,
-0.29986992478370667,
-0.02094067446887493,
0.15389686822891235,
-0.0890190601348877,
-0.43301600217819214,
-0.1505630761384964,
-0.2020646631717682,
0.4340951144695282,
-0.03510919585824013,
0.4342504143714905,
0.0068663060665130615,
0.16457009315490723,
-0.3399643003940582,
0.37511032819747925,
0.3924174904823303,
-0.08463743329048157,
0.06664139032363892,
-0.006820078939199448,
-0.13740777969360352,
0.4405192732810974,
0.1433136910200119,
0.26458853483200073,
-0.09999056905508041,
-0.16890555620193481,
0.09111547470092773,
-0.10114522278308868,
0.37898099422454834,
-0.35058319568634033,
-0.2927839159965515,
0.19355928897857666,
-0.2848760485649109,
-0.2273978292942047,
-0.22696629166603088,
-0.18112404644489288,
0.03454948961734772,
0.07233735918998718,
-0.3326079845428467,
-0.3115488290786743,
-0.3117128014564514,
0.7352997064590454,
-0.1864841878414154,
-0.08025507628917694,
-0.15027150511741638,
-0.186609148979187,
-0.3156912922859192,
-0.20027951896190643,
-0.016922980546951294,
-0.038802534341812134,
0.03560464084148407,
-0.2930353581905365,
-0.13759002089500427,
-0.08352375030517578,
-0.13190388679504395,
0.23352229595184326,
0.018593162298202515,
0.22021484375,
-0.2994156777858734,
0.18879397213459015,
0.13807091116905212,
0.06922152638435364,
0.3746967911720276,
0.15566593408584595,
-0.1372116059064865,
-0.07001984119415283,
0.27345797419548035,
-0.1669098138809204,
0.5717335939407349,
0.37936145067214966,
-0.47992101311683655,
0.2568068504333496,
-0.04967688024044037,
0.09850376099348068,
-0.23076754808425903,
-0.11333414912223816,
0.42127928137779236,
-0.17206160724163055,
-0.13391220569610596,
-0.7076979279518127,
0.2136102020740509,
0.20300352573394775,
-0.10186022520065308,
0.23167762160301208,
0.22539229691028595,
-0.36115118861198425,
0.1966238170862198,
0.160946324467659,
0.8526101112365723,
0.40424132347106934,
0.14474493265151978,
0.37336477637290955,
0.10990853607654572,
0.15516865253448486,
-0.1633453667163849,
0.39535099267959595,
-0.2653314769268036,
-0.06914123892784119,
-0.1323762685060501,
-0.09144262969493866,
0.6105437278747559,
0.10514269769191742,
-0.11441493034362793,
0.37567275762557983,
-0.24762585759162903,
0.17863868176937103,
-0.016957847401499748,
0.148300901055336,
-0.35417428612709045,
-0.38956543803215027,
-0.026333242654800415,
0.07703375816345215,
0.1757497787475586,
0.08829361945390701,
-0.15674766898155212,
-0.1366119086742401,
0.02816503867506981,
-0.1252015084028244,
-0.12678304314613342,
0.1978612244129181,
-0.018866870552301407,
0.236222505569458,
-0.10481336712837219,
-0.31014519929885864,
0.6872695684432983,
-0.4096830189228058,
0.24755938351154327,
0.304944783449173,
0.0910269021987915,
0.1516876220703125,
-0.15852829813957214,
0.20086835324764252,
-0.11514471471309662,
0.02387591078877449,
0.4507102370262146,
0.006011147052049637,
0.09194812923669815,
-0.27010664343833923,
-0.1529843509197235,
-0.2632179856300354,
-0.3791462779045105,
-0.051137641072273254,
0.11800803244113922,
-0.43072620034217834,
0.2948971092700958,
0.2032589465379715,
-0.22466377913951874,
-0.3728600740432739,
0.0763261467218399,
-0.06998500227928162,
-0.35993242263793945,
0.13210003077983856,
-0.2497638612985611,
-0.020405709743499756,
-0.21844890713691711,
0.17189612984657288,
0.15930604934692383,
0.16388572752475739,
0.4034930169582367,
-0.15477028489112854,
-0.12025928497314453,
-0.302217960357666,
0.14502179622650146,
0.32768961787223816,
-0.12282606959342957,
0.3003813624382019,
-0.21188987791538239,
0.006112918257713318,
0.1101454421877861,
-0.11704540252685547,
-0.04472004622220993,
0.07933100312948227,
-0.22398877143859863,
-0.19217652082443237,
-0.08170261234045029,
-0.010356642305850983,
-0.21533407270908356,
0.1972702443599701,
-0.21680712699890137,
0.3763892650604248,
0.07182951271533966,
0.19365482032299042,
-0.22428423166275024,
-0.09890946000814438,
0.02029835619032383,
0.06778893619775772,
-0.02216079831123352,
-0.056873202323913574,
0.19304463267326355,
0.16252413392066956,
0.07697032392024994,
0.07965201139450073,
-0.3189263939857483,
-0.060413699597120285,
-0.21295052766799927,
0.18530257046222687,
0.11001823097467422,
-0.09662133455276489,
0.31255385279655457,
0.08876194059848785,
-0.37014085054397583,
-0.0990389883518219,
0.31608182191848755,
-0.2115386724472046,
0.11043918877840042,
0.11254756897687912,
0.19580259919166565,
0.13446107506752014,
-0.2702717185020447,
0.025054309517145157,
-0.10753525793552399,
0.3602887988090515,
0.1304396390914917,
0.14243780076503754,
-0.06978088617324829,
-0.08430250734090805,
0.18649837374687195,
0.053292885422706604,
0.2982028126716614,
-0.15321823954582214,
0.40533119440078735,
-0.1756361573934555,
-0.026646088808774948,
-0.05578995123505592,
0.38835304975509644,
0.4179706275463104,
0.21598200500011444,
-0.02876782976090908,
-0.04850960150361061,
0.0975499376654625,
-0.2621464431285858,
0.23145081102848053,
0.2486339807510376,
-0.09036275744438171,
0.1260383576154709,
0.36638525128364563,
0.21712136268615723,
0.30793288350105286,
-0.2600180506706238,
0.06923069804906845,
0.2204747349023819,
-0.16709645092487335,
0.49665242433547974,
0.6812312602996826,
-0.2562094032764435,
0.506624698638916,
0.4170609712600708,
-0.2192816436290741,
0.17629927396774292,
0.7710938453674316,
-0.10133420675992966,
0.5054677128791809,
0.006250767037272453,
0.08802285045385361,
0.5239155292510986,
-0.4708459973335266,
0.05059971660375595,
0.45790430903434753,
0.31243619322776794,
0.21886670589447021,
-0.230309396982193,
0.19095326960086823,
-0.4291228950023651,
-0.29887279868125916,
-0.20175571739673615,
0.06405621767044067,
-0.16324126720428467,
0.07221753895282745,
-0.2666558623313904,
-0.14774951338768005,
-0.4448676109313965,
-0.19850973784923553,
0.07937085628509521,
-0.19554825127124786,
0.16981947422027588,
-0.041035495698451996,
0.2174406200647354,
-0.07026989012956619,
0.2881234884262085,
-0.08341920375823975,
0.16043278574943542,
-0.2754333019256592,
0.12206503748893738,
0.013622723519802094,
-0.1374799758195877,
0.021209079772233963,
0.17514926195144653,
0.1924545168876648,
0.17036470770835876,
0.05143723264336586,
-0.410894513130188,
0.05936511233448982,
0.0014554057270288467,
0.04533660411834717,
0.21977128088474274,
-0.1882709562778473,
0.30919817090034485,
0.2778536379337311,
-0.007198825478553772,
-0.1041703149676323,
-0.08708453178405762,
0.14009322226047516,
0.10781171917915344,
-0.4092733860015869,
0.7780476212501526,
-0.029169932007789612,
-0.20097365975379944,
0.08572432398796082,
0.1971348226070404,
-0.2530081868171692,
-0.16706696152687073,
0.48852258920669556,
-0.10039472579956055,
-0.11850722879171371,
-0.1684749573469162,
0.038122039288282394,
0.2037205696105957,
0.40691885352134705,
-0.05005224421620369,
-0.13753679394721985,
-0.39415183663368225,
-0.17585864663124084,
-0.3969167470932007,
0.04594259709119797,
-0.2047019898891449,
0.2516385614871979,
-0.020550910383462906,
0.1873529553413391,
0.21092861890792847,
0.10794918984174728,
0.1958669126033783,
0.12780113518238068,
0.19902560114860535,
-0.08972078561782837,
-0.16321620345115662,
-0.09867282211780548,
-0.17237991094589233,
-0.3820716440677643,
-0.08784329891204834,
-0.5605083703994751,
-0.04321451112627983,
0.06417323648929596,
-0.18777000904083252,
0.16980622708797455,
-0.034658316522836685,
0.4984592795372009,
-0.3298732042312622,
0.3147025406360626,
0.33581796288490295,
0.37883004546165466,
-0.05621699243783951,
-0.17933006584644318,
0.0020495839416980743,
-0.2026621401309967,
-0.44123709201812744,
0.19634240865707397,
-0.18474486470222473,
0.23628774285316467,
-0.03987347334623337,
-0.21886934340000153,
-0.4237116277217865,
0.38215264678001404,
0.1402457356452942,
0.20525914430618286,
-0.4020426571369171,
0.5393438935279846,
-0.33294954895973206,
-0.020708199590444565,
0.628118097782135,
0.18077662587165833,
-0.152317076921463,
0.009607557207345963,
-0.3768947124481201,
-0.3352760970592499,
0.25488489866256714,
-0.18355348706245422,
-0.15989592671394348,
-0.399797260761261,
0.3308413624763489,
0.394873708486557,
-0.101162388920784,
-0.19357898831367493,
-0.3101695477962494,
0.23071829974651337,
-0.24430489540100098,
0.14887379109859467,
0.13992339372634888,
0.5106886625289917,
-0.30973681807518005,
-0.14695678651332855,
0.04485289752483368,
-0.14280760288238525,
-0.23397992551326752,
0.2674015462398529,
-0.23542192578315735
] |
https://github.com/huggingface/datasets/issues/5351 | Do we need to implement `_prepare_split`? | cc @stevhliu who may have some ideas on how to improve this part of the docs. | ### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
| 16 | Do we need to implement `_prepare_split`?
### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
cc @stevhliu who may have some ideas on how to improve this part of the docs. | [
-0.39684659242630005,
0.028263568878173828,
0.038606513291597366,
0.26486533880233765,
0.14727875590324402,
0.2111169397830963,
0.5743995904922485,
0.3013264238834381,
-0.35358813405036926,
0.27159470319747925,
0.09605718404054642,
0.13665761053562164,
-0.08747748285531998,
-0.15181736648082733,
0.14780128002166748,
-0.42070913314819336,
0.14535833895206451,
0.1660146415233612,
0.16208773851394653,
-0.1653870940208435,
-0.3060036599636078,
0.1335560530424118,
-0.28613731265068054,
-0.018275029957294464,
-0.014041372574865818,
-0.19102515280246735,
-0.3446138799190521,
0.2566714584827423,
0.015331882052123547,
-0.01015452016144991,
0.19002343714237213,
0.14374659955501556,
0.012923896312713623,
0.29963812232017517,
-0.00011747405369533226,
0.022941559553146362,
0.18693788349628448,
0.037026211619377136,
-0.28322234749794006,
0.1104830652475357,
-0.37851041555404663,
-0.1806396096944809,
0.021225344389677048,
-0.13775314390659332,
-0.1588188111782074,
-0.1996767222881317,
-0.061121128499507904,
0.09741990268230438,
0.4871101379394531,
-0.11936972290277481,
0.17597708106040955,
0.02434464916586876,
0.27351364493370056,
-0.23213663697242737,
0.36309370398521423,
0.1646580994129181,
-0.2933652102947235,
0.0010855542495846748,
-0.3826949894428253,
0.37199515104293823,
0.0005425959825515747,
0.14257007837295532,
0.01083565317094326,
0.15484939515590668,
0.15728209912776947,
0.21359305083751678,
-0.22176891565322876,
-0.41140177845954895,
-0.18386536836624146,
0.22885140776634216,
0.1845511794090271,
-0.06408900767564774,
-0.6015823483467102,
-0.40237295627593994,
-0.08474969863891602,
-0.39087918400764465,
0.2498781979084015,
0.08445042371749878,
0.08495074510574341,
0.13040415942668915,
0.18502093851566315,
-0.3826562464237213,
-0.08255728334188461,
0.015825849026441574,
0.06130083650350571,
0.2952607572078705,
-0.06226996332406998,
0.1560605764389038,
0.2717878520488739,
0.16989749670028687,
0.21911954879760742,
-0.1744018942117691,
-0.06355585157871246,
0.19579550623893738,
-0.1356973648071289,
-0.31445595622062683,
-0.2376558482646942,
-0.008966110646724701,
-0.1408722698688507,
0.20624682307243347,
-0.06777498126029968,
0.0807190090417862,
0.42259854078292847,
0.25069308280944824,
0.148600772023201,
-0.04463319480419159,
-0.016697287559509277,
0.48730266094207764,
0.2475123554468155,
-0.04061730578541756,
0.052557382732629776,
-0.11991200596094131,
-0.09080676734447479,
-0.24119935929775238,
-0.010137056931853294,
0.10603164881467819,
0.12858586013317108,
-0.06924451887607574,
-0.26513412594795227,
-0.21649104356765747,
-0.5023368000984192,
-0.21063846349716187,
0.21955257654190063,
0.10517436265945435,
0.1284000724554062,
0.064239501953125,
0.03324189782142639,
0.022569913417100906,
-0.35357993841171265,
-0.40791329741477966,
-0.14177419245243073,
0.10359297692775726,
-0.2609596252441406,
0.23590043187141418,
0.004826676100492477,
-0.35990655422210693,
-0.09566053748130798,
0.22641710937023163,
0.18358878791332245,
0.09278200566768646,
0.314890593290329,
-0.1250021755695343,
0.07167699933052063,
0.45175570249557495,
0.10588033497333527,
-0.09202926605939865,
0.06544142216444016,
0.073043093085289,
-0.21463599801063538,
-0.08073849231004715,
-0.10297957807779312,
-0.5045248866081238,
-0.049303025007247925,
0.15910503268241882,
0.16796211898326874,
0.2293487787246704,
-0.031487904489040375,
0.1408950239419937,
0.5039725303649902,
-0.1939413696527481,
-0.05727396160364151,
-0.17013923823833466,
-0.026260968297719955,
-0.18988627195358276,
0.3036646544933319,
0.2773198187351227,
-0.401644766330719,
0.09226536750793457,
-0.7184799313545227,
-0.16774006187915802,
0.5405654907226562,
0.14763866364955902,
-0.0746159479022026,
0.2311374843120575,
-0.26274338364601135,
0.3361905813217163,
0.48538774251937866,
0.017970960587263107,
-0.036314792931079865,
0.5023655891418457,
0.11890998482704163,
0.10742569714784622,
0.333443820476532,
-0.08776962757110596,
0.14591141045093536,
-0.20631597936153412,
-0.052705079317092896,
0.2896369695663452,
-0.31835824251174927,
-0.3146226406097412,
-0.21228303015232086,
-0.17161352932453156,
0.0773966833949089,
0.16674552857875824,
0.28786981105804443,
0.1822900027036667,
0.06606683880090714,
0.10566171258687973,
0.19938117265701294,
-0.18416602909564972,
0.0943569615483284,
-0.04461175203323364,
0.3000200688838959,
0.23335805535316467,
-0.04686537757515907,
-0.10540944337844849,
-0.15513670444488525,
-0.029079973697662354,
-0.1268458068370819,
-0.012344986200332642,
0.2983875870704651,
-0.42012810707092285,
0.11186052113771439,
-0.14578871428966522,
-0.38800016045570374,
-0.13781365752220154,
0.04966399073600769,
-0.19142234325408936,
0.03738008067011833,
-0.38862380385398865,
-0.06873836368322372,
0.20474745333194733,
-0.28792521357536316,
0.4126656949520111,
-0.32395315170288086,
0.3116569519042969,
-0.142796128988266,
-0.043284717947244644,
-0.20283591747283936,
0.2716238498687744,
0.14596334099769592,
-0.2830008566379547,
-0.06441003829240799,
0.5136758685112,
0.291328102350235,
-0.24997763335704803,
-0.059897281229496,
-0.2693110704421997,
0.08354587107896805,
-0.15337182581424713,
0.042650770395994186,
0.031973011791706085,
-0.02706761658191681,
-0.051615532487630844,
0.14399263262748718,
0.4913005232810974,
0.366813063621521,
0.11045161634683609,
0.2624824643135071,
0.08640622347593307,
0.05055227875709534,
0.19224467873573303,
-0.025131959468126297,
-0.5075973272323608,
-0.14128746092319489,
-0.1288161277770996,
0.36693763732910156,
0.037243615835905075,
-0.23756958544254303,
0.12378554791212082,
0.33912959694862366,
-0.0939384400844574,
0.0564550943672657,
-0.002696774899959564,
0.032512366771698,
-0.03267534822225571,
0.19626852869987488,
0.6504374146461487,
0.46662062406539917,
0.16019925475120544,
0.18037693202495575,
0.20965346693992615,
-0.08586877584457397,
-0.14688369631767273,
0.33640286326408386,
0.2990989089012146,
0.13856849074363708,
-0.06140373647212982,
-0.33035337924957275,
0.06392353028059006,
-0.3187515139579773,
0.0926380604505539,
0.17019931972026825,
0.07574108242988586,
-0.272845059633255,
0.20274867117404938,
-0.25227856636047363,
0.11746247857809067,
-0.05071716755628586,
-0.08012167364358902,
-0.1913539171218872,
-0.35754266381263733,
0.03426313400268555,
0.0016134455800056458,
-0.29701390862464905,
0.16204673051834106,
-0.18612495064735413,
0.18825514614582062,
-0.12258162349462509,
0.023716170340776443,
0.04185888171195984,
0.3042150139808655,
-0.2979263365268707,
0.057803910225629807,
0.16507954895496368,
-0.1444491147994995,
0.3168366551399231,
-0.03936731070280075,
-0.1276976764202118,
-0.08117051422595978,
-0.5159487724304199,
0.2702007293701172,
-0.2245928794145584,
0.2663232684135437,
0.4786919057369232,
-0.4132232666015625,
0.04565294086933136,
-0.4948858320713043,
0.1087316945195198,
-0.15118210017681122,
-0.09252903610467911,
-0.05147195979952812,
-0.11129637062549591,
0.0948367565870285,
-0.35219115018844604,
-0.4680473506450653,
-0.11007628589868546,
-0.4203089475631714,
-0.12111446261405945,
-0.07681912183761597,
0.238184854388237,
0.1925923377275467,
-0.13644681870937347,
0.00296865776181221,
-0.028139689937233925,
-0.132253497838974,
-0.327067494392395,
0.015882376581430435,
0.2679441571235657,
-0.6211180686950684,
-0.10632839798927307,
0.044059086591005325,
-0.3742111921310425,
0.33532145619392395,
0.28402459621429443,
0.04607991874217987,
0.14194205403327942,
-0.19706767797470093,
-0.05222194641828537,
-0.15237724781036377,
0.06522414833307266,
0.1761888861656189,
0.14206793904304504,
0.026619983837008476,
-0.0661187618970871,
0.1303909868001938,
0.23738199472427368,
-0.11329738050699234,
0.2719256281852722,
-0.23288428783416748,
0.5564010739326477,
-0.05160555988550186,
1.0884464979171753,
-0.03055630996823311,
0.035857267677783966,
0.056173793971538544,
0.1555497795343399,
0.2330702692270279,
-0.057868726551532745,
-0.3012399673461914,
0.15010754764080048,
0.0013234466314315796,
-0.20803478360176086,
0.21802037954330444,
0.008280155248939991,
-0.29986992478370667,
-0.02094067446887493,
0.15389686822891235,
-0.0890190601348877,
-0.43301600217819214,
-0.1505630761384964,
-0.2020646631717682,
0.4340951144695282,
-0.03510919585824013,
0.4342504143714905,
0.0068663060665130615,
0.16457009315490723,
-0.3399643003940582,
0.37511032819747925,
0.3924174904823303,
-0.08463743329048157,
0.06664139032363892,
-0.006820078939199448,
-0.13740777969360352,
0.4405192732810974,
0.1433136910200119,
0.26458853483200073,
-0.09999056905508041,
-0.16890555620193481,
0.09111547470092773,
-0.10114522278308868,
0.37898099422454834,
-0.35058319568634033,
-0.2927839159965515,
0.19355928897857666,
-0.2848760485649109,
-0.2273978292942047,
-0.22696629166603088,
-0.18112404644489288,
0.03454948961734772,
0.07233735918998718,
-0.3326079845428467,
-0.3115488290786743,
-0.3117128014564514,
0.7352997064590454,
-0.1864841878414154,
-0.08025507628917694,
-0.15027150511741638,
-0.186609148979187,
-0.3156912922859192,
-0.20027951896190643,
-0.016922980546951294,
-0.038802534341812134,
0.03560464084148407,
-0.2930353581905365,
-0.13759002089500427,
-0.08352375030517578,
-0.13190388679504395,
0.23352229595184326,
0.018593162298202515,
0.22021484375,
-0.2994156777858734,
0.18879397213459015,
0.13807091116905212,
0.06922152638435364,
0.3746967911720276,
0.15566593408584595,
-0.1372116059064865,
-0.07001984119415283,
0.27345797419548035,
-0.1669098138809204,
0.5717335939407349,
0.37936145067214966,
-0.47992101311683655,
0.2568068504333496,
-0.04967688024044037,
0.09850376099348068,
-0.23076754808425903,
-0.11333414912223816,
0.42127928137779236,
-0.17206160724163055,
-0.13391220569610596,
-0.7076979279518127,
0.2136102020740509,
0.20300352573394775,
-0.10186022520065308,
0.23167762160301208,
0.22539229691028595,
-0.36115118861198425,
0.1966238170862198,
0.160946324467659,
0.8526101112365723,
0.40424132347106934,
0.14474493265151978,
0.37336477637290955,
0.10990853607654572,
0.15516865253448486,
-0.1633453667163849,
0.39535099267959595,
-0.2653314769268036,
-0.06914123892784119,
-0.1323762685060501,
-0.09144262969493866,
0.6105437278747559,
0.10514269769191742,
-0.11441493034362793,
0.37567275762557983,
-0.24762585759162903,
0.17863868176937103,
-0.016957847401499748,
0.148300901055336,
-0.35417428612709045,
-0.38956543803215027,
-0.026333242654800415,
0.07703375816345215,
0.1757497787475586,
0.08829361945390701,
-0.15674766898155212,
-0.1366119086742401,
0.02816503867506981,
-0.1252015084028244,
-0.12678304314613342,
0.1978612244129181,
-0.018866870552301407,
0.236222505569458,
-0.10481336712837219,
-0.31014519929885864,
0.6872695684432983,
-0.4096830189228058,
0.24755938351154327,
0.304944783449173,
0.0910269021987915,
0.1516876220703125,
-0.15852829813957214,
0.20086835324764252,
-0.11514471471309662,
0.02387591078877449,
0.4507102370262146,
0.006011147052049637,
0.09194812923669815,
-0.27010664343833923,
-0.1529843509197235,
-0.2632179856300354,
-0.3791462779045105,
-0.051137641072273254,
0.11800803244113922,
-0.43072620034217834,
0.2948971092700958,
0.2032589465379715,
-0.22466377913951874,
-0.3728600740432739,
0.0763261467218399,
-0.06998500227928162,
-0.35993242263793945,
0.13210003077983856,
-0.2497638612985611,
-0.020405709743499756,
-0.21844890713691711,
0.17189612984657288,
0.15930604934692383,
0.16388572752475739,
0.4034930169582367,
-0.15477028489112854,
-0.12025928497314453,
-0.302217960357666,
0.14502179622650146,
0.32768961787223816,
-0.12282606959342957,
0.3003813624382019,
-0.21188987791538239,
0.006112918257713318,
0.1101454421877861,
-0.11704540252685547,
-0.04472004622220993,
0.07933100312948227,
-0.22398877143859863,
-0.19217652082443237,
-0.08170261234045029,
-0.010356642305850983,
-0.21533407270908356,
0.1972702443599701,
-0.21680712699890137,
0.3763892650604248,
0.07182951271533966,
0.19365482032299042,
-0.22428423166275024,
-0.09890946000814438,
0.02029835619032383,
0.06778893619775772,
-0.02216079831123352,
-0.056873202323913574,
0.19304463267326355,
0.16252413392066956,
0.07697032392024994,
0.07965201139450073,
-0.3189263939857483,
-0.060413699597120285,
-0.21295052766799927,
0.18530257046222687,
0.11001823097467422,
-0.09662133455276489,
0.31255385279655457,
0.08876194059848785,
-0.37014085054397583,
-0.0990389883518219,
0.31608182191848755,
-0.2115386724472046,
0.11043918877840042,
0.11254756897687912,
0.19580259919166565,
0.13446107506752014,
-0.2702717185020447,
0.025054309517145157,
-0.10753525793552399,
0.3602887988090515,
0.1304396390914917,
0.14243780076503754,
-0.06978088617324829,
-0.08430250734090805,
0.18649837374687195,
0.053292885422706604,
0.2982028126716614,
-0.15321823954582214,
0.40533119440078735,
-0.1756361573934555,
-0.026646088808774948,
-0.05578995123505592,
0.38835304975509644,
0.4179706275463104,
0.21598200500011444,
-0.02876782976090908,
-0.04850960150361061,
0.0975499376654625,
-0.2621464431285858,
0.23145081102848053,
0.2486339807510376,
-0.09036275744438171,
0.1260383576154709,
0.36638525128364563,
0.21712136268615723,
0.30793288350105286,
-0.2600180506706238,
0.06923069804906845,
0.2204747349023819,
-0.16709645092487335,
0.49665242433547974,
0.6812312602996826,
-0.2562094032764435,
0.506624698638916,
0.4170609712600708,
-0.2192816436290741,
0.17629927396774292,
0.7710938453674316,
-0.10133420675992966,
0.5054677128791809,
0.006250767037272453,
0.08802285045385361,
0.5239155292510986,
-0.4708459973335266,
0.05059971660375595,
0.45790430903434753,
0.31243619322776794,
0.21886670589447021,
-0.230309396982193,
0.19095326960086823,
-0.4291228950023651,
-0.29887279868125916,
-0.20175571739673615,
0.06405621767044067,
-0.16324126720428467,
0.07221753895282745,
-0.2666558623313904,
-0.14774951338768005,
-0.4448676109313965,
-0.19850973784923553,
0.07937085628509521,
-0.19554825127124786,
0.16981947422027588,
-0.041035495698451996,
0.2174406200647354,
-0.07026989012956619,
0.2881234884262085,
-0.08341920375823975,
0.16043278574943542,
-0.2754333019256592,
0.12206503748893738,
0.013622723519802094,
-0.1374799758195877,
0.021209079772233963,
0.17514926195144653,
0.1924545168876648,
0.17036470770835876,
0.05143723264336586,
-0.410894513130188,
0.05936511233448982,
0.0014554057270288467,
0.04533660411834717,
0.21977128088474274,
-0.1882709562778473,
0.30919817090034485,
0.2778536379337311,
-0.007198825478553772,
-0.1041703149676323,
-0.08708453178405762,
0.14009322226047516,
0.10781171917915344,
-0.4092733860015869,
0.7780476212501526,
-0.029169932007789612,
-0.20097365975379944,
0.08572432398796082,
0.1971348226070404,
-0.2530081868171692,
-0.16706696152687073,
0.48852258920669556,
-0.10039472579956055,
-0.11850722879171371,
-0.1684749573469162,
0.038122039288282394,
0.2037205696105957,
0.40691885352134705,
-0.05005224421620369,
-0.13753679394721985,
-0.39415183663368225,
-0.17585864663124084,
-0.3969167470932007,
0.04594259709119797,
-0.2047019898891449,
0.2516385614871979,
-0.020550910383462906,
0.1873529553413391,
0.21092861890792847,
0.10794918984174728,
0.1958669126033783,
0.12780113518238068,
0.19902560114860535,
-0.08972078561782837,
-0.16321620345115662,
-0.09867282211780548,
-0.17237991094589233,
-0.3820716440677643,
-0.08784329891204834,
-0.5605083703994751,
-0.04321451112627983,
0.06417323648929596,
-0.18777000904083252,
0.16980622708797455,
-0.034658316522836685,
0.4984592795372009,
-0.3298732042312622,
0.3147025406360626,
0.33581796288490295,
0.37883004546165466,
-0.05621699243783951,
-0.17933006584644318,
0.0020495839416980743,
-0.2026621401309967,
-0.44123709201812744,
0.19634240865707397,
-0.18474486470222473,
0.23628774285316467,
-0.03987347334623337,
-0.21886934340000153,
-0.4237116277217865,
0.38215264678001404,
0.1402457356452942,
0.20525914430618286,
-0.4020426571369171,
0.5393438935279846,
-0.33294954895973206,
-0.020708199590444565,
0.628118097782135,
0.18077662587165833,
-0.152317076921463,
0.009607557207345963,
-0.3768947124481201,
-0.3352760970592499,
0.25488489866256714,
-0.18355348706245422,
-0.15989592671394348,
-0.399797260761261,
0.3308413624763489,
0.394873708486557,
-0.101162388920784,
-0.19357898831367493,
-0.3101695477962494,
0.23071829974651337,
-0.24430489540100098,
0.14887379109859467,
0.13992339372634888,
0.5106886625289917,
-0.30973681807518005,
-0.14695678651332855,
0.04485289752483368,
-0.14280760288238525,
-0.23397992551326752,
0.2674015462398529,
-0.23542192578315735
] |
https://github.com/huggingface/datasets/issues/5351 | Do we need to implement `_prepare_split`? | one more question for my understanding @mariosasko. the requirement of a loading script has always seemed counterintuitive to me. if i have to provide a script with every dataset, what is the point of using `datasets` if we're doing all the work of loading it, I can just do that in my code and skip the datasets integration (this of course discounts other potential benefits around metadata management, etc., my example is just simplest use case though for the sake of discussion).
so i figured I would implement my own `BuilderConfig` and `DatasetBuilder` to handle that portion of it and not have to make a script. i _thought_ this would result in `datasets` (via `download_and_prepare`) then making me something that I could load using `load_dataset` moving forward.
Concretely, i envisioned this pattern being possible:
```
class MyBuilderConfig(BuilderConfig):
def __init__(self, name="my_named_dataset", ...):
super().__init__(name, ...)
class MyDatasetBuilder(GeneratorBasedBuilder):
BUILDER_CONFIG_CLASS = MyBuilderConfig
....
my_builder = MyDatasetBuilder(...)
# this doesn't exactly work like I thought; I don't get a dataset back, but NoneType instead
# though I can see it loading the files and it generates the cache, etc.
my_dataset = my_builder.download_and_prepare()
# load the dataset in the future by referencing it by name and loading from the cached arrow version
new_instance_of_my_dataset = load_dataset("my_named_dataset")
```
I've seen references to the `save_to_disk` method which might be the next step I need in order to load it by name, in which case, that makes sense, then i just need to debug why `download_and_prepare` isn't returning me a dataset, but I feel like I still have a larger conceptual knowledge gap on how to use the library correctly.
Thanks again in advance! | ### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
| 274 | Do we need to implement `_prepare_split`?
### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
one more question for my understanding @mariosasko. the requirement of a loading script has always seemed counterintuitive to me. if i have to provide a script with every dataset, what is the point of using `datasets` if we're doing all the work of loading it, I can just do that in my code and skip the datasets integration (this of course discounts other potential benefits around metadata management, etc., my example is just simplest use case though for the sake of discussion).
so i figured I would implement my own `BuilderConfig` and `DatasetBuilder` to handle that portion of it and not have to make a script. i _thought_ this would result in `datasets` (via `download_and_prepare`) then making me something that I could load using `load_dataset` moving forward.
Concretely, i envisioned this pattern being possible:
```
class MyBuilderConfig(BuilderConfig):
def __init__(self, name="my_named_dataset", ...):
super().__init__(name, ...)
class MyDatasetBuilder(GeneratorBasedBuilder):
BUILDER_CONFIG_CLASS = MyBuilderConfig
....
my_builder = MyDatasetBuilder(...)
# this doesn't exactly work like I thought; I don't get a dataset back, but NoneType instead
# though I can see it loading the files and it generates the cache, etc.
my_dataset = my_builder.download_and_prepare()
# load the dataset in the future by referencing it by name and loading from the cached arrow version
new_instance_of_my_dataset = load_dataset("my_named_dataset")
```
I've seen references to the `save_to_disk` method which might be the next step I need in order to load it by name, in which case, that makes sense, then i just need to debug why `download_and_prepare` isn't returning me a dataset, but I feel like I still have a larger conceptual knowledge gap on how to use the library correctly.
Thanks again in advance! | [
-0.39684659242630005,
0.028263568878173828,
0.038606513291597366,
0.26486533880233765,
0.14727875590324402,
0.2111169397830963,
0.5743995904922485,
0.3013264238834381,
-0.35358813405036926,
0.27159470319747925,
0.09605718404054642,
0.13665761053562164,
-0.08747748285531998,
-0.15181736648082733,
0.14780128002166748,
-0.42070913314819336,
0.14535833895206451,
0.1660146415233612,
0.16208773851394653,
-0.1653870940208435,
-0.3060036599636078,
0.1335560530424118,
-0.28613731265068054,
-0.018275029957294464,
-0.014041372574865818,
-0.19102515280246735,
-0.3446138799190521,
0.2566714584827423,
0.015331882052123547,
-0.01015452016144991,
0.19002343714237213,
0.14374659955501556,
0.012923896312713623,
0.29963812232017517,
-0.00011747405369533226,
0.022941559553146362,
0.18693788349628448,
0.037026211619377136,
-0.28322234749794006,
0.1104830652475357,
-0.37851041555404663,
-0.1806396096944809,
0.021225344389677048,
-0.13775314390659332,
-0.1588188111782074,
-0.1996767222881317,
-0.061121128499507904,
0.09741990268230438,
0.4871101379394531,
-0.11936972290277481,
0.17597708106040955,
0.02434464916586876,
0.27351364493370056,
-0.23213663697242737,
0.36309370398521423,
0.1646580994129181,
-0.2933652102947235,
0.0010855542495846748,
-0.3826949894428253,
0.37199515104293823,
0.0005425959825515747,
0.14257007837295532,
0.01083565317094326,
0.15484939515590668,
0.15728209912776947,
0.21359305083751678,
-0.22176891565322876,
-0.41140177845954895,
-0.18386536836624146,
0.22885140776634216,
0.1845511794090271,
-0.06408900767564774,
-0.6015823483467102,
-0.40237295627593994,
-0.08474969863891602,
-0.39087918400764465,
0.2498781979084015,
0.08445042371749878,
0.08495074510574341,
0.13040415942668915,
0.18502093851566315,
-0.3826562464237213,
-0.08255728334188461,
0.015825849026441574,
0.06130083650350571,
0.2952607572078705,
-0.06226996332406998,
0.1560605764389038,
0.2717878520488739,
0.16989749670028687,
0.21911954879760742,
-0.1744018942117691,
-0.06355585157871246,
0.19579550623893738,
-0.1356973648071289,
-0.31445595622062683,
-0.2376558482646942,
-0.008966110646724701,
-0.1408722698688507,
0.20624682307243347,
-0.06777498126029968,
0.0807190090417862,
0.42259854078292847,
0.25069308280944824,
0.148600772023201,
-0.04463319480419159,
-0.016697287559509277,
0.48730266094207764,
0.2475123554468155,
-0.04061730578541756,
0.052557382732629776,
-0.11991200596094131,
-0.09080676734447479,
-0.24119935929775238,
-0.010137056931853294,
0.10603164881467819,
0.12858586013317108,
-0.06924451887607574,
-0.26513412594795227,
-0.21649104356765747,
-0.5023368000984192,
-0.21063846349716187,
0.21955257654190063,
0.10517436265945435,
0.1284000724554062,
0.064239501953125,
0.03324189782142639,
0.022569913417100906,
-0.35357993841171265,
-0.40791329741477966,
-0.14177419245243073,
0.10359297692775726,
-0.2609596252441406,
0.23590043187141418,
0.004826676100492477,
-0.35990655422210693,
-0.09566053748130798,
0.22641710937023163,
0.18358878791332245,
0.09278200566768646,
0.314890593290329,
-0.1250021755695343,
0.07167699933052063,
0.45175570249557495,
0.10588033497333527,
-0.09202926605939865,
0.06544142216444016,
0.073043093085289,
-0.21463599801063538,
-0.08073849231004715,
-0.10297957807779312,
-0.5045248866081238,
-0.049303025007247925,
0.15910503268241882,
0.16796211898326874,
0.2293487787246704,
-0.031487904489040375,
0.1408950239419937,
0.5039725303649902,
-0.1939413696527481,
-0.05727396160364151,
-0.17013923823833466,
-0.026260968297719955,
-0.18988627195358276,
0.3036646544933319,
0.2773198187351227,
-0.401644766330719,
0.09226536750793457,
-0.7184799313545227,
-0.16774006187915802,
0.5405654907226562,
0.14763866364955902,
-0.0746159479022026,
0.2311374843120575,
-0.26274338364601135,
0.3361905813217163,
0.48538774251937866,
0.017970960587263107,
-0.036314792931079865,
0.5023655891418457,
0.11890998482704163,
0.10742569714784622,
0.333443820476532,
-0.08776962757110596,
0.14591141045093536,
-0.20631597936153412,
-0.052705079317092896,
0.2896369695663452,
-0.31835824251174927,
-0.3146226406097412,
-0.21228303015232086,
-0.17161352932453156,
0.0773966833949089,
0.16674552857875824,
0.28786981105804443,
0.1822900027036667,
0.06606683880090714,
0.10566171258687973,
0.19938117265701294,
-0.18416602909564972,
0.0943569615483284,
-0.04461175203323364,
0.3000200688838959,
0.23335805535316467,
-0.04686537757515907,
-0.10540944337844849,
-0.15513670444488525,
-0.029079973697662354,
-0.1268458068370819,
-0.012344986200332642,
0.2983875870704651,
-0.42012810707092285,
0.11186052113771439,
-0.14578871428966522,
-0.38800016045570374,
-0.13781365752220154,
0.04966399073600769,
-0.19142234325408936,
0.03738008067011833,
-0.38862380385398865,
-0.06873836368322372,
0.20474745333194733,
-0.28792521357536316,
0.4126656949520111,
-0.32395315170288086,
0.3116569519042969,
-0.142796128988266,
-0.043284717947244644,
-0.20283591747283936,
0.2716238498687744,
0.14596334099769592,
-0.2830008566379547,
-0.06441003829240799,
0.5136758685112,
0.291328102350235,
-0.24997763335704803,
-0.059897281229496,
-0.2693110704421997,
0.08354587107896805,
-0.15337182581424713,
0.042650770395994186,
0.031973011791706085,
-0.02706761658191681,
-0.051615532487630844,
0.14399263262748718,
0.4913005232810974,
0.366813063621521,
0.11045161634683609,
0.2624824643135071,
0.08640622347593307,
0.05055227875709534,
0.19224467873573303,
-0.025131959468126297,
-0.5075973272323608,
-0.14128746092319489,
-0.1288161277770996,
0.36693763732910156,
0.037243615835905075,
-0.23756958544254303,
0.12378554791212082,
0.33912959694862366,
-0.0939384400844574,
0.0564550943672657,
-0.002696774899959564,
0.032512366771698,
-0.03267534822225571,
0.19626852869987488,
0.6504374146461487,
0.46662062406539917,
0.16019925475120544,
0.18037693202495575,
0.20965346693992615,
-0.08586877584457397,
-0.14688369631767273,
0.33640286326408386,
0.2990989089012146,
0.13856849074363708,
-0.06140373647212982,
-0.33035337924957275,
0.06392353028059006,
-0.3187515139579773,
0.0926380604505539,
0.17019931972026825,
0.07574108242988586,
-0.272845059633255,
0.20274867117404938,
-0.25227856636047363,
0.11746247857809067,
-0.05071716755628586,
-0.08012167364358902,
-0.1913539171218872,
-0.35754266381263733,
0.03426313400268555,
0.0016134455800056458,
-0.29701390862464905,
0.16204673051834106,
-0.18612495064735413,
0.18825514614582062,
-0.12258162349462509,
0.023716170340776443,
0.04185888171195984,
0.3042150139808655,
-0.2979263365268707,
0.057803910225629807,
0.16507954895496368,
-0.1444491147994995,
0.3168366551399231,
-0.03936731070280075,
-0.1276976764202118,
-0.08117051422595978,
-0.5159487724304199,
0.2702007293701172,
-0.2245928794145584,
0.2663232684135437,
0.4786919057369232,
-0.4132232666015625,
0.04565294086933136,
-0.4948858320713043,
0.1087316945195198,
-0.15118210017681122,
-0.09252903610467911,
-0.05147195979952812,
-0.11129637062549591,
0.0948367565870285,
-0.35219115018844604,
-0.4680473506450653,
-0.11007628589868546,
-0.4203089475631714,
-0.12111446261405945,
-0.07681912183761597,
0.238184854388237,
0.1925923377275467,
-0.13644681870937347,
0.00296865776181221,
-0.028139689937233925,
-0.132253497838974,
-0.327067494392395,
0.015882376581430435,
0.2679441571235657,
-0.6211180686950684,
-0.10632839798927307,
0.044059086591005325,
-0.3742111921310425,
0.33532145619392395,
0.28402459621429443,
0.04607991874217987,
0.14194205403327942,
-0.19706767797470093,
-0.05222194641828537,
-0.15237724781036377,
0.06522414833307266,
0.1761888861656189,
0.14206793904304504,
0.026619983837008476,
-0.0661187618970871,
0.1303909868001938,
0.23738199472427368,
-0.11329738050699234,
0.2719256281852722,
-0.23288428783416748,
0.5564010739326477,
-0.05160555988550186,
1.0884464979171753,
-0.03055630996823311,
0.035857267677783966,
0.056173793971538544,
0.1555497795343399,
0.2330702692270279,
-0.057868726551532745,
-0.3012399673461914,
0.15010754764080048,
0.0013234466314315796,
-0.20803478360176086,
0.21802037954330444,
0.008280155248939991,
-0.29986992478370667,
-0.02094067446887493,
0.15389686822891235,
-0.0890190601348877,
-0.43301600217819214,
-0.1505630761384964,
-0.2020646631717682,
0.4340951144695282,
-0.03510919585824013,
0.4342504143714905,
0.0068663060665130615,
0.16457009315490723,
-0.3399643003940582,
0.37511032819747925,
0.3924174904823303,
-0.08463743329048157,
0.06664139032363892,
-0.006820078939199448,
-0.13740777969360352,
0.4405192732810974,
0.1433136910200119,
0.26458853483200073,
-0.09999056905508041,
-0.16890555620193481,
0.09111547470092773,
-0.10114522278308868,
0.37898099422454834,
-0.35058319568634033,
-0.2927839159965515,
0.19355928897857666,
-0.2848760485649109,
-0.2273978292942047,
-0.22696629166603088,
-0.18112404644489288,
0.03454948961734772,
0.07233735918998718,
-0.3326079845428467,
-0.3115488290786743,
-0.3117128014564514,
0.7352997064590454,
-0.1864841878414154,
-0.08025507628917694,
-0.15027150511741638,
-0.186609148979187,
-0.3156912922859192,
-0.20027951896190643,
-0.016922980546951294,
-0.038802534341812134,
0.03560464084148407,
-0.2930353581905365,
-0.13759002089500427,
-0.08352375030517578,
-0.13190388679504395,
0.23352229595184326,
0.018593162298202515,
0.22021484375,
-0.2994156777858734,
0.18879397213459015,
0.13807091116905212,
0.06922152638435364,
0.3746967911720276,
0.15566593408584595,
-0.1372116059064865,
-0.07001984119415283,
0.27345797419548035,
-0.1669098138809204,
0.5717335939407349,
0.37936145067214966,
-0.47992101311683655,
0.2568068504333496,
-0.04967688024044037,
0.09850376099348068,
-0.23076754808425903,
-0.11333414912223816,
0.42127928137779236,
-0.17206160724163055,
-0.13391220569610596,
-0.7076979279518127,
0.2136102020740509,
0.20300352573394775,
-0.10186022520065308,
0.23167762160301208,
0.22539229691028595,
-0.36115118861198425,
0.1966238170862198,
0.160946324467659,
0.8526101112365723,
0.40424132347106934,
0.14474493265151978,
0.37336477637290955,
0.10990853607654572,
0.15516865253448486,
-0.1633453667163849,
0.39535099267959595,
-0.2653314769268036,
-0.06914123892784119,
-0.1323762685060501,
-0.09144262969493866,
0.6105437278747559,
0.10514269769191742,
-0.11441493034362793,
0.37567275762557983,
-0.24762585759162903,
0.17863868176937103,
-0.016957847401499748,
0.148300901055336,
-0.35417428612709045,
-0.38956543803215027,
-0.026333242654800415,
0.07703375816345215,
0.1757497787475586,
0.08829361945390701,
-0.15674766898155212,
-0.1366119086742401,
0.02816503867506981,
-0.1252015084028244,
-0.12678304314613342,
0.1978612244129181,
-0.018866870552301407,
0.236222505569458,
-0.10481336712837219,
-0.31014519929885864,
0.6872695684432983,
-0.4096830189228058,
0.24755938351154327,
0.304944783449173,
0.0910269021987915,
0.1516876220703125,
-0.15852829813957214,
0.20086835324764252,
-0.11514471471309662,
0.02387591078877449,
0.4507102370262146,
0.006011147052049637,
0.09194812923669815,
-0.27010664343833923,
-0.1529843509197235,
-0.2632179856300354,
-0.3791462779045105,
-0.051137641072273254,
0.11800803244113922,
-0.43072620034217834,
0.2948971092700958,
0.2032589465379715,
-0.22466377913951874,
-0.3728600740432739,
0.0763261467218399,
-0.06998500227928162,
-0.35993242263793945,
0.13210003077983856,
-0.2497638612985611,
-0.020405709743499756,
-0.21844890713691711,
0.17189612984657288,
0.15930604934692383,
0.16388572752475739,
0.4034930169582367,
-0.15477028489112854,
-0.12025928497314453,
-0.302217960357666,
0.14502179622650146,
0.32768961787223816,
-0.12282606959342957,
0.3003813624382019,
-0.21188987791538239,
0.006112918257713318,
0.1101454421877861,
-0.11704540252685547,
-0.04472004622220993,
0.07933100312948227,
-0.22398877143859863,
-0.19217652082443237,
-0.08170261234045029,
-0.010356642305850983,
-0.21533407270908356,
0.1972702443599701,
-0.21680712699890137,
0.3763892650604248,
0.07182951271533966,
0.19365482032299042,
-0.22428423166275024,
-0.09890946000814438,
0.02029835619032383,
0.06778893619775772,
-0.02216079831123352,
-0.056873202323913574,
0.19304463267326355,
0.16252413392066956,
0.07697032392024994,
0.07965201139450073,
-0.3189263939857483,
-0.060413699597120285,
-0.21295052766799927,
0.18530257046222687,
0.11001823097467422,
-0.09662133455276489,
0.31255385279655457,
0.08876194059848785,
-0.37014085054397583,
-0.0990389883518219,
0.31608182191848755,
-0.2115386724472046,
0.11043918877840042,
0.11254756897687912,
0.19580259919166565,
0.13446107506752014,
-0.2702717185020447,
0.025054309517145157,
-0.10753525793552399,
0.3602887988090515,
0.1304396390914917,
0.14243780076503754,
-0.06978088617324829,
-0.08430250734090805,
0.18649837374687195,
0.053292885422706604,
0.2982028126716614,
-0.15321823954582214,
0.40533119440078735,
-0.1756361573934555,
-0.026646088808774948,
-0.05578995123505592,
0.38835304975509644,
0.4179706275463104,
0.21598200500011444,
-0.02876782976090908,
-0.04850960150361061,
0.0975499376654625,
-0.2621464431285858,
0.23145081102848053,
0.2486339807510376,
-0.09036275744438171,
0.1260383576154709,
0.36638525128364563,
0.21712136268615723,
0.30793288350105286,
-0.2600180506706238,
0.06923069804906845,
0.2204747349023819,
-0.16709645092487335,
0.49665242433547974,
0.6812312602996826,
-0.2562094032764435,
0.506624698638916,
0.4170609712600708,
-0.2192816436290741,
0.17629927396774292,
0.7710938453674316,
-0.10133420675992966,
0.5054677128791809,
0.006250767037272453,
0.08802285045385361,
0.5239155292510986,
-0.4708459973335266,
0.05059971660375595,
0.45790430903434753,
0.31243619322776794,
0.21886670589447021,
-0.230309396982193,
0.19095326960086823,
-0.4291228950023651,
-0.29887279868125916,
-0.20175571739673615,
0.06405621767044067,
-0.16324126720428467,
0.07221753895282745,
-0.2666558623313904,
-0.14774951338768005,
-0.4448676109313965,
-0.19850973784923553,
0.07937085628509521,
-0.19554825127124786,
0.16981947422027588,
-0.041035495698451996,
0.2174406200647354,
-0.07026989012956619,
0.2881234884262085,
-0.08341920375823975,
0.16043278574943542,
-0.2754333019256592,
0.12206503748893738,
0.013622723519802094,
-0.1374799758195877,
0.021209079772233963,
0.17514926195144653,
0.1924545168876648,
0.17036470770835876,
0.05143723264336586,
-0.410894513130188,
0.05936511233448982,
0.0014554057270288467,
0.04533660411834717,
0.21977128088474274,
-0.1882709562778473,
0.30919817090034485,
0.2778536379337311,
-0.007198825478553772,
-0.1041703149676323,
-0.08708453178405762,
0.14009322226047516,
0.10781171917915344,
-0.4092733860015869,
0.7780476212501526,
-0.029169932007789612,
-0.20097365975379944,
0.08572432398796082,
0.1971348226070404,
-0.2530081868171692,
-0.16706696152687073,
0.48852258920669556,
-0.10039472579956055,
-0.11850722879171371,
-0.1684749573469162,
0.038122039288282394,
0.2037205696105957,
0.40691885352134705,
-0.05005224421620369,
-0.13753679394721985,
-0.39415183663368225,
-0.17585864663124084,
-0.3969167470932007,
0.04594259709119797,
-0.2047019898891449,
0.2516385614871979,
-0.020550910383462906,
0.1873529553413391,
0.21092861890792847,
0.10794918984174728,
0.1958669126033783,
0.12780113518238068,
0.19902560114860535,
-0.08972078561782837,
-0.16321620345115662,
-0.09867282211780548,
-0.17237991094589233,
-0.3820716440677643,
-0.08784329891204834,
-0.5605083703994751,
-0.04321451112627983,
0.06417323648929596,
-0.18777000904083252,
0.16980622708797455,
-0.034658316522836685,
0.4984592795372009,
-0.3298732042312622,
0.3147025406360626,
0.33581796288490295,
0.37883004546165466,
-0.05621699243783951,
-0.17933006584644318,
0.0020495839416980743,
-0.2026621401309967,
-0.44123709201812744,
0.19634240865707397,
-0.18474486470222473,
0.23628774285316467,
-0.03987347334623337,
-0.21886934340000153,
-0.4237116277217865,
0.38215264678001404,
0.1402457356452942,
0.20525914430618286,
-0.4020426571369171,
0.5393438935279846,
-0.33294954895973206,
-0.020708199590444565,
0.628118097782135,
0.18077662587165833,
-0.152317076921463,
0.009607557207345963,
-0.3768947124481201,
-0.3352760970592499,
0.25488489866256714,
-0.18355348706245422,
-0.15989592671394348,
-0.399797260761261,
0.3308413624763489,
0.394873708486557,
-0.101162388920784,
-0.19357898831367493,
-0.3101695477962494,
0.23071829974651337,
-0.24430489540100098,
0.14887379109859467,
0.13992339372634888,
0.5106886625289917,
-0.30973681807518005,
-0.14695678651332855,
0.04485289752483368,
-0.14280760288238525,
-0.23397992551326752,
0.2674015462398529,
-0.23542192578315735
] |
https://github.com/huggingface/datasets/issues/5351 | Do we need to implement `_prepare_split`? | > the requirement of a loading script has always seemed counterintuitive to me
This is a requirement only for datasets not stored in standard formats such as CSV, JSON, SQL, Parquet, ImageFolder, etc.
> if i have to provide a script with every dataset, what is the point of using datasets if we're doing all the work of loading it, I can just do that in my code and skip the datasets integration (this of course discounts other potential benefits around metadata management, etc., my example is just simplest use case though for the sake of discussion)
Our README/documentation lists the main features...
One of the main ones is that our library makes it easy to work with datasets larger than RAM (thanks to Arrow and the caching mechanism), and this is not trivial to implement.
Regarding the step-by-step builder, this is the pattern:
```python
from datasets import load_dataset_builder
builder = load_dataset_builder("path/to/script") # or direct instantiation with MyDatasetBuilder(...)
builder.download_and_prepare()
dset = builder.as_dataset()
``` | ### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
| 163 | Do we need to implement `_prepare_split`?
### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
> the requirement of a loading script has always seemed counterintuitive to me
This is a requirement only for datasets not stored in standard formats such as CSV, JSON, SQL, Parquet, ImageFolder, etc.
> if i have to provide a script with every dataset, what is the point of using datasets if we're doing all the work of loading it, I can just do that in my code and skip the datasets integration (this of course discounts other potential benefits around metadata management, etc., my example is just simplest use case though for the sake of discussion)
Our README/documentation lists the main features...
One of the main ones is that our library makes it easy to work with datasets larger than RAM (thanks to Arrow and the caching mechanism), and this is not trivial to implement.
Regarding the step-by-step builder, this is the pattern:
```python
from datasets import load_dataset_builder
builder = load_dataset_builder("path/to/script") # or direct instantiation with MyDatasetBuilder(...)
builder.download_and_prepare()
dset = builder.as_dataset()
``` | [
-0.39684659242630005,
0.028263568878173828,
0.038606513291597366,
0.26486533880233765,
0.14727875590324402,
0.2111169397830963,
0.5743995904922485,
0.3013264238834381,
-0.35358813405036926,
0.27159470319747925,
0.09605718404054642,
0.13665761053562164,
-0.08747748285531998,
-0.15181736648082733,
0.14780128002166748,
-0.42070913314819336,
0.14535833895206451,
0.1660146415233612,
0.16208773851394653,
-0.1653870940208435,
-0.3060036599636078,
0.1335560530424118,
-0.28613731265068054,
-0.018275029957294464,
-0.014041372574865818,
-0.19102515280246735,
-0.3446138799190521,
0.2566714584827423,
0.015331882052123547,
-0.01015452016144991,
0.19002343714237213,
0.14374659955501556,
0.012923896312713623,
0.29963812232017517,
-0.00011747405369533226,
0.022941559553146362,
0.18693788349628448,
0.037026211619377136,
-0.28322234749794006,
0.1104830652475357,
-0.37851041555404663,
-0.1806396096944809,
0.021225344389677048,
-0.13775314390659332,
-0.1588188111782074,
-0.1996767222881317,
-0.061121128499507904,
0.09741990268230438,
0.4871101379394531,
-0.11936972290277481,
0.17597708106040955,
0.02434464916586876,
0.27351364493370056,
-0.23213663697242737,
0.36309370398521423,
0.1646580994129181,
-0.2933652102947235,
0.0010855542495846748,
-0.3826949894428253,
0.37199515104293823,
0.0005425959825515747,
0.14257007837295532,
0.01083565317094326,
0.15484939515590668,
0.15728209912776947,
0.21359305083751678,
-0.22176891565322876,
-0.41140177845954895,
-0.18386536836624146,
0.22885140776634216,
0.1845511794090271,
-0.06408900767564774,
-0.6015823483467102,
-0.40237295627593994,
-0.08474969863891602,
-0.39087918400764465,
0.2498781979084015,
0.08445042371749878,
0.08495074510574341,
0.13040415942668915,
0.18502093851566315,
-0.3826562464237213,
-0.08255728334188461,
0.015825849026441574,
0.06130083650350571,
0.2952607572078705,
-0.06226996332406998,
0.1560605764389038,
0.2717878520488739,
0.16989749670028687,
0.21911954879760742,
-0.1744018942117691,
-0.06355585157871246,
0.19579550623893738,
-0.1356973648071289,
-0.31445595622062683,
-0.2376558482646942,
-0.008966110646724701,
-0.1408722698688507,
0.20624682307243347,
-0.06777498126029968,
0.0807190090417862,
0.42259854078292847,
0.25069308280944824,
0.148600772023201,
-0.04463319480419159,
-0.016697287559509277,
0.48730266094207764,
0.2475123554468155,
-0.04061730578541756,
0.052557382732629776,
-0.11991200596094131,
-0.09080676734447479,
-0.24119935929775238,
-0.010137056931853294,
0.10603164881467819,
0.12858586013317108,
-0.06924451887607574,
-0.26513412594795227,
-0.21649104356765747,
-0.5023368000984192,
-0.21063846349716187,
0.21955257654190063,
0.10517436265945435,
0.1284000724554062,
0.064239501953125,
0.03324189782142639,
0.022569913417100906,
-0.35357993841171265,
-0.40791329741477966,
-0.14177419245243073,
0.10359297692775726,
-0.2609596252441406,
0.23590043187141418,
0.004826676100492477,
-0.35990655422210693,
-0.09566053748130798,
0.22641710937023163,
0.18358878791332245,
0.09278200566768646,
0.314890593290329,
-0.1250021755695343,
0.07167699933052063,
0.45175570249557495,
0.10588033497333527,
-0.09202926605939865,
0.06544142216444016,
0.073043093085289,
-0.21463599801063538,
-0.08073849231004715,
-0.10297957807779312,
-0.5045248866081238,
-0.049303025007247925,
0.15910503268241882,
0.16796211898326874,
0.2293487787246704,
-0.031487904489040375,
0.1408950239419937,
0.5039725303649902,
-0.1939413696527481,
-0.05727396160364151,
-0.17013923823833466,
-0.026260968297719955,
-0.18988627195358276,
0.3036646544933319,
0.2773198187351227,
-0.401644766330719,
0.09226536750793457,
-0.7184799313545227,
-0.16774006187915802,
0.5405654907226562,
0.14763866364955902,
-0.0746159479022026,
0.2311374843120575,
-0.26274338364601135,
0.3361905813217163,
0.48538774251937866,
0.017970960587263107,
-0.036314792931079865,
0.5023655891418457,
0.11890998482704163,
0.10742569714784622,
0.333443820476532,
-0.08776962757110596,
0.14591141045093536,
-0.20631597936153412,
-0.052705079317092896,
0.2896369695663452,
-0.31835824251174927,
-0.3146226406097412,
-0.21228303015232086,
-0.17161352932453156,
0.0773966833949089,
0.16674552857875824,
0.28786981105804443,
0.1822900027036667,
0.06606683880090714,
0.10566171258687973,
0.19938117265701294,
-0.18416602909564972,
0.0943569615483284,
-0.04461175203323364,
0.3000200688838959,
0.23335805535316467,
-0.04686537757515907,
-0.10540944337844849,
-0.15513670444488525,
-0.029079973697662354,
-0.1268458068370819,
-0.012344986200332642,
0.2983875870704651,
-0.42012810707092285,
0.11186052113771439,
-0.14578871428966522,
-0.38800016045570374,
-0.13781365752220154,
0.04966399073600769,
-0.19142234325408936,
0.03738008067011833,
-0.38862380385398865,
-0.06873836368322372,
0.20474745333194733,
-0.28792521357536316,
0.4126656949520111,
-0.32395315170288086,
0.3116569519042969,
-0.142796128988266,
-0.043284717947244644,
-0.20283591747283936,
0.2716238498687744,
0.14596334099769592,
-0.2830008566379547,
-0.06441003829240799,
0.5136758685112,
0.291328102350235,
-0.24997763335704803,
-0.059897281229496,
-0.2693110704421997,
0.08354587107896805,
-0.15337182581424713,
0.042650770395994186,
0.031973011791706085,
-0.02706761658191681,
-0.051615532487630844,
0.14399263262748718,
0.4913005232810974,
0.366813063621521,
0.11045161634683609,
0.2624824643135071,
0.08640622347593307,
0.05055227875709534,
0.19224467873573303,
-0.025131959468126297,
-0.5075973272323608,
-0.14128746092319489,
-0.1288161277770996,
0.36693763732910156,
0.037243615835905075,
-0.23756958544254303,
0.12378554791212082,
0.33912959694862366,
-0.0939384400844574,
0.0564550943672657,
-0.002696774899959564,
0.032512366771698,
-0.03267534822225571,
0.19626852869987488,
0.6504374146461487,
0.46662062406539917,
0.16019925475120544,
0.18037693202495575,
0.20965346693992615,
-0.08586877584457397,
-0.14688369631767273,
0.33640286326408386,
0.2990989089012146,
0.13856849074363708,
-0.06140373647212982,
-0.33035337924957275,
0.06392353028059006,
-0.3187515139579773,
0.0926380604505539,
0.17019931972026825,
0.07574108242988586,
-0.272845059633255,
0.20274867117404938,
-0.25227856636047363,
0.11746247857809067,
-0.05071716755628586,
-0.08012167364358902,
-0.1913539171218872,
-0.35754266381263733,
0.03426313400268555,
0.0016134455800056458,
-0.29701390862464905,
0.16204673051834106,
-0.18612495064735413,
0.18825514614582062,
-0.12258162349462509,
0.023716170340776443,
0.04185888171195984,
0.3042150139808655,
-0.2979263365268707,
0.057803910225629807,
0.16507954895496368,
-0.1444491147994995,
0.3168366551399231,
-0.03936731070280075,
-0.1276976764202118,
-0.08117051422595978,
-0.5159487724304199,
0.2702007293701172,
-0.2245928794145584,
0.2663232684135437,
0.4786919057369232,
-0.4132232666015625,
0.04565294086933136,
-0.4948858320713043,
0.1087316945195198,
-0.15118210017681122,
-0.09252903610467911,
-0.05147195979952812,
-0.11129637062549591,
0.0948367565870285,
-0.35219115018844604,
-0.4680473506450653,
-0.11007628589868546,
-0.4203089475631714,
-0.12111446261405945,
-0.07681912183761597,
0.238184854388237,
0.1925923377275467,
-0.13644681870937347,
0.00296865776181221,
-0.028139689937233925,
-0.132253497838974,
-0.327067494392395,
0.015882376581430435,
0.2679441571235657,
-0.6211180686950684,
-0.10632839798927307,
0.044059086591005325,
-0.3742111921310425,
0.33532145619392395,
0.28402459621429443,
0.04607991874217987,
0.14194205403327942,
-0.19706767797470093,
-0.05222194641828537,
-0.15237724781036377,
0.06522414833307266,
0.1761888861656189,
0.14206793904304504,
0.026619983837008476,
-0.0661187618970871,
0.1303909868001938,
0.23738199472427368,
-0.11329738050699234,
0.2719256281852722,
-0.23288428783416748,
0.5564010739326477,
-0.05160555988550186,
1.0884464979171753,
-0.03055630996823311,
0.035857267677783966,
0.056173793971538544,
0.1555497795343399,
0.2330702692270279,
-0.057868726551532745,
-0.3012399673461914,
0.15010754764080048,
0.0013234466314315796,
-0.20803478360176086,
0.21802037954330444,
0.008280155248939991,
-0.29986992478370667,
-0.02094067446887493,
0.15389686822891235,
-0.0890190601348877,
-0.43301600217819214,
-0.1505630761384964,
-0.2020646631717682,
0.4340951144695282,
-0.03510919585824013,
0.4342504143714905,
0.0068663060665130615,
0.16457009315490723,
-0.3399643003940582,
0.37511032819747925,
0.3924174904823303,
-0.08463743329048157,
0.06664139032363892,
-0.006820078939199448,
-0.13740777969360352,
0.4405192732810974,
0.1433136910200119,
0.26458853483200073,
-0.09999056905508041,
-0.16890555620193481,
0.09111547470092773,
-0.10114522278308868,
0.37898099422454834,
-0.35058319568634033,
-0.2927839159965515,
0.19355928897857666,
-0.2848760485649109,
-0.2273978292942047,
-0.22696629166603088,
-0.18112404644489288,
0.03454948961734772,
0.07233735918998718,
-0.3326079845428467,
-0.3115488290786743,
-0.3117128014564514,
0.7352997064590454,
-0.1864841878414154,
-0.08025507628917694,
-0.15027150511741638,
-0.186609148979187,
-0.3156912922859192,
-0.20027951896190643,
-0.016922980546951294,
-0.038802534341812134,
0.03560464084148407,
-0.2930353581905365,
-0.13759002089500427,
-0.08352375030517578,
-0.13190388679504395,
0.23352229595184326,
0.018593162298202515,
0.22021484375,
-0.2994156777858734,
0.18879397213459015,
0.13807091116905212,
0.06922152638435364,
0.3746967911720276,
0.15566593408584595,
-0.1372116059064865,
-0.07001984119415283,
0.27345797419548035,
-0.1669098138809204,
0.5717335939407349,
0.37936145067214966,
-0.47992101311683655,
0.2568068504333496,
-0.04967688024044037,
0.09850376099348068,
-0.23076754808425903,
-0.11333414912223816,
0.42127928137779236,
-0.17206160724163055,
-0.13391220569610596,
-0.7076979279518127,
0.2136102020740509,
0.20300352573394775,
-0.10186022520065308,
0.23167762160301208,
0.22539229691028595,
-0.36115118861198425,
0.1966238170862198,
0.160946324467659,
0.8526101112365723,
0.40424132347106934,
0.14474493265151978,
0.37336477637290955,
0.10990853607654572,
0.15516865253448486,
-0.1633453667163849,
0.39535099267959595,
-0.2653314769268036,
-0.06914123892784119,
-0.1323762685060501,
-0.09144262969493866,
0.6105437278747559,
0.10514269769191742,
-0.11441493034362793,
0.37567275762557983,
-0.24762585759162903,
0.17863868176937103,
-0.016957847401499748,
0.148300901055336,
-0.35417428612709045,
-0.38956543803215027,
-0.026333242654800415,
0.07703375816345215,
0.1757497787475586,
0.08829361945390701,
-0.15674766898155212,
-0.1366119086742401,
0.02816503867506981,
-0.1252015084028244,
-0.12678304314613342,
0.1978612244129181,
-0.018866870552301407,
0.236222505569458,
-0.10481336712837219,
-0.31014519929885864,
0.6872695684432983,
-0.4096830189228058,
0.24755938351154327,
0.304944783449173,
0.0910269021987915,
0.1516876220703125,
-0.15852829813957214,
0.20086835324764252,
-0.11514471471309662,
0.02387591078877449,
0.4507102370262146,
0.006011147052049637,
0.09194812923669815,
-0.27010664343833923,
-0.1529843509197235,
-0.2632179856300354,
-0.3791462779045105,
-0.051137641072273254,
0.11800803244113922,
-0.43072620034217834,
0.2948971092700958,
0.2032589465379715,
-0.22466377913951874,
-0.3728600740432739,
0.0763261467218399,
-0.06998500227928162,
-0.35993242263793945,
0.13210003077983856,
-0.2497638612985611,
-0.020405709743499756,
-0.21844890713691711,
0.17189612984657288,
0.15930604934692383,
0.16388572752475739,
0.4034930169582367,
-0.15477028489112854,
-0.12025928497314453,
-0.302217960357666,
0.14502179622650146,
0.32768961787223816,
-0.12282606959342957,
0.3003813624382019,
-0.21188987791538239,
0.006112918257713318,
0.1101454421877861,
-0.11704540252685547,
-0.04472004622220993,
0.07933100312948227,
-0.22398877143859863,
-0.19217652082443237,
-0.08170261234045029,
-0.010356642305850983,
-0.21533407270908356,
0.1972702443599701,
-0.21680712699890137,
0.3763892650604248,
0.07182951271533966,
0.19365482032299042,
-0.22428423166275024,
-0.09890946000814438,
0.02029835619032383,
0.06778893619775772,
-0.02216079831123352,
-0.056873202323913574,
0.19304463267326355,
0.16252413392066956,
0.07697032392024994,
0.07965201139450073,
-0.3189263939857483,
-0.060413699597120285,
-0.21295052766799927,
0.18530257046222687,
0.11001823097467422,
-0.09662133455276489,
0.31255385279655457,
0.08876194059848785,
-0.37014085054397583,
-0.0990389883518219,
0.31608182191848755,
-0.2115386724472046,
0.11043918877840042,
0.11254756897687912,
0.19580259919166565,
0.13446107506752014,
-0.2702717185020447,
0.025054309517145157,
-0.10753525793552399,
0.3602887988090515,
0.1304396390914917,
0.14243780076503754,
-0.06978088617324829,
-0.08430250734090805,
0.18649837374687195,
0.053292885422706604,
0.2982028126716614,
-0.15321823954582214,
0.40533119440078735,
-0.1756361573934555,
-0.026646088808774948,
-0.05578995123505592,
0.38835304975509644,
0.4179706275463104,
0.21598200500011444,
-0.02876782976090908,
-0.04850960150361061,
0.0975499376654625,
-0.2621464431285858,
0.23145081102848053,
0.2486339807510376,
-0.09036275744438171,
0.1260383576154709,
0.36638525128364563,
0.21712136268615723,
0.30793288350105286,
-0.2600180506706238,
0.06923069804906845,
0.2204747349023819,
-0.16709645092487335,
0.49665242433547974,
0.6812312602996826,
-0.2562094032764435,
0.506624698638916,
0.4170609712600708,
-0.2192816436290741,
0.17629927396774292,
0.7710938453674316,
-0.10133420675992966,
0.5054677128791809,
0.006250767037272453,
0.08802285045385361,
0.5239155292510986,
-0.4708459973335266,
0.05059971660375595,
0.45790430903434753,
0.31243619322776794,
0.21886670589447021,
-0.230309396982193,
0.19095326960086823,
-0.4291228950023651,
-0.29887279868125916,
-0.20175571739673615,
0.06405621767044067,
-0.16324126720428467,
0.07221753895282745,
-0.2666558623313904,
-0.14774951338768005,
-0.4448676109313965,
-0.19850973784923553,
0.07937085628509521,
-0.19554825127124786,
0.16981947422027588,
-0.041035495698451996,
0.2174406200647354,
-0.07026989012956619,
0.2881234884262085,
-0.08341920375823975,
0.16043278574943542,
-0.2754333019256592,
0.12206503748893738,
0.013622723519802094,
-0.1374799758195877,
0.021209079772233963,
0.17514926195144653,
0.1924545168876648,
0.17036470770835876,
0.05143723264336586,
-0.410894513130188,
0.05936511233448982,
0.0014554057270288467,
0.04533660411834717,
0.21977128088474274,
-0.1882709562778473,
0.30919817090034485,
0.2778536379337311,
-0.007198825478553772,
-0.1041703149676323,
-0.08708453178405762,
0.14009322226047516,
0.10781171917915344,
-0.4092733860015869,
0.7780476212501526,
-0.029169932007789612,
-0.20097365975379944,
0.08572432398796082,
0.1971348226070404,
-0.2530081868171692,
-0.16706696152687073,
0.48852258920669556,
-0.10039472579956055,
-0.11850722879171371,
-0.1684749573469162,
0.038122039288282394,
0.2037205696105957,
0.40691885352134705,
-0.05005224421620369,
-0.13753679394721985,
-0.39415183663368225,
-0.17585864663124084,
-0.3969167470932007,
0.04594259709119797,
-0.2047019898891449,
0.2516385614871979,
-0.020550910383462906,
0.1873529553413391,
0.21092861890792847,
0.10794918984174728,
0.1958669126033783,
0.12780113518238068,
0.19902560114860535,
-0.08972078561782837,
-0.16321620345115662,
-0.09867282211780548,
-0.17237991094589233,
-0.3820716440677643,
-0.08784329891204834,
-0.5605083703994751,
-0.04321451112627983,
0.06417323648929596,
-0.18777000904083252,
0.16980622708797455,
-0.034658316522836685,
0.4984592795372009,
-0.3298732042312622,
0.3147025406360626,
0.33581796288490295,
0.37883004546165466,
-0.05621699243783951,
-0.17933006584644318,
0.0020495839416980743,
-0.2026621401309967,
-0.44123709201812744,
0.19634240865707397,
-0.18474486470222473,
0.23628774285316467,
-0.03987347334623337,
-0.21886934340000153,
-0.4237116277217865,
0.38215264678001404,
0.1402457356452942,
0.20525914430618286,
-0.4020426571369171,
0.5393438935279846,
-0.33294954895973206,
-0.020708199590444565,
0.628118097782135,
0.18077662587165833,
-0.152317076921463,
0.009607557207345963,
-0.3768947124481201,
-0.3352760970592499,
0.25488489866256714,
-0.18355348706245422,
-0.15989592671394348,
-0.399797260761261,
0.3308413624763489,
0.394873708486557,
-0.101162388920784,
-0.19357898831367493,
-0.3101695477962494,
0.23071829974651337,
-0.24430489540100098,
0.14887379109859467,
0.13992339372634888,
0.5106886625289917,
-0.30973681807518005,
-0.14695678651332855,
0.04485289752483368,
-0.14280760288238525,
-0.23397992551326752,
0.2674015462398529,
-0.23542192578315735
] |
https://github.com/huggingface/datasets/issues/5351 | Do we need to implement `_prepare_split`? | ok, that makes sense. thank you @mariosasko. I realized i'd never looked on the hub at any of the files associated with any datasets. just did that now and it appears that i'll need to have a script regardless _but_ that will just contain my custom config and builder classes, so without realizing it I was already making my script, I just need to wrap that in a file that sits alongside my data (I looked at Glue and realized I was already doing what I thought didn't make sense to have to do, lol).
`download_and_prepare` isn't returning me a dataset though, but I'll look into that and open another issue if I can't figure it out. | ### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
| 117 | Do we need to implement `_prepare_split`?
### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
ok, that makes sense. thank you @mariosasko. I realized i'd never looked on the hub at any of the files associated with any datasets. just did that now and it appears that i'll need to have a script regardless _but_ that will just contain my custom config and builder classes, so without realizing it I was already making my script, I just need to wrap that in a file that sits alongside my data (I looked at Glue and realized I was already doing what I thought didn't make sense to have to do, lol).
`download_and_prepare` isn't returning me a dataset though, but I'll look into that and open another issue if I can't figure it out. | [
-0.39684659242630005,
0.028263568878173828,
0.038606513291597366,
0.26486533880233765,
0.14727875590324402,
0.2111169397830963,
0.5743995904922485,
0.3013264238834381,
-0.35358813405036926,
0.27159470319747925,
0.09605718404054642,
0.13665761053562164,
-0.08747748285531998,
-0.15181736648082733,
0.14780128002166748,
-0.42070913314819336,
0.14535833895206451,
0.1660146415233612,
0.16208773851394653,
-0.1653870940208435,
-0.3060036599636078,
0.1335560530424118,
-0.28613731265068054,
-0.018275029957294464,
-0.014041372574865818,
-0.19102515280246735,
-0.3446138799190521,
0.2566714584827423,
0.015331882052123547,
-0.01015452016144991,
0.19002343714237213,
0.14374659955501556,
0.012923896312713623,
0.29963812232017517,
-0.00011747405369533226,
0.022941559553146362,
0.18693788349628448,
0.037026211619377136,
-0.28322234749794006,
0.1104830652475357,
-0.37851041555404663,
-0.1806396096944809,
0.021225344389677048,
-0.13775314390659332,
-0.1588188111782074,
-0.1996767222881317,
-0.061121128499507904,
0.09741990268230438,
0.4871101379394531,
-0.11936972290277481,
0.17597708106040955,
0.02434464916586876,
0.27351364493370056,
-0.23213663697242737,
0.36309370398521423,
0.1646580994129181,
-0.2933652102947235,
0.0010855542495846748,
-0.3826949894428253,
0.37199515104293823,
0.0005425959825515747,
0.14257007837295532,
0.01083565317094326,
0.15484939515590668,
0.15728209912776947,
0.21359305083751678,
-0.22176891565322876,
-0.41140177845954895,
-0.18386536836624146,
0.22885140776634216,
0.1845511794090271,
-0.06408900767564774,
-0.6015823483467102,
-0.40237295627593994,
-0.08474969863891602,
-0.39087918400764465,
0.2498781979084015,
0.08445042371749878,
0.08495074510574341,
0.13040415942668915,
0.18502093851566315,
-0.3826562464237213,
-0.08255728334188461,
0.015825849026441574,
0.06130083650350571,
0.2952607572078705,
-0.06226996332406998,
0.1560605764389038,
0.2717878520488739,
0.16989749670028687,
0.21911954879760742,
-0.1744018942117691,
-0.06355585157871246,
0.19579550623893738,
-0.1356973648071289,
-0.31445595622062683,
-0.2376558482646942,
-0.008966110646724701,
-0.1408722698688507,
0.20624682307243347,
-0.06777498126029968,
0.0807190090417862,
0.42259854078292847,
0.25069308280944824,
0.148600772023201,
-0.04463319480419159,
-0.016697287559509277,
0.48730266094207764,
0.2475123554468155,
-0.04061730578541756,
0.052557382732629776,
-0.11991200596094131,
-0.09080676734447479,
-0.24119935929775238,
-0.010137056931853294,
0.10603164881467819,
0.12858586013317108,
-0.06924451887607574,
-0.26513412594795227,
-0.21649104356765747,
-0.5023368000984192,
-0.21063846349716187,
0.21955257654190063,
0.10517436265945435,
0.1284000724554062,
0.064239501953125,
0.03324189782142639,
0.022569913417100906,
-0.35357993841171265,
-0.40791329741477966,
-0.14177419245243073,
0.10359297692775726,
-0.2609596252441406,
0.23590043187141418,
0.004826676100492477,
-0.35990655422210693,
-0.09566053748130798,
0.22641710937023163,
0.18358878791332245,
0.09278200566768646,
0.314890593290329,
-0.1250021755695343,
0.07167699933052063,
0.45175570249557495,
0.10588033497333527,
-0.09202926605939865,
0.06544142216444016,
0.073043093085289,
-0.21463599801063538,
-0.08073849231004715,
-0.10297957807779312,
-0.5045248866081238,
-0.049303025007247925,
0.15910503268241882,
0.16796211898326874,
0.2293487787246704,
-0.031487904489040375,
0.1408950239419937,
0.5039725303649902,
-0.1939413696527481,
-0.05727396160364151,
-0.17013923823833466,
-0.026260968297719955,
-0.18988627195358276,
0.3036646544933319,
0.2773198187351227,
-0.401644766330719,
0.09226536750793457,
-0.7184799313545227,
-0.16774006187915802,
0.5405654907226562,
0.14763866364955902,
-0.0746159479022026,
0.2311374843120575,
-0.26274338364601135,
0.3361905813217163,
0.48538774251937866,
0.017970960587263107,
-0.036314792931079865,
0.5023655891418457,
0.11890998482704163,
0.10742569714784622,
0.333443820476532,
-0.08776962757110596,
0.14591141045093536,
-0.20631597936153412,
-0.052705079317092896,
0.2896369695663452,
-0.31835824251174927,
-0.3146226406097412,
-0.21228303015232086,
-0.17161352932453156,
0.0773966833949089,
0.16674552857875824,
0.28786981105804443,
0.1822900027036667,
0.06606683880090714,
0.10566171258687973,
0.19938117265701294,
-0.18416602909564972,
0.0943569615483284,
-0.04461175203323364,
0.3000200688838959,
0.23335805535316467,
-0.04686537757515907,
-0.10540944337844849,
-0.15513670444488525,
-0.029079973697662354,
-0.1268458068370819,
-0.012344986200332642,
0.2983875870704651,
-0.42012810707092285,
0.11186052113771439,
-0.14578871428966522,
-0.38800016045570374,
-0.13781365752220154,
0.04966399073600769,
-0.19142234325408936,
0.03738008067011833,
-0.38862380385398865,
-0.06873836368322372,
0.20474745333194733,
-0.28792521357536316,
0.4126656949520111,
-0.32395315170288086,
0.3116569519042969,
-0.142796128988266,
-0.043284717947244644,
-0.20283591747283936,
0.2716238498687744,
0.14596334099769592,
-0.2830008566379547,
-0.06441003829240799,
0.5136758685112,
0.291328102350235,
-0.24997763335704803,
-0.059897281229496,
-0.2693110704421997,
0.08354587107896805,
-0.15337182581424713,
0.042650770395994186,
0.031973011791706085,
-0.02706761658191681,
-0.051615532487630844,
0.14399263262748718,
0.4913005232810974,
0.366813063621521,
0.11045161634683609,
0.2624824643135071,
0.08640622347593307,
0.05055227875709534,
0.19224467873573303,
-0.025131959468126297,
-0.5075973272323608,
-0.14128746092319489,
-0.1288161277770996,
0.36693763732910156,
0.037243615835905075,
-0.23756958544254303,
0.12378554791212082,
0.33912959694862366,
-0.0939384400844574,
0.0564550943672657,
-0.002696774899959564,
0.032512366771698,
-0.03267534822225571,
0.19626852869987488,
0.6504374146461487,
0.46662062406539917,
0.16019925475120544,
0.18037693202495575,
0.20965346693992615,
-0.08586877584457397,
-0.14688369631767273,
0.33640286326408386,
0.2990989089012146,
0.13856849074363708,
-0.06140373647212982,
-0.33035337924957275,
0.06392353028059006,
-0.3187515139579773,
0.0926380604505539,
0.17019931972026825,
0.07574108242988586,
-0.272845059633255,
0.20274867117404938,
-0.25227856636047363,
0.11746247857809067,
-0.05071716755628586,
-0.08012167364358902,
-0.1913539171218872,
-0.35754266381263733,
0.03426313400268555,
0.0016134455800056458,
-0.29701390862464905,
0.16204673051834106,
-0.18612495064735413,
0.18825514614582062,
-0.12258162349462509,
0.023716170340776443,
0.04185888171195984,
0.3042150139808655,
-0.2979263365268707,
0.057803910225629807,
0.16507954895496368,
-0.1444491147994995,
0.3168366551399231,
-0.03936731070280075,
-0.1276976764202118,
-0.08117051422595978,
-0.5159487724304199,
0.2702007293701172,
-0.2245928794145584,
0.2663232684135437,
0.4786919057369232,
-0.4132232666015625,
0.04565294086933136,
-0.4948858320713043,
0.1087316945195198,
-0.15118210017681122,
-0.09252903610467911,
-0.05147195979952812,
-0.11129637062549591,
0.0948367565870285,
-0.35219115018844604,
-0.4680473506450653,
-0.11007628589868546,
-0.4203089475631714,
-0.12111446261405945,
-0.07681912183761597,
0.238184854388237,
0.1925923377275467,
-0.13644681870937347,
0.00296865776181221,
-0.028139689937233925,
-0.132253497838974,
-0.327067494392395,
0.015882376581430435,
0.2679441571235657,
-0.6211180686950684,
-0.10632839798927307,
0.044059086591005325,
-0.3742111921310425,
0.33532145619392395,
0.28402459621429443,
0.04607991874217987,
0.14194205403327942,
-0.19706767797470093,
-0.05222194641828537,
-0.15237724781036377,
0.06522414833307266,
0.1761888861656189,
0.14206793904304504,
0.026619983837008476,
-0.0661187618970871,
0.1303909868001938,
0.23738199472427368,
-0.11329738050699234,
0.2719256281852722,
-0.23288428783416748,
0.5564010739326477,
-0.05160555988550186,
1.0884464979171753,
-0.03055630996823311,
0.035857267677783966,
0.056173793971538544,
0.1555497795343399,
0.2330702692270279,
-0.057868726551532745,
-0.3012399673461914,
0.15010754764080048,
0.0013234466314315796,
-0.20803478360176086,
0.21802037954330444,
0.008280155248939991,
-0.29986992478370667,
-0.02094067446887493,
0.15389686822891235,
-0.0890190601348877,
-0.43301600217819214,
-0.1505630761384964,
-0.2020646631717682,
0.4340951144695282,
-0.03510919585824013,
0.4342504143714905,
0.0068663060665130615,
0.16457009315490723,
-0.3399643003940582,
0.37511032819747925,
0.3924174904823303,
-0.08463743329048157,
0.06664139032363892,
-0.006820078939199448,
-0.13740777969360352,
0.4405192732810974,
0.1433136910200119,
0.26458853483200073,
-0.09999056905508041,
-0.16890555620193481,
0.09111547470092773,
-0.10114522278308868,
0.37898099422454834,
-0.35058319568634033,
-0.2927839159965515,
0.19355928897857666,
-0.2848760485649109,
-0.2273978292942047,
-0.22696629166603088,
-0.18112404644489288,
0.03454948961734772,
0.07233735918998718,
-0.3326079845428467,
-0.3115488290786743,
-0.3117128014564514,
0.7352997064590454,
-0.1864841878414154,
-0.08025507628917694,
-0.15027150511741638,
-0.186609148979187,
-0.3156912922859192,
-0.20027951896190643,
-0.016922980546951294,
-0.038802534341812134,
0.03560464084148407,
-0.2930353581905365,
-0.13759002089500427,
-0.08352375030517578,
-0.13190388679504395,
0.23352229595184326,
0.018593162298202515,
0.22021484375,
-0.2994156777858734,
0.18879397213459015,
0.13807091116905212,
0.06922152638435364,
0.3746967911720276,
0.15566593408584595,
-0.1372116059064865,
-0.07001984119415283,
0.27345797419548035,
-0.1669098138809204,
0.5717335939407349,
0.37936145067214966,
-0.47992101311683655,
0.2568068504333496,
-0.04967688024044037,
0.09850376099348068,
-0.23076754808425903,
-0.11333414912223816,
0.42127928137779236,
-0.17206160724163055,
-0.13391220569610596,
-0.7076979279518127,
0.2136102020740509,
0.20300352573394775,
-0.10186022520065308,
0.23167762160301208,
0.22539229691028595,
-0.36115118861198425,
0.1966238170862198,
0.160946324467659,
0.8526101112365723,
0.40424132347106934,
0.14474493265151978,
0.37336477637290955,
0.10990853607654572,
0.15516865253448486,
-0.1633453667163849,
0.39535099267959595,
-0.2653314769268036,
-0.06914123892784119,
-0.1323762685060501,
-0.09144262969493866,
0.6105437278747559,
0.10514269769191742,
-0.11441493034362793,
0.37567275762557983,
-0.24762585759162903,
0.17863868176937103,
-0.016957847401499748,
0.148300901055336,
-0.35417428612709045,
-0.38956543803215027,
-0.026333242654800415,
0.07703375816345215,
0.1757497787475586,
0.08829361945390701,
-0.15674766898155212,
-0.1366119086742401,
0.02816503867506981,
-0.1252015084028244,
-0.12678304314613342,
0.1978612244129181,
-0.018866870552301407,
0.236222505569458,
-0.10481336712837219,
-0.31014519929885864,
0.6872695684432983,
-0.4096830189228058,
0.24755938351154327,
0.304944783449173,
0.0910269021987915,
0.1516876220703125,
-0.15852829813957214,
0.20086835324764252,
-0.11514471471309662,
0.02387591078877449,
0.4507102370262146,
0.006011147052049637,
0.09194812923669815,
-0.27010664343833923,
-0.1529843509197235,
-0.2632179856300354,
-0.3791462779045105,
-0.051137641072273254,
0.11800803244113922,
-0.43072620034217834,
0.2948971092700958,
0.2032589465379715,
-0.22466377913951874,
-0.3728600740432739,
0.0763261467218399,
-0.06998500227928162,
-0.35993242263793945,
0.13210003077983856,
-0.2497638612985611,
-0.020405709743499756,
-0.21844890713691711,
0.17189612984657288,
0.15930604934692383,
0.16388572752475739,
0.4034930169582367,
-0.15477028489112854,
-0.12025928497314453,
-0.302217960357666,
0.14502179622650146,
0.32768961787223816,
-0.12282606959342957,
0.3003813624382019,
-0.21188987791538239,
0.006112918257713318,
0.1101454421877861,
-0.11704540252685547,
-0.04472004622220993,
0.07933100312948227,
-0.22398877143859863,
-0.19217652082443237,
-0.08170261234045029,
-0.010356642305850983,
-0.21533407270908356,
0.1972702443599701,
-0.21680712699890137,
0.3763892650604248,
0.07182951271533966,
0.19365482032299042,
-0.22428423166275024,
-0.09890946000814438,
0.02029835619032383,
0.06778893619775772,
-0.02216079831123352,
-0.056873202323913574,
0.19304463267326355,
0.16252413392066956,
0.07697032392024994,
0.07965201139450073,
-0.3189263939857483,
-0.060413699597120285,
-0.21295052766799927,
0.18530257046222687,
0.11001823097467422,
-0.09662133455276489,
0.31255385279655457,
0.08876194059848785,
-0.37014085054397583,
-0.0990389883518219,
0.31608182191848755,
-0.2115386724472046,
0.11043918877840042,
0.11254756897687912,
0.19580259919166565,
0.13446107506752014,
-0.2702717185020447,
0.025054309517145157,
-0.10753525793552399,
0.3602887988090515,
0.1304396390914917,
0.14243780076503754,
-0.06978088617324829,
-0.08430250734090805,
0.18649837374687195,
0.053292885422706604,
0.2982028126716614,
-0.15321823954582214,
0.40533119440078735,
-0.1756361573934555,
-0.026646088808774948,
-0.05578995123505592,
0.38835304975509644,
0.4179706275463104,
0.21598200500011444,
-0.02876782976090908,
-0.04850960150361061,
0.0975499376654625,
-0.2621464431285858,
0.23145081102848053,
0.2486339807510376,
-0.09036275744438171,
0.1260383576154709,
0.36638525128364563,
0.21712136268615723,
0.30793288350105286,
-0.2600180506706238,
0.06923069804906845,
0.2204747349023819,
-0.16709645092487335,
0.49665242433547974,
0.6812312602996826,
-0.2562094032764435,
0.506624698638916,
0.4170609712600708,
-0.2192816436290741,
0.17629927396774292,
0.7710938453674316,
-0.10133420675992966,
0.5054677128791809,
0.006250767037272453,
0.08802285045385361,
0.5239155292510986,
-0.4708459973335266,
0.05059971660375595,
0.45790430903434753,
0.31243619322776794,
0.21886670589447021,
-0.230309396982193,
0.19095326960086823,
-0.4291228950023651,
-0.29887279868125916,
-0.20175571739673615,
0.06405621767044067,
-0.16324126720428467,
0.07221753895282745,
-0.2666558623313904,
-0.14774951338768005,
-0.4448676109313965,
-0.19850973784923553,
0.07937085628509521,
-0.19554825127124786,
0.16981947422027588,
-0.041035495698451996,
0.2174406200647354,
-0.07026989012956619,
0.2881234884262085,
-0.08341920375823975,
0.16043278574943542,
-0.2754333019256592,
0.12206503748893738,
0.013622723519802094,
-0.1374799758195877,
0.021209079772233963,
0.17514926195144653,
0.1924545168876648,
0.17036470770835876,
0.05143723264336586,
-0.410894513130188,
0.05936511233448982,
0.0014554057270288467,
0.04533660411834717,
0.21977128088474274,
-0.1882709562778473,
0.30919817090034485,
0.2778536379337311,
-0.007198825478553772,
-0.1041703149676323,
-0.08708453178405762,
0.14009322226047516,
0.10781171917915344,
-0.4092733860015869,
0.7780476212501526,
-0.029169932007789612,
-0.20097365975379944,
0.08572432398796082,
0.1971348226070404,
-0.2530081868171692,
-0.16706696152687073,
0.48852258920669556,
-0.10039472579956055,
-0.11850722879171371,
-0.1684749573469162,
0.038122039288282394,
0.2037205696105957,
0.40691885352134705,
-0.05005224421620369,
-0.13753679394721985,
-0.39415183663368225,
-0.17585864663124084,
-0.3969167470932007,
0.04594259709119797,
-0.2047019898891449,
0.2516385614871979,
-0.020550910383462906,
0.1873529553413391,
0.21092861890792847,
0.10794918984174728,
0.1958669126033783,
0.12780113518238068,
0.19902560114860535,
-0.08972078561782837,
-0.16321620345115662,
-0.09867282211780548,
-0.17237991094589233,
-0.3820716440677643,
-0.08784329891204834,
-0.5605083703994751,
-0.04321451112627983,
0.06417323648929596,
-0.18777000904083252,
0.16980622708797455,
-0.034658316522836685,
0.4984592795372009,
-0.3298732042312622,
0.3147025406360626,
0.33581796288490295,
0.37883004546165466,
-0.05621699243783951,
-0.17933006584644318,
0.0020495839416980743,
-0.2026621401309967,
-0.44123709201812744,
0.19634240865707397,
-0.18474486470222473,
0.23628774285316467,
-0.03987347334623337,
-0.21886934340000153,
-0.4237116277217865,
0.38215264678001404,
0.1402457356452942,
0.20525914430618286,
-0.4020426571369171,
0.5393438935279846,
-0.33294954895973206,
-0.020708199590444565,
0.628118097782135,
0.18077662587165833,
-0.152317076921463,
0.009607557207345963,
-0.3768947124481201,
-0.3352760970592499,
0.25488489866256714,
-0.18355348706245422,
-0.15989592671394348,
-0.399797260761261,
0.3308413624763489,
0.394873708486557,
-0.101162388920784,
-0.19357898831367493,
-0.3101695477962494,
0.23071829974651337,
-0.24430489540100098,
0.14887379109859467,
0.13992339372634888,
0.5106886625289917,
-0.30973681807518005,
-0.14695678651332855,
0.04485289752483368,
-0.14280760288238525,
-0.23397992551326752,
0.2674015462398529,
-0.23542192578315735
] |
https://github.com/huggingface/datasets/issues/5351 | Do we need to implement `_prepare_split`? | `download_and_prepare` downloads and prepares the arrow files. You need to call `as_dataset` on the builder to get the dataset. | ### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
| 19 | Do we need to implement `_prepare_split`?
### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
`download_and_prepare` downloads and prepares the arrow files. You need to call `as_dataset` on the builder to get the dataset. | [
-0.39684659242630005,
0.028263568878173828,
0.038606513291597366,
0.26486533880233765,
0.14727875590324402,
0.2111169397830963,
0.5743995904922485,
0.3013264238834381,
-0.35358813405036926,
0.27159470319747925,
0.09605718404054642,
0.13665761053562164,
-0.08747748285531998,
-0.15181736648082733,
0.14780128002166748,
-0.42070913314819336,
0.14535833895206451,
0.1660146415233612,
0.16208773851394653,
-0.1653870940208435,
-0.3060036599636078,
0.1335560530424118,
-0.28613731265068054,
-0.018275029957294464,
-0.014041372574865818,
-0.19102515280246735,
-0.3446138799190521,
0.2566714584827423,
0.015331882052123547,
-0.01015452016144991,
0.19002343714237213,
0.14374659955501556,
0.012923896312713623,
0.29963812232017517,
-0.00011747405369533226,
0.022941559553146362,
0.18693788349628448,
0.037026211619377136,
-0.28322234749794006,
0.1104830652475357,
-0.37851041555404663,
-0.1806396096944809,
0.021225344389677048,
-0.13775314390659332,
-0.1588188111782074,
-0.1996767222881317,
-0.061121128499507904,
0.09741990268230438,
0.4871101379394531,
-0.11936972290277481,
0.17597708106040955,
0.02434464916586876,
0.27351364493370056,
-0.23213663697242737,
0.36309370398521423,
0.1646580994129181,
-0.2933652102947235,
0.0010855542495846748,
-0.3826949894428253,
0.37199515104293823,
0.0005425959825515747,
0.14257007837295532,
0.01083565317094326,
0.15484939515590668,
0.15728209912776947,
0.21359305083751678,
-0.22176891565322876,
-0.41140177845954895,
-0.18386536836624146,
0.22885140776634216,
0.1845511794090271,
-0.06408900767564774,
-0.6015823483467102,
-0.40237295627593994,
-0.08474969863891602,
-0.39087918400764465,
0.2498781979084015,
0.08445042371749878,
0.08495074510574341,
0.13040415942668915,
0.18502093851566315,
-0.3826562464237213,
-0.08255728334188461,
0.015825849026441574,
0.06130083650350571,
0.2952607572078705,
-0.06226996332406998,
0.1560605764389038,
0.2717878520488739,
0.16989749670028687,
0.21911954879760742,
-0.1744018942117691,
-0.06355585157871246,
0.19579550623893738,
-0.1356973648071289,
-0.31445595622062683,
-0.2376558482646942,
-0.008966110646724701,
-0.1408722698688507,
0.20624682307243347,
-0.06777498126029968,
0.0807190090417862,
0.42259854078292847,
0.25069308280944824,
0.148600772023201,
-0.04463319480419159,
-0.016697287559509277,
0.48730266094207764,
0.2475123554468155,
-0.04061730578541756,
0.052557382732629776,
-0.11991200596094131,
-0.09080676734447479,
-0.24119935929775238,
-0.010137056931853294,
0.10603164881467819,
0.12858586013317108,
-0.06924451887607574,
-0.26513412594795227,
-0.21649104356765747,
-0.5023368000984192,
-0.21063846349716187,
0.21955257654190063,
0.10517436265945435,
0.1284000724554062,
0.064239501953125,
0.03324189782142639,
0.022569913417100906,
-0.35357993841171265,
-0.40791329741477966,
-0.14177419245243073,
0.10359297692775726,
-0.2609596252441406,
0.23590043187141418,
0.004826676100492477,
-0.35990655422210693,
-0.09566053748130798,
0.22641710937023163,
0.18358878791332245,
0.09278200566768646,
0.314890593290329,
-0.1250021755695343,
0.07167699933052063,
0.45175570249557495,
0.10588033497333527,
-0.09202926605939865,
0.06544142216444016,
0.073043093085289,
-0.21463599801063538,
-0.08073849231004715,
-0.10297957807779312,
-0.5045248866081238,
-0.049303025007247925,
0.15910503268241882,
0.16796211898326874,
0.2293487787246704,
-0.031487904489040375,
0.1408950239419937,
0.5039725303649902,
-0.1939413696527481,
-0.05727396160364151,
-0.17013923823833466,
-0.026260968297719955,
-0.18988627195358276,
0.3036646544933319,
0.2773198187351227,
-0.401644766330719,
0.09226536750793457,
-0.7184799313545227,
-0.16774006187915802,
0.5405654907226562,
0.14763866364955902,
-0.0746159479022026,
0.2311374843120575,
-0.26274338364601135,
0.3361905813217163,
0.48538774251937866,
0.017970960587263107,
-0.036314792931079865,
0.5023655891418457,
0.11890998482704163,
0.10742569714784622,
0.333443820476532,
-0.08776962757110596,
0.14591141045093536,
-0.20631597936153412,
-0.052705079317092896,
0.2896369695663452,
-0.31835824251174927,
-0.3146226406097412,
-0.21228303015232086,
-0.17161352932453156,
0.0773966833949089,
0.16674552857875824,
0.28786981105804443,
0.1822900027036667,
0.06606683880090714,
0.10566171258687973,
0.19938117265701294,
-0.18416602909564972,
0.0943569615483284,
-0.04461175203323364,
0.3000200688838959,
0.23335805535316467,
-0.04686537757515907,
-0.10540944337844849,
-0.15513670444488525,
-0.029079973697662354,
-0.1268458068370819,
-0.012344986200332642,
0.2983875870704651,
-0.42012810707092285,
0.11186052113771439,
-0.14578871428966522,
-0.38800016045570374,
-0.13781365752220154,
0.04966399073600769,
-0.19142234325408936,
0.03738008067011833,
-0.38862380385398865,
-0.06873836368322372,
0.20474745333194733,
-0.28792521357536316,
0.4126656949520111,
-0.32395315170288086,
0.3116569519042969,
-0.142796128988266,
-0.043284717947244644,
-0.20283591747283936,
0.2716238498687744,
0.14596334099769592,
-0.2830008566379547,
-0.06441003829240799,
0.5136758685112,
0.291328102350235,
-0.24997763335704803,
-0.059897281229496,
-0.2693110704421997,
0.08354587107896805,
-0.15337182581424713,
0.042650770395994186,
0.031973011791706085,
-0.02706761658191681,
-0.051615532487630844,
0.14399263262748718,
0.4913005232810974,
0.366813063621521,
0.11045161634683609,
0.2624824643135071,
0.08640622347593307,
0.05055227875709534,
0.19224467873573303,
-0.025131959468126297,
-0.5075973272323608,
-0.14128746092319489,
-0.1288161277770996,
0.36693763732910156,
0.037243615835905075,
-0.23756958544254303,
0.12378554791212082,
0.33912959694862366,
-0.0939384400844574,
0.0564550943672657,
-0.002696774899959564,
0.032512366771698,
-0.03267534822225571,
0.19626852869987488,
0.6504374146461487,
0.46662062406539917,
0.16019925475120544,
0.18037693202495575,
0.20965346693992615,
-0.08586877584457397,
-0.14688369631767273,
0.33640286326408386,
0.2990989089012146,
0.13856849074363708,
-0.06140373647212982,
-0.33035337924957275,
0.06392353028059006,
-0.3187515139579773,
0.0926380604505539,
0.17019931972026825,
0.07574108242988586,
-0.272845059633255,
0.20274867117404938,
-0.25227856636047363,
0.11746247857809067,
-0.05071716755628586,
-0.08012167364358902,
-0.1913539171218872,
-0.35754266381263733,
0.03426313400268555,
0.0016134455800056458,
-0.29701390862464905,
0.16204673051834106,
-0.18612495064735413,
0.18825514614582062,
-0.12258162349462509,
0.023716170340776443,
0.04185888171195984,
0.3042150139808655,
-0.2979263365268707,
0.057803910225629807,
0.16507954895496368,
-0.1444491147994995,
0.3168366551399231,
-0.03936731070280075,
-0.1276976764202118,
-0.08117051422595978,
-0.5159487724304199,
0.2702007293701172,
-0.2245928794145584,
0.2663232684135437,
0.4786919057369232,
-0.4132232666015625,
0.04565294086933136,
-0.4948858320713043,
0.1087316945195198,
-0.15118210017681122,
-0.09252903610467911,
-0.05147195979952812,
-0.11129637062549591,
0.0948367565870285,
-0.35219115018844604,
-0.4680473506450653,
-0.11007628589868546,
-0.4203089475631714,
-0.12111446261405945,
-0.07681912183761597,
0.238184854388237,
0.1925923377275467,
-0.13644681870937347,
0.00296865776181221,
-0.028139689937233925,
-0.132253497838974,
-0.327067494392395,
0.015882376581430435,
0.2679441571235657,
-0.6211180686950684,
-0.10632839798927307,
0.044059086591005325,
-0.3742111921310425,
0.33532145619392395,
0.28402459621429443,
0.04607991874217987,
0.14194205403327942,
-0.19706767797470093,
-0.05222194641828537,
-0.15237724781036377,
0.06522414833307266,
0.1761888861656189,
0.14206793904304504,
0.026619983837008476,
-0.0661187618970871,
0.1303909868001938,
0.23738199472427368,
-0.11329738050699234,
0.2719256281852722,
-0.23288428783416748,
0.5564010739326477,
-0.05160555988550186,
1.0884464979171753,
-0.03055630996823311,
0.035857267677783966,
0.056173793971538544,
0.1555497795343399,
0.2330702692270279,
-0.057868726551532745,
-0.3012399673461914,
0.15010754764080048,
0.0013234466314315796,
-0.20803478360176086,
0.21802037954330444,
0.008280155248939991,
-0.29986992478370667,
-0.02094067446887493,
0.15389686822891235,
-0.0890190601348877,
-0.43301600217819214,
-0.1505630761384964,
-0.2020646631717682,
0.4340951144695282,
-0.03510919585824013,
0.4342504143714905,
0.0068663060665130615,
0.16457009315490723,
-0.3399643003940582,
0.37511032819747925,
0.3924174904823303,
-0.08463743329048157,
0.06664139032363892,
-0.006820078939199448,
-0.13740777969360352,
0.4405192732810974,
0.1433136910200119,
0.26458853483200073,
-0.09999056905508041,
-0.16890555620193481,
0.09111547470092773,
-0.10114522278308868,
0.37898099422454834,
-0.35058319568634033,
-0.2927839159965515,
0.19355928897857666,
-0.2848760485649109,
-0.2273978292942047,
-0.22696629166603088,
-0.18112404644489288,
0.03454948961734772,
0.07233735918998718,
-0.3326079845428467,
-0.3115488290786743,
-0.3117128014564514,
0.7352997064590454,
-0.1864841878414154,
-0.08025507628917694,
-0.15027150511741638,
-0.186609148979187,
-0.3156912922859192,
-0.20027951896190643,
-0.016922980546951294,
-0.038802534341812134,
0.03560464084148407,
-0.2930353581905365,
-0.13759002089500427,
-0.08352375030517578,
-0.13190388679504395,
0.23352229595184326,
0.018593162298202515,
0.22021484375,
-0.2994156777858734,
0.18879397213459015,
0.13807091116905212,
0.06922152638435364,
0.3746967911720276,
0.15566593408584595,
-0.1372116059064865,
-0.07001984119415283,
0.27345797419548035,
-0.1669098138809204,
0.5717335939407349,
0.37936145067214966,
-0.47992101311683655,
0.2568068504333496,
-0.04967688024044037,
0.09850376099348068,
-0.23076754808425903,
-0.11333414912223816,
0.42127928137779236,
-0.17206160724163055,
-0.13391220569610596,
-0.7076979279518127,
0.2136102020740509,
0.20300352573394775,
-0.10186022520065308,
0.23167762160301208,
0.22539229691028595,
-0.36115118861198425,
0.1966238170862198,
0.160946324467659,
0.8526101112365723,
0.40424132347106934,
0.14474493265151978,
0.37336477637290955,
0.10990853607654572,
0.15516865253448486,
-0.1633453667163849,
0.39535099267959595,
-0.2653314769268036,
-0.06914123892784119,
-0.1323762685060501,
-0.09144262969493866,
0.6105437278747559,
0.10514269769191742,
-0.11441493034362793,
0.37567275762557983,
-0.24762585759162903,
0.17863868176937103,
-0.016957847401499748,
0.148300901055336,
-0.35417428612709045,
-0.38956543803215027,
-0.026333242654800415,
0.07703375816345215,
0.1757497787475586,
0.08829361945390701,
-0.15674766898155212,
-0.1366119086742401,
0.02816503867506981,
-0.1252015084028244,
-0.12678304314613342,
0.1978612244129181,
-0.018866870552301407,
0.236222505569458,
-0.10481336712837219,
-0.31014519929885864,
0.6872695684432983,
-0.4096830189228058,
0.24755938351154327,
0.304944783449173,
0.0910269021987915,
0.1516876220703125,
-0.15852829813957214,
0.20086835324764252,
-0.11514471471309662,
0.02387591078877449,
0.4507102370262146,
0.006011147052049637,
0.09194812923669815,
-0.27010664343833923,
-0.1529843509197235,
-0.2632179856300354,
-0.3791462779045105,
-0.051137641072273254,
0.11800803244113922,
-0.43072620034217834,
0.2948971092700958,
0.2032589465379715,
-0.22466377913951874,
-0.3728600740432739,
0.0763261467218399,
-0.06998500227928162,
-0.35993242263793945,
0.13210003077983856,
-0.2497638612985611,
-0.020405709743499756,
-0.21844890713691711,
0.17189612984657288,
0.15930604934692383,
0.16388572752475739,
0.4034930169582367,
-0.15477028489112854,
-0.12025928497314453,
-0.302217960357666,
0.14502179622650146,
0.32768961787223816,
-0.12282606959342957,
0.3003813624382019,
-0.21188987791538239,
0.006112918257713318,
0.1101454421877861,
-0.11704540252685547,
-0.04472004622220993,
0.07933100312948227,
-0.22398877143859863,
-0.19217652082443237,
-0.08170261234045029,
-0.010356642305850983,
-0.21533407270908356,
0.1972702443599701,
-0.21680712699890137,
0.3763892650604248,
0.07182951271533966,
0.19365482032299042,
-0.22428423166275024,
-0.09890946000814438,
0.02029835619032383,
0.06778893619775772,
-0.02216079831123352,
-0.056873202323913574,
0.19304463267326355,
0.16252413392066956,
0.07697032392024994,
0.07965201139450073,
-0.3189263939857483,
-0.060413699597120285,
-0.21295052766799927,
0.18530257046222687,
0.11001823097467422,
-0.09662133455276489,
0.31255385279655457,
0.08876194059848785,
-0.37014085054397583,
-0.0990389883518219,
0.31608182191848755,
-0.2115386724472046,
0.11043918877840042,
0.11254756897687912,
0.19580259919166565,
0.13446107506752014,
-0.2702717185020447,
0.025054309517145157,
-0.10753525793552399,
0.3602887988090515,
0.1304396390914917,
0.14243780076503754,
-0.06978088617324829,
-0.08430250734090805,
0.18649837374687195,
0.053292885422706604,
0.2982028126716614,
-0.15321823954582214,
0.40533119440078735,
-0.1756361573934555,
-0.026646088808774948,
-0.05578995123505592,
0.38835304975509644,
0.4179706275463104,
0.21598200500011444,
-0.02876782976090908,
-0.04850960150361061,
0.0975499376654625,
-0.2621464431285858,
0.23145081102848053,
0.2486339807510376,
-0.09036275744438171,
0.1260383576154709,
0.36638525128364563,
0.21712136268615723,
0.30793288350105286,
-0.2600180506706238,
0.06923069804906845,
0.2204747349023819,
-0.16709645092487335,
0.49665242433547974,
0.6812312602996826,
-0.2562094032764435,
0.506624698638916,
0.4170609712600708,
-0.2192816436290741,
0.17629927396774292,
0.7710938453674316,
-0.10133420675992966,
0.5054677128791809,
0.006250767037272453,
0.08802285045385361,
0.5239155292510986,
-0.4708459973335266,
0.05059971660375595,
0.45790430903434753,
0.31243619322776794,
0.21886670589447021,
-0.230309396982193,
0.19095326960086823,
-0.4291228950023651,
-0.29887279868125916,
-0.20175571739673615,
0.06405621767044067,
-0.16324126720428467,
0.07221753895282745,
-0.2666558623313904,
-0.14774951338768005,
-0.4448676109313965,
-0.19850973784923553,
0.07937085628509521,
-0.19554825127124786,
0.16981947422027588,
-0.041035495698451996,
0.2174406200647354,
-0.07026989012956619,
0.2881234884262085,
-0.08341920375823975,
0.16043278574943542,
-0.2754333019256592,
0.12206503748893738,
0.013622723519802094,
-0.1374799758195877,
0.021209079772233963,
0.17514926195144653,
0.1924545168876648,
0.17036470770835876,
0.05143723264336586,
-0.410894513130188,
0.05936511233448982,
0.0014554057270288467,
0.04533660411834717,
0.21977128088474274,
-0.1882709562778473,
0.30919817090034485,
0.2778536379337311,
-0.007198825478553772,
-0.1041703149676323,
-0.08708453178405762,
0.14009322226047516,
0.10781171917915344,
-0.4092733860015869,
0.7780476212501526,
-0.029169932007789612,
-0.20097365975379944,
0.08572432398796082,
0.1971348226070404,
-0.2530081868171692,
-0.16706696152687073,
0.48852258920669556,
-0.10039472579956055,
-0.11850722879171371,
-0.1684749573469162,
0.038122039288282394,
0.2037205696105957,
0.40691885352134705,
-0.05005224421620369,
-0.13753679394721985,
-0.39415183663368225,
-0.17585864663124084,
-0.3969167470932007,
0.04594259709119797,
-0.2047019898891449,
0.2516385614871979,
-0.020550910383462906,
0.1873529553413391,
0.21092861890792847,
0.10794918984174728,
0.1958669126033783,
0.12780113518238068,
0.19902560114860535,
-0.08972078561782837,
-0.16321620345115662,
-0.09867282211780548,
-0.17237991094589233,
-0.3820716440677643,
-0.08784329891204834,
-0.5605083703994751,
-0.04321451112627983,
0.06417323648929596,
-0.18777000904083252,
0.16980622708797455,
-0.034658316522836685,
0.4984592795372009,
-0.3298732042312622,
0.3147025406360626,
0.33581796288490295,
0.37883004546165466,
-0.05621699243783951,
-0.17933006584644318,
0.0020495839416980743,
-0.2026621401309967,
-0.44123709201812744,
0.19634240865707397,
-0.18474486470222473,
0.23628774285316467,
-0.03987347334623337,
-0.21886934340000153,
-0.4237116277217865,
0.38215264678001404,
0.1402457356452942,
0.20525914430618286,
-0.4020426571369171,
0.5393438935279846,
-0.33294954895973206,
-0.020708199590444565,
0.628118097782135,
0.18077662587165833,
-0.152317076921463,
0.009607557207345963,
-0.3768947124481201,
-0.3352760970592499,
0.25488489866256714,
-0.18355348706245422,
-0.15989592671394348,
-0.399797260761261,
0.3308413624763489,
0.394873708486557,
-0.101162388920784,
-0.19357898831367493,
-0.3101695477962494,
0.23071829974651337,
-0.24430489540100098,
0.14887379109859467,
0.13992339372634888,
0.5106886625289917,
-0.30973681807518005,
-0.14695678651332855,
0.04485289752483368,
-0.14280760288238525,
-0.23397992551326752,
0.2674015462398529,
-0.23542192578315735
] |
https://github.com/huggingface/datasets/issues/5351 | Do we need to implement `_prepare_split`? | ok, I think I was assigning the output of `builder.download_and_prepare` but it's an inplace op, so that explains the `NoneType` i was getting back. Now I'm getting:
```
ArrowInvalid Traceback (most recent call last)
<ipython-input-7-3ed50fb87c70> in <module>
----> 1 ds = dataset_builder.as_dataset()
/databricks/python/lib/python3.8/site-packages/datasets/builder.py in as_dataset(self, split, run_post_process, ignore_verifications, in_memory)
1020
1021 # Create a dataset for each of the given splits
-> 1022 datasets = map_nested(
1023 partial(
1024 self._build_single_dataset,
/databricks/python/lib/python3.8/site-packages/datasets/utils/py_utils.py in map_nested(function, data_struct, dict_only, map_list, map_tuple, map_numpy, num_proc, parallel_min_length, types, disable_tqdm, desc)
442 num_proc = 1
443 if num_proc <= 1 or len(iterable) < parallel_min_length:
--> 444 mapped = [
445 _single_map_nested((function, obj, types, None, True, None))
446 for obj in logging.tqdm(iterable, disable=disable_tqdm, desc=desc)
/databricks/python/lib/python3.8/site-packages/datasets/utils/py_utils.py in <listcomp>(.0)
443 if num_proc <= 1 or len(iterable) < parallel_min_length:
444 mapped = [
--> 445 _single_map_nested((function, obj, types, None, True, None))
446 for obj in logging.tqdm(iterable, disable=disable_tqdm, desc=desc)
447 ]
/databricks/python/lib/python3.8/site-packages/datasets/utils/py_utils.py in _single_map_nested(args)
344 # Singleton first to spare some computation
345 if not isinstance(data_struct, dict) and not isinstance(data_struct, types):
--> 346 return function(data_struct)
347
348 # Reduce logging to keep things readable in multiprocessing with tqdm
/databricks/python/lib/python3.8/site-packages/datasets/builder.py in _build_single_dataset(self, split, run_post_process, ignore_verifications, in_memory)
1051
1052 # Build base dataset
-> 1053 ds = self._as_dataset(
1054 split=split,
1055 in_memory=in_memory,
/databricks/python/lib/python3.8/site-packages/datasets/builder.py in _as_dataset(self, split, in_memory)
1120 """
1121 cache_dir = self._fs._strip_protocol(self._output_dir)
-> 1122 dataset_kwargs = ArrowReader(cache_dir, self.info).read(
1123 name=self.name,
1124 instructions=split,
/databricks/python/lib/python3.8/site-packages/datasets/arrow_reader.py in read(self, name, instructions, split_infos, in_memory)
236 msg = f'Instruction "{instructions}" corresponds to no data!'
237 raise ValueError(msg)
--> 238 return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory)
239
240 def read_files(
/databricks/python/lib/python3.8/site-packages/datasets/arrow_reader.py in read_files(self, files, original_instructions, in_memory)
257 """
258 # Prepend path to filename
--> 259 pa_table = self._read_files(files, in_memory=in_memory)
260 # If original_instructions is not None, convert it to a human-readable NamedSplit
261 if original_instructions is not None:
/databricks/python/lib/python3.8/site-packages/datasets/arrow_reader.py in _read_files(self, files, in_memory)
192 f["filename"] = os.path.join(self._path, f["filename"])
193 for f_dict in files:
--> 194 pa_table: Table = self._get_table_from_filename(f_dict, in_memory=in_memory)
195 pa_tables.append(pa_table)
196 pa_tables = [t for t in pa_tables if len(t) > 0]
/databricks/python/lib/python3.8/site-packages/datasets/arrow_reader.py in _get_table_from_filename(self, filename_skip_take, in_memory)
327 filename_skip_take["take"] if "take" in filename_skip_take else None,
328 )
--> 329 table = ArrowReader.read_table(filename, in_memory=in_memory)
330 if take == -1:
331 take = len(table) - skip
/databricks/python/lib/python3.8/site-packages/datasets/arrow_reader.py in read_table(filename, in_memory)
348 """
349 table_cls = InMemoryTable if in_memory else MemoryMappedTable
--> 350 return table_cls.from_file(filename)
351
352
/databricks/python/lib/python3.8/site-packages/datasets/table.py in from_file(cls, filename, replays)
1034 @classmethod
1035 def from_file(cls, filename: str, replays=None):
-> 1036 table = _memory_mapped_arrow_table_from_file(filename)
1037 table = cls._apply_replays(table, replays)
1038 return cls(table, filename, replays)
/databricks/python/lib/python3.8/site-packages/datasets/table.py in _memory_mapped_arrow_table_from_file(filename)
48 def _memory_mapped_arrow_table_from_file(filename: str) -> pa.Table:
49 memory_mapped_stream = pa.memory_map(filename)
---> 50 opened_stream = pa.ipc.open_stream(memory_mapped_stream)
51 pa_table = opened_stream.read_all()
52 return pa_table
/databricks/python/lib/python3.8/site-packages/pyarrow/ipc.py in open_stream(source)
152 reader : RecordBatchStreamReader
153 """
--> 154 return RecordBatchStreamReader(source)
155
156
/databricks/python/lib/python3.8/site-packages/pyarrow/ipc.py in __init__(self, source)
43
44 def __init__(self, source):
---> 45 self._open(source)
46
47
/databricks/python/lib/python3.8/site-packages/pyarrow/ipc.pxi in pyarrow.lib._RecordBatchStreamReader._open()
/databricks/python/lib/python3.8/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
/databricks/python/lib/python3.8/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()
ArrowInvalid: Tried reading schema message, was null or length 0
```
| ### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
| 486 | Do we need to implement `_prepare_split`?
### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
ok, I think I was assigning the output of `builder.download_and_prepare` but it's an inplace op, so that explains the `NoneType` i was getting back. Now I'm getting:
```
ArrowInvalid Traceback (most recent call last)
<ipython-input-7-3ed50fb87c70> in <module>
----> 1 ds = dataset_builder.as_dataset()
/databricks/python/lib/python3.8/site-packages/datasets/builder.py in as_dataset(self, split, run_post_process, ignore_verifications, in_memory)
1020
1021 # Create a dataset for each of the given splits
-> 1022 datasets = map_nested(
1023 partial(
1024 self._build_single_dataset,
/databricks/python/lib/python3.8/site-packages/datasets/utils/py_utils.py in map_nested(function, data_struct, dict_only, map_list, map_tuple, map_numpy, num_proc, parallel_min_length, types, disable_tqdm, desc)
442 num_proc = 1
443 if num_proc <= 1 or len(iterable) < parallel_min_length:
--> 444 mapped = [
445 _single_map_nested((function, obj, types, None, True, None))
446 for obj in logging.tqdm(iterable, disable=disable_tqdm, desc=desc)
/databricks/python/lib/python3.8/site-packages/datasets/utils/py_utils.py in <listcomp>(.0)
443 if num_proc <= 1 or len(iterable) < parallel_min_length:
444 mapped = [
--> 445 _single_map_nested((function, obj, types, None, True, None))
446 for obj in logging.tqdm(iterable, disable=disable_tqdm, desc=desc)
447 ]
/databricks/python/lib/python3.8/site-packages/datasets/utils/py_utils.py in _single_map_nested(args)
344 # Singleton first to spare some computation
345 if not isinstance(data_struct, dict) and not isinstance(data_struct, types):
--> 346 return function(data_struct)
347
348 # Reduce logging to keep things readable in multiprocessing with tqdm
/databricks/python/lib/python3.8/site-packages/datasets/builder.py in _build_single_dataset(self, split, run_post_process, ignore_verifications, in_memory)
1051
1052 # Build base dataset
-> 1053 ds = self._as_dataset(
1054 split=split,
1055 in_memory=in_memory,
/databricks/python/lib/python3.8/site-packages/datasets/builder.py in _as_dataset(self, split, in_memory)
1120 """
1121 cache_dir = self._fs._strip_protocol(self._output_dir)
-> 1122 dataset_kwargs = ArrowReader(cache_dir, self.info).read(
1123 name=self.name,
1124 instructions=split,
/databricks/python/lib/python3.8/site-packages/datasets/arrow_reader.py in read(self, name, instructions, split_infos, in_memory)
236 msg = f'Instruction "{instructions}" corresponds to no data!'
237 raise ValueError(msg)
--> 238 return self.read_files(files=files, original_instructions=instructions, in_memory=in_memory)
239
240 def read_files(
/databricks/python/lib/python3.8/site-packages/datasets/arrow_reader.py in read_files(self, files, original_instructions, in_memory)
257 """
258 # Prepend path to filename
--> 259 pa_table = self._read_files(files, in_memory=in_memory)
260 # If original_instructions is not None, convert it to a human-readable NamedSplit
261 if original_instructions is not None:
/databricks/python/lib/python3.8/site-packages/datasets/arrow_reader.py in _read_files(self, files, in_memory)
192 f["filename"] = os.path.join(self._path, f["filename"])
193 for f_dict in files:
--> 194 pa_table: Table = self._get_table_from_filename(f_dict, in_memory=in_memory)
195 pa_tables.append(pa_table)
196 pa_tables = [t for t in pa_tables if len(t) > 0]
/databricks/python/lib/python3.8/site-packages/datasets/arrow_reader.py in _get_table_from_filename(self, filename_skip_take, in_memory)
327 filename_skip_take["take"] if "take" in filename_skip_take else None,
328 )
--> 329 table = ArrowReader.read_table(filename, in_memory=in_memory)
330 if take == -1:
331 take = len(table) - skip
/databricks/python/lib/python3.8/site-packages/datasets/arrow_reader.py in read_table(filename, in_memory)
348 """
349 table_cls = InMemoryTable if in_memory else MemoryMappedTable
--> 350 return table_cls.from_file(filename)
351
352
/databricks/python/lib/python3.8/site-packages/datasets/table.py in from_file(cls, filename, replays)
1034 @classmethod
1035 def from_file(cls, filename: str, replays=None):
-> 1036 table = _memory_mapped_arrow_table_from_file(filename)
1037 table = cls._apply_replays(table, replays)
1038 return cls(table, filename, replays)
/databricks/python/lib/python3.8/site-packages/datasets/table.py in _memory_mapped_arrow_table_from_file(filename)
48 def _memory_mapped_arrow_table_from_file(filename: str) -> pa.Table:
49 memory_mapped_stream = pa.memory_map(filename)
---> 50 opened_stream = pa.ipc.open_stream(memory_mapped_stream)
51 pa_table = opened_stream.read_all()
52 return pa_table
/databricks/python/lib/python3.8/site-packages/pyarrow/ipc.py in open_stream(source)
152 reader : RecordBatchStreamReader
153 """
--> 154 return RecordBatchStreamReader(source)
155
156
/databricks/python/lib/python3.8/site-packages/pyarrow/ipc.py in __init__(self, source)
43
44 def __init__(self, source):
---> 45 self._open(source)
46
47
/databricks/python/lib/python3.8/site-packages/pyarrow/ipc.pxi in pyarrow.lib._RecordBatchStreamReader._open()
/databricks/python/lib/python3.8/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
/databricks/python/lib/python3.8/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()
ArrowInvalid: Tried reading schema message, was null or length 0
```
| [
-0.39684659242630005,
0.028263568878173828,
0.038606513291597366,
0.26486533880233765,
0.14727875590324402,
0.2111169397830963,
0.5743995904922485,
0.3013264238834381,
-0.35358813405036926,
0.27159470319747925,
0.09605718404054642,
0.13665761053562164,
-0.08747748285531998,
-0.15181736648082733,
0.14780128002166748,
-0.42070913314819336,
0.14535833895206451,
0.1660146415233612,
0.16208773851394653,
-0.1653870940208435,
-0.3060036599636078,
0.1335560530424118,
-0.28613731265068054,
-0.018275029957294464,
-0.014041372574865818,
-0.19102515280246735,
-0.3446138799190521,
0.2566714584827423,
0.015331882052123547,
-0.01015452016144991,
0.19002343714237213,
0.14374659955501556,
0.012923896312713623,
0.29963812232017517,
-0.00011747405369533226,
0.022941559553146362,
0.18693788349628448,
0.037026211619377136,
-0.28322234749794006,
0.1104830652475357,
-0.37851041555404663,
-0.1806396096944809,
0.021225344389677048,
-0.13775314390659332,
-0.1588188111782074,
-0.1996767222881317,
-0.061121128499507904,
0.09741990268230438,
0.4871101379394531,
-0.11936972290277481,
0.17597708106040955,
0.02434464916586876,
0.27351364493370056,
-0.23213663697242737,
0.36309370398521423,
0.1646580994129181,
-0.2933652102947235,
0.0010855542495846748,
-0.3826949894428253,
0.37199515104293823,
0.0005425959825515747,
0.14257007837295532,
0.01083565317094326,
0.15484939515590668,
0.15728209912776947,
0.21359305083751678,
-0.22176891565322876,
-0.41140177845954895,
-0.18386536836624146,
0.22885140776634216,
0.1845511794090271,
-0.06408900767564774,
-0.6015823483467102,
-0.40237295627593994,
-0.08474969863891602,
-0.39087918400764465,
0.2498781979084015,
0.08445042371749878,
0.08495074510574341,
0.13040415942668915,
0.18502093851566315,
-0.3826562464237213,
-0.08255728334188461,
0.015825849026441574,
0.06130083650350571,
0.2952607572078705,
-0.06226996332406998,
0.1560605764389038,
0.2717878520488739,
0.16989749670028687,
0.21911954879760742,
-0.1744018942117691,
-0.06355585157871246,
0.19579550623893738,
-0.1356973648071289,
-0.31445595622062683,
-0.2376558482646942,
-0.008966110646724701,
-0.1408722698688507,
0.20624682307243347,
-0.06777498126029968,
0.0807190090417862,
0.42259854078292847,
0.25069308280944824,
0.148600772023201,
-0.04463319480419159,
-0.016697287559509277,
0.48730266094207764,
0.2475123554468155,
-0.04061730578541756,
0.052557382732629776,
-0.11991200596094131,
-0.09080676734447479,
-0.24119935929775238,
-0.010137056931853294,
0.10603164881467819,
0.12858586013317108,
-0.06924451887607574,
-0.26513412594795227,
-0.21649104356765747,
-0.5023368000984192,
-0.21063846349716187,
0.21955257654190063,
0.10517436265945435,
0.1284000724554062,
0.064239501953125,
0.03324189782142639,
0.022569913417100906,
-0.35357993841171265,
-0.40791329741477966,
-0.14177419245243073,
0.10359297692775726,
-0.2609596252441406,
0.23590043187141418,
0.004826676100492477,
-0.35990655422210693,
-0.09566053748130798,
0.22641710937023163,
0.18358878791332245,
0.09278200566768646,
0.314890593290329,
-0.1250021755695343,
0.07167699933052063,
0.45175570249557495,
0.10588033497333527,
-0.09202926605939865,
0.06544142216444016,
0.073043093085289,
-0.21463599801063538,
-0.08073849231004715,
-0.10297957807779312,
-0.5045248866081238,
-0.049303025007247925,
0.15910503268241882,
0.16796211898326874,
0.2293487787246704,
-0.031487904489040375,
0.1408950239419937,
0.5039725303649902,
-0.1939413696527481,
-0.05727396160364151,
-0.17013923823833466,
-0.026260968297719955,
-0.18988627195358276,
0.3036646544933319,
0.2773198187351227,
-0.401644766330719,
0.09226536750793457,
-0.7184799313545227,
-0.16774006187915802,
0.5405654907226562,
0.14763866364955902,
-0.0746159479022026,
0.2311374843120575,
-0.26274338364601135,
0.3361905813217163,
0.48538774251937866,
0.017970960587263107,
-0.036314792931079865,
0.5023655891418457,
0.11890998482704163,
0.10742569714784622,
0.333443820476532,
-0.08776962757110596,
0.14591141045093536,
-0.20631597936153412,
-0.052705079317092896,
0.2896369695663452,
-0.31835824251174927,
-0.3146226406097412,
-0.21228303015232086,
-0.17161352932453156,
0.0773966833949089,
0.16674552857875824,
0.28786981105804443,
0.1822900027036667,
0.06606683880090714,
0.10566171258687973,
0.19938117265701294,
-0.18416602909564972,
0.0943569615483284,
-0.04461175203323364,
0.3000200688838959,
0.23335805535316467,
-0.04686537757515907,
-0.10540944337844849,
-0.15513670444488525,
-0.029079973697662354,
-0.1268458068370819,
-0.012344986200332642,
0.2983875870704651,
-0.42012810707092285,
0.11186052113771439,
-0.14578871428966522,
-0.38800016045570374,
-0.13781365752220154,
0.04966399073600769,
-0.19142234325408936,
0.03738008067011833,
-0.38862380385398865,
-0.06873836368322372,
0.20474745333194733,
-0.28792521357536316,
0.4126656949520111,
-0.32395315170288086,
0.3116569519042969,
-0.142796128988266,
-0.043284717947244644,
-0.20283591747283936,
0.2716238498687744,
0.14596334099769592,
-0.2830008566379547,
-0.06441003829240799,
0.5136758685112,
0.291328102350235,
-0.24997763335704803,
-0.059897281229496,
-0.2693110704421997,
0.08354587107896805,
-0.15337182581424713,
0.042650770395994186,
0.031973011791706085,
-0.02706761658191681,
-0.051615532487630844,
0.14399263262748718,
0.4913005232810974,
0.366813063621521,
0.11045161634683609,
0.2624824643135071,
0.08640622347593307,
0.05055227875709534,
0.19224467873573303,
-0.025131959468126297,
-0.5075973272323608,
-0.14128746092319489,
-0.1288161277770996,
0.36693763732910156,
0.037243615835905075,
-0.23756958544254303,
0.12378554791212082,
0.33912959694862366,
-0.0939384400844574,
0.0564550943672657,
-0.002696774899959564,
0.032512366771698,
-0.03267534822225571,
0.19626852869987488,
0.6504374146461487,
0.46662062406539917,
0.16019925475120544,
0.18037693202495575,
0.20965346693992615,
-0.08586877584457397,
-0.14688369631767273,
0.33640286326408386,
0.2990989089012146,
0.13856849074363708,
-0.06140373647212982,
-0.33035337924957275,
0.06392353028059006,
-0.3187515139579773,
0.0926380604505539,
0.17019931972026825,
0.07574108242988586,
-0.272845059633255,
0.20274867117404938,
-0.25227856636047363,
0.11746247857809067,
-0.05071716755628586,
-0.08012167364358902,
-0.1913539171218872,
-0.35754266381263733,
0.03426313400268555,
0.0016134455800056458,
-0.29701390862464905,
0.16204673051834106,
-0.18612495064735413,
0.18825514614582062,
-0.12258162349462509,
0.023716170340776443,
0.04185888171195984,
0.3042150139808655,
-0.2979263365268707,
0.057803910225629807,
0.16507954895496368,
-0.1444491147994995,
0.3168366551399231,
-0.03936731070280075,
-0.1276976764202118,
-0.08117051422595978,
-0.5159487724304199,
0.2702007293701172,
-0.2245928794145584,
0.2663232684135437,
0.4786919057369232,
-0.4132232666015625,
0.04565294086933136,
-0.4948858320713043,
0.1087316945195198,
-0.15118210017681122,
-0.09252903610467911,
-0.05147195979952812,
-0.11129637062549591,
0.0948367565870285,
-0.35219115018844604,
-0.4680473506450653,
-0.11007628589868546,
-0.4203089475631714,
-0.12111446261405945,
-0.07681912183761597,
0.238184854388237,
0.1925923377275467,
-0.13644681870937347,
0.00296865776181221,
-0.028139689937233925,
-0.132253497838974,
-0.327067494392395,
0.015882376581430435,
0.2679441571235657,
-0.6211180686950684,
-0.10632839798927307,
0.044059086591005325,
-0.3742111921310425,
0.33532145619392395,
0.28402459621429443,
0.04607991874217987,
0.14194205403327942,
-0.19706767797470093,
-0.05222194641828537,
-0.15237724781036377,
0.06522414833307266,
0.1761888861656189,
0.14206793904304504,
0.026619983837008476,
-0.0661187618970871,
0.1303909868001938,
0.23738199472427368,
-0.11329738050699234,
0.2719256281852722,
-0.23288428783416748,
0.5564010739326477,
-0.05160555988550186,
1.0884464979171753,
-0.03055630996823311,
0.035857267677783966,
0.056173793971538544,
0.1555497795343399,
0.2330702692270279,
-0.057868726551532745,
-0.3012399673461914,
0.15010754764080048,
0.0013234466314315796,
-0.20803478360176086,
0.21802037954330444,
0.008280155248939991,
-0.29986992478370667,
-0.02094067446887493,
0.15389686822891235,
-0.0890190601348877,
-0.43301600217819214,
-0.1505630761384964,
-0.2020646631717682,
0.4340951144695282,
-0.03510919585824013,
0.4342504143714905,
0.0068663060665130615,
0.16457009315490723,
-0.3399643003940582,
0.37511032819747925,
0.3924174904823303,
-0.08463743329048157,
0.06664139032363892,
-0.006820078939199448,
-0.13740777969360352,
0.4405192732810974,
0.1433136910200119,
0.26458853483200073,
-0.09999056905508041,
-0.16890555620193481,
0.09111547470092773,
-0.10114522278308868,
0.37898099422454834,
-0.35058319568634033,
-0.2927839159965515,
0.19355928897857666,
-0.2848760485649109,
-0.2273978292942047,
-0.22696629166603088,
-0.18112404644489288,
0.03454948961734772,
0.07233735918998718,
-0.3326079845428467,
-0.3115488290786743,
-0.3117128014564514,
0.7352997064590454,
-0.1864841878414154,
-0.08025507628917694,
-0.15027150511741638,
-0.186609148979187,
-0.3156912922859192,
-0.20027951896190643,
-0.016922980546951294,
-0.038802534341812134,
0.03560464084148407,
-0.2930353581905365,
-0.13759002089500427,
-0.08352375030517578,
-0.13190388679504395,
0.23352229595184326,
0.018593162298202515,
0.22021484375,
-0.2994156777858734,
0.18879397213459015,
0.13807091116905212,
0.06922152638435364,
0.3746967911720276,
0.15566593408584595,
-0.1372116059064865,
-0.07001984119415283,
0.27345797419548035,
-0.1669098138809204,
0.5717335939407349,
0.37936145067214966,
-0.47992101311683655,
0.2568068504333496,
-0.04967688024044037,
0.09850376099348068,
-0.23076754808425903,
-0.11333414912223816,
0.42127928137779236,
-0.17206160724163055,
-0.13391220569610596,
-0.7076979279518127,
0.2136102020740509,
0.20300352573394775,
-0.10186022520065308,
0.23167762160301208,
0.22539229691028595,
-0.36115118861198425,
0.1966238170862198,
0.160946324467659,
0.8526101112365723,
0.40424132347106934,
0.14474493265151978,
0.37336477637290955,
0.10990853607654572,
0.15516865253448486,
-0.1633453667163849,
0.39535099267959595,
-0.2653314769268036,
-0.06914123892784119,
-0.1323762685060501,
-0.09144262969493866,
0.6105437278747559,
0.10514269769191742,
-0.11441493034362793,
0.37567275762557983,
-0.24762585759162903,
0.17863868176937103,
-0.016957847401499748,
0.148300901055336,
-0.35417428612709045,
-0.38956543803215027,
-0.026333242654800415,
0.07703375816345215,
0.1757497787475586,
0.08829361945390701,
-0.15674766898155212,
-0.1366119086742401,
0.02816503867506981,
-0.1252015084028244,
-0.12678304314613342,
0.1978612244129181,
-0.018866870552301407,
0.236222505569458,
-0.10481336712837219,
-0.31014519929885864,
0.6872695684432983,
-0.4096830189228058,
0.24755938351154327,
0.304944783449173,
0.0910269021987915,
0.1516876220703125,
-0.15852829813957214,
0.20086835324764252,
-0.11514471471309662,
0.02387591078877449,
0.4507102370262146,
0.006011147052049637,
0.09194812923669815,
-0.27010664343833923,
-0.1529843509197235,
-0.2632179856300354,
-0.3791462779045105,
-0.051137641072273254,
0.11800803244113922,
-0.43072620034217834,
0.2948971092700958,
0.2032589465379715,
-0.22466377913951874,
-0.3728600740432739,
0.0763261467218399,
-0.06998500227928162,
-0.35993242263793945,
0.13210003077983856,
-0.2497638612985611,
-0.020405709743499756,
-0.21844890713691711,
0.17189612984657288,
0.15930604934692383,
0.16388572752475739,
0.4034930169582367,
-0.15477028489112854,
-0.12025928497314453,
-0.302217960357666,
0.14502179622650146,
0.32768961787223816,
-0.12282606959342957,
0.3003813624382019,
-0.21188987791538239,
0.006112918257713318,
0.1101454421877861,
-0.11704540252685547,
-0.04472004622220993,
0.07933100312948227,
-0.22398877143859863,
-0.19217652082443237,
-0.08170261234045029,
-0.010356642305850983,
-0.21533407270908356,
0.1972702443599701,
-0.21680712699890137,
0.3763892650604248,
0.07182951271533966,
0.19365482032299042,
-0.22428423166275024,
-0.09890946000814438,
0.02029835619032383,
0.06778893619775772,
-0.02216079831123352,
-0.056873202323913574,
0.19304463267326355,
0.16252413392066956,
0.07697032392024994,
0.07965201139450073,
-0.3189263939857483,
-0.060413699597120285,
-0.21295052766799927,
0.18530257046222687,
0.11001823097467422,
-0.09662133455276489,
0.31255385279655457,
0.08876194059848785,
-0.37014085054397583,
-0.0990389883518219,
0.31608182191848755,
-0.2115386724472046,
0.11043918877840042,
0.11254756897687912,
0.19580259919166565,
0.13446107506752014,
-0.2702717185020447,
0.025054309517145157,
-0.10753525793552399,
0.3602887988090515,
0.1304396390914917,
0.14243780076503754,
-0.06978088617324829,
-0.08430250734090805,
0.18649837374687195,
0.053292885422706604,
0.2982028126716614,
-0.15321823954582214,
0.40533119440078735,
-0.1756361573934555,
-0.026646088808774948,
-0.05578995123505592,
0.38835304975509644,
0.4179706275463104,
0.21598200500011444,
-0.02876782976090908,
-0.04850960150361061,
0.0975499376654625,
-0.2621464431285858,
0.23145081102848053,
0.2486339807510376,
-0.09036275744438171,
0.1260383576154709,
0.36638525128364563,
0.21712136268615723,
0.30793288350105286,
-0.2600180506706238,
0.06923069804906845,
0.2204747349023819,
-0.16709645092487335,
0.49665242433547974,
0.6812312602996826,
-0.2562094032764435,
0.506624698638916,
0.4170609712600708,
-0.2192816436290741,
0.17629927396774292,
0.7710938453674316,
-0.10133420675992966,
0.5054677128791809,
0.006250767037272453,
0.08802285045385361,
0.5239155292510986,
-0.4708459973335266,
0.05059971660375595,
0.45790430903434753,
0.31243619322776794,
0.21886670589447021,
-0.230309396982193,
0.19095326960086823,
-0.4291228950023651,
-0.29887279868125916,
-0.20175571739673615,
0.06405621767044067,
-0.16324126720428467,
0.07221753895282745,
-0.2666558623313904,
-0.14774951338768005,
-0.4448676109313965,
-0.19850973784923553,
0.07937085628509521,
-0.19554825127124786,
0.16981947422027588,
-0.041035495698451996,
0.2174406200647354,
-0.07026989012956619,
0.2881234884262085,
-0.08341920375823975,
0.16043278574943542,
-0.2754333019256592,
0.12206503748893738,
0.013622723519802094,
-0.1374799758195877,
0.021209079772233963,
0.17514926195144653,
0.1924545168876648,
0.17036470770835876,
0.05143723264336586,
-0.410894513130188,
0.05936511233448982,
0.0014554057270288467,
0.04533660411834717,
0.21977128088474274,
-0.1882709562778473,
0.30919817090034485,
0.2778536379337311,
-0.007198825478553772,
-0.1041703149676323,
-0.08708453178405762,
0.14009322226047516,
0.10781171917915344,
-0.4092733860015869,
0.7780476212501526,
-0.029169932007789612,
-0.20097365975379944,
0.08572432398796082,
0.1971348226070404,
-0.2530081868171692,
-0.16706696152687073,
0.48852258920669556,
-0.10039472579956055,
-0.11850722879171371,
-0.1684749573469162,
0.038122039288282394,
0.2037205696105957,
0.40691885352134705,
-0.05005224421620369,
-0.13753679394721985,
-0.39415183663368225,
-0.17585864663124084,
-0.3969167470932007,
0.04594259709119797,
-0.2047019898891449,
0.2516385614871979,
-0.020550910383462906,
0.1873529553413391,
0.21092861890792847,
0.10794918984174728,
0.1958669126033783,
0.12780113518238068,
0.19902560114860535,
-0.08972078561782837,
-0.16321620345115662,
-0.09867282211780548,
-0.17237991094589233,
-0.3820716440677643,
-0.08784329891204834,
-0.5605083703994751,
-0.04321451112627983,
0.06417323648929596,
-0.18777000904083252,
0.16980622708797455,
-0.034658316522836685,
0.4984592795372009,
-0.3298732042312622,
0.3147025406360626,
0.33581796288490295,
0.37883004546165466,
-0.05621699243783951,
-0.17933006584644318,
0.0020495839416980743,
-0.2026621401309967,
-0.44123709201812744,
0.19634240865707397,
-0.18474486470222473,
0.23628774285316467,
-0.03987347334623337,
-0.21886934340000153,
-0.4237116277217865,
0.38215264678001404,
0.1402457356452942,
0.20525914430618286,
-0.4020426571369171,
0.5393438935279846,
-0.33294954895973206,
-0.020708199590444565,
0.628118097782135,
0.18077662587165833,
-0.152317076921463,
0.009607557207345963,
-0.3768947124481201,
-0.3352760970592499,
0.25488489866256714,
-0.18355348706245422,
-0.15989592671394348,
-0.399797260761261,
0.3308413624763489,
0.394873708486557,
-0.101162388920784,
-0.19357898831367493,
-0.3101695477962494,
0.23071829974651337,
-0.24430489540100098,
0.14887379109859467,
0.13992339372634888,
0.5106886625289917,
-0.30973681807518005,
-0.14695678651332855,
0.04485289752483368,
-0.14280760288238525,
-0.23397992551326752,
0.2674015462398529,
-0.23542192578315735
] |
https://github.com/huggingface/datasets/issues/5351 | Do we need to implement `_prepare_split`? | looks like my arrow files are all empty @mariosasko

i also see the `incomplete_info.lock` file a level up too. seems like the data isn't being persisted to disk when I call `download_and_prepare`. is there something else i need to do before then, perhaps? | ### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
| 44 | Do we need to implement `_prepare_split`?
### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
looks like my arrow files are all empty @mariosasko

i also see the `incomplete_info.lock` file a level up too. seems like the data isn't being persisted to disk when I call `download_and_prepare`. is there something else i need to do before then, perhaps? | [
-0.39684659242630005,
0.028263568878173828,
0.038606513291597366,
0.26486533880233765,
0.14727875590324402,
0.2111169397830963,
0.5743995904922485,
0.3013264238834381,
-0.35358813405036926,
0.27159470319747925,
0.09605718404054642,
0.13665761053562164,
-0.08747748285531998,
-0.15181736648082733,
0.14780128002166748,
-0.42070913314819336,
0.14535833895206451,
0.1660146415233612,
0.16208773851394653,
-0.1653870940208435,
-0.3060036599636078,
0.1335560530424118,
-0.28613731265068054,
-0.018275029957294464,
-0.014041372574865818,
-0.19102515280246735,
-0.3446138799190521,
0.2566714584827423,
0.015331882052123547,
-0.01015452016144991,
0.19002343714237213,
0.14374659955501556,
0.012923896312713623,
0.29963812232017517,
-0.00011747405369533226,
0.022941559553146362,
0.18693788349628448,
0.037026211619377136,
-0.28322234749794006,
0.1104830652475357,
-0.37851041555404663,
-0.1806396096944809,
0.021225344389677048,
-0.13775314390659332,
-0.1588188111782074,
-0.1996767222881317,
-0.061121128499507904,
0.09741990268230438,
0.4871101379394531,
-0.11936972290277481,
0.17597708106040955,
0.02434464916586876,
0.27351364493370056,
-0.23213663697242737,
0.36309370398521423,
0.1646580994129181,
-0.2933652102947235,
0.0010855542495846748,
-0.3826949894428253,
0.37199515104293823,
0.0005425959825515747,
0.14257007837295532,
0.01083565317094326,
0.15484939515590668,
0.15728209912776947,
0.21359305083751678,
-0.22176891565322876,
-0.41140177845954895,
-0.18386536836624146,
0.22885140776634216,
0.1845511794090271,
-0.06408900767564774,
-0.6015823483467102,
-0.40237295627593994,
-0.08474969863891602,
-0.39087918400764465,
0.2498781979084015,
0.08445042371749878,
0.08495074510574341,
0.13040415942668915,
0.18502093851566315,
-0.3826562464237213,
-0.08255728334188461,
0.015825849026441574,
0.06130083650350571,
0.2952607572078705,
-0.06226996332406998,
0.1560605764389038,
0.2717878520488739,
0.16989749670028687,
0.21911954879760742,
-0.1744018942117691,
-0.06355585157871246,
0.19579550623893738,
-0.1356973648071289,
-0.31445595622062683,
-0.2376558482646942,
-0.008966110646724701,
-0.1408722698688507,
0.20624682307243347,
-0.06777498126029968,
0.0807190090417862,
0.42259854078292847,
0.25069308280944824,
0.148600772023201,
-0.04463319480419159,
-0.016697287559509277,
0.48730266094207764,
0.2475123554468155,
-0.04061730578541756,
0.052557382732629776,
-0.11991200596094131,
-0.09080676734447479,
-0.24119935929775238,
-0.010137056931853294,
0.10603164881467819,
0.12858586013317108,
-0.06924451887607574,
-0.26513412594795227,
-0.21649104356765747,
-0.5023368000984192,
-0.21063846349716187,
0.21955257654190063,
0.10517436265945435,
0.1284000724554062,
0.064239501953125,
0.03324189782142639,
0.022569913417100906,
-0.35357993841171265,
-0.40791329741477966,
-0.14177419245243073,
0.10359297692775726,
-0.2609596252441406,
0.23590043187141418,
0.004826676100492477,
-0.35990655422210693,
-0.09566053748130798,
0.22641710937023163,
0.18358878791332245,
0.09278200566768646,
0.314890593290329,
-0.1250021755695343,
0.07167699933052063,
0.45175570249557495,
0.10588033497333527,
-0.09202926605939865,
0.06544142216444016,
0.073043093085289,
-0.21463599801063538,
-0.08073849231004715,
-0.10297957807779312,
-0.5045248866081238,
-0.049303025007247925,
0.15910503268241882,
0.16796211898326874,
0.2293487787246704,
-0.031487904489040375,
0.1408950239419937,
0.5039725303649902,
-0.1939413696527481,
-0.05727396160364151,
-0.17013923823833466,
-0.026260968297719955,
-0.18988627195358276,
0.3036646544933319,
0.2773198187351227,
-0.401644766330719,
0.09226536750793457,
-0.7184799313545227,
-0.16774006187915802,
0.5405654907226562,
0.14763866364955902,
-0.0746159479022026,
0.2311374843120575,
-0.26274338364601135,
0.3361905813217163,
0.48538774251937866,
0.017970960587263107,
-0.036314792931079865,
0.5023655891418457,
0.11890998482704163,
0.10742569714784622,
0.333443820476532,
-0.08776962757110596,
0.14591141045093536,
-0.20631597936153412,
-0.052705079317092896,
0.2896369695663452,
-0.31835824251174927,
-0.3146226406097412,
-0.21228303015232086,
-0.17161352932453156,
0.0773966833949089,
0.16674552857875824,
0.28786981105804443,
0.1822900027036667,
0.06606683880090714,
0.10566171258687973,
0.19938117265701294,
-0.18416602909564972,
0.0943569615483284,
-0.04461175203323364,
0.3000200688838959,
0.23335805535316467,
-0.04686537757515907,
-0.10540944337844849,
-0.15513670444488525,
-0.029079973697662354,
-0.1268458068370819,
-0.012344986200332642,
0.2983875870704651,
-0.42012810707092285,
0.11186052113771439,
-0.14578871428966522,
-0.38800016045570374,
-0.13781365752220154,
0.04966399073600769,
-0.19142234325408936,
0.03738008067011833,
-0.38862380385398865,
-0.06873836368322372,
0.20474745333194733,
-0.28792521357536316,
0.4126656949520111,
-0.32395315170288086,
0.3116569519042969,
-0.142796128988266,
-0.043284717947244644,
-0.20283591747283936,
0.2716238498687744,
0.14596334099769592,
-0.2830008566379547,
-0.06441003829240799,
0.5136758685112,
0.291328102350235,
-0.24997763335704803,
-0.059897281229496,
-0.2693110704421997,
0.08354587107896805,
-0.15337182581424713,
0.042650770395994186,
0.031973011791706085,
-0.02706761658191681,
-0.051615532487630844,
0.14399263262748718,
0.4913005232810974,
0.366813063621521,
0.11045161634683609,
0.2624824643135071,
0.08640622347593307,
0.05055227875709534,
0.19224467873573303,
-0.025131959468126297,
-0.5075973272323608,
-0.14128746092319489,
-0.1288161277770996,
0.36693763732910156,
0.037243615835905075,
-0.23756958544254303,
0.12378554791212082,
0.33912959694862366,
-0.0939384400844574,
0.0564550943672657,
-0.002696774899959564,
0.032512366771698,
-0.03267534822225571,
0.19626852869987488,
0.6504374146461487,
0.46662062406539917,
0.16019925475120544,
0.18037693202495575,
0.20965346693992615,
-0.08586877584457397,
-0.14688369631767273,
0.33640286326408386,
0.2990989089012146,
0.13856849074363708,
-0.06140373647212982,
-0.33035337924957275,
0.06392353028059006,
-0.3187515139579773,
0.0926380604505539,
0.17019931972026825,
0.07574108242988586,
-0.272845059633255,
0.20274867117404938,
-0.25227856636047363,
0.11746247857809067,
-0.05071716755628586,
-0.08012167364358902,
-0.1913539171218872,
-0.35754266381263733,
0.03426313400268555,
0.0016134455800056458,
-0.29701390862464905,
0.16204673051834106,
-0.18612495064735413,
0.18825514614582062,
-0.12258162349462509,
0.023716170340776443,
0.04185888171195984,
0.3042150139808655,
-0.2979263365268707,
0.057803910225629807,
0.16507954895496368,
-0.1444491147994995,
0.3168366551399231,
-0.03936731070280075,
-0.1276976764202118,
-0.08117051422595978,
-0.5159487724304199,
0.2702007293701172,
-0.2245928794145584,
0.2663232684135437,
0.4786919057369232,
-0.4132232666015625,
0.04565294086933136,
-0.4948858320713043,
0.1087316945195198,
-0.15118210017681122,
-0.09252903610467911,
-0.05147195979952812,
-0.11129637062549591,
0.0948367565870285,
-0.35219115018844604,
-0.4680473506450653,
-0.11007628589868546,
-0.4203089475631714,
-0.12111446261405945,
-0.07681912183761597,
0.238184854388237,
0.1925923377275467,
-0.13644681870937347,
0.00296865776181221,
-0.028139689937233925,
-0.132253497838974,
-0.327067494392395,
0.015882376581430435,
0.2679441571235657,
-0.6211180686950684,
-0.10632839798927307,
0.044059086591005325,
-0.3742111921310425,
0.33532145619392395,
0.28402459621429443,
0.04607991874217987,
0.14194205403327942,
-0.19706767797470093,
-0.05222194641828537,
-0.15237724781036377,
0.06522414833307266,
0.1761888861656189,
0.14206793904304504,
0.026619983837008476,
-0.0661187618970871,
0.1303909868001938,
0.23738199472427368,
-0.11329738050699234,
0.2719256281852722,
-0.23288428783416748,
0.5564010739326477,
-0.05160555988550186,
1.0884464979171753,
-0.03055630996823311,
0.035857267677783966,
0.056173793971538544,
0.1555497795343399,
0.2330702692270279,
-0.057868726551532745,
-0.3012399673461914,
0.15010754764080048,
0.0013234466314315796,
-0.20803478360176086,
0.21802037954330444,
0.008280155248939991,
-0.29986992478370667,
-0.02094067446887493,
0.15389686822891235,
-0.0890190601348877,
-0.43301600217819214,
-0.1505630761384964,
-0.2020646631717682,
0.4340951144695282,
-0.03510919585824013,
0.4342504143714905,
0.0068663060665130615,
0.16457009315490723,
-0.3399643003940582,
0.37511032819747925,
0.3924174904823303,
-0.08463743329048157,
0.06664139032363892,
-0.006820078939199448,
-0.13740777969360352,
0.4405192732810974,
0.1433136910200119,
0.26458853483200073,
-0.09999056905508041,
-0.16890555620193481,
0.09111547470092773,
-0.10114522278308868,
0.37898099422454834,
-0.35058319568634033,
-0.2927839159965515,
0.19355928897857666,
-0.2848760485649109,
-0.2273978292942047,
-0.22696629166603088,
-0.18112404644489288,
0.03454948961734772,
0.07233735918998718,
-0.3326079845428467,
-0.3115488290786743,
-0.3117128014564514,
0.7352997064590454,
-0.1864841878414154,
-0.08025507628917694,
-0.15027150511741638,
-0.186609148979187,
-0.3156912922859192,
-0.20027951896190643,
-0.016922980546951294,
-0.038802534341812134,
0.03560464084148407,
-0.2930353581905365,
-0.13759002089500427,
-0.08352375030517578,
-0.13190388679504395,
0.23352229595184326,
0.018593162298202515,
0.22021484375,
-0.2994156777858734,
0.18879397213459015,
0.13807091116905212,
0.06922152638435364,
0.3746967911720276,
0.15566593408584595,
-0.1372116059064865,
-0.07001984119415283,
0.27345797419548035,
-0.1669098138809204,
0.5717335939407349,
0.37936145067214966,
-0.47992101311683655,
0.2568068504333496,
-0.04967688024044037,
0.09850376099348068,
-0.23076754808425903,
-0.11333414912223816,
0.42127928137779236,
-0.17206160724163055,
-0.13391220569610596,
-0.7076979279518127,
0.2136102020740509,
0.20300352573394775,
-0.10186022520065308,
0.23167762160301208,
0.22539229691028595,
-0.36115118861198425,
0.1966238170862198,
0.160946324467659,
0.8526101112365723,
0.40424132347106934,
0.14474493265151978,
0.37336477637290955,
0.10990853607654572,
0.15516865253448486,
-0.1633453667163849,
0.39535099267959595,
-0.2653314769268036,
-0.06914123892784119,
-0.1323762685060501,
-0.09144262969493866,
0.6105437278747559,
0.10514269769191742,
-0.11441493034362793,
0.37567275762557983,
-0.24762585759162903,
0.17863868176937103,
-0.016957847401499748,
0.148300901055336,
-0.35417428612709045,
-0.38956543803215027,
-0.026333242654800415,
0.07703375816345215,
0.1757497787475586,
0.08829361945390701,
-0.15674766898155212,
-0.1366119086742401,
0.02816503867506981,
-0.1252015084028244,
-0.12678304314613342,
0.1978612244129181,
-0.018866870552301407,
0.236222505569458,
-0.10481336712837219,
-0.31014519929885864,
0.6872695684432983,
-0.4096830189228058,
0.24755938351154327,
0.304944783449173,
0.0910269021987915,
0.1516876220703125,
-0.15852829813957214,
0.20086835324764252,
-0.11514471471309662,
0.02387591078877449,
0.4507102370262146,
0.006011147052049637,
0.09194812923669815,
-0.27010664343833923,
-0.1529843509197235,
-0.2632179856300354,
-0.3791462779045105,
-0.051137641072273254,
0.11800803244113922,
-0.43072620034217834,
0.2948971092700958,
0.2032589465379715,
-0.22466377913951874,
-0.3728600740432739,
0.0763261467218399,
-0.06998500227928162,
-0.35993242263793945,
0.13210003077983856,
-0.2497638612985611,
-0.020405709743499756,
-0.21844890713691711,
0.17189612984657288,
0.15930604934692383,
0.16388572752475739,
0.4034930169582367,
-0.15477028489112854,
-0.12025928497314453,
-0.302217960357666,
0.14502179622650146,
0.32768961787223816,
-0.12282606959342957,
0.3003813624382019,
-0.21188987791538239,
0.006112918257713318,
0.1101454421877861,
-0.11704540252685547,
-0.04472004622220993,
0.07933100312948227,
-0.22398877143859863,
-0.19217652082443237,
-0.08170261234045029,
-0.010356642305850983,
-0.21533407270908356,
0.1972702443599701,
-0.21680712699890137,
0.3763892650604248,
0.07182951271533966,
0.19365482032299042,
-0.22428423166275024,
-0.09890946000814438,
0.02029835619032383,
0.06778893619775772,
-0.02216079831123352,
-0.056873202323913574,
0.19304463267326355,
0.16252413392066956,
0.07697032392024994,
0.07965201139450073,
-0.3189263939857483,
-0.060413699597120285,
-0.21295052766799927,
0.18530257046222687,
0.11001823097467422,
-0.09662133455276489,
0.31255385279655457,
0.08876194059848785,
-0.37014085054397583,
-0.0990389883518219,
0.31608182191848755,
-0.2115386724472046,
0.11043918877840042,
0.11254756897687912,
0.19580259919166565,
0.13446107506752014,
-0.2702717185020447,
0.025054309517145157,
-0.10753525793552399,
0.3602887988090515,
0.1304396390914917,
0.14243780076503754,
-0.06978088617324829,
-0.08430250734090805,
0.18649837374687195,
0.053292885422706604,
0.2982028126716614,
-0.15321823954582214,
0.40533119440078735,
-0.1756361573934555,
-0.026646088808774948,
-0.05578995123505592,
0.38835304975509644,
0.4179706275463104,
0.21598200500011444,
-0.02876782976090908,
-0.04850960150361061,
0.0975499376654625,
-0.2621464431285858,
0.23145081102848053,
0.2486339807510376,
-0.09036275744438171,
0.1260383576154709,
0.36638525128364563,
0.21712136268615723,
0.30793288350105286,
-0.2600180506706238,
0.06923069804906845,
0.2204747349023819,
-0.16709645092487335,
0.49665242433547974,
0.6812312602996826,
-0.2562094032764435,
0.506624698638916,
0.4170609712600708,
-0.2192816436290741,
0.17629927396774292,
0.7710938453674316,
-0.10133420675992966,
0.5054677128791809,
0.006250767037272453,
0.08802285045385361,
0.5239155292510986,
-0.4708459973335266,
0.05059971660375595,
0.45790430903434753,
0.31243619322776794,
0.21886670589447021,
-0.230309396982193,
0.19095326960086823,
-0.4291228950023651,
-0.29887279868125916,
-0.20175571739673615,
0.06405621767044067,
-0.16324126720428467,
0.07221753895282745,
-0.2666558623313904,
-0.14774951338768005,
-0.4448676109313965,
-0.19850973784923553,
0.07937085628509521,
-0.19554825127124786,
0.16981947422027588,
-0.041035495698451996,
0.2174406200647354,
-0.07026989012956619,
0.2881234884262085,
-0.08341920375823975,
0.16043278574943542,
-0.2754333019256592,
0.12206503748893738,
0.013622723519802094,
-0.1374799758195877,
0.021209079772233963,
0.17514926195144653,
0.1924545168876648,
0.17036470770835876,
0.05143723264336586,
-0.410894513130188,
0.05936511233448982,
0.0014554057270288467,
0.04533660411834717,
0.21977128088474274,
-0.1882709562778473,
0.30919817090034485,
0.2778536379337311,
-0.007198825478553772,
-0.1041703149676323,
-0.08708453178405762,
0.14009322226047516,
0.10781171917915344,
-0.4092733860015869,
0.7780476212501526,
-0.029169932007789612,
-0.20097365975379944,
0.08572432398796082,
0.1971348226070404,
-0.2530081868171692,
-0.16706696152687073,
0.48852258920669556,
-0.10039472579956055,
-0.11850722879171371,
-0.1684749573469162,
0.038122039288282394,
0.2037205696105957,
0.40691885352134705,
-0.05005224421620369,
-0.13753679394721985,
-0.39415183663368225,
-0.17585864663124084,
-0.3969167470932007,
0.04594259709119797,
-0.2047019898891449,
0.2516385614871979,
-0.020550910383462906,
0.1873529553413391,
0.21092861890792847,
0.10794918984174728,
0.1958669126033783,
0.12780113518238068,
0.19902560114860535,
-0.08972078561782837,
-0.16321620345115662,
-0.09867282211780548,
-0.17237991094589233,
-0.3820716440677643,
-0.08784329891204834,
-0.5605083703994751,
-0.04321451112627983,
0.06417323648929596,
-0.18777000904083252,
0.16980622708797455,
-0.034658316522836685,
0.4984592795372009,
-0.3298732042312622,
0.3147025406360626,
0.33581796288490295,
0.37883004546165466,
-0.05621699243783951,
-0.17933006584644318,
0.0020495839416980743,
-0.2026621401309967,
-0.44123709201812744,
0.19634240865707397,
-0.18474486470222473,
0.23628774285316467,
-0.03987347334623337,
-0.21886934340000153,
-0.4237116277217865,
0.38215264678001404,
0.1402457356452942,
0.20525914430618286,
-0.4020426571369171,
0.5393438935279846,
-0.33294954895973206,
-0.020708199590444565,
0.628118097782135,
0.18077662587165833,
-0.152317076921463,
0.009607557207345963,
-0.3768947124481201,
-0.3352760970592499,
0.25488489866256714,
-0.18355348706245422,
-0.15989592671394348,
-0.399797260761261,
0.3308413624763489,
0.394873708486557,
-0.101162388920784,
-0.19357898831367493,
-0.3101695477962494,
0.23071829974651337,
-0.24430489540100098,
0.14887379109859467,
0.13992339372634888,
0.5106886625289917,
-0.30973681807518005,
-0.14695678651332855,
0.04485289752483368,
-0.14280760288238525,
-0.23397992551326752,
0.2674015462398529,
-0.23542192578315735
] |
https://github.com/huggingface/datasets/issues/5351 | Do we need to implement `_prepare_split`? | quick update @mariosasko. i got it working! i had to downgrade to `datasets==2.4.0`. testing other versions now and will let you know the results. | ### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
| 24 | Do we need to implement `_prepare_split`?
### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
quick update @mariosasko. i got it working! i had to downgrade to `datasets==2.4.0`. testing other versions now and will let you know the results. | [
-0.39684659242630005,
0.028263568878173828,
0.038606513291597366,
0.26486533880233765,
0.14727875590324402,
0.2111169397830963,
0.5743995904922485,
0.3013264238834381,
-0.35358813405036926,
0.27159470319747925,
0.09605718404054642,
0.13665761053562164,
-0.08747748285531998,
-0.15181736648082733,
0.14780128002166748,
-0.42070913314819336,
0.14535833895206451,
0.1660146415233612,
0.16208773851394653,
-0.1653870940208435,
-0.3060036599636078,
0.1335560530424118,
-0.28613731265068054,
-0.018275029957294464,
-0.014041372574865818,
-0.19102515280246735,
-0.3446138799190521,
0.2566714584827423,
0.015331882052123547,
-0.01015452016144991,
0.19002343714237213,
0.14374659955501556,
0.012923896312713623,
0.29963812232017517,
-0.00011747405369533226,
0.022941559553146362,
0.18693788349628448,
0.037026211619377136,
-0.28322234749794006,
0.1104830652475357,
-0.37851041555404663,
-0.1806396096944809,
0.021225344389677048,
-0.13775314390659332,
-0.1588188111782074,
-0.1996767222881317,
-0.061121128499507904,
0.09741990268230438,
0.4871101379394531,
-0.11936972290277481,
0.17597708106040955,
0.02434464916586876,
0.27351364493370056,
-0.23213663697242737,
0.36309370398521423,
0.1646580994129181,
-0.2933652102947235,
0.0010855542495846748,
-0.3826949894428253,
0.37199515104293823,
0.0005425959825515747,
0.14257007837295532,
0.01083565317094326,
0.15484939515590668,
0.15728209912776947,
0.21359305083751678,
-0.22176891565322876,
-0.41140177845954895,
-0.18386536836624146,
0.22885140776634216,
0.1845511794090271,
-0.06408900767564774,
-0.6015823483467102,
-0.40237295627593994,
-0.08474969863891602,
-0.39087918400764465,
0.2498781979084015,
0.08445042371749878,
0.08495074510574341,
0.13040415942668915,
0.18502093851566315,
-0.3826562464237213,
-0.08255728334188461,
0.015825849026441574,
0.06130083650350571,
0.2952607572078705,
-0.06226996332406998,
0.1560605764389038,
0.2717878520488739,
0.16989749670028687,
0.21911954879760742,
-0.1744018942117691,
-0.06355585157871246,
0.19579550623893738,
-0.1356973648071289,
-0.31445595622062683,
-0.2376558482646942,
-0.008966110646724701,
-0.1408722698688507,
0.20624682307243347,
-0.06777498126029968,
0.0807190090417862,
0.42259854078292847,
0.25069308280944824,
0.148600772023201,
-0.04463319480419159,
-0.016697287559509277,
0.48730266094207764,
0.2475123554468155,
-0.04061730578541756,
0.052557382732629776,
-0.11991200596094131,
-0.09080676734447479,
-0.24119935929775238,
-0.010137056931853294,
0.10603164881467819,
0.12858586013317108,
-0.06924451887607574,
-0.26513412594795227,
-0.21649104356765747,
-0.5023368000984192,
-0.21063846349716187,
0.21955257654190063,
0.10517436265945435,
0.1284000724554062,
0.064239501953125,
0.03324189782142639,
0.022569913417100906,
-0.35357993841171265,
-0.40791329741477966,
-0.14177419245243073,
0.10359297692775726,
-0.2609596252441406,
0.23590043187141418,
0.004826676100492477,
-0.35990655422210693,
-0.09566053748130798,
0.22641710937023163,
0.18358878791332245,
0.09278200566768646,
0.314890593290329,
-0.1250021755695343,
0.07167699933052063,
0.45175570249557495,
0.10588033497333527,
-0.09202926605939865,
0.06544142216444016,
0.073043093085289,
-0.21463599801063538,
-0.08073849231004715,
-0.10297957807779312,
-0.5045248866081238,
-0.049303025007247925,
0.15910503268241882,
0.16796211898326874,
0.2293487787246704,
-0.031487904489040375,
0.1408950239419937,
0.5039725303649902,
-0.1939413696527481,
-0.05727396160364151,
-0.17013923823833466,
-0.026260968297719955,
-0.18988627195358276,
0.3036646544933319,
0.2773198187351227,
-0.401644766330719,
0.09226536750793457,
-0.7184799313545227,
-0.16774006187915802,
0.5405654907226562,
0.14763866364955902,
-0.0746159479022026,
0.2311374843120575,
-0.26274338364601135,
0.3361905813217163,
0.48538774251937866,
0.017970960587263107,
-0.036314792931079865,
0.5023655891418457,
0.11890998482704163,
0.10742569714784622,
0.333443820476532,
-0.08776962757110596,
0.14591141045093536,
-0.20631597936153412,
-0.052705079317092896,
0.2896369695663452,
-0.31835824251174927,
-0.3146226406097412,
-0.21228303015232086,
-0.17161352932453156,
0.0773966833949089,
0.16674552857875824,
0.28786981105804443,
0.1822900027036667,
0.06606683880090714,
0.10566171258687973,
0.19938117265701294,
-0.18416602909564972,
0.0943569615483284,
-0.04461175203323364,
0.3000200688838959,
0.23335805535316467,
-0.04686537757515907,
-0.10540944337844849,
-0.15513670444488525,
-0.029079973697662354,
-0.1268458068370819,
-0.012344986200332642,
0.2983875870704651,
-0.42012810707092285,
0.11186052113771439,
-0.14578871428966522,
-0.38800016045570374,
-0.13781365752220154,
0.04966399073600769,
-0.19142234325408936,
0.03738008067011833,
-0.38862380385398865,
-0.06873836368322372,
0.20474745333194733,
-0.28792521357536316,
0.4126656949520111,
-0.32395315170288086,
0.3116569519042969,
-0.142796128988266,
-0.043284717947244644,
-0.20283591747283936,
0.2716238498687744,
0.14596334099769592,
-0.2830008566379547,
-0.06441003829240799,
0.5136758685112,
0.291328102350235,
-0.24997763335704803,
-0.059897281229496,
-0.2693110704421997,
0.08354587107896805,
-0.15337182581424713,
0.042650770395994186,
0.031973011791706085,
-0.02706761658191681,
-0.051615532487630844,
0.14399263262748718,
0.4913005232810974,
0.366813063621521,
0.11045161634683609,
0.2624824643135071,
0.08640622347593307,
0.05055227875709534,
0.19224467873573303,
-0.025131959468126297,
-0.5075973272323608,
-0.14128746092319489,
-0.1288161277770996,
0.36693763732910156,
0.037243615835905075,
-0.23756958544254303,
0.12378554791212082,
0.33912959694862366,
-0.0939384400844574,
0.0564550943672657,
-0.002696774899959564,
0.032512366771698,
-0.03267534822225571,
0.19626852869987488,
0.6504374146461487,
0.46662062406539917,
0.16019925475120544,
0.18037693202495575,
0.20965346693992615,
-0.08586877584457397,
-0.14688369631767273,
0.33640286326408386,
0.2990989089012146,
0.13856849074363708,
-0.06140373647212982,
-0.33035337924957275,
0.06392353028059006,
-0.3187515139579773,
0.0926380604505539,
0.17019931972026825,
0.07574108242988586,
-0.272845059633255,
0.20274867117404938,
-0.25227856636047363,
0.11746247857809067,
-0.05071716755628586,
-0.08012167364358902,
-0.1913539171218872,
-0.35754266381263733,
0.03426313400268555,
0.0016134455800056458,
-0.29701390862464905,
0.16204673051834106,
-0.18612495064735413,
0.18825514614582062,
-0.12258162349462509,
0.023716170340776443,
0.04185888171195984,
0.3042150139808655,
-0.2979263365268707,
0.057803910225629807,
0.16507954895496368,
-0.1444491147994995,
0.3168366551399231,
-0.03936731070280075,
-0.1276976764202118,
-0.08117051422595978,
-0.5159487724304199,
0.2702007293701172,
-0.2245928794145584,
0.2663232684135437,
0.4786919057369232,
-0.4132232666015625,
0.04565294086933136,
-0.4948858320713043,
0.1087316945195198,
-0.15118210017681122,
-0.09252903610467911,
-0.05147195979952812,
-0.11129637062549591,
0.0948367565870285,
-0.35219115018844604,
-0.4680473506450653,
-0.11007628589868546,
-0.4203089475631714,
-0.12111446261405945,
-0.07681912183761597,
0.238184854388237,
0.1925923377275467,
-0.13644681870937347,
0.00296865776181221,
-0.028139689937233925,
-0.132253497838974,
-0.327067494392395,
0.015882376581430435,
0.2679441571235657,
-0.6211180686950684,
-0.10632839798927307,
0.044059086591005325,
-0.3742111921310425,
0.33532145619392395,
0.28402459621429443,
0.04607991874217987,
0.14194205403327942,
-0.19706767797470093,
-0.05222194641828537,
-0.15237724781036377,
0.06522414833307266,
0.1761888861656189,
0.14206793904304504,
0.026619983837008476,
-0.0661187618970871,
0.1303909868001938,
0.23738199472427368,
-0.11329738050699234,
0.2719256281852722,
-0.23288428783416748,
0.5564010739326477,
-0.05160555988550186,
1.0884464979171753,
-0.03055630996823311,
0.035857267677783966,
0.056173793971538544,
0.1555497795343399,
0.2330702692270279,
-0.057868726551532745,
-0.3012399673461914,
0.15010754764080048,
0.0013234466314315796,
-0.20803478360176086,
0.21802037954330444,
0.008280155248939991,
-0.29986992478370667,
-0.02094067446887493,
0.15389686822891235,
-0.0890190601348877,
-0.43301600217819214,
-0.1505630761384964,
-0.2020646631717682,
0.4340951144695282,
-0.03510919585824013,
0.4342504143714905,
0.0068663060665130615,
0.16457009315490723,
-0.3399643003940582,
0.37511032819747925,
0.3924174904823303,
-0.08463743329048157,
0.06664139032363892,
-0.006820078939199448,
-0.13740777969360352,
0.4405192732810974,
0.1433136910200119,
0.26458853483200073,
-0.09999056905508041,
-0.16890555620193481,
0.09111547470092773,
-0.10114522278308868,
0.37898099422454834,
-0.35058319568634033,
-0.2927839159965515,
0.19355928897857666,
-0.2848760485649109,
-0.2273978292942047,
-0.22696629166603088,
-0.18112404644489288,
0.03454948961734772,
0.07233735918998718,
-0.3326079845428467,
-0.3115488290786743,
-0.3117128014564514,
0.7352997064590454,
-0.1864841878414154,
-0.08025507628917694,
-0.15027150511741638,
-0.186609148979187,
-0.3156912922859192,
-0.20027951896190643,
-0.016922980546951294,
-0.038802534341812134,
0.03560464084148407,
-0.2930353581905365,
-0.13759002089500427,
-0.08352375030517578,
-0.13190388679504395,
0.23352229595184326,
0.018593162298202515,
0.22021484375,
-0.2994156777858734,
0.18879397213459015,
0.13807091116905212,
0.06922152638435364,
0.3746967911720276,
0.15566593408584595,
-0.1372116059064865,
-0.07001984119415283,
0.27345797419548035,
-0.1669098138809204,
0.5717335939407349,
0.37936145067214966,
-0.47992101311683655,
0.2568068504333496,
-0.04967688024044037,
0.09850376099348068,
-0.23076754808425903,
-0.11333414912223816,
0.42127928137779236,
-0.17206160724163055,
-0.13391220569610596,
-0.7076979279518127,
0.2136102020740509,
0.20300352573394775,
-0.10186022520065308,
0.23167762160301208,
0.22539229691028595,
-0.36115118861198425,
0.1966238170862198,
0.160946324467659,
0.8526101112365723,
0.40424132347106934,
0.14474493265151978,
0.37336477637290955,
0.10990853607654572,
0.15516865253448486,
-0.1633453667163849,
0.39535099267959595,
-0.2653314769268036,
-0.06914123892784119,
-0.1323762685060501,
-0.09144262969493866,
0.6105437278747559,
0.10514269769191742,
-0.11441493034362793,
0.37567275762557983,
-0.24762585759162903,
0.17863868176937103,
-0.016957847401499748,
0.148300901055336,
-0.35417428612709045,
-0.38956543803215027,
-0.026333242654800415,
0.07703375816345215,
0.1757497787475586,
0.08829361945390701,
-0.15674766898155212,
-0.1366119086742401,
0.02816503867506981,
-0.1252015084028244,
-0.12678304314613342,
0.1978612244129181,
-0.018866870552301407,
0.236222505569458,
-0.10481336712837219,
-0.31014519929885864,
0.6872695684432983,
-0.4096830189228058,
0.24755938351154327,
0.304944783449173,
0.0910269021987915,
0.1516876220703125,
-0.15852829813957214,
0.20086835324764252,
-0.11514471471309662,
0.02387591078877449,
0.4507102370262146,
0.006011147052049637,
0.09194812923669815,
-0.27010664343833923,
-0.1529843509197235,
-0.2632179856300354,
-0.3791462779045105,
-0.051137641072273254,
0.11800803244113922,
-0.43072620034217834,
0.2948971092700958,
0.2032589465379715,
-0.22466377913951874,
-0.3728600740432739,
0.0763261467218399,
-0.06998500227928162,
-0.35993242263793945,
0.13210003077983856,
-0.2497638612985611,
-0.020405709743499756,
-0.21844890713691711,
0.17189612984657288,
0.15930604934692383,
0.16388572752475739,
0.4034930169582367,
-0.15477028489112854,
-0.12025928497314453,
-0.302217960357666,
0.14502179622650146,
0.32768961787223816,
-0.12282606959342957,
0.3003813624382019,
-0.21188987791538239,
0.006112918257713318,
0.1101454421877861,
-0.11704540252685547,
-0.04472004622220993,
0.07933100312948227,
-0.22398877143859863,
-0.19217652082443237,
-0.08170261234045029,
-0.010356642305850983,
-0.21533407270908356,
0.1972702443599701,
-0.21680712699890137,
0.3763892650604248,
0.07182951271533966,
0.19365482032299042,
-0.22428423166275024,
-0.09890946000814438,
0.02029835619032383,
0.06778893619775772,
-0.02216079831123352,
-0.056873202323913574,
0.19304463267326355,
0.16252413392066956,
0.07697032392024994,
0.07965201139450073,
-0.3189263939857483,
-0.060413699597120285,
-0.21295052766799927,
0.18530257046222687,
0.11001823097467422,
-0.09662133455276489,
0.31255385279655457,
0.08876194059848785,
-0.37014085054397583,
-0.0990389883518219,
0.31608182191848755,
-0.2115386724472046,
0.11043918877840042,
0.11254756897687912,
0.19580259919166565,
0.13446107506752014,
-0.2702717185020447,
0.025054309517145157,
-0.10753525793552399,
0.3602887988090515,
0.1304396390914917,
0.14243780076503754,
-0.06978088617324829,
-0.08430250734090805,
0.18649837374687195,
0.053292885422706604,
0.2982028126716614,
-0.15321823954582214,
0.40533119440078735,
-0.1756361573934555,
-0.026646088808774948,
-0.05578995123505592,
0.38835304975509644,
0.4179706275463104,
0.21598200500011444,
-0.02876782976090908,
-0.04850960150361061,
0.0975499376654625,
-0.2621464431285858,
0.23145081102848053,
0.2486339807510376,
-0.09036275744438171,
0.1260383576154709,
0.36638525128364563,
0.21712136268615723,
0.30793288350105286,
-0.2600180506706238,
0.06923069804906845,
0.2204747349023819,
-0.16709645092487335,
0.49665242433547974,
0.6812312602996826,
-0.2562094032764435,
0.506624698638916,
0.4170609712600708,
-0.2192816436290741,
0.17629927396774292,
0.7710938453674316,
-0.10133420675992966,
0.5054677128791809,
0.006250767037272453,
0.08802285045385361,
0.5239155292510986,
-0.4708459973335266,
0.05059971660375595,
0.45790430903434753,
0.31243619322776794,
0.21886670589447021,
-0.230309396982193,
0.19095326960086823,
-0.4291228950023651,
-0.29887279868125916,
-0.20175571739673615,
0.06405621767044067,
-0.16324126720428467,
0.07221753895282745,
-0.2666558623313904,
-0.14774951338768005,
-0.4448676109313965,
-0.19850973784923553,
0.07937085628509521,
-0.19554825127124786,
0.16981947422027588,
-0.041035495698451996,
0.2174406200647354,
-0.07026989012956619,
0.2881234884262085,
-0.08341920375823975,
0.16043278574943542,
-0.2754333019256592,
0.12206503748893738,
0.013622723519802094,
-0.1374799758195877,
0.021209079772233963,
0.17514926195144653,
0.1924545168876648,
0.17036470770835876,
0.05143723264336586,
-0.410894513130188,
0.05936511233448982,
0.0014554057270288467,
0.04533660411834717,
0.21977128088474274,
-0.1882709562778473,
0.30919817090034485,
0.2778536379337311,
-0.007198825478553772,
-0.1041703149676323,
-0.08708453178405762,
0.14009322226047516,
0.10781171917915344,
-0.4092733860015869,
0.7780476212501526,
-0.029169932007789612,
-0.20097365975379944,
0.08572432398796082,
0.1971348226070404,
-0.2530081868171692,
-0.16706696152687073,
0.48852258920669556,
-0.10039472579956055,
-0.11850722879171371,
-0.1684749573469162,
0.038122039288282394,
0.2037205696105957,
0.40691885352134705,
-0.05005224421620369,
-0.13753679394721985,
-0.39415183663368225,
-0.17585864663124084,
-0.3969167470932007,
0.04594259709119797,
-0.2047019898891449,
0.2516385614871979,
-0.020550910383462906,
0.1873529553413391,
0.21092861890792847,
0.10794918984174728,
0.1958669126033783,
0.12780113518238068,
0.19902560114860535,
-0.08972078561782837,
-0.16321620345115662,
-0.09867282211780548,
-0.17237991094589233,
-0.3820716440677643,
-0.08784329891204834,
-0.5605083703994751,
-0.04321451112627983,
0.06417323648929596,
-0.18777000904083252,
0.16980622708797455,
-0.034658316522836685,
0.4984592795372009,
-0.3298732042312622,
0.3147025406360626,
0.33581796288490295,
0.37883004546165466,
-0.05621699243783951,
-0.17933006584644318,
0.0020495839416980743,
-0.2026621401309967,
-0.44123709201812744,
0.19634240865707397,
-0.18474486470222473,
0.23628774285316467,
-0.03987347334623337,
-0.21886934340000153,
-0.4237116277217865,
0.38215264678001404,
0.1402457356452942,
0.20525914430618286,
-0.4020426571369171,
0.5393438935279846,
-0.33294954895973206,
-0.020708199590444565,
0.628118097782135,
0.18077662587165833,
-0.152317076921463,
0.009607557207345963,
-0.3768947124481201,
-0.3352760970592499,
0.25488489866256714,
-0.18355348706245422,
-0.15989592671394348,
-0.399797260761261,
0.3308413624763489,
0.394873708486557,
-0.101162388920784,
-0.19357898831367493,
-0.3101695477962494,
0.23071829974651337,
-0.24430489540100098,
0.14887379109859467,
0.13992339372634888,
0.5106886625289917,
-0.30973681807518005,
-0.14695678651332855,
0.04485289752483368,
-0.14280760288238525,
-0.23397992551326752,
0.2674015462398529,
-0.23542192578315735
] |
https://github.com/huggingface/datasets/issues/5351 | Do we need to implement `_prepare_split`? | I've tested with every version of `datasets>2.4.0` and i get the same error with all of them. | ### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
| 17 | Do we need to implement `_prepare_split`?
### Describe the bug
I'm not sure this is a bug or if it's just missing in the documentation, or i'm not doing something correctly, but I'm subclassing `DatasetBuilder` and getting the following error because on the `DatasetBuilder` class the `_prepare_split` method is abstract (as are the others we are required to implement, hence the genesis of my question):
```
Traceback (most recent call last):
File "/home/jason/source/python/prism_machine_learning/examples/create_hf_datasets.py", line 28, in <module>
dataset_builder.download_and_prepare()
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jason/.virtualenvs/pml/lib/python3.8/site-packages/datasets/builder.py", line 1124, in _prepare_split
raise NotImplementedError()
NotImplementedError
```
### Steps to reproduce the bug
I will share implementation if it turns out that everything should be working (i.e. we only need to implement those 3 methods the docs mention), but I don't want to distract from the original question.
### Expected behavior
I just need to know if there are additional methods we need to implement when subclassing `DatasetBuilder` besides what the documentation specifies -> `_info`, `_split_generators` and `_generate_examples`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.2.5
- Python version: 3.8.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.1
I've tested with every version of `datasets>2.4.0` and i get the same error with all of them. | [
-0.39684659242630005,
0.028263568878173828,
0.038606513291597366,
0.26486533880233765,
0.14727875590324402,
0.2111169397830963,
0.5743995904922485,
0.3013264238834381,
-0.35358813405036926,
0.27159470319747925,
0.09605718404054642,
0.13665761053562164,
-0.08747748285531998,
-0.15181736648082733,
0.14780128002166748,
-0.42070913314819336,
0.14535833895206451,
0.1660146415233612,
0.16208773851394653,
-0.1653870940208435,
-0.3060036599636078,
0.1335560530424118,
-0.28613731265068054,
-0.018275029957294464,
-0.014041372574865818,
-0.19102515280246735,
-0.3446138799190521,
0.2566714584827423,
0.015331882052123547,
-0.01015452016144991,
0.19002343714237213,
0.14374659955501556,
0.012923896312713623,
0.29963812232017517,
-0.00011747405369533226,
0.022941559553146362,
0.18693788349628448,
0.037026211619377136,
-0.28322234749794006,
0.1104830652475357,
-0.37851041555404663,
-0.1806396096944809,
0.021225344389677048,
-0.13775314390659332,
-0.1588188111782074,
-0.1996767222881317,
-0.061121128499507904,
0.09741990268230438,
0.4871101379394531,
-0.11936972290277481,
0.17597708106040955,
0.02434464916586876,
0.27351364493370056,
-0.23213663697242737,
0.36309370398521423,
0.1646580994129181,
-0.2933652102947235,
0.0010855542495846748,
-0.3826949894428253,
0.37199515104293823,
0.0005425959825515747,
0.14257007837295532,
0.01083565317094326,
0.15484939515590668,
0.15728209912776947,
0.21359305083751678,
-0.22176891565322876,
-0.41140177845954895,
-0.18386536836624146,
0.22885140776634216,
0.1845511794090271,
-0.06408900767564774,
-0.6015823483467102,
-0.40237295627593994,
-0.08474969863891602,
-0.39087918400764465,
0.2498781979084015,
0.08445042371749878,
0.08495074510574341,
0.13040415942668915,
0.18502093851566315,
-0.3826562464237213,
-0.08255728334188461,
0.015825849026441574,
0.06130083650350571,
0.2952607572078705,
-0.06226996332406998,
0.1560605764389038,
0.2717878520488739,
0.16989749670028687,
0.21911954879760742,
-0.1744018942117691,
-0.06355585157871246,
0.19579550623893738,
-0.1356973648071289,
-0.31445595622062683,
-0.2376558482646942,
-0.008966110646724701,
-0.1408722698688507,
0.20624682307243347,
-0.06777498126029968,
0.0807190090417862,
0.42259854078292847,
0.25069308280944824,
0.148600772023201,
-0.04463319480419159,
-0.016697287559509277,
0.48730266094207764,
0.2475123554468155,
-0.04061730578541756,
0.052557382732629776,
-0.11991200596094131,
-0.09080676734447479,
-0.24119935929775238,
-0.010137056931853294,
0.10603164881467819,
0.12858586013317108,
-0.06924451887607574,
-0.26513412594795227,
-0.21649104356765747,
-0.5023368000984192,
-0.21063846349716187,
0.21955257654190063,
0.10517436265945435,
0.1284000724554062,
0.064239501953125,
0.03324189782142639,
0.022569913417100906,
-0.35357993841171265,
-0.40791329741477966,
-0.14177419245243073,
0.10359297692775726,
-0.2609596252441406,
0.23590043187141418,
0.004826676100492477,
-0.35990655422210693,
-0.09566053748130798,
0.22641710937023163,
0.18358878791332245,
0.09278200566768646,
0.314890593290329,
-0.1250021755695343,
0.07167699933052063,
0.45175570249557495,
0.10588033497333527,
-0.09202926605939865,
0.06544142216444016,
0.073043093085289,
-0.21463599801063538,
-0.08073849231004715,
-0.10297957807779312,
-0.5045248866081238,
-0.049303025007247925,
0.15910503268241882,
0.16796211898326874,
0.2293487787246704,
-0.031487904489040375,
0.1408950239419937,
0.5039725303649902,
-0.1939413696527481,
-0.05727396160364151,
-0.17013923823833466,
-0.026260968297719955,
-0.18988627195358276,
0.3036646544933319,
0.2773198187351227,
-0.401644766330719,
0.09226536750793457,
-0.7184799313545227,
-0.16774006187915802,
0.5405654907226562,
0.14763866364955902,
-0.0746159479022026,
0.2311374843120575,
-0.26274338364601135,
0.3361905813217163,
0.48538774251937866,
0.017970960587263107,
-0.036314792931079865,
0.5023655891418457,
0.11890998482704163,
0.10742569714784622,
0.333443820476532,
-0.08776962757110596,
0.14591141045093536,
-0.20631597936153412,
-0.052705079317092896,
0.2896369695663452,
-0.31835824251174927,
-0.3146226406097412,
-0.21228303015232086,
-0.17161352932453156,
0.0773966833949089,
0.16674552857875824,
0.28786981105804443,
0.1822900027036667,
0.06606683880090714,
0.10566171258687973,
0.19938117265701294,
-0.18416602909564972,
0.0943569615483284,
-0.04461175203323364,
0.3000200688838959,
0.23335805535316467,
-0.04686537757515907,
-0.10540944337844849,
-0.15513670444488525,
-0.029079973697662354,
-0.1268458068370819,
-0.012344986200332642,
0.2983875870704651,
-0.42012810707092285,
0.11186052113771439,
-0.14578871428966522,
-0.38800016045570374,
-0.13781365752220154,
0.04966399073600769,
-0.19142234325408936,
0.03738008067011833,
-0.38862380385398865,
-0.06873836368322372,
0.20474745333194733,
-0.28792521357536316,
0.4126656949520111,
-0.32395315170288086,
0.3116569519042969,
-0.142796128988266,
-0.043284717947244644,
-0.20283591747283936,
0.2716238498687744,
0.14596334099769592,
-0.2830008566379547,
-0.06441003829240799,
0.5136758685112,
0.291328102350235,
-0.24997763335704803,
-0.059897281229496,
-0.2693110704421997,
0.08354587107896805,
-0.15337182581424713,
0.042650770395994186,
0.031973011791706085,
-0.02706761658191681,
-0.051615532487630844,
0.14399263262748718,
0.4913005232810974,
0.366813063621521,
0.11045161634683609,
0.2624824643135071,
0.08640622347593307,
0.05055227875709534,
0.19224467873573303,
-0.025131959468126297,
-0.5075973272323608,
-0.14128746092319489,
-0.1288161277770996,
0.36693763732910156,
0.037243615835905075,
-0.23756958544254303,
0.12378554791212082,
0.33912959694862366,
-0.0939384400844574,
0.0564550943672657,
-0.002696774899959564,
0.032512366771698,
-0.03267534822225571,
0.19626852869987488,
0.6504374146461487,
0.46662062406539917,
0.16019925475120544,
0.18037693202495575,
0.20965346693992615,
-0.08586877584457397,
-0.14688369631767273,
0.33640286326408386,
0.2990989089012146,
0.13856849074363708,
-0.06140373647212982,
-0.33035337924957275,
0.06392353028059006,
-0.3187515139579773,
0.0926380604505539,
0.17019931972026825,
0.07574108242988586,
-0.272845059633255,
0.20274867117404938,
-0.25227856636047363,
0.11746247857809067,
-0.05071716755628586,
-0.08012167364358902,
-0.1913539171218872,
-0.35754266381263733,
0.03426313400268555,
0.0016134455800056458,
-0.29701390862464905,
0.16204673051834106,
-0.18612495064735413,
0.18825514614582062,
-0.12258162349462509,
0.023716170340776443,
0.04185888171195984,
0.3042150139808655,
-0.2979263365268707,
0.057803910225629807,
0.16507954895496368,
-0.1444491147994995,
0.3168366551399231,
-0.03936731070280075,
-0.1276976764202118,
-0.08117051422595978,
-0.5159487724304199,
0.2702007293701172,
-0.2245928794145584,
0.2663232684135437,
0.4786919057369232,
-0.4132232666015625,
0.04565294086933136,
-0.4948858320713043,
0.1087316945195198,
-0.15118210017681122,
-0.09252903610467911,
-0.05147195979952812,
-0.11129637062549591,
0.0948367565870285,
-0.35219115018844604,
-0.4680473506450653,
-0.11007628589868546,
-0.4203089475631714,
-0.12111446261405945,
-0.07681912183761597,
0.238184854388237,
0.1925923377275467,
-0.13644681870937347,
0.00296865776181221,
-0.028139689937233925,
-0.132253497838974,
-0.327067494392395,
0.015882376581430435,
0.2679441571235657,
-0.6211180686950684,
-0.10632839798927307,
0.044059086591005325,
-0.3742111921310425,
0.33532145619392395,
0.28402459621429443,
0.04607991874217987,
0.14194205403327942,
-0.19706767797470093,
-0.05222194641828537,
-0.15237724781036377,
0.06522414833307266,
0.1761888861656189,
0.14206793904304504,
0.026619983837008476,
-0.0661187618970871,
0.1303909868001938,
0.23738199472427368,
-0.11329738050699234,
0.2719256281852722,
-0.23288428783416748,
0.5564010739326477,
-0.05160555988550186,
1.0884464979171753,
-0.03055630996823311,
0.035857267677783966,
0.056173793971538544,
0.1555497795343399,
0.2330702692270279,
-0.057868726551532745,
-0.3012399673461914,
0.15010754764080048,
0.0013234466314315796,
-0.20803478360176086,
0.21802037954330444,
0.008280155248939991,
-0.29986992478370667,
-0.02094067446887493,
0.15389686822891235,
-0.0890190601348877,
-0.43301600217819214,
-0.1505630761384964,
-0.2020646631717682,
0.4340951144695282,
-0.03510919585824013,
0.4342504143714905,
0.0068663060665130615,
0.16457009315490723,
-0.3399643003940582,
0.37511032819747925,
0.3924174904823303,
-0.08463743329048157,
0.06664139032363892,
-0.006820078939199448,
-0.13740777969360352,
0.4405192732810974,
0.1433136910200119,
0.26458853483200073,
-0.09999056905508041,
-0.16890555620193481,
0.09111547470092773,
-0.10114522278308868,
0.37898099422454834,
-0.35058319568634033,
-0.2927839159965515,
0.19355928897857666,
-0.2848760485649109,
-0.2273978292942047,
-0.22696629166603088,
-0.18112404644489288,
0.03454948961734772,
0.07233735918998718,
-0.3326079845428467,
-0.3115488290786743,
-0.3117128014564514,
0.7352997064590454,
-0.1864841878414154,
-0.08025507628917694,
-0.15027150511741638,
-0.186609148979187,
-0.3156912922859192,
-0.20027951896190643,
-0.016922980546951294,
-0.038802534341812134,
0.03560464084148407,
-0.2930353581905365,
-0.13759002089500427,
-0.08352375030517578,
-0.13190388679504395,
0.23352229595184326,
0.018593162298202515,
0.22021484375,
-0.2994156777858734,
0.18879397213459015,
0.13807091116905212,
0.06922152638435364,
0.3746967911720276,
0.15566593408584595,
-0.1372116059064865,
-0.07001984119415283,
0.27345797419548035,
-0.1669098138809204,
0.5717335939407349,
0.37936145067214966,
-0.47992101311683655,
0.2568068504333496,
-0.04967688024044037,
0.09850376099348068,
-0.23076754808425903,
-0.11333414912223816,
0.42127928137779236,
-0.17206160724163055,
-0.13391220569610596,
-0.7076979279518127,
0.2136102020740509,
0.20300352573394775,
-0.10186022520065308,
0.23167762160301208,
0.22539229691028595,
-0.36115118861198425,
0.1966238170862198,
0.160946324467659,
0.8526101112365723,
0.40424132347106934,
0.14474493265151978,
0.37336477637290955,
0.10990853607654572,
0.15516865253448486,
-0.1633453667163849,
0.39535099267959595,
-0.2653314769268036,
-0.06914123892784119,
-0.1323762685060501,
-0.09144262969493866,
0.6105437278747559,
0.10514269769191742,
-0.11441493034362793,
0.37567275762557983,
-0.24762585759162903,
0.17863868176937103,
-0.016957847401499748,
0.148300901055336,
-0.35417428612709045,
-0.38956543803215027,
-0.026333242654800415,
0.07703375816345215,
0.1757497787475586,
0.08829361945390701,
-0.15674766898155212,
-0.1366119086742401,
0.02816503867506981,
-0.1252015084028244,
-0.12678304314613342,
0.1978612244129181,
-0.018866870552301407,
0.236222505569458,
-0.10481336712837219,
-0.31014519929885864,
0.6872695684432983,
-0.4096830189228058,
0.24755938351154327,
0.304944783449173,
0.0910269021987915,
0.1516876220703125,
-0.15852829813957214,
0.20086835324764252,
-0.11514471471309662,
0.02387591078877449,
0.4507102370262146,
0.006011147052049637,
0.09194812923669815,
-0.27010664343833923,
-0.1529843509197235,
-0.2632179856300354,
-0.3791462779045105,
-0.051137641072273254,
0.11800803244113922,
-0.43072620034217834,
0.2948971092700958,
0.2032589465379715,
-0.22466377913951874,
-0.3728600740432739,
0.0763261467218399,
-0.06998500227928162,
-0.35993242263793945,
0.13210003077983856,
-0.2497638612985611,
-0.020405709743499756,
-0.21844890713691711,
0.17189612984657288,
0.15930604934692383,
0.16388572752475739,
0.4034930169582367,
-0.15477028489112854,
-0.12025928497314453,
-0.302217960357666,
0.14502179622650146,
0.32768961787223816,
-0.12282606959342957,
0.3003813624382019,
-0.21188987791538239,
0.006112918257713318,
0.1101454421877861,
-0.11704540252685547,
-0.04472004622220993,
0.07933100312948227,
-0.22398877143859863,
-0.19217652082443237,
-0.08170261234045029,
-0.010356642305850983,
-0.21533407270908356,
0.1972702443599701,
-0.21680712699890137,
0.3763892650604248,
0.07182951271533966,
0.19365482032299042,
-0.22428423166275024,
-0.09890946000814438,
0.02029835619032383,
0.06778893619775772,
-0.02216079831123352,
-0.056873202323913574,
0.19304463267326355,
0.16252413392066956,
0.07697032392024994,
0.07965201139450073,
-0.3189263939857483,
-0.060413699597120285,
-0.21295052766799927,
0.18530257046222687,
0.11001823097467422,
-0.09662133455276489,
0.31255385279655457,
0.08876194059848785,
-0.37014085054397583,
-0.0990389883518219,
0.31608182191848755,
-0.2115386724472046,
0.11043918877840042,
0.11254756897687912,
0.19580259919166565,
0.13446107506752014,
-0.2702717185020447,
0.025054309517145157,
-0.10753525793552399,
0.3602887988090515,
0.1304396390914917,
0.14243780076503754,
-0.06978088617324829,
-0.08430250734090805,
0.18649837374687195,
0.053292885422706604,
0.2982028126716614,
-0.15321823954582214,
0.40533119440078735,
-0.1756361573934555,
-0.026646088808774948,
-0.05578995123505592,
0.38835304975509644,
0.4179706275463104,
0.21598200500011444,
-0.02876782976090908,
-0.04850960150361061,
0.0975499376654625,
-0.2621464431285858,
0.23145081102848053,
0.2486339807510376,
-0.09036275744438171,
0.1260383576154709,
0.36638525128364563,
0.21712136268615723,
0.30793288350105286,
-0.2600180506706238,
0.06923069804906845,
0.2204747349023819,
-0.16709645092487335,
0.49665242433547974,
0.6812312602996826,
-0.2562094032764435,
0.506624698638916,
0.4170609712600708,
-0.2192816436290741,
0.17629927396774292,
0.7710938453674316,
-0.10133420675992966,
0.5054677128791809,
0.006250767037272453,
0.08802285045385361,
0.5239155292510986,
-0.4708459973335266,
0.05059971660375595,
0.45790430903434753,
0.31243619322776794,
0.21886670589447021,
-0.230309396982193,
0.19095326960086823,
-0.4291228950023651,
-0.29887279868125916,
-0.20175571739673615,
0.06405621767044067,
-0.16324126720428467,
0.07221753895282745,
-0.2666558623313904,
-0.14774951338768005,
-0.4448676109313965,
-0.19850973784923553,
0.07937085628509521,
-0.19554825127124786,
0.16981947422027588,
-0.041035495698451996,
0.2174406200647354,
-0.07026989012956619,
0.2881234884262085,
-0.08341920375823975,
0.16043278574943542,
-0.2754333019256592,
0.12206503748893738,
0.013622723519802094,
-0.1374799758195877,
0.021209079772233963,
0.17514926195144653,
0.1924545168876648,
0.17036470770835876,
0.05143723264336586,
-0.410894513130188,
0.05936511233448982,
0.0014554057270288467,
0.04533660411834717,
0.21977128088474274,
-0.1882709562778473,
0.30919817090034485,
0.2778536379337311,
-0.007198825478553772,
-0.1041703149676323,
-0.08708453178405762,
0.14009322226047516,
0.10781171917915344,
-0.4092733860015869,
0.7780476212501526,
-0.029169932007789612,
-0.20097365975379944,
0.08572432398796082,
0.1971348226070404,
-0.2530081868171692,
-0.16706696152687073,
0.48852258920669556,
-0.10039472579956055,
-0.11850722879171371,
-0.1684749573469162,
0.038122039288282394,
0.2037205696105957,
0.40691885352134705,
-0.05005224421620369,
-0.13753679394721985,
-0.39415183663368225,
-0.17585864663124084,
-0.3969167470932007,
0.04594259709119797,
-0.2047019898891449,
0.2516385614871979,
-0.020550910383462906,
0.1873529553413391,
0.21092861890792847,
0.10794918984174728,
0.1958669126033783,
0.12780113518238068,
0.19902560114860535,
-0.08972078561782837,
-0.16321620345115662,
-0.09867282211780548,
-0.17237991094589233,
-0.3820716440677643,
-0.08784329891204834,
-0.5605083703994751,
-0.04321451112627983,
0.06417323648929596,
-0.18777000904083252,
0.16980622708797455,
-0.034658316522836685,
0.4984592795372009,
-0.3298732042312622,
0.3147025406360626,
0.33581796288490295,
0.37883004546165466,
-0.05621699243783951,
-0.17933006584644318,
0.0020495839416980743,
-0.2026621401309967,
-0.44123709201812744,
0.19634240865707397,
-0.18474486470222473,
0.23628774285316467,
-0.03987347334623337,
-0.21886934340000153,
-0.4237116277217865,
0.38215264678001404,
0.1402457356452942,
0.20525914430618286,
-0.4020426571369171,
0.5393438935279846,
-0.33294954895973206,
-0.020708199590444565,
0.628118097782135,
0.18077662587165833,
-0.152317076921463,
0.009607557207345963,
-0.3768947124481201,
-0.3352760970592499,
0.25488489866256714,
-0.18355348706245422,
-0.15989592671394348,
-0.399797260761261,
0.3308413624763489,
0.394873708486557,
-0.101162388920784,
-0.19357898831367493,
-0.3101695477962494,
0.23071829974651337,
-0.24430489540100098,
0.14887379109859467,
0.13992339372634888,
0.5106886625289917,
-0.30973681807518005,
-0.14695678651332855,
0.04485289752483368,
-0.14280760288238525,
-0.23397992551326752,
0.2674015462398529,
-0.23542192578315735
] |
https://github.com/huggingface/datasets/issues/5348 | The data downloaded in the download folder of the cache does not respect `umask` | note, that `datasets` already did some of that umask fixing in the past and also at the hub - the recent work on the hub about the same: https://github.com/huggingface/huggingface_hub/pull/1220
Also I noticed that each file has a .json counterpart and the latter always has the correct perms:
```
-rw------- 1 uue59kq cnw 173M Dec 9 01:37 537596e64721e2ae3d98785b91d30fda0360c196a8224e29658ad629e7303a4d
-rw-rw---- 1 uue59kq cnw 101 Dec 9 01:37 537596e64721e2ae3d98785b91d30fda0360c196a8224e29658ad629e7303a4d.json
```
so perhaps cheating is possible and syncing the perms between the 2 will do the trick. | ### Describe the bug
For a project on a cluster we are several users to share the same cache for the datasets library. And we have a problem with the permissions on the data downloaded in the cache.
Indeed, it seems that the data is downloaded by giving read and write permissions only to the user launching the command (and no permissions to the group). In our case, those permissions don't respect the `umask` of this user, which was `0007`.
Traceback:
```
Using custom data configuration default
Downloading and preparing dataset text_caps/default to /gpfswork/rech/cnw/commun/datasets/HuggingFaceM4___text_caps/default/1.0.0/2b9ad220cd90fcf2bfb454645bc54364711b83d6d39401ffdaf8cc40882e9141...
Downloading data files: 100%|████████████████████| 3/3 [00:00<00:00, 921.62it/s]
---------------------------------------------------------------------------
PermissionError Traceback (most recent call last)
Cell In [3], line 1
----> 1 ds = load_dataset(dataset_name)
File /gpfswork/rech/cnw/commun/conda/lucile-m4_3/lib/python3.8/site-packages/datasets/load.py:1746, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1743 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES
1745 # Download and prepare data
-> 1746 builder_instance.download_and_prepare(
1747 download_config=download_config,
1748 download_mode=download_mode,
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
1751 use_auth_token=use_auth_token,
1752 )
1754 # Build dataset for splits
1755 keep_in_memory = (
1756 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size)
1757 )
File /gpfswork/rech/cnw/commun/conda/lucile-m4_3/lib/python3.8/site-packages/datasets/builder.py:704, in DatasetBuilder.download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
702 logger.warning("HF google storage unreachable. Downloading and preparing it from source")
703 if not downloaded_from_gcs:
--> 704 self._download_and_prepare(
705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
708 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values())
File /gpfswork/rech/cnw/commun/conda/lucile-m4_3/lib/python3.8/site-packages/datasets/builder.py:1227, in GeneratorBasedBuilder._download_and_prepare(self, dl_manager, verify_infos)
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File /gpfswork/rech/cnw/commun/conda/lucile-m4_3/lib/python3.8/site-packages/datasets/builder.py:771, in DatasetBuilder._download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
769 split_dict = SplitDict(dataset_name=self.name)
770 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs)
--> 771 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
773 # Checksums verification
774 if verify_infos and dl_manager.record_checksums:
File /gpfswork/rech/cnw/commun/modules/datasets_modules/datasets/HuggingFaceM4--TextCaps/2b9ad220cd90fcf2bfb454645bc54364711b83d6d39401ffdaf8cc40882e9141/TextCaps.py:125, in TextCapsDataset._split_generators(self, dl_manager)
123 def _split_generators(self, dl_manager):
124 # urls = _URLS[self.config.name] # TODO later
--> 125 data_dir = dl_manager.download_and_extract(_URLS)
126 gen_kwargs = {
127 split_name: {
128 f"{dir_name}_path": Path(data_dir[dir_name][split_name])
(...)
133 for split_name in ["train", "val", "test"]
134 }
136 for split_name in ["train", "val", "test"]:
File /gpfswork/rech/cnw/commun/conda/lucile-m4_3/lib/python3.8/site-packages/datasets/download/download_manager.py:431, in DownloadManager.download_and_extract(self, url_or_urls)
415 def download_and_extract(self, url_or_urls):
416 """Download and extract given url_or_urls.
417
418 Is roughly equivalent to:
(...)
429 extracted_path(s): `str`, extracted paths of given URL(s).
430 """
--> 431 return self.extract(self.download(url_or_urls))
File /gpfswork/rech/cnw/commun/conda/lucile-m4_3/lib/python3.8/site-packages/datasets/download/download_manager.py:324, in DownloadManager.download(self, url_or_urls)
321 self.downloaded_paths.update(dict(zip(url_or_urls.flatten(), downloaded_path_or_paths.flatten())))
323 start_time = datetime.now()
--> 324 self._record_sizes_checksums(url_or_urls, downloaded_path_or_paths)
325 duration = datetime.now() - start_time
326 logger.info(f"Checksum Computation took {duration.total_seconds() // 60} min")
File /gpfswork/rech/cnw/commun/conda/lucile-m4_3/lib/python3.8/site-packages/datasets/download/download_manager.py:229, in DownloadManager._record_sizes_checksums(self, url_or_urls, downloaded_path_or_paths)
226 """Record size/checksum of downloaded files."""
227 for url, path in zip(url_or_urls.flatten(), downloaded_path_or_paths.flatten()):
228 # call str to support PathLike objects
--> 229 self._recorded_sizes_checksums[str(url)] = get_size_checksum_dict(
230 path, record_checksum=self.record_checksums
231 )
File /gpfswork/rech/cnw/commun/conda/lucile-m4_3/lib/python3.8/site-packages/datasets/utils/info_utils.py:82, in get_size_checksum_dict(path, record_checksum)
80 if record_checksum:
81 m = sha256()
---> 82 with open(path, "rb") as f:
83 for chunk in iter(lambda: f.read(1 << 20), b""):
84 m.update(chunk)
PermissionError: [Errno 13] Permission denied: '/gpfswork/rech/cnw/commun/datasets/downloads/1e6aa6d23190c30885194fabb193dce3874d902d7636b66315ee8aaa584e80d6'
```
### Steps to reproduce the bug
I think the following will reproduce the bug.
Given 2 users belonging to the same group with `umask` set to `0007`
- first run with User 1:
```python
from datasets import load_dataset
ds_name = "HuggingFaceM4/VQAv2"
ds = load_dataset(ds_name)
```
- then run with User 2:
```python
from datasets import load_dataset
ds_name = "HuggingFaceM4/TextCaps"
ds = load_dataset(ds_name)
```
### Expected behavior
No `PermissionError`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-4.18.0-305.65.1.el8_4.x86_64-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
| 83 | The data downloaded in the download folder of the cache does not respect `umask`
### Describe the bug
For a project on a cluster we are several users to share the same cache for the datasets library. And we have a problem with the permissions on the data downloaded in the cache.
Indeed, it seems that the data is downloaded by giving read and write permissions only to the user launching the command (and no permissions to the group). In our case, those permissions don't respect the `umask` of this user, which was `0007`.
Traceback:
```
Using custom data configuration default
Downloading and preparing dataset text_caps/default to /gpfswork/rech/cnw/commun/datasets/HuggingFaceM4___text_caps/default/1.0.0/2b9ad220cd90fcf2bfb454645bc54364711b83d6d39401ffdaf8cc40882e9141...
Downloading data files: 100%|████████████████████| 3/3 [00:00<00:00, 921.62it/s]
---------------------------------------------------------------------------
PermissionError Traceback (most recent call last)
Cell In [3], line 1
----> 1 ds = load_dataset(dataset_name)
File /gpfswork/rech/cnw/commun/conda/lucile-m4_3/lib/python3.8/site-packages/datasets/load.py:1746, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1743 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES
1745 # Download and prepare data
-> 1746 builder_instance.download_and_prepare(
1747 download_config=download_config,
1748 download_mode=download_mode,
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
1751 use_auth_token=use_auth_token,
1752 )
1754 # Build dataset for splits
1755 keep_in_memory = (
1756 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size)
1757 )
File /gpfswork/rech/cnw/commun/conda/lucile-m4_3/lib/python3.8/site-packages/datasets/builder.py:704, in DatasetBuilder.download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
702 logger.warning("HF google storage unreachable. Downloading and preparing it from source")
703 if not downloaded_from_gcs:
--> 704 self._download_and_prepare(
705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
708 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values())
File /gpfswork/rech/cnw/commun/conda/lucile-m4_3/lib/python3.8/site-packages/datasets/builder.py:1227, in GeneratorBasedBuilder._download_and_prepare(self, dl_manager, verify_infos)
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File /gpfswork/rech/cnw/commun/conda/lucile-m4_3/lib/python3.8/site-packages/datasets/builder.py:771, in DatasetBuilder._download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
769 split_dict = SplitDict(dataset_name=self.name)
770 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs)
--> 771 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
773 # Checksums verification
774 if verify_infos and dl_manager.record_checksums:
File /gpfswork/rech/cnw/commun/modules/datasets_modules/datasets/HuggingFaceM4--TextCaps/2b9ad220cd90fcf2bfb454645bc54364711b83d6d39401ffdaf8cc40882e9141/TextCaps.py:125, in TextCapsDataset._split_generators(self, dl_manager)
123 def _split_generators(self, dl_manager):
124 # urls = _URLS[self.config.name] # TODO later
--> 125 data_dir = dl_manager.download_and_extract(_URLS)
126 gen_kwargs = {
127 split_name: {
128 f"{dir_name}_path": Path(data_dir[dir_name][split_name])
(...)
133 for split_name in ["train", "val", "test"]
134 }
136 for split_name in ["train", "val", "test"]:
File /gpfswork/rech/cnw/commun/conda/lucile-m4_3/lib/python3.8/site-packages/datasets/download/download_manager.py:431, in DownloadManager.download_and_extract(self, url_or_urls)
415 def download_and_extract(self, url_or_urls):
416 """Download and extract given url_or_urls.
417
418 Is roughly equivalent to:
(...)
429 extracted_path(s): `str`, extracted paths of given URL(s).
430 """
--> 431 return self.extract(self.download(url_or_urls))
File /gpfswork/rech/cnw/commun/conda/lucile-m4_3/lib/python3.8/site-packages/datasets/download/download_manager.py:324, in DownloadManager.download(self, url_or_urls)
321 self.downloaded_paths.update(dict(zip(url_or_urls.flatten(), downloaded_path_or_paths.flatten())))
323 start_time = datetime.now()
--> 324 self._record_sizes_checksums(url_or_urls, downloaded_path_or_paths)
325 duration = datetime.now() - start_time
326 logger.info(f"Checksum Computation took {duration.total_seconds() // 60} min")
File /gpfswork/rech/cnw/commun/conda/lucile-m4_3/lib/python3.8/site-packages/datasets/download/download_manager.py:229, in DownloadManager._record_sizes_checksums(self, url_or_urls, downloaded_path_or_paths)
226 """Record size/checksum of downloaded files."""
227 for url, path in zip(url_or_urls.flatten(), downloaded_path_or_paths.flatten()):
228 # call str to support PathLike objects
--> 229 self._recorded_sizes_checksums[str(url)] = get_size_checksum_dict(
230 path, record_checksum=self.record_checksums
231 )
File /gpfswork/rech/cnw/commun/conda/lucile-m4_3/lib/python3.8/site-packages/datasets/utils/info_utils.py:82, in get_size_checksum_dict(path, record_checksum)
80 if record_checksum:
81 m = sha256()
---> 82 with open(path, "rb") as f:
83 for chunk in iter(lambda: f.read(1 << 20), b""):
84 m.update(chunk)
PermissionError: [Errno 13] Permission denied: '/gpfswork/rech/cnw/commun/datasets/downloads/1e6aa6d23190c30885194fabb193dce3874d902d7636b66315ee8aaa584e80d6'
```
### Steps to reproduce the bug
I think the following will reproduce the bug.
Given 2 users belonging to the same group with `umask` set to `0007`
- first run with User 1:
```python
from datasets import load_dataset
ds_name = "HuggingFaceM4/VQAv2"
ds = load_dataset(ds_name)
```
- then run with User 2:
```python
from datasets import load_dataset
ds_name = "HuggingFaceM4/TextCaps"
ds = load_dataset(ds_name)
```
### Expected behavior
No `PermissionError`
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-4.18.0-305.65.1.el8_4.x86_64-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
note, that `datasets` already did some of that umask fixing in the past and also at the hub - the recent work on the hub about the same: https://github.com/huggingface/huggingface_hub/pull/1220
Also I noticed that each file has a .json counterpart and the latter always has the correct perms:
```
-rw------- 1 uue59kq cnw 173M Dec 9 01:37 537596e64721e2ae3d98785b91d30fda0360c196a8224e29658ad629e7303a4d
-rw-rw---- 1 uue59kq cnw 101 Dec 9 01:37 537596e64721e2ae3d98785b91d30fda0360c196a8224e29658ad629e7303a4d.json
```
so perhaps cheating is possible and syncing the perms between the 2 will do the trick. | [
-0.1972023993730545,
0.027057796716690063,
-0.08662961423397064,
0.48268598318099976,
-0.04362930357456207,
0.05101991444826126,
0.1399836391210556,
-0.007853228598833084,
0.26428234577178955,
0.04169786721467972,
-0.23669764399528503,
-0.07197105139493942,
-0.10369154065847397,
-0.45356589555740356,
-0.24293872714042664,
0.15647774934768677,
0.06381189823150635,
-0.24736130237579346,
-0.003178313374519348,
-0.0336582213640213,
-0.2299353927373886,
0.18951207399368286,
-0.020155012607574463,
-0.0007063969969749451,
-0.13933627307415009,
-0.1646844744682312,
0.09505541622638702,
0.14802022278308868,
-0.20597074925899506,
-0.14652428030967712,
0.4332580864429474,
0.41801995038986206,
0.352982759475708,
0.4735948145389557,
-0.00011618853022810072,
-0.25133922696113586,
0.20169822871685028,
0.038525670766830444,
-0.30191701650619507,
0.07812357693910599,
0.29645538330078125,
-0.10274717211723328,
-0.06707161664962769,
-0.0799175426363945,
-0.044404253363609314,
0.46061602234840393,
-0.025722896680235863,
-0.4783792793750763,
0.005679421126842499,
0.016446709632873535,
0.17788873612880707,
-0.013147987425327301,
-0.21277585625648499,
0.08672388643026352,
0.35025539994239807,
0.03159387409687042,
-0.22117871046066284,
0.20692580938339233,
0.36252647638320923,
0.14175181090831757,
-0.008551090955734253,
0.17608894407749176,
-0.3443616032600403,
0.1982460618019104,
0.02875722572207451,
-0.2464786022901535,
-0.10213422030210495,
-0.20396289229393005,
0.02840021252632141,
0.0572628416121006,
0.8686292171478271,
-0.10434550791978836,
-0.5552564263343811,
-0.04746926948428154,
0.10301768034696579,
0.033721923828125,
0.2625591456890106,
0.3234802186489105,
-0.16720756888389587,
0.4125412702560425,
-0.2515197992324829,
0.135048970580101,
0.008877918124198914,
0.12066853046417236,
-0.17585723102092743,
0.1713358461856842,
-0.10757265239953995,
0.07940538972616196,
-0.18805156648159027,
-0.10869674384593964,
0.5334787368774414,
-0.1887296736240387,
-0.1283208131790161,
0.27872055768966675,
-0.27242034673690796,
0.11612410843372345,
-0.23867464065551758,
0.5855545401573181,
0.2772179841995239,
0.5180726051330566,
0.02309184893965721,
0.17921027541160583,
-0.07598546892404556,
0.17938748002052307,
0.05213868245482445,
0.15999957919120789,
0.10078461468219757,
0.36866065859794617,
0.3857654929161072,
0.055417705327272415,
-0.03626847639679909,
-0.1428585648536682,
-0.01651948131620884,
-0.21599574387073517,
0.10313433408737183,
0.16265657544136047,
0.14021164178848267,
-0.1359182447195053,
-0.04384313151240349,
0.12989817559719086,
-0.03201258182525635,
0.09630221128463745,
0.1663442999124527,
0.2011573165655136,
-0.08792827278375626,
0.2332058846950531,
0.13688385486602783,
0.25623202323913574,
0.0064885057508945465,
-0.11477706581354141,
-0.23492473363876343,
-0.2623240351676941,
-0.1639031022787094,
0.3763682544231415,
0.21783439815044403,
0.0707811713218689,
0.1276150345802307,
0.06909134238958359,
0.008895058184862137,
-0.29330700635910034,
0.2507544457912445,
-0.22961734235286713,
0.15853771567344666,
0.2821219861507416,
0.2010723501443863,
0.4970249831676483,
0.10516788065433502,
-0.041420988738536835,
-0.05152798816561699,
0.26672062277793884,
-0.33806300163269043,
-0.19417421519756317,
0.2010650336742401,
0.11662723124027252,
-0.38015973567962646,
0.19901786744594574,
-0.16331571340560913,
-0.3050694465637207,
0.3134583532810211,
-0.060044847428798676,
0.5905333757400513,
-0.04324917495250702,
-0.09304086863994598,
-0.41426515579223633,
-0.13762874901294708,
0.6748403906822205,
-0.05998020991683006,
-0.014724958688020706,
-0.3159666359424591,
0.012383355759084225,
0.17178446054458618,
0.575299859046936,
0.13218960165977478,
-0.14587941765785217,
-0.3165280222892761,
0.2384856790304184,
0.3629327416419983,
-0.5184487104415894,
-0.8078792691230774,
0.28881290555000305,
0.07529617846012115,
0.3452054560184479,
0.3645271360874176,
0.31475886702537537,
-0.05531110614538193,
-0.19118016958236694,
0.10931795835494995,
0.28904640674591064,
0.14481213688850403,
-0.014418104663491249,
-0.09509706497192383,
-0.2679171562194824,
0.08653615415096283,
0.027848590165376663,
-0.0518377311527729,
0.12173260748386383,
0.29752469062805176,
-0.29570093750953674,
0.4270744323730469,
-0.12357833981513977,
0.11987201869487762,
0.41595160961151123,
0.31053653359413147,
0.20370522141456604,
0.030712127685546875,
0.03140125423669815,
-0.2401888370513916,
0.2785954773426056,
-0.08851093053817749,
-0.2839720845222473,
-0.23986093699932098,
-0.38789045810699463,
-0.1774236559867859,
-0.03398102894425392,
-0.16774015128612518,
-0.1124296486377716,
0.0610106885433197,
0.136140376329422,
-0.03231936693191528,
-0.0468924343585968,
0.1902855932712555,
0.5457412600517273,
-0.07925833016633987,
0.2767833471298218,
-0.10090960562229156,
0.08460983633995056,
-0.10237372666597366,
-0.12820091843605042,
-0.1442885398864746,
-0.03268064558506012,
0.535531222820282,
0.012810571119189262,
-0.1088590994477272,
0.5318294167518616,
0.27944350242614746,
0.03210590034723282,
-0.37071704864501953,
0.04911445081233978,
0.11745382100343704,
0.10250571370124817,
0.034879185259342194,
-0.033165860921144485,
0.056389372795820236,
-0.01815427839756012,
-0.08135730773210526,
0.425472617149353,
0.00845332071185112,
-0.20139458775520325,
-0.38734549283981323,
0.1678520143032074,
0.3067794740200043,
0.06656232476234436,
-0.002029912546277046,
0.011290326714515686,
0.27751436829566956,
0.05864301323890686,
0.43043091893196106,
-0.09341634064912796,
0.15863241255283356,
0.01582600176334381,
0.09228883683681488,
0.004598870873451233,
0.21315574645996094,
-0.013475801795721054,
-0.04655104875564575,
0.051823124289512634,
0.22926846146583557,
0.20118080079555511,
0.5156009197235107,
-0.01649516448378563,
0.3254025876522064,
0.03788924217224121,
0.48399415612220764,
-0.21085824072360992,
-0.08577541261911392,
-0.09818150103092194,
-0.34574249386787415,
0.07096715271472931,
-0.10504665225744247,
0.07964444160461426,
-0.14551019668579102,
0.09274272620677948,
0.13803066313266754,
0.33839961886405945,
-0.35926419496536255,
0.036664433777332306,
-0.06049315631389618,
-0.2353091835975647,
0.20604833960533142,
-0.0556456632912159,
-0.44502750039100647,
-0.13727042078971863,
-0.3300521969795227,
0.4670881927013397,
0.020435642451047897,
0.038285404443740845,
-0.2048497349023819,
0.15285788476467133,
-0.0691707581281662,
-0.005681069567799568,
-0.5171022415161133,
0.1649710237979889,
0.009813714772462845,
-0.0069911666214466095,
0.1002422496676445,
-0.40848228335380554,
-0.00037913955748081207,
-0.04453113302588463,
0.35107314586639404,
-0.502079427242279,
-0.20837253332138062,
-0.11502894759178162,
0.28332701325416565,
0.08747867494821548,
-0.032492488622665405,
-0.07760870456695557,
-0.024454304948449135,
-0.16256648302078247,
-0.06089756637811661,
-0.4329153895378113,
-0.13685385882854462,
0.0638510137796402,
0.05089576542377472,
-0.2116808444261551,
-0.11612701416015625,
0.19612601399421692,
-0.4687429964542389,
-0.288971483707428,
0.3089081346988678,
0.3657910227775574,
0.12349474430084229,
-0.2543972432613373,
-0.18083839118480682,
-0.3013113737106323,
0.11083701252937317,
-0.08376538008451462,
-0.4289228022098541,
-0.5498049259185791,
0.2793080508708954,
-0.3804311156272888,
-0.2218964844942093,
-0.08614558726549149,
0.21550892293453217,
0.185209721326828,
0.47889769077301025,
-0.16082146763801575,
-0.10840880870819092,
-0.26742878556251526,
0.2863330543041229,
-0.1739223450422287,
-0.0022288523614406586,
-0.06009840965270996,
-0.17958477139472961,
0.14270365238189697,
-0.10727955400943756,
-0.12169340252876282,
-0.2343287169933319,
-0.055137768387794495,
-0.016939200460910797,
-0.23105642199516296,
-0.06070322543382645,
0.2964578866958618,
0.27076971530914307,
0.31059524416923523,
0.31165215373039246,
0.2658787667751312,
0.4170607626438141,
0.5718082785606384,
0.2537451684474945,
0.09183652698993683,
0.14038926362991333,
-0.08250871300697327,
-0.08982917666435242,
0.30011117458343506,
0.1668502688407898,
-0.21001793444156647,
0.08783268928527832,
-0.24379169940948486,
-0.3821718394756317,
-0.377258837223053,
-0.20701275765895844,
-0.30013608932495117,
0.062416449189186096,
-0.05208849906921387,
0.1303245723247528,
-0.33414575457572937,
-0.29316696524620056,
0.17218323051929474,
0.6338092684745789,
-0.07444889098405838,
0.37737980484962463,
-0.4094843864440918,
0.1982092708349228,
-0.24365326762199402,
0.36275821924209595,
0.012962788343429565,
0.5372931957244873,
-0.07212472707033157,
0.3213677704334259,
0.14559823274612427,
0.1703854352235794,
0.5397516489028931,
-0.6274315714836121,
0.37340378761291504,
-0.021680662408471107,
0.2228083312511444,
-0.10223475098609924,
-0.21870853006839752,
0.030770760029554367,
0.36298030614852905,
0.13257481157779694,
0.2153540849685669,
-0.0850849375128746,
-0.04408653825521469,
-0.3312743902206421,
-0.2840326726436615,
-0.10943566262722015,
-0.42692476511001587,
-0.016286995261907578,
-0.2985037863254547,
-0.010526961646974087,
0.0368695892393589,
0.33256906270980835,
-0.12340719997882843,
-0.1585693508386612,
-0.02489348128437996,
-0.25394341349601746,
0.38044169545173645,
0.023570209741592407,
-0.31119629740715027,
0.2868349850177765,
-0.07189431041479111,
-0.21393872797489166,
0.01647077314555645,
-0.24024102091789246,
0.21860934793949127,
0.5262219309806824,
-0.038990143686532974,
0.07872701436281204,
0.01319426205009222,
-0.22563575208187103,
-0.082295261323452,
0.15347035229206085,
-0.19896474480628967,
0.16188159584999084,
0.08743163198232651,
-0.033334240317344666,
0.14008282124996185,
-0.1790654957294464,
-0.022888878360390663,
-0.03661506995558739,
-0.1549571454524994,
-0.5800411105155945,
0.2611916661262512,
0.47184237837791443,
-0.23750625550746918,
0.2458781599998474,
0.046311527490615845,
-0.22178809344768524,
0.22790344059467316,
0.06790082901716232,
0.864040732383728,
-0.05387669801712036,
0.17372047901153564,
-0.04900890588760376,
-0.4558064341545105,
0.4507279396057129,
-0.43232637643814087,
0.03238915279507637,
-0.44752782583236694,
-0.2807689905166626,
-0.17836320400238037,
-0.1285407841205597,
0.2834784984588623,
0.24775077402591705,
-0.020699623972177505,
0.10667850822210312,
-0.3007497787475586,
-0.2061125636100769,
0.07549078017473221,
-0.039414823055267334,
-0.5421895980834961,
0.047295473515987396,
0.197163924574852,
0.15934859216213226,
-0.2888256311416626,
0.403193861246109,
-0.19600877165794373,
-0.015636418014764786,
-0.21793964505195618,
0.005522642284631729,
-0.32730016112327576,
0.11002751439809799,
-0.5139740705490112,
0.07038070261478424,
-0.0060549527406692505,
-0.20405229926109314,
0.06590579450130463,
0.24274715781211853,
0.45814311504364014,
0.1350507140159607,
-0.14561349153518677,
0.2391984462738037,
0.1826748251914978,
0.04186030849814415,
0.17398817837238312,
-0.03222108632326126,
0.21961653232574463,
0.11964885145425797,
0.10135983675718307,
-0.2458750307559967,
0.03028683364391327,
-0.33727091550827026,
0.16626286506652832,
-0.03730681538581848,
0.1344914436340332,
-0.44377315044403076,
-0.17749691009521484,
-0.333700567483902,
-0.1823520064353943,
0.03688078746199608,
0.05343122407793999,
0.3018784821033478,
-0.13486814498901367,
0.3501162827014923,
-0.20271800458431244,
-0.3341171443462372,
-0.04646715894341469,
0.8049699068069458,
-0.0882473737001419,
-0.17326414585113525,
0.13487279415130615,
-0.12338176369667053,
-0.24614344537258148,
-0.048815835267305374,
-0.24165049195289612,
0.08814757317304611,
-0.5263214707374573,
-0.11819874495267868,
-0.18906983733177185,
0.04748235642910004,
0.273345023393631,
-0.3503045439720154,
0.35429614782333374,
0.006799370050430298,
-0.008723989129066467,
-0.39111459255218506,
-0.08502469956874847,
-0.2254742830991745,
-0.05823272839188576,
-0.0771714299917221,
0.04629148542881012,
-0.44414806365966797,
0.03416414558887482,
-0.04203411191701889,
-0.2238767147064209,
-0.05165649950504303,
-0.2610607445240021,
-0.1384553611278534,
0.16715788841247559,
-0.04540602117776871,
-0.13274680078029633,
-0.09097060561180115,
-0.05499795079231262,
-0.052540332078933716,
-0.22099865972995758,
-0.12777867913246155,
-0.09856002032756805,
0.1346513032913208,
0.2515682578086853,
-0.23838719725608826,
0.006701433099806309,
-0.3284226655960083,
0.1028878390789032,
-0.18587824702262878,
0.09635208547115326,
0.5443841814994812,
0.13213759660720825,
0.25212913751602173,
0.023939840495586395,
0.2912108600139618,
-0.5729950666427612,
0.31124013662338257,
-0.3148627281188965,
-0.3237208127975464,
-0.1361379623413086,
0.17117445170879364,
-0.10510901361703873,
-0.06258316338062286,
0.1526874303817749,
-0.22401946783065796,
0.18527904152870178,
0.15937979519367218,
0.4138166606426239,
-0.21563799679279327,
0.06840246915817261,
0.11419069766998291,
0.1807740181684494,
-0.04109770059585571,
-0.18454411625862122,
-0.2368338257074356,
0.18100407719612122,
0.11668919771909714,
0.06331491470336914,
-0.4606046974658966,
-0.09987589716911316,
0.019735926762223244,
-0.1570907086133957,
0.2543505132198334,
0.3093409538269043,
-0.40983936190605164,
-0.0027311816811561584,
-0.07469393312931061,
0.6930357217788696,
-0.06514845788478851,
0.1913735717535019,
0.2118530124425888,
0.07616919279098511,
0.1417142152786255,
0.34577998518943787,
0.31188490986824036,
0.0652952715754509,
0.24790556728839874,
0.08714805543422699,
0.061333589255809784,
0.05280037224292755,
-0.22209572792053223,
0.008390247821807861,
-0.5587610602378845,
0.054580770432949066,
0.07864203304052353,
0.020865052938461304,
0.12410545349121094,
-0.046323031187057495,
-0.10088392347097397,
-0.10259432345628738,
-0.10941320657730103,
-0.047479428350925446,
-0.34029290080070496,
-0.18030253052711487,
0.041628241539001465,
-0.02536025643348694,
0.06788752228021622,
-0.13938841223716736,
-0.27504196763038635,
-0.3678571879863739,
-0.15686984360218048,
0.15660028159618378,
0.18381862342357635,
-0.006045319139957428,
-0.11641475558280945,
-0.23151308298110962,
0.19929012656211853,
-0.05313123017549515,
-0.40202614665031433,
0.06859000027179718,
-0.07512055337429047,
-0.09470058977603912,
0.2656290829181671,
-0.06013882905244827,
0.3806307315826416,
0.2301275134086609,
0.16809144616127014,
0.17293216288089752,
0.2298959493637085,
0.043170154094696045,
-0.12295477092266083,
0.23955243825912476,
-0.031262949109077454,
-0.008097026497125626,
0.11865578591823578,
0.13136214017868042,
-0.1316172331571579,
0.06458140909671783,
0.02918478660285473,
-0.10994043946266174,
-0.26456645131111145,
0.3157386779785156,
-0.3306244909763336,
-0.4001561999320984,
-0.07444857805967331,
-0.10787249356508255,
-0.08801548182964325,
0.10567827522754669,
0.32059627771377563,
-0.045150965452194214,
0.2377311885356903,
-0.21630917489528656,
0.010614238679409027,
0.3448145091533661,
0.38253986835479736,
0.50274258852005,
-0.2659970223903656,
-0.1725054830312729,
-0.17528164386749268,
-0.5822248458862305,
0.4070846438407898,
0.035925596952438354,
-0.004153067246079445,
0.17379692196846008,
-0.030192513018846512,
-0.06697560101747513,
0.034076109528541565,
0.019416846334934235,
0.14660419523715973,
-0.014415114186704159,
0.2951597571372986,
-0.2583281695842743,
-0.18990656733512878,
0.058942489326000214,
-0.025277407839894295,
0.05487307161092758,
-0.47747841477394104,
0.30937659740448,
-0.176035076379776,
0.041311293840408325,
-0.09584753960371017,
-0.08292249590158463,
0.09754030406475067,
0.359631210565567,
0.3733346462249756,
0.14119552075862885,
0.24834726750850677,
0.0832231193780899,
0.21284671127796173,
-0.27497145533561707,
0.07900488376617432,
-0.24733778834342957,
-0.013994395732879639,
-0.24048098921775818,
0.25748783349990845,
-0.24615566432476044,
-0.09317514300346375,
-0.2542243003845215,
0.30270513892173767,
0.15470997989177704,
0.34287533164024353,
0.09852584451436996,
0.20557764172554016,
-0.3114576041698456,
0.10259702056646347,
0.4232426881790161,
0.184545636177063,
-0.05893941968679428,
0.37283945083618164,
-0.38459283113479614,
-0.30398645997047424,
0.42739468812942505,
-0.28639188408851624,
-0.03652967885136604,
-0.013013321906328201,
0.554327666759491,
0.1718621701002121,
-0.18499970436096191,
0.07595814019441605,
0.3288632333278656,
0.3959682881832123,
-0.13489702343940735,
-0.06801915168762207,
0.10607664287090302,
-0.24966350197792053,
-0.06507951766252518,
-0.01665561832487583,
0.27550220489501953,
0.18550953269004822,
-0.17634284496307373,
0.23198172450065613,
-0.18014948070049286
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.