html_url
stringlengths 51
51
| comments
stringlengths 67
24.7k
| title
stringlengths 6
280
| body
stringlengths 51
36.2k
| comment_length
int64 16
1.45k
| text
stringlengths 190
38.3k
| embeddings
sequence |
---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/6638 | Looks like it works with latest datasets repository
```
- `datasets` version: 2.16.2.dev0
- Platform: Linux-5.15.0-92-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- `huggingface_hub` version: 0.20.3
- PyArrow version: 15.0.0
- Pandas version: 2.0.1
- `fsspec` version: 2023.10.0
```
Could you explain which is the minimum version that fixes this?
Edit: Looks like that's 2.16.0, will close out issue | Cannot download wmt16 dataset | ### Describe the bug
As of this morning (PST) 2/1/2024, seeing the wmt16 dataset is missing from opus , could you suggest an alternative?
```
Downloading data files: 0%| | 0/4 [00:00<?, ?it/s]Traceback (most recent call last):
File "test.py", line 2, in <module>
raw_datasets = load_dataset("wmt16","ro-en",split="train")
File "/usr/local/lib/python3.8/dist-packages/datasets/load.py", line 2153, in load_dataset
builder_instance.download_and_prepare(
File "/usr/local/lib/python3.8/dist-packages/datasets/builder.py", line 954, in download_and_prepare
self._download_and_prepare(
File "/usr/local/lib/python3.8/dist-packages/datasets/builder.py", line 1717, in _download_and_prepare
super()._download_and_prepare(
File "/usr/local/lib/python3.8/dist-packages/datasets/builder.py", line 1027, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/root/.cache/huggingface/modules/datasets_modules/datasets/wmt16/746749a11d25c02058042da7502d973ff410e73457f3d305fc1177dc0e8c4227/wmt_utils.py", line 754, in _split_generators
downloaded_files = dl_manager.download_and_extract(urls_to_download)
File "/usr/local/lib/python3.8/dist-packages/datasets/download/download_manager.py", line 565, in download_and_extract
return self.extract(self.download(url_or_urls))
File "/usr/local/lib/python3.8/dist-packages/datasets/download/download_manager.py", line 428, in download
downloaded_path_or_paths = map_nested(
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 464, in map_nested
mapped = [
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 465, in <listcomp>
_single_map_nested((function, obj, types, None, True, None))
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 384, in _single_map_nested
mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar]
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 384, in <listcomp>
mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar]
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 367, in _single_map_nested
return function(data_struct)
File "/usr/local/lib/python3.8/dist-packages/datasets/download/download_manager.py", line 454, in _download
return cached_path(url_or_filename, download_config=download_config)
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/file_utils.py", line 182, in cached_path
output_path = get_from_cache(
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/file_utils.py", line 596, in get_from_cache
raise FileNotFoundError(f"Couldn't find file at {url}")
FileNotFoundError: Couldn't find file at https://opus.nlpl.eu/download.php?f=SETIMES/v2/tmx/en-ro.tmx.gz
```
### Steps to reproduce the bug
```
from datasets import load_dataset
raw_datasets = load_dataset("wmt16","ro-en",split="train")
```
### Expected behavior
Expect the dataset to be downloaded/ at least a clean exit with error explaining dataset is missing and a suggestion for next steps
### Environment info
- `datasets` version: 2.14.7
- Platform: Linux-5.15.0-92-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.17.3
- PyArrow version: 15.0.0
- Pandas version: 2.0.1
| 57 | Cannot download wmt16 dataset
### Describe the bug
As of this morning (PST) 2/1/2024, seeing the wmt16 dataset is missing from opus , could you suggest an alternative?
```
Downloading data files: 0%| | 0/4 [00:00<?, ?it/s]Traceback (most recent call last):
File "test.py", line 2, in <module>
raw_datasets = load_dataset("wmt16","ro-en",split="train")
File "/usr/local/lib/python3.8/dist-packages/datasets/load.py", line 2153, in load_dataset
builder_instance.download_and_prepare(
File "/usr/local/lib/python3.8/dist-packages/datasets/builder.py", line 954, in download_and_prepare
self._download_and_prepare(
File "/usr/local/lib/python3.8/dist-packages/datasets/builder.py", line 1717, in _download_and_prepare
super()._download_and_prepare(
File "/usr/local/lib/python3.8/dist-packages/datasets/builder.py", line 1027, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/root/.cache/huggingface/modules/datasets_modules/datasets/wmt16/746749a11d25c02058042da7502d973ff410e73457f3d305fc1177dc0e8c4227/wmt_utils.py", line 754, in _split_generators
downloaded_files = dl_manager.download_and_extract(urls_to_download)
File "/usr/local/lib/python3.8/dist-packages/datasets/download/download_manager.py", line 565, in download_and_extract
return self.extract(self.download(url_or_urls))
File "/usr/local/lib/python3.8/dist-packages/datasets/download/download_manager.py", line 428, in download
downloaded_path_or_paths = map_nested(
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 464, in map_nested
mapped = [
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 465, in <listcomp>
_single_map_nested((function, obj, types, None, True, None))
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 384, in _single_map_nested
mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar]
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 384, in <listcomp>
mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar]
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 367, in _single_map_nested
return function(data_struct)
File "/usr/local/lib/python3.8/dist-packages/datasets/download/download_manager.py", line 454, in _download
return cached_path(url_or_filename, download_config=download_config)
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/file_utils.py", line 182, in cached_path
output_path = get_from_cache(
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/file_utils.py", line 596, in get_from_cache
raise FileNotFoundError(f"Couldn't find file at {url}")
FileNotFoundError: Couldn't find file at https://opus.nlpl.eu/download.php?f=SETIMES/v2/tmx/en-ro.tmx.gz
```
### Steps to reproduce the bug
```
from datasets import load_dataset
raw_datasets = load_dataset("wmt16","ro-en",split="train")
```
### Expected behavior
Expect the dataset to be downloaded/ at least a clean exit with error explaining dataset is missing and a suggestion for next steps
### Environment info
- `datasets` version: 2.14.7
- Platform: Linux-5.15.0-92-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.17.3
- PyArrow version: 15.0.0
- Pandas version: 2.0.1
Looks like it works with latest datasets repository
```
- `datasets` version: 2.16.2.dev0
- Platform: Linux-5.15.0-92-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- `huggingface_hub` version: 0.20.3
- PyArrow version: 15.0.0
- Pandas version: 2.0.1
- `fsspec` version: 2023.10.0
```
Could you explain which is the minimum version that fixes this?
Edit: Looks like that's 2.16.0, will close out issue | [
-0.36052435636520386,
0.317926287651062,
-0.002050556242465973,
0.38708245754241943,
0.4038749039173126,
0.11385878920555115,
0.2532888948917389,
0.20784994959831238,
-0.027222130447626114,
0.21313440799713135,
0.026451997458934784,
0.03987692669034004,
-0.3029175102710724,
0.040763065218925476,
0.31888723373413086,
-0.1025252416729927,
-0.04760010167956352,
0.14544767141342163,
-0.681085467338562,
-0.021854877471923828,
-0.39371827244758606,
0.04465974122285843,
-0.19849680364131927,
-0.12580342590808868,
0.09383539855480194,
0.10055328905582428,
-0.16295811533927917,
0.15399499237537384,
-0.38727134466171265,
-0.36015573143959045,
0.27366510033607483,
-0.02034168690443039,
0.015924938023090363,
0.3857197165489197,
-0.0001130660020862706,
0.08519972860813141,
0.14452162384986877,
-0.10201624780893326,
-0.19559814035892487,
-0.3037537932395935,
-0.3311106562614441,
-0.1036369726061821,
-0.15824337303638458,
0.06927962601184845,
-0.24550971388816833,
-0.055901795625686646,
-0.18517820537090302,
-0.5401483774185181,
-0.016727354377508163,
0.42170268297195435,
0.23550038039684296,
0.484872430562973,
0.35655486583709717,
-0.2649945914745331,
0.2638974189758301,
0.08156862109899521,
-0.12339821457862854,
-0.1918424814939499,
0.27871453762054443,
-0.10150211304426193,
0.2279515117406845,
0.18325337767601013,
0.017423465847969055,
0.1436951756477356,
0.20806071162223816,
0.04344392195343971,
0.2050970494747162,
-0.28204482793807983,
0.2262723296880722,
0.29122257232666016,
0.4240016043186188,
0.09453783929347992,
-0.26550546288490295,
0.10446406900882721,
0.04568328335881233,
-0.8138516545295715,
0.16890345513820648,
0.3360201120376587,
0.045869600027799606,
0.160896435379982,
-0.09935765713453293,
0.12913590669631958,
-0.010949559509754181,
0.19396920502185822,
-0.08163818717002869,
0.29255780577659607,
0.04062768816947937,
0.05127301067113876,
0.14542195200920105,
-0.09675976634025574,
0.04531024023890495,
-0.08745452016592026,
0.035761479288339615,
0.3617963194847107,
-0.2636680006980896,
0.17469875514507294,
0.04791216552257538,
0.17806598544120789,
0.13792447745800018,
0.12443238496780396,
-0.2301606684923172,
-0.14308272302150726,
0.15823215246200562,
-0.24341677129268646,
0.37003225088119507,
-0.1312004178762436,
-0.400727242231369,
-0.20608839392662048,
0.2326180785894394,
0.3219103515148163,
0.23010516166687012,
-0.06361816823482513,
0.1047496497631073,
-0.2295609563589096,
0.04944990575313568,
-0.022846248000860214,
0.28195181488990784,
-0.05631207302212715,
-0.28039097785949707,
0.025094978511333466,
0.1288427859544754,
-0.14529109001159668,
0.018505088984966278,
0.18536239862442017,
-0.09285268187522888,
0.33846819400787354,
0.21600337326526642,
0.07964572310447693,
-0.20634523034095764,
-0.21399661898612976,
-0.227199524641037,
-0.13588941097259521,
-0.046290650963783264,
0.0036794431507587433,
0.3561675548553467,
-0.07296943664550781,
0.22682107985019684,
0.12110622227191925,
-0.14704562723636627,
-0.12097116559743881,
-0.09337835758924484,
-0.11293669044971466,
0.09954296052455902,
0.4110374450683594,
0.08147472888231277,
0.15208283066749573,
-0.050447236746549606,
0.14584259688854218,
-0.032392971217632294,
0.18502628803253174,
0.07762625068426132,
-0.3643757402896881,
-0.16982623934745789,
0.2770959436893463,
-0.14592251181602478,
0.02576773799955845,
0.11087282001972198,
-0.17097881436347961,
-0.2616032361984253,
0.12307314574718475,
-0.12111534923315048,
-0.14929582178592682,
-0.16370312869548798,
-0.10787604749202728,
0.45133689045906067,
0.4419046640396118,
0.0882568433880806,
-0.03239230066537857,
-0.6517634391784668,
-0.1498183012008667,
0.20000171661376953,
0.1622234284877777,
-0.2046852707862854,
0.02917708456516266,
-0.27312731742858887,
-0.12635564804077148,
0.37148454785346985,
-0.3860093951225281,
-0.5101290941238403,
-0.12777788937091827,
-0.21607929468154907,
0.0599537268280983,
-0.038483619689941406,
0.15600261092185974,
0.42113348841667175,
-0.05334126949310303,
0.33788198232650757,
0.1812024712562561,
-0.23486663401126862,
0.008521392941474915,
-0.14132314920425415,
-0.40417033433914185,
0.44959738850593567,
0.17204917967319489,
0.3796803951263428,
-0.09577739238739014,
0.014443082734942436,
0.05205095186829567,
0.4336634576320648,
0.23383212089538574,
0.1211891770362854,
-0.015320208854973316,
0.4003097414970398,
-0.06476525962352753,
-0.0482119657099247,
-0.06610175967216492,
-0.2763664722442627,
0.25427353382110596,
0.2915329933166504,
0.10316836833953857,
0.08507335186004639,
0.04363948851823807,
-0.17034514248371124,
0.047847338020801544,
-0.2892531752586365,
-0.3850303888320923,
0.11659523844718933,
-0.037858206778764725,
0.15110984444618225,
-0.06575346738100052,
-0.10380002856254578,
-0.3095017373561859,
-0.003438226878643036,
0.14934326708316803,
0.14895384013652802,
0.0438448041677475,
-0.11421184986829758,
0.012902714312076569,
0.212632954120636,
0.2532339096069336,
0.19013485312461853,
0.006144281476736069,
-0.09847218543291092,
0.18976247310638428,
0.12817595899105072,
0.30328336358070374,
-0.14390650391578674,
0.4107021987438202,
0.37855470180511475,
-0.5947980284690857,
0.09422146528959274,
0.11947578191757202,
0.15728560090065002,
-0.13131307065486908,
0.06479185074567795,
0.028962645679712296,
-0.18153975903987885,
0.0471712164580822,
0.15391767024993896,
0.2556743025779724,
0.32432880997657776,
-0.17625758051872253,
0.06807416677474976,
-0.01112145185470581,
0.32015782594680786,
0.001012967899441719,
0.25607725977897644,
0.04175519198179245,
-0.1714586317539215,
0.11697812378406525,
0.45377275347709656,
0.1449935883283615,
0.048586953431367874,
-0.13649502396583557,
-0.41772934794425964,
0.017252303659915924,
-0.17096488177776337,
0.09157201647758484,
0.6213274002075195,
0.17812103033065796,
0.08388590812683105,
0.028731243684887886,
0.22802215814590454,
-0.16103661060333252,
0.49282488226890564,
0.19856144487857819,
0.21067366003990173,
0.16732674837112427,
-0.0006827898323535919,
0.09504730999469757,
-0.13925334811210632,
0.33682429790496826,
-0.0108681321144104,
0.12647850811481476,
-0.07401365786790848,
-0.28268468379974365,
-0.3848985731601715,
0.09621943533420563,
-0.41386744379997253,
-0.5886368751525879,
-0.24780847132205963,
-0.20807000994682312,
-0.05177464336156845,
0.1690845489501953,
-0.1629844754934311,
0.09249505400657654,
-0.3313494324684143,
0.0354093462228775,
-0.07200625538825989,
0.06952768564224243,
0.04312581568956375,
0.0037755072116851807,
-0.13464048504829407,
0.06626476347446442,
0.23552942276000977,
-0.39568692445755005,
0.4484192728996277,
-0.1507643759250641,
0.051978811621665955,
-0.43171533942222595,
-0.20725281536579132,
0.21228492259979248,
0.2740793824195862,
0.30607539415359497,
0.24500878155231476,
0.14426690340042114,
0.48971378803253174,
-0.12678158283233643,
0.1766439974308014,
-0.3439158797264099,
0.04378797113895416,
-0.1002589762210846,
-0.19042833149433136,
0.042275022715330124,
-0.16191957890987396,
-0.5782846808433533,
-0.5531324148178101,
-0.30773472785949707,
-0.038355935364961624,
-0.02829645574092865,
-0.009400328621268272,
0.0894286036491394,
-0.148014634847641,
-0.05477452278137207,
0.3384121358394623,
-0.07681933045387268,
-0.36061644554138184,
-0.24838939309120178,
0.28311216831207275,
-0.2172355353832245,
-0.5080080032348633,
0.26720815896987915,
-0.08912443369626999,
0.3436751961708069,
0.13344410061836243,
-0.5720171332359314,
0.43301481008529663,
0.011155424639582634,
0.10506868362426758,
0.03589901700615883,
-0.07896053791046143,
0.33992642164230347,
-0.049576058983802795,
-0.03564808517694473,
-0.28697866201400757,
-0.21784263849258423,
-0.14639563858509064,
-0.007904430851340294,
0.49254581332206726,
-0.08607163280248642,
0.2768721282482147,
0.11648814380168915,
0.7780134081840515,
0.03807223588228226,
-0.1931980699300766,
0.1653410643339157,
-0.24980218708515167,
0.2553129196166992,
0.1219145655632019,
-0.36560913920402527,
0.16422569751739502,
0.029239267110824585,
0.1096314936876297,
0.29481279850006104,
-0.05719093978404999,
-0.08297140896320343,
-0.15030112862586975,
0.19410251080989838,
-0.3572814464569092,
-0.4683474898338318,
0.036911241710186005,
0.15571057796478271,
0.3734396994113922,
0.3533400893211365,
0.331561416387558,
0.06629091501235962,
-0.2881094217300415,
0.08159129321575165,
0.3436906039714813,
0.1712893694639206,
0.0770689994096756,
0.21058228611946106,
-0.030316421762108803,
-0.4444749057292938,
-0.04847370833158493,
-0.2085513323545456,
0.6952723860740662,
-0.06273025274276733,
-0.12352544814348221,
-0.1420067995786667,
0.005674149841070175,
0.537901759147644,
0.0867379829287529,
0.3406134247779846,
0.08308537304401398,
-0.08257171511650085,
-0.2757599651813507,
-0.2109440267086029,
-0.04342319071292877,
0.09999813139438629,
0.20812253654003143,
0.452755331993103,
-0.06034759432077408,
-0.23581549525260925,
0.47391316294670105,
0.16521205008029938,
-0.20506073534488678,
-0.020012158900499344,
-0.022933103144168854,
-0.33845970034599304,
-0.1528332531452179,
-0.0044874101877212524,
-0.1307780146598816,
0.27874764800071716,
-0.36341750621795654,
-0.03844665363430977,
0.08077071607112885,
-0.02705782651901245,
0.030399663373827934,
-0.144413024187088,
0.26408883929252625,
0.0890652984380722,
0.5655502676963806,
0.5011258125305176,
0.01182773057371378,
0.508297324180603,
0.43557918071746826,
-0.040138840675354004,
-0.23070625960826874,
0.06227971985936165,
-0.22289803624153137,
0.07919081300497055,
0.16722798347473145,
-0.03727051615715027,
0.07904645800590515,
0.3591538071632385,
-0.0577760748565197,
-0.6436673998832703,
-0.12749384343624115,
0.28138116002082825,
-0.08190998435020447,
-0.1553291380405426,
-0.1166425570845604,
0.0808902382850647,
0.0199669748544693,
0.0410199910402298,
0.3474075198173523,
-0.11876808106899261,
-0.17826226353645325,
-0.21849828958511353,
0.10563429445028305,
0.5729706287384033,
-0.026557892560958862,
0.018177561461925507,
-0.052091460675001144,
-0.31103116273880005,
0.21284133195877075,
0.1945478320121765,
0.09727941453456879,
-0.23407474160194397,
-0.1695728749036789,
-0.09488128125667572,
-0.18864880502223969,
0.025974251329898834,
0.0414356105029583,
-0.1443951576948166,
0.3288700580596924,
-0.05526939779520035,
0.5448484420776367,
0.09806280583143234,
-0.08349676430225372,
-0.14776156842708588,
-0.26685646176338196,
-0.28395140171051025,
0.13666626811027527,
-0.07351422309875488,
0.49000805616378784,
-0.266923725605011,
-0.11597450822591782,
0.10133473575115204,
-0.241456538438797,
-0.3830203115940094,
0.05076775699853897,
-0.7256552577018738,
0.07651980221271515,
-0.052903153002262115,
-0.038887158036231995,
0.09882457554340363,
0.03645174577832222,
-0.17865419387817383,
0.26721543073654175,
-0.30016040802001953,
0.27889949083328247,
-0.2279781997203827,
0.06538908183574677,
0.032425407320261,
0.3202238976955414,
0.10617600381374359,
-0.08352074772119522,
-0.1955881416797638,
-0.09261757135391235,
-0.12532487511634827,
-0.20072267949581146,
0.21147286891937256,
-0.11623896658420563,
0.31142741441726685,
0.20567254722118378,
-0.04505879804491997,
0.11859385669231415,
0.017674557864665985,
-0.294194757938385,
0.16874101758003235,
0.12739770114421844,
-0.09488394856452942,
0.3187659680843353,
0.07281996309757233,
-0.046811364591121674,
-0.06456238776445389,
0.39273884892463684,
-0.1651582568883896,
-0.036189004778862,
0.320424884557724,
0.34339088201522827,
-0.059234313666820526,
-0.3559420108795166,
0.025882430374622345,
-0.25705423951148987,
-0.09844903647899628,
0.08616027235984802,
-0.01751309260725975,
0.3950469493865967,
0.0682646781206131,
-0.136641263961792,
0.22155843675136566,
-0.38310733437538147,
-0.14845623075962067,
-0.5851325988769531,
-0.11352889239788055,
0.014731116592884064,
-0.036689531058073044,
0.03943762555718422,
-0.1223355308175087,
0.28017276525497437,
-0.031005047261714935,
-0.07552001625299454,
-0.31703001260757446,
0.2484564185142517,
-0.037944160401821136,
-0.021646149456501007,
0.3473944067955017,
-0.038095228374004364,
0.1913871020078659,
-0.12828560173511505,
0.08000761270523071,
-0.07252217829227448,
-0.30955779552459717,
-0.15939441323280334,
-0.28724026679992676,
0.14272207021713257,
-0.11383754760026932,
-0.3669804632663727,
0.18980658054351807,
-0.2682432532310486,
-0.17426136136054993,
0.13683532178401947,
0.06277816742658615,
0.0325561985373497,
-0.14726628363132477,
0.0414363257586956,
0.1274479329586029,
0.027276838198304176,
-0.2698461413383484,
0.18622362613677979,
-0.05823451280593872,
0.3914121687412262,
0.08282317221164703,
0.17690612375736237,
0.2801856994628906,
-0.18184828758239746,
-0.02527957409620285,
-0.21177387237548828,
-0.12113615870475769,
-0.01884823478758335,
0.4527779221534729,
-0.06837256252765656,
-0.006337597966194153,
0.46826857328414917,
0.13654622435569763,
0.18379011750221252,
-0.057814404368400574,
0.25063586235046387,
-0.10570621490478516,
0.2739763855934143,
-0.3630700409412384,
-0.14659619331359863,
-0.18300189077854156,
0.27004873752593994,
0.009349629282951355,
-0.05254227668046951,
0.22998085618019104,
-0.17594175040721893,
-0.17185935378074646,
0.24356907606124878,
0.41248467564582825,
-0.24650278687477112,
0.30622345209121704,
0.4636017382144928,
-0.17864735424518585,
0.17346854507923126,
-0.12051404267549515,
-0.2235334813594818,
-0.0150814950466156,
0.5325531959533691,
-0.28548258543014526,
0.30240386724472046,
0.2380632758140564,
-0.0947258248925209,
0.11155258119106293,
-0.2780929505825043,
-0.14543834328651428,
0.16129262745380402,
-0.14945101737976074,
0.2031397819519043,
0.08046239614486694,
0.29135578870773315,
-0.23676443099975586,
0.11971129477024078,
-0.09510527551174164,
0.2228306084871292,
-0.0438835546374321,
0.1192011907696724,
-0.1368272602558136,
-0.33010250329971313,
-0.17682723701000214,
0.16876119375228882,
0.10811750590801239,
-0.005369942635297775,
0.24525777995586395,
0.30208808183670044,
-0.20671223104000092,
-0.40553492307662964,
-0.3392612636089325,
0.2949604094028473,
-0.04116279259324074,
-0.31704720854759216,
-0.028049584478139877,
0.4528757631778717,
-0.05290853604674339,
0.31937742233276367,
0.4425782561302185,
0.21958811581134796,
0.1460931897163391,
-0.1434238851070404,
0.011185556650161743,
0.15677529573440552,
-0.11890611052513123,
-0.304232656955719,
0.1213318407535553,
0.0572688989341259,
-0.1279427409172058,
0.07817009091377258,
0.15360961854457855,
-0.12414270639419556,
-0.16661985218524933,
0.08166816085577011,
-0.05184332653880119,
-0.2465672492980957,
0.19029158353805542,
0.012636596336960793,
-0.07693181931972504,
-0.256583034992218,
0.2185429036617279,
0.09194208681583405,
-0.09174740314483643,
0.5764175057411194,
-0.004267897456884384,
0.25605499744415283,
-0.14251317083835602,
0.068544402718544,
0.08807793259620667,
0.35946157574653625,
0.1567237377166748,
0.002019362524151802,
-0.2514655292034149,
-0.37280961871147156,
-0.7758952975273132,
-0.09439551830291748,
0.11068403720855713,
0.2136768102645874,
0.1856192797422409,
0.08264632523059845,
0.08397354930639267,
0.12231191992759705,
0.42334872484207153,
-0.06338699162006378,
0.3240467309951782,
-0.06094535067677498,
-0.40068361163139343,
-0.2425767332315445,
0.06915760040283203,
0.07099275290966034,
0.053303658962249756,
-0.3861621022224426,
0.18144232034683228,
-0.19469872117042542,
0.053651534020900726,
-0.42677363753318787,
0.10464473068714142,
-0.11190256476402283,
0.19696661829948425,
0.3448432385921478,
0.22462688386440277,
0.28886160254478455,
-0.10796292126178741,
-0.13690753281116486,
-0.24022871255874634,
-0.07545136660337448,
-0.13072092831134796,
-0.02078089863061905,
-0.071778804063797,
0.017377108335494995,
0.06367309391498566,
-0.5198937654495239,
-0.3963315188884735,
0.0451851524412632,
-0.0016635879874229431,
0.19802206754684448,
-0.5658490061759949,
0.3297119438648224,
-0.23240765929222107,
0.07845732569694519,
0.057564347982406616,
0.14609257876873016,
-0.13916876912117004,
-0.10186471045017242,
-0.14781564474105835,
-0.26046714186668396,
0.3043631911277771,
-0.2848113477230072,
-0.06687533855438232,
-0.5626125931739807,
0.14843294024467468,
-0.19020769000053406,
0.01544412411749363,
-0.335675448179245,
0.08486308157444,
0.2441290020942688,
-0.09692934155464172,
-0.22004255652427673,
0.21125668287277222,
-0.1466057300567627,
-0.01342058926820755,
0.15410436689853668,
0.46332186460494995,
0.10206621885299683,
-0.24516652524471283,
-0.12079721689224243,
-0.19758552312850952
] |
https://github.com/huggingface/datasets/issues/6624 | Hi, this dataset has been disabled by the authors, so unfortunately it's no longer possible to download it. | How to download the laion-coco dataset | The laion coco dataset is not available now. How to download it
https://huggingface.co/datasets/laion/laion-coco | 18 | How to download the laion-coco dataset
The laion coco dataset is not available now. How to download it
https://huggingface.co/datasets/laion/laion-coco
Hi, this dataset has been disabled by the authors, so unfortunately it's no longer possible to download it. | [
-0.15687450766563416,
-0.23160290718078613,
-0.20348447561264038,
0.2225615680217743,
-0.014091560617089272,
-0.005569621920585632,
0.1532430648803711,
0.07347936183214188,
-0.3041417598724365,
0.11177970468997955,
-0.3511919379234314,
0.1720883846282959,
0.03486033156514168,
0.37087300419807434,
0.06044836714863777,
-0.1595807671546936,
-0.13234062492847443,
-0.05253537371754646,
0.14318905770778656,
-0.17197003960609436,
-0.026270393282175064,
0.25338324904441833,
-0.058486972004175186,
-0.05342555791139603,
0.18231168389320374,
-0.1428816169500351,
-0.33576905727386475,
0.02891378663480282,
-0.3386974036693573,
-0.31054407358169556,
0.5495043396949768,
0.2182805836200714,
0.32229405641555786,
-0.03667532652616501,
-0.0000932125622057356,
-0.026982568204402924,
0.31394314765930176,
-0.09625187516212463,
0.1038481742143631,
-0.22185254096984863,
-0.4870290756225586,
-0.21821656823158264,
-0.09716705977916718,
-0.16300322115421295,
-0.003260403871536255,
0.18102732300758362,
0.0538439005613327,
-0.14801561832427979,
0.33395665884017944,
0.13310323655605316,
0.38284575939178467,
0.2748640775680542,
0.17201487720012665,
-0.22167356312274933,
0.17835509777069092,
0.012524273246526718,
-0.23609769344329834,
0.13506227731704712,
0.2767125964164734,
0.013647176325321198,
0.06437777727842331,
0.17624381184577942,
0.15020586550235748,
-0.2877812087535858,
-0.12902742624282837,
-0.027867933735251427,
0.0617622546851635,
-0.4359237551689148,
0.15072041749954224,
0.5334852337837219,
0.5680654644966125,
0.20327922701835632,
-0.16639328002929688,
0.10983921587467194,
0.030090872198343277,
-0.3939836919307709,
-0.05485551431775093,
0.49280887842178345,
0.027657251805067062,
0.2033359706401825,
-0.15457278490066528,
-0.1631777286529541,
-0.20080798864364624,
0.09048429131507874,
-0.07753688097000122,
0.11750780791044235,
-0.20870088040828705,
-0.09450899064540863,
0.019739573821425438,
-0.05554508417844772,
0.15310901403427124,
0.22084572911262512,
-0.1776551902294159,
-0.04765487462282181,
-0.09828510880470276,
-0.09394078701734543,
-0.0441359207034111,
0.42182889580726624,
0.2996205687522888,
0.09979921579360962,
0.34184980392456055,
-0.11558917909860611,
-0.2664100229740143,
-0.026869554072618484,
0.14688405394554138,
0.11175146698951721,
0.16333261132240295,
-0.047029510140419006,
0.19597628712654114,
0.36639678478240967,
0.15900525450706482,
-0.1050625741481781,
-0.04760279506444931,
0.2706533968448639,
-0.3811447024345398,
-0.0208311527967453,
-0.05041810870170593,
-0.42154616117477417,
-0.33822908997535706,
-0.11242543160915375,
0.08581556379795074,
0.033439382910728455,
0.052665114402770996,
0.2720377445220947,
-0.102695032954216,
0.07731027901172638,
-0.07735377550125122,
0.13746985793113708,
0.1855856478214264,
-0.18847957253456116,
-0.30035972595214844,
0.04696236178278923,
-0.08117634057998657,
-0.046592842787504196,
0.2791740298271179,
-0.3209453821182251,
0.41417214274406433,
-0.07596952468156815,
0.12121206521987915,
0.2687426507472992,
-0.15521389245986938,
-0.027999792248010635,
-0.1346912682056427,
0.17363595962524414,
0.0006307587027549744,
-0.13038313388824463,
0.13546329736709595,
-0.11338049918413162,
-0.1310008019208908,
-0.07227777689695358,
-0.23871256411075592,
-0.1970406472682953,
-0.11818603426218033,
0.2586930990219116,
-0.26164722442626953,
-0.24542787671089172,
-0.04862331226468086,
0.23783312737941742,
-0.20519354939460754,
0.161880761384964,
-0.012451417744159698,
-0.11796589195728302,
-0.08728339523077011,
-0.22149226069450378,
0.1685953587293625,
0.1519203782081604,
-0.1654866486787796,
-0.05847717449069023,
-0.30033159255981445,
-0.16768783330917358,
0.20192168653011322,
0.10067648440599442,
-0.15839727222919464,
-0.17008161544799805,
-0.33540692925453186,
-0.06625397503376007,
0.07545598596334457,
-0.31694212555885315,
-0.4344373047351837,
-0.06534099578857422,
0.08215659856796265,
-0.1012595146894455,
0.007294096052646637,
0.09524331986904144,
-0.027224861085414886,
-0.12457671761512756,
-0.002909887582063675,
0.16868017613887787,
0.0771801546216011,
-0.26437056064605713,
-0.016614675521850586,
-0.29327312111854553,
0.4095262885093689,
0.12250398099422455,
0.04077473282814026,
0.1712186187505722,
0.12401191890239716,
0.2817156910896301,
0.40853351354599,
0.12457583099603653,
-0.013186225667595863,
0.22511550784111023,
0.33419209718704224,
0.08154977858066559,
0.0510907843708992,
0.13709837198257446,
-0.198804572224617,
0.13347488641738892,
0.19419734179973602,
0.19385138154029846,
-0.07386013865470886,
-0.23064802587032318,
-0.18678757548332214,
0.05656750500202179,
0.10246934741735458,
-0.13950088620185852,
0.3226067125797272,
-0.09245029836893082,
0.3811361789703369,
0.0828937441110611,
-0.04852103814482689,
0.4812946319580078,
-0.0755355954170227,
0.027042385190725327,
-0.2005452662706375,
0.24368645250797272,
-0.0495762899518013,
0.20453792810440063,
0.49730098247528076,
0.08329710364341736,
0.07769346237182617,
0.0007731840014457703,
0.08660620450973511,
0.10627201199531555,
-0.09203316271305084,
0.11527568101882935,
0.118752121925354,
-0.06925816833972931,
0.26847973465919495,
-0.46755069494247437,
0.03528682142496109,
0.016221582889556885,
-0.11035238206386566,
0.26780545711517334,
-0.2557731866836548,
0.2051742523908615,
-0.013685938902199268,
-0.12920643389225006,
0.24315808713436127,
0.21094341576099396,
0.34760627150535583,
-0.11730483919382095,
-0.14922720193862915,
-0.1913599967956543,
0.37951967120170593,
0.032955605536699295,
0.32334017753601074,
-0.17438097298145294,
-0.4678892493247986,
0.3608666658401489,
0.12651106715202332,
-0.13533291220664978,
-0.03173878788948059,
0.03948666527867317,
-0.16290885210037231,
0.018069609999656677,
0.3102705776691437,
0.10872717201709747,
0.01732771098613739,
0.3184717893600464,
0.18856148421764374,
-0.26252415776252747,
-0.2050977498292923,
-0.38675376772880554,
0.15637141466140747,
-0.0065836794674396515,
0.1176200807094574,
-0.20473138988018036,
0.4125067889690399,
-0.05817439779639244,
-0.660692036151886,
-0.16870996356010437,
-0.20111185312271118,
0.13063502311706543,
0.17251187562942505,
-0.16396889090538025,
-0.4131260812282562,
-0.11829802393913269,
0.28062665462493896,
-0.15652990341186523,
-0.24326682090759277,
-0.4202251732349396,
0.16668950021266937,
-0.05708573758602142,
0.2664520740509033,
-0.17494729161262512,
-0.6327065825462341,
0.3446277379989624,
-0.11445263028144836,
0.24555732309818268,
-0.33224934339523315,
-0.09942455589771271,
-0.29042285680770874,
0.3674173951148987,
-0.10424847900867462,
-0.1793196052312851,
0.2122320681810379,
-0.1342441737651825,
0.10599824786186218,
-0.14777661859989166,
-0.47224798798561096,
0.16698342561721802,
-0.1992427557706833,
0.04450278729200363,
0.07842689752578735,
0.20357993245124817,
-0.10594567656517029,
-0.08475633710622787,
0.10747427493333817,
-0.33415818214416504,
-0.22068357467651367,
-0.08381931483745575,
-0.024899665266275406,
-0.11644086241722107,
-0.3023720979690552,
-0.25689250230789185,
-0.3988383412361145,
-0.12664979696273804,
0.3955882489681244,
0.16853083670139313,
-0.07986585795879364,
0.1720578819513321,
-0.2342132329940796,
0.018316902220249176,
0.02696358412504196,
-0.08336731791496277,
-0.35628727078437805,
-0.48496213555336,
0.3665924668312073,
-0.37186872959136963,
-0.4627988040447235,
0.05524639040231705,
0.0895812064409256,
0.31556302309036255,
-0.08437713980674744,
-0.5092445015907288,
-0.00605083629488945,
-0.16782045364379883,
0.30681830644607544,
0.10823015868663788,
-0.20279589295387268,
0.12048979103565216,
0.059480637311935425,
-0.15830852091312408,
-0.21920642256736755,
0.13290739059448242,
-0.0010388046503067017,
0.10623624920845032,
0.353161484003067,
-0.18118548393249512,
0.05776483565568924,
0.3392638564109802,
0.15703298151493073,
0.07965037226676941,
-0.026759073138237,
0.4130978286266327,
-0.1214686706662178,
0.4155830144882202,
0.13634178042411804,
-0.14848867058753967,
0.16374099254608154,
-0.0701206773519516,
0.1244482696056366,
0.07054039090871811,
0.20618563890457153,
-0.29425546526908875,
-0.29688704013824463,
0.03805997967720032,
-0.15496709942817688,
-0.1378684639930725,
-0.3878674805164337,
0.6003235578536987,
0.2615259885787964,
0.1908310353755951,
-0.05371428281068802,
-0.054753996431827545,
-0.39702853560447693,
0.23123547434806824,
0.2556089162826538,
0.13550430536270142,
-0.012854712083935738,
-0.45491093397140503,
-0.17726017534732819,
-0.8023486733436584,
0.2160910964012146,
-0.13573619723320007,
0.03605491295456886,
-0.16181950271129608,
-0.007432952523231506,
-0.0969468504190445,
-0.0651036947965622,
0.4015886187553406,
-0.11845771223306656,
0.2968618869781494,
0.08548636734485626,
-0.06145349517464638,
-0.28907692432403564,
0.029335133731365204,
-0.33569827675819397,
0.03953779488801956,
0.3135862350463867,
0.4411716163158417,
-0.10331442952156067,
-0.004532720893621445,
0.062222376465797424,
0.07363580167293549,
-0.17703936994075775,
0.009894847869873047,
0.04949253797531128,
-0.28877151012420654,
-0.024466857314109802,
-0.10761827975511551,
-0.1120278462767601,
0.2908495366573334,
-0.23982754349708557,
-0.09669677913188934,
0.05825427174568176,
-0.000735938549041748,
0.08998933434486389,
0.19552768766880035,
-0.027128631249070168,
0.39240774512290955,
0.13417145609855652,
0.09284773468971252,
0.09858967363834381,
0.08915683627128601,
0.3634926974773407,
0.13337333500385284,
-0.2325505167245865,
-0.052244871854782104,
-0.10082642734050751,
0.13034850358963013,
0.18913668394088745,
-0.11983288824558258,
-0.12400969862937927,
-0.13492949306964874,
0.02369607239961624,
0.04725450277328491,
0.045849669724702835,
0.08839872479438782,
-0.19373390078544617,
-0.28889551758766174,
-0.10596586763858795,
0.2967252731323242,
0.06844553351402283,
0.07414200901985168,
0.0017079641111195087,
-0.11294624209403992,
-0.14659914374351501,
-0.053627125918865204,
0.09904923290014267,
0.7766706943511963,
-0.06686695665121078,
0.05097713693976402,
0.2302929013967514,
0.15251263976097107,
0.5579816102981567,
-0.12885326147079468,
0.21712400019168854,
0.0077590495347976685,
-0.43838778138160706,
-0.07383349537849426,
0.09852467477321625,
-0.02565247192978859,
0.03018607571721077,
-0.05882611498236656,
0.2380700409412384,
-0.05764703452587128,
0.07424985617399216,
-0.0324258878827095,
0.09915342926979065,
-0.07244497537612915,
-0.08503660559654236,
-0.21115712821483612,
0.3691771626472473,
0.14398586750030518,
0.29312533140182495,
-0.03795558959245682,
-0.11035922169685364,
-0.22234350442886353,
-0.05418713018298149,
-0.23816990852355957,
0.2839227318763733,
-0.08745826780796051,
0.24990171194076538,
-0.18558645248413086,
-0.09796259552240372,
-0.04919955134391785,
0.3401137888431549,
0.40545520186424255,
0.2386852353811264,
-0.35951393842697144,
0.2467879354953766,
-0.12016839534044266,
-0.4936966001987457,
0.0671314001083374,
0.23224148154258728,
-0.16891829669475555,
-0.26537442207336426,
-0.0949503481388092,
0.05447643995285034,
0.15915247797966003,
0.07088667899370193,
-0.13657666742801666,
-0.1471758484840393,
-0.07345905900001526,
0.053723499178886414,
0.20119109749794006,
0.221663236618042,
0.10369361937046051,
-0.15562155842781067,
0.27164655923843384,
0.20877228677272797,
0.059481095522642136,
-0.2226160764694214,
0.18116351962089539,
-0.10397904366254807,
-0.22318372130393982,
0.27438509464263916,
0.10678578168153763,
0.1514163613319397,
0.14980098605155945,
0.08537181466817856,
0.035240113735198975,
-0.264177143573761,
0.006038181483745575,
-0.15090049803256989,
-0.2150089293718338,
-0.017117859795689583,
-0.13396137952804565,
0.2159978300333023,
-0.12066733837127686,
0.4302305281162262,
0.07882826030254364,
-0.11126096546649933,
0.15460923314094543,
-0.4053763747215271,
-0.2391005903482437,
0.2700425982475281,
-0.20511111617088318,
0.10150030255317688,
-0.09515120834112167,
0.0672832578420639,
0.20334509015083313,
0.03891104459762573,
-0.47123417258262634,
-0.01694726198911667,
-0.17287681996822357,
-0.19376567006111145,
0.2992827594280243,
0.022345714271068573,
0.2877039313316345,
-0.09475082159042358,
0.26288309693336487,
0.052686069160699844,
-0.1539992392063141,
-0.3256533741950989,
-0.08072581887245178,
0.012752771377563477,
0.1733858287334442,
0.056254900991916656,
0.0035361051559448242,
-0.13174182176589966,
-0.20954112708568573,
0.11410121619701385,
-0.10149963200092316,
0.04564213752746582,
0.20708367228507996,
0.05743368715047836,
-0.05501923710107803,
0.06847625970840454,
0.028635337948799133,
0.19533903896808624,
0.33884313702583313,
0.2168169617652893,
0.16797301173210144,
0.18215787410736084,
0.09362512826919556,
-0.034654177725315094,
0.306715726852417,
-0.10441838204860687,
-0.26171571016311646,
0.06753164529800415,
0.2798410654067993,
0.06890755891799927,
0.03763963282108307,
-0.01141345128417015,
0.09636452794075012,
-0.029762856662273407,
0.12914706766605377,
0.35980215668678284,
0.08750754594802856,
0.3100531995296478,
-0.47532209753990173,
-0.23672881722450256,
0.12255635857582092,
0.15189895033836365,
-0.049161992967128754,
0.2514217793941498,
0.22029903531074524,
-0.017325110733509064,
0.16476306319236755,
-0.13505451381206512,
0.5191757082939148,
-0.027538320049643517,
0.1664898693561554,
0.2251565158367157,
-0.1361297369003296,
0.046081990003585815,
0.23502855002880096,
0.004768013022840023,
0.23717498779296875,
0.140306755900383,
0.20365101099014282,
-0.034218572080135345,
0.28725671768188477,
0.21707597374916077,
0.3708851933479309,
-0.10904471576213837,
-0.26081207394599915,
0.07392021268606186,
-0.021033570170402527,
0.23460066318511963,
-0.0018411390483379364,
0.08577077090740204,
-0.06733561307191849,
-0.05838874727487564,
-0.3515784442424774,
0.33687272667884827,
0.019778823480010033,
-0.22592398524284363,
-0.15359972417354584,
-0.2364211082458496,
-0.22967620193958282,
0.1547272503376007,
0.10229087620973587,
-0.36245647072792053,
0.2183464914560318,
0.007728248834609985,
0.009116102010011673,
-0.14434979856014252,
-0.23814764618873596,
0.48364460468292236,
0.13227300345897675,
-0.12226594984531403,
0.12679094076156616,
-0.0402698777616024,
-0.20351697504520416,
0.10351915657520294,
0.24845130741596222,
0.050059545785188675,
-0.24018633365631104,
0.20259785652160645,
0.00718998908996582,
0.0745437741279602,
-0.2592480778694153,
-0.13190309703350067,
0.22991108894348145,
0.39236244559288025,
0.04802317172288895,
0.29389914870262146,
0.29248830676078796,
-0.20978206396102905,
0.0978928804397583,
0.03028181381523609,
0.2548646032810211,
-0.1333400011062622,
-0.00914277508854866,
-0.004980900790542364,
-0.13508035242557526,
-0.08546395599842072,
-0.08916810154914856,
-0.3414038121700287,
0.21731768548488617,
-0.04645419120788574,
-0.03395267575979233,
0.09335625916719437,
-0.11549031734466553,
0.18351863324642181,
-0.14800837635993958,
0.26010215282440186,
0.4892317056655884,
-0.08944222331047058,
0.05857408791780472,
-0.6094845533370972,
-0.41800493001937866,
0.01447698101401329,
-0.1829916536808014,
-0.13300928473472595,
-0.07280509173870087,
0.07216663658618927,
0.2422393560409546,
0.28405681252479553,
0.00780988484621048,
0.08722425997257233,
0.12835639715194702,
-0.014774831011891365,
-0.25689437985420227,
0.002415392082184553,
0.24349664151668549,
0.16879603266716003,
-0.14597102999687195,
0.04134267568588257,
0.16709232330322266,
-0.11496052145957947,
0.18395984172821045,
0.046328261494636536,
-0.09194129705429077,
-0.2813456058502197,
-0.22277165949344635,
0.6259546279907227,
0.10156749188899994,
-0.012621186673641205,
-0.18413889408111572,
-0.2473951280117035,
-0.18968182802200317,
-0.3732616603374481,
0.05168456584215164,
0.23292966187000275,
0.06607568264007568,
0.04630768299102783,
-0.20332905650138855,
0.03557569161057472,
0.007576841861009598,
0.31934189796447754,
0.20627108216285706,
0.05201311036944389,
-0.1563493013381958,
0.13168326020240784,
-0.18178662657737732,
-0.18289315700531006,
0.04596850275993347,
0.2691040635108948,
-0.23441565036773682,
-0.3153870105743408,
0.07056167721748352,
-0.2960246503353119,
0.24583424627780914,
-0.6862848997116089,
-0.18998919427394867,
-0.0055399686098098755,
-0.030638106167316437,
0.37103360891342163,
-0.05261297523975372,
0.005458042025566101,
0.2557203769683838,
0.247173011302948,
-0.06171877682209015,
-0.19959470629692078,
0.0682690292596817,
-0.04233193397521973,
-0.07502470910549164,
-0.1373392939567566,
0.3212102949619293,
0.19977745413780212,
-0.41600558161735535,
0.024148546159267426,
-0.030944112688302994
] |
https://github.com/huggingface/datasets/issues/6623 | @mariosasko, @lhoestq, @albertvillanova
hey guys! can anyone help? or can you guys suggest who can help with this? | streaming datasets doesn't work properly with multi-node | ### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave. | 18 | streaming datasets doesn't work properly with multi-node
### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave.
@mariosasko, @lhoestq, @albertvillanova
hey guys! can anyone help? or can you guys suggest who can help with this? | [
-0.5885023474693298,
-0.2717367708683014,
-0.022129017859697342,
0.05329866707324982,
-0.05288459733128548,
-0.24468931555747986,
0.28833165764808655,
-0.16213496029376984,
-0.05456581711769104,
0.17409411072731018,
0.13106313347816467,
0.20888292789459229,
-0.21015878021717072,
0.1710551381111145,
-0.05287248641252518,
-0.2316754013299942,
0.07644330710172653,
0.01057659462094307,
0.04034364968538284,
-0.2694319486618042,
-0.07909917831420898,
-0.16820268332958221,
-0.22020316123962402,
-0.4776022434234619,
-0.23010557889938354,
-0.34483352303504944,
-0.1880214959383011,
0.17915897071361542,
0.04292941093444824,
-0.0007918775081634521,
-0.024187937378883362,
0.21599668264389038,
0.22667305171489716,
0.26554247736930847,
-0.00011949403415201232,
-0.17549662292003632,
0.14307358860969543,
-0.033987656235694885,
-0.2797178626060486,
-0.10833810269832611,
-0.4525478482246399,
0.12000128626823425,
-0.0856480672955513,
-0.15769720077514648,
-0.005377188324928284,
0.0469653457403183,
0.16009725630283356,
-0.5938501954078674,
0.4552592635154724,
-0.03413572907447815,
0.08512648195028305,
0.01408693939447403,
-0.2336328625679016,
0.11152130365371704,
-0.18026015162467957,
0.3543376922607422,
0.005941025912761688,
-0.023008089512586594,
0.3836512565612793,
-0.10668213665485382,
-0.2726716697216034,
0.3208426833152771,
-0.17977496981620789,
0.3480873107910156,
-0.009544376283884048,
-0.1916971206665039,
-0.13937494158744812,
-0.3502672016620636,
-0.16309091448783875,
0.19770018756389618,
0.24191229045391083,
-0.12461245805025101,
-0.39788925647735596,
-0.521531343460083,
-0.14842446148395538,
-0.3500770926475525,
-0.23801052570343018,
0.18176981806755066,
-0.2481730580329895,
-0.0703870952129364,
-0.4510071277618408,
-0.23377658426761627,
-0.039797209203243256,
0.11789821088314056,
0.15419495105743408,
0.7694438695907593,
0.16675050556659698,
0.23403680324554443,
-0.1394328773021698,
0.29044508934020996,
0.3079175055027008,
-0.2309572994709015,
0.09334338456392288,
-0.13752999901771545,
-0.4325198531150818,
0.018086589872837067,
0.05734461918473244,
0.04305759817361832,
0.16307535767555237,
0.47958433628082275,
0.30966776609420776,
0.039084240794181824,
0.2876565754413605,
0.16717436909675598,
0.39613404870033264,
-0.18216004967689514,
-0.07782210409641266,
0.13634347915649414,
0.2166709154844284,
-0.017559371888637543,
0.08888927102088928,
0.020971247926354408,
0.21538354456424713,
0.23815034329891205,
-0.24705252051353455,
0.18153789639472961,
0.21558597683906555,
0.06319627165794373,
-0.057585135102272034,
-0.33602985739707947,
-0.03557462990283966,
-0.1887940913438797,
0.13759249448776245,
0.04293625056743622,
0.03659946843981743,
0.24672368168830872,
-0.4028873145580292,
0.15768982470035553,
-0.16016718745231628,
-0.5503530502319336,
-0.21842163801193237,
-0.3020685017108917,
-0.15051349997520447,
0.36816567182540894,
0.14705823361873627,
-0.0330776646733284,
0.2690260112285614,
-0.02857164293527603,
0.10693713277578354,
0.1553390473127365,
-0.07142554968595505,
-0.27262142300605774,
0.024798860773444176,
0.23033371567726135,
0.18815961480140686,
0.09010680019855499,
0.036062948405742645,
0.08091837167739868,
-0.07104326784610748,
0.17591574788093567,
-0.01980457827448845,
-0.33053672313690186,
0.19016502797603607,
0.08777797967195511,
-0.019701950252056122,
-0.013415093533694744,
-0.5710844993591309,
0.4722989499568939,
0.330960214138031,
-0.22632598876953125,
0.00015896186232566833,
-0.056308429688215256,
-0.37576544284820557,
-0.22712896764278412,
0.32718145847320557,
0.4236840605735779,
-0.08281472325325012,
-0.11036442220211029,
-0.07954616844654083,
0.10516591370105743,
0.559253990650177,
0.4052501320838928,
-0.17483340203762054,
-0.07906554639339447,
0.020856671035289764,
0.15972900390625,
0.16132764518260956,
-0.2096678912639618,
-0.25260594487190247,
0.4820108711719513,
-0.24641740322113037,
0.2487398236989975,
0.35342103242874146,
0.1166631281375885,
0.617304801940918,
-0.17541232705116272,
-0.07058148086071014,
0.6404229402542114,
-0.4585624933242798,
0.08418096601963043,
-0.38688284158706665,
-0.005343355238437653,
-0.10611443221569061,
0.25615841150283813,
0.16894984245300293,
0.12541131675243378,
0.24003133177757263,
0.2963806092739105,
0.3235984146595001,
0.08058828860521317,
0.35313987731933594,
-0.06989148259162903,
0.2761307954788208,
-0.2106955647468567,
0.049497976899147034,
-0.11211924254894257,
-0.6091260313987732,
0.28869563341140747,
0.07801954448223114,
-0.27191469073295593,
0.0680549144744873,
-0.23662494122982025,
0.44753289222717285,
-0.15206006169319153,
-0.0822150856256485,
-0.23689866065979004,
-0.03141500800848007,
0.26023662090301514,
0.2944309711456299,
-0.10916776955127716,
-0.3123038113117218,
0.2191813886165619,
-0.42277610301971436,
-0.02126145362854004,
-0.26497286558151245,
0.5215786099433899,
0.21814259886741638,
-0.21846994757652283,
-0.0010435879230499268,
0.045710932463407516,
0.14224129915237427,
-0.15118201076984406,
0.015415862202644348,
0.33918988704681396,
0.2921460270881653,
0.18274448812007904,
-0.08908434212207794,
0.1525992751121521,
0.40113458037376404,
-0.08527597039937973,
0.06607906520366669,
0.24203136563301086,
0.003439906984567642,
-0.3257346451282501,
-0.27416977286338806,
0.18110360205173492,
-0.15961357951164246,
0.3226219117641449,
0.12815937399864197,
0.05069836974143982,
0.2503218650817871,
-0.04333620145916939,
-0.1160278394818306,
0.07843576371669769,
0.10563630610704422,
-0.3318949341773987,
0.23888325691223145,
-0.10024002194404602,
-0.5517885088920593,
0.38689136505126953,
-0.007618499919772148,
0.06681092083454132,
-0.025056421756744385,
-0.183919757604599,
-0.0696144700050354,
-0.13988539576530457,
0.47877833247184753,
0.5028660297393799,
0.47347626090049744,
0.17877982556819916,
0.3006388545036316,
-0.029582621529698372,
0.09126587957143784,
-0.3178114593029022,
-0.0831855833530426,
0.04881472885608673,
0.23611204326152802,
0.2955628037452698,
-0.11971695721149445,
-0.04904571920633316,
-0.1970173865556717,
-0.23455947637557983,
0.3719569742679596,
0.05490919202566147,
-0.1710328459739685,
0.06568951159715652,
-0.31892722845077515,
-0.4927380681037903,
-0.22923643887043,
-0.045837175101041794,
-0.05014248937368393,
-0.17293314635753632,
0.06627776473760605,
0.7270770072937012,
-0.06778944283723831,
0.28438833355903625,
0.47979599237442017,
0.4485873579978943,
-0.21059271693229675,
0.1654486060142517,
-0.14575327932834625,
-0.18223978579044342,
0.0032022353261709213,
0.0369364470243454,
0.22898724675178528,
0.09430357813835144,
0.33727672696113586,
0.28389203548431396,
-0.16278596222400665,
-0.2981051802635193,
0.10762080550193787,
-0.09899180382490158,
0.00272422656416893,
-0.0963461697101593,
-0.17546817660331726,
-0.25050976872444153,
-0.03215603902935982,
0.003959033638238907,
-0.07086239755153656,
-0.24277536571025848,
-0.02813585475087166,
-0.013979624956846237,
-0.05706073343753815,
-0.2292422503232956,
-0.10658164322376251,
-0.008825637400150299,
-0.4428950250148773,
-0.33722180128097534,
0.03422681242227554,
-0.023857880383729935,
0.21627111732959747,
-0.106937475502491,
0.09920388460159302,
-0.317745178937912,
0.13228967785835266,
-0.2115560919046402,
0.004646945744752884,
-0.2248537242412567,
0.10413463413715363,
-0.20951318740844727,
-0.3363834023475647,
-0.18087321519851685,
0.016225799918174744,
-0.032758019864559174,
0.7001858353614807,
-0.3680460453033447,
-0.022672176361083984,
0.22942234575748444,
-0.28300631046295166,
0.13002845644950867,
-0.01745235174894333,
0.1841202676296234,
-0.21101859211921692,
0.0608733668923378,
-0.09832748770713806,
0.30754420161247253,
0.09404551982879639,
0.11913974583148956,
0.3478055000305176,
0.24098807573318481,
0.2969389855861664,
0.18660897016525269,
0.9571035504341125,
0.4824317395687103,
-0.04224644973874092,
0.14983172714710236,
0.19642145931720734,
-0.056599751114845276,
0.012742290273308754,
-0.0643312931060791,
0.3703346848487854,
-0.0830574780702591,
-0.045186202973127365,
0.12593674659729004,
-0.21250998973846436,
-0.34287744760513306,
-0.2323751598596573,
0.0019959434866905212,
0.11636404693126678,
-0.08302852511405945,
0.09244918823242188,
-0.2529964745044708,
0.17085915803909302,
0.15478980541229248,
0.08479215204715729,
0.20761753618717194,
-0.03211395442485809,
-0.4283945858478546,
0.06317974627017975,
0.27598223090171814,
0.016005147248506546,
-0.16827118396759033,
0.08855253458023071,
-0.33251258730888367,
0.20825934410095215,
0.11089914292097092,
0.41010433435440063,
-0.09692040830850601,
0.0012383460998535156,
0.20487654209136963,
0.16055065393447876,
0.2482411116361618,
-0.4635753929615021,
-0.15831811726093292,
-0.19165050983428955,
-0.3073832094669342,
0.14557787775993347,
-0.06610328704118729,
-0.13106635212898254,
0.39359205961227417,
-0.03613927215337753,
0.06572027504444122,
-0.19327493011951447,
0.00100698322057724,
-0.2515191435813904,
-0.15094858407974243,
-0.19483473896980286,
0.015966925770044327,
-0.22142896056175232,
-0.05043540522456169,
-0.26836690306663513,
0.20394307374954224,
0.11528261750936508,
-0.03895575553178787,
-0.2019885629415512,
-0.12639975547790527,
-0.17505629360675812,
0.09587056189775467,
-0.061167456209659576,
0.06695056706666946,
0.04935375973582268,
0.040436554700136185,
0.21243011951446533,
0.20874544978141785,
0.3953591585159302,
0.5721637606620789,
0.3576987087726593,
-0.10423833131790161,
-0.20544858276844025,
0.21369221806526184,
-0.012208551168441772,
0.35178130865097046,
0.4592912197113037,
0.059458423405885696,
0.12396785616874695,
0.199274480342865,
0.22486010193824768,
-0.3814557194709778,
-0.3206067383289337,
-0.04009976610541344,
-0.01633504405617714,
-0.3836514949798584,
-0.6445526480674744,
0.19172415137290955,
-0.08655966073274612,
-0.09299278259277344,
0.46199873089790344,
-0.20214125514030457,
-0.18130603432655334,
0.3067103624343872,
0.11880967020988464,
0.7116556763648987,
0.2004757821559906,
-0.1280091106891632,
-0.08082973957061768,
0.14721162617206573,
0.6211409568786621,
-0.12598812580108643,
0.30969175696372986,
-0.09895922243595123,
-0.34365129470825195,
-0.09388183802366257,
0.02876719832420349,
0.218648761510849,
0.3569571375846863,
-0.09297424554824829,
0.3380039632320404,
0.2797406017780304,
0.05031014606356621,
0.024454642087221146,
0.38943755626678467,
0.2260688841342926,
-0.29189732670783997,
0.05191393569111824,
0.040939681231975555,
-0.26360800862312317,
0.1095682680606842,
-0.029113762080669403,
0.06142812594771385,
0.30432945489883423,
-0.017380662262439728,
-0.3451733887195587,
-0.001589260995388031,
-0.2504502534866333,
0.1799796223640442,
-0.2980843186378479,
-0.3518190383911133,
-0.014309242367744446,
0.22457793354988098,
-0.051153820008039474,
-0.4006478190422058,
-0.060093075037002563,
0.1267896294593811,
0.09874902665615082,
0.1411825716495514,
-0.23552784323692322,
-0.2179218977689743,
0.28058183193206787,
-0.06922587007284164,
-0.07415220141410828,
0.032699450850486755,
0.1559431254863739,
-0.4639070928096771,
-0.21319936215877533,
-0.03263254463672638,
0.19737188518047333,
0.26600706577301025,
0.28038570284843445,
0.13937042653560638,
-0.07972268015146255,
-0.2499895989894867,
-0.001124952919781208,
-0.0405939482152462,
-0.15223562717437744,
0.531467080116272,
-0.15184012055397034,
0.0904516875743866,
-0.20528092980384827,
0.3922710418701172,
0.1825878918170929,
0.1486111581325531,
-0.02756732702255249,
0.11244922876358032,
-0.1182924211025238,
-0.11030668020248413,
-0.09317553043365479,
-0.06052488088607788,
-0.11856216937303543,
0.008454520255327225,
-0.29406440258026123,
0.19962066411972046,
0.27630722522735596,
-0.016298582777380943,
0.07249584794044495,
0.3035910129547119,
-0.25033047795295715,
-0.457568883895874,
0.10085532814264297,
0.08082135021686554,
-0.07574636489152908,
-0.10017263889312744,
0.08798982203006744,
-0.11817143857479095,
0.15497618913650513,
0.6689578890800476,
-0.2593654990196228,
-0.22264665365219116,
0.009598851203918457,
0.2004629671573639,
0.08540656417608261,
0.1396985650062561,
-0.08338335156440735,
-0.07921189069747925,
-0.12510380148887634,
0.07765056192874908,
0.024542182683944702,
-0.1204695850610733,
-0.0428435355424881,
0.19635778665542603,
0.21678051352500916,
-0.09578903019428253,
-0.23582208156585693,
-0.324596643447876,
-0.3343942165374756,
-0.10725420713424683,
0.20262300968170166,
0.012907840311527252,
-0.0461440235376358,
-0.08299568295478821,
0.6750946640968323,
0.08769296854734421,
-0.3021237552165985,
0.24845552444458008,
-0.0822640061378479,
-0.050996020436286926,
-0.17750069499015808,
0.19915303587913513,
0.3842018246650696,
-0.12150600552558899,
-0.17338357865810394,
-0.23282815515995026,
0.37631648778915405,
-0.08606995642185211,
0.4022093415260315,
-0.08369158208370209,
0.15544922649860382,
-0.16203370690345764,
0.5856527090072632,
0.23155951499938965,
-0.04679866507649422,
-0.20633524656295776,
0.28424015641212463,
0.10000159591436386,
-0.20904818177223206,
-0.20226672291755676,
0.051618073135614395,
0.33272844552993774,
0.1875542551279068,
0.4447084665298462,
0.39823317527770996,
-0.12155617773532867,
-0.2642560303211212,
0.09424786269664764,
0.5052286386489868,
-0.19930879771709442,
0.20498985052108765,
0.0005274559371173382,
0.13664285838603973,
0.19577041268348694,
-0.1093682050704956,
0.22564071416854858,
0.03534727543592453,
0.304769366979599,
-0.3092609941959381,
0.7399809956550598,
0.1800457090139389,
-0.04088064283132553,
0.26147162914276123,
-0.4083422124385834,
-0.027955103665590286,
0.0511932373046875,
-0.27629613876342773,
0.21890032291412354,
-0.11413562297821045,
0.05269940197467804,
-0.2647417187690735,
-0.22853687405586243,
-0.014623750001192093,
0.2962864339351654,
-0.002693724352866411,
0.031127575784921646,
-0.5655739307403564,
-0.008411988615989685,
-0.20485199987888336,
0.0021113306283950806,
0.028320545330643654,
-0.03827006742358208,
0.5511711835861206,
0.07702211290597916,
-0.041578423231840134,
-0.21449188888072968,
-0.06528092920780182,
0.05460263416171074,
0.14385336637496948,
-0.28721684217453003,
0.2275797724723816,
0.3027360439300537,
-0.13196931779384613,
0.07006557285785675,
0.1666833758354187,
0.07416398823261261,
0.26832813024520874,
-0.053863245993852615,
0.2339264303445816,
0.3050244450569153,
-0.06516563147306442,
-0.09334377199411392,
0.40177035331726074,
0.03326905518770218,
-0.15578347444534302,
0.2595016062259674,
-0.00023682788014411926,
0.017757251858711243,
0.2346586138010025,
0.2817247807979584,
-0.06593585014343262,
0.025959346443414688,
0.459255188703537,
-0.06756645441055298,
0.14546972513198853,
0.13626807928085327,
0.005246706306934357,
-0.37799328565597534,
-0.01038924977183342,
0.350979745388031,
-0.45905059576034546,
0.05125473812222481,
-0.022730836644768715,
0.004870064556598663,
-0.1468215137720108,
0.5160329937934875,
0.16500578820705414,
0.03988877683877945,
-0.2612239420413971,
-0.29604411125183105,
-0.5132619738578796,
0.08484984189271927,
-0.4117299020290375,
-0.16564467549324036,
-0.02849666215479374,
0.43281829357147217,
0.07081688940525055,
0.19639864563941956,
-0.3687134385108948,
0.08428403735160828,
-0.1745309680700302,
0.5773721933364868,
-0.2791088819503784,
-0.08937016129493713,
-0.5378432273864746,
0.15635201334953308,
0.09824883192777634,
-0.3539040684700012,
0.45212867856025696,
0.26110634207725525,
-0.1391412615776062,
0.07427337765693665,
0.005071297287940979,
0.26286131143569946,
0.005235630087554455,
-0.3676958382129669,
0.09250601381063461,
0.33780398964881897,
0.0506775826215744,
0.09396832436323166,
-0.0835827887058258,
0.12262168526649475,
-0.4526345729827881,
0.19286896288394928,
0.09724687039852142,
0.3620455265045166,
-0.19569164514541626,
-0.15890656411647797,
-0.29978421330451965,
0.35243454575538635,
0.03415100276470184,
-0.20737066864967346,
-0.27364835143089294,
0.08183158934116364,
-0.1954088807106018,
0.2924795150756836,
0.3380967974662781,
0.14995163679122925,
-0.23145905137062073,
-0.12317950278520584,
-0.31143924593925476,
-0.1804192215204239,
0.3792820870876312,
-0.47693243622779846,
0.045383088290691376,
-0.4637560248374939,
0.23137111961841583,
0.2531643509864807,
0.1970571130514145,
-0.25030016899108887,
-0.3180619478225708,
0.22695736587047577,
-0.32072004675865173,
0.057510972023010254,
0.07607784122228622,
0.12044914066791534,
-0.2699720561504364,
-0.1574166715145111,
-0.40562427043914795,
0.032632339745759964,
-0.5015792846679688,
0.22198708355426788,
-0.30460089445114136
] |
https://github.com/huggingface/datasets/issues/6623 | Hi !
1. When the dataset is running of of examples, the last batches received by the GPU can be incomplete or empty/missing. We haven't implemented yet a way to ignore the last batch. It might require the datasets to provide the number of examples per shard though, so that we can know when to stop.
2. Samplers are not compatible with IterableDatasets in pytorch
3. if `dataset.n_shards % world_size != 0` then all the nodes will read/stream the full dataset in order (possibly reading/streaming the same data multiple times), BUT will only yield one example out of `world_size` so that each example goes to one exactly one GPU.
4. no, sharding should be down up-front and can take some time depending on the dataset size and format | streaming datasets doesn't work properly with multi-node | ### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave. | 128 | streaming datasets doesn't work properly with multi-node
### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave.
Hi !
1. When the dataset is running of of examples, the last batches received by the GPU can be incomplete or empty/missing. We haven't implemented yet a way to ignore the last batch. It might require the datasets to provide the number of examples per shard though, so that we can know when to stop.
2. Samplers are not compatible with IterableDatasets in pytorch
3. if `dataset.n_shards % world_size != 0` then all the nodes will read/stream the full dataset in order (possibly reading/streaming the same data multiple times), BUT will only yield one example out of `world_size` so that each example goes to one exactly one GPU.
4. no, sharding should be down up-front and can take some time depending on the dataset size and format | [
-0.5885023474693298,
-0.2717367708683014,
-0.022129017859697342,
0.05329866707324982,
-0.05288459733128548,
-0.24468931555747986,
0.28833165764808655,
-0.16213496029376984,
-0.05456581711769104,
0.17409411072731018,
0.13106313347816467,
0.20888292789459229,
-0.21015878021717072,
0.1710551381111145,
-0.05287248641252518,
-0.2316754013299942,
0.07644330710172653,
0.01057659462094307,
0.04034364968538284,
-0.2694319486618042,
-0.07909917831420898,
-0.16820268332958221,
-0.22020316123962402,
-0.4776022434234619,
-0.23010557889938354,
-0.34483352303504944,
-0.1880214959383011,
0.17915897071361542,
0.04292941093444824,
-0.0007918775081634521,
-0.024187937378883362,
0.21599668264389038,
0.22667305171489716,
0.26554247736930847,
-0.00011949403415201232,
-0.17549662292003632,
0.14307358860969543,
-0.033987656235694885,
-0.2797178626060486,
-0.10833810269832611,
-0.4525478482246399,
0.12000128626823425,
-0.0856480672955513,
-0.15769720077514648,
-0.005377188324928284,
0.0469653457403183,
0.16009725630283356,
-0.5938501954078674,
0.4552592635154724,
-0.03413572907447815,
0.08512648195028305,
0.01408693939447403,
-0.2336328625679016,
0.11152130365371704,
-0.18026015162467957,
0.3543376922607422,
0.005941025912761688,
-0.023008089512586594,
0.3836512565612793,
-0.10668213665485382,
-0.2726716697216034,
0.3208426833152771,
-0.17977496981620789,
0.3480873107910156,
-0.009544376283884048,
-0.1916971206665039,
-0.13937494158744812,
-0.3502672016620636,
-0.16309091448783875,
0.19770018756389618,
0.24191229045391083,
-0.12461245805025101,
-0.39788925647735596,
-0.521531343460083,
-0.14842446148395538,
-0.3500770926475525,
-0.23801052570343018,
0.18176981806755066,
-0.2481730580329895,
-0.0703870952129364,
-0.4510071277618408,
-0.23377658426761627,
-0.039797209203243256,
0.11789821088314056,
0.15419495105743408,
0.7694438695907593,
0.16675050556659698,
0.23403680324554443,
-0.1394328773021698,
0.29044508934020996,
0.3079175055027008,
-0.2309572994709015,
0.09334338456392288,
-0.13752999901771545,
-0.4325198531150818,
0.018086589872837067,
0.05734461918473244,
0.04305759817361832,
0.16307535767555237,
0.47958433628082275,
0.30966776609420776,
0.039084240794181824,
0.2876565754413605,
0.16717436909675598,
0.39613404870033264,
-0.18216004967689514,
-0.07782210409641266,
0.13634347915649414,
0.2166709154844284,
-0.017559371888637543,
0.08888927102088928,
0.020971247926354408,
0.21538354456424713,
0.23815034329891205,
-0.24705252051353455,
0.18153789639472961,
0.21558597683906555,
0.06319627165794373,
-0.057585135102272034,
-0.33602985739707947,
-0.03557462990283966,
-0.1887940913438797,
0.13759249448776245,
0.04293625056743622,
0.03659946843981743,
0.24672368168830872,
-0.4028873145580292,
0.15768982470035553,
-0.16016718745231628,
-0.5503530502319336,
-0.21842163801193237,
-0.3020685017108917,
-0.15051349997520447,
0.36816567182540894,
0.14705823361873627,
-0.0330776646733284,
0.2690260112285614,
-0.02857164293527603,
0.10693713277578354,
0.1553390473127365,
-0.07142554968595505,
-0.27262142300605774,
0.024798860773444176,
0.23033371567726135,
0.18815961480140686,
0.09010680019855499,
0.036062948405742645,
0.08091837167739868,
-0.07104326784610748,
0.17591574788093567,
-0.01980457827448845,
-0.33053672313690186,
0.19016502797603607,
0.08777797967195511,
-0.019701950252056122,
-0.013415093533694744,
-0.5710844993591309,
0.4722989499568939,
0.330960214138031,
-0.22632598876953125,
0.00015896186232566833,
-0.056308429688215256,
-0.37576544284820557,
-0.22712896764278412,
0.32718145847320557,
0.4236840605735779,
-0.08281472325325012,
-0.11036442220211029,
-0.07954616844654083,
0.10516591370105743,
0.559253990650177,
0.4052501320838928,
-0.17483340203762054,
-0.07906554639339447,
0.020856671035289764,
0.15972900390625,
0.16132764518260956,
-0.2096678912639618,
-0.25260594487190247,
0.4820108711719513,
-0.24641740322113037,
0.2487398236989975,
0.35342103242874146,
0.1166631281375885,
0.617304801940918,
-0.17541232705116272,
-0.07058148086071014,
0.6404229402542114,
-0.4585624933242798,
0.08418096601963043,
-0.38688284158706665,
-0.005343355238437653,
-0.10611443221569061,
0.25615841150283813,
0.16894984245300293,
0.12541131675243378,
0.24003133177757263,
0.2963806092739105,
0.3235984146595001,
0.08058828860521317,
0.35313987731933594,
-0.06989148259162903,
0.2761307954788208,
-0.2106955647468567,
0.049497976899147034,
-0.11211924254894257,
-0.6091260313987732,
0.28869563341140747,
0.07801954448223114,
-0.27191469073295593,
0.0680549144744873,
-0.23662494122982025,
0.44753289222717285,
-0.15206006169319153,
-0.0822150856256485,
-0.23689866065979004,
-0.03141500800848007,
0.26023662090301514,
0.2944309711456299,
-0.10916776955127716,
-0.3123038113117218,
0.2191813886165619,
-0.42277610301971436,
-0.02126145362854004,
-0.26497286558151245,
0.5215786099433899,
0.21814259886741638,
-0.21846994757652283,
-0.0010435879230499268,
0.045710932463407516,
0.14224129915237427,
-0.15118201076984406,
0.015415862202644348,
0.33918988704681396,
0.2921460270881653,
0.18274448812007904,
-0.08908434212207794,
0.1525992751121521,
0.40113458037376404,
-0.08527597039937973,
0.06607906520366669,
0.24203136563301086,
0.003439906984567642,
-0.3257346451282501,
-0.27416977286338806,
0.18110360205173492,
-0.15961357951164246,
0.3226219117641449,
0.12815937399864197,
0.05069836974143982,
0.2503218650817871,
-0.04333620145916939,
-0.1160278394818306,
0.07843576371669769,
0.10563630610704422,
-0.3318949341773987,
0.23888325691223145,
-0.10024002194404602,
-0.5517885088920593,
0.38689136505126953,
-0.007618499919772148,
0.06681092083454132,
-0.025056421756744385,
-0.183919757604599,
-0.0696144700050354,
-0.13988539576530457,
0.47877833247184753,
0.5028660297393799,
0.47347626090049744,
0.17877982556819916,
0.3006388545036316,
-0.029582621529698372,
0.09126587957143784,
-0.3178114593029022,
-0.0831855833530426,
0.04881472885608673,
0.23611204326152802,
0.2955628037452698,
-0.11971695721149445,
-0.04904571920633316,
-0.1970173865556717,
-0.23455947637557983,
0.3719569742679596,
0.05490919202566147,
-0.1710328459739685,
0.06568951159715652,
-0.31892722845077515,
-0.4927380681037903,
-0.22923643887043,
-0.045837175101041794,
-0.05014248937368393,
-0.17293314635753632,
0.06627776473760605,
0.7270770072937012,
-0.06778944283723831,
0.28438833355903625,
0.47979599237442017,
0.4485873579978943,
-0.21059271693229675,
0.1654486060142517,
-0.14575327932834625,
-0.18223978579044342,
0.0032022353261709213,
0.0369364470243454,
0.22898724675178528,
0.09430357813835144,
0.33727672696113586,
0.28389203548431396,
-0.16278596222400665,
-0.2981051802635193,
0.10762080550193787,
-0.09899180382490158,
0.00272422656416893,
-0.0963461697101593,
-0.17546817660331726,
-0.25050976872444153,
-0.03215603902935982,
0.003959033638238907,
-0.07086239755153656,
-0.24277536571025848,
-0.02813585475087166,
-0.013979624956846237,
-0.05706073343753815,
-0.2292422503232956,
-0.10658164322376251,
-0.008825637400150299,
-0.4428950250148773,
-0.33722180128097534,
0.03422681242227554,
-0.023857880383729935,
0.21627111732959747,
-0.106937475502491,
0.09920388460159302,
-0.317745178937912,
0.13228967785835266,
-0.2115560919046402,
0.004646945744752884,
-0.2248537242412567,
0.10413463413715363,
-0.20951318740844727,
-0.3363834023475647,
-0.18087321519851685,
0.016225799918174744,
-0.032758019864559174,
0.7001858353614807,
-0.3680460453033447,
-0.022672176361083984,
0.22942234575748444,
-0.28300631046295166,
0.13002845644950867,
-0.01745235174894333,
0.1841202676296234,
-0.21101859211921692,
0.0608733668923378,
-0.09832748770713806,
0.30754420161247253,
0.09404551982879639,
0.11913974583148956,
0.3478055000305176,
0.24098807573318481,
0.2969389855861664,
0.18660897016525269,
0.9571035504341125,
0.4824317395687103,
-0.04224644973874092,
0.14983172714710236,
0.19642145931720734,
-0.056599751114845276,
0.012742290273308754,
-0.0643312931060791,
0.3703346848487854,
-0.0830574780702591,
-0.045186202973127365,
0.12593674659729004,
-0.21250998973846436,
-0.34287744760513306,
-0.2323751598596573,
0.0019959434866905212,
0.11636404693126678,
-0.08302852511405945,
0.09244918823242188,
-0.2529964745044708,
0.17085915803909302,
0.15478980541229248,
0.08479215204715729,
0.20761753618717194,
-0.03211395442485809,
-0.4283945858478546,
0.06317974627017975,
0.27598223090171814,
0.016005147248506546,
-0.16827118396759033,
0.08855253458023071,
-0.33251258730888367,
0.20825934410095215,
0.11089914292097092,
0.41010433435440063,
-0.09692040830850601,
0.0012383460998535156,
0.20487654209136963,
0.16055065393447876,
0.2482411116361618,
-0.4635753929615021,
-0.15831811726093292,
-0.19165050983428955,
-0.3073832094669342,
0.14557787775993347,
-0.06610328704118729,
-0.13106635212898254,
0.39359205961227417,
-0.03613927215337753,
0.06572027504444122,
-0.19327493011951447,
0.00100698322057724,
-0.2515191435813904,
-0.15094858407974243,
-0.19483473896980286,
0.015966925770044327,
-0.22142896056175232,
-0.05043540522456169,
-0.26836690306663513,
0.20394307374954224,
0.11528261750936508,
-0.03895575553178787,
-0.2019885629415512,
-0.12639975547790527,
-0.17505629360675812,
0.09587056189775467,
-0.061167456209659576,
0.06695056706666946,
0.04935375973582268,
0.040436554700136185,
0.21243011951446533,
0.20874544978141785,
0.3953591585159302,
0.5721637606620789,
0.3576987087726593,
-0.10423833131790161,
-0.20544858276844025,
0.21369221806526184,
-0.012208551168441772,
0.35178130865097046,
0.4592912197113037,
0.059458423405885696,
0.12396785616874695,
0.199274480342865,
0.22486010193824768,
-0.3814557194709778,
-0.3206067383289337,
-0.04009976610541344,
-0.01633504405617714,
-0.3836514949798584,
-0.6445526480674744,
0.19172415137290955,
-0.08655966073274612,
-0.09299278259277344,
0.46199873089790344,
-0.20214125514030457,
-0.18130603432655334,
0.3067103624343872,
0.11880967020988464,
0.7116556763648987,
0.2004757821559906,
-0.1280091106891632,
-0.08082973957061768,
0.14721162617206573,
0.6211409568786621,
-0.12598812580108643,
0.30969175696372986,
-0.09895922243595123,
-0.34365129470825195,
-0.09388183802366257,
0.02876719832420349,
0.218648761510849,
0.3569571375846863,
-0.09297424554824829,
0.3380039632320404,
0.2797406017780304,
0.05031014606356621,
0.024454642087221146,
0.38943755626678467,
0.2260688841342926,
-0.29189732670783997,
0.05191393569111824,
0.040939681231975555,
-0.26360800862312317,
0.1095682680606842,
-0.029113762080669403,
0.06142812594771385,
0.30432945489883423,
-0.017380662262439728,
-0.3451733887195587,
-0.001589260995388031,
-0.2504502534866333,
0.1799796223640442,
-0.2980843186378479,
-0.3518190383911133,
-0.014309242367744446,
0.22457793354988098,
-0.051153820008039474,
-0.4006478190422058,
-0.060093075037002563,
0.1267896294593811,
0.09874902665615082,
0.1411825716495514,
-0.23552784323692322,
-0.2179218977689743,
0.28058183193206787,
-0.06922587007284164,
-0.07415220141410828,
0.032699450850486755,
0.1559431254863739,
-0.4639070928096771,
-0.21319936215877533,
-0.03263254463672638,
0.19737188518047333,
0.26600706577301025,
0.28038570284843445,
0.13937042653560638,
-0.07972268015146255,
-0.2499895989894867,
-0.001124952919781208,
-0.0405939482152462,
-0.15223562717437744,
0.531467080116272,
-0.15184012055397034,
0.0904516875743866,
-0.20528092980384827,
0.3922710418701172,
0.1825878918170929,
0.1486111581325531,
-0.02756732702255249,
0.11244922876358032,
-0.1182924211025238,
-0.11030668020248413,
-0.09317553043365479,
-0.06052488088607788,
-0.11856216937303543,
0.008454520255327225,
-0.29406440258026123,
0.19962066411972046,
0.27630722522735596,
-0.016298582777380943,
0.07249584794044495,
0.3035910129547119,
-0.25033047795295715,
-0.457568883895874,
0.10085532814264297,
0.08082135021686554,
-0.07574636489152908,
-0.10017263889312744,
0.08798982203006744,
-0.11817143857479095,
0.15497618913650513,
0.6689578890800476,
-0.2593654990196228,
-0.22264665365219116,
0.009598851203918457,
0.2004629671573639,
0.08540656417608261,
0.1396985650062561,
-0.08338335156440735,
-0.07921189069747925,
-0.12510380148887634,
0.07765056192874908,
0.024542182683944702,
-0.1204695850610733,
-0.0428435355424881,
0.19635778665542603,
0.21678051352500916,
-0.09578903019428253,
-0.23582208156585693,
-0.324596643447876,
-0.3343942165374756,
-0.10725420713424683,
0.20262300968170166,
0.012907840311527252,
-0.0461440235376358,
-0.08299568295478821,
0.6750946640968323,
0.08769296854734421,
-0.3021237552165985,
0.24845552444458008,
-0.0822640061378479,
-0.050996020436286926,
-0.17750069499015808,
0.19915303587913513,
0.3842018246650696,
-0.12150600552558899,
-0.17338357865810394,
-0.23282815515995026,
0.37631648778915405,
-0.08606995642185211,
0.4022093415260315,
-0.08369158208370209,
0.15544922649860382,
-0.16203370690345764,
0.5856527090072632,
0.23155951499938965,
-0.04679866507649422,
-0.20633524656295776,
0.28424015641212463,
0.10000159591436386,
-0.20904818177223206,
-0.20226672291755676,
0.051618073135614395,
0.33272844552993774,
0.1875542551279068,
0.4447084665298462,
0.39823317527770996,
-0.12155617773532867,
-0.2642560303211212,
0.09424786269664764,
0.5052286386489868,
-0.19930879771709442,
0.20498985052108765,
0.0005274559371173382,
0.13664285838603973,
0.19577041268348694,
-0.1093682050704956,
0.22564071416854858,
0.03534727543592453,
0.304769366979599,
-0.3092609941959381,
0.7399809956550598,
0.1800457090139389,
-0.04088064283132553,
0.26147162914276123,
-0.4083422124385834,
-0.027955103665590286,
0.0511932373046875,
-0.27629613876342773,
0.21890032291412354,
-0.11413562297821045,
0.05269940197467804,
-0.2647417187690735,
-0.22853687405586243,
-0.014623750001192093,
0.2962864339351654,
-0.002693724352866411,
0.031127575784921646,
-0.5655739307403564,
-0.008411988615989685,
-0.20485199987888336,
0.0021113306283950806,
0.028320545330643654,
-0.03827006742358208,
0.5511711835861206,
0.07702211290597916,
-0.041578423231840134,
-0.21449188888072968,
-0.06528092920780182,
0.05460263416171074,
0.14385336637496948,
-0.28721684217453003,
0.2275797724723816,
0.3027360439300537,
-0.13196931779384613,
0.07006557285785675,
0.1666833758354187,
0.07416398823261261,
0.26832813024520874,
-0.053863245993852615,
0.2339264303445816,
0.3050244450569153,
-0.06516563147306442,
-0.09334377199411392,
0.40177035331726074,
0.03326905518770218,
-0.15578347444534302,
0.2595016062259674,
-0.00023682788014411926,
0.017757251858711243,
0.2346586138010025,
0.2817247807979584,
-0.06593585014343262,
0.025959346443414688,
0.459255188703537,
-0.06756645441055298,
0.14546972513198853,
0.13626807928085327,
0.005246706306934357,
-0.37799328565597534,
-0.01038924977183342,
0.350979745388031,
-0.45905059576034546,
0.05125473812222481,
-0.022730836644768715,
0.004870064556598663,
-0.1468215137720108,
0.5160329937934875,
0.16500578820705414,
0.03988877683877945,
-0.2612239420413971,
-0.29604411125183105,
-0.5132619738578796,
0.08484984189271927,
-0.4117299020290375,
-0.16564467549324036,
-0.02849666215479374,
0.43281829357147217,
0.07081688940525055,
0.19639864563941956,
-0.3687134385108948,
0.08428403735160828,
-0.1745309680700302,
0.5773721933364868,
-0.2791088819503784,
-0.08937016129493713,
-0.5378432273864746,
0.15635201334953308,
0.09824883192777634,
-0.3539040684700012,
0.45212867856025696,
0.26110634207725525,
-0.1391412615776062,
0.07427337765693665,
0.005071297287940979,
0.26286131143569946,
0.005235630087554455,
-0.3676958382129669,
0.09250601381063461,
0.33780398964881897,
0.0506775826215744,
0.09396832436323166,
-0.0835827887058258,
0.12262168526649475,
-0.4526345729827881,
0.19286896288394928,
0.09724687039852142,
0.3620455265045166,
-0.19569164514541626,
-0.15890656411647797,
-0.29978421330451965,
0.35243454575538635,
0.03415100276470184,
-0.20737066864967346,
-0.27364835143089294,
0.08183158934116364,
-0.1954088807106018,
0.2924795150756836,
0.3380967974662781,
0.14995163679122925,
-0.23145905137062073,
-0.12317950278520584,
-0.31143924593925476,
-0.1804192215204239,
0.3792820870876312,
-0.47693243622779846,
0.045383088290691376,
-0.4637560248374939,
0.23137111961841583,
0.2531643509864807,
0.1970571130514145,
-0.25030016899108887,
-0.3180619478225708,
0.22695736587047577,
-0.32072004675865173,
0.057510972023010254,
0.07607784122228622,
0.12044914066791534,
-0.2699720561504364,
-0.1574166715145111,
-0.40562427043914795,
0.032632339745759964,
-0.5015792846679688,
0.22198708355426788,
-0.30460089445114136
] |
https://github.com/huggingface/datasets/issues/6623 | > if dataset.n_shards % world_size != 0 then all the nodes will read/stream the full dataset in order (possibly reading/streaming the same data multiple times), BUT will only yield one example out of world_size so that each example goes to one exactly one GPU.
considering there's just 1 shard and 2 worker nodes, do you mean each worker node will load the whole dataset but still receive half of that shard while streaming? | streaming datasets doesn't work properly with multi-node | ### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave. | 73 | streaming datasets doesn't work properly with multi-node
### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave.
> if dataset.n_shards % world_size != 0 then all the nodes will read/stream the full dataset in order (possibly reading/streaming the same data multiple times), BUT will only yield one example out of world_size so that each example goes to one exactly one GPU.
considering there's just 1 shard and 2 worker nodes, do you mean each worker node will load the whole dataset but still receive half of that shard while streaming? | [
-0.5885023474693298,
-0.2717367708683014,
-0.022129017859697342,
0.05329866707324982,
-0.05288459733128548,
-0.24468931555747986,
0.28833165764808655,
-0.16213496029376984,
-0.05456581711769104,
0.17409411072731018,
0.13106313347816467,
0.20888292789459229,
-0.21015878021717072,
0.1710551381111145,
-0.05287248641252518,
-0.2316754013299942,
0.07644330710172653,
0.01057659462094307,
0.04034364968538284,
-0.2694319486618042,
-0.07909917831420898,
-0.16820268332958221,
-0.22020316123962402,
-0.4776022434234619,
-0.23010557889938354,
-0.34483352303504944,
-0.1880214959383011,
0.17915897071361542,
0.04292941093444824,
-0.0007918775081634521,
-0.024187937378883362,
0.21599668264389038,
0.22667305171489716,
0.26554247736930847,
-0.00011949403415201232,
-0.17549662292003632,
0.14307358860969543,
-0.033987656235694885,
-0.2797178626060486,
-0.10833810269832611,
-0.4525478482246399,
0.12000128626823425,
-0.0856480672955513,
-0.15769720077514648,
-0.005377188324928284,
0.0469653457403183,
0.16009725630283356,
-0.5938501954078674,
0.4552592635154724,
-0.03413572907447815,
0.08512648195028305,
0.01408693939447403,
-0.2336328625679016,
0.11152130365371704,
-0.18026015162467957,
0.3543376922607422,
0.005941025912761688,
-0.023008089512586594,
0.3836512565612793,
-0.10668213665485382,
-0.2726716697216034,
0.3208426833152771,
-0.17977496981620789,
0.3480873107910156,
-0.009544376283884048,
-0.1916971206665039,
-0.13937494158744812,
-0.3502672016620636,
-0.16309091448783875,
0.19770018756389618,
0.24191229045391083,
-0.12461245805025101,
-0.39788925647735596,
-0.521531343460083,
-0.14842446148395538,
-0.3500770926475525,
-0.23801052570343018,
0.18176981806755066,
-0.2481730580329895,
-0.0703870952129364,
-0.4510071277618408,
-0.23377658426761627,
-0.039797209203243256,
0.11789821088314056,
0.15419495105743408,
0.7694438695907593,
0.16675050556659698,
0.23403680324554443,
-0.1394328773021698,
0.29044508934020996,
0.3079175055027008,
-0.2309572994709015,
0.09334338456392288,
-0.13752999901771545,
-0.4325198531150818,
0.018086589872837067,
0.05734461918473244,
0.04305759817361832,
0.16307535767555237,
0.47958433628082275,
0.30966776609420776,
0.039084240794181824,
0.2876565754413605,
0.16717436909675598,
0.39613404870033264,
-0.18216004967689514,
-0.07782210409641266,
0.13634347915649414,
0.2166709154844284,
-0.017559371888637543,
0.08888927102088928,
0.020971247926354408,
0.21538354456424713,
0.23815034329891205,
-0.24705252051353455,
0.18153789639472961,
0.21558597683906555,
0.06319627165794373,
-0.057585135102272034,
-0.33602985739707947,
-0.03557462990283966,
-0.1887940913438797,
0.13759249448776245,
0.04293625056743622,
0.03659946843981743,
0.24672368168830872,
-0.4028873145580292,
0.15768982470035553,
-0.16016718745231628,
-0.5503530502319336,
-0.21842163801193237,
-0.3020685017108917,
-0.15051349997520447,
0.36816567182540894,
0.14705823361873627,
-0.0330776646733284,
0.2690260112285614,
-0.02857164293527603,
0.10693713277578354,
0.1553390473127365,
-0.07142554968595505,
-0.27262142300605774,
0.024798860773444176,
0.23033371567726135,
0.18815961480140686,
0.09010680019855499,
0.036062948405742645,
0.08091837167739868,
-0.07104326784610748,
0.17591574788093567,
-0.01980457827448845,
-0.33053672313690186,
0.19016502797603607,
0.08777797967195511,
-0.019701950252056122,
-0.013415093533694744,
-0.5710844993591309,
0.4722989499568939,
0.330960214138031,
-0.22632598876953125,
0.00015896186232566833,
-0.056308429688215256,
-0.37576544284820557,
-0.22712896764278412,
0.32718145847320557,
0.4236840605735779,
-0.08281472325325012,
-0.11036442220211029,
-0.07954616844654083,
0.10516591370105743,
0.559253990650177,
0.4052501320838928,
-0.17483340203762054,
-0.07906554639339447,
0.020856671035289764,
0.15972900390625,
0.16132764518260956,
-0.2096678912639618,
-0.25260594487190247,
0.4820108711719513,
-0.24641740322113037,
0.2487398236989975,
0.35342103242874146,
0.1166631281375885,
0.617304801940918,
-0.17541232705116272,
-0.07058148086071014,
0.6404229402542114,
-0.4585624933242798,
0.08418096601963043,
-0.38688284158706665,
-0.005343355238437653,
-0.10611443221569061,
0.25615841150283813,
0.16894984245300293,
0.12541131675243378,
0.24003133177757263,
0.2963806092739105,
0.3235984146595001,
0.08058828860521317,
0.35313987731933594,
-0.06989148259162903,
0.2761307954788208,
-0.2106955647468567,
0.049497976899147034,
-0.11211924254894257,
-0.6091260313987732,
0.28869563341140747,
0.07801954448223114,
-0.27191469073295593,
0.0680549144744873,
-0.23662494122982025,
0.44753289222717285,
-0.15206006169319153,
-0.0822150856256485,
-0.23689866065979004,
-0.03141500800848007,
0.26023662090301514,
0.2944309711456299,
-0.10916776955127716,
-0.3123038113117218,
0.2191813886165619,
-0.42277610301971436,
-0.02126145362854004,
-0.26497286558151245,
0.5215786099433899,
0.21814259886741638,
-0.21846994757652283,
-0.0010435879230499268,
0.045710932463407516,
0.14224129915237427,
-0.15118201076984406,
0.015415862202644348,
0.33918988704681396,
0.2921460270881653,
0.18274448812007904,
-0.08908434212207794,
0.1525992751121521,
0.40113458037376404,
-0.08527597039937973,
0.06607906520366669,
0.24203136563301086,
0.003439906984567642,
-0.3257346451282501,
-0.27416977286338806,
0.18110360205173492,
-0.15961357951164246,
0.3226219117641449,
0.12815937399864197,
0.05069836974143982,
0.2503218650817871,
-0.04333620145916939,
-0.1160278394818306,
0.07843576371669769,
0.10563630610704422,
-0.3318949341773987,
0.23888325691223145,
-0.10024002194404602,
-0.5517885088920593,
0.38689136505126953,
-0.007618499919772148,
0.06681092083454132,
-0.025056421756744385,
-0.183919757604599,
-0.0696144700050354,
-0.13988539576530457,
0.47877833247184753,
0.5028660297393799,
0.47347626090049744,
0.17877982556819916,
0.3006388545036316,
-0.029582621529698372,
0.09126587957143784,
-0.3178114593029022,
-0.0831855833530426,
0.04881472885608673,
0.23611204326152802,
0.2955628037452698,
-0.11971695721149445,
-0.04904571920633316,
-0.1970173865556717,
-0.23455947637557983,
0.3719569742679596,
0.05490919202566147,
-0.1710328459739685,
0.06568951159715652,
-0.31892722845077515,
-0.4927380681037903,
-0.22923643887043,
-0.045837175101041794,
-0.05014248937368393,
-0.17293314635753632,
0.06627776473760605,
0.7270770072937012,
-0.06778944283723831,
0.28438833355903625,
0.47979599237442017,
0.4485873579978943,
-0.21059271693229675,
0.1654486060142517,
-0.14575327932834625,
-0.18223978579044342,
0.0032022353261709213,
0.0369364470243454,
0.22898724675178528,
0.09430357813835144,
0.33727672696113586,
0.28389203548431396,
-0.16278596222400665,
-0.2981051802635193,
0.10762080550193787,
-0.09899180382490158,
0.00272422656416893,
-0.0963461697101593,
-0.17546817660331726,
-0.25050976872444153,
-0.03215603902935982,
0.003959033638238907,
-0.07086239755153656,
-0.24277536571025848,
-0.02813585475087166,
-0.013979624956846237,
-0.05706073343753815,
-0.2292422503232956,
-0.10658164322376251,
-0.008825637400150299,
-0.4428950250148773,
-0.33722180128097534,
0.03422681242227554,
-0.023857880383729935,
0.21627111732959747,
-0.106937475502491,
0.09920388460159302,
-0.317745178937912,
0.13228967785835266,
-0.2115560919046402,
0.004646945744752884,
-0.2248537242412567,
0.10413463413715363,
-0.20951318740844727,
-0.3363834023475647,
-0.18087321519851685,
0.016225799918174744,
-0.032758019864559174,
0.7001858353614807,
-0.3680460453033447,
-0.022672176361083984,
0.22942234575748444,
-0.28300631046295166,
0.13002845644950867,
-0.01745235174894333,
0.1841202676296234,
-0.21101859211921692,
0.0608733668923378,
-0.09832748770713806,
0.30754420161247253,
0.09404551982879639,
0.11913974583148956,
0.3478055000305176,
0.24098807573318481,
0.2969389855861664,
0.18660897016525269,
0.9571035504341125,
0.4824317395687103,
-0.04224644973874092,
0.14983172714710236,
0.19642145931720734,
-0.056599751114845276,
0.012742290273308754,
-0.0643312931060791,
0.3703346848487854,
-0.0830574780702591,
-0.045186202973127365,
0.12593674659729004,
-0.21250998973846436,
-0.34287744760513306,
-0.2323751598596573,
0.0019959434866905212,
0.11636404693126678,
-0.08302852511405945,
0.09244918823242188,
-0.2529964745044708,
0.17085915803909302,
0.15478980541229248,
0.08479215204715729,
0.20761753618717194,
-0.03211395442485809,
-0.4283945858478546,
0.06317974627017975,
0.27598223090171814,
0.016005147248506546,
-0.16827118396759033,
0.08855253458023071,
-0.33251258730888367,
0.20825934410095215,
0.11089914292097092,
0.41010433435440063,
-0.09692040830850601,
0.0012383460998535156,
0.20487654209136963,
0.16055065393447876,
0.2482411116361618,
-0.4635753929615021,
-0.15831811726093292,
-0.19165050983428955,
-0.3073832094669342,
0.14557787775993347,
-0.06610328704118729,
-0.13106635212898254,
0.39359205961227417,
-0.03613927215337753,
0.06572027504444122,
-0.19327493011951447,
0.00100698322057724,
-0.2515191435813904,
-0.15094858407974243,
-0.19483473896980286,
0.015966925770044327,
-0.22142896056175232,
-0.05043540522456169,
-0.26836690306663513,
0.20394307374954224,
0.11528261750936508,
-0.03895575553178787,
-0.2019885629415512,
-0.12639975547790527,
-0.17505629360675812,
0.09587056189775467,
-0.061167456209659576,
0.06695056706666946,
0.04935375973582268,
0.040436554700136185,
0.21243011951446533,
0.20874544978141785,
0.3953591585159302,
0.5721637606620789,
0.3576987087726593,
-0.10423833131790161,
-0.20544858276844025,
0.21369221806526184,
-0.012208551168441772,
0.35178130865097046,
0.4592912197113037,
0.059458423405885696,
0.12396785616874695,
0.199274480342865,
0.22486010193824768,
-0.3814557194709778,
-0.3206067383289337,
-0.04009976610541344,
-0.01633504405617714,
-0.3836514949798584,
-0.6445526480674744,
0.19172415137290955,
-0.08655966073274612,
-0.09299278259277344,
0.46199873089790344,
-0.20214125514030457,
-0.18130603432655334,
0.3067103624343872,
0.11880967020988464,
0.7116556763648987,
0.2004757821559906,
-0.1280091106891632,
-0.08082973957061768,
0.14721162617206573,
0.6211409568786621,
-0.12598812580108643,
0.30969175696372986,
-0.09895922243595123,
-0.34365129470825195,
-0.09388183802366257,
0.02876719832420349,
0.218648761510849,
0.3569571375846863,
-0.09297424554824829,
0.3380039632320404,
0.2797406017780304,
0.05031014606356621,
0.024454642087221146,
0.38943755626678467,
0.2260688841342926,
-0.29189732670783997,
0.05191393569111824,
0.040939681231975555,
-0.26360800862312317,
0.1095682680606842,
-0.029113762080669403,
0.06142812594771385,
0.30432945489883423,
-0.017380662262439728,
-0.3451733887195587,
-0.001589260995388031,
-0.2504502534866333,
0.1799796223640442,
-0.2980843186378479,
-0.3518190383911133,
-0.014309242367744446,
0.22457793354988098,
-0.051153820008039474,
-0.4006478190422058,
-0.060093075037002563,
0.1267896294593811,
0.09874902665615082,
0.1411825716495514,
-0.23552784323692322,
-0.2179218977689743,
0.28058183193206787,
-0.06922587007284164,
-0.07415220141410828,
0.032699450850486755,
0.1559431254863739,
-0.4639070928096771,
-0.21319936215877533,
-0.03263254463672638,
0.19737188518047333,
0.26600706577301025,
0.28038570284843445,
0.13937042653560638,
-0.07972268015146255,
-0.2499895989894867,
-0.001124952919781208,
-0.0405939482152462,
-0.15223562717437744,
0.531467080116272,
-0.15184012055397034,
0.0904516875743866,
-0.20528092980384827,
0.3922710418701172,
0.1825878918170929,
0.1486111581325531,
-0.02756732702255249,
0.11244922876358032,
-0.1182924211025238,
-0.11030668020248413,
-0.09317553043365479,
-0.06052488088607788,
-0.11856216937303543,
0.008454520255327225,
-0.29406440258026123,
0.19962066411972046,
0.27630722522735596,
-0.016298582777380943,
0.07249584794044495,
0.3035910129547119,
-0.25033047795295715,
-0.457568883895874,
0.10085532814264297,
0.08082135021686554,
-0.07574636489152908,
-0.10017263889312744,
0.08798982203006744,
-0.11817143857479095,
0.15497618913650513,
0.6689578890800476,
-0.2593654990196228,
-0.22264665365219116,
0.009598851203918457,
0.2004629671573639,
0.08540656417608261,
0.1396985650062561,
-0.08338335156440735,
-0.07921189069747925,
-0.12510380148887634,
0.07765056192874908,
0.024542182683944702,
-0.1204695850610733,
-0.0428435355424881,
0.19635778665542603,
0.21678051352500916,
-0.09578903019428253,
-0.23582208156585693,
-0.324596643447876,
-0.3343942165374756,
-0.10725420713424683,
0.20262300968170166,
0.012907840311527252,
-0.0461440235376358,
-0.08299568295478821,
0.6750946640968323,
0.08769296854734421,
-0.3021237552165985,
0.24845552444458008,
-0.0822640061378479,
-0.050996020436286926,
-0.17750069499015808,
0.19915303587913513,
0.3842018246650696,
-0.12150600552558899,
-0.17338357865810394,
-0.23282815515995026,
0.37631648778915405,
-0.08606995642185211,
0.4022093415260315,
-0.08369158208370209,
0.15544922649860382,
-0.16203370690345764,
0.5856527090072632,
0.23155951499938965,
-0.04679866507649422,
-0.20633524656295776,
0.28424015641212463,
0.10000159591436386,
-0.20904818177223206,
-0.20226672291755676,
0.051618073135614395,
0.33272844552993774,
0.1875542551279068,
0.4447084665298462,
0.39823317527770996,
-0.12155617773532867,
-0.2642560303211212,
0.09424786269664764,
0.5052286386489868,
-0.19930879771709442,
0.20498985052108765,
0.0005274559371173382,
0.13664285838603973,
0.19577041268348694,
-0.1093682050704956,
0.22564071416854858,
0.03534727543592453,
0.304769366979599,
-0.3092609941959381,
0.7399809956550598,
0.1800457090139389,
-0.04088064283132553,
0.26147162914276123,
-0.4083422124385834,
-0.027955103665590286,
0.0511932373046875,
-0.27629613876342773,
0.21890032291412354,
-0.11413562297821045,
0.05269940197467804,
-0.2647417187690735,
-0.22853687405586243,
-0.014623750001192093,
0.2962864339351654,
-0.002693724352866411,
0.031127575784921646,
-0.5655739307403564,
-0.008411988615989685,
-0.20485199987888336,
0.0021113306283950806,
0.028320545330643654,
-0.03827006742358208,
0.5511711835861206,
0.07702211290597916,
-0.041578423231840134,
-0.21449188888072968,
-0.06528092920780182,
0.05460263416171074,
0.14385336637496948,
-0.28721684217453003,
0.2275797724723816,
0.3027360439300537,
-0.13196931779384613,
0.07006557285785675,
0.1666833758354187,
0.07416398823261261,
0.26832813024520874,
-0.053863245993852615,
0.2339264303445816,
0.3050244450569153,
-0.06516563147306442,
-0.09334377199411392,
0.40177035331726074,
0.03326905518770218,
-0.15578347444534302,
0.2595016062259674,
-0.00023682788014411926,
0.017757251858711243,
0.2346586138010025,
0.2817247807979584,
-0.06593585014343262,
0.025959346443414688,
0.459255188703537,
-0.06756645441055298,
0.14546972513198853,
0.13626807928085327,
0.005246706306934357,
-0.37799328565597534,
-0.01038924977183342,
0.350979745388031,
-0.45905059576034546,
0.05125473812222481,
-0.022730836644768715,
0.004870064556598663,
-0.1468215137720108,
0.5160329937934875,
0.16500578820705414,
0.03988877683877945,
-0.2612239420413971,
-0.29604411125183105,
-0.5132619738578796,
0.08484984189271927,
-0.4117299020290375,
-0.16564467549324036,
-0.02849666215479374,
0.43281829357147217,
0.07081688940525055,
0.19639864563941956,
-0.3687134385108948,
0.08428403735160828,
-0.1745309680700302,
0.5773721933364868,
-0.2791088819503784,
-0.08937016129493713,
-0.5378432273864746,
0.15635201334953308,
0.09824883192777634,
-0.3539040684700012,
0.45212867856025696,
0.26110634207725525,
-0.1391412615776062,
0.07427337765693665,
0.005071297287940979,
0.26286131143569946,
0.005235630087554455,
-0.3676958382129669,
0.09250601381063461,
0.33780398964881897,
0.0506775826215744,
0.09396832436323166,
-0.0835827887058258,
0.12262168526649475,
-0.4526345729827881,
0.19286896288394928,
0.09724687039852142,
0.3620455265045166,
-0.19569164514541626,
-0.15890656411647797,
-0.29978421330451965,
0.35243454575538635,
0.03415100276470184,
-0.20737066864967346,
-0.27364835143089294,
0.08183158934116364,
-0.1954088807106018,
0.2924795150756836,
0.3380967974662781,
0.14995163679122925,
-0.23145905137062073,
-0.12317950278520584,
-0.31143924593925476,
-0.1804192215204239,
0.3792820870876312,
-0.47693243622779846,
0.045383088290691376,
-0.4637560248374939,
0.23137111961841583,
0.2531643509864807,
0.1970571130514145,
-0.25030016899108887,
-0.3180619478225708,
0.22695736587047577,
-0.32072004675865173,
0.057510972023010254,
0.07607784122228622,
0.12044914066791534,
-0.2699720561504364,
-0.1574166715145111,
-0.40562427043914795,
0.032632339745759964,
-0.5015792846679688,
0.22198708355426788,
-0.30460089445114136
] |
https://github.com/huggingface/datasets/issues/6623 | Yes both nodes will stream from the 1 shard, but each node will skip half of the examples. This way in total each example is seen once and exactly once during you distributed training.
Though it terms of I/O, the dataset is effectively read/streamed twice. | streaming datasets doesn't work properly with multi-node | ### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave. | 45 | streaming datasets doesn't work properly with multi-node
### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave.
Yes both nodes will stream from the 1 shard, but each node will skip half of the examples. This way in total each example is seen once and exactly once during you distributed training.
Though it terms of I/O, the dataset is effectively read/streamed twice. | [
-0.5885023474693298,
-0.2717367708683014,
-0.022129017859697342,
0.05329866707324982,
-0.05288459733128548,
-0.24468931555747986,
0.28833165764808655,
-0.16213496029376984,
-0.05456581711769104,
0.17409411072731018,
0.13106313347816467,
0.20888292789459229,
-0.21015878021717072,
0.1710551381111145,
-0.05287248641252518,
-0.2316754013299942,
0.07644330710172653,
0.01057659462094307,
0.04034364968538284,
-0.2694319486618042,
-0.07909917831420898,
-0.16820268332958221,
-0.22020316123962402,
-0.4776022434234619,
-0.23010557889938354,
-0.34483352303504944,
-0.1880214959383011,
0.17915897071361542,
0.04292941093444824,
-0.0007918775081634521,
-0.024187937378883362,
0.21599668264389038,
0.22667305171489716,
0.26554247736930847,
-0.00011949403415201232,
-0.17549662292003632,
0.14307358860969543,
-0.033987656235694885,
-0.2797178626060486,
-0.10833810269832611,
-0.4525478482246399,
0.12000128626823425,
-0.0856480672955513,
-0.15769720077514648,
-0.005377188324928284,
0.0469653457403183,
0.16009725630283356,
-0.5938501954078674,
0.4552592635154724,
-0.03413572907447815,
0.08512648195028305,
0.01408693939447403,
-0.2336328625679016,
0.11152130365371704,
-0.18026015162467957,
0.3543376922607422,
0.005941025912761688,
-0.023008089512586594,
0.3836512565612793,
-0.10668213665485382,
-0.2726716697216034,
0.3208426833152771,
-0.17977496981620789,
0.3480873107910156,
-0.009544376283884048,
-0.1916971206665039,
-0.13937494158744812,
-0.3502672016620636,
-0.16309091448783875,
0.19770018756389618,
0.24191229045391083,
-0.12461245805025101,
-0.39788925647735596,
-0.521531343460083,
-0.14842446148395538,
-0.3500770926475525,
-0.23801052570343018,
0.18176981806755066,
-0.2481730580329895,
-0.0703870952129364,
-0.4510071277618408,
-0.23377658426761627,
-0.039797209203243256,
0.11789821088314056,
0.15419495105743408,
0.7694438695907593,
0.16675050556659698,
0.23403680324554443,
-0.1394328773021698,
0.29044508934020996,
0.3079175055027008,
-0.2309572994709015,
0.09334338456392288,
-0.13752999901771545,
-0.4325198531150818,
0.018086589872837067,
0.05734461918473244,
0.04305759817361832,
0.16307535767555237,
0.47958433628082275,
0.30966776609420776,
0.039084240794181824,
0.2876565754413605,
0.16717436909675598,
0.39613404870033264,
-0.18216004967689514,
-0.07782210409641266,
0.13634347915649414,
0.2166709154844284,
-0.017559371888637543,
0.08888927102088928,
0.020971247926354408,
0.21538354456424713,
0.23815034329891205,
-0.24705252051353455,
0.18153789639472961,
0.21558597683906555,
0.06319627165794373,
-0.057585135102272034,
-0.33602985739707947,
-0.03557462990283966,
-0.1887940913438797,
0.13759249448776245,
0.04293625056743622,
0.03659946843981743,
0.24672368168830872,
-0.4028873145580292,
0.15768982470035553,
-0.16016718745231628,
-0.5503530502319336,
-0.21842163801193237,
-0.3020685017108917,
-0.15051349997520447,
0.36816567182540894,
0.14705823361873627,
-0.0330776646733284,
0.2690260112285614,
-0.02857164293527603,
0.10693713277578354,
0.1553390473127365,
-0.07142554968595505,
-0.27262142300605774,
0.024798860773444176,
0.23033371567726135,
0.18815961480140686,
0.09010680019855499,
0.036062948405742645,
0.08091837167739868,
-0.07104326784610748,
0.17591574788093567,
-0.01980457827448845,
-0.33053672313690186,
0.19016502797603607,
0.08777797967195511,
-0.019701950252056122,
-0.013415093533694744,
-0.5710844993591309,
0.4722989499568939,
0.330960214138031,
-0.22632598876953125,
0.00015896186232566833,
-0.056308429688215256,
-0.37576544284820557,
-0.22712896764278412,
0.32718145847320557,
0.4236840605735779,
-0.08281472325325012,
-0.11036442220211029,
-0.07954616844654083,
0.10516591370105743,
0.559253990650177,
0.4052501320838928,
-0.17483340203762054,
-0.07906554639339447,
0.020856671035289764,
0.15972900390625,
0.16132764518260956,
-0.2096678912639618,
-0.25260594487190247,
0.4820108711719513,
-0.24641740322113037,
0.2487398236989975,
0.35342103242874146,
0.1166631281375885,
0.617304801940918,
-0.17541232705116272,
-0.07058148086071014,
0.6404229402542114,
-0.4585624933242798,
0.08418096601963043,
-0.38688284158706665,
-0.005343355238437653,
-0.10611443221569061,
0.25615841150283813,
0.16894984245300293,
0.12541131675243378,
0.24003133177757263,
0.2963806092739105,
0.3235984146595001,
0.08058828860521317,
0.35313987731933594,
-0.06989148259162903,
0.2761307954788208,
-0.2106955647468567,
0.049497976899147034,
-0.11211924254894257,
-0.6091260313987732,
0.28869563341140747,
0.07801954448223114,
-0.27191469073295593,
0.0680549144744873,
-0.23662494122982025,
0.44753289222717285,
-0.15206006169319153,
-0.0822150856256485,
-0.23689866065979004,
-0.03141500800848007,
0.26023662090301514,
0.2944309711456299,
-0.10916776955127716,
-0.3123038113117218,
0.2191813886165619,
-0.42277610301971436,
-0.02126145362854004,
-0.26497286558151245,
0.5215786099433899,
0.21814259886741638,
-0.21846994757652283,
-0.0010435879230499268,
0.045710932463407516,
0.14224129915237427,
-0.15118201076984406,
0.015415862202644348,
0.33918988704681396,
0.2921460270881653,
0.18274448812007904,
-0.08908434212207794,
0.1525992751121521,
0.40113458037376404,
-0.08527597039937973,
0.06607906520366669,
0.24203136563301086,
0.003439906984567642,
-0.3257346451282501,
-0.27416977286338806,
0.18110360205173492,
-0.15961357951164246,
0.3226219117641449,
0.12815937399864197,
0.05069836974143982,
0.2503218650817871,
-0.04333620145916939,
-0.1160278394818306,
0.07843576371669769,
0.10563630610704422,
-0.3318949341773987,
0.23888325691223145,
-0.10024002194404602,
-0.5517885088920593,
0.38689136505126953,
-0.007618499919772148,
0.06681092083454132,
-0.025056421756744385,
-0.183919757604599,
-0.0696144700050354,
-0.13988539576530457,
0.47877833247184753,
0.5028660297393799,
0.47347626090049744,
0.17877982556819916,
0.3006388545036316,
-0.029582621529698372,
0.09126587957143784,
-0.3178114593029022,
-0.0831855833530426,
0.04881472885608673,
0.23611204326152802,
0.2955628037452698,
-0.11971695721149445,
-0.04904571920633316,
-0.1970173865556717,
-0.23455947637557983,
0.3719569742679596,
0.05490919202566147,
-0.1710328459739685,
0.06568951159715652,
-0.31892722845077515,
-0.4927380681037903,
-0.22923643887043,
-0.045837175101041794,
-0.05014248937368393,
-0.17293314635753632,
0.06627776473760605,
0.7270770072937012,
-0.06778944283723831,
0.28438833355903625,
0.47979599237442017,
0.4485873579978943,
-0.21059271693229675,
0.1654486060142517,
-0.14575327932834625,
-0.18223978579044342,
0.0032022353261709213,
0.0369364470243454,
0.22898724675178528,
0.09430357813835144,
0.33727672696113586,
0.28389203548431396,
-0.16278596222400665,
-0.2981051802635193,
0.10762080550193787,
-0.09899180382490158,
0.00272422656416893,
-0.0963461697101593,
-0.17546817660331726,
-0.25050976872444153,
-0.03215603902935982,
0.003959033638238907,
-0.07086239755153656,
-0.24277536571025848,
-0.02813585475087166,
-0.013979624956846237,
-0.05706073343753815,
-0.2292422503232956,
-0.10658164322376251,
-0.008825637400150299,
-0.4428950250148773,
-0.33722180128097534,
0.03422681242227554,
-0.023857880383729935,
0.21627111732959747,
-0.106937475502491,
0.09920388460159302,
-0.317745178937912,
0.13228967785835266,
-0.2115560919046402,
0.004646945744752884,
-0.2248537242412567,
0.10413463413715363,
-0.20951318740844727,
-0.3363834023475647,
-0.18087321519851685,
0.016225799918174744,
-0.032758019864559174,
0.7001858353614807,
-0.3680460453033447,
-0.022672176361083984,
0.22942234575748444,
-0.28300631046295166,
0.13002845644950867,
-0.01745235174894333,
0.1841202676296234,
-0.21101859211921692,
0.0608733668923378,
-0.09832748770713806,
0.30754420161247253,
0.09404551982879639,
0.11913974583148956,
0.3478055000305176,
0.24098807573318481,
0.2969389855861664,
0.18660897016525269,
0.9571035504341125,
0.4824317395687103,
-0.04224644973874092,
0.14983172714710236,
0.19642145931720734,
-0.056599751114845276,
0.012742290273308754,
-0.0643312931060791,
0.3703346848487854,
-0.0830574780702591,
-0.045186202973127365,
0.12593674659729004,
-0.21250998973846436,
-0.34287744760513306,
-0.2323751598596573,
0.0019959434866905212,
0.11636404693126678,
-0.08302852511405945,
0.09244918823242188,
-0.2529964745044708,
0.17085915803909302,
0.15478980541229248,
0.08479215204715729,
0.20761753618717194,
-0.03211395442485809,
-0.4283945858478546,
0.06317974627017975,
0.27598223090171814,
0.016005147248506546,
-0.16827118396759033,
0.08855253458023071,
-0.33251258730888367,
0.20825934410095215,
0.11089914292097092,
0.41010433435440063,
-0.09692040830850601,
0.0012383460998535156,
0.20487654209136963,
0.16055065393447876,
0.2482411116361618,
-0.4635753929615021,
-0.15831811726093292,
-0.19165050983428955,
-0.3073832094669342,
0.14557787775993347,
-0.06610328704118729,
-0.13106635212898254,
0.39359205961227417,
-0.03613927215337753,
0.06572027504444122,
-0.19327493011951447,
0.00100698322057724,
-0.2515191435813904,
-0.15094858407974243,
-0.19483473896980286,
0.015966925770044327,
-0.22142896056175232,
-0.05043540522456169,
-0.26836690306663513,
0.20394307374954224,
0.11528261750936508,
-0.03895575553178787,
-0.2019885629415512,
-0.12639975547790527,
-0.17505629360675812,
0.09587056189775467,
-0.061167456209659576,
0.06695056706666946,
0.04935375973582268,
0.040436554700136185,
0.21243011951446533,
0.20874544978141785,
0.3953591585159302,
0.5721637606620789,
0.3576987087726593,
-0.10423833131790161,
-0.20544858276844025,
0.21369221806526184,
-0.012208551168441772,
0.35178130865097046,
0.4592912197113037,
0.059458423405885696,
0.12396785616874695,
0.199274480342865,
0.22486010193824768,
-0.3814557194709778,
-0.3206067383289337,
-0.04009976610541344,
-0.01633504405617714,
-0.3836514949798584,
-0.6445526480674744,
0.19172415137290955,
-0.08655966073274612,
-0.09299278259277344,
0.46199873089790344,
-0.20214125514030457,
-0.18130603432655334,
0.3067103624343872,
0.11880967020988464,
0.7116556763648987,
0.2004757821559906,
-0.1280091106891632,
-0.08082973957061768,
0.14721162617206573,
0.6211409568786621,
-0.12598812580108643,
0.30969175696372986,
-0.09895922243595123,
-0.34365129470825195,
-0.09388183802366257,
0.02876719832420349,
0.218648761510849,
0.3569571375846863,
-0.09297424554824829,
0.3380039632320404,
0.2797406017780304,
0.05031014606356621,
0.024454642087221146,
0.38943755626678467,
0.2260688841342926,
-0.29189732670783997,
0.05191393569111824,
0.040939681231975555,
-0.26360800862312317,
0.1095682680606842,
-0.029113762080669403,
0.06142812594771385,
0.30432945489883423,
-0.017380662262439728,
-0.3451733887195587,
-0.001589260995388031,
-0.2504502534866333,
0.1799796223640442,
-0.2980843186378479,
-0.3518190383911133,
-0.014309242367744446,
0.22457793354988098,
-0.051153820008039474,
-0.4006478190422058,
-0.060093075037002563,
0.1267896294593811,
0.09874902665615082,
0.1411825716495514,
-0.23552784323692322,
-0.2179218977689743,
0.28058183193206787,
-0.06922587007284164,
-0.07415220141410828,
0.032699450850486755,
0.1559431254863739,
-0.4639070928096771,
-0.21319936215877533,
-0.03263254463672638,
0.19737188518047333,
0.26600706577301025,
0.28038570284843445,
0.13937042653560638,
-0.07972268015146255,
-0.2499895989894867,
-0.001124952919781208,
-0.0405939482152462,
-0.15223562717437744,
0.531467080116272,
-0.15184012055397034,
0.0904516875743866,
-0.20528092980384827,
0.3922710418701172,
0.1825878918170929,
0.1486111581325531,
-0.02756732702255249,
0.11244922876358032,
-0.1182924211025238,
-0.11030668020248413,
-0.09317553043365479,
-0.06052488088607788,
-0.11856216937303543,
0.008454520255327225,
-0.29406440258026123,
0.19962066411972046,
0.27630722522735596,
-0.016298582777380943,
0.07249584794044495,
0.3035910129547119,
-0.25033047795295715,
-0.457568883895874,
0.10085532814264297,
0.08082135021686554,
-0.07574636489152908,
-0.10017263889312744,
0.08798982203006744,
-0.11817143857479095,
0.15497618913650513,
0.6689578890800476,
-0.2593654990196228,
-0.22264665365219116,
0.009598851203918457,
0.2004629671573639,
0.08540656417608261,
0.1396985650062561,
-0.08338335156440735,
-0.07921189069747925,
-0.12510380148887634,
0.07765056192874908,
0.024542182683944702,
-0.1204695850610733,
-0.0428435355424881,
0.19635778665542603,
0.21678051352500916,
-0.09578903019428253,
-0.23582208156585693,
-0.324596643447876,
-0.3343942165374756,
-0.10725420713424683,
0.20262300968170166,
0.012907840311527252,
-0.0461440235376358,
-0.08299568295478821,
0.6750946640968323,
0.08769296854734421,
-0.3021237552165985,
0.24845552444458008,
-0.0822640061378479,
-0.050996020436286926,
-0.17750069499015808,
0.19915303587913513,
0.3842018246650696,
-0.12150600552558899,
-0.17338357865810394,
-0.23282815515995026,
0.37631648778915405,
-0.08606995642185211,
0.4022093415260315,
-0.08369158208370209,
0.15544922649860382,
-0.16203370690345764,
0.5856527090072632,
0.23155951499938965,
-0.04679866507649422,
-0.20633524656295776,
0.28424015641212463,
0.10000159591436386,
-0.20904818177223206,
-0.20226672291755676,
0.051618073135614395,
0.33272844552993774,
0.1875542551279068,
0.4447084665298462,
0.39823317527770996,
-0.12155617773532867,
-0.2642560303211212,
0.09424786269664764,
0.5052286386489868,
-0.19930879771709442,
0.20498985052108765,
0.0005274559371173382,
0.13664285838603973,
0.19577041268348694,
-0.1093682050704956,
0.22564071416854858,
0.03534727543592453,
0.304769366979599,
-0.3092609941959381,
0.7399809956550598,
0.1800457090139389,
-0.04088064283132553,
0.26147162914276123,
-0.4083422124385834,
-0.027955103665590286,
0.0511932373046875,
-0.27629613876342773,
0.21890032291412354,
-0.11413562297821045,
0.05269940197467804,
-0.2647417187690735,
-0.22853687405586243,
-0.014623750001192093,
0.2962864339351654,
-0.002693724352866411,
0.031127575784921646,
-0.5655739307403564,
-0.008411988615989685,
-0.20485199987888336,
0.0021113306283950806,
0.028320545330643654,
-0.03827006742358208,
0.5511711835861206,
0.07702211290597916,
-0.041578423231840134,
-0.21449188888072968,
-0.06528092920780182,
0.05460263416171074,
0.14385336637496948,
-0.28721684217453003,
0.2275797724723816,
0.3027360439300537,
-0.13196931779384613,
0.07006557285785675,
0.1666833758354187,
0.07416398823261261,
0.26832813024520874,
-0.053863245993852615,
0.2339264303445816,
0.3050244450569153,
-0.06516563147306442,
-0.09334377199411392,
0.40177035331726074,
0.03326905518770218,
-0.15578347444534302,
0.2595016062259674,
-0.00023682788014411926,
0.017757251858711243,
0.2346586138010025,
0.2817247807979584,
-0.06593585014343262,
0.025959346443414688,
0.459255188703537,
-0.06756645441055298,
0.14546972513198853,
0.13626807928085327,
0.005246706306934357,
-0.37799328565597534,
-0.01038924977183342,
0.350979745388031,
-0.45905059576034546,
0.05125473812222481,
-0.022730836644768715,
0.004870064556598663,
-0.1468215137720108,
0.5160329937934875,
0.16500578820705414,
0.03988877683877945,
-0.2612239420413971,
-0.29604411125183105,
-0.5132619738578796,
0.08484984189271927,
-0.4117299020290375,
-0.16564467549324036,
-0.02849666215479374,
0.43281829357147217,
0.07081688940525055,
0.19639864563941956,
-0.3687134385108948,
0.08428403735160828,
-0.1745309680700302,
0.5773721933364868,
-0.2791088819503784,
-0.08937016129493713,
-0.5378432273864746,
0.15635201334953308,
0.09824883192777634,
-0.3539040684700012,
0.45212867856025696,
0.26110634207725525,
-0.1391412615776062,
0.07427337765693665,
0.005071297287940979,
0.26286131143569946,
0.005235630087554455,
-0.3676958382129669,
0.09250601381063461,
0.33780398964881897,
0.0506775826215744,
0.09396832436323166,
-0.0835827887058258,
0.12262168526649475,
-0.4526345729827881,
0.19286896288394928,
0.09724687039852142,
0.3620455265045166,
-0.19569164514541626,
-0.15890656411647797,
-0.29978421330451965,
0.35243454575538635,
0.03415100276470184,
-0.20737066864967346,
-0.27364835143089294,
0.08183158934116364,
-0.1954088807106018,
0.2924795150756836,
0.3380967974662781,
0.14995163679122925,
-0.23145905137062073,
-0.12317950278520584,
-0.31143924593925476,
-0.1804192215204239,
0.3792820870876312,
-0.47693243622779846,
0.045383088290691376,
-0.4637560248374939,
0.23137111961841583,
0.2531643509864807,
0.1970571130514145,
-0.25030016899108887,
-0.3180619478225708,
0.22695736587047577,
-0.32072004675865173,
0.057510972023010254,
0.07607784122228622,
0.12044914066791534,
-0.2699720561504364,
-0.1574166715145111,
-0.40562427043914795,
0.032632339745759964,
-0.5015792846679688,
0.22198708355426788,
-0.30460089445114136
] |
https://github.com/huggingface/datasets/issues/6623 | what if the number of samples in that shard % num_nodes != 0? it will break/get stuck? or is the data repeated in that case for gradient sync? | streaming datasets doesn't work properly with multi-node | ### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave. | 28 | streaming datasets doesn't work properly with multi-node
### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave.
what if the number of samples in that shard % num_nodes != 0? it will break/get stuck? or is the data repeated in that case for gradient sync? | [
-0.5885023474693298,
-0.2717367708683014,
-0.022129017859697342,
0.05329866707324982,
-0.05288459733128548,
-0.24468931555747986,
0.28833165764808655,
-0.16213496029376984,
-0.05456581711769104,
0.17409411072731018,
0.13106313347816467,
0.20888292789459229,
-0.21015878021717072,
0.1710551381111145,
-0.05287248641252518,
-0.2316754013299942,
0.07644330710172653,
0.01057659462094307,
0.04034364968538284,
-0.2694319486618042,
-0.07909917831420898,
-0.16820268332958221,
-0.22020316123962402,
-0.4776022434234619,
-0.23010557889938354,
-0.34483352303504944,
-0.1880214959383011,
0.17915897071361542,
0.04292941093444824,
-0.0007918775081634521,
-0.024187937378883362,
0.21599668264389038,
0.22667305171489716,
0.26554247736930847,
-0.00011949403415201232,
-0.17549662292003632,
0.14307358860969543,
-0.033987656235694885,
-0.2797178626060486,
-0.10833810269832611,
-0.4525478482246399,
0.12000128626823425,
-0.0856480672955513,
-0.15769720077514648,
-0.005377188324928284,
0.0469653457403183,
0.16009725630283356,
-0.5938501954078674,
0.4552592635154724,
-0.03413572907447815,
0.08512648195028305,
0.01408693939447403,
-0.2336328625679016,
0.11152130365371704,
-0.18026015162467957,
0.3543376922607422,
0.005941025912761688,
-0.023008089512586594,
0.3836512565612793,
-0.10668213665485382,
-0.2726716697216034,
0.3208426833152771,
-0.17977496981620789,
0.3480873107910156,
-0.009544376283884048,
-0.1916971206665039,
-0.13937494158744812,
-0.3502672016620636,
-0.16309091448783875,
0.19770018756389618,
0.24191229045391083,
-0.12461245805025101,
-0.39788925647735596,
-0.521531343460083,
-0.14842446148395538,
-0.3500770926475525,
-0.23801052570343018,
0.18176981806755066,
-0.2481730580329895,
-0.0703870952129364,
-0.4510071277618408,
-0.23377658426761627,
-0.039797209203243256,
0.11789821088314056,
0.15419495105743408,
0.7694438695907593,
0.16675050556659698,
0.23403680324554443,
-0.1394328773021698,
0.29044508934020996,
0.3079175055027008,
-0.2309572994709015,
0.09334338456392288,
-0.13752999901771545,
-0.4325198531150818,
0.018086589872837067,
0.05734461918473244,
0.04305759817361832,
0.16307535767555237,
0.47958433628082275,
0.30966776609420776,
0.039084240794181824,
0.2876565754413605,
0.16717436909675598,
0.39613404870033264,
-0.18216004967689514,
-0.07782210409641266,
0.13634347915649414,
0.2166709154844284,
-0.017559371888637543,
0.08888927102088928,
0.020971247926354408,
0.21538354456424713,
0.23815034329891205,
-0.24705252051353455,
0.18153789639472961,
0.21558597683906555,
0.06319627165794373,
-0.057585135102272034,
-0.33602985739707947,
-0.03557462990283966,
-0.1887940913438797,
0.13759249448776245,
0.04293625056743622,
0.03659946843981743,
0.24672368168830872,
-0.4028873145580292,
0.15768982470035553,
-0.16016718745231628,
-0.5503530502319336,
-0.21842163801193237,
-0.3020685017108917,
-0.15051349997520447,
0.36816567182540894,
0.14705823361873627,
-0.0330776646733284,
0.2690260112285614,
-0.02857164293527603,
0.10693713277578354,
0.1553390473127365,
-0.07142554968595505,
-0.27262142300605774,
0.024798860773444176,
0.23033371567726135,
0.18815961480140686,
0.09010680019855499,
0.036062948405742645,
0.08091837167739868,
-0.07104326784610748,
0.17591574788093567,
-0.01980457827448845,
-0.33053672313690186,
0.19016502797603607,
0.08777797967195511,
-0.019701950252056122,
-0.013415093533694744,
-0.5710844993591309,
0.4722989499568939,
0.330960214138031,
-0.22632598876953125,
0.00015896186232566833,
-0.056308429688215256,
-0.37576544284820557,
-0.22712896764278412,
0.32718145847320557,
0.4236840605735779,
-0.08281472325325012,
-0.11036442220211029,
-0.07954616844654083,
0.10516591370105743,
0.559253990650177,
0.4052501320838928,
-0.17483340203762054,
-0.07906554639339447,
0.020856671035289764,
0.15972900390625,
0.16132764518260956,
-0.2096678912639618,
-0.25260594487190247,
0.4820108711719513,
-0.24641740322113037,
0.2487398236989975,
0.35342103242874146,
0.1166631281375885,
0.617304801940918,
-0.17541232705116272,
-0.07058148086071014,
0.6404229402542114,
-0.4585624933242798,
0.08418096601963043,
-0.38688284158706665,
-0.005343355238437653,
-0.10611443221569061,
0.25615841150283813,
0.16894984245300293,
0.12541131675243378,
0.24003133177757263,
0.2963806092739105,
0.3235984146595001,
0.08058828860521317,
0.35313987731933594,
-0.06989148259162903,
0.2761307954788208,
-0.2106955647468567,
0.049497976899147034,
-0.11211924254894257,
-0.6091260313987732,
0.28869563341140747,
0.07801954448223114,
-0.27191469073295593,
0.0680549144744873,
-0.23662494122982025,
0.44753289222717285,
-0.15206006169319153,
-0.0822150856256485,
-0.23689866065979004,
-0.03141500800848007,
0.26023662090301514,
0.2944309711456299,
-0.10916776955127716,
-0.3123038113117218,
0.2191813886165619,
-0.42277610301971436,
-0.02126145362854004,
-0.26497286558151245,
0.5215786099433899,
0.21814259886741638,
-0.21846994757652283,
-0.0010435879230499268,
0.045710932463407516,
0.14224129915237427,
-0.15118201076984406,
0.015415862202644348,
0.33918988704681396,
0.2921460270881653,
0.18274448812007904,
-0.08908434212207794,
0.1525992751121521,
0.40113458037376404,
-0.08527597039937973,
0.06607906520366669,
0.24203136563301086,
0.003439906984567642,
-0.3257346451282501,
-0.27416977286338806,
0.18110360205173492,
-0.15961357951164246,
0.3226219117641449,
0.12815937399864197,
0.05069836974143982,
0.2503218650817871,
-0.04333620145916939,
-0.1160278394818306,
0.07843576371669769,
0.10563630610704422,
-0.3318949341773987,
0.23888325691223145,
-0.10024002194404602,
-0.5517885088920593,
0.38689136505126953,
-0.007618499919772148,
0.06681092083454132,
-0.025056421756744385,
-0.183919757604599,
-0.0696144700050354,
-0.13988539576530457,
0.47877833247184753,
0.5028660297393799,
0.47347626090049744,
0.17877982556819916,
0.3006388545036316,
-0.029582621529698372,
0.09126587957143784,
-0.3178114593029022,
-0.0831855833530426,
0.04881472885608673,
0.23611204326152802,
0.2955628037452698,
-0.11971695721149445,
-0.04904571920633316,
-0.1970173865556717,
-0.23455947637557983,
0.3719569742679596,
0.05490919202566147,
-0.1710328459739685,
0.06568951159715652,
-0.31892722845077515,
-0.4927380681037903,
-0.22923643887043,
-0.045837175101041794,
-0.05014248937368393,
-0.17293314635753632,
0.06627776473760605,
0.7270770072937012,
-0.06778944283723831,
0.28438833355903625,
0.47979599237442017,
0.4485873579978943,
-0.21059271693229675,
0.1654486060142517,
-0.14575327932834625,
-0.18223978579044342,
0.0032022353261709213,
0.0369364470243454,
0.22898724675178528,
0.09430357813835144,
0.33727672696113586,
0.28389203548431396,
-0.16278596222400665,
-0.2981051802635193,
0.10762080550193787,
-0.09899180382490158,
0.00272422656416893,
-0.0963461697101593,
-0.17546817660331726,
-0.25050976872444153,
-0.03215603902935982,
0.003959033638238907,
-0.07086239755153656,
-0.24277536571025848,
-0.02813585475087166,
-0.013979624956846237,
-0.05706073343753815,
-0.2292422503232956,
-0.10658164322376251,
-0.008825637400150299,
-0.4428950250148773,
-0.33722180128097534,
0.03422681242227554,
-0.023857880383729935,
0.21627111732959747,
-0.106937475502491,
0.09920388460159302,
-0.317745178937912,
0.13228967785835266,
-0.2115560919046402,
0.004646945744752884,
-0.2248537242412567,
0.10413463413715363,
-0.20951318740844727,
-0.3363834023475647,
-0.18087321519851685,
0.016225799918174744,
-0.032758019864559174,
0.7001858353614807,
-0.3680460453033447,
-0.022672176361083984,
0.22942234575748444,
-0.28300631046295166,
0.13002845644950867,
-0.01745235174894333,
0.1841202676296234,
-0.21101859211921692,
0.0608733668923378,
-0.09832748770713806,
0.30754420161247253,
0.09404551982879639,
0.11913974583148956,
0.3478055000305176,
0.24098807573318481,
0.2969389855861664,
0.18660897016525269,
0.9571035504341125,
0.4824317395687103,
-0.04224644973874092,
0.14983172714710236,
0.19642145931720734,
-0.056599751114845276,
0.012742290273308754,
-0.0643312931060791,
0.3703346848487854,
-0.0830574780702591,
-0.045186202973127365,
0.12593674659729004,
-0.21250998973846436,
-0.34287744760513306,
-0.2323751598596573,
0.0019959434866905212,
0.11636404693126678,
-0.08302852511405945,
0.09244918823242188,
-0.2529964745044708,
0.17085915803909302,
0.15478980541229248,
0.08479215204715729,
0.20761753618717194,
-0.03211395442485809,
-0.4283945858478546,
0.06317974627017975,
0.27598223090171814,
0.016005147248506546,
-0.16827118396759033,
0.08855253458023071,
-0.33251258730888367,
0.20825934410095215,
0.11089914292097092,
0.41010433435440063,
-0.09692040830850601,
0.0012383460998535156,
0.20487654209136963,
0.16055065393447876,
0.2482411116361618,
-0.4635753929615021,
-0.15831811726093292,
-0.19165050983428955,
-0.3073832094669342,
0.14557787775993347,
-0.06610328704118729,
-0.13106635212898254,
0.39359205961227417,
-0.03613927215337753,
0.06572027504444122,
-0.19327493011951447,
0.00100698322057724,
-0.2515191435813904,
-0.15094858407974243,
-0.19483473896980286,
0.015966925770044327,
-0.22142896056175232,
-0.05043540522456169,
-0.26836690306663513,
0.20394307374954224,
0.11528261750936508,
-0.03895575553178787,
-0.2019885629415512,
-0.12639975547790527,
-0.17505629360675812,
0.09587056189775467,
-0.061167456209659576,
0.06695056706666946,
0.04935375973582268,
0.040436554700136185,
0.21243011951446533,
0.20874544978141785,
0.3953591585159302,
0.5721637606620789,
0.3576987087726593,
-0.10423833131790161,
-0.20544858276844025,
0.21369221806526184,
-0.012208551168441772,
0.35178130865097046,
0.4592912197113037,
0.059458423405885696,
0.12396785616874695,
0.199274480342865,
0.22486010193824768,
-0.3814557194709778,
-0.3206067383289337,
-0.04009976610541344,
-0.01633504405617714,
-0.3836514949798584,
-0.6445526480674744,
0.19172415137290955,
-0.08655966073274612,
-0.09299278259277344,
0.46199873089790344,
-0.20214125514030457,
-0.18130603432655334,
0.3067103624343872,
0.11880967020988464,
0.7116556763648987,
0.2004757821559906,
-0.1280091106891632,
-0.08082973957061768,
0.14721162617206573,
0.6211409568786621,
-0.12598812580108643,
0.30969175696372986,
-0.09895922243595123,
-0.34365129470825195,
-0.09388183802366257,
0.02876719832420349,
0.218648761510849,
0.3569571375846863,
-0.09297424554824829,
0.3380039632320404,
0.2797406017780304,
0.05031014606356621,
0.024454642087221146,
0.38943755626678467,
0.2260688841342926,
-0.29189732670783997,
0.05191393569111824,
0.040939681231975555,
-0.26360800862312317,
0.1095682680606842,
-0.029113762080669403,
0.06142812594771385,
0.30432945489883423,
-0.017380662262439728,
-0.3451733887195587,
-0.001589260995388031,
-0.2504502534866333,
0.1799796223640442,
-0.2980843186378479,
-0.3518190383911133,
-0.014309242367744446,
0.22457793354988098,
-0.051153820008039474,
-0.4006478190422058,
-0.060093075037002563,
0.1267896294593811,
0.09874902665615082,
0.1411825716495514,
-0.23552784323692322,
-0.2179218977689743,
0.28058183193206787,
-0.06922587007284164,
-0.07415220141410828,
0.032699450850486755,
0.1559431254863739,
-0.4639070928096771,
-0.21319936215877533,
-0.03263254463672638,
0.19737188518047333,
0.26600706577301025,
0.28038570284843445,
0.13937042653560638,
-0.07972268015146255,
-0.2499895989894867,
-0.001124952919781208,
-0.0405939482152462,
-0.15223562717437744,
0.531467080116272,
-0.15184012055397034,
0.0904516875743866,
-0.20528092980384827,
0.3922710418701172,
0.1825878918170929,
0.1486111581325531,
-0.02756732702255249,
0.11244922876358032,
-0.1182924211025238,
-0.11030668020248413,
-0.09317553043365479,
-0.06052488088607788,
-0.11856216937303543,
0.008454520255327225,
-0.29406440258026123,
0.19962066411972046,
0.27630722522735596,
-0.016298582777380943,
0.07249584794044495,
0.3035910129547119,
-0.25033047795295715,
-0.457568883895874,
0.10085532814264297,
0.08082135021686554,
-0.07574636489152908,
-0.10017263889312744,
0.08798982203006744,
-0.11817143857479095,
0.15497618913650513,
0.6689578890800476,
-0.2593654990196228,
-0.22264665365219116,
0.009598851203918457,
0.2004629671573639,
0.08540656417608261,
0.1396985650062561,
-0.08338335156440735,
-0.07921189069747925,
-0.12510380148887634,
0.07765056192874908,
0.024542182683944702,
-0.1204695850610733,
-0.0428435355424881,
0.19635778665542603,
0.21678051352500916,
-0.09578903019428253,
-0.23582208156585693,
-0.324596643447876,
-0.3343942165374756,
-0.10725420713424683,
0.20262300968170166,
0.012907840311527252,
-0.0461440235376358,
-0.08299568295478821,
0.6750946640968323,
0.08769296854734421,
-0.3021237552165985,
0.24845552444458008,
-0.0822640061378479,
-0.050996020436286926,
-0.17750069499015808,
0.19915303587913513,
0.3842018246650696,
-0.12150600552558899,
-0.17338357865810394,
-0.23282815515995026,
0.37631648778915405,
-0.08606995642185211,
0.4022093415260315,
-0.08369158208370209,
0.15544922649860382,
-0.16203370690345764,
0.5856527090072632,
0.23155951499938965,
-0.04679866507649422,
-0.20633524656295776,
0.28424015641212463,
0.10000159591436386,
-0.20904818177223206,
-0.20226672291755676,
0.051618073135614395,
0.33272844552993774,
0.1875542551279068,
0.4447084665298462,
0.39823317527770996,
-0.12155617773532867,
-0.2642560303211212,
0.09424786269664764,
0.5052286386489868,
-0.19930879771709442,
0.20498985052108765,
0.0005274559371173382,
0.13664285838603973,
0.19577041268348694,
-0.1093682050704956,
0.22564071416854858,
0.03534727543592453,
0.304769366979599,
-0.3092609941959381,
0.7399809956550598,
0.1800457090139389,
-0.04088064283132553,
0.26147162914276123,
-0.4083422124385834,
-0.027955103665590286,
0.0511932373046875,
-0.27629613876342773,
0.21890032291412354,
-0.11413562297821045,
0.05269940197467804,
-0.2647417187690735,
-0.22853687405586243,
-0.014623750001192093,
0.2962864339351654,
-0.002693724352866411,
0.031127575784921646,
-0.5655739307403564,
-0.008411988615989685,
-0.20485199987888336,
0.0021113306283950806,
0.028320545330643654,
-0.03827006742358208,
0.5511711835861206,
0.07702211290597916,
-0.041578423231840134,
-0.21449188888072968,
-0.06528092920780182,
0.05460263416171074,
0.14385336637496948,
-0.28721684217453003,
0.2275797724723816,
0.3027360439300537,
-0.13196931779384613,
0.07006557285785675,
0.1666833758354187,
0.07416398823261261,
0.26832813024520874,
-0.053863245993852615,
0.2339264303445816,
0.3050244450569153,
-0.06516563147306442,
-0.09334377199411392,
0.40177035331726074,
0.03326905518770218,
-0.15578347444534302,
0.2595016062259674,
-0.00023682788014411926,
0.017757251858711243,
0.2346586138010025,
0.2817247807979584,
-0.06593585014343262,
0.025959346443414688,
0.459255188703537,
-0.06756645441055298,
0.14546972513198853,
0.13626807928085327,
0.005246706306934357,
-0.37799328565597534,
-0.01038924977183342,
0.350979745388031,
-0.45905059576034546,
0.05125473812222481,
-0.022730836644768715,
0.004870064556598663,
-0.1468215137720108,
0.5160329937934875,
0.16500578820705414,
0.03988877683877945,
-0.2612239420413971,
-0.29604411125183105,
-0.5132619738578796,
0.08484984189271927,
-0.4117299020290375,
-0.16564467549324036,
-0.02849666215479374,
0.43281829357147217,
0.07081688940525055,
0.19639864563941956,
-0.3687134385108948,
0.08428403735160828,
-0.1745309680700302,
0.5773721933364868,
-0.2791088819503784,
-0.08937016129493713,
-0.5378432273864746,
0.15635201334953308,
0.09824883192777634,
-0.3539040684700012,
0.45212867856025696,
0.26110634207725525,
-0.1391412615776062,
0.07427337765693665,
0.005071297287940979,
0.26286131143569946,
0.005235630087554455,
-0.3676958382129669,
0.09250601381063461,
0.33780398964881897,
0.0506775826215744,
0.09396832436323166,
-0.0835827887058258,
0.12262168526649475,
-0.4526345729827881,
0.19286896288394928,
0.09724687039852142,
0.3620455265045166,
-0.19569164514541626,
-0.15890656411647797,
-0.29978421330451965,
0.35243454575538635,
0.03415100276470184,
-0.20737066864967346,
-0.27364835143089294,
0.08183158934116364,
-0.1954088807106018,
0.2924795150756836,
0.3380967974662781,
0.14995163679122925,
-0.23145905137062073,
-0.12317950278520584,
-0.31143924593925476,
-0.1804192215204239,
0.3792820870876312,
-0.47693243622779846,
0.045383088290691376,
-0.4637560248374939,
0.23137111961841583,
0.2531643509864807,
0.1970571130514145,
-0.25030016899108887,
-0.3180619478225708,
0.22695736587047577,
-0.32072004675865173,
0.057510972023010254,
0.07607784122228622,
0.12044914066791534,
-0.2699720561504364,
-0.1574166715145111,
-0.40562427043914795,
0.032632339745759964,
-0.5015792846679688,
0.22198708355426788,
-0.30460089445114136
] |
https://github.com/huggingface/datasets/issues/6623 | In the case one at least one of the noes will get an empty/incomplete batch. The data is not repeated in that case. If the training loop doesn't take this into account it can lead to unexpected behaviors indeed.
In the future we'd like to add a feature that would allow the nodes to ignore the last batch, this way all the nodes would only have full batches. | streaming datasets doesn't work properly with multi-node | ### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave. | 68 | streaming datasets doesn't work properly with multi-node
### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave.
In the case one at least one of the noes will get an empty/incomplete batch. The data is not repeated in that case. If the training loop doesn't take this into account it can lead to unexpected behaviors indeed.
In the future we'd like to add a feature that would allow the nodes to ignore the last batch, this way all the nodes would only have full batches. | [
-0.5885023474693298,
-0.2717367708683014,
-0.022129017859697342,
0.05329866707324982,
-0.05288459733128548,
-0.24468931555747986,
0.28833165764808655,
-0.16213496029376984,
-0.05456581711769104,
0.17409411072731018,
0.13106313347816467,
0.20888292789459229,
-0.21015878021717072,
0.1710551381111145,
-0.05287248641252518,
-0.2316754013299942,
0.07644330710172653,
0.01057659462094307,
0.04034364968538284,
-0.2694319486618042,
-0.07909917831420898,
-0.16820268332958221,
-0.22020316123962402,
-0.4776022434234619,
-0.23010557889938354,
-0.34483352303504944,
-0.1880214959383011,
0.17915897071361542,
0.04292941093444824,
-0.0007918775081634521,
-0.024187937378883362,
0.21599668264389038,
0.22667305171489716,
0.26554247736930847,
-0.00011949403415201232,
-0.17549662292003632,
0.14307358860969543,
-0.033987656235694885,
-0.2797178626060486,
-0.10833810269832611,
-0.4525478482246399,
0.12000128626823425,
-0.0856480672955513,
-0.15769720077514648,
-0.005377188324928284,
0.0469653457403183,
0.16009725630283356,
-0.5938501954078674,
0.4552592635154724,
-0.03413572907447815,
0.08512648195028305,
0.01408693939447403,
-0.2336328625679016,
0.11152130365371704,
-0.18026015162467957,
0.3543376922607422,
0.005941025912761688,
-0.023008089512586594,
0.3836512565612793,
-0.10668213665485382,
-0.2726716697216034,
0.3208426833152771,
-0.17977496981620789,
0.3480873107910156,
-0.009544376283884048,
-0.1916971206665039,
-0.13937494158744812,
-0.3502672016620636,
-0.16309091448783875,
0.19770018756389618,
0.24191229045391083,
-0.12461245805025101,
-0.39788925647735596,
-0.521531343460083,
-0.14842446148395538,
-0.3500770926475525,
-0.23801052570343018,
0.18176981806755066,
-0.2481730580329895,
-0.0703870952129364,
-0.4510071277618408,
-0.23377658426761627,
-0.039797209203243256,
0.11789821088314056,
0.15419495105743408,
0.7694438695907593,
0.16675050556659698,
0.23403680324554443,
-0.1394328773021698,
0.29044508934020996,
0.3079175055027008,
-0.2309572994709015,
0.09334338456392288,
-0.13752999901771545,
-0.4325198531150818,
0.018086589872837067,
0.05734461918473244,
0.04305759817361832,
0.16307535767555237,
0.47958433628082275,
0.30966776609420776,
0.039084240794181824,
0.2876565754413605,
0.16717436909675598,
0.39613404870033264,
-0.18216004967689514,
-0.07782210409641266,
0.13634347915649414,
0.2166709154844284,
-0.017559371888637543,
0.08888927102088928,
0.020971247926354408,
0.21538354456424713,
0.23815034329891205,
-0.24705252051353455,
0.18153789639472961,
0.21558597683906555,
0.06319627165794373,
-0.057585135102272034,
-0.33602985739707947,
-0.03557462990283966,
-0.1887940913438797,
0.13759249448776245,
0.04293625056743622,
0.03659946843981743,
0.24672368168830872,
-0.4028873145580292,
0.15768982470035553,
-0.16016718745231628,
-0.5503530502319336,
-0.21842163801193237,
-0.3020685017108917,
-0.15051349997520447,
0.36816567182540894,
0.14705823361873627,
-0.0330776646733284,
0.2690260112285614,
-0.02857164293527603,
0.10693713277578354,
0.1553390473127365,
-0.07142554968595505,
-0.27262142300605774,
0.024798860773444176,
0.23033371567726135,
0.18815961480140686,
0.09010680019855499,
0.036062948405742645,
0.08091837167739868,
-0.07104326784610748,
0.17591574788093567,
-0.01980457827448845,
-0.33053672313690186,
0.19016502797603607,
0.08777797967195511,
-0.019701950252056122,
-0.013415093533694744,
-0.5710844993591309,
0.4722989499568939,
0.330960214138031,
-0.22632598876953125,
0.00015896186232566833,
-0.056308429688215256,
-0.37576544284820557,
-0.22712896764278412,
0.32718145847320557,
0.4236840605735779,
-0.08281472325325012,
-0.11036442220211029,
-0.07954616844654083,
0.10516591370105743,
0.559253990650177,
0.4052501320838928,
-0.17483340203762054,
-0.07906554639339447,
0.020856671035289764,
0.15972900390625,
0.16132764518260956,
-0.2096678912639618,
-0.25260594487190247,
0.4820108711719513,
-0.24641740322113037,
0.2487398236989975,
0.35342103242874146,
0.1166631281375885,
0.617304801940918,
-0.17541232705116272,
-0.07058148086071014,
0.6404229402542114,
-0.4585624933242798,
0.08418096601963043,
-0.38688284158706665,
-0.005343355238437653,
-0.10611443221569061,
0.25615841150283813,
0.16894984245300293,
0.12541131675243378,
0.24003133177757263,
0.2963806092739105,
0.3235984146595001,
0.08058828860521317,
0.35313987731933594,
-0.06989148259162903,
0.2761307954788208,
-0.2106955647468567,
0.049497976899147034,
-0.11211924254894257,
-0.6091260313987732,
0.28869563341140747,
0.07801954448223114,
-0.27191469073295593,
0.0680549144744873,
-0.23662494122982025,
0.44753289222717285,
-0.15206006169319153,
-0.0822150856256485,
-0.23689866065979004,
-0.03141500800848007,
0.26023662090301514,
0.2944309711456299,
-0.10916776955127716,
-0.3123038113117218,
0.2191813886165619,
-0.42277610301971436,
-0.02126145362854004,
-0.26497286558151245,
0.5215786099433899,
0.21814259886741638,
-0.21846994757652283,
-0.0010435879230499268,
0.045710932463407516,
0.14224129915237427,
-0.15118201076984406,
0.015415862202644348,
0.33918988704681396,
0.2921460270881653,
0.18274448812007904,
-0.08908434212207794,
0.1525992751121521,
0.40113458037376404,
-0.08527597039937973,
0.06607906520366669,
0.24203136563301086,
0.003439906984567642,
-0.3257346451282501,
-0.27416977286338806,
0.18110360205173492,
-0.15961357951164246,
0.3226219117641449,
0.12815937399864197,
0.05069836974143982,
0.2503218650817871,
-0.04333620145916939,
-0.1160278394818306,
0.07843576371669769,
0.10563630610704422,
-0.3318949341773987,
0.23888325691223145,
-0.10024002194404602,
-0.5517885088920593,
0.38689136505126953,
-0.007618499919772148,
0.06681092083454132,
-0.025056421756744385,
-0.183919757604599,
-0.0696144700050354,
-0.13988539576530457,
0.47877833247184753,
0.5028660297393799,
0.47347626090049744,
0.17877982556819916,
0.3006388545036316,
-0.029582621529698372,
0.09126587957143784,
-0.3178114593029022,
-0.0831855833530426,
0.04881472885608673,
0.23611204326152802,
0.2955628037452698,
-0.11971695721149445,
-0.04904571920633316,
-0.1970173865556717,
-0.23455947637557983,
0.3719569742679596,
0.05490919202566147,
-0.1710328459739685,
0.06568951159715652,
-0.31892722845077515,
-0.4927380681037903,
-0.22923643887043,
-0.045837175101041794,
-0.05014248937368393,
-0.17293314635753632,
0.06627776473760605,
0.7270770072937012,
-0.06778944283723831,
0.28438833355903625,
0.47979599237442017,
0.4485873579978943,
-0.21059271693229675,
0.1654486060142517,
-0.14575327932834625,
-0.18223978579044342,
0.0032022353261709213,
0.0369364470243454,
0.22898724675178528,
0.09430357813835144,
0.33727672696113586,
0.28389203548431396,
-0.16278596222400665,
-0.2981051802635193,
0.10762080550193787,
-0.09899180382490158,
0.00272422656416893,
-0.0963461697101593,
-0.17546817660331726,
-0.25050976872444153,
-0.03215603902935982,
0.003959033638238907,
-0.07086239755153656,
-0.24277536571025848,
-0.02813585475087166,
-0.013979624956846237,
-0.05706073343753815,
-0.2292422503232956,
-0.10658164322376251,
-0.008825637400150299,
-0.4428950250148773,
-0.33722180128097534,
0.03422681242227554,
-0.023857880383729935,
0.21627111732959747,
-0.106937475502491,
0.09920388460159302,
-0.317745178937912,
0.13228967785835266,
-0.2115560919046402,
0.004646945744752884,
-0.2248537242412567,
0.10413463413715363,
-0.20951318740844727,
-0.3363834023475647,
-0.18087321519851685,
0.016225799918174744,
-0.032758019864559174,
0.7001858353614807,
-0.3680460453033447,
-0.022672176361083984,
0.22942234575748444,
-0.28300631046295166,
0.13002845644950867,
-0.01745235174894333,
0.1841202676296234,
-0.21101859211921692,
0.0608733668923378,
-0.09832748770713806,
0.30754420161247253,
0.09404551982879639,
0.11913974583148956,
0.3478055000305176,
0.24098807573318481,
0.2969389855861664,
0.18660897016525269,
0.9571035504341125,
0.4824317395687103,
-0.04224644973874092,
0.14983172714710236,
0.19642145931720734,
-0.056599751114845276,
0.012742290273308754,
-0.0643312931060791,
0.3703346848487854,
-0.0830574780702591,
-0.045186202973127365,
0.12593674659729004,
-0.21250998973846436,
-0.34287744760513306,
-0.2323751598596573,
0.0019959434866905212,
0.11636404693126678,
-0.08302852511405945,
0.09244918823242188,
-0.2529964745044708,
0.17085915803909302,
0.15478980541229248,
0.08479215204715729,
0.20761753618717194,
-0.03211395442485809,
-0.4283945858478546,
0.06317974627017975,
0.27598223090171814,
0.016005147248506546,
-0.16827118396759033,
0.08855253458023071,
-0.33251258730888367,
0.20825934410095215,
0.11089914292097092,
0.41010433435440063,
-0.09692040830850601,
0.0012383460998535156,
0.20487654209136963,
0.16055065393447876,
0.2482411116361618,
-0.4635753929615021,
-0.15831811726093292,
-0.19165050983428955,
-0.3073832094669342,
0.14557787775993347,
-0.06610328704118729,
-0.13106635212898254,
0.39359205961227417,
-0.03613927215337753,
0.06572027504444122,
-0.19327493011951447,
0.00100698322057724,
-0.2515191435813904,
-0.15094858407974243,
-0.19483473896980286,
0.015966925770044327,
-0.22142896056175232,
-0.05043540522456169,
-0.26836690306663513,
0.20394307374954224,
0.11528261750936508,
-0.03895575553178787,
-0.2019885629415512,
-0.12639975547790527,
-0.17505629360675812,
0.09587056189775467,
-0.061167456209659576,
0.06695056706666946,
0.04935375973582268,
0.040436554700136185,
0.21243011951446533,
0.20874544978141785,
0.3953591585159302,
0.5721637606620789,
0.3576987087726593,
-0.10423833131790161,
-0.20544858276844025,
0.21369221806526184,
-0.012208551168441772,
0.35178130865097046,
0.4592912197113037,
0.059458423405885696,
0.12396785616874695,
0.199274480342865,
0.22486010193824768,
-0.3814557194709778,
-0.3206067383289337,
-0.04009976610541344,
-0.01633504405617714,
-0.3836514949798584,
-0.6445526480674744,
0.19172415137290955,
-0.08655966073274612,
-0.09299278259277344,
0.46199873089790344,
-0.20214125514030457,
-0.18130603432655334,
0.3067103624343872,
0.11880967020988464,
0.7116556763648987,
0.2004757821559906,
-0.1280091106891632,
-0.08082973957061768,
0.14721162617206573,
0.6211409568786621,
-0.12598812580108643,
0.30969175696372986,
-0.09895922243595123,
-0.34365129470825195,
-0.09388183802366257,
0.02876719832420349,
0.218648761510849,
0.3569571375846863,
-0.09297424554824829,
0.3380039632320404,
0.2797406017780304,
0.05031014606356621,
0.024454642087221146,
0.38943755626678467,
0.2260688841342926,
-0.29189732670783997,
0.05191393569111824,
0.040939681231975555,
-0.26360800862312317,
0.1095682680606842,
-0.029113762080669403,
0.06142812594771385,
0.30432945489883423,
-0.017380662262439728,
-0.3451733887195587,
-0.001589260995388031,
-0.2504502534866333,
0.1799796223640442,
-0.2980843186378479,
-0.3518190383911133,
-0.014309242367744446,
0.22457793354988098,
-0.051153820008039474,
-0.4006478190422058,
-0.060093075037002563,
0.1267896294593811,
0.09874902665615082,
0.1411825716495514,
-0.23552784323692322,
-0.2179218977689743,
0.28058183193206787,
-0.06922587007284164,
-0.07415220141410828,
0.032699450850486755,
0.1559431254863739,
-0.4639070928096771,
-0.21319936215877533,
-0.03263254463672638,
0.19737188518047333,
0.26600706577301025,
0.28038570284843445,
0.13937042653560638,
-0.07972268015146255,
-0.2499895989894867,
-0.001124952919781208,
-0.0405939482152462,
-0.15223562717437744,
0.531467080116272,
-0.15184012055397034,
0.0904516875743866,
-0.20528092980384827,
0.3922710418701172,
0.1825878918170929,
0.1486111581325531,
-0.02756732702255249,
0.11244922876358032,
-0.1182924211025238,
-0.11030668020248413,
-0.09317553043365479,
-0.06052488088607788,
-0.11856216937303543,
0.008454520255327225,
-0.29406440258026123,
0.19962066411972046,
0.27630722522735596,
-0.016298582777380943,
0.07249584794044495,
0.3035910129547119,
-0.25033047795295715,
-0.457568883895874,
0.10085532814264297,
0.08082135021686554,
-0.07574636489152908,
-0.10017263889312744,
0.08798982203006744,
-0.11817143857479095,
0.15497618913650513,
0.6689578890800476,
-0.2593654990196228,
-0.22264665365219116,
0.009598851203918457,
0.2004629671573639,
0.08540656417608261,
0.1396985650062561,
-0.08338335156440735,
-0.07921189069747925,
-0.12510380148887634,
0.07765056192874908,
0.024542182683944702,
-0.1204695850610733,
-0.0428435355424881,
0.19635778665542603,
0.21678051352500916,
-0.09578903019428253,
-0.23582208156585693,
-0.324596643447876,
-0.3343942165374756,
-0.10725420713424683,
0.20262300968170166,
0.012907840311527252,
-0.0461440235376358,
-0.08299568295478821,
0.6750946640968323,
0.08769296854734421,
-0.3021237552165985,
0.24845552444458008,
-0.0822640061378479,
-0.050996020436286926,
-0.17750069499015808,
0.19915303587913513,
0.3842018246650696,
-0.12150600552558899,
-0.17338357865810394,
-0.23282815515995026,
0.37631648778915405,
-0.08606995642185211,
0.4022093415260315,
-0.08369158208370209,
0.15544922649860382,
-0.16203370690345764,
0.5856527090072632,
0.23155951499938965,
-0.04679866507649422,
-0.20633524656295776,
0.28424015641212463,
0.10000159591436386,
-0.20904818177223206,
-0.20226672291755676,
0.051618073135614395,
0.33272844552993774,
0.1875542551279068,
0.4447084665298462,
0.39823317527770996,
-0.12155617773532867,
-0.2642560303211212,
0.09424786269664764,
0.5052286386489868,
-0.19930879771709442,
0.20498985052108765,
0.0005274559371173382,
0.13664285838603973,
0.19577041268348694,
-0.1093682050704956,
0.22564071416854858,
0.03534727543592453,
0.304769366979599,
-0.3092609941959381,
0.7399809956550598,
0.1800457090139389,
-0.04088064283132553,
0.26147162914276123,
-0.4083422124385834,
-0.027955103665590286,
0.0511932373046875,
-0.27629613876342773,
0.21890032291412354,
-0.11413562297821045,
0.05269940197467804,
-0.2647417187690735,
-0.22853687405586243,
-0.014623750001192093,
0.2962864339351654,
-0.002693724352866411,
0.031127575784921646,
-0.5655739307403564,
-0.008411988615989685,
-0.20485199987888336,
0.0021113306283950806,
0.028320545330643654,
-0.03827006742358208,
0.5511711835861206,
0.07702211290597916,
-0.041578423231840134,
-0.21449188888072968,
-0.06528092920780182,
0.05460263416171074,
0.14385336637496948,
-0.28721684217453003,
0.2275797724723816,
0.3027360439300537,
-0.13196931779384613,
0.07006557285785675,
0.1666833758354187,
0.07416398823261261,
0.26832813024520874,
-0.053863245993852615,
0.2339264303445816,
0.3050244450569153,
-0.06516563147306442,
-0.09334377199411392,
0.40177035331726074,
0.03326905518770218,
-0.15578347444534302,
0.2595016062259674,
-0.00023682788014411926,
0.017757251858711243,
0.2346586138010025,
0.2817247807979584,
-0.06593585014343262,
0.025959346443414688,
0.459255188703537,
-0.06756645441055298,
0.14546972513198853,
0.13626807928085327,
0.005246706306934357,
-0.37799328565597534,
-0.01038924977183342,
0.350979745388031,
-0.45905059576034546,
0.05125473812222481,
-0.022730836644768715,
0.004870064556598663,
-0.1468215137720108,
0.5160329937934875,
0.16500578820705414,
0.03988877683877945,
-0.2612239420413971,
-0.29604411125183105,
-0.5132619738578796,
0.08484984189271927,
-0.4117299020290375,
-0.16564467549324036,
-0.02849666215479374,
0.43281829357147217,
0.07081688940525055,
0.19639864563941956,
-0.3687134385108948,
0.08428403735160828,
-0.1745309680700302,
0.5773721933364868,
-0.2791088819503784,
-0.08937016129493713,
-0.5378432273864746,
0.15635201334953308,
0.09824883192777634,
-0.3539040684700012,
0.45212867856025696,
0.26110634207725525,
-0.1391412615776062,
0.07427337765693665,
0.005071297287940979,
0.26286131143569946,
0.005235630087554455,
-0.3676958382129669,
0.09250601381063461,
0.33780398964881897,
0.0506775826215744,
0.09396832436323166,
-0.0835827887058258,
0.12262168526649475,
-0.4526345729827881,
0.19286896288394928,
0.09724687039852142,
0.3620455265045166,
-0.19569164514541626,
-0.15890656411647797,
-0.29978421330451965,
0.35243454575538635,
0.03415100276470184,
-0.20737066864967346,
-0.27364835143089294,
0.08183158934116364,
-0.1954088807106018,
0.2924795150756836,
0.3380967974662781,
0.14995163679122925,
-0.23145905137062073,
-0.12317950278520584,
-0.31143924593925476,
-0.1804192215204239,
0.3792820870876312,
-0.47693243622779846,
0.045383088290691376,
-0.4637560248374939,
0.23137111961841583,
0.2531643509864807,
0.1970571130514145,
-0.25030016899108887,
-0.3180619478225708,
0.22695736587047577,
-0.32072004675865173,
0.057510972023010254,
0.07607784122228622,
0.12044914066791534,
-0.2699720561504364,
-0.1574166715145111,
-0.40562427043914795,
0.032632339745759964,
-0.5015792846679688,
0.22198708355426788,
-0.30460089445114136
] |
https://github.com/huggingface/datasets/issues/6618 | Hi! Can you please share the error's stack trace so we can see where it comes from? | While importing load_dataset from datasets | ### Describe the bug
cannot import name 'DEFAULT_CIPHERS' from 'urllib3.util.ssl_' this is the error i received
### Steps to reproduce the bug
from datasets import load_dataset
### Expected behavior
No errors
### Environment info
python 3.11.5 | 17 | While importing load_dataset from datasets
### Describe the bug
cannot import name 'DEFAULT_CIPHERS' from 'urllib3.util.ssl_' this is the error i received
### Steps to reproduce the bug
from datasets import load_dataset
### Expected behavior
No errors
### Environment info
python 3.11.5
Hi! Can you please share the error's stack trace so we can see where it comes from? | [
0.02553679049015045,
-0.0960899293422699,
-0.01202813908457756,
0.30808398127555847,
0.20100738108158112,
0.12118995189666748,
0.3076993227005005,
-0.02027871645987034,
0.16383129358291626,
0.16387607157230377,
0.07356870919466019,
0.20870698988437653,
-0.0453374907374382,
0.22486478090286255,
-0.010323697701096535,
-0.08854030817747116,
0.03795933723449707,
-0.11755792796611786,
-0.1343417465686798,
-0.08287185430526733,
-0.26581519842147827,
0.28992894291877747,
-0.18643690645694733,
-0.03193062171339989,
0.16879205405712128,
0.014141449704766273,
-0.1925136148929596,
0.29297828674316406,
-0.30503565073013306,
-0.3261713683605194,
0.38788196444511414,
-0.1012846827507019,
0.3977859318256378,
0.08643285930156708,
-0.00011234589328523725,
-0.07913771271705627,
0.36974188685417175,
0.015161074697971344,
-0.03355153650045395,
-0.470453143119812,
-0.5806116461753845,
-0.43142029643058777,
0.1406441628932953,
-0.32072538137435913,
0.36564499139785767,
0.1480671912431717,
-0.14596295356750488,
-0.14254990220069885,
0.2450360655784607,
0.36443665623664856,
0.24022173881530762,
0.19046014547348022,
0.15952931344509125,
-0.10644888132810593,
0.33428871631622314,
-0.44106757640838623,
-0.1060420572757721,
0.3757067620754242,
-0.06672178208827972,
-0.05535488203167915,
0.3541308343410492,
0.24926592409610748,
-0.21048688888549805,
0.030058875679969788,
0.27987414598464966,
0.021131590008735657,
-0.014930907636880875,
-0.4703759253025055,
-0.1284697949886322,
0.2075527012348175,
0.38516291975975037,
-0.3053736686706543,
-0.032272983342409134,
0.06701798737049103,
0.1988714635372162,
-0.18061639368534088,
0.48838120698928833,
0.05424904078245163,
0.010762669146060944,
0.13253472745418549,
0.24273887276649475,
-0.1690889149904251,
-0.0841400995850563,
0.19292102754116058,
-0.20189189910888672,
0.4724831283092499,
-0.16227538883686066,
0.061334606260061264,
-0.065354123711586,
-0.24784313142299652,
0.4389994144439697,
-0.3556544780731201,
0.12223808467388153,
0.08670903742313385,
-0.23202630877494812,
0.14321982860565186,
0.14614872634410858,
0.11581660807132721,
-0.02202237769961357,
0.1160096526145935,
-0.07869714498519897,
0.021549362689256668,
-0.09361046552658081,
0.29374366998672485,
0.1633535474538803,
0.09156365692615509,
0.028090087696909904,
0.2239925116300583,
0.4188316762447357,
0.20877200365066528,
0.03118882328271866,
0.2086254209280014,
-0.01875334605574608,
-0.18117916584014893,
0.15382318198680878,
0.06474143266677856,
0.46892186999320984,
-0.09849834442138672,
-0.3385747969150543,
0.23375433683395386,
-0.04177612438797951,
-0.13675415515899658,
0.05483110249042511,
0.4141411781311035,
-0.1588600128889084,
0.18822985887527466,
0.08482615649700165,
0.04564640298485756,
-0.05759667232632637,
0.17443877458572388,
-0.16757142543792725,
-0.1858064830303192,
-0.1376136988401413,
-0.10949859768152237,
-0.0001993328332901001,
-0.18338394165039062,
0.145832359790802,
0.20561841130256653,
0.07790271937847137,
0.07166261970996857,
0.15232157707214355,
-0.0703311562538147,
-0.043130021542310715,
0.16476751863956451,
0.15672409534454346,
0.3111204504966736,
0.1860833466053009,
0.0002232864499092102,
-0.11120244115591049,
0.11449362337589264,
-0.7039685249328613,
-0.26508817076683044,
-0.19842146337032318,
0.21204417943954468,
-0.2765454649925232,
-0.19229993224143982,
-0.03251150995492935,
-0.1258443295955658,
-0.09724493324756622,
0.03746570646762848,
-0.32956838607788086,
-0.37241846323013306,
0.03843879699707031,
-0.2060108333826065,
0.24037885665893555,
0.16477572917938232,
-0.06738559156656265,
-0.16966889798641205,
-0.01306772232055664,
-0.2086106836795807,
0.2378397285938263,
0.03765609860420227,
-0.12443415820598602,
-0.22122246026992798,
-0.08149541914463043,
0.08899974822998047,
0.3034837245941162,
-0.2857157588005066,
-0.5515396595001221,
0.170106440782547,
0.09735492616891861,
-0.10354150086641312,
0.005366731435060501,
0.008233118802309036,
-0.0037278831005096436,
0.1105399951338768,
0.21718564629554749,
0.37016603350639343,
0.035913653671741486,
0.04334833472967148,
-0.041801389306783676,
-0.28849679231643677,
0.1526760309934616,
0.1679544448852539,
-0.04115274176001549,
-0.000554896891117096,
0.0013352669775485992,
-0.21094930171966553,
0.062196582555770874,
-0.1401839554309845,
-0.24210090935230255,
0.4701537489891052,
0.41093066334724426,
0.17404705286026,
0.2530912756919861,
0.10452811419963837,
-0.46245601773262024,
0.22233419120311737,
-0.01731663942337036,
0.20014724135398865,
-0.4171617031097412,
0.09273664653301239,
-0.3285067677497864,
0.08436769992113113,
-0.2936386168003082,
0.30734941363334656,
0.060402996838092804,
0.21983295679092407,
-0.31776756048202515,
0.0037487968802452087,
-0.23493114113807678,
0.03868138790130615,
-0.10754875093698502,
0.1017371267080307,
-0.3172740042209625,
0.44401589035987854,
-0.22986288368701935,
0.06304416060447693,
0.09637399017810822,
0.06909254938364029,
0.2709537744522095,
0.01788158342242241,
-0.292052298784256,
0.036968279629945755,
0.09752985835075378,
0.31266719102859497,
-0.15353235602378845,
-0.024366751313209534,
0.05274584889411926,
-0.5685095191001892,
0.15895748138427734,
0.2342654913663864,
0.1007973700761795,
0.061194755136966705,
0.35015758872032166,
0.28063470125198364,
-0.00516026746481657,
0.10783815383911133,
-0.12380313873291016,
0.08735813200473785,
0.2918430268764496,
-0.21040640771389008,
-0.10326173901557922,
-0.32125478982925415,
0.3325873613357544,
-0.04028424993157387,
0.09697955846786499,
-0.05868356674909592,
-0.13566268980503082,
-0.24745750427246094,
0.3271335959434509,
0.032567523419857025,
0.20735184848308563,
0.08520438522100449,
-0.011331640183925629,
-0.08867636322975159,
0.021434729918837547,
0.1905156522989273,
0.3946812152862549,
0.02285800129175186,
-0.09310115873813629,
0.3434097170829773,
0.03356029465794563,
-0.17750315368175507,
0.1573403775691986,
0.08903671056032181,
0.09929852187633514,
0.2100106030702591,
0.06358657777309418,
0.08367235213518143,
-0.22510580718517303,
-0.12658239901065826,
0.09842506051063538,
0.38376811146736145,
-0.41497671604156494,
0.21336553990840912,
-0.24509447813034058,
-0.26065146923065186,
0.03101949393749237,
-0.10516061633825302,
-0.12542366981506348,
-0.4427874684333801,
-0.2907395362854004,
0.018458833917975426,
-0.1781488060951233,
0.16627927124500275,
-0.058390527963638306,
0.037290215492248535,
0.22221453487873077,
-0.19413454830646515,
-0.2670815587043762,
-0.20541200041770935,
0.02568824589252472,
0.010299254208803177,
0.18086323142051697,
-0.1541556566953659,
0.38244643807411194,
-0.07234328985214233,
-0.1035650223493576,
-0.2071174532175064,
-0.36752068996429443,
0.07965318858623505,
0.012024980038404465,
0.2917082905769348,
0.447550505399704,
0.1187218427658081,
-0.05477599799633026,
-0.23145447671413422,
0.23283550143241882,
-0.03668242320418358,
-0.06612265855073929,
0.09331726282835007,
-0.16670581698417664,
-0.09558870643377304,
0.08349746465682983,
-0.3906209170818329,
-0.38127920031547546,
-0.27383506298065186,
-0.37455353140830994,
0.07367315888404846,
0.09302444756031036,
-0.10719664394855499,
-0.1559578776359558,
0.168332040309906,
0.14945662021636963,
0.10890140384435654,
-0.12337008863687515,
-0.2913774847984314,
0.39757710695266724,
-0.12663279473781586,
-0.410009503364563,
0.12785768508911133,
-0.12480725347995758,
0.19086246192455292,
-0.14185720682144165,
-0.5603805780410767,
-0.2046869397163391,
-0.2922917604446411,
0.23654061555862427,
-0.18254493176937103,
0.27309492230415344,
-0.12263210117816925,
-0.022450430318713188,
0.05519453436136246,
-0.20833942294120789,
-0.24277645349502563,
-0.28831276297569275,
0.023180227726697922,
0.23047509789466858,
0.2023102045059204,
0.6140865683555603,
-0.16907694935798645,
0.4722696542739868,
0.18029338121414185,
0.04849185049533844,
0.5941764712333679,
-0.03194278106093407,
0.1750902682542801,
0.0852806493639946,
-0.3505101501941681,
-0.17463424801826477,
0.028778210282325745,
0.10837754607200623,
0.208194300532341,
-0.1578506976366043,
0.04659174382686615,
-0.2692102789878845,
-0.14825987815856934,
0.0319950208067894,
-0.16385304927825928,
-0.08868938684463501,
-0.3130051791667938,
0.2694419324398041,
0.18875616788864136,
-0.03472227603197098,
-0.21305407583713531,
-0.1690765917301178,
0.044219087809324265,
0.20786404609680176,
-0.298356831073761,
0.01270950585603714,
-0.1603713035583496,
0.10816431790590286,
-0.42568233609199524,
0.3534225821495056,
0.09792344272136688,
0.5259202122688293,
-0.05136891454458237,
0.114077128469944,
0.07762209326028824,
-0.030013060197234154,
0.2806844413280487,
-0.2411973923444748,
0.023505859076976776,
0.19895149767398834,
-0.023517228662967682,
-0.46887660026550293,
-0.1088968813419342,
-0.22055523097515106,
-0.09264123439788818,
0.21160855889320374,
0.36250659823417664,
-0.27955129742622375,
0.11899307370185852,
0.1485779583454132,
0.2514075040817261,
-0.14247334003448486,
-0.2576497495174408,
-0.3717425763607025,
-0.5525254011154175,
-0.43312180042266846,
-0.09729410707950592,
-0.025235481560230255,
0.4001227021217346,
-0.03392941877245903,
0.09381294995546341,
0.004072990268468857,
-0.09178128838539124,
0.15717074275016785,
0.15633222460746765,
0.11591438949108124,
0.1413794755935669,
0.21654166281223297,
-0.04448956623673439,
-0.007740922272205353,
0.0193906482309103,
0.7926288843154907,
-0.22684241831302643,
-0.752051055431366,
0.03541440889239311,
0.17691637575626373,
0.06764912605285645,
0.056745368987321854,
-0.1391167789697647,
0.1583767682313919,
0.10856713354587555,
0.08371792733669281,
0.06939806044101715,
-0.022349802777171135,
0.27946561574935913,
0.08454032242298126,
-0.3639776408672333,
-0.3415968716144562,
0.3725995123386383,
-0.01877298206090927,
-0.10212233662605286,
0.6557703614234924,
0.007818667218089104,
-0.2670885920524597,
0.32141023874282837,
-0.2184034287929535,
0.7601138353347778,
0.13949176669120789,
0.1308879852294922,
0.32902154326438904,
-0.01617056131362915,
0.29306668043136597,
0.21962884068489075,
-0.21902452409267426,
-0.5138139128684998,
-0.1626586765050888,
0.04293408244848251,
-0.3877057731151581,
0.20296277105808258,
-0.2660449147224426,
-0.17098791897296906,
0.050633348524570465,
-0.12980441749095917,
0.3608745038509369,
0.2298247367143631,
0.21563223004341125,
-0.5483413934707642,
-0.015150494873523712,
-0.24506810307502747,
0.12755589187145233,
0.008852840401232243,
0.2002710998058319,
-0.23067934811115265,
0.049620337784290314,
0.14581741392612457,
-0.38610416650772095,
-0.04333392530679703,
0.3424680233001709,
-0.39683935046195984,
0.40160906314849854,
-0.055586449801921844,
-0.1538185179233551,
0.25431373715400696,
0.49903926253318787,
0.45388659834861755,
0.06058214232325554,
-0.27650073170661926,
0.2977127134799957,
-0.02539921924471855,
-0.004333019256591797,
0.0551142580807209,
0.08744567632675171,
0.1115647628903389,
-0.23576563596725464,
-0.16960029304027557,
-0.0009936895221471786,
0.0420696847140789,
-0.20326289534568787,
-0.033931538462638855,
0.18590210378170013,
0.3568348288536072,
-0.2725362181663513,
-0.3188658654689789,
-0.222861647605896,
0.29758763313293457,
-0.27748727798461914,
0.14368972182273865,
0.35668107867240906,
-0.13710632920265198,
0.3518802523612976,
-0.14317303895950317,
-0.2584018111228943,
0.014135591685771942,
0.47884976863861084,
-0.022925566881895065,
0.08739778399467468,
0.5913832187652588,
0.08617697656154633,
-0.062259286642074585,
-0.08214464038610458,
0.5878227949142456,
-0.11495646834373474,
-0.002090558409690857,
0.1880767047405243,
0.06586512178182602,
0.013117387890815735,
-0.061525601893663406,
0.3155566453933716,
0.06943336874246597,
0.0395694226026535,
0.14521344006061554,
-0.5375162363052368,
0.0061392709612846375,
0.18694359064102173,
0.08143475651741028,
0.07237565517425537,
0.1346597522497177,
-0.06980019807815552,
-0.228815957903862,
-0.41632699966430664,
-0.26560235023498535,
0.3345631957054138,
-0.1805942952632904,
0.08545296639204025,
0.3096538186073303,
0.11549876630306244,
0.06723625957965851,
-0.146728515625,
0.12154195457696915,
0.055145613849163055,
-0.041824426501989365,
-0.24200597405433655,
-0.40284061431884766,
0.09718911349773407,
0.18265514075756073,
-0.18150216341018677,
-0.01669454202055931,
-0.3710613250732422,
-0.02149149961769581,
0.03705817833542824,
0.1491749882698059,
0.25388485193252563,
0.044770631939172745,
0.3062055706977844,
-0.17457987368106842,
0.031749751418828964,
-0.23335519433021545,
0.28131985664367676,
-0.30885088443756104,
0.24844227731227875,
0.017061255872249603,
0.20253270864486694,
-0.0539546012878418,
0.0664324015378952,
-0.15804767608642578,
-0.09617718309164047,
-0.10917764157056808,
0.11650724709033966,
0.127533420920372,
-0.25002992153167725,
0.23031191527843475,
0.018334709107875824,
0.024464361369609833,
0.38603782653808594,
-0.6166849732398987,
0.08431268483400345,
0.2909267246723175,
0.2108510434627533,
-0.2309926301240921,
-0.14894576370716095,
-0.2835090756416321,
-0.04929504916071892,
-0.12954723834991455,
-0.1665658801794052,
0.09825330972671509,
0.017937511205673218,
-0.20924536883831024,
-0.11590873450040817,
0.3093053996562958,
0.20610260963439941,
0.5103486180305481,
0.4604107439517975,
-0.1999596655368805,
0.22079309821128845,
-0.006039422005414963,
-0.16184519231319427,
-0.12051212787628174,
0.46578022837638855,
-0.07719740271568298,
0.31568798422813416,
-0.00045314058661460876,
0.1795179396867752,
0.19262570142745972,
-0.5440988540649414,
0.24890415370464325,
-0.2068140208721161,
-0.14889080822467804,
-0.07643263041973114,
0.06448167562484741,
0.23883236944675446,
-0.24922755360603333,
0.09092073142528534,
-0.2246820032596588,
0.22443801164627075,
0.011106785386800766,
-0.1982215791940689,
-0.19329330325126648,
0.020183712244033813,
0.10265935957431793,
0.24963678419589996,
-0.13173076510429382,
-0.06405779719352722,
-0.21984347701072693,
0.2845182418823242,
-0.2986399233341217,
-0.4421229064464569,
0.23060156404972076,
0.1698843240737915,
-0.10468582808971405,
-0.21554255485534668,
0.2352343052625656,
0.11307738721370697,
-0.018512576818466187,
-0.07876655459403992,
0.0574258491396904,
0.4801429212093353,
0.23772750794887543,
0.12982773780822754,
0.009986285120248795,
0.14351913332939148,
-0.1271299421787262,
-0.08871768414974213,
0.11760953068733215,
0.24251362681388855,
0.5193853378295898,
0.3090222477912903,
0.15749908983707428,
-0.25264444947242737,
-0.3226427733898163,
0.30113211274147034,
0.022636067122220993,
-0.04213828593492508,
0.437865287065506,
-0.2764911651611328,
0.19283407926559448,
-0.1713656485080719,
0.19691793620586395,
-0.3575226664543152,
-0.08649910241365433,
0.554878830909729,
0.1537276804447174,
0.03971704840660095,
-0.1745000183582306,
0.06168470159173012,
-0.10925501585006714,
0.5514641404151917,
0.32812950015068054,
0.16909654438495636,
-0.2846253514289856,
-0.2328631728887558,
-0.8396716117858887,
0.3168759346008301,
0.14502321183681488,
-0.2916586697101593,
0.10789478570222855,
-0.2316846251487732,
-0.027788467705249786,
0.09198953211307526,
-0.06913568079471588,
0.17910915613174438,
-0.008718784898519516,
-0.12986159324645996,
-0.2974386215209961,
-0.3717603385448456,
0.06685040891170502,
0.1673821657896042,
-0.028477828949689865,
-0.35745424032211304,
0.12037373334169388,
-0.12687498331069946,
-0.0017765238881111145,
-0.388700008392334,
-0.36220186948776245,
-0.09259793907403946,
0.03938313201069832,
0.6595345735549927,
0.20601888000965118,
0.7294602990150452,
-0.027380533516407013,
0.07398427277803421,
0.06865066289901733,
-0.6393170952796936,
-0.0544687956571579,
0.21481209993362427,
0.007433081045746803,
0.09006096422672272,
-0.009896393865346909,
-0.20865051448345184,
-0.282707154750824,
0.24239249527454376,
-0.1323133409023285,
0.10101615637540817,
-0.31497225165367126,
0.19020810723304749,
0.161448135972023,
0.249250590801239,
-0.10973535478115082,
0.0990716814994812,
-0.012795727699995041,
0.23401901125907898,
-0.14983145892620087,
-0.33034569025039673,
0.521776556968689,
-0.20002710819244385,
-0.2910715341567993,
-0.15048156678676605,
0.20611584186553955,
-0.05463743954896927,
-0.14991602301597595,
-0.40658867359161377,
0.11120045185089111,
0.3926159143447876,
-0.14109447598457336,
-0.37175965309143066,
0.4308154881000519,
0.158900648355484,
0.29581135511398315,
-0.07537175714969635,
0.12054537236690521,
0.25460895895957947,
-0.37321382761001587,
0.054065585136413574,
-0.1200055480003357
] |
https://github.com/huggingface/datasets/issues/6612 | Hi ! We recently updated `cnn_dailymail` and now `datasets>=2.14` is needed to load it.
You can update `datasets` with
```
pip install -U datasets
``` | cnn_dailymail repeats itself | ### Describe the bug
When I try to load `cnn_dailymail` dataset, it takes longer than usual and when I checked the dataset it's 3x bigger than it's supposed to be.
Check https://huggingface.co/datasets/cnn_dailymail: it says 287k rows for train. But when I check length of train split it says 861339.
Also I checked data:
```
>>> ds['train']['highlights'][0]
"Harry Potter star Daniel Radcliffe gets £20M fortune as he turns 18 Monday . Young actor says he has no plans to fritter his cash away . Radcliffe's earnings from first five Potter films have been held in trust fund ."````
>>> ds['train']['highlights'][0]
"Harry Potter star Daniel Radcliffe gets £20M fortune as he turns 18 Monday . Young actor says he has no plans to fritter his cash away . Radcliffe's earnings from first five Potter films have been held in trust fund ."````
>>> ds['train']['highlights'][287113]
"Harry Potter star Daniel Radcliffe gets £20M fortune as he turns 18 Monday .\nYoung actor says he has no plans to fritter his cash away .\nRadcliffe's earnings from first five Potter films have been held in trust fund ."````
>>> ds['train']['highlights'][574226]
"Harry Potter star Daniel Radcliffe gets £20M fortune as he turns 18 Monday .\nYoung actor says he has no plans to fritter his cash away .\nRadcliffe's earnings from first five Potter films have been held in trust fund ."
```
The datasets seems to be updated 6 days ago to convert it to Parquet. Probably, there is some issue with backward compatability.
### Steps to reproduce the bug
1.
```
from datasets import load_dataset
ds = load_dataset('cnn_dailymail', '3.0.0')
len(ds['train'])
```
### Expected behavior
It should not repeat itself.
### Environment info
datasets==2.13.2
Python==3.7.13 | 25 | cnn_dailymail repeats itself
### Describe the bug
When I try to load `cnn_dailymail` dataset, it takes longer than usual and when I checked the dataset it's 3x bigger than it's supposed to be.
Check https://huggingface.co/datasets/cnn_dailymail: it says 287k rows for train. But when I check length of train split it says 861339.
Also I checked data:
```
>>> ds['train']['highlights'][0]
"Harry Potter star Daniel Radcliffe gets £20M fortune as he turns 18 Monday . Young actor says he has no plans to fritter his cash away . Radcliffe's earnings from first five Potter films have been held in trust fund ."````
>>> ds['train']['highlights'][0]
"Harry Potter star Daniel Radcliffe gets £20M fortune as he turns 18 Monday . Young actor says he has no plans to fritter his cash away . Radcliffe's earnings from first five Potter films have been held in trust fund ."````
>>> ds['train']['highlights'][287113]
"Harry Potter star Daniel Radcliffe gets £20M fortune as he turns 18 Monday .\nYoung actor says he has no plans to fritter his cash away .\nRadcliffe's earnings from first five Potter films have been held in trust fund ."````
>>> ds['train']['highlights'][574226]
"Harry Potter star Daniel Radcliffe gets £20M fortune as he turns 18 Monday .\nYoung actor says he has no plans to fritter his cash away .\nRadcliffe's earnings from first five Potter films have been held in trust fund ."
```
The datasets seems to be updated 6 days ago to convert it to Parquet. Probably, there is some issue with backward compatability.
### Steps to reproduce the bug
1.
```
from datasets import load_dataset
ds = load_dataset('cnn_dailymail', '3.0.0')
len(ds['train'])
```
### Expected behavior
It should not repeat itself.
### Environment info
datasets==2.13.2
Python==3.7.13
Hi ! We recently updated `cnn_dailymail` and now `datasets>=2.14` is needed to load it.
You can update `datasets` with
```
pip install -U datasets
``` | [
0.07091876864433289,
-0.30874955654144287,
0.029564738273620605,
0.6589643955230713,
-0.008779346942901611,
0.07012949883937836,
0.4404844641685486,
-0.0358312763273716,
-0.12530618906021118,
0.07747453451156616,
0.24863269925117493,
0.3104359209537506,
-0.21459093689918518,
0.2979711890220642,
0.3054756224155426,
0.05363384634256363,
0.1306930035352707,
-0.08649490773677826,
-0.11007703840732574,
-0.20676517486572266,
-0.09162212908267975,
0.17983821034431458,
-0.21325966715812683,
-0.12247857451438904,
-0.4137269854545593,
-0.049061667174100876,
-0.03855118900537491,
0.2444792538881302,
0.10296639055013657,
-0.04431379586458206,
0.11743699014186859,
-0.4179801642894745,
0.0445447713136673,
0.6658532619476318,
-0.00012312580656725913,
-0.04416771978139877,
0.3004106283187866,
-0.08767740428447723,
-0.13747328519821167,
-0.02300398051738739,
0.0012644007802009583,
-0.021772343665361404,
0.24458834528923035,
-0.25590038299560547,
-0.11342653632164001,
-0.1274380385875702,
-0.3751666843891144,
-0.01565372198820114,
0.572087824344635,
0.4610203802585602,
0.11631831526756287,
0.04798630625009537,
0.10146397352218628,
0.018514297902584076,
0.02129462920129299,
-0.037191811949014664,
0.001144111156463623,
0.34161967039108276,
-0.23856770992279053,
0.10048684477806091,
0.12192541360855103,
0.20981554687023163,
0.06295499950647354,
-0.09629268944263458,
0.0851149708032608,
0.0949939414858818,
-0.07110307365655899,
-0.35644522309303284,
-0.04125123843550682,
0.23730023205280304,
0.20724791288375854,
-0.10961324721574783,
0.03931182622909546,
-0.18896055221557617,
0.13360470533370972,
-0.3640766739845276,
0.12014932930469513,
0.29832276701927185,
0.11634229868650436,
0.2062445431947708,
-0.2812454402446747,
0.14655935764312744,
-0.008776083588600159,
0.3072446584701538,
-0.41531872749328613,
-0.02828594669699669,
0.005662743002176285,
0.10418151319026947,
0.04568679630756378,
-0.25108230113983154,
0.5221536159515381,
-0.07600031048059464,
0.32098498940467834,
0.07440169900655746,
-0.36966055631637573,
0.10323679447174072,
0.07324831187725067,
0.018233299255371094,
0.07740575075149536,
0.03522560000419617,
0.009092889726161957,
-0.1273820698261261,
-0.05595269799232483,
-0.1543118804693222,
0.21757757663726807,
0.19021591544151306,
-0.3775182366371155,
0.2851598560810089,
-0.06485413014888763,
0.1728571504354477,
-0.220908984541893,
0.038532424718141556,
-0.14257512986660004,
0.22506996989250183,
0.25814899802207947,
-0.25045397877693176,
0.3715072572231293,
-0.08680886030197144,
-0.10883738100528717,
0.4031270444393158,
-0.34505558013916016,
0.020629163831472397,
0.13366679847240448,
0.33524438738822937,
-0.06493490934371948,
0.1428806185722351,
-0.0949224978685379,
-0.0783073902130127,
0.07231966406106949,
-0.20617665350437164,
-0.2451867163181305,
-0.08878139406442642,
-0.16390776634216309,
0.2221056967973709,
-0.020917251706123352,
-0.39861029386520386,
0.13141964375972748,
0.3385010361671448,
0.2918846309185028,
-0.5121597051620483,
-0.24153462052345276,
-0.018068037927150726,
0.006707102060317993,
0.18231555819511414,
-0.5644171237945557,
0.197359099984169,
0.18762408196926117,
0.2607892155647278,
-0.14954063296318054,
0.23510043323040009,
-0.40089741349220276,
-0.5087980031967163,
0.12070579081773758,
0.09839588403701782,
-0.11837900429964066,
-0.25639790296554565,
0.2045455276966095,
0.07547713816165924,
0.043851908296346664,
-0.09710228443145752,
0.07109149545431137,
-0.2855178713798523,
0.018560215830802917,
-0.06505457311868668,
0.037916719913482666,
0.2698952555656433,
-0.48949649930000305,
-0.0069030895829200745,
-0.1731247752904892,
0.16568990051746368,
0.3244878351688385,
0.3367026746273041,
-0.2535496652126312,
0.04323374480009079,
-0.3071763515472412,
-0.28241831064224243,
0.2997318506240845,
0.1430612951517105,
-0.5389732718467712,
-0.014072451740503311,
-0.19156807661056519,
0.3660052716732025,
-0.0425880067050457,
0.12303201854228973,
-0.04227754473686218,
0.23540431261062622,
0.25055527687072754,
0.47181186079978943,
-0.08759589493274689,
0.024653807282447815,
-0.36940672993659973,
-0.3506869375705719,
0.3640548288822174,
0.23517093062400818,
0.1991230547428131,
0.18332967162132263,
-0.05733538419008255,
0.011147048324346542,
0.2868237793445587,
0.04321698099374771,
-0.34774279594421387,
-0.049943193793296814,
0.028188444674015045,
0.2448592334985733,
0.37707895040512085,
-0.1369662880897522,
-0.30478644371032715,
-0.021621182560920715,
0.052403807640075684,
-0.01354914903640747,
0.2603365182876587,
-0.1964433193206787,
-0.40983453392982483,
-0.002920307219028473,
-0.10958836227655411,
0.02854570746421814,
-0.010949522256851196,
0.05746877193450928,
-0.15016219019889832,
0.037626542150974274,
-0.23282252252101898,
0.42361539602279663,
-0.314441055059433,
0.11594803631305695,
-0.43389204144477844,
0.3650038242340088,
-0.005285442806780338,
0.0011165961623191833,
-0.03528923913836479,
0.30749276280403137,
0.3275769352912903,
-0.1924176663160324,
-0.012990167364478111,
0.056308262050151825,
0.21359556913375854,
0.016304679214954376,
-0.3194931745529175,
-0.05940215289592743,
0.23176288604736328,
-0.01988638937473297,
0.11815867573022842,
0.49514660239219666,
0.0709642767906189,
-0.15963827073574066,
0.06587331742048264,
0.24064409732818604,
0.20090103149414062,
-0.007908724248409271,
-0.051638975739479065,
-0.18945905566215515,
-0.01679162308573723,
-0.05599241331219673,
0.002290673553943634,
-0.13779689371585846,
0.23015429079532623,
-0.4028977155685425,
0.42264077067375183,
0.10273277014493942,
-0.5742029547691345,
0.15062910318374634,
0.28623175621032715,
-0.24473533034324646,
0.13585829734802246,
0.28183189034461975,
-0.32324856519699097,
-0.15083788335323334,
-0.2745553255081177,
0.15937352180480957,
0.3054322898387909,
0.08933096379041672,
0.1286192238330841,
0.20438987016677856,
-0.03450485318899155,
-0.1685175597667694,
0.14181452989578247,
-0.0757179856300354,
0.39505264163017273,
0.35621222853660583,
0.2499430924654007,
0.058217037469148636,
-0.45024487376213074,
-0.04719332605600357,
0.0941365510225296,
0.2903730273246765,
-0.29746213555336,
0.25717270374298096,
-0.43391191959381104,
0.014963604509830475,
-0.3839953541755676,
-0.33444109559059143,
-0.13006724417209625,
-0.1778993457555771,
0.00605514831840992,
-0.054341528564691544,
0.01923980563879013,
-0.10076741129159927,
0.13429267704486847,
0.4246813952922821,
0.2112618386745453,
-0.018692929297685623,
-0.05393712595105171,
-0.04804747924208641,
-0.3623034358024597,
-0.019423658028244972,
0.07093124091625214,
-0.20952409505844116,
0.196689635515213,
-0.09658822417259216,
-0.11447490751743317,
-0.18711358308792114,
-0.5993287563323975,
0.25089335441589355,
0.15910707414150238,
0.34259042143821716,
-0.003777347505092621,
0.20747779309749603,
0.20446588099002838,
0.07810287922620773,
-0.02039717510342598,
-0.11787717044353485,
0.050098665058612823,
0.06821055710315704,
-0.06797251105308533,
0.15451931953430176,
0.040377914905548096,
-0.45362845063209534,
-0.35800594091415405,
-0.1016944944858551,
0.23189416527748108,
-0.09731174260377884,
0.16477593779563904,
0.3584853410720825,
-0.05078379809856415,
0.09401807188987732,
-0.051345065236091614,
0.27211615443229675,
-0.48236921429634094,
-0.29563331604003906,
0.35050880908966064,
-0.04685043543577194,
-0.3853846788406372,
-0.06904353201389313,
-0.12731429934501648,
-0.4313541352748871,
-0.2226582169532776,
-0.8766411542892456,
-0.3904297351837158,
-0.24311946332454681,
-0.3873615562915802,
-0.12741121649742126,
-0.07711252570152283,
-0.01819669082760811,
-0.4009329378604889,
0.06357717514038086,
0.035059235990047455,
-0.24280205368995667,
-0.13052941858768463,
0.21884573996067047,
0.1451805830001831,
0.03163551911711693,
0.6921167969703674,
-0.2659691572189331,
0.1700054258108139,
0.4784142076969147,
-0.16129498183727264,
0.1283915638923645,
-0.2781670093536377,
0.13922223448753357,
-0.12366367876529694,
-0.19258104264736176,
-0.24487429857254028,
-0.08025674521923065,
-0.48543494939804077,
0.42370301485061646,
-0.19995936751365662,
-0.3469904363155365,
0.01762949675321579,
-0.17645305395126343,
-0.2062062919139862,
-0.19454312324523926,
0.1253267228603363,
0.20145292580127716,
0.05319196730852127,
0.21659113466739655,
0.05051784962415695,
0.00156412273645401,
-0.2692239582538605,
-0.06705590337514877,
-0.009452339261770248,
0.08333481848239899,
-0.01262093335390091,
0.12946641445159912,
0.000988401472568512,
-0.2976714074611664,
0.1895907074213028,
-0.07901562005281448,
0.325949102640152,
0.01451302319765091,
-0.08229685574769974,
0.23718488216400146,
-0.08439469337463379,
0.7047765254974365,
-0.04166235774755478,
-0.011201521381735802,
0.006700307130813599,
-0.03273565322160721,
-0.2745833992958069,
-0.30805742740631104,
-0.1508035957813263,
-0.23563635349273682,
0.26963409781455994,
0.5698649883270264,
-0.03085280954837799,
0.1467299610376358,
0.8113783001899719,
0.46613410115242004,
-0.19492289423942566,
-0.47400519251823425,
-0.24373731017112732,
-0.11986814439296722,
-0.07253237813711166,
0.21438363194465637,
-0.1254889965057373,
0.28574004769325256,
-0.026057254523038864,
-0.22979357838630676,
-0.12343951314687729,
-0.005357205867767334,
0.27353525161743164,
0.0918184369802475,
0.48924338817596436,
0.14489193260669708,
0.14918756484985352,
0.07253581285476685,
0.025508012622594833,
0.0330575630068779,
0.949273943901062,
-0.06612697243690491,
-0.20363284647464752,
0.08284512162208557,
-0.04043574631214142,
0.13604632019996643,
0.7006643414497375,
-0.1173020601272583,
-0.280385822057724,
-0.005111446604132652,
0.39235028624534607,
-0.1076284870505333,
-0.09462196379899979,
0.39484795928001404,
0.04006165638566017,
-0.5548852682113647,
-0.39894193410873413,
0.5295466184616089,
0.10211575031280518,
0.09965921938419342,
0.020349329337477684,
-0.2385527789592743,
-0.0911032110452652,
0.2833150625228882,
-0.26001787185668945,
1.171648383140564,
0.11078669130802155,
0.14318929612636566,
0.3639374077320099,
0.09161990880966187,
0.2121443897485733,
-0.4990886449813843,
-0.03625369817018509,
-0.4104028046131134,
-0.5198696255683899,
-0.06945671886205673,
-0.14416788518428802,
-0.10294795036315918,
0.3287149965763092,
-0.07062946259975433,
0.2540971040725708,
-0.20675374567508698,
0.3763100802898407,
0.010304398834705353,
0.2663072347640991,
0.1850578337907791,
0.32887575030326843,
-0.3079093396663666,
0.03245379030704498,
0.06051629036664963,
-0.12574928998947144,
-0.08229561895132065,
0.19417834281921387,
0.008591659367084503,
-0.23216496407985687,
-0.2920360267162323,
0.1709311157464981,
-0.16858331859111786,
0.027200348675251007,
0.07641836255788803,
-0.33318275213241577,
-0.09554967284202576,
-0.14249716699123383,
-0.015573401004076004,
0.05384962633252144,
-0.04406559839844704,
-0.017208918929100037,
0.01940438523888588,
0.020536962896585464,
-0.19504475593566895,
-0.09302219748497009,
0.3006304204463959,
0.10109163820743561,
-0.2698347866535187,
-0.08535126596689224,
0.051075540482997894,
-0.10893785953521729,
-0.23796020448207855,
0.4375118613243103,
-0.007235994562506676,
-0.3467489182949066,
-0.3565449118614197,
0.04347342997789383,
0.18211159110069275,
-0.10911659151315689,
0.05930197238922119,
-0.1851021945476532,
-0.03833100572228432,
0.08944027125835419,
0.061452772468328476,
-0.5133081674575806,
-0.2850494980812073,
0.06279583275318146,
0.36861246824264526,
0.025040507316589355,
0.2525217831134796,
0.5245646834373474,
-0.1529647409915924,
-0.15641847252845764,
0.15695954859256744,
0.3750365674495697,
-0.4534156918525696,
0.1802423894405365,
-0.16501083970069885,
0.082193523645401,
0.12204708158969879,
0.13779470324516296,
0.15215641260147095,
0.09208253026008606,
-0.3194452226161957,
-0.43194931745529175,
0.20678913593292236,
0.133768692612648,
0.18491046130657196,
0.35541751980781555,
0.15106041729450226,
0.06046644598245621,
0.014592818915843964,
0.035013288259506226,
-0.2155795693397522,
0.3290919363498688,
0.1431845724582672,
0.06022631376981735,
-0.027742501348257065,
-0.12283022701740265,
0.39095696806907654,
0.12707266211509705,
0.008093804121017456,
0.15978498756885529,
0.024486083537340164,
-0.19175246357917786,
-0.12402749806642532,
0.19555161893367767,
0.048475392162799835,
0.24457886815071106,
-0.085511215031147,
-0.22877493500709534,
-0.022430583834648132,
-0.18277564644813538,
0.36451321840286255,
0.08666734397411346,
0.2787637412548065,
-0.10124142467975616,
0.3971518278121948,
-0.24571412801742554,
-0.10210729390382767,
-0.08054009079933167,
-0.06948719918727875,
0.43343064188957214,
0.17162469029426575,
0.12127833068370819,
-0.06283895671367645,
0.10608294606208801,
-0.265703409910202,
0.06927964091300964,
0.24042876064777374,
-0.0993068516254425,
0.3200376629829407,
-0.3391519784927368,
-0.15097695589065552,
0.3434692621231079,
0.21751669049263,
0.5994464755058289,
-0.36847612261772156,
-0.2108842432498932,
-0.007714029401540756,
0.048016346991062164,
-0.4540727436542511,
-0.16882261633872986,
0.2425508052110672,
0.15621806681156158,
-0.1230357438325882,
0.3331424593925476,
0.030897274613380432,
0.08865021169185638,
-0.20077015459537506,
0.0007324814796447754,
0.37002748250961304,
0.0817176103591919,
0.4372554421424866,
0.07456705719232559,
-0.13080817461013794,
-0.11784482002258301,
0.3167073726654053,
-0.07788506895303726,
0.04339032992720604,
0.3725701570510864,
0.03772401064634323,
-0.08980551362037659,
0.18433183431625366,
0.15015286207199097,
0.2503678798675537,
-0.18660099804401398,
0.3668421506881714,
0.425833135843277,
-0.15428805351257324,
0.05092005804181099,
0.21263764798641205,
0.23702460527420044,
0.164886936545372,
-0.013482596725225449,
-0.490346759557724,
0.15930303931236267,
-0.07425783574581146,
0.26192760467529297,
0.6008666157722473,
-0.19644902646541595,
-0.2595137357711792,
0.156072735786438,
-0.09392645210027695,
-0.1512077897787094,
0.09846850484609604,
0.2502426207065582,
-0.10540177673101425,
-0.3993738293647766,
-0.1621599644422531,
0.20184370875358582,
0.16364838182926178,
-0.36530712246894836,
0.37298524379730225,
0.18401026725769043,
-0.16873452067375183,
0.030647646635770798,
0.30357253551483154,
0.2504827678203583,
0.41476696729660034,
0.15353788435459137,
0.2641562223434448,
0.09658987075090408,
-0.009089462459087372,
0.12883360683918,
0.10370251536369324,
0.18421681225299835,
0.023706629872322083,
0.16018441319465637,
0.04610287770628929,
-0.17901566624641418,
-0.05890991538763046,
0.07471556961536407,
0.19118346273899078,
-0.6860353350639343,
0.3527429401874542,
-0.1834283471107483,
0.21704888343811035,
-0.29175251722335815,
-0.055190347135066986,
-0.697516679763794,
0.02467988431453705,
0.5677510499954224,
-0.0005970709025859833,
0.11688341200351715,
0.03998490050435066,
0.022945061326026917,
-0.280515193939209,
0.45243772864341736,
0.20641225576400757,
0.17414364218711853,
-0.0942591056227684,
-0.11243581771850586,
-0.5129657983779907,
0.4343896210193634,
-0.3700419068336487,
0.1459537148475647,
0.32947829365730286,
0.03833357244729996,
-0.09145575761795044,
0.10067882388830185,
0.21756109595298767,
0.08269678056240082,
-0.33806997537612915,
0.10693491250276566,
-0.3481619656085968,
-0.09546057879924774,
0.093587726354599,
-0.10999565571546555,
0.047975942492485046,
-0.22639703750610352,
0.24900661408901215,
-0.6456295847892761,
-0.12491059303283691,
-0.01133937481790781,
-0.2933083772659302,
-0.24655674397945404,
0.0006144046783447266,
0.3965510427951813,
0.2241821587085724,
0.38018471002578735,
0.12770402431488037,
-0.05343349650502205,
-0.34915632009506226,
-0.2968333959579468,
-0.08704113960266113,
0.6270378232002258,
0.1287180483341217,
0.058284610509872437,
-0.019466619938611984,
-0.5059758424758911,
-0.1233540028333664,
0.037877026945352554,
0.10051339864730835,
-0.2661372423171997,
-0.25895360112190247,
-0.06505582481622696,
-0.17259395122528076,
0.26208004355430603,
0.05382920801639557,
0.4507704973220825,
-0.019040115177631378,
0.2587997317314148,
0.42917945981025696,
-0.573125958442688,
0.4212651550769806,
-0.341481477022171,
-0.3234770596027374,
-0.05362546071410179,
0.14565908908843994,
0.08463013172149658,
-0.034675970673561096,
-0.6067806482315063,
0.03683073818683624,
0.2611530125141144,
-0.0157450120896101,
0.01225656270980835,
0.30080536007881165,
0.01615368202328682,
-0.00006336718797683716,
-0.14167368412017822,
0.3824862241744995,
0.41562849283218384,
-0.20309002697467804,
0.06270169466733932,
-0.2671525478363037
] |
https://github.com/huggingface/datasets/issues/6610 | Hi! You are passing the wrong feature type to `cast_column`. This is the fixed call:
```python
ais_dataset = ais_dataset.cast_column("my_labeled_bbox", {"bbox": Sequence(Value(dtype="int64")), "label": ClassLabel(names=["cat", "dog"])})
``` | cast_column to Sequence(subfeatures_dict) has err | ### Describe the bug
I am working with the following demo code:
```
from datasets import load_dataset
from datasets.features import Sequence, Value, ClassLabel, Features
ais_dataset = load_dataset("/data/ryan.gao/ais_dataset_cache/raw/1978/")
ais_dataset = ais_dataset["train"]
def add_class(example):
example["my_labeled_bbox"] = {"bbox": [100,100,200,200], "label": "cat"}
return example
ais_dataset = ais_dataset.map(add_class, batched=False, num_proc=32)
ais_dataset = ais_dataset.cast_column("my_labeled_bbox", Sequence(
{
"bbox": Sequence(Value(dtype="int64")),
"label": ClassLabel(names=["cat", "dog"])
}))
print(ais_dataset[0])
```
However, executing this code results in an error:
```
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2111, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}")
TypeError: Couldn't cast array of type
int64
to
Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None)
```
Upon examining the source code in datasets/table.py at line 2035:
```
if isinstance(feature, Sequence) and isinstance(feature.feature, dict):
feature = {
name: Sequence(subfeature, length=feature.length) for name, subfeature in feature.feature.items()
}
```
I noticed that if subfeature is of type Sequence, the code results in Sequence(Sequence(...), ...) and Sequence(ClassLabel(...), ...), which appears to be the source of the error.
### Steps to reproduce the bug
run my demo code
### Expected behavior
no exception
### Environment info
python 3.9
datasets: 2.16.1 | 25 | cast_column to Sequence(subfeatures_dict) has err
### Describe the bug
I am working with the following demo code:
```
from datasets import load_dataset
from datasets.features import Sequence, Value, ClassLabel, Features
ais_dataset = load_dataset("/data/ryan.gao/ais_dataset_cache/raw/1978/")
ais_dataset = ais_dataset["train"]
def add_class(example):
example["my_labeled_bbox"] = {"bbox": [100,100,200,200], "label": "cat"}
return example
ais_dataset = ais_dataset.map(add_class, batched=False, num_proc=32)
ais_dataset = ais_dataset.cast_column("my_labeled_bbox", Sequence(
{
"bbox": Sequence(Value(dtype="int64")),
"label": ClassLabel(names=["cat", "dog"])
}))
print(ais_dataset[0])
```
However, executing this code results in an error:
```
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2111, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}")
TypeError: Couldn't cast array of type
int64
to
Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None)
```
Upon examining the source code in datasets/table.py at line 2035:
```
if isinstance(feature, Sequence) and isinstance(feature.feature, dict):
feature = {
name: Sequence(subfeature, length=feature.length) for name, subfeature in feature.feature.items()
}
```
I noticed that if subfeature is of type Sequence, the code results in Sequence(Sequence(...), ...) and Sequence(ClassLabel(...), ...), which appears to be the source of the error.
### Steps to reproduce the bug
run my demo code
### Expected behavior
no exception
### Environment info
python 3.9
datasets: 2.16.1
Hi! You are passing the wrong feature type to `cast_column`. This is the fixed call:
```python
ais_dataset = ais_dataset.cast_column("my_labeled_bbox", {"bbox": Sequence(Value(dtype="int64")), "label": ClassLabel(names=["cat", "dog"])})
``` | [
-0.06808836758136749,
-0.2487647533416748,
-0.06157679110765457,
0.015728870406746864,
0.5308369398117065,
0.24775570631027222,
0.4921039938926697,
0.2797868847846985,
0.1971459835767746,
-0.10834231972694397,
0.1848737597465515,
0.22724923491477966,
-0.12083391845226288,
0.37863239645957947,
-0.17962826788425446,
-0.20303714275360107,
0.45531246066093445,
-0.1145128682255745,
-0.00831269845366478,
0.10106025636196136,
-0.4560483396053314,
0.13075873255729675,
-0.5421671867370605,
0.22616799175739288,
0.002655141055583954,
-0.08513116836547852,
0.0513610765337944,
-0.3677842617034912,
-0.005814878270030022,
-0.3511534631252289,
0.44177645444869995,
-0.29729095101356506,
0.28920087218284607,
0.21175432205200195,
-0.00011738636385416612,
-0.058872126042842865,
0.4586848020553589,
0.07760418951511383,
-0.007284343242645264,
0.2057163119316101,
-0.46142998337745667,
-0.04128365218639374,
0.14486081898212433,
-0.48795273900032043,
-0.17643360793590546,
-0.09116078168153763,
-0.24718979001045227,
-0.31751519441604614,
-0.029161617159843445,
0.4845074415206909,
0.1776687055826187,
0.023762978613376617,
0.1587362289428711,
-0.03562360256910324,
0.15870821475982666,
-0.1779380738735199,
-0.25314509868621826,
-0.12773089110851288,
0.06752198934555054,
0.1961895376443863,
0.37535446882247925,
0.27778974175453186,
-0.14723268151283264,
-0.22666890919208527,
0.25519371032714844,
0.09153101593255997,
0.3564312756061554,
-0.32912418246269226,
-0.18674078583717346,
-0.09699307382106781,
0.5523717999458313,
-0.30875420570373535,
-0.32380473613739014,
-0.09832432121038437,
0.06321723759174347,
-0.18071383237838745,
0.039893362671136856,
-0.12652373313903809,
0.17301474511623383,
0.13375137746334076,
-0.23768754303455353,
0.4584795832633972,
0.010743014514446259,
0.12276172637939453,
-0.0925288200378418,
0.09065555036067963,
-0.12914304435253143,
0.09180542826652527,
-0.2091226875782013,
-0.46022236347198486,
-0.014874404296278954,
-0.028833866119384766,
0.00989492703229189,
0.14415161311626434,
-0.5307452082633972,
-0.2496882677078247,
-0.16735167801380157,
-0.07400434464216232,
-0.2047119140625,
0.031552087515592575,
-0.028105052188038826,
0.011468756943941116,
0.11374804377555847,
-0.11381567269563675,
0.2982642650604248,
0.2509405016899109,
-0.05097457766532898,
0.11632193624973297,
-0.221681147813797,
0.33291566371917725,
-0.0015030354261398315,
0.09255906939506531,
0.12232515960931778,
-0.14826661348342896,
0.17545196413993835,
0.20997032523155212,
0.24493032693862915,
-0.20351089537143707,
-0.2391240894794464,
0.2929682433605194,
-0.06639169901609421,
0.10429394245147705,
0.16493962705135345,
0.20326322317123413,
-0.03629555180668831,
0.2116217315196991,
0.0951438695192337,
0.35680368542671204,
0.03537894785404205,
-0.014188740402460098,
-0.2049705684185028,
0.12317833304405212,
-0.05365276336669922,
-0.24674737453460693,
-0.32298383116722107,
0.3856528699398041,
-0.1276218295097351,
0.00603128969669342,
-0.16822367906570435,
-0.13033902645111084,
-0.2818971276283264,
-0.1579139530658722,
0.05390574783086777,
0.282036691904068,
-0.27404022216796875,
0.24515140056610107,
0.21307598054409027,
0.053855568170547485,
-0.12285945564508438,
0.11113984882831573,
-0.1999775916337967,
-0.1039351373910904,
-0.17556843161582947,
0.2001296728849411,
-0.010821472853422165,
0.12495939433574677,
-0.25226256251335144,
-0.16537560522556305,
0.6826184391975403,
-0.19710561633110046,
0.27707168459892273,
-0.4943487346172333,
-0.45412808656692505,
-0.23627996444702148,
0.03270137310028076,
0.03083498775959015,
0.0038270577788352966,
0.15706007182598114,
0.004674237221479416,
-0.007444359362125397,
0.20098572969436646,
0.07309876382350922,
0.2264138013124466,
0.06689687073230743,
-0.25887352228164673,
0.15128293633460999,
0.2805543541908264,
-0.08322835713624954,
-0.11638861894607544,
0.2315317988395691,
-0.0007098540663719177,
-0.0560171976685524,
0.12749658524990082,
0.3574582636356354,
0.27597182989120483,
-0.4208102524280548,
0.054883360862731934,
0.34745168685913086,
-0.07318193465471268,
0.13789215683937073,
-0.11799125373363495,
-0.20120084285736084,
-0.014824191108345985,
0.06351827085018158,
-0.16776908934116364,
0.4127453565597534,
-0.01597164198756218,
-0.09603367745876312,
0.09711899608373642,
-0.10882223397493362,
0.12624436616897583,
0.1776353418827057,
0.12705174088478088,
0.20655906200408936,
0.05050762742757797,
-0.48121732473373413,
-0.21166837215423584,
0.05106481909751892,
0.4298551678657532,
-0.19655729830265045,
-0.24697619676589966,
-0.2032795399427414,
-0.2611616253852844,
0.14929673075675964,
-0.23712977766990662,
0.5411095023155212,
0.03218052536249161,
-0.19199423491954803,
0.0902061015367508,
-0.07335725426673889,
-0.08625375479459763,
0.3487264811992645,
-0.25937020778656006,
0.03220651298761368,
-0.6131832003593445,
0.15599852800369263,
-0.08316486328840256,
-0.15312987565994263,
-0.1035843938589096,
0.2659054696559906,
0.24906863272190094,
-0.04204713553190231,
-0.08291254192590714,
0.2848362624645233,
0.2443033903837204,
-0.2559356093406677,
-0.6009728908538818,
0.17081958055496216,
0.00390002503991127,
-0.35907062888145447,
-0.1682324856519699,
0.23887059092521667,
0.12276704609394073,
-0.0745696946978569,
-0.033960215747356415,
0.4081633388996124,
0.01374838873744011,
0.37667861580848694,
-0.13140076398849487,
0.16135036945343018,
0.06942804157733917,
0.008850879967212677,
-0.10221011936664581,
-0.36922866106033325,
-0.0766831561923027,
-0.1037919819355011,
-0.35436514019966125,
0.017155872657895088,
-0.18537789583206177,
0.260884165763855,
0.33944812417030334,
-0.132501482963562,
0.1232088953256607,
0.10592412948608398,
0.04923425614833832,
0.07510504126548767,
0.0070479195564985275,
0.13116583228111267,
0.26086950302124023,
-0.05056000128388405,
-0.08605353534221649,
0.03170199692249298,
-0.17347174882888794,
-0.002243656665086746,
0.16863131523132324,
0.2705605626106262,
0.017217207700014114,
-0.07015527039766312,
0.07919000089168549,
0.05130869150161743,
0.19997988641262054,
-0.11892509460449219,
0.025117889046669006,
0.18753467500209808,
-0.48895543813705444,
0.27232038974761963,
-0.3111679255962372,
-0.3265632688999176,
-0.04258608818054199,
-0.18927708268165588,
0.40509554743766785,
-0.5430177450180054,
-0.3550184965133667,
0.1872224658727646,
-0.2666431665420532,
0.15441381931304932,
-0.4146047830581665,
-0.3434278070926666,
0.41224542260169983,
-0.16517187654972076,
-0.02959194779396057,
0.0400007963180542,
0.0384037084877491,
0.04045715555548668,
0.08588866889476776,
0.206619530916214,
0.00440734438598156,
0.010921105742454529,
-0.17654183506965637,
-0.19035977125167847,
-0.1978813111782074,
-0.052235059440135956,
-0.18780051171779633,
-0.05741559714078903,
0.3934016525745392,
0.034555092453956604,
0.10697897523641586,
-0.3361693322658539,
0.17553317546844482,
0.0645551085472107,
-0.16767539083957672,
0.45929983258247375,
0.014407575130462646,
-0.19480785727500916,
-0.14357531070709229,
-0.12693503499031067,
-0.15483762323856354,
-0.3410121202468872,
-0.1111561506986618,
0.15717530250549316,
-0.016347624361515045,
0.03270888328552246,
0.14359880983829498,
-0.06298819929361343,
0.31841209530830383,
0.04117825627326965,
-0.1580977588891983,
0.5138845443725586,
0.3593284785747528,
0.025807473808526993,
-0.22918637096881866,
-0.10154445469379425,
-0.3829144835472107,
-0.08110678941011429,
0.07827708125114441,
-0.17007409036159515,
-0.08878026902675629,
-0.33136576414108276,
-0.016372621059417725,
0.08408719301223755,
-0.15590718388557434,
0.1806378811597824,
0.03007485345005989,
0.0064188167452812195,
0.031747788190841675,
0.10995253920555115,
0.012076795101165771,
0.19439798593521118,
-0.006692614406347275,
0.2650524377822876,
0.6776396632194519,
-0.020870961248874664,
-0.12523704767227173,
0.23852479457855225,
-0.3719642162322998,
0.386991411447525,
-0.0935339629650116,
-0.06673990935087204,
-0.32395344972610474,
-0.1326434314250946,
-0.09975315630435944,
-0.16003689169883728,
-0.16695481538772583,
0.043619997799396515,
-0.21349553763866425,
-0.21219389140605927,
0.2186306118965149,
0.3325081467628479,
0.1278596818447113,
-0.08142361044883728,
-0.06625157594680786,
-0.33663448691368103,
0.13236674666404724,
-0.12900707125663757,
0.07527199387550354,
-0.08559839427471161,
-0.07704252004623413,
0.06004250422120094,
0.05257848650217056,
-0.0031239762902259827,
-0.14119940996170044,
-0.5155323147773743,
-0.34130173921585083,
0.08342438191175461,
0.21141549944877625,
0.40697595477104187,
0.6117774844169617,
0.05665142834186554,
-0.20527276396751404,
-0.02240581065416336,
0.1272982656955719,
0.4906632900238037,
-0.39227843284606934,
0.05705418437719345,
0.34156471490859985,
0.33332493901252747,
-0.2560831308364868,
-0.3116447329521179,
-0.06099459156394005,
-0.14280728995800018,
0.18659237027168274,
0.18043072521686554,
0.005644083023071289,
0.05176122114062309,
0.522213876247406,
0.20469999313354492,
-0.1322261393070221,
-0.09381841123104095,
-0.22787564992904663,
-0.364429771900177,
-0.19606345891952515,
0.1429276317358017,
0.36865782737731934,
0.2278740108013153,
0.021211691200733185,
-0.16177773475646973,
-0.3132176101207733,
-0.16007870435714722,
-0.1332390010356903,
-0.10959688574075699,
0.2317185252904892,
-0.028123799711465836,
0.4735446870326996,
-0.4262405335903168,
-0.12815411388874054,
-0.016624299809336662,
0.2625059485435486,
-0.008590641431510448,
-0.21203777194023132,
0.1214112937450409,
-0.1138145700097084,
0.19883675873279572,
-0.014451861381530762,
-0.24001334607601166,
0.1092851310968399,
-0.08738957345485687,
0.20140478014945984,
-0.1760309934616089,
-0.3989860415458679,
0.43602293729782104,
0.08219315111637115,
-0.4388866126537323,
-0.6548398733139038,
0.42959386110305786,
0.11932867765426636,
-0.14200769364833832,
-0.22540119290351868,
0.19127076864242554,
-0.20124167203903198,
0.6755138039588928,
0.15376728773117065,
0.7638531923294067,
-0.003505626693367958,
-0.032132841646671295,
0.39784273505210876,
0.24407222867012024,
0.5097075700759888,
0.3865019679069519,
0.0747486874461174,
-0.38590192794799805,
-0.48017746210098267,
-0.13188055157661438,
-0.1946069747209549,
0.020544514060020447,
-0.08654138445854187,
-0.17587681114673615,
0.35646072030067444,
-0.47854626178741455,
0.46895453333854675,
-0.016364287585020065,
-0.28813743591308594,
0.24119272828102112,
-0.1660158485174179,
-0.07890255004167557,
0.13315308094024658,
0.2520860731601715,
-0.13375118374824524,
0.1460021734237671,
-0.07233836501836777,
-0.05337061360478401,
-0.05683860182762146,
-0.17651376128196716,
0.20989811420440674,
0.2240164577960968,
0.1576956957578659,
-0.01404564082622528,
0.013438999652862549,
0.2508254647254944,
0.586375892162323,
0.652492344379425,
-0.0786767303943634,
0.09737295657396317,
-0.06850934773683548,
0.42275646328926086,
0.13743704557418823,
0.08084375411272049,
-0.0912618339061737,
0.40088358521461487,
0.0400155708193779,
0.08755223453044891,
0.018267786130309105,
0.14705850183963776,
-0.1945425271987915,
0.09170836210250854,
0.07343631982803345,
0.20447255671024323,
-0.586951494216919,
-0.5745348930358887,
-0.1693345606327057,
0.07591891288757324,
-0.17704929411411285,
0.10339528322219849,
-0.17318861186504364,
-0.18377403914928436,
0.35346201062202454,
-0.2644927203655243,
-0.06777309626340866,
-0.07742848992347717,
0.3250434994697571,
0.38281184434890747,
0.168799489736557,
0.2431149184703827,
0.3029285669326782,
-0.19340088963508606,
-0.09265413135290146,
-0.16585710644721985,
0.24587848782539368,
-0.36053359508514404,
0.022834714502096176,
-0.25910279154777527,
-0.16412313282489777,
-0.035886138677597046,
0.3794012665748596,
-0.15381117165088654,
0.11588971316814423,
-0.16496148705482483,
-0.2727595269680023,
-0.33115777373313904,
0.28607410192489624,
0.06790027022361755,
0.05953213572502136,
-0.30115199089050293,
0.06601212918758392,
-0.2990875840187073,
-0.37317556142807007,
-0.21354669332504272,
-0.20872101187705994,
-0.45759886503219604,
0.20788688957691193,
0.31281572580337524,
0.1282767653465271,
-0.07639601826667786,
0.034812044352293015,
0.16146929562091827,
0.2502617835998535,
-0.1277592033147812,
-0.11694379150867462,
-0.05289082229137421,
0.08742623776197433,
0.11190693825483322,
0.0315733402967453,
-0.11526981741189957,
-0.13715681433677673,
-0.22249285876750946,
-0.2403373122215271,
-0.16784486174583435,
0.18403050303459167,
0.13610269129276276,
-0.07554789632558823,
0.22506383061408997,
-0.05076402425765991,
-0.09847472608089447,
0.2819129228591919,
-0.2615627944469452,
0.0023455843329429626,
-0.19110429286956787,
0.22824734449386597,
-0.16628819704055786,
0.032632142305374146,
-0.18137232959270477,
0.07909227162599564,
-0.19055332243442535,
-0.13942822813987732,
0.4571135342121124,
-0.30556392669677734,
-0.0532291978597641,
0.36160942912101746,
0.25304800271987915,
0.12218174338340759,
-0.4277443289756775,
-0.33371037244796753,
-0.06380301713943481,
0.1377483755350113,
-0.24137160181999207,
-0.33271634578704834,
0.011199109256267548,
-0.022472089156508446,
-0.06818775832653046,
0.3327934145927429,
0.14056158065795898,
-0.025846146047115326,
0.1967201828956604,
0.10498006641864777,
0.44823816418647766,
-0.20835068821907043,
0.15596745908260345,
0.4426133334636688,
0.18179862201213837,
0.0792798101902008,
0.202483132481575,
-0.006801063194870949,
0.23588666319847107,
0.6808600425720215,
0.10454191267490387,
0.022035567089915276,
0.6017282009124756,
-0.03576049953699112,
0.13030095398426056,
-0.15003536641597748,
0.2510480582714081,
0.4171715974807739,
-0.26654884219169617,
0.11819545924663544,
0.32469385862350464,
-0.3883427381515503,
-0.21624624729156494,
-0.26103031635284424,
-0.1309763491153717,
-0.028358351439237595,
-0.20678022503852844,
0.0937865674495697,
-0.08714868128299713,
0.06192809343338013,
-0.2388438582420349,
-0.3109055757522583,
-0.26047950983047485,
0.06801921874284744,
0.4278905987739563,
-0.04616678133606911,
0.22539210319519043,
-0.09919527173042297,
-0.12067361176013947,
0.10567036271095276,
0.2462470978498459,
-0.2701084613800049,
0.2651267945766449,
0.039760615676641464,
-0.0663340762257576,
0.2889159917831421,
-0.05455624312162399,
0.4946942925453186,
0.3373679220676422,
0.0813964456319809,
0.04618882015347481,
0.15272018313407898,
-0.28538888692855835,
0.1692904680967331,
0.12225279957056046,
-0.0792621448636055,
0.3430073857307434,
0.17739281058311462,
0.09831468760967255,
-0.09012337774038315,
0.1846918910741806,
0.08077973127365112,
0.376458078622818,
-0.15016689896583557,
0.8576192855834961,
-0.32477983832359314,
-0.3237677216529846,
-0.10991185158491135,
0.2954142987728119,
-0.33696654438972473,
0.15156112611293793,
0.040612198412418365,
-0.1525590717792511,
0.284841924905777,
0.3174484968185425,
0.054922617971897125,
-0.0027476344257593155,
0.33586397767066956,
0.23145388066768646,
0.04803628474473953,
-0.15755268931388855,
-0.036672309041023254,
-0.3513526916503906,
0.04393991082906723,
0.14040052890777588,
0.07111849635839462,
0.5474023222923279,
0.007064253091812134,
-0.10651279985904694,
0.0653420016169548,
-0.022309936583042145,
0.012262348085641861,
-0.17657791078090668,
0.5699431896209717,
-0.025735221803188324,
-0.3555871248245239,
0.15929335355758667,
0.062474921345710754,
-0.11857366561889648,
-0.523626983165741,
0.32110893726348877,
-0.17645210027694702,
0.10854868590831757,
0.06731364130973816,
-0.050766002386808395,
-0.12445651739835739,
-0.4083528220653534,
0.1480761617422104,
0.07148583978414536,
0.2633976340293884,
-0.06265881657600403,
-0.05904819071292877,
-0.06600797176361084,
-0.28208163380622864,
-0.18913502991199493,
0.3922150731086731,
-0.16554492712020874,
0.5063091516494751,
-0.03729310631752014,
0.42549586296081543,
-0.12583641707897186,
-0.013712722808122635,
0.13278482854366302,
0.009183462709188461,
-0.42155665159225464,
0.38789159059524536,
-0.36770209670066833,
0.33490121364593506,
0.2880419194698334,
-0.08691826462745667,
0.16874703764915466,
0.4514351487159729,
0.08169373869895935,
-0.6409966349601746,
0.5401331186294556,
-0.1149834394454956,
-0.2809724509716034,
-0.04267548769712448,
0.15629898011684418,
0.027808837592601776,
0.11574576795101166,
-0.2761994004249573,
-0.08857940137386322,
0.2872067391872406,
-0.12247945368289948,
-0.2924153208732605,
0.23937790095806122,
0.15771713852882385,
0.0317804217338562,
-0.15771692991256714,
0.23809124529361725,
0.009963374584913254,
-0.048636294901371,
0.07015187293291092,
-0.3156661093235016
] |
https://github.com/huggingface/datasets/issues/6610 | > Hi! You are passing the wrong feature type to `cast_column`. This is the fixed call:
>
> ```python
> ais_dataset = ais_dataset.cast_column("my_labeled_bbox", {"bbox": Sequence(Value(dtype="int64")), "label": ClassLabel(names=["cat", "dog"])})
> ```
thanks | cast_column to Sequence(subfeatures_dict) has err | ### Describe the bug
I am working with the following demo code:
```
from datasets import load_dataset
from datasets.features import Sequence, Value, ClassLabel, Features
ais_dataset = load_dataset("/data/ryan.gao/ais_dataset_cache/raw/1978/")
ais_dataset = ais_dataset["train"]
def add_class(example):
example["my_labeled_bbox"] = {"bbox": [100,100,200,200], "label": "cat"}
return example
ais_dataset = ais_dataset.map(add_class, batched=False, num_proc=32)
ais_dataset = ais_dataset.cast_column("my_labeled_bbox", Sequence(
{
"bbox": Sequence(Value(dtype="int64")),
"label": ClassLabel(names=["cat", "dog"])
}))
print(ais_dataset[0])
```
However, executing this code results in an error:
```
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2111, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}")
TypeError: Couldn't cast array of type
int64
to
Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None)
```
Upon examining the source code in datasets/table.py at line 2035:
```
if isinstance(feature, Sequence) and isinstance(feature.feature, dict):
feature = {
name: Sequence(subfeature, length=feature.length) for name, subfeature in feature.feature.items()
}
```
I noticed that if subfeature is of type Sequence, the code results in Sequence(Sequence(...), ...) and Sequence(ClassLabel(...), ...), which appears to be the source of the error.
### Steps to reproduce the bug
run my demo code
### Expected behavior
no exception
### Environment info
python 3.9
datasets: 2.16.1 | 31 | cast_column to Sequence(subfeatures_dict) has err
### Describe the bug
I am working with the following demo code:
```
from datasets import load_dataset
from datasets.features import Sequence, Value, ClassLabel, Features
ais_dataset = load_dataset("/data/ryan.gao/ais_dataset_cache/raw/1978/")
ais_dataset = ais_dataset["train"]
def add_class(example):
example["my_labeled_bbox"] = {"bbox": [100,100,200,200], "label": "cat"}
return example
ais_dataset = ais_dataset.map(add_class, batched=False, num_proc=32)
ais_dataset = ais_dataset.cast_column("my_labeled_bbox", Sequence(
{
"bbox": Sequence(Value(dtype="int64")),
"label": ClassLabel(names=["cat", "dog"])
}))
print(ais_dataset[0])
```
However, executing this code results in an error:
```
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2111, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}")
TypeError: Couldn't cast array of type
int64
to
Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None)
```
Upon examining the source code in datasets/table.py at line 2035:
```
if isinstance(feature, Sequence) and isinstance(feature.feature, dict):
feature = {
name: Sequence(subfeature, length=feature.length) for name, subfeature in feature.feature.items()
}
```
I noticed that if subfeature is of type Sequence, the code results in Sequence(Sequence(...), ...) and Sequence(ClassLabel(...), ...), which appears to be the source of the error.
### Steps to reproduce the bug
run my demo code
### Expected behavior
no exception
### Environment info
python 3.9
datasets: 2.16.1
> Hi! You are passing the wrong feature type to `cast_column`. This is the fixed call:
>
> ```python
> ais_dataset = ais_dataset.cast_column("my_labeled_bbox", {"bbox": Sequence(Value(dtype="int64")), "label": ClassLabel(names=["cat", "dog"])})
> ```
thanks | [
-0.06808836758136749,
-0.2487647533416748,
-0.06157679110765457,
0.015728870406746864,
0.5308369398117065,
0.24775570631027222,
0.4921039938926697,
0.2797868847846985,
0.1971459835767746,
-0.10834231972694397,
0.1848737597465515,
0.22724923491477966,
-0.12083391845226288,
0.37863239645957947,
-0.17962826788425446,
-0.20303714275360107,
0.45531246066093445,
-0.1145128682255745,
-0.00831269845366478,
0.10106025636196136,
-0.4560483396053314,
0.13075873255729675,
-0.5421671867370605,
0.22616799175739288,
0.002655141055583954,
-0.08513116836547852,
0.0513610765337944,
-0.3677842617034912,
-0.005814878270030022,
-0.3511534631252289,
0.44177645444869995,
-0.29729095101356506,
0.28920087218284607,
0.21175432205200195,
-0.00011738636385416612,
-0.058872126042842865,
0.4586848020553589,
0.07760418951511383,
-0.007284343242645264,
0.2057163119316101,
-0.46142998337745667,
-0.04128365218639374,
0.14486081898212433,
-0.48795273900032043,
-0.17643360793590546,
-0.09116078168153763,
-0.24718979001045227,
-0.31751519441604614,
-0.029161617159843445,
0.4845074415206909,
0.1776687055826187,
0.023762978613376617,
0.1587362289428711,
-0.03562360256910324,
0.15870821475982666,
-0.1779380738735199,
-0.25314509868621826,
-0.12773089110851288,
0.06752198934555054,
0.1961895376443863,
0.37535446882247925,
0.27778974175453186,
-0.14723268151283264,
-0.22666890919208527,
0.25519371032714844,
0.09153101593255997,
0.3564312756061554,
-0.32912418246269226,
-0.18674078583717346,
-0.09699307382106781,
0.5523717999458313,
-0.30875420570373535,
-0.32380473613739014,
-0.09832432121038437,
0.06321723759174347,
-0.18071383237838745,
0.039893362671136856,
-0.12652373313903809,
0.17301474511623383,
0.13375137746334076,
-0.23768754303455353,
0.4584795832633972,
0.010743014514446259,
0.12276172637939453,
-0.0925288200378418,
0.09065555036067963,
-0.12914304435253143,
0.09180542826652527,
-0.2091226875782013,
-0.46022236347198486,
-0.014874404296278954,
-0.028833866119384766,
0.00989492703229189,
0.14415161311626434,
-0.5307452082633972,
-0.2496882677078247,
-0.16735167801380157,
-0.07400434464216232,
-0.2047119140625,
0.031552087515592575,
-0.028105052188038826,
0.011468756943941116,
0.11374804377555847,
-0.11381567269563675,
0.2982642650604248,
0.2509405016899109,
-0.05097457766532898,
0.11632193624973297,
-0.221681147813797,
0.33291566371917725,
-0.0015030354261398315,
0.09255906939506531,
0.12232515960931778,
-0.14826661348342896,
0.17545196413993835,
0.20997032523155212,
0.24493032693862915,
-0.20351089537143707,
-0.2391240894794464,
0.2929682433605194,
-0.06639169901609421,
0.10429394245147705,
0.16493962705135345,
0.20326322317123413,
-0.03629555180668831,
0.2116217315196991,
0.0951438695192337,
0.35680368542671204,
0.03537894785404205,
-0.014188740402460098,
-0.2049705684185028,
0.12317833304405212,
-0.05365276336669922,
-0.24674737453460693,
-0.32298383116722107,
0.3856528699398041,
-0.1276218295097351,
0.00603128969669342,
-0.16822367906570435,
-0.13033902645111084,
-0.2818971276283264,
-0.1579139530658722,
0.05390574783086777,
0.282036691904068,
-0.27404022216796875,
0.24515140056610107,
0.21307598054409027,
0.053855568170547485,
-0.12285945564508438,
0.11113984882831573,
-0.1999775916337967,
-0.1039351373910904,
-0.17556843161582947,
0.2001296728849411,
-0.010821472853422165,
0.12495939433574677,
-0.25226256251335144,
-0.16537560522556305,
0.6826184391975403,
-0.19710561633110046,
0.27707168459892273,
-0.4943487346172333,
-0.45412808656692505,
-0.23627996444702148,
0.03270137310028076,
0.03083498775959015,
0.0038270577788352966,
0.15706007182598114,
0.004674237221479416,
-0.007444359362125397,
0.20098572969436646,
0.07309876382350922,
0.2264138013124466,
0.06689687073230743,
-0.25887352228164673,
0.15128293633460999,
0.2805543541908264,
-0.08322835713624954,
-0.11638861894607544,
0.2315317988395691,
-0.0007098540663719177,
-0.0560171976685524,
0.12749658524990082,
0.3574582636356354,
0.27597182989120483,
-0.4208102524280548,
0.054883360862731934,
0.34745168685913086,
-0.07318193465471268,
0.13789215683937073,
-0.11799125373363495,
-0.20120084285736084,
-0.014824191108345985,
0.06351827085018158,
-0.16776908934116364,
0.4127453565597534,
-0.01597164198756218,
-0.09603367745876312,
0.09711899608373642,
-0.10882223397493362,
0.12624436616897583,
0.1776353418827057,
0.12705174088478088,
0.20655906200408936,
0.05050762742757797,
-0.48121732473373413,
-0.21166837215423584,
0.05106481909751892,
0.4298551678657532,
-0.19655729830265045,
-0.24697619676589966,
-0.2032795399427414,
-0.2611616253852844,
0.14929673075675964,
-0.23712977766990662,
0.5411095023155212,
0.03218052536249161,
-0.19199423491954803,
0.0902061015367508,
-0.07335725426673889,
-0.08625375479459763,
0.3487264811992645,
-0.25937020778656006,
0.03220651298761368,
-0.6131832003593445,
0.15599852800369263,
-0.08316486328840256,
-0.15312987565994263,
-0.1035843938589096,
0.2659054696559906,
0.24906863272190094,
-0.04204713553190231,
-0.08291254192590714,
0.2848362624645233,
0.2443033903837204,
-0.2559356093406677,
-0.6009728908538818,
0.17081958055496216,
0.00390002503991127,
-0.35907062888145447,
-0.1682324856519699,
0.23887059092521667,
0.12276704609394073,
-0.0745696946978569,
-0.033960215747356415,
0.4081633388996124,
0.01374838873744011,
0.37667861580848694,
-0.13140076398849487,
0.16135036945343018,
0.06942804157733917,
0.008850879967212677,
-0.10221011936664581,
-0.36922866106033325,
-0.0766831561923027,
-0.1037919819355011,
-0.35436514019966125,
0.017155872657895088,
-0.18537789583206177,
0.260884165763855,
0.33944812417030334,
-0.132501482963562,
0.1232088953256607,
0.10592412948608398,
0.04923425614833832,
0.07510504126548767,
0.0070479195564985275,
0.13116583228111267,
0.26086950302124023,
-0.05056000128388405,
-0.08605353534221649,
0.03170199692249298,
-0.17347174882888794,
-0.002243656665086746,
0.16863131523132324,
0.2705605626106262,
0.017217207700014114,
-0.07015527039766312,
0.07919000089168549,
0.05130869150161743,
0.19997988641262054,
-0.11892509460449219,
0.025117889046669006,
0.18753467500209808,
-0.48895543813705444,
0.27232038974761963,
-0.3111679255962372,
-0.3265632688999176,
-0.04258608818054199,
-0.18927708268165588,
0.40509554743766785,
-0.5430177450180054,
-0.3550184965133667,
0.1872224658727646,
-0.2666431665420532,
0.15441381931304932,
-0.4146047830581665,
-0.3434278070926666,
0.41224542260169983,
-0.16517187654972076,
-0.02959194779396057,
0.0400007963180542,
0.0384037084877491,
0.04045715555548668,
0.08588866889476776,
0.206619530916214,
0.00440734438598156,
0.010921105742454529,
-0.17654183506965637,
-0.19035977125167847,
-0.1978813111782074,
-0.052235059440135956,
-0.18780051171779633,
-0.05741559714078903,
0.3934016525745392,
0.034555092453956604,
0.10697897523641586,
-0.3361693322658539,
0.17553317546844482,
0.0645551085472107,
-0.16767539083957672,
0.45929983258247375,
0.014407575130462646,
-0.19480785727500916,
-0.14357531070709229,
-0.12693503499031067,
-0.15483762323856354,
-0.3410121202468872,
-0.1111561506986618,
0.15717530250549316,
-0.016347624361515045,
0.03270888328552246,
0.14359880983829498,
-0.06298819929361343,
0.31841209530830383,
0.04117825627326965,
-0.1580977588891983,
0.5138845443725586,
0.3593284785747528,
0.025807473808526993,
-0.22918637096881866,
-0.10154445469379425,
-0.3829144835472107,
-0.08110678941011429,
0.07827708125114441,
-0.17007409036159515,
-0.08878026902675629,
-0.33136576414108276,
-0.016372621059417725,
0.08408719301223755,
-0.15590718388557434,
0.1806378811597824,
0.03007485345005989,
0.0064188167452812195,
0.031747788190841675,
0.10995253920555115,
0.012076795101165771,
0.19439798593521118,
-0.006692614406347275,
0.2650524377822876,
0.6776396632194519,
-0.020870961248874664,
-0.12523704767227173,
0.23852479457855225,
-0.3719642162322998,
0.386991411447525,
-0.0935339629650116,
-0.06673990935087204,
-0.32395344972610474,
-0.1326434314250946,
-0.09975315630435944,
-0.16003689169883728,
-0.16695481538772583,
0.043619997799396515,
-0.21349553763866425,
-0.21219389140605927,
0.2186306118965149,
0.3325081467628479,
0.1278596818447113,
-0.08142361044883728,
-0.06625157594680786,
-0.33663448691368103,
0.13236674666404724,
-0.12900707125663757,
0.07527199387550354,
-0.08559839427471161,
-0.07704252004623413,
0.06004250422120094,
0.05257848650217056,
-0.0031239762902259827,
-0.14119940996170044,
-0.5155323147773743,
-0.34130173921585083,
0.08342438191175461,
0.21141549944877625,
0.40697595477104187,
0.6117774844169617,
0.05665142834186554,
-0.20527276396751404,
-0.02240581065416336,
0.1272982656955719,
0.4906632900238037,
-0.39227843284606934,
0.05705418437719345,
0.34156471490859985,
0.33332493901252747,
-0.2560831308364868,
-0.3116447329521179,
-0.06099459156394005,
-0.14280728995800018,
0.18659237027168274,
0.18043072521686554,
0.005644083023071289,
0.05176122114062309,
0.522213876247406,
0.20469999313354492,
-0.1322261393070221,
-0.09381841123104095,
-0.22787564992904663,
-0.364429771900177,
-0.19606345891952515,
0.1429276317358017,
0.36865782737731934,
0.2278740108013153,
0.021211691200733185,
-0.16177773475646973,
-0.3132176101207733,
-0.16007870435714722,
-0.1332390010356903,
-0.10959688574075699,
0.2317185252904892,
-0.028123799711465836,
0.4735446870326996,
-0.4262405335903168,
-0.12815411388874054,
-0.016624299809336662,
0.2625059485435486,
-0.008590641431510448,
-0.21203777194023132,
0.1214112937450409,
-0.1138145700097084,
0.19883675873279572,
-0.014451861381530762,
-0.24001334607601166,
0.1092851310968399,
-0.08738957345485687,
0.20140478014945984,
-0.1760309934616089,
-0.3989860415458679,
0.43602293729782104,
0.08219315111637115,
-0.4388866126537323,
-0.6548398733139038,
0.42959386110305786,
0.11932867765426636,
-0.14200769364833832,
-0.22540119290351868,
0.19127076864242554,
-0.20124167203903198,
0.6755138039588928,
0.15376728773117065,
0.7638531923294067,
-0.003505626693367958,
-0.032132841646671295,
0.39784273505210876,
0.24407222867012024,
0.5097075700759888,
0.3865019679069519,
0.0747486874461174,
-0.38590192794799805,
-0.48017746210098267,
-0.13188055157661438,
-0.1946069747209549,
0.020544514060020447,
-0.08654138445854187,
-0.17587681114673615,
0.35646072030067444,
-0.47854626178741455,
0.46895453333854675,
-0.016364287585020065,
-0.28813743591308594,
0.24119272828102112,
-0.1660158485174179,
-0.07890255004167557,
0.13315308094024658,
0.2520860731601715,
-0.13375118374824524,
0.1460021734237671,
-0.07233836501836777,
-0.05337061360478401,
-0.05683860182762146,
-0.17651376128196716,
0.20989811420440674,
0.2240164577960968,
0.1576956957578659,
-0.01404564082622528,
0.013438999652862549,
0.2508254647254944,
0.586375892162323,
0.652492344379425,
-0.0786767303943634,
0.09737295657396317,
-0.06850934773683548,
0.42275646328926086,
0.13743704557418823,
0.08084375411272049,
-0.0912618339061737,
0.40088358521461487,
0.0400155708193779,
0.08755223453044891,
0.018267786130309105,
0.14705850183963776,
-0.1945425271987915,
0.09170836210250854,
0.07343631982803345,
0.20447255671024323,
-0.586951494216919,
-0.5745348930358887,
-0.1693345606327057,
0.07591891288757324,
-0.17704929411411285,
0.10339528322219849,
-0.17318861186504364,
-0.18377403914928436,
0.35346201062202454,
-0.2644927203655243,
-0.06777309626340866,
-0.07742848992347717,
0.3250434994697571,
0.38281184434890747,
0.168799489736557,
0.2431149184703827,
0.3029285669326782,
-0.19340088963508606,
-0.09265413135290146,
-0.16585710644721985,
0.24587848782539368,
-0.36053359508514404,
0.022834714502096176,
-0.25910279154777527,
-0.16412313282489777,
-0.035886138677597046,
0.3794012665748596,
-0.15381117165088654,
0.11588971316814423,
-0.16496148705482483,
-0.2727595269680023,
-0.33115777373313904,
0.28607410192489624,
0.06790027022361755,
0.05953213572502136,
-0.30115199089050293,
0.06601212918758392,
-0.2990875840187073,
-0.37317556142807007,
-0.21354669332504272,
-0.20872101187705994,
-0.45759886503219604,
0.20788688957691193,
0.31281572580337524,
0.1282767653465271,
-0.07639601826667786,
0.034812044352293015,
0.16146929562091827,
0.2502617835998535,
-0.1277592033147812,
-0.11694379150867462,
-0.05289082229137421,
0.08742623776197433,
0.11190693825483322,
0.0315733402967453,
-0.11526981741189957,
-0.13715681433677673,
-0.22249285876750946,
-0.2403373122215271,
-0.16784486174583435,
0.18403050303459167,
0.13610269129276276,
-0.07554789632558823,
0.22506383061408997,
-0.05076402425765991,
-0.09847472608089447,
0.2819129228591919,
-0.2615627944469452,
0.0023455843329429626,
-0.19110429286956787,
0.22824734449386597,
-0.16628819704055786,
0.032632142305374146,
-0.18137232959270477,
0.07909227162599564,
-0.19055332243442535,
-0.13942822813987732,
0.4571135342121124,
-0.30556392669677734,
-0.0532291978597641,
0.36160942912101746,
0.25304800271987915,
0.12218174338340759,
-0.4277443289756775,
-0.33371037244796753,
-0.06380301713943481,
0.1377483755350113,
-0.24137160181999207,
-0.33271634578704834,
0.011199109256267548,
-0.022472089156508446,
-0.06818775832653046,
0.3327934145927429,
0.14056158065795898,
-0.025846146047115326,
0.1967201828956604,
0.10498006641864777,
0.44823816418647766,
-0.20835068821907043,
0.15596745908260345,
0.4426133334636688,
0.18179862201213837,
0.0792798101902008,
0.202483132481575,
-0.006801063194870949,
0.23588666319847107,
0.6808600425720215,
0.10454191267490387,
0.022035567089915276,
0.6017282009124756,
-0.03576049953699112,
0.13030095398426056,
-0.15003536641597748,
0.2510480582714081,
0.4171715974807739,
-0.26654884219169617,
0.11819545924663544,
0.32469385862350464,
-0.3883427381515503,
-0.21624624729156494,
-0.26103031635284424,
-0.1309763491153717,
-0.028358351439237595,
-0.20678022503852844,
0.0937865674495697,
-0.08714868128299713,
0.06192809343338013,
-0.2388438582420349,
-0.3109055757522583,
-0.26047950983047485,
0.06801921874284744,
0.4278905987739563,
-0.04616678133606911,
0.22539210319519043,
-0.09919527173042297,
-0.12067361176013947,
0.10567036271095276,
0.2462470978498459,
-0.2701084613800049,
0.2651267945766449,
0.039760615676641464,
-0.0663340762257576,
0.2889159917831421,
-0.05455624312162399,
0.4946942925453186,
0.3373679220676422,
0.0813964456319809,
0.04618882015347481,
0.15272018313407898,
-0.28538888692855835,
0.1692904680967331,
0.12225279957056046,
-0.0792621448636055,
0.3430073857307434,
0.17739281058311462,
0.09831468760967255,
-0.09012337774038315,
0.1846918910741806,
0.08077973127365112,
0.376458078622818,
-0.15016689896583557,
0.8576192855834961,
-0.32477983832359314,
-0.3237677216529846,
-0.10991185158491135,
0.2954142987728119,
-0.33696654438972473,
0.15156112611293793,
0.040612198412418365,
-0.1525590717792511,
0.284841924905777,
0.3174484968185425,
0.054922617971897125,
-0.0027476344257593155,
0.33586397767066956,
0.23145388066768646,
0.04803628474473953,
-0.15755268931388855,
-0.036672309041023254,
-0.3513526916503906,
0.04393991082906723,
0.14040052890777588,
0.07111849635839462,
0.5474023222923279,
0.007064253091812134,
-0.10651279985904694,
0.0653420016169548,
-0.022309936583042145,
0.012262348085641861,
-0.17657791078090668,
0.5699431896209717,
-0.025735221803188324,
-0.3555871248245239,
0.15929335355758667,
0.062474921345710754,
-0.11857366561889648,
-0.523626983165741,
0.32110893726348877,
-0.17645210027694702,
0.10854868590831757,
0.06731364130973816,
-0.050766002386808395,
-0.12445651739835739,
-0.4083528220653534,
0.1480761617422104,
0.07148583978414536,
0.2633976340293884,
-0.06265881657600403,
-0.05904819071292877,
-0.06600797176361084,
-0.28208163380622864,
-0.18913502991199493,
0.3922150731086731,
-0.16554492712020874,
0.5063091516494751,
-0.03729310631752014,
0.42549586296081543,
-0.12583641707897186,
-0.013712722808122635,
0.13278482854366302,
0.009183462709188461,
-0.42155665159225464,
0.38789159059524536,
-0.36770209670066833,
0.33490121364593506,
0.2880419194698334,
-0.08691826462745667,
0.16874703764915466,
0.4514351487159729,
0.08169373869895935,
-0.6409966349601746,
0.5401331186294556,
-0.1149834394454956,
-0.2809724509716034,
-0.04267548769712448,
0.15629898011684418,
0.027808837592601776,
0.11574576795101166,
-0.2761994004249573,
-0.08857940137386322,
0.2872067391872406,
-0.12247945368289948,
-0.2924153208732605,
0.23937790095806122,
0.15771713852882385,
0.0317804217338562,
-0.15771692991256714,
0.23809124529361725,
0.009963374584913254,
-0.048636294901371,
0.07015187293291092,
-0.3156661093235016
] |
https://github.com/huggingface/datasets/issues/6609 | I opened https://github.com/huggingface/datasets/pull/6632 to fix this issue. Once it's merged we'll do a new release of `datasets` | Wrong path for cache directory in offline mode | ### Describe the bug
Dear huggingfacers,
I'm trying to use a subset of the-stack dataset. When I run the command the first time
```
dataset = load_dataset(
path='bigcode/the-stack',
data_dir='data/fortran',
split='train' )
```
It downloads the files and caches them normally.
Nevertheless, since my compute nodes are not online (`HF_DATASETS_OFFLINE=1`) . Whenever I try to run the command again, the library is passing the wrong cache path:
`Cache directory for the-stack doesn't exist at /Users/user/.cache/huggingface/datasets/bigcode___the-stack/default-data_dir=data%2Ffortran-data_dir=data%2Ffortran`
when the right path is:
`'/Users/user/.cache/huggingface/datasets/bigcode___the-stack/default-data_dir=data\%2Ffortran`
Not sure why those redundancies are included in the path. If I try adding the correct path through the the cache_dir argument it throws an error:
ConnectionError: Couldn't reach the Hugging Face Hub for dataset 'bigcode/the-stack': Offline mode is enabled.
Your help with this issue is greatly appreciated. Thanks a lot for the great work.
### Steps to reproduce the bug
1:
`dataset = load_dataset(
path='bigcode/the-stack',
data_dir='data/fortran',
split='train' )`
2:
`HF_DATASETS_OFFLINE=1`
3:
`dataset = load_dataset(
path='bigcode/the-stack',
data_dir='data/fortran',
split='train' )`
### Expected behavior
being able to use the cached data
### Environment info
several different systems | 17 | Wrong path for cache directory in offline mode
### Describe the bug
Dear huggingfacers,
I'm trying to use a subset of the-stack dataset. When I run the command the first time
```
dataset = load_dataset(
path='bigcode/the-stack',
data_dir='data/fortran',
split='train' )
```
It downloads the files and caches them normally.
Nevertheless, since my compute nodes are not online (`HF_DATASETS_OFFLINE=1`) . Whenever I try to run the command again, the library is passing the wrong cache path:
`Cache directory for the-stack doesn't exist at /Users/user/.cache/huggingface/datasets/bigcode___the-stack/default-data_dir=data%2Ffortran-data_dir=data%2Ffortran`
when the right path is:
`'/Users/user/.cache/huggingface/datasets/bigcode___the-stack/default-data_dir=data\%2Ffortran`
Not sure why those redundancies are included in the path. If I try adding the correct path through the the cache_dir argument it throws an error:
ConnectionError: Couldn't reach the Hugging Face Hub for dataset 'bigcode/the-stack': Offline mode is enabled.
Your help with this issue is greatly appreciated. Thanks a lot for the great work.
### Steps to reproduce the bug
1:
`dataset = load_dataset(
path='bigcode/the-stack',
data_dir='data/fortran',
split='train' )`
2:
`HF_DATASETS_OFFLINE=1`
3:
`dataset = load_dataset(
path='bigcode/the-stack',
data_dir='data/fortran',
split='train' )`
### Expected behavior
being able to use the cached data
### Environment info
several different systems
I opened https://github.com/huggingface/datasets/pull/6632 to fix this issue. Once it's merged we'll do a new release of `datasets` | [
-0.07495970278978348,
-0.1799859255552292,
0.013488173484802246,
0.40448620915412903,
0.08871869742870331,
-0.08352793753147125,
0.22764024138450623,
-0.0113661615177989,
0.158774733543396,
0.026804406195878983,
0.08159554749727249,
0.05718464031815529,
0.169479638338089,
-0.03335284814238548,
0.18564555048942566,
-0.04741028696298599,
0.1815490871667862,
-0.049995195120573044,
-0.28688740730285645,
-0.14655958116054535,
-0.1322333961725235,
0.5205739140510559,
-0.18942731618881226,
0.045236118137836456,
-0.31550630927085876,
-0.12936171889305115,
-0.11688539385795593,
0.4859408438205719,
0.17039591073989868,
-0.16728609800338745,
0.5269396901130676,
-0.05195128545165062,
0.12245599925518036,
0.6617830991744995,
-0.00012785062426701188,
0.07809887826442719,
-0.010096313431859016,
-0.12990468740463257,
-0.3343222737312317,
-0.4124038517475128,
-0.20701904594898224,
-0.07830528914928436,
0.04067649692296982,
-0.3090358376502991,
-0.043524522334337234,
0.2869841456413269,
0.060194939374923706,
-0.508691132068634,
0.38431820273399353,
-0.028781142085790634,
0.04330575093626976,
0.32019054889678955,
-0.3334888219833374,
-0.09035590291023254,
0.05233025550842285,
0.3802697956562042,
-0.11045552790164948,
0.2880887985229492,
-0.10286493599414825,
0.04140186309814453,
-0.06338576972484589,
0.2380126565694809,
-0.127306267619133,
0.09036226570606232,
0.39500176906585693,
0.16258679330348969,
-0.31354382634162903,
0.21946579217910767,
0.35171493887901306,
0.33767256140708923,
0.29068246483802795,
-0.2062455713748932,
-0.15533897280693054,
-0.36493054032325745,
-0.3961842656135559,
-0.2963502109050751,
0.48031580448150635,
0.020601041615009308,
-0.10951325297355652,
0.12078697234392166,
-0.2116258591413498,
-0.2113332450389862,
-0.03125288337469101,
0.2080809772014618,
0.19896437227725983,
0.07665832340717316,
-0.2227829247713089,
0.08913955092430115,
0.09159146249294281,
0.2640761137008667,
-0.09258266538381577,
-0.11475687474012375,
-0.02775494195520878,
0.11922448873519897,
-0.22281275689601898,
0.476969838142395,
-0.030423186719417572,
0.3311160206794739,
0.19341522455215454,
0.1769791692495346,
0.04564574733376503,
-0.011297980323433876,
-0.26682233810424805,
-0.045102931559085846,
0.20704704523086548,
0.40205711126327515,
-0.018737494945526123,
-0.1763952076435089,
0.20620384812355042,
0.28888657689094543,
-0.16231833398342133,
-0.2898678183555603,
0.18139758706092834,
-0.2456156611442566,
0.0631408542394638,
-0.17020216584205627,
0.12770724296569824,
-0.27660036087036133,
-0.07415374368429184,
-0.2161787450313568,
0.08302260935306549,
-0.0521388053894043,
0.4131990969181061,
0.4832379221916199,
0.08113335072994232,
-0.003086533397436142,
0.13710665702819824,
0.08426328003406525,
-0.30211523175239563,
-0.1436229944229126,
-0.2580537796020508,
-0.15791577100753784,
-0.2672395408153534,
0.3240317106246948,
0.05342826247215271,
-0.3268349766731262,
0.4403027296066284,
-0.03852709382772446,
0.32665887475013733,
-0.21021105349063873,
-0.09369722753763199,
-0.04742583632469177,
0.10695244371891022,
0.12317166477441788,
-0.084104984998703,
0.29783838987350464,
0.3292193114757538,
0.1938222050666809,
-0.06006062775850296,
0.07420287281274796,
-0.26803141832351685,
-0.5389137864112854,
0.24648517370224,
-0.0900862067937851,
-0.20156526565551758,
0.0929248034954071,
-0.4272034466266632,
-0.2353290170431137,
0.13804611563682556,
-0.11387170851230621,
0.10961832106113434,
0.1390269696712494,
-0.1495765745639801,
-0.2619718313217163,
0.3602970838546753,
0.8354352116584778,
-0.08997269719839096,
-0.16946707665920258,
-0.042166873812675476,
0.17730093002319336,
0.11500981450080872,
0.38219377398490906,
-0.43844154477119446,
0.3396526277065277,
-0.5656213164329529,
-0.3399353325366974,
0.5158365368843079,
-0.6520372033119202,
-0.38683903217315674,
0.3879031836986542,
-0.18495520949363708,
0.014425113797187805,
0.1868818998336792,
0.19937030971050262,
-0.1308152973651886,
0.1216086596250534,
-0.23737072944641113,
0.24604736268520355,
0.14688825607299805,
0.09845495223999023,
-0.3092457056045532,
-0.17939764261245728,
0.19512176513671875,
-0.07887402921915054,
0.12834131717681885,
0.23331695795059204,
0.0909828394651413,
-0.15529179573059082,
0.40401414036750793,
0.05758201330900192,
0.09120162576436996,
0.31345629692077637,
0.08242432773113251,
0.23075222969055176,
0.14276370406150818,
0.2921174168586731,
-0.527584969997406,
0.19277973473072052,
-0.30204758048057556,
-0.17086587846279144,
-0.2879069149494171,
-0.14168356359004974,
-0.2513207495212555,
-0.29416120052337646,
-0.16639460623264313,
-0.07940024137496948,
-0.13155671954154968,
0.2690815031528473,
0.43766695261001587,
0.11652672290802002,
-0.25133803486824036,
0.5957996249198914,
0.048671796917915344,
0.23918096721172333,
-0.3393651843070984,
0.3977353870868683,
0.09809202700853348,
0.043878816068172455,
-0.3363931179046631,
0.06528215110301971,
0.43980544805526733,
-0.250027596950531,
-0.10202214121818542,
0.6647148132324219,
-0.18456710875034332,
0.29034268856048584,
-0.016207311302423477,
0.14281447231769562,
0.2237040102481842,
0.018019765615463257,
0.2359687089920044,
-0.07362005114555359,
-0.02938772365450859,
0.07754094153642654,
0.08625925332307816,
0.3057374358177185,
-0.25515902042388916,
0.2982374131679535,
0.004847541451454163,
-0.0671069473028183,
0.09896297752857208,
-0.09916304051876068,
-0.13206735253334045,
-0.1887049525976181,
0.47146305441856384,
-0.03516402095556259,
0.3739345669746399,
-0.14163292944431305,
-0.16295577585697174,
0.09795175492763519,
0.23509469628334045,
0.26351824402809143,
0.12078788876533508,
-0.14887380599975586,
-0.016531676054000854,
-0.03671543300151825,
0.15696623921394348,
0.2325141578912735,
0.35130774974823,
0.05762883648276329,
0.12999320030212402,
0.1035306453704834,
0.014627326279878616,
-0.20532000064849854,
0.1656063199043274,
-0.00364057719707489,
0.09476695954799652,
-0.23265723884105682,
0.0091802217066288,
-0.06469190120697021,
-0.2691975235939026,
-0.04173126444220543,
0.08272793889045715,
-0.046555113047361374,
-0.3068608045578003,
0.3270065188407898,
-0.4905933141708374,
-0.34892576932907104,
-0.32573434710502625,
-0.2944434583187103,
-0.4141474962234497,
-0.24940888583660126,
-0.10820882022380829,
0.23306356370449066,
0.10977888107299805,
0.14270314574241638,
-0.0985613614320755,
0.22577247023582458,
-0.2262161672115326,
-0.4158376455307007,
-0.28702351450920105,
-0.04443662241101265,
-0.23477108776569366,
-0.23755407333374023,
0.1979740560054779,
-0.05899807810783386,
0.07877205312252045,
-0.23088142275810242,
-0.19582971930503845,
-0.6247997879981995,
0.01632174849510193,
0.2372550368309021,
0.18776726722717285,
0.054834067821502686,
0.08911372721195221,
0.14670920372009277,
-0.1056121215224266,
-0.07765617966651917,
0.29351526498794556,
-0.3429892361164093,
0.08373527973890305,
-0.059986066073179245,
-0.04558354616165161,
0.0704074576497078,
-0.2053222954273224,
-0.10861566662788391,
-0.08692318946123123,
-0.14484748244285583,
0.41662636399269104,
-0.0634118914604187,
0.14848649501800537,
0.23631544411182404,
-0.1417318880558014,
-0.10271556675434113,
-0.3565726578235626,
0.0034447722136974335,
-0.38119980692863464,
-0.8864358067512512,
0.11341293156147003,
-0.21657966077327728,
-0.2329249531030655,
0.0770953893661499,
0.11045172810554504,
0.5119752883911133,
0.1385929435491562,
-0.653396725654602,
-0.22814896702766418,
-0.02055281400680542,
0.3103167414665222,
-0.049609579145908356,
0.12427324801683426,
0.33779388666152954,
-0.2947234511375427,
0.12803855538368225,
-0.15487045049667358,
-0.04265222325921059,
0.39540255069732666,
0.0008792765438556671,
0.484413743019104,
0.2363540083169937,
0.20914281904697418,
0.1363929808139801,
0.4753735661506653,
0.09640172123908997,
0.22684286534786224,
0.49505916237831116,
0.06696698069572449,
0.5792490243911743,
-0.2991565465927124,
-0.1659759283065796,
0.0029316991567611694,
0.035212814807891846,
-0.29723888635635376,
0.167758971452713,
0.3575787842273712,
0.12856802344322205,
-0.1793670654296875,
-0.23372191190719604,
-0.23403005301952362,
-0.4225601553916931,
-0.1168031319975853,
0.03585254028439522,
0.17207735776901245,
0.2063325047492981,
0.13447807729244232,
-0.4301455318927765,
-0.06845077127218246,
0.34659337997436523,
0.35910871624946594,
0.2514348328113556,
0.29012206196784973,
-0.1837952733039856,
0.0988548994064331,
-0.21617814898490906,
0.1622680425643921,
-0.09281189739704132,
0.06697265803813934,
-0.10567720979452133,
0.11214032024145126,
0.1278458535671234,
0.07665186375379562,
0.9235138893127441,
0.24604575335979462,
0.17877304553985596,
-0.057045914232730865,
-0.10989169776439667,
-0.5002946257591248,
-0.062029462307691574,
0.30211079120635986,
0.15311439335346222,
0.2821604609489441,
0.1595621407032013,
-0.0570659413933754,
-0.20492082834243774,
-0.23591414093971252,
0.10839696228504181,
-0.1562589555978775,
-0.2564704120159149,
-0.20279136300086975,
-0.35066670179367065,
-0.14654867351055145,
-0.1095983237028122,
0.045640282332897186,
0.028970684856176376,
0.1969040483236313,
0.033143021166324615,
0.14931288361549377,
0.04504340887069702,
-0.2638380527496338,
-0.25963884592056274,
0.4976857602596283,
-0.2753678858280182,
0.05268259346485138,
0.46981126070022583,
0.11948604881763458,
0.2724309265613556,
0.39926162362098694,
-0.17825916409492493,
0.13967272639274597,
0.13621705770492554,
0.028460219502449036,
0.1262580156326294,
0.5744567513465881,
-0.19733968377113342,
0.11119527369737625,
0.25606393814086914,
0.1620352566242218,
-0.07694664597511292,
-0.05759855732321739,
0.029658585786819458,
0.23409731686115265,
0.02594565600156784,
-0.40745365619659424,
0.44068944454193115,
0.08470746874809265,
-0.10981762409210205,
0.27699655294418335,
0.4539467692375183,
-0.3608948588371277,
0.21844205260276794,
-0.2544945478439331,
1.0212055444717407,
0.05165712907910347,
0.2796878218650818,
0.1759374439716339,
0.0009573251008987427,
0.6028240919113159,
-0.31474775075912476,
0.22849395871162415,
-0.07944542169570923,
-0.21550258994102478,
-0.14988559484481812,
-0.2102615237236023,
0.04177812859416008,
-0.031058751046657562,
-0.038247667253017426,
0.45544207096099854,
-0.16270644962787628,
0.3690357804298401,
-0.3514643907546997,
-0.19660866260528564,
-0.11672892421483994,
-0.2239346206188202,
-0.39785516262054443,
0.0063680969178676605,
0.04045690968632698,
0.4611313045024872,
-0.17701959609985352,
-0.04033055528998375,
0.006692841649055481,
-0.08341170847415924,
-0.03982868045568466,
-0.0665178894996643,
-0.5210342407226562,
0.1767999231815338,
0.18759649991989136,
-0.08792546391487122,
-0.2262391746044159,
0.487002968788147,
0.6687136292457581,
-0.1476767510175705,
-0.2108491212129593,
0.048484090715646744,
0.023008054122328758,
-0.0646297037601471,
-0.30322393774986267,
0.10567820072174072,
0.0023052021861076355,
-0.0049729421734809875,
-0.02875378727912903,
-0.2516207993030548,
-0.3043765425682068,
-0.29088321328163147,
0.028586506843566895,
-0.04147270321846008,
-0.16716113686561584,
-0.08267571777105331,
0.06340691447257996,
0.2891532778739929,
0.3517628014087677,
-0.054337065666913986,
-0.04198465123772621,
0.20326824486255646,
0.011788200587034225,
-0.07393166422843933,
-0.011001944541931152,
-0.2526249587535858,
-0.22645097970962524,
0.3567959666252136,
-0.15200427174568176,
-0.24839985370635986,
0.2887163460254669,
0.0877436101436615,
-0.06139145791530609,
0.09197420626878738,
-0.11787888407707214,
0.09495624899864197,
-0.32698309421539307,
0.11042335629463196,
-0.07630448788404465,
0.1430577039718628,
-0.05747762322425842,
0.1555621474981308,
0.27902305126190186,
0.05085662007331848,
-0.20205682516098022,
-0.2074001133441925,
-0.32531309127807617,
0.30194541811943054,
-0.15713781118392944,
-0.005471929907798767,
0.1703849732875824,
-0.04479319602251053,
0.09852070361375809,
-0.08838077634572983,
-0.1287548840045929,
0.21936579048633575,
-0.10586340725421906,
-0.13029929995536804,
0.20221787691116333,
-0.13316059112548828,
0.586076557636261,
0.08460898697376251,
-0.12817993760108948,
0.10428397357463837,
-0.2907460033893585,
0.030870217829942703,
-0.20105144381523132,
0.22767920792102814,
0.036330994218587875,
-0.19075578451156616,
0.0874616801738739,
-0.24920497834682465,
0.11190107464790344,
-0.25254595279693604,
0.4020121991634369,
0.6436382532119751,
0.04964671656489372,
-0.23424142599105835,
-0.023748986423015594,
-0.0033408571034669876,
-0.4401775896549225,
0.0480903796851635,
0.09837616980075836,
0.08130715787410736,
0.17459070682525635,
0.04524431750178337,
-0.37146490812301636,
-0.04600401222705841,
-0.12602269649505615,
-0.0053334347903728485,
0.22386568784713745,
0.14608602225780487,
0.25864890217781067,
-0.22105738520622253,
-0.11758934706449509,
0.1734667420387268,
0.3758443295955658,
-0.27268171310424805,
0.015064150094985962,
0.06534726917743683,
0.144203782081604,
-0.04280439764261246,
-0.18058408796787262,
-0.20991010963916779,
0.15073728561401367,
0.15404757857322693,
0.06131802499294281,
0.47132259607315063,
0.4541427493095398,
-0.24459117650985718,
0.10735682398080826,
-0.16654202342033386,
0.6500252485275269,
-0.26417452096939087,
0.2784208357334137,
-0.061326365917921066,
-0.006079830229282379,
0.2761521339416504,
0.28421592712402344,
0.44154688715934753,
0.04640330746769905,
0.22002652287483215,
-0.12190471589565277,
0.20952577888965607,
-0.08910956978797913,
0.09537340700626373,
-0.19545698165893555,
-0.460648775100708,
-0.22033369541168213,
0.2534043788909912,
-0.11886260658502579,
0.069709412753582,
-0.5283228158950806,
0.5990963578224182,
-0.33351820707321167,
-0.11905629932880402,
-0.23057684302330017,
0.25563427805900574,
-0.1879388988018036,
-0.13128280639648438,
0.0037261992692947388,
-0.22226744890213013,
-0.0840703472495079,
-0.02847343683242798,
0.02878693863749504,
-0.2709531784057617,
0.4111040234565735,
-0.0440824031829834,
0.11379699409008026,
-0.006836000829935074,
-0.05277056246995926,
0.23824036121368408,
0.10995887219905853,
-0.06472735852003098,
0.41246742010116577,
-0.036030009388923645,
-0.2205340564250946,
0.2483946681022644,
0.07631262391805649,
0.25811243057250977,
0.19452057778835297,
0.32831913232803345,
-0.08128723502159119,
0.165024995803833,
0.10192754864692688,
-0.01109146699309349,
-0.12461628019809723,
-0.14822746813297272,
0.06294462084770203,
0.12698432803153992,
-0.011911792680621147,
-0.04137081280350685,
0.35521408915519714,
-0.08100857585668564,
0.4605174660682678,
-0.20234793424606323,
0.29207471013069153,
-0.39800208806991577,
0.026908040046691895,
-0.18460522592067719,
-0.0016542226076126099,
-0.33729568123817444,
-0.08058994263410568,
0.08397357165813446,
-0.1650155633687973,
0.16988888382911682,
0.15020616352558136,
-0.028382018208503723,
0.041715580970048904,
0.30305108428001404,
0.25066813826560974,
0.17183774709701538,
-0.2736909091472626,
-0.3079034686088562,
-0.5690878033638,
0.08815455436706543,
-0.11741258203983307,
0.3194175064563751,
0.007112927734851837,
0.12288681417703629,
-0.02953290566802025,
-0.17449308931827545,
0.4874879717826843,
-0.04493653401732445,
0.14304442703723907,
-0.16760127246379852,
-0.18557129800319672,
-0.20311087369918823,
0.0772392749786377,
-0.0939604789018631,
0.18285441398620605,
-0.1713080108165741,
0.04835857078433037,
0.14094656705856323,
-0.142648845911026,
0.18500185012817383,
0.15378165245056152,
-0.25302737951278687,
-0.2149185836315155,
0.25991255044937134,
-0.00817803293466568,
-0.013962294906377792,
0.32794710993766785,
-0.2926156222820282,
-0.2418815791606903,
-0.11767522990703583,
-0.07839301228523254,
-0.1906280666589737,
-0.21324250102043152,
0.32100751996040344,
-0.6117419600486755,
-0.2303144782781601,
-0.5292349457740784,
0.15658418834209442,
0.3570241630077362,
-0.02227429486811161,
-0.21596018970012665,
0.09161201119422913,
-0.34261631965637207,
0.158835768699646,
0.38469135761260986,
0.36952051520347595,
-0.04484220966696739,
0.3074180483818054,
-0.23734042048454285,
-0.11915106326341629,
0.6368895173072815,
-0.25229310989379883,
0.10974776744842529,
-0.19649766385555267,
0.3939533233642578,
0.4347759187221527,
-0.2477562427520752,
-0.587608814239502,
-0.10882490873336792,
0.1612229347229004,
0.17235974967479706,
-0.006317906081676483,
-0.08289648592472076,
-0.39263588190078735,
0.052613794803619385,
0.14079752564430237,
0.3242914080619812,
0.07551068067550659,
-0.36137697100639343,
0.24035340547561646,
-0.11232977360486984
] |
https://github.com/huggingface/datasets/issues/6604 | I don't think the PR fixes the root cause, since it still relies on the `random` library which will often have its seed fixed. I think the builtin `uuid.uuid4()` is a better choice: https://docs.python.org/3/library/uuid.html | Transform fingerprint collisions due to setting fixed random seed | ### Describe the bug
The transform fingerprinting logic relies on the `random` library for random bits when the function is not hashable (e.g. bound methods as used in `trl`: https://github.com/huggingface/trl/blob/main/trl/trainer/dpo_trainer.py#L356). This causes collisions when the training code sets a fixed random seed, which is common practice: https://github.com/huggingface/alignment-handbook/blob/main/recipes/zephyr-7b-beta/sft/config_full.yaml#L45.
This results in fingerprint collisions which leads to silently loading incorrect cache files corresponding to completely different datasets.
### Steps to reproduce the bug
n/a
### Expected behavior
Use `uuid` v4 instead of `random.getrandbits()`
### Environment info
`datasets` main branch | 34 | Transform fingerprint collisions due to setting fixed random seed
### Describe the bug
The transform fingerprinting logic relies on the `random` library for random bits when the function is not hashable (e.g. bound methods as used in `trl`: https://github.com/huggingface/trl/blob/main/trl/trainer/dpo_trainer.py#L356). This causes collisions when the training code sets a fixed random seed, which is common practice: https://github.com/huggingface/alignment-handbook/blob/main/recipes/zephyr-7b-beta/sft/config_full.yaml#L45.
This results in fingerprint collisions which leads to silently loading incorrect cache files corresponding to completely different datasets.
### Steps to reproduce the bug
n/a
### Expected behavior
Use `uuid` v4 instead of `random.getrandbits()`
### Environment info
`datasets` main branch
I don't think the PR fixes the root cause, since it still relies on the `random` library which will often have its seed fixed. I think the builtin `uuid.uuid4()` is a better choice: https://docs.python.org/3/library/uuid.html | [
-0.1706395000219345,
-0.5525231957435608,
0.13183769583702087,
0.25794491171836853,
0.42352157831192017,
-0.03414187580347061,
0.15525738894939423,
0.3210907578468323,
-0.301504909992218,
0.17565152049064636,
-0.048530951142311096,
-0.053445473313331604,
-0.02663678303360939,
0.15088921785354614,
0.05550048127770424,
-0.12852339446544647,
0.07165052741765976,
0.13271406292915344,
-0.11288539320230484,
-0.0420951321721077,
-0.3027116656303406,
0.2853736877441406,
0.1658821552991867,
0.27128303050994873,
-0.41322842240333557,
0.08038781583309174,
-0.06397297978401184,
0.45540520548820496,
0.02471737563610077,
-0.26578953862190247,
0.03828500211238861,
0.1821611523628235,
0.02534906566143036,
0.16950839757919312,
-0.00011382783850422129,
-0.0034447386860847473,
0.06886850297451019,
-0.06950461119413376,
0.08697672188282013,
-0.07726477086544037,
0.09027180075645447,
0.0762706771492958,
-0.16779938340187073,
0.08839218318462372,
-0.20835506916046143,
-0.25900065898895264,
0.06404242664575577,
0.1837480664253235,
0.10704794526100159,
0.06805623322725296,
0.20864742994308472,
0.018265850841999054,
-0.03590475767850876,
0.021697986871004105,
0.36185476183891296,
0.17160627245903015,
-0.17610162496566772,
0.0946919173002243,
0.12204769998788834,
0.04454800486564636,
-0.27502119541168213,
0.3033764958381653,
0.157162606716156,
-0.09327664971351624,
0.34547239542007446,
0.2417151927947998,
0.3682290315628052,
-0.2106713056564331,
-0.03799523413181305,
0.37656521797180176,
-0.36842918395996094,
-0.23889689147472382,
-0.22203730046749115,
-0.3319665193557739,
-0.23741544783115387,
-0.32569777965545654,
0.3428592085838318,
0.06441853940486908,
-0.10155562311410904,
0.15594825148582458,
-0.4345278739929199,
0.20439860224723816,
0.17013514041900635,
-0.15656019747257233,
0.008886389434337616,
-0.11880496144294739,
0.1359841376543045,
0.017806675285100937,
0.2226065695285797,
0.06689675152301788,
0.13557963073253632,
0.20499670505523682,
-0.2582850456237793,
-0.1496589183807373,
0.043010205030441284,
-0.3208337128162384,
0.10583067685365677,
0.24857230484485626,
0.19843478500843048,
0.33212724328041077,
0.0861850455403328,
0.14841824769973755,
0.011216942220926285,
0.033936575055122375,
0.03664347156882286,
0.08903442323207855,
-0.273046612739563,
0.26352667808532715,
0.17911364138126373,
0.12550178170204163,
-0.30436843633651733,
0.21633943915367126,
0.26237887144088745,
-0.24318066239356995,
0.17319664359092712,
-0.07778741419315338,
-0.09366054832935333,
-0.24303379654884338,
0.01388377696275711,
0.20240312814712524,
-0.514030396938324,
0.1440635621547699,
-0.016549648717045784,
0.3666859567165375,
-0.18483978509902954,
0.04923625662922859,
0.41767311096191406,
-0.1705232858657837,
-0.26449090242385864,
-0.05572758987545967,
-0.3400617837905884,
-0.021342767402529716,
-0.18977059423923492,
0.25517427921295166,
-0.15768425166606903,
-0.008495345711708069,
0.393932968378067,
0.11799588799476624,
0.08240881562232971,
0.07277320325374603,
0.1987306922674179,
-0.0019387789070606232,
0.4183235168457031,
0.14299319684505463,
-0.06231994926929474,
-0.2806391716003418,
0.10373841226100922,
0.15296313166618347,
-0.27140021324157715,
0.1668623685836792,
-0.2222020924091339,
-0.11453891545534134,
0.2245563119649887,
0.215769961476326,
-0.34668678045272827,
0.03572537377476692,
0.23351171612739563,
-0.03053933009505272,
0.29469433426856995,
-0.27591556310653687,
0.08753515779972076,
-0.3774555027484894,
-0.2799341678619385,
-0.14662738144397736,
0.09279058873653412,
0.20322144031524658,
0.04250023514032364,
-0.40832725167274475,
0.4225846827030182,
0.011494278907775879,
0.06887929141521454,
0.16760610044002533,
-0.04035943001508713,
0.07181811332702637,
-0.32801946997642517,
0.034306153655052185,
0.031180057674646378,
-0.336354523897171,
-0.3111552894115448,
-0.32567450404167175,
-0.1790117472410202,
0.3539280593395233,
-0.04804399237036705,
0.118836410343647,
-0.03411245346069336,
-0.3079551160335541,
-0.001402357593178749,
0.3920871913433075,
-0.18640802800655365,
0.12850429117679596,
-0.5704222917556763,
-0.23702338337898254,
-0.025920454412698746,
0.12142966687679291,
0.114744633436203,
0.1066364049911499,
0.10202621668577194,
0.18477791547775269,
0.10752125084400177,
-0.12953516840934753,
0.09384270012378693,
0.18663987517356873,
0.16659511625766754,
0.20834985375404358,
0.18690116703510284,
0.21691350638866425,
-0.035632938146591187,
0.08273326605558395,
-0.39662161469459534,
0.060160353779792786,
0.3129684329032898,
-0.1360435038805008,
0.2599923610687256,
-0.293854296207428,
-0.3324706256389618,
-0.34813424944877625,
0.0673232302069664,
0.2780757546424866,
0.4464811086654663,
-0.11299288272857666,
0.20968136191368103,
0.23073317110538483,
-0.31678804755210876,
0.1854328066110611,
-0.6482864022254944,
0.10905911028385162,
-0.10479562729597092,
-0.05054827407002449,
-0.3431493937969208,
0.33217737078666687,
-0.08329583704471588,
-0.18058151006698608,
-0.07879586517810822,
0.2546255886554718,
0.04744594171643257,
0.014225374907255173,
-0.04473214969038963,
0.4283333420753479,
0.1788039207458496,
-0.03634584695100784,
-0.155690997838974,
0.12023577839136124,
-0.11583209037780762,
-0.06797219812870026,
0.05200892314314842,
0.6225818991661072,
0.011880075559020042,
-0.21929575502872467,
0.11161279678344727,
-0.18809933960437775,
0.14980153739452362,
-0.13757409155368805,
-0.18514788150787354,
0.030869394540786743,
0.07497188448905945,
0.029417596757411957,
0.3431139588356018,
0.2390725463628769,
-0.5231514573097229,
0.17378780245780945,
0.3995077311992645,
0.06637253612279892,
-0.11737219989299774,
0.17693984508514404,
-0.14354343712329865,
-0.1747978776693344,
-0.058603569865226746,
0.5320171117782593,
0.525749921798706,
0.21341858804225922,
-0.16805711388587952,
0.28262728452682495,
-0.0694018304347992,
-0.15845534205436707,
0.21403351426124573,
-0.08772441744804382,
-0.1960441619157791,
0.0929010659456253,
0.21073018014431,
0.21229945123195648,
-0.39933207631111145,
-0.14593611657619476,
-0.08466079086065292,
0.12747406959533691,
-0.3453494608402252,
0.06497319042682648,
-0.216396301984787,
0.09487348049879074,
-0.319376140832901,
-0.312548965215683,
-0.2283814400434494,
-0.26398590207099915,
0.25704073905944824,
0.39824607968330383,
-0.17516618967056274,
0.31682634353637695,
-0.010452568531036377,
0.3019207715988159,
-0.16419777274131775,
-0.0013853218406438828,
-0.22391559183597565,
-0.05792082101106644,
-0.3244994878768921,
0.04450751468539238,
0.10538600385189056,
-0.28982797265052795,
0.30362141132354736,
-0.49950599670410156,
-0.24169893562793732,
-0.1704249233007431,
-0.5688194632530212,
0.10294588655233383,
-0.3027522563934326,
0.05739276111125946,
0.28707754611968994,
-0.002189621329307556,
-0.07424351572990417,
0.00997987762093544,
0.40093961358070374,
-0.4392067790031433,
-0.31603145599365234,
-0.10468367487192154,
0.09041443467140198,
0.08111598342657089,
-0.19195973873138428,
-0.10075728595256805,
-0.11926211416721344,
-0.22518472373485565,
0.11723499000072479,
0.14065362513065338,
0.15053901076316833,
0.5707827806472778,
-0.02754700556397438,
-0.06284855306148529,
-0.3521794378757477,
0.17320655286312103,
-0.2318873554468155,
-0.5914297103881836,
0.22140710055828094,
-0.24364963173866272,
-0.25145161151885986,
-0.16244293749332428,
0.013025939464569092,
-0.06793787330389023,
0.2637365162372589,
-0.3888753056526184,
-0.532753050327301,
-0.2550705671310425,
0.3044636845588684,
-0.05165574699640274,
-0.013783220201730728,
0.30340123176574707,
0.3928473889827728,
-0.1347614824771881,
-0.02062637358903885,
0.03018029034137726,
0.09611427783966064,
-0.08008822798728943,
0.4585875868797302,
0.004819653928279877,
0.10224402695894241,
0.00783839076757431,
0.728308916091919,
0.08545839786529541,
-0.45808473229408264,
0.2305787354707718,
-0.11641170084476471,
0.23899543285369873,
-0.3723754584789276,
-0.07543054223060608,
0.20928162336349487,
0.10516370832920074,
0.08846266567707062,
0.32578039169311523,
0.09509517252445221,
0.29844000935554504,
-0.1087542474269867,
0.29639628529548645,
-0.11190927773714066,
-0.3506024181842804,
0.1632794886827469,
-0.052392974495887756,
-0.14808328449726105,
0.0846242606639862,
0.308575838804245,
-0.1369626820087433,
-0.31284183263778687,
0.15287888050079346,
0.1553453505039215,
0.016954882070422173,
0.22334527969360352,
0.09177784621715546,
0.04772491380572319,
-0.2605944275856018,
0.10061696916818619,
0.2398095428943634,
0.1106705591082573,
-0.2932240962982178,
-0.5108305215835571,
0.3054913878440857,
0.13862240314483643,
0.5063815116882324,
-0.07137352228164673,
0.19433175027370453,
-0.25966060161590576,
-0.7267714738845825,
0.03806231915950775,
-0.1777086853981018,
-0.08800728619098663,
-0.40979546308517456,
0.21732425689697266,
0.4251534342765808,
-0.03133011609315872,
-0.08732172846794128,
0.07651910930871964,
0.002762790769338608,
-0.09223287552595139,
0.12082614004611969,
-0.2006353735923767,
-0.3020075857639313,
-0.2600725293159485,
0.16327539086341858,
-0.035896994173526764,
-0.02173270657658577,
-0.1489546000957489,
-0.20226949453353882,
-0.1323419213294983,
-0.07457240670919418,
0.1339816153049469,
0.3763667941093445,
0.31418511271476746,
-0.23096957802772522,
0.24542218446731567,
0.19165857136249542,
0.1943834125995636,
0.48975566029548645,
0.3244423270225525,
-0.14751358330249786,
-0.3672802746295929,
0.06870874762535095,
-0.08485540002584457,
-0.35012760758399963,
0.544935405254364,
0.12925320863723755,
-0.10608167946338654,
-0.1199946254491806,
0.29162612557411194,
-0.19316281378269196,
0.10020163655281067,
0.08924639970064163,
0.14231997728347778,
-0.11829037219285965,
-0.1122715026140213,
-0.019030991941690445,
0.32959067821502686,
-0.024067476391792297,
0.4348650872707367,
-0.28658947348594666,
-0.3694676160812378,
0.41469332575798035,
0.2569870054721832,
1.2366275787353516,
0.04609544202685356,
0.39333778619766235,
0.34145399928092957,
0.03473497927188873,
0.06557716429233551,
0.07201369106769562,
0.22933556139469147,
-0.6562089323997498,
-0.6120426654815674,
-0.09797076880931854,
-0.0758785828948021,
-0.12016847729682922,
-0.23935618996620178,
-0.174130380153656,
0.09124025702476501,
-0.06660270690917969,
-0.059213586151599884,
-0.1036204993724823,
-0.1261564940214157,
0.1411096602678299,
-0.11240695416927338,
-0.054142341017723083,
0.1256670206785202,
0.011179359629750252,
0.32705795764923096,
-0.04325515776872635,
-0.15606370568275452,
-0.48689255118370056,
-0.13452288508415222,
0.06121845543384552,
0.1406804472208023,
-0.22077882289886475,
-0.03333055227994919,
0.25348371267318726,
-0.018783263862133026,
-0.5261369347572327,
0.1972668468952179,
0.32048630714416504,
0.08935856819152832,
-0.15742114186286926,
0.28890523314476013,
0.40729764103889465,
0.32366496324539185,
0.12848639488220215,
-0.12665341794490814,
0.21186932921409607,
0.010849185287952423,
0.03568193316459656,
-0.1738763451576233,
-0.11632154881954193,
-0.23180317878723145,
-0.5437464714050293,
-0.08735963702201843,
-0.22435356676578522,
-0.15008173882961273,
0.07481297850608826,
-0.2670249342918396,
-0.12142758071422577,
-0.21746602654457092,
0.13540323078632355,
0.05859564244747162,
-0.34670931100845337,
0.18456783890724182,
0.30120211839675903,
-0.4954584240913391,
-0.1523372232913971,
0.37724554538726807,
-0.08860650658607483,
0.36397063732147217,
0.17684178054332733,
-0.0010815933346748352,
-0.22468434274196625,
-0.01319248229265213,
0.2531036138534546,
0.40288543701171875,
-0.5410004258155823,
0.1971445232629776,
-0.09422135353088379,
-0.18028663098812103,
0.05257352441549301,
0.6512400507926941,
0.21428747475147247,
0.02652786672115326,
0.037193164229393005,
-0.11477979272603989,
-0.1716734915971756,
0.009695380926132202,
-0.1571933776140213,
0.46149933338165283,
0.191560298204422,
0.36209121346473694,
-0.16093774139881134,
0.28560134768486023,
-0.33735769987106323,
0.14038358628749847,
-0.2061651647090912,
0.13664120435714722,
-0.24342699348926544,
-0.23380634188652039,
0.20155611634254456,
-0.08499100804328918,
0.03735547885298729,
0.37056493759155273,
-0.274194598197937,
-0.12629945576190948,
-0.18932272493839264,
0.1316072940826416,
0.19922813773155212,
-0.011009488254785538,
-0.19032041728496552,
0.34927064180374146,
0.087928906083107,
-0.14803962409496307,
0.17073825001716614,
0.3758660554885864,
0.12002624571323395,
-0.05042809993028641,
0.36656591296195984,
0.05885511264204979,
0.15303269028663635,
0.049067143350839615,
-0.034138619899749756,
-0.039973385632038116,
-0.0009199269115924835,
-0.05725967511534691,
-0.38225099444389343,
-0.054598696529865265,
-0.004486542195081711,
0.3010939955711365,
0.2424117922782898,
-0.16335651278495789,
0.13379494845867157,
0.08890625834465027,
-0.23257574439048767,
0.2207661122083664,
0.4038740396499634,
0.2631615996360779,
-0.3139934539794922,
-0.382260799407959,
0.17839904129505157,
0.16733922064304352,
-0.1711331307888031,
-0.019973205402493477,
0.2353159785270691,
0.21646642684936523,
-0.08213136345148087,
0.4728800058364868,
0.017869360744953156,
-0.1868470013141632,
-0.11411994695663452,
0.12242649495601654,
0.4390067160129547,
-0.5575623512268066,
0.11663129925727844,
0.4097650647163391,
-0.240172877907753,
0.21816587448120117,
0.47526034712791443,
0.004801055416464806,
0.05835455283522606,
0.011695547960698605,
-0.12194152176380157,
0.31900671124458313,
-0.3358263075351715,
-0.04123842343688011,
0.010505804792046547,
-0.41206610202789307,
0.22479906678199768,
0.267311692237854,
-0.12770187854766846,
-0.03209994360804558,
0.1130916103720665,
0.6813116073608398,
-0.010357694700360298,
-0.505459725856781,
-0.17896531522274017,
0.2527173161506653,
-0.3298311233520508,
-0.0805707722902298,
-0.0402873270213604,
-0.1782366782426834,
-0.4391256868839264,
0.13934211432933807,
0.012965894304215908,
0.0438879132270813,
0.6352000832557678,
0.09819041192531586,
-0.13803142309188843,
-0.2908281087875366,
-0.2516077160835266,
-0.02390866167843342,
0.14237844944000244,
-0.33007022738456726,
0.29158446192741394,
-0.044830065220594406,
-0.4020322561264038,
0.3077085316181183,
0.18452134728431702,
0.2283809781074524,
0.3099111318588257,
0.2109803855419159,
0.02614147961139679,
-0.025815756991505623,
0.24790194630622864,
-0.1868031620979309,
0.35561227798461914,
0.13326504826545715,
-0.27032071352005005,
0.20474089682102203,
0.14253777265548706,
-0.19804173707962036,
0.07776550948619843,
-0.1616828888654709,
0.3494873642921448,
-0.11006606370210648,
0.6278562545776367,
0.008274266496300697,
0.1028701663017273,
0.09304831922054291,
0.08162324130535126,
-0.2723430097103119,
0.17085620760917664,
-0.06194771081209183,
0.045584194362163544,
0.11683831363916397,
-0.02299966849386692,
0.0737537369132042,
0.21156367659568787,
0.22837233543395996,
0.5994604825973511,
-0.6272451877593994,
-0.2227475643157959,
0.13197483122348785,
-0.3467048406600952,
0.6499618291854858,
-0.049900371581315994,
0.24532507359981537,
-0.15150722861289978,
0.012425601482391357,
-0.16474997997283936,
0.00906725600361824,
0.14613980054855347,
0.10217155516147614,
0.24024848639965057,
0.3945762515068054,
-0.21800586581230164,
0.10452164709568024,
-0.2925480008125305,
-0.25424817204475403,
0.14499026536941528,
-0.18180686235427856,
0.23732346296310425,
-0.12028521299362183,
0.11639715731143951,
0.13288867473602295,
-0.3119300603866577,
-0.11798588931560516,
0.0009848767658695579,
0.2725646495819092,
0.2818931043148041,
0.018499113619327545,
-0.1818704605102539,
-0.03730938956141472,
-0.2179861068725586,
-0.20332792401313782,
-0.35729116201400757,
0.14941179752349854,
-0.08755557239055634,
0.19433465600013733,
-0.009613633155822754,
-0.4762854278087616,
-0.4858578145503998,
0.24095842242240906,
0.10662543028593063,
0.18597440421581268,
-0.05316704884171486,
0.1687425822019577,
-0.1279125213623047,
0.1182837188243866,
0.1896006166934967,
0.3774234354496002,
0.052870552986860275,
0.1332927644252777,
-0.35516852140426636,
-0.4628089666366577,
0.5343228578567505,
-0.28468620777130127,
0.10852834582328796,
-0.1414751559495926,
0.11587297916412354,
-0.10614819824695587,
-0.4257773458957672,
-0.36005711555480957,
-0.08605015277862549,
-0.11113812774419785,
-0.06263961642980576,
-0.3132001757621765,
0.16467119753360748,
-0.24727541208267212,
-0.01174011081457138,
-0.046509429812431335,
0.1899588257074356,
0.24097849428653717,
-0.013833872973918915,
0.3342031240463257,
0.008717432618141174
] |
https://github.com/huggingface/datasets/issues/6603 | ```
ds = datasets.Dataset.from_dict(dict(a=[i for i in range(100)]))
ds.map(lambda item: dict(b=item['a'] * 2), cache_file_name="/tmp/whatever-fn") # this worked
ds.map(lambda item: dict(b=item['a'] * 2), cache_file_name="/tmp/whatever-folder/filename") # this failed
ds.map(lambda item: dict(b=item['a'] * 2), cache_file_name="/tmp/whatever-folder/") # this failed
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/whatever-folder/tmp1_izxvoo'
```
It will fail if the filename parents do not exists. If we have `os.makedirs("/tmp/whatever-folder")`, then it worked.
Maybe add the `mkdir -p` into the map function? | datasets map `cache_file_name` does not work | ### Describe the bug
In the documentation `datasets.Dataset.map` arg `cache_file_name` is said to be a string, but it doesn't work.
### Steps to reproduce the bug
1. pick a dataset
2. write a map function
3. do `ds.map(..., cache_file_name='some_filename')`
4. it crashes
### Expected behavior
It will tell you the filename you specified does not exist or it will generate a new file and tell you the filename does not exist.
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.10.201-168.748.amzn2int.x86_64-x86_64-with-glibc2.26
- Python version: 3.10.13
- `huggingface_hub` version: 0.20.2
- PyArrow version: 14.0.2
- Pandas version: 2.1.4
- `fsspec` version: 2023.12.2 | 71 | datasets map `cache_file_name` does not work
### Describe the bug
In the documentation `datasets.Dataset.map` arg `cache_file_name` is said to be a string, but it doesn't work.
### Steps to reproduce the bug
1. pick a dataset
2. write a map function
3. do `ds.map(..., cache_file_name='some_filename')`
4. it crashes
### Expected behavior
It will tell you the filename you specified does not exist or it will generate a new file and tell you the filename does not exist.
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.10.201-168.748.amzn2int.x86_64-x86_64-with-glibc2.26
- Python version: 3.10.13
- `huggingface_hub` version: 0.20.2
- PyArrow version: 14.0.2
- Pandas version: 2.1.4
- `fsspec` version: 2023.12.2
```
ds = datasets.Dataset.from_dict(dict(a=[i for i in range(100)]))
ds.map(lambda item: dict(b=item['a'] * 2), cache_file_name="/tmp/whatever-fn") # this worked
ds.map(lambda item: dict(b=item['a'] * 2), cache_file_name="/tmp/whatever-folder/filename") # this failed
ds.map(lambda item: dict(b=item['a'] * 2), cache_file_name="/tmp/whatever-folder/") # this failed
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/whatever-folder/tmp1_izxvoo'
```
It will fail if the filename parents do not exists. If we have `os.makedirs("/tmp/whatever-folder")`, then it worked.
Maybe add the `mkdir -p` into the map function? | [
-0.17607736587524414,
-0.22184181213378906,
0.028800055384635925,
0.3735642731189728,
0.35459649562835693,
0.26312312483787537,
0.2672741711139679,
0.3279056251049042,
0.2868582606315613,
0.11249053478240967,
-0.24395491182804108,
0.40131598711013794,
-0.07068009674549103,
-0.2143307328224182,
0.06859278678894043,
-0.09317554533481598,
0.23042599856853485,
-0.0648798942565918,
-0.11833829432725906,
0.14091677963733673,
-0.2557426989078522,
0.236441507935524,
-0.11755739897489548,
0.17706720530986786,
-0.5260127186775208,
-0.011501542292535305,
-0.23407858610153198,
0.27789026498794556,
0.06891900300979614,
-0.3888252377510071,
0.33980366587638855,
-0.07571178674697876,
0.07648126780986786,
0.5808266401290894,
-0.00011844107939396054,
-0.07618460059165955,
0.3528293967247009,
-0.07929790765047073,
-0.1981300413608551,
-0.24544869363307953,
-0.3356224000453949,
-0.10690271854400635,
-0.143442302942276,
-0.4662705659866333,
0.029818706214427948,
0.04323360323905945,
0.31940340995788574,
-0.6360977292060852,
0.15896303951740265,
0.34154078364372253,
0.18659162521362305,
0.05042362958192825,
0.09682778269052505,
-0.12909814715385437,
0.41369932889938354,
0.0614350363612175,
-0.22571752965450287,
0.12854337692260742,
0.2141110599040985,
-0.2846508324146271,
-0.05869776010513306,
0.1461564153432846,
-0.32116663455963135,
0.004324154928326607,
0.3215602934360504,
0.36089062690734863,
0.028087234124541283,
-0.2869876027107239,
0.1427011787891388,
0.23800380527973175,
0.524799108505249,
-0.6610263586044312,
-0.3920958936214447,
-0.21467654407024384,
-0.33983612060546875,
-0.1916404813528061,
0.3204496502876282,
-0.08247216045856476,
-0.15347403287887573,
0.17194949090480804,
0.017084937542676926,
-0.14340606331825256,
0.1595499962568283,
0.07916469871997833,
0.12464562058448792,
-0.03619224950671196,
-0.16742677986621857,
0.1100246012210846,
0.11193647980690002,
-0.1047213226556778,
-0.08047112822532654,
-0.2880233824253082,
-0.14569461345672607,
0.27953246235847473,
-0.48956745862960815,
-0.06959474086761475,
0.11938675493001938,
0.23011262714862823,
0.0831494927406311,
-0.16566824913024902,
0.09581534564495087,
-0.2325008362531662,
-0.23726597428321838,
0.25074124336242676,
-0.05621275678277016,
0.4245498478412628,
0.3036561608314514,
0.21429765224456787,
0.11965765804052353,
-0.06283623725175858,
-0.16079208254814148,
-0.09712310135364532,
0.20739439129829407,
-0.3050763010978699,
0.11636359989643097,
-0.006624039262533188,
0.33480533957481384,
0.03161335736513138,
-0.08606595546007156,
0.05677039921283722,
-0.17817506194114685,
0.08316080272197723,
0.24467995762825012,
0.4652714431285858,
-0.07626960426568985,
-0.07552932947874069,
-0.10496403276920319,
-0.04887092113494873,
0.07420598715543747,
0.1470479667186737,
-0.2865033447742462,
0.10310997068881989,
-0.2549595236778259,
0.2964087426662445,
0.14834709465503693,
-0.24937163293361664,
0.3380090594291687,
-0.15306703746318817,
-0.1008477658033371,
-0.050486061722040176,
-0.23347772657871246,
-0.1420241892337799,
0.16765376925468445,
0.22199104726314545,
-0.3111322522163391,
0.26870593428611755,
0.1174180805683136,
-0.3321484625339508,
-0.10723542422056198,
0.11611436307430267,
-0.4583888351917267,
-0.22055162489414215,
0.045720115303993225,
0.07625079154968262,
-0.09182611107826233,
0.05462052300572395,
-0.2804286777973175,
0.10765908658504486,
0.41306307911872864,
-0.34940770268440247,
0.2077585607767105,
0.15395018458366394,
-0.3534706234931946,
-0.400282084941864,
0.19392216205596924,
0.7271989583969116,
-0.20079834759235382,
-0.01846037060022354,
-0.11004774272441864,
0.06197599694132805,
0.07607942074537277,
0.13195368647575378,
0.16947399079799652,
-0.02659282088279724,
-0.5221890807151794,
0.4783223867416382,
0.20976169407367706,
-0.4630473852157593,
-0.5604048371315002,
0.22593837976455688,
-0.0593024343252182,
-0.06148960441350937,
0.2373247891664505,
0.020669374614953995,
0.03455822542309761,
-0.3140615224838257,
0.043053049594163895,
0.028289437294006348,
-0.08615681529045105,
0.07139942049980164,
-0.25959116220474243,
-0.1464497298002243,
0.16503208875656128,
0.035321809351444244,
-0.03150598704814911,
0.28156280517578125,
0.2509020268917084,
0.11134370416402817,
0.16030454635620117,
0.07343810051679611,
0.16251444816589355,
0.21349909901618958,
0.289257287979126,
0.08601094782352448,
0.12354420125484467,
-0.3890576958656311,
-0.6749588251113892,
0.37025707960128784,
0.025901727378368378,
-0.37912794947624207,
-0.2171529233455658,
-0.2124515175819397,
-0.028054550290107727,
-0.01181437075138092,
-0.03432413935661316,
-0.21874038875102997,
0.05867106840014458,
0.11698102951049805,
0.3121252655982971,
-0.09314548969268799,
-0.22909922897815704,
0.4488699734210968,
-0.03187405690550804,
0.10205795615911484,
-0.3207158148288727,
0.13243459165096283,
-0.06765985488891602,
-0.12667004764080048,
-0.37451571226119995,
-0.11585067957639694,
0.311179518699646,
-0.06758477538824081,
-0.11352217197418213,
0.571473240852356,
0.16207772493362427,
0.07296155393123627,
-0.06827577948570251,
0.15201044082641602,
0.031574130058288574,
-0.1870104968547821,
-0.09284760057926178,
0.12550970911979675,
0.16886620223522186,
-0.03626951575279236,
-0.16814327239990234,
-0.09699276089668274,
-0.22932979464530945,
0.1686955839395523,
-0.1769590675830841,
0.08647993952035904,
0.14281538128852844,
-0.1565471738576889,
0.06351713836193085,
-0.17744474112987518,
0.0712597668170929,
-0.14086532592773438,
0.5706049203872681,
-0.050698041915893555,
0.0031956806778907776,
-0.09242009371519089,
0.5194137692451477,
-0.07325275242328644,
0.2402561604976654,
0.013513220474123955,
-0.15376845002174377,
0.033486828207969666,
0.2010449320077896,
0.266486257314682,
0.648285984992981,
0.19890658557415009,
0.21910454332828522,
-0.004306217655539513,
-0.09616154432296753,
-0.09691157937049866,
0.18753230571746826,
-0.07579696178436279,
0.11290420591831207,
-0.05777323246002197,
0.07640637457370758,
0.042690545320510864,
-0.2852177321910858,
-0.24375247955322266,
0.13641533255577087,
0.15726900100708008,
-0.2997295558452606,
-0.03425806015729904,
-0.25673604011535645,
-0.05416373535990715,
0.10299014300107956,
-0.0724862590432167,
-0.18343830108642578,
-0.15244653820991516,
-0.09971028566360474,
0.3727891147136688,
-0.023074228316545486,
0.36004963517189026,
0.19400465488433838,
0.13611163198947906,
0.068972647190094,
-0.4706507921218872,
-0.5016130805015564,
-0.17289382219314575,
-0.013186205178499222,
-0.04833521693944931,
0.17320871353149414,
-0.16903960704803467,
0.13428181409835815,
-0.13743716478347778,
0.009100914001464844,
-0.4435892403125763,
-0.2364819049835205,
0.08610296249389648,
-0.04524444788694382,
0.24117045104503632,
0.1191512942314148,
0.12782035768032074,
-0.08858034014701843,
-0.06777121126651764,
0.15907099843025208,
-0.23433101177215576,
-0.3170695900917053,
-0.13910064101219177,
0.317398339509964,
-0.08391876518726349,
-0.281765878200531,
-0.01657017320394516,
-0.15115875005722046,
-0.39966750144958496,
0.3200356066226959,
-0.24031399190425873,
0.13542136549949646,
0.4026726484298706,
0.0775531679391861,
0.2214491069316864,
-0.17422673106193542,
0.05118474364280701,
-0.29555168747901917,
-0.27502942085266113,
0.31327179074287415,
-0.15679816901683807,
-0.1592933088541031,
-0.023949988186359406,
0.02579250931739807,
-0.005131320562213659,
0.12925344705581665,
-0.34093984961509705,
-0.33877748250961304,
-0.2280862182378769,
0.29764091968536377,
0.185675248503685,
0.3060415983200073,
0.45813196897506714,
0.07507087290287018,
-0.018754690885543823,
-0.31142720580101013,
-0.32385703921318054,
0.04476339370012283,
0.19730590283870697,
0.3702479600906372,
0.3288685083389282,
0.22662796080112457,
0.07205329090356827,
0.31238216161727905,
0.42980846762657166,
0.08949194848537445,
0.5353960394859314,
-0.2770107686519623,
0.5596063137054443,
-0.25957220792770386,
-0.330750048160553,
-0.07360385358333588,
-0.09497937560081482,
-0.20661363005638123,
0.0767601802945137,
0.05431845411658287,
-0.06505689769983292,
-0.15503308176994324,
-0.002051815390586853,
-0.16745096445083618,
-0.14687815308570862,
-0.1656271368265152,
-0.16280019283294678,
-0.036362238228321075,
0.1005556732416153,
0.07400635629892349,
-0.20700466632843018,
-0.17280644178390503,
0.20685017108917236,
0.21397289633750916,
0.19978369772434235,
-0.07678532600402832,
0.11207805573940277,
0.056831587105989456,
-0.48041799664497375,
0.28036218881607056,
0.09508869051933289,
0.2249094396829605,
-0.3019351065158844,
0.06235969066619873,
-0.12550443410873413,
0.12720558047294617,
1.054375171661377,
-0.2994754910469055,
0.17233246564865112,
0.02432040125131607,
0.1521960198879242,
-0.33039289712905884,
0.14677846431732178,
0.1779683381319046,
0.3921479284763336,
-0.0745486319065094,
0.5314957499504089,
-0.24885477125644684,
-0.14689743518829346,
-0.15192344784736633,
0.1488090306520462,
0.06147517263889313,
-0.17702807486057281,
-0.03830882906913757,
-0.04012327268719673,
-0.20263192057609558,
-0.11895706504583359,
0.20031344890594482,
-0.0031649023294448853,
0.3156298100948334,
-0.08819673210382462,
-0.09764809906482697,
-0.23221874237060547,
0.14234912395477295,
0.005868948996067047,
0.4494142532348633,
0.07580838352441788,
0.15267688035964966,
0.07145872712135315,
0.010240397416055202,
0.10666190087795258,
0.5032629370689392,
-0.4493216276168823,
-0.08201103657484055,
0.07027772068977356,
0.10486213862895966,
0.1899588704109192,
0.26463544368743896,
-0.30336204171180725,
-0.1931574046611786,
-0.16000358760356903,
0.145234152674675,
-0.21831519901752472,
0.03735312074422836,
0.2177244871854782,
0.17630289494991302,
-0.15136390924453735,
-0.3704390227794647,
0.6049964427947998,
0.4239090085029602,
-0.1732603907585144,
0.6924008727073669,
0.13429975509643555,
-0.49462684988975525,
0.32078832387924194,
-0.23651131987571716,
0.7698167562484741,
-0.0786503329873085,
0.1797596514225006,
-0.030746567994356155,
-0.03331786394119263,
0.6181027889251709,
-0.09893947839736938,
0.12524984776973724,
-0.2436280995607376,
-0.43548837304115295,
0.0023951157927513123,
-0.04160168766975403,
0.18642188608646393,
0.2702312469482422,
-0.26192206144332886,
0.4083278477191925,
0.1312282234430313,
0.40333834290504456,
0.007669679820537567,
-0.09000982344150543,
-0.1402008831501007,
-0.3525203466415405,
-0.320141077041626,
0.14351803064346313,
-0.009729389101266861,
0.16120341420173645,
0.11982016265392303,
0.06885191798210144,
-0.1662663370370865,
-0.25423818826675415,
-0.28699126839637756,
0.06502124667167664,
-0.37513411045074463,
0.1728639304637909,
-0.08894418179988861,
-0.016356103122234344,
-0.14209923148155212,
0.5666033625602722,
0.09124001860618591,
0.07658647745847702,
-0.2622910439968109,
0.16743037104606628,
0.05937550589442253,
0.24461443722248077,
-0.19434431195259094,
-0.1637740582227707,
0.27430474758148193,
0.18150167167186737,
0.020136207342147827,
0.13463962078094482,
-0.30010294914245605,
-0.28128695487976074,
0.07783657312393188,
0.06587480008602142,
-0.10664859414100647,
-0.07588481158018112,
-0.21532616019248962,
-0.17203941941261292,
-0.021247029304504395,
-0.16831430792808533,
0.09566737711429596,
0.038673385977745056,
-0.25729355216026306,
0.23430871963500977,
-0.23640549182891846,
-0.1633301079273224,
0.01040424220263958,
0.5188113451004028,
-0.2784143388271332,
0.1564294546842575,
0.28322750329971313,
-0.05489938333630562,
-0.1437949240207672,
-0.13578172028064728,
0.09105938673019409,
-0.027213914319872856,
-0.30092403292655945,
0.19182127714157104,
-0.03815869987010956,
-0.09157496690750122,
-0.03350348398089409,
0.037533991038799286,
0.2722629904747009,
0.1553608626127243,
-0.05424121394753456,
-0.3222201466560364,
-0.5103200674057007,
0.10036152601242065,
-0.1441219449043274,
0.2948133647441864,
0.07049208879470825,
-0.16727860271930695,
0.003797084093093872,
0.10145142674446106,
-0.27949008345603943,
0.20907330513000488,
-0.13852044939994812,
0.030613191425800323,
0.22106358408927917,
0.2297373116016388,
0.4780040383338928,
-0.36895251274108887,
0.054347507655620575,
0.36668917536735535,
-0.20047160983085632,
-0.17687402665615082,
-0.13014858961105347,
0.13598906993865967,
0.1728372424840927,
0.009322073310613632,
-0.23943433165550232,
-0.28634870052337646,
-0.10151655972003937,
-0.4375952482223511,
0.10874655097723007,
0.5891183614730835,
-0.030906401574611664,
0.16983374953269958,
0.39250102639198303,
-0.053081661462783813,
-0.07793936133384705,
0.14892607927322388,
-0.09909069538116455,
0.18897612392902374,
-0.08162908256053925,
0.15742994844913483,
-0.17506633698940277,
0.062216997146606445,
0.09878512471914291,
0.043370313942432404,
-0.17644932866096497,
-0.22531931102275848,
0.32989466190338135,
-0.2808152437210083,
-0.2589968144893646,
0.3182373642921448,
0.40115535259246826,
-0.02626064419746399,
-0.10547598451375961,
0.013075284659862518,
0.3512314558029175,
0.13547813892364502,
-0.2714264690876007,
-0.18113145232200623,
0.5995587706565857,
0.08634589612483978,
0.2227325588464737,
0.24100063741207123,
-0.029970094561576843,
-0.07818866521120071,
0.050927117466926575,
0.05441049486398697,
0.5116168856620789,
-0.17838169634342194,
0.09671364724636078,
0.27641037106513977,
0.1697774976491928,
0.29196619987487793,
0.47952210903167725,
0.2493867576122284,
0.14013779163360596,
0.7628121376037598,
-0.10371872782707214,
0.13994631171226501,
-0.2028885781764984,
0.12825995683670044,
-0.08445030450820923,
-0.2567514181137085,
0.2527877986431122,
0.005351759493350983,
-0.26871296763420105,
0.1592215746641159,
-0.1473209261894226,
0.3986867070198059,
-0.4733911454677582,
-0.00018682703375816345,
0.027519695460796356,
0.04588582366704941,
-0.15988370776176453,
-0.21790221333503723,
0.36666589975357056,
-0.040458619594573975,
0.14260786771774292,
-0.10445936024188995,
0.015646664425730705,
-0.32593870162963867,
0.6462470293045044,
-0.05517835542559624,
0.052360765635967255,
0.019735287874937057,
-0.2075229287147522,
0.3177310824394226,
0.3093344569206238,
-0.2679886817932129,
0.30077919363975525,
-0.1458984762430191,
-0.2686975598335266,
0.02059224620461464,
0.34564489126205444,
0.3395479917526245,
0.17736074328422546,
0.002862337976694107,
0.04197242483496666,
0.05834880843758583,
-0.13255956768989563,
-0.05734395608305931,
0.30593740940093994,
0.011169370263814926,
-0.2425045520067215,
0.17898167669773102,
0.106282077729702,
-0.11006997525691986,
0.10175883769989014,
0.13376908004283905,
0.28979286551475525,
-0.029111403971910477,
0.21198925375938416,
-0.2599180042743683,
-0.11439871042966843,
-0.071402907371521,
0.07698346674442291,
-0.4897366464138031,
-0.09999962896108627,
0.4868956208229065,
-0.3041272759437561,
0.2139866054058075,
-0.011052142828702927,
0.07125724107027054,
0.08552852272987366,
0.15827986598014832,
0.4242587089538574,
0.009067751467227936,
-0.29236096143722534,
0.05228477716445923,
-0.6260427236557007,
0.050910450518131256,
0.0008457433432340622,
0.12937244772911072,
-0.03438624367117882,
-0.08338725566864014,
-0.009164486080408096,
-0.01876995712518692,
0.2579076886177063,
-0.06844251602888107,
0.15340588986873627,
0.2848411202430725,
-0.2412099838256836,
-0.2543213963508606,
-0.15784308314323425,
0.08458491414785385,
0.16692504286766052,
-0.5349953770637512,
0.12698209285736084,
-0.18727034330368042,
0.021489322185516357,
-0.1739606112241745,
0.1655329167842865,
0.039249420166015625,
-0.11694193631410599,
0.4768911600112915,
-0.03529845178127289,
0.07120048999786377,
-0.06937666982412338,
0.051613032817840576,
-0.22448566555976868,
-0.0451580211520195,
-0.09824510663747787,
-0.15245342254638672,
-0.030182017013430595,
0.27062129974365234,
-0.5547441840171814,
-0.4552207887172699,
-0.34106630086898804,
0.13519111275672913,
0.14952975511550903,
-0.039481695741415024,
-0.1431344449520111,
0.18664434552192688,
-0.2662848234176636,
0.05133460834622383,
0.13082528114318848,
0.3726010322570801,
-0.25540441274642944,
0.45610299706459045,
-0.11410325765609741,
-0.3293452858924866,
0.6647634506225586,
-0.5780150294303894,
-0.2781299650669098,
0.12303587794303894,
0.19718903303146362,
0.23298689723014832,
-0.31634262204170227,
-0.3019963502883911,
-0.003922015428543091,
0.2772359848022461,
-0.05645778402686119,
-0.30976974964141846,
-0.10269960761070251,
-0.3300764560699463,
0.1861218959093094,
0.030316345393657684,
0.23580855131149292,
0.25858718156814575,
-0.15413770079612732,
0.2881373167037964,
-0.33197569847106934
] |
https://github.com/huggingface/datasets/issues/6600 | Hi! Parquet is the only format that supports complex/nested features such as `Translation`. So, this should work:
```python
test_dataset = load_dataset("opus100", name="en-fr", split="test")
# Save with .to_parquet()
test_parquet_path = "try_testset_save.parquet"
test_dataset.to_parquet(test_parquet_path)
# Load dataset from the Parquet
loaded_dataset = load_dataset("parquet", data_files=test_parquet_path)
print(test_dataset_fromfile[0]["translation"])
print(test_dataset_fromfile[0]["translation"]["en"])
``` | Loading CSV exported dataset has unexpected format | ### Describe the bug
I wanted to be able to save a HF dataset for translations and load it again in another script, but I'm a bit confused with the documentation and the result I've got so I'm opening this issue to ask if this behavior is as expected.
### Steps to reproduce the bug
The documentation I've mainly consulted is https://huggingface.co/docs/datasets/v2.16.1/en/package_reference/loading_methods#datasets.load_dataset and https://huggingface.co/docs/datasets/package_reference/main_classes#datasets.Dataset (where I've found `.to_csv()`)
```python
# Load a dataset of translations
test_dataset = load_dataset("opus100", name="en-fr", split="test")
# Save with .to_csv()
test_csv_path = "try_testset_save.csv"
test_dataset.to_csv(test_csv_path)
# Load dataset from the CSV
loaded_dataset = load_dataset("csv", data_files=test_csv_path)
print(test_dataset_fromfile[0]["translation"])
print(test_dataset_fromfile[0]["translation"]["en"])
```
```
Creating CSV from Arrow format: 100%
2/2 [00:00<00:00, 47.99ba/s]
Downloading data files: 100%
1/1 [00:00<00:00, 65.33it/s]
Extracting data files: 100%
1/1 [00:00<00:00, 42.10it/s]
Generating train split:
2000/0 [00:00<00:00, 47486.09 examples/s]
{'en': "She wasn't going to vaccinate her kid against polio, no way.", 'fr': 'Elle ne vaccinerait pas son enfant contre la polio. Pas question.'}
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[29], line 11
9 loaded_dataset = load_dataset("csv", data_files=test_csv_path)
10 print(test_dataset_fromfile[0]["translation"])
---> 11 print(test_dataset_fromfile[0]["translation"]["en"])
TypeError: string indices must be integers, not 'str'
```
### Expected behavior
Each translation was saved as a stringified dict like `"{'en': ""She wasn't going to vaccinate her kid against polio, no way."", 'fr': 'Elle ne vaccinerait pas son enfant contre la polio. Pas question.'}"` where I would have expected 2 columns (1st with English segments, and 2nd with French segments), and I was expecting `load_dataset` to infer the type of feature automatically as I haven't seen anything about it in the documentation.
Do you have an example of how to effectively save and load datasets of translations ?
### Environment info
- `datasets` version: 2.15.0
- Platform: Linux-3.10.0-1160.36.2.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.11.5
- `huggingface_hub` version: 0.16.4
- PyArrow version: 14.0.2
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0 | 44 | Loading CSV exported dataset has unexpected format
### Describe the bug
I wanted to be able to save a HF dataset for translations and load it again in another script, but I'm a bit confused with the documentation and the result I've got so I'm opening this issue to ask if this behavior is as expected.
### Steps to reproduce the bug
The documentation I've mainly consulted is https://huggingface.co/docs/datasets/v2.16.1/en/package_reference/loading_methods#datasets.load_dataset and https://huggingface.co/docs/datasets/package_reference/main_classes#datasets.Dataset (where I've found `.to_csv()`)
```python
# Load a dataset of translations
test_dataset = load_dataset("opus100", name="en-fr", split="test")
# Save with .to_csv()
test_csv_path = "try_testset_save.csv"
test_dataset.to_csv(test_csv_path)
# Load dataset from the CSV
loaded_dataset = load_dataset("csv", data_files=test_csv_path)
print(test_dataset_fromfile[0]["translation"])
print(test_dataset_fromfile[0]["translation"]["en"])
```
```
Creating CSV from Arrow format: 100%
2/2 [00:00<00:00, 47.99ba/s]
Downloading data files: 100%
1/1 [00:00<00:00, 65.33it/s]
Extracting data files: 100%
1/1 [00:00<00:00, 42.10it/s]
Generating train split:
2000/0 [00:00<00:00, 47486.09 examples/s]
{'en': "She wasn't going to vaccinate her kid against polio, no way.", 'fr': 'Elle ne vaccinerait pas son enfant contre la polio. Pas question.'}
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[29], line 11
9 loaded_dataset = load_dataset("csv", data_files=test_csv_path)
10 print(test_dataset_fromfile[0]["translation"])
---> 11 print(test_dataset_fromfile[0]["translation"]["en"])
TypeError: string indices must be integers, not 'str'
```
### Expected behavior
Each translation was saved as a stringified dict like `"{'en': ""She wasn't going to vaccinate her kid against polio, no way."", 'fr': 'Elle ne vaccinerait pas son enfant contre la polio. Pas question.'}"` where I would have expected 2 columns (1st with English segments, and 2nd with French segments), and I was expecting `load_dataset` to infer the type of feature automatically as I haven't seen anything about it in the documentation.
Do you have an example of how to effectively save and load datasets of translations ?
### Environment info
- `datasets` version: 2.15.0
- Platform: Linux-3.10.0-1160.36.2.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.11.5
- `huggingface_hub` version: 0.16.4
- PyArrow version: 14.0.2
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0
Hi! Parquet is the only format that supports complex/nested features such as `Translation`. So, this should work:
```python
test_dataset = load_dataset("opus100", name="en-fr", split="test")
# Save with .to_parquet()
test_parquet_path = "try_testset_save.parquet"
test_dataset.to_parquet(test_parquet_path)
# Load dataset from the Parquet
loaded_dataset = load_dataset("parquet", data_files=test_parquet_path)
print(test_dataset_fromfile[0]["translation"])
print(test_dataset_fromfile[0]["translation"]["en"])
``` | [
0.09366397559642792,
-0.301914244890213,
0.01883000135421753,
0.3817500174045563,
0.24329328536987305,
0.04965081065893173,
0.315578430891037,
0.07877084612846375,
0.13491548597812653,
0.09632612019777298,
-0.24815884232521057,
-0.04743877053260803,
0.17620520293712616,
0.2116120159626007,
0.334576278924942,
-0.143259659409523,
0.303672730922699,
0.08502645790576935,
-0.4367581605911255,
-0.1314423382282257,
-0.22809447348117828,
0.4494687020778656,
-0.07183337211608887,
0.09292539954185486,
0.11124391853809357,
0.14907757937908173,
-0.16879256069660187,
0.16885998845100403,
0.05831450968980789,
-0.229303777217865,
0.15809164941310883,
0.11135536432266235,
0.20604264736175537,
0.4037329852581024,
-0.00012558903836179525,
0.08201175928115845,
-0.004008529707789421,
-0.11978134512901306,
-0.18321989476680756,
-0.24709181487560272,
0.013846442103385925,
-0.09435887634754181,
0.06439365446567535,
-0.11815647035837173,
0.02706998586654663,
-0.13450400531291962,
-0.13870647549629211,
-0.3443034291267395,
0.16952162981033325,
0.2921079099178314,
0.15513762831687927,
0.38078078627586365,
-0.20691123604774475,
-0.06126517802476883,
0.3155248463153839,
0.19024182856082916,
-0.025867275893688202,
0.18207311630249023,
-0.17590224742889404,
0.009578272700309753,
0.03890467435121536,
0.1807984858751297,
-0.022536110132932663,
-0.09504105895757675,
0.22686965763568878,
0.23867985606193542,
-0.2990729808807373,
-0.10254624485969543,
0.06629277020692825,
0.2394334077835083,
0.4118885397911072,
-0.2540617883205414,
-0.34692665934562683,
-0.22601018846035004,
-0.20548218488693237,
-0.49688708782196045,
-0.01181543618440628,
0.2983764111995697,
0.21939000487327576,
0.2455936074256897,
0.0021458379924297333,
0.1572587788105011,
-0.20218238234519958,
0.07944722473621368,
-0.05701166018843651,
-0.27467289566993713,
-0.4432467222213745,
0.20950520038604736,
-0.10053601115942001,
0.04441240802407265,
-0.28067517280578613,
-0.24108102917671204,
-0.13238567113876343,
0.13618901371955872,
-0.05290745571255684,
0.18737244606018066,
0.000956118106842041,
0.05204154551029205,
0.20300623774528503,
-0.10234512388706207,
-0.0035112332552671432,
-0.10666832327842712,
-0.20315030217170715,
0.10552705079317093,
0.2893320918083191,
0.2503039538860321,
0.3184735178947449,
-0.18807272613048553,
-0.08066045492887497,
0.24730338156223297,
0.03743763267993927,
-0.19775620102882385,
0.09032571315765381,
-0.22214128077030182,
0.18519258499145508,
-0.03486087918281555,
0.1384364366531372,
-0.3499409854412079,
-0.344108521938324,
0.4105336666107178,
0.07247449457645416,
-0.030404679477214813,
-0.1886155605316162,
0.368207186460495,
-0.15960967540740967,
0.19882474839687347,
0.08393706381320953,
0.27583399415016174,
-0.37316766381263733,
-0.049918606877326965,
-0.1346273124217987,
0.03618386387825012,
-0.2330247461795807,
0.06911531835794449,
-0.14905868470668793,
-0.3503184914588928,
0.15646934509277344,
0.3039565682411194,
0.26387232542037964,
-0.3949246406555176,
-0.33764946460723877,
-0.17632398009300232,
0.5753581523895264,
0.09988685697317123,
0.23265564441680908,
0.30799365043640137,
0.3043743968009949,
-0.3076346814632416,
-0.12633071839809418,
-0.001629142090678215,
-0.30987030267715454,
-0.05339840054512024,
-0.17824402451515198,
0.0777551457285881,
-0.30883559584617615,
0.001614653505384922,
-0.3552803695201874,
0.21176278591156006,
0.019748732447624207,
-0.10038941353559494,
0.22126394510269165,
-0.1683315485715866,
-0.4414118826389313,
-0.28933006525039673,
0.2116909623146057,
0.6954666972160339,
-0.594170331954956,
-0.061713289469480515,
0.3312667906284332,
-0.2820900082588196,
0.09957116097211838,
0.4166431725025177,
-0.10718921571969986,
0.09920792281627655,
-0.5360670685768127,
0.13981619477272034,
-0.1136070191860199,
-0.24906842410564423,
-0.12198000401258469,
0.2797749936580658,
-0.10278473794460297,
0.3648049831390381,
0.061191461980342865,
-0.2536555528640747,
0.3905012607574463,
-0.05944492295384407,
0.0318523645401001,
0.09467076510190964,
0.10496758669614792,
0.06724431365728378,
-0.18414101004600525,
-0.02461627870798111,
0.32147011160850525,
-0.18389007449150085,
-0.1596299409866333,
0.14033080637454987,
0.2545219659805298,
-0.09682586789131165,
0.5173451900482178,
-0.17945393919944763,
0.0699932873249054,
0.33961647748947144,
-0.05361884459853172,
0.34479933977127075,
0.10261604189872742,
0.08534689992666245,
-0.5907803177833557,
0.083499476313591,
0.00992363691329956,
-0.17132163047790527,
0.11973530054092407,
-0.1440129578113556,
-0.36618873476982117,
0.07407650351524353,
-0.3803384006023407,
-0.04942398518323898,
-0.025771139189600945,
0.05852450057864189,
-0.1727597564458847,
0.27470916509628296,
0.030916787683963776,
0.2291923463344574,
-0.12471342086791992,
0.032503414899110794,
-0.45019352436065674,
0.3160610795021057,
0.14225585758686066,
0.111057348549366,
-0.1276891976594925,
0.2686977982521057,
0.32174211740493774,
-0.2867192029953003,
-0.09821219742298126,
0.40847134590148926,
0.1916053295135498,
0.5150744915008545,
-0.3099617063999176,
-0.16017553210258484,
0.23352359235286713,
-0.12263708561658859,
-0.03437396138906479,
0.08803113549947739,
0.26291635632514954,
-0.02717769145965576,
-0.4010501205921173,
0.7048600912094116,
-0.2557154893875122,
0.02441546320915222,
0.1216658279299736,
-0.2083168774843216,
0.21613457798957825,
0.03769324719905853,
-0.2483404278755188,
-0.4619513154029846,
0.2661275863647461,
0.0061290934681892395,
0.20096580684185028,
0.09584201872348785,
-0.32843005657196045,
0.16210077702999115,
0.6247155070304871,
-0.1647123396396637,
-0.22559350728988647,
0.23720015585422516,
-0.02554737776517868,
-0.12538397312164307,
0.10435931384563446,
0.052061811089515686,
0.29473885893821716,
-0.07442935556173325,
-0.016559282317757607,
0.20307029783725739,
0.06671915203332901,
-0.07879570126533508,
0.18826690316200256,
-0.16533194482326508,
0.2559555768966675,
0.32780712842941284,
0.011087000370025635,
-0.021526237949728966,
-0.4105904698371887,
0.26058489084243774,
-0.10149146616458893,
-0.05563519150018692,
-0.5951361060142517,
0.43554675579071045,
-0.3865439295768738,
0.03668674826622009,
-0.6840720772743225,
-0.05697440728545189,
-0.2996084690093994,
-0.18636417388916016,
-0.35323435068130493,
0.08111868798732758,
-0.139861598610878,
-0.19804638624191284,
-0.17179074883460999,
-0.10275900363922119,
-0.20311225950717926,
-0.15585841238498688,
0.1945091187953949,
0.07897317409515381,
-0.20976819097995758,
-0.11472521722316742,
-0.01702025905251503,
0.0033126547932624817,
0.25582751631736755,
-0.22546455264091492,
-0.1321776807308197,
-0.364770770072937,
-0.17866250872612,
0.35314616560935974,
-0.10883264243602753,
0.1628679484128952,
0.16038288176059723,
0.011422421783208847,
-0.1337263286113739,
-0.010647103190422058,
0.2763715386390686,
-0.045990776270627975,
-0.08090661466121674,
0.28254637122154236,
-0.22210940718650818,
-0.13108676671981812,
-0.11670665442943573,
-0.3198568820953369,
-0.179243266582489,
-0.045900993049144745,
0.2899854779243469,
-0.20031560957431793,
0.07381020486354828,
0.28041765093803406,
-0.014679718762636185,
-0.023228133097290993,
-0.04180971533060074,
-0.22650563716888428,
-0.40616679191589355,
-0.38542497158050537,
0.18678069114685059,
-0.41112497448921204,
-0.4877204895019531,
-0.10637254267930984,
0.1428385227918625,
-0.03237857669591904,
-0.0060820505023002625,
-0.47621309757232666,
-0.0013863630592823029,
-0.031361110508441925,
0.17597904801368713,
0.021223971620202065,
0.12813173234462738,
0.13371001183986664,
-0.26074111461639404,
0.15800729393959045,
-0.29099926352500916,
-0.32525667548179626,
0.11209481954574585,
0.17545291781425476,
-0.057383373379707336,
-0.028743907809257507,
0.43891361355781555,
-0.12308969348669052,
0.41652345657348633,
0.3598586320877075,
0.1371854692697525,
0.3457089066505432,
-0.25606444478034973,
0.5934515595436096,
-0.2602158784866333,
-0.28449687361717224,
0.041870176792144775,
-0.3534144163131714,
-0.13328580558300018,
0.40917569398880005,
-0.05039282143115997,
0.1678646057844162,
0.146378293633461,
0.019384555518627167,
-0.36231449246406555,
-0.3481951355934143,
0.26734113693237305,
-0.05594589561223984,
0.089724101126194,
0.05659153312444687,
0.1827598512172699,
-0.02427612617611885,
-0.12784047424793243,
0.0897882804274559,
0.3554983139038086,
0.2812337279319763,
0.13734446465969086,
-0.37124213576316833,
-0.1424160897731781,
-0.4037279486656189,
0.13164076209068298,
0.14616701006889343,
0.3755365312099457,
-0.03975418210029602,
0.025833286345005035,
0.0995810404419899,
-0.14252400398254395,
0.7694875597953796,
0.16056686639785767,
0.08269523084163666,
0.12565426528453827,
-0.21879258751869202,
-0.41907769441604614,
-0.1828237622976303,
0.05364470183849335,
0.13683007657527924,
0.021788563579320908,
0.3300580680370331,
-0.16625379025936127,
-0.30278390645980835,
0.08148379623889923,
0.3931148052215576,
-0.2834912836551666,
-0.13927724957466125,
-0.2779432237148285,
-0.2761235535144806,
-0.11870568990707397,
-0.114048533141613,
0.10456742346286774,
0.010868716984987259,
-0.1787356734275818,
0.08092942833900452,
0.15261080861091614,
0.11208520084619522,
0.046161726117134094,
-0.047526951879262924,
0.3379155993461609,
0.13038486242294312,
0.10220220685005188,
0.2396431267261505,
0.15417610108852386,
0.18765105307102203,
0.7116137742996216,
-0.17947745323181152,
-0.6064417958259583,
0.014548547565937042,
-0.3207772970199585,
0.2285143882036209,
0.3521009385585785,
-0.13337650895118713,
0.15704917907714844,
0.25494521856307983,
0.03489180654287338,
-0.3648008704185486,
-0.1175137460231781,
0.36439311504364014,
0.12048287689685822,
-0.24822643399238586,
-0.32467779517173767,
0.4003954529762268,
-0.18882307410240173,
0.1008923351764679,
0.24206694960594177,
0.4092300534248352,
-0.2025240957736969,
0.36756107211112976,
-0.1073383167386055,
0.6756740212440491,
0.03922140225768089,
0.43946394324302673,
0.5818983316421509,
-0.49076032638549805,
0.3381574749946594,
0.08918644487857819,
-0.1633264571428299,
-0.5192140340805054,
0.008730318397283554,
-0.1086038202047348,
0.04070304334163666,
0.06381934881210327,
-0.04598873108625412,
-0.07545828819274902,
0.4005906879901886,
-0.3110983967781067,
0.34388023614883423,
-0.12406985461711884,
-0.17651629447937012,
-0.0483974888920784,
-0.38316184282302856,
-0.3256106376647949,
-0.007494501769542694,
0.07357311248779297,
0.2758233845233917,
-0.24777057766914368,
-0.027051769196987152,
0.021553553640842438,
-0.15326783061027527,
-0.27843326330184937,
0.11661617457866669,
-0.1499241590499878,
-0.03368361294269562,
0.02370179072022438,
-0.4501405954360962,
0.14284636080265045,
0.335452139377594,
0.30253875255584717,
-0.04801325127482414,
-0.004390956833958626,
-0.019323833286762238,
0.02470998838543892,
0.225765198469162,
-0.16841019690036774,
-0.2242463231086731,
0.224397212266922,
0.1272003948688507,
-0.19332681596279144,
-0.19889453053474426,
-0.1279827207326889,
0.13723450899124146,
0.04241439700126648,
0.20799265801906586,
-0.1040399968624115,
-0.4001534879207611,
-0.3382284641265869,
-0.01993008702993393,
0.28074681758880615,
-0.21831493079662323,
-0.01370899099856615,
0.014559982344508171,
0.017715688794851303,
-0.040068842470645905,
-0.03577452525496483,
-0.34883439540863037,
-0.15692903101444244,
0.2794687747955322,
-0.20779989659786224,
-0.07843896001577377,
0.5283570885658264,
0.36771926283836365,
-0.29968276619911194,
-0.13670183718204498,
0.2349860519170761,
0.34194642305374146,
-0.8273352384567261,
0.13999232649803162,
-0.1280221790075302,
0.3436542749404907,
-0.22931435704231262,
0.2210390567779541,
0.15534445643424988,
-0.3406282365322113,
0.05671681463718414,
-0.37895768880844116,
0.02713467925786972,
-0.10044309496879578,
0.01737814210355282,
-0.14836709201335907,
0.34607046842575073,
0.08371227979660034,
-0.005831442773342133,
-0.14059114456176758,
-0.1603849083185196,
0.3000112771987915,
0.2224499136209488,
0.06555494666099548,
0.2537255585193634,
0.1363941729068756,
0.23343060910701752,
-0.3705470860004425,
0.0027747079730033875,
0.11014348268508911,
-0.17505699396133423,
-0.09196679294109344,
-0.6422078609466553,
0.21145287156105042,
0.0012133754789829254,
-0.15691763162612915,
0.14837104082107544,
0.11446844041347504,
-0.012593084946274757,
-0.32185789942741394,
0.379477858543396,
0.5154989957809448,
0.026653777807950974,
0.13051526248455048,
-0.009099980816245079,
0.11311926692724228,
-0.2342911809682846,
-0.02237527072429657,
0.2534387707710266,
0.5181381702423096,
0.10918746888637543,
0.12082070112228394,
-0.27654120326042175,
-0.05452999472618103,
-0.20950229465961456,
0.2079695612192154,
0.09411947429180145,
0.17658787965774536,
0.23472198843955994,
-0.4291131794452667,
0.2828431725502014,
0.05349337309598923,
0.5056519508361816,
0.23439112305641174,
-0.24443337321281433,
-0.04568219184875488,
0.09191073477268219,
0.03679206222295761,
0.037905506789684296,
0.005161900073289871,
0.1334647238254547,
0.07206720113754272,
-0.18679603934288025,
0.2280508279800415,
0.3055325746536255,
-0.0026510655879974365,
0.22447437047958374,
-0.0997200757265091,
0.2624322772026062,
-0.00001555308699607849,
0.0730513483285904,
0.38091862201690674,
-0.004568189382553101,
0.5078549981117249,
0.17117851972579956,
0.054047659039497375,
0.14223502576351166,
0.2829630970954895,
0.21491089463233948,
0.014728916808962822,
0.24524104595184326,
0.4976073205471039,
-0.12713348865509033,
-0.6350255012512207,
-0.02201300673186779,
0.08726410567760468,
-0.10335639119148254,
0.420226514339447,
0.27270177006721497,
0.5660048723220825,
-0.14235134422779083,
-0.21018736064434052,
-0.027096334844827652,
0.22291302680969238,
-0.2509670853614807,
-0.2061121165752411,
0.040547341108322144,
-0.03804662078619003,
-0.0673644170165062,
0.2469426989555359,
-0.22309164702892303,
-0.074600949883461,
0.15248115360736847,
0.16813254356384277,
-0.04335771128535271,
-0.33866745233535767,
0.00130409374833107,
-0.16412431001663208,
0.19600725173950195,
-0.1895045042037964,
0.2839502692222595,
0.24163907766342163,
-0.03322179988026619,
0.09074220061302185,
0.15316103398799896,
0.4331686794757843,
0.09066756069660187,
0.3003101944923401,
0.007852338254451752,
0.03055432438850403,
0.22756710648536682,
0.1683902144432068,
0.12339301407337189,
0.028938205912709236,
0.03898261487483978,
0.34974250197410583,
0.05932513624429703,
0.011815160512924194,
0.22973980009555817,
0.4036106467247009,
0.07090060412883759,
-0.27172738313674927,
-0.022635500878095627,
-0.20139923691749573,
0.06840206682682037,
-0.49533236026763916,
-0.04277456924319267,
-0.19789502024650574,
0.20622342824935913,
0.38907942175865173,
0.09566950798034668,
0.3372890055179596,
0.10442174226045609,
0.027236368507146835,
0.34727558493614197,
0.2769831120967865,
0.300324946641922,
0.21801744401454926,
-0.26804107427597046,
-0.0024334192276000977,
-0.4933232069015503,
0.19392748177051544,
-0.06355451047420502,
0.3334476947784424,
0.09942285716533661,
0.09808214753866196,
0.2627609968185425,
0.08678709715604782,
0.20712152123451233,
-0.14977896213531494,
-0.009161215275526047,
0.14954742789268494,
-0.030772924423217773,
-0.16318202018737793,
-0.0700162947177887,
0.13385339081287384,
-0.21600781381130219,
-0.32937437295913696,
0.2364753633737564,
0.04388388991355896,
-0.11087101697921753,
-0.24412593245506287,
0.18076138198375702,
-0.41099298000335693,
-0.2757514715194702,
0.4078647494316101,
0.23598508536815643,
0.09686460345983505,
-0.32596245408058167,
-0.18356987833976746,
-0.07955530285835266,
-0.056969042867422104,
0.0327126681804657,
0.3804573714733124,
-0.1713770627975464,
0.3264869451522827,
0.011266052722930908,
-0.42180538177490234,
-0.25400498509407043,
0.22401422262191772,
0.2547236680984497,
0.06234925240278244,
-0.30689430236816406,
0.3508031964302063,
-0.1272847205400467,
-0.2665928304195404,
0.24038349092006683,
0.6712567806243896,
-0.1461404263973236,
0.24826735258102417,
-0.01646728813648224,
-0.15604212880134583,
0.2652606964111328,
-0.4096328020095825,
-0.2621384859085083,
0.1799159049987793,
0.16525942087173462,
0.3497146964073181,
-0.3592226803302765,
-0.48163577914237976,
0.210446298122406,
0.2207917869091034,
-0.2128067910671234,
-0.15733861923217773,
0.05441439151763916,
-0.2609895169734955,
-0.11416207998991013,
-0.07306115329265594,
0.6406539678573608,
0.3980974555015564,
-0.401930570602417,
0.3418284058570862,
-0.4393019378185272
] |
https://github.com/huggingface/datasets/issues/6599 | Hi! Non-generic data processing is out of this library's scope, so it's downstream libraries/users' responsibility to implement such logic. | Easy way to segment into 30s snippets given an m4a file and a vtt file | ### Feature request
Uploading datasets is straightforward thanks to the ability to push Audio to hub. However, it would be nice if the data (text and audio) could be segmented when being pushed (if not possible already).
### Motivation
It's easy to create a vtt file from an audio file. If there could be auto-segmenting, this would make the creation of datasets much faster.
### Your contribution
I have made a custom script to do this but it's not all that clean - uses librosa and pydub. | 19 | Easy way to segment into 30s snippets given an m4a file and a vtt file
### Feature request
Uploading datasets is straightforward thanks to the ability to push Audio to hub. However, it would be nice if the data (text and audio) could be segmented when being pushed (if not possible already).
### Motivation
It's easy to create a vtt file from an audio file. If there could be auto-segmenting, this would make the creation of datasets much faster.
### Your contribution
I have made a custom script to do this but it's not all that clean - uses librosa and pydub.
Hi! Non-generic data processing is out of this library's scope, so it's downstream libraries/users' responsibility to implement such logic. | [
-0.650300920009613,
-0.3339020013809204,
-0.1150285005569458,
-0.06848037242889404,
0.23705556988716125,
-0.3140990436077118,
0.5622481107711792,
0.4451252222061157,
-0.5105161666870117,
0.2401493936777115,
-0.3567483723163605,
-0.044706277549266815,
-0.3566725254058838,
0.3612205386161804,
0.17482756078243256,
-0.21636544167995453,
-0.04710666835308075,
0.2412843406200409,
-0.10636937618255615,
0.08343669772148132,
0.1805257797241211,
-0.1064395159482956,
-0.06609845161437988,
-0.3520064949989319,
-0.17882251739501953,
0.16914384067058563,
-0.1363932192325592,
-0.05081084743142128,
0.008968222886323929,
-0.1361893266439438,
-0.34734001755714417,
-0.05211351439356804,
0.515807569026947,
0.4786275029182434,
-0.00011409083526814356,
-0.37441253662109375,
-0.15224871039390564,
-0.18008655309677124,
-0.14255686104297638,
0.4701499938964844,
-0.034879736602306366,
-0.16612055897712708,
-0.3724393844604492,
-0.09934473037719727,
-0.05433167144656181,
0.01431482657790184,
-0.07117465883493423,
-0.32331255078315735,
0.5660894513130188,
0.3362397253513336,
0.0564597025513649,
0.09165813028812408,
-0.37761762738227844,
-0.013338176533579826,
0.38829484581947327,
0.13331544399261475,
-0.04324246570467949,
0.16228504478931427,
0.518498420715332,
0.26452118158340454,
-0.1403944194316864,
0.31094270944595337,
-0.015539254993200302,
-0.06891762465238571,
0.4620518982410431,
-0.13257232308387756,
-0.09196668863296509,
-0.41904038190841675,
-0.007035214453935623,
0.43041881918907166,
0.6780226826667786,
-0.10481840372085571,
-0.2251751720905304,
-0.35828274488449097,
-0.0914837121963501,
-0.12405939400196075,
-0.3070719242095947,
0.421036958694458,
-0.07699541747570038,
0.154265359044075,
-0.08769871294498444,
-0.253761887550354,
-0.15124855935573578,
-0.06034404784440994,
0.21985077857971191,
0.10649308562278748,
-0.09696239978075027,
-0.32801318168640137,
0.26244720816612244,
-0.15097694098949432,
0.21457543969154358,
-0.03508756309747696,
-0.08045385777950287,
0.623782753944397,
-0.020076874643564224,
-0.39702993631362915,
-0.23501592874526978,
-0.2419845014810562,
0.005550399422645569,
0.16963890194892883,
-0.06375479698181152,
-0.030012337490916252,
-0.1847081482410431,
-0.07980058342218399,
0.07112854719161987,
-0.14766919612884521,
-0.05108550935983658,
-0.015577513724565506,
0.013539540581405163,
-0.2532930374145508,
0.1316104531288147,
-0.03014037199318409,
-0.07707290351390839,
-0.2595067322254181,
0.01735588163137436,
0.17400595545768738,
-0.2618815004825592,
-0.001498490571975708,
-0.22323250770568848,
-0.17574575543403625,
-0.38875409960746765,
-0.22787758708000183,
-0.034054458141326904,
-0.06770389527082443,
-0.08711567521095276,
-0.14050838351249695,
-0.2451399564743042,
0.22692318260669708,
-0.5197254419326782,
-0.1853293776512146,
0.08055202662944794,
0.10589443147182465,
-0.08961565792560577,
0.15673920512199402,
0.13861291110515594,
-0.0727163553237915,
-0.15367604792118073,
0.07165060937404633,
0.29636716842651367,
-0.08188605308532715,
-0.18580392003059387,
0.05341978371143341,
-0.006770327687263489,
-0.07467509806156158,
0.06902121007442474,
0.047730863094329834,
-0.2734068036079407,
0.11794954538345337,
-0.22299803793430328,
0.16072611510753632,
-0.21510565280914307,
-0.0668320506811142,
0.1438121795654297,
0.11788452416658401,
0.059864871203899384,
0.027602486312389374,
0.15291810035705566,
0.2227245271205902,
0.30548325181007385,
-0.26304394006729126,
0.10662683844566345,
0.036536261439323425,
0.14864091575145721,
-0.14398948848247528,
0.14950355887413025,
0.1067943125963211,
-0.4393296539783478,
-0.2709565758705139,
-0.04024819657206535,
0.21721115708351135,
0.2378881573677063,
0.284220814704895,
0.3004916310310364,
0.0748012438416481,
-0.02023141086101532,
0.4874305725097656,
0.10631582885980606,
-0.06107679754495621,
0.25507643818855286,
0.3296099007129669,
-0.327649861574173,
-0.2225547730922699,
-0.05641741678118706,
0.31734809279441833,
0.48787474632263184,
-0.33093005418777466,
0.30612966418266296,
0.42446476221084595,
-0.03991558775305748,
0.09363178163766861,
-0.06395842880010605,
-0.25374460220336914,
-0.2042718529701233,
0.3228467106819153,
0.15469369292259216,
-0.2099711298942566,
0.04501877725124359,
0.1650969386100769,
0.22669683396816254,
-0.28609004616737366,
0.37360191345214844,
0.04928859323263168,
0.5448518991470337,
-0.16599726676940918,
0.0007385425269603729,
-0.6522113680839539,
0.043808020651340485,
-0.26656535267829895,
0.22825965285301208,
-0.03001038357615471,
0.15075944364070892,
-0.27094602584838867,
0.15294967591762543,
-0.33623868227005005,
0.21257305145263672,
0.06806789338588715,
-0.0637216791510582,
-0.06639446318149567,
-0.1434067189693451,
-0.3551325798034668,
-0.15447407960891724,
-0.19050675630569458,
0.42187196016311646,
0.03739914670586586,
-0.020938483998179436,
0.25849616527557373,
0.2002272605895996,
-0.14794348180294037,
0.314145565032959,
0.30812132358551025,
0.006093761883676052,
-0.17815960943698883,
0.2567797303199768,
0.3307936191558838,
0.2915533781051636,
0.07303179055452347,
-0.08901190012693405,
0.5476541519165039,
0.36684489250183105,
-0.14314502477645874,
0.26387107372283936,
-0.26522156596183777,
-0.06291409581899643,
-0.12429982423782349,
-0.20515523850917816,
0.3687271773815155,
-0.3562875986099243,
0.20904353260993958,
0.2329384684562683,
-0.17279700934886932,
-0.10709934681653976,
-0.024141035974025726,
-0.2881987988948822,
0.16181312501430511,
0.031800590455532074,
-0.2678282856941223,
-0.1995624601840973,
0.089914470911026,
-0.2976147532463074,
0.36046525835990906,
0.48314931988716125,
-0.31738734245300293,
-0.023938670754432678,
0.013463006354868412,
-0.255563884973526,
0.061789773404598236,
0.07125402241945267,
-0.059298619627952576,
0.04272780567407608,
0.22944535315036774,
0.23043259978294373,
-0.20566028356552124,
0.253978967666626,
-0.2421163022518158,
0.09946539998054504,
0.047953467816114426,
-0.022873619571328163,
0.2619093358516693,
-0.116651251912117,
0.21620555222034454,
0.2928195297718048,
0.009570449590682983,
-0.24206358194351196,
-0.18317708373069763,
-0.14416304230690002,
0.02416817843914032,
-0.17950624227523804,
-0.14563727378845215,
-0.25687339901924133,
-0.4123844802379608,
-0.06092159077525139,
0.056713469326496124,
0.2057722508907318,
-0.17207369208335876,
-0.11972933262586594,
0.34780892729759216,
0.4306510388851166,
0.52790766954422,
0.001561872661113739,
0.19366441667079926,
0.48265188932418823,
0.1777777075767517,
0.27669063210487366,
0.16360202431678772,
0.21752268075942993,
0.4782440960407257,
-0.020742641761898994,
0.11240757256746292,
0.1962909996509552,
-0.1830856204032898,
0.007575564086437225,
0.10005806386470795,
0.08442467451095581,
0.18937738239765167,
-0.1107877790927887,
0.17331522703170776,
0.06110107898712158,
-0.3540111184120178,
-0.3355686068534851,
0.11208244413137436,
0.005979709327220917,
-0.10657545924186707,
0.08286361396312714,
-0.12649187445640564,
-0.2619609534740448,
0.06763105094432831,
-0.30785971879959106,
-0.4733812212944031,
0.20935243368148804,
0.24794989824295044,
0.06314616650342941,
-0.072882279753685,
-0.05464259907603264,
-0.10804656147956848,
0.26327505707740784,
-0.26722452044487,
0.13180094957351685,
0.3672668933868408,
0.27618876099586487,
-0.4933148920536041,
-0.062269311398267746,
-0.04356173053383827,
0.06505043804645538,
-0.14765654504299164,
0.1463814675807953,
0.019711747765541077,
0.2070411592721939,
-0.08745241910219193,
0.23369835317134857,
-0.33035433292388916,
0.25115135312080383,
0.14217248558998108,
-0.0696430653333664,
0.03319861739873886,
-0.15178126096725464,
0.44127070903778076,
-0.05054893717169762,
0.08221311867237091,
-0.0874674916267395,
-0.10906121134757996,
0.09955354034900665,
0.041935086250305176,
0.9014589786529541,
0.4815671741962433,
-0.07728654146194458,
-0.11214864253997803,
-0.058849744498729706,
-0.12129068374633789,
-0.21093270182609558,
0.08688616752624512,
0.36611512303352356,
0.12507861852645874,
-0.20830924808979034,
0.49095794558525085,
0.1633085012435913,
-0.07838420569896698,
-0.0030729249119758606,
-0.0490865483880043,
-0.23638968169689178,
-0.25680047273635864,
0.37978050112724304,
-0.12651878595352173,
0.19346246123313904,
-0.20918047428131104,
-0.01952367275953293,
-0.010365378111600876,
-0.10164117813110352,
0.11467282474040985,
0.11908947676420212,
0.39698532223701477,
-0.0034289024770259857,
-0.2620130181312561,
0.15433406829833984,
-0.16181349754333496,
-0.15621112287044525,
0.358978807926178,
-0.0844620019197464,
-0.11673323065042496,
-0.46874716877937317,
-0.25570812821388245,
-0.014812387526035309,
-0.03300231322646141,
-0.20452190935611725,
-0.14295560121536255,
-0.2317722737789154,
0.350945383310318,
0.17347511649131775,
0.07704931497573853,
-0.27399909496307373,
-0.019313357770442963,
0.3932325541973114,
0.3888900876045227,
-0.3873754143714905,
-0.10272572934627533,
0.23394304513931274,
0.09609567373991013,
0.12301532924175262,
-0.027046848088502884,
0.21144452691078186,
0.4408664107322693,
-0.1971208155155182,
0.004172384738922119,
0.4691706597805023,
0.13649994134902954,
-0.18290594220161438,
-0.2049630880355835,
0.381390243768692,
-0.15988722443580627,
0.3506401479244232,
-0.1971050202846527,
0.11255140602588654,
-0.017395827919244766,
0.3976280689239502,
-0.0849585235118866,
-0.3605005443096161,
0.36778825521469116,
0.13666757941246033,
-0.04855271428823471,
-0.09323908388614655,
0.2744540572166443,
-0.16456307470798492,
0.5622820258140564,
0.2915160059928894,
0.4103389084339142,
0.15766042470932007,
0.030998289585113525,
0.3299481272697449,
-0.4832443296909332,
-0.2069525569677353,
-0.17196162045001984,
0.0607212670147419,
-0.5413771867752075,
-0.2403411865234375,
0.2845694422721863,
-0.4743131995201111,
0.05772571265697479,
-0.2171734869480133,
0.04062620550394058,
-0.141474187374115,
0.20608942210674286,
0.08278632164001465,
1.125180959701538,
0.3540397882461548,
0.06621874123811722,
-0.057042405009269714,
0.11871756613254547,
-0.02768820896744728,
-0.5274684429168701,
-0.0947623997926712,
-0.20706291496753693,
-0.12397059798240662,
-0.03247980773448944,
-0.14401766657829285,
-0.3729734420776367,
0.15855512022972107,
-0.25212791562080383,
-0.20084911584854126,
-0.013736560940742493,
0.31935784220695496,
-0.2230873703956604,
0.048201389610767365,
-0.3352689743041992,
-0.2239384651184082,
0.15071964263916016,
0.06285341829061508,
-0.11887669563293457,
-0.017515946179628372,
0.009960807859897614,
-0.40777671337127686,
-0.09138830751180649,
0.16899429261684418,
-0.33228084444999695,
0.13207989931106567,
0.1800784468650818,
-0.2339259386062622,
0.08478770405054092,
0.07385692000389099,
0.09242461621761322,
-0.10384131968021393,
0.162467822432518,
0.3864453434944153,
0.032980598509311676,
0.16615085303783417,
-0.20041999220848083,
0.22839200496673584,
0.026050128042697906,
-0.06280843168497086,
0.21969793736934662,
-0.1456555724143982,
0.06173524260520935,
-0.06906434893608093,
0.17879873514175415,
-0.020522907376289368,
-0.035457536578178406,
-0.19183114171028137,
-0.21402902901172638,
-0.18492503464221954,
-0.07146292924880981,
0.18682244420051575,
0.08501369506120682,
0.055746257305145264,
0.0694539025425911,
0.28305989503860474,
-0.19118309020996094,
-0.03436146676540375,
0.20774996280670166,
0.1258063167333603,
-0.1797659546136856,
0.0038293711841106415,
0.001848248764872551,
-0.3109080493450165,
0.06720755994319916,
0.5004638433456421,
-0.4328727722167969,
-0.22718822956085205,
0.44135165214538574,
0.1954931616783142,
-0.42616912722587585,
0.04427061229944229,
-0.28860121965408325,
-0.019637197256088257,
0.25644004344940186,
0.011158004403114319,
0.13738015294075012,
-0.011904891580343246,
-0.2952733635902405,
-0.256985068321228,
0.03330817073583603,
0.2620466351509094,
-0.05073956772685051,
0.21761208772659302,
-0.34990647435188293,
0.0660824328660965,
-0.16212454438209534,
0.3928185999393463,
-0.2635476291179657,
0.12175940722227097,
0.13977649807929993,
0.27274981141090393,
-0.42858216166496277,
-0.2732764780521393,
-0.09586428850889206,
-0.12752313911914825,
-0.04719306528568268,
0.34222859144210815,
-0.47892123460769653,
-0.0736125111579895,
-0.18036800622940063,
0.1468813419342041,
0.1796884536743164,
-0.08231181651353836,
0.08946048468351364,
-0.01734485849738121,
-0.3505603075027466,
-0.3310580253601074,
0.21994920074939728,
-0.10766905546188354,
-0.03701896592974663,
-0.2289818674325943,
0.8799400925636292,
0.03802803158760071,
0.09121182560920715,
0.21854592859745026,
0.22030407190322876,
0.26413047313690186,
-0.12218868732452393,
0.03901113197207451,
-0.0037013553082942963,
-0.0008286908268928528,
0.041597869247198105,
0.43310073018074036,
0.8353452086448669,
-0.10932528972625732,
-0.016028322279453278,
0.0037950025871396065,
0.055375248193740845,
0.001940123736858368,
0.29447126388549805,
0.2592102885246277,
-0.011769991368055344,
0.08643493056297302,
0.16979560256004333,
0.24517284333705902,
0.14137311279773712,
0.024145152419805527,
-0.18000471591949463,
-0.23179255425930023,
0.0013986453413963318,
0.2369963526725769,
-0.05487526208162308,
0.28733929991722107,
0.30596810579299927,
0.04566185921430588,
-0.02127968519926071,
-0.19553616642951965,
0.03716287761926651,
0.6184564828872681,
-0.0074818432331085205,
0.010406727902591228,
-0.07355470210313797,
-0.22974173724651337,
0.182817280292511,
0.3670935332775116,
-0.540108323097229,
-0.2458576112985611,
0.6154550909996033,
-0.20056743919849396,
0.153896301984787,
-0.2697792053222656,
-0.6976853609085083,
0.16080869734287262,
0.10924328863620758,
0.30375850200653076,
0.5157368183135986,
0.11454189568758011,
-0.06128918379545212,
-0.18599101901054382,
0.11230350285768509,
0.1493961364030838,
0.07026691734790802,
0.14213091135025024,
-0.020960383117198944,
-0.14345663785934448,
-0.48431092500686646,
-0.06911591440439224,
0.029229089617729187,
0.005826088599860668,
0.0029514282941818237,
0.23731955885887146,
0.46924889087677,
0.32974258065223694,
0.03303692862391472,
-0.1532488763332367,
0.211128830909729,
-0.20017248392105103,
-0.1986188143491745,
0.03548439219594002,
0.34071192145347595,
0.15797199308872223,
-0.2528550624847412,
0.11640264093875885,
0.01105525717139244,
-0.3403329849243164,
0.2806645631790161,
-0.10555372387170792,
0.009534172713756561,
0.2718203663825989,
0.10303414613008499,
0.12910595536231995,
0.33379265666007996,
0.2826397716999054,
0.08879175037145615,
-0.16690433025360107,
0.20807676017284393,
-0.08705677092075348,
-0.298677921295166,
-0.3004732131958008,
0.1724284291267395,
-0.1276860386133194,
-0.07746971398591995,
-0.42216968536376953,
-0.3521699011325836,
-0.2737901210784912,
0.11047182977199554,
-0.01485313381999731,
-0.4286421537399292,
-0.10604240000247955,
0.11710913479328156,
0.06262558698654175,
-0.20863236486911774,
0.28657224774360657,
0.26760703325271606,
0.18103837966918945,
0.18497012555599213,
-0.11847319453954697,
-0.13825415074825287,
-0.29366692900657654,
-0.011298893950879574,
0.15375010669231415,
-0.07792453467845917,
0.04181011766195297,
0.31773829460144043,
0.488362580537796,
-0.10046758502721786,
0.016763836145401,
0.13668668270111084,
0.49532225728034973,
-0.41116148233413696,
0.1734534353017807,
0.13374564051628113,
0.31551963090896606,
-0.024991191923618317,
-0.1783190369606018,
0.11558836698532104,
0.00878504291176796,
-0.007964454591274261,
0.17739832401275635,
-0.058949097990989685,
0.23181268572807312,
-0.45529866218566895,
0.28753212094306946,
-0.21161599457263947,
0.2123643010854721,
-0.21397703886032104,
-0.18711644411087036,
-0.08668458461761475,
-0.06012190878391266,
0.04774019867181778,
-0.07612920552492142,
0.26748812198638916,
0.6046268939971924,
-0.1113104522228241,
0.17240743339061737,
-0.18695908784866333,
0.19298726320266724,
-0.22469733655452728,
0.35300031304359436,
-0.04289707541465759,
-0.02305503562092781,
-0.29720520973205566,
0.025079309940338135,
0.24469347298145294,
-0.08631294220685959,
-0.045156080275774,
-0.0010337531566619873,
-0.14009016752243042,
-0.4342041611671448,
0.2535113990306854,
-0.2615125775337219,
-0.23920969665050507,
-0.13489842414855957,
0.14668166637420654,
0.31133729219436646,
0.09234534949064255,
-0.44220590591430664,
-0.027728073298931122,
0.20163391530513763,
-0.2281321883201599,
0.07676926255226135,
0.2343183308839798,
0.14524619281291962,
-0.3030179738998413,
-0.07793476432561874,
0.2481134831905365,
0.12595757842063904,
-0.1538999378681183,
-0.10963211953639984,
-0.5992887020111084
] |
https://github.com/huggingface/datasets/issues/6598 | I am facing similar issue while reading a csv file from s3. Wondering if somebody has found a workaround. | Unexpected keyword argument 'hf' when downloading CSV dataset from S3 | ### Describe the bug
I receive this error message when using `load_dataset` with "csv" path and `dataset_files=s3://...`:
```
TypeError: Session.__init__() got an unexpected keyword argument 'hf'
```
I found a similar issue here: https://stackoverflow.com/questions/77596258/aws-issue-load-dataset-from-s3-fails-with-unexpected-keyword-argument-error-in
Full stacktrace:
```
.../site-packages/datasets/load.py:2549: in load_dataset
builder_instance.download_and_prepare(
.../site-packages/datasets/builder.py:1005: in download_and_prepare
self._download_and_prepare(
.../site-packages/datasets/builder.py:1078: in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
.../site-packages/datasets/packaged_modules/csv/csv.py:147: in _split_generators
data_files = dl_manager.download_and_extract(self.config.data_files)
.../site-packages/datasets/download/download_manager.py:562: in download_and_extract
return self.extract(self.download(url_or_urls))
.../site-packages/datasets/download/download_manager.py:426: in download
downloaded_path_or_paths = map_nested(
.../site-packages/datasets/utils/py_utils.py:466: in map_nested
mapped = [
.../site-packages/datasets/utils/py_utils.py:467: in <listcomp>
_single_map_nested((function, obj, types, None, True, None))
.../site-packages/datasets/utils/py_utils.py:387: in _single_map_nested
mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar]
.../site-packages/datasets/utils/py_utils.py:387: in <listcomp>
mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar]
.../site-packages/datasets/utils/py_utils.py:370: in _single_map_nested
return function(data_struct)
.../site-packages/datasets/download/download_manager.py:451: in _download
out = cached_path(url_or_filename, download_config=download_config)
.../site-packages/datasets/utils/file_utils.py:188: in cached_path
output_path = get_from_cache(
...1/site-packages/datasets/utils/file_utils.py:511: in get_from_cache
response = fsspec_head(url, storage_options=storage_options)
.../site-packages/datasets/utils/file_utils.py:316: in fsspec_head
fs, _, paths = fsspec.get_fs_token_paths(url, storage_options=storage_options)
.../site-packages/fsspec/core.py:622: in get_fs_token_paths
fs = filesystem(protocol, **inkwargs)
.../site-packages/fsspec/registry.py:290: in filesystem
return cls(**storage_options)
.../site-packages/fsspec/spec.py:79: in __call__
obj = super().__call__(*args, **kwargs)
.../site-packages/s3fs/core.py:187: in __init__
self.s3 = self.connect()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <s3fs.core.S3FileSystem object at 0x1500a1310>, refresh = True
def connect(self, refresh=True):
"""
Establish S3 connection object.
Parameters
----------
refresh : bool
Whether to create new session/client, even if a previous one with
the same parameters already exists. If False (default), an
existing one will be used if possible
"""
if refresh is False:
# back compat: we store whole FS instance now
return self.s3
anon, key, secret, kwargs, ckwargs, token, ssl = (
self.anon, self.key, self.secret, self.kwargs,
self.client_kwargs, self.token, self.use_ssl)
if not self.passed_in_session:
> self.session = botocore.session.Session(**self.kwargs)
E TypeError: Session.__init__() got an unexpected keyword argument 'hf'
```
### Steps to reproduce the bug
1. Assuming a valid CSV file located at `s3://bucket/data.csv`
2. Run the below code:
```
storage_options = {
"key": "...",
"secret": "...",
"client_kwargs": {
"endpoint_url": "...",
}
}
load_dataset("csv", data_files="s3://bucket/data.csv", storage_options=storage_options)
```
Encountered in version `2.16.1` but also reproduced in `2.16.0` and `2.15.0`.
Note: I encountered this in a unit test using a `moto` mock for S3, however since the error occurs before the session is instantiated, it should not be the issue.
### Expected behavior
No exception is raised, the boto3 session is created successfully, and the CSV file is downloaded successfully and returned as a dataset.
===
After some research I found that `DownloadConfig` has a `__post_init__` method that always forces this value to be set in its `storage_options`, even though in case of an S3 location the storage options get passed on to the S3 Session which does not expect this parameter. I assume this parameter is needed when reading from the huggingface hub and should not be set in this context.
Unfortunately there is nothing the user can do to work around it. Even if you manually do something like:
```
download_config = DownloadConfig()
del download_config.storage_options["hf"]
load_dataset("csv", data_files="s3://bucket/data.csv", download_config=download_config)
```
the library will still reinsert this parameter when `download_config = self.download_config.copy()` in line 418 of `download_manager.py` (`DownloadManager.download`).
Therefore `load_dataset` currently cannot be used to read a dataset in CSV format from an S3 location.
### Environment info
- `datasets` version: 2.16.1
- Platform: macOS-14.2.1-arm64-arm-64bit
- Python version: 3.11.7
- `huggingface_hub` version: 0.20.2
- PyArrow version: 14.0.2
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0
| 19 | Unexpected keyword argument 'hf' when downloading CSV dataset from S3
### Describe the bug
I receive this error message when using `load_dataset` with "csv" path and `dataset_files=s3://...`:
```
TypeError: Session.__init__() got an unexpected keyword argument 'hf'
```
I found a similar issue here: https://stackoverflow.com/questions/77596258/aws-issue-load-dataset-from-s3-fails-with-unexpected-keyword-argument-error-in
Full stacktrace:
```
.../site-packages/datasets/load.py:2549: in load_dataset
builder_instance.download_and_prepare(
.../site-packages/datasets/builder.py:1005: in download_and_prepare
self._download_and_prepare(
.../site-packages/datasets/builder.py:1078: in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
.../site-packages/datasets/packaged_modules/csv/csv.py:147: in _split_generators
data_files = dl_manager.download_and_extract(self.config.data_files)
.../site-packages/datasets/download/download_manager.py:562: in download_and_extract
return self.extract(self.download(url_or_urls))
.../site-packages/datasets/download/download_manager.py:426: in download
downloaded_path_or_paths = map_nested(
.../site-packages/datasets/utils/py_utils.py:466: in map_nested
mapped = [
.../site-packages/datasets/utils/py_utils.py:467: in <listcomp>
_single_map_nested((function, obj, types, None, True, None))
.../site-packages/datasets/utils/py_utils.py:387: in _single_map_nested
mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar]
.../site-packages/datasets/utils/py_utils.py:387: in <listcomp>
mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar]
.../site-packages/datasets/utils/py_utils.py:370: in _single_map_nested
return function(data_struct)
.../site-packages/datasets/download/download_manager.py:451: in _download
out = cached_path(url_or_filename, download_config=download_config)
.../site-packages/datasets/utils/file_utils.py:188: in cached_path
output_path = get_from_cache(
...1/site-packages/datasets/utils/file_utils.py:511: in get_from_cache
response = fsspec_head(url, storage_options=storage_options)
.../site-packages/datasets/utils/file_utils.py:316: in fsspec_head
fs, _, paths = fsspec.get_fs_token_paths(url, storage_options=storage_options)
.../site-packages/fsspec/core.py:622: in get_fs_token_paths
fs = filesystem(protocol, **inkwargs)
.../site-packages/fsspec/registry.py:290: in filesystem
return cls(**storage_options)
.../site-packages/fsspec/spec.py:79: in __call__
obj = super().__call__(*args, **kwargs)
.../site-packages/s3fs/core.py:187: in __init__
self.s3 = self.connect()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <s3fs.core.S3FileSystem object at 0x1500a1310>, refresh = True
def connect(self, refresh=True):
"""
Establish S3 connection object.
Parameters
----------
refresh : bool
Whether to create new session/client, even if a previous one with
the same parameters already exists. If False (default), an
existing one will be used if possible
"""
if refresh is False:
# back compat: we store whole FS instance now
return self.s3
anon, key, secret, kwargs, ckwargs, token, ssl = (
self.anon, self.key, self.secret, self.kwargs,
self.client_kwargs, self.token, self.use_ssl)
if not self.passed_in_session:
> self.session = botocore.session.Session(**self.kwargs)
E TypeError: Session.__init__() got an unexpected keyword argument 'hf'
```
### Steps to reproduce the bug
1. Assuming a valid CSV file located at `s3://bucket/data.csv`
2. Run the below code:
```
storage_options = {
"key": "...",
"secret": "...",
"client_kwargs": {
"endpoint_url": "...",
}
}
load_dataset("csv", data_files="s3://bucket/data.csv", storage_options=storage_options)
```
Encountered in version `2.16.1` but also reproduced in `2.16.0` and `2.15.0`.
Note: I encountered this in a unit test using a `moto` mock for S3, however since the error occurs before the session is instantiated, it should not be the issue.
### Expected behavior
No exception is raised, the boto3 session is created successfully, and the CSV file is downloaded successfully and returned as a dataset.
===
After some research I found that `DownloadConfig` has a `__post_init__` method that always forces this value to be set in its `storage_options`, even though in case of an S3 location the storage options get passed on to the S3 Session which does not expect this parameter. I assume this parameter is needed when reading from the huggingface hub and should not be set in this context.
Unfortunately there is nothing the user can do to work around it. Even if you manually do something like:
```
download_config = DownloadConfig()
del download_config.storage_options["hf"]
load_dataset("csv", data_files="s3://bucket/data.csv", download_config=download_config)
```
the library will still reinsert this parameter when `download_config = self.download_config.copy()` in line 418 of `download_manager.py` (`DownloadManager.download`).
Therefore `load_dataset` currently cannot be used to read a dataset in CSV format from an S3 location.
### Environment info
- `datasets` version: 2.16.1
- Platform: macOS-14.2.1-arm64-arm-64bit
- Python version: 3.11.7
- `huggingface_hub` version: 0.20.2
- PyArrow version: 14.0.2
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0
I am facing similar issue while reading a csv file from s3. Wondering if somebody has found a workaround. | [
0.05472029000520706,
-0.3772714138031006,
0.010761946439743042,
0.1927299201488495,
0.10700391232967377,
-0.1065262109041214,
0.39194580912590027,
0.10678645968437195,
0.04045405983924866,
-0.0982537716627121,
0.05330744385719299,
0.23410926759243011,
0.11373177170753479,
0.24079617857933044,
-0.08675950765609741,
0.10837613791227341,
0.27862995862960815,
0.07190089672803879,
-0.3322984278202057,
0.006894923746585846,
-0.4870143234729767,
0.36632683873176575,
-0.2785685062408447,
-0.05112985894083977,
0.2517607808113098,
0.12283814698457718,
-0.2287852168083191,
0.22358277440071106,
0.011222880333662033,
-0.4716825783252716,
0.3009051978588104,
0.1716405600309372,
0.3088865280151367,
0.46098431944847107,
-0.00011717282177414745,
-0.1685604304075241,
0.09041863679885864,
-0.02271709218621254,
-0.45942366123199463,
-0.31002503633499146,
-0.5226458311080933,
0.10284925252199173,
-0.05050119012594223,
-0.2098807394504547,
0.11996175348758698,
0.24536533653736115,
-0.2566124200820923,
-0.060236889868974686,
0.29773128032684326,
0.1907266080379486,
0.1608334630727768,
0.23569217324256897,
-0.512947678565979,
-0.3113895356655121,
0.47876858711242676,
0.2008887380361557,
-0.12401528656482697,
-0.040798310190439224,
-0.08553275465965271,
-0.17433080077171326,
0.19029001891613007,
0.12860067188739777,
-0.2827126383781433,
0.36811572313308716,
0.8289957046508789,
-0.05698901414871216,
-0.26318371295928955,
-0.01951727457344532,
-0.20499277114868164,
0.09577398002147675,
0.5616058111190796,
0.07208507508039474,
-0.3990716338157654,
-0.15840357542037964,
-0.1767038106918335,
-0.2836543023586273,
0.24255815148353577,
0.01660388708114624,
-0.14675460755825043,
0.007444119080901146,
0.15933170914649963,
-0.11188481748104095,
-0.12215983122587204,
0.2932067811489105,
0.10030770301818848,
0.2588723599910736,
-0.16403432190418243,
0.23820330202579498,
0.4359110891819,
-0.09147319197654724,
0.23896710574626923,
-0.35638129711151123,
-0.06269823014736176,
0.07112595438957214,
-0.41139379143714905,
0.13127468526363373,
0.1568640172481537,
0.06501567363739014,
0.05467855930328369,
-0.09738919138908386,
-0.11164076626300812,
-0.2821282148361206,
0.21362781524658203,
0.24104243516921997,
0.15327668190002441,
-0.17990607023239136,
0.1874677985906601,
0.019172262400388718,
-0.12699764966964722,
0.1606496274471283,
0.08915580809116364,
-0.27979129552841187,
-0.06195586174726486,
-0.2766605615615845,
0.11347156763076782,
-0.03124327026307583,
0.25318196415901184,
-0.22488164901733398,
-0.3680911064147949,
0.011340241879224777,
-0.1367107778787613,
-0.1157359704375267,
-0.2792420983314514,
0.4341071844100952,
0.05222101882100105,
0.023771435022354126,
0.14774003624916077,
0.3966388404369354,
-0.18225467205047607,
-0.2194962203502655,
-0.02685868740081787,
0.07922853529453278,
-0.27119654417037964,
0.03960287570953369,
-0.04782641679048538,
-0.1790638118982315,
-0.024677293375134468,
0.3143332302570343,
0.09861330687999725,
-0.11223316192626953,
-0.043132126331329346,
-0.06615777313709259,
0.03068651631474495,
-0.04087435454130173,
0.19233646988868713,
0.42588770389556885,
0.09402699768543243,
0.16952309012413025,
0.07265694439411163,
-0.01641591265797615,
-0.3807186484336853,
-0.2269960343837738,
-0.3649509847164154,
0.13776369392871857,
-0.19916275143623352,
-0.10325983166694641,
-0.5471592545509338,
-0.11475518345832825,
-0.04226977750658989,
0.06126017868518829,
-0.14380604028701782,
-0.19808195531368256,
-0.16248445212841034,
-0.22527186572551727,
0.05438631772994995,
0.551033616065979,
-0.43262848258018494,
0.011775538325309753,
-0.27847641706466675,
0.2042989730834961,
-0.13208594918251038,
0.25759947299957275,
-0.2816115617752075,
0.03633610159158707,
-0.3884238600730896,
0.40793630480766296,
0.01974456012248993,
-0.25979894399642944,
-0.21430906653404236,
0.5445476174354553,
0.06842535734176636,
0.026557311415672302,
0.2897258698940277,
-0.20124688744544983,
0.10501015186309814,
-0.20608368515968323,
0.091070756316185,
0.2656833231449127,
0.05849752575159073,
0.08005542308092117,
-0.16028136014938354,
-0.2704455852508545,
0.10086619108915329,
-0.04632160812616348,
0.08064396679401398,
0.045536890625953674,
0.1703197956085205,
-0.26339632272720337,
0.2718045711517334,
-0.10531462728977203,
-0.15120099484920502,
0.427045613527298,
0.33408740162849426,
0.24228833615779877,
-0.10367201268672943,
0.3007436990737915,
-0.5005974769592285,
0.17022103071212769,
0.21269869804382324,
-0.003071380779147148,
-0.33022984862327576,
-0.16083016991615295,
-0.34842368960380554,
-0.026265662163496017,
-0.09263749420642853,
0.12630131840705872,
0.0013971738517284393,
0.11542470008134842,
-0.24697081744670868,
-0.11753670871257782,
0.17763319611549377,
-0.030752457678318024,
0.060918159782886505,
0.09771385043859482,
0.15052586793899536,
0.05172031372785568,
-0.1817910522222519,
0.21079222857952118,
0.15427564084529877,
-0.2112717479467392,
0.4480034112930298,
-0.13637438416481018,
-0.25729238986968994,
0.34576216340065,
0.03822783753275871,
0.25069671869277954,
-0.09482117742300034,
0.039653241634368896,
-0.15116603672504425,
0.10125605762004852,
0.03787175565958023,
-0.3215705454349518,
0.2051585167646408,
-0.0285346657037735,
0.03938216716051102,
0.21604983508586884,
0.1151733249425888,
0.34444183111190796,
0.0010697096586227417,
-0.0472748763859272,
0.17160087823867798,
-0.06728340685367584,
0.29531240463256836,
-0.0934639573097229,
0.17866623401641846,
0.15582749247550964,
-0.04400951415300369,
0.0736912339925766,
-0.03916177153587341,
-0.05696658045053482,
0.45215192437171936,
-0.08705992251634598,
-0.04854083061218262,
0.12265543639659882,
-0.17816360294818878,
0.002883121371269226,
0.37237030267715454,
0.3973326086997986,
0.5266881585121155,
0.11931592226028442,
-0.27247095108032227,
0.012345477938652039,
0.13928237557411194,
-0.060112159699201584,
0.3349358141422272,
0.13988305628299713,
0.24718424677848816,
-0.04124322161078453,
-0.16293910145759583,
0.05290888622403145,
-0.1465185582637787,
-0.32985395193099976,
0.17786061763763428,
0.04747065156698227,
-0.6432306170463562,
0.3877999782562256,
-0.3197041153907776,
-0.3689807653427124,
0.05392608046531677,
0.443713515996933,
-0.07402840256690979,
-0.4755530059337616,
-0.2862183749675751,
0.3508525490760803,
-0.07419604063034058,
-0.04251747205853462,
-0.16819341480731964,
0.19519667327404022,
-0.06881912797689438,
-0.2971452474594116,
-0.06707249581813812,
-0.10776503384113312,
-0.1711650937795639,
-0.04683750495314598,
0.14478249847888947,
-0.1980779469013214,
0.45157766342163086,
-0.08698379993438721,
0.08608224987983704,
-0.28317761421203613,
-0.12932266294956207,
0.20493324100971222,
-0.023787887766957283,
0.3985983729362488,
0.3681076765060425,
0.33254608511924744,
-0.0919693261384964,
-0.28361889719963074,
0.17986561357975006,
0.11613168567419052,
0.050920262932777405,
0.2080722153186798,
-0.151373028755188,
-0.33437854051589966,
-0.13554055988788605,
-0.21343642473220825,
0.05088184028863907,
-0.23741266131401062,
-0.17326611280441284,
-0.08662283420562744,
-0.0448153093457222,
0.10959966480731964,
0.1451994776725769,
0.0845622643828392,
-0.09068921208381653,
-0.18355339765548706,
-0.4282517731189728,
-0.2408633530139923,
0.24602483212947845,
-0.0073177628219127655,
-0.220625102519989,
0.07432705163955688,
-0.011200286448001862,
0.34959328174591064,
0.009903330355882645,
-0.5550223588943481,
-0.04674869775772095,
0.022737858816981316,
0.33389294147491455,
-0.11993618309497833,
-0.007121168076992035,
0.04246639087796211,
-0.2382400780916214,
-0.0061677806079387665,
-0.21623258292675018,
-0.21258710324764252,
-0.00806720182299614,
0.20341049134731293,
0.43339067697525024,
0.07213722914457321,
0.4313965439796448,
0.19655555486679077,
0.7534830570220947,
-0.14127767086029053,
-0.1334003210067749,
0.6663435101509094,
-0.010009096004068851,
0.1756165325641632,
0.06882534921169281,
-0.2679131031036377,
-0.2140110582113266,
-0.26287662982940674,
-0.01359584927558899,
0.022729959338903427,
-0.24242888391017914,
-0.15867280960083008,
-0.139749675989151,
-0.02201445773243904,
-0.4359216094017029,
-0.353305846452713,
0.007662849500775337,
-0.2825765907764435,
0.058156006038188934,
0.19055107235908508,
0.15673735737800598,
-0.16138425469398499,
-0.0472198911011219,
0.15221147239208221,
0.19307255744934082,
0.22993388772010803,
-0.007361616939306259,
-0.05900964140892029,
-0.23415812849998474,
-0.30119192600250244,
0.5041162371635437,
-0.016132302582263947,
0.2843261957168579,
-0.12876519560813904,
0.021719463169574738,
0.1959886997938156,
-0.01856667920947075,
0.9572784304618835,
-0.3812982141971588,
0.08889028429985046,
-0.007157724350690842,
0.08092013001441956,
-0.3324486017227173,
-0.22741034626960754,
-0.2309872806072235,
0.02675332874059677,
-0.01472366414964199,
0.29501259326934814,
-0.3193063735961914,
-0.13604427874088287,
-0.0633532702922821,
-0.22696873545646667,
-0.09737139940261841,
-0.30252450704574585,
-0.0017131790518760681,
-0.3097801208496094,
-0.4436871409416199,
0.029792770743370056,
0.1966380476951599,
0.013941578567028046,
0.029703490436077118,
0.11193249374628067,
0.24871663749217987,
0.27542853355407715,
0.09684938937425613,
0.1963985413312912,
0.13369034230709076,
0.0703912153840065,
-0.008730471134185791,
-0.0734199583530426,
-0.024584610015153885,
0.3534638285636902,
0.6068015098571777,
0.05760577321052551,
-0.2991913855075836,
-0.0809272825717926,
-0.28926050662994385,
0.34995022416114807,
0.2595506012439728,
-0.010218460112810135,
0.5774989724159241,
0.02661168947815895,
0.16201773285865784,
-0.13835254311561584,
-0.037781596183776855,
0.6573675274848938,
-0.11385157704353333,
-0.17387650907039642,
-0.2810865342617035,
0.2567611038684845,
-0.16465139389038086,
-0.19551333785057068,
0.16379737854003906,
0.3170192539691925,
-0.16641685366630554,
0.5658513307571411,
-0.08185107260942459,
0.7460238337516785,
0.11378513276576996,
0.27471622824668884,
0.5058875679969788,
-0.05455879494547844,
0.5354592204093933,
0.03385010361671448,
-0.2960173785686493,
-0.28116607666015625,
-0.04143562540411949,
-0.030421264469623566,
-0.1321164071559906,
-0.004254978150129318,
0.23351848125457764,
-0.09511972963809967,
0.319940447807312,
-0.2524413466453552,
0.4071211814880371,
0.019359096884727478,
0.16933175921440125,
-0.12826170027256012,
-0.15953096747398376,
-0.15833894908428192,
0.1560034155845642,
-0.14525631070137024,
0.20962688326835632,
-0.1595020294189453,
-0.12960053980350494,
0.2525767683982849,
-0.48865896463394165,
-0.16351836919784546,
0.2946954071521759,
-0.15810617804527283,
0.07249394804239273,
-0.07040558755397797,
0.060842230916023254,
0.5215458869934082,
-0.13020414113998413,
-0.13783466815948486,
0.10152624547481537,
0.08652806282043457,
0.22240892052650452,
0.16722898185253143,
0.12242002785205841,
-0.11328871548175812,
-0.15824154019355774,
0.1858212947845459,
0.09670854359865189,
-0.22088822722434998,
0.1202010065317154,
0.026942528784275055,
-0.3131176233291626,
0.08176802098751068,
-0.20985016226768494,
-0.22073230147361755,
-0.4470403492450714,
-0.5384813547134399,
-0.11729196459054947,
-0.13789024949073792,
-0.10070271790027618,
0.08527826517820358,
-0.22385825216770172,
0.1045614629983902,
0.06117992103099823,
0.10114040970802307,
-0.28732675313949585,
-0.006617213599383831,
0.4907410442829132,
-0.3601687550544739,
-0.032550081610679626,
0.5696525573730469,
0.47401535511016846,
-0.17341583967208862,
-0.24928653240203857,
0.08405208587646484,
-0.1666337549686432,
-0.315912663936615,
0.21762539446353912,
0.15230366587638855,
0.10093316435813904,
0.1122225672006607,
0.002361888065934181,
0.3469866216182709,
-0.012534007430076599,
0.19198010861873627,
-0.42942437529563904,
0.48305293917655945,
0.033039629459381104,
-0.3692247271537781,
0.030657904222607613,
0.27319449186325073,
-0.18530410528182983,
0.04889321327209473,
-0.08174890279769897,
-0.2576777935028076,
0.04179343581199646,
0.008369214832782745,
0.11613430082798004,
0.3391323685646057,
0.1365441530942917,
0.3546549677848816,
-0.24823103845119476,
0.1082177609205246,
0.020688220858573914,
-0.1613507866859436,
-0.20037975907325745,
-0.5936896204948425,
0.18637418746948242,
0.21065698564052582,
0.00470348447561264,
0.2043323814868927,
-0.4233960509300232,
-0.011141041293740273,
-0.0006894432008266449,
0.13785459101200104,
0.25280410051345825,
-0.11136774718761444,
0.46748068928718567,
-0.06659556925296783,
-0.19682350754737854,
-0.24299222230911255,
0.13183408975601196,
-0.10131857544183731,
0.2302262783050537,
-0.06826932728290558,
0.2538541853427887,
0.03244714066386223,
0.027973510324954987,
-0.44190946221351624,
0.19513103365898132,
-0.22163647413253784,
0.1660781055688858,
0.371107816696167,
-0.31299686431884766,
0.23618309199810028,
-0.10489660501480103,
0.17028158903121948,
0.11687316745519638,
-0.3132779598236084,
-0.08895635604858398,
0.134307861328125,
0.21694429218769073,
-0.08083541691303253,
-0.26726406812667847,
-0.34675905108451843,
0.11080040037631989,
0.014602132141590118,
0.10205218940973282,
0.04629610478878021,
-0.07283138483762741,
0.03663598746061325,
-0.12160968780517578,
0.3622201681137085,
-0.11074639856815338,
0.05353661999106407,
0.6311355829238892,
-0.024820871651172638,
0.2194848358631134,
0.21330386400222778,
0.0508510060608387,
-0.0332975797355175,
0.5764169096946716,
0.06470129638910294,
-0.27305305004119873,
0.15796801447868347,
0.2391754388809204,
-0.08110597729682922,
-0.5749051570892334,
0.053288888186216354,
0.31044813990592957,
-0.08998233824968338,
0.3500657081604004,
0.14517280459403992,
0.3427969813346863,
-0.02965576946735382,
-0.11431382596492767,
-0.26722419261932373,
0.04791611433029175,
-0.09191210567951202,
-0.016726624220609665,
-0.47109031677246094,
-0.008128069341182709,
-0.2544652819633484,
0.12038356810808182,
-0.16339130699634552,
-0.3142021596431732,
0.4378339946269989,
0.2290915548801422,
0.23137131333351135,
-0.2591320276260376,
0.19944538176059723,
0.022388547658920288,
0.18741048872470856,
-0.3841019570827484,
0.07843269407749176,
-0.10361070185899734,
0.15113259851932526,
0.40102189779281616,
-0.10352367907762527,
0.6325241923332214,
0.32984983921051025,
-0.011328186839818954,
-0.2935943901538849,
0.18265822529792786,
0.0014213696122169495,
0.17238561809062958,
-0.16663858294487,
0.010392416268587112,
0.4686570167541504,
0.3373217284679413,
0.13437192142009735,
-0.15504533052444458,
0.16187898814678192,
0.1168673187494278,
0.18580207228660583,
-0.2116679698228836,
0.22458088397979736,
-0.16477596759796143,
0.042720332741737366,
-0.22742608189582825,
0.45203840732574463,
-0.3828260898590088,
-0.12326566874980927,
0.666349470615387,
0.20725810527801514,
0.2957136332988739,
0.006185498088598251,
0.04831256344914436,
-0.010052562691271305,
0.4123642146587372,
0.21343374252319336,
0.0996478870511055,
-0.6415421962738037,
0.2720876634120941,
-0.5403330326080322,
-0.15314435958862305,
-0.1873527467250824,
-0.005720853805541992,
0.24367190897464752,
0.19479212164878845,
0.2459644377231598,
0.07635578513145447,
0.31012773513793945,
0.2628329396247864,
-0.3277026116847992,
0.38965898752212524,
-0.24740135669708252,
-0.28803229331970215,
-0.14444181323051453,
0.08374831825494766,
-0.07858410477638245,
-0.3023137152194977,
0.023012734949588776,
0.04017101600766182,
-0.04883900284767151,
-0.4406587481498718,
-0.10025668144226074,
0.45645979046821594,
-0.10546332597732544,
0.5267993211746216,
-0.1658484786748886,
0.4332770109176636,
-0.07905487716197968,
-0.10108143091201782,
0.11314408481121063,
-0.41193246841430664,
-0.1290886402130127,
0.03944654017686844,
-0.19965125620365143,
0.21598860621452332,
0.03978627920150757,
0.03985104709863663,
-0.27591580152511597,
0.09339732676744461,
-0.1141480877995491,
-0.09078945964574814,
-0.3494408428668976,
0.4015266001224518,
-0.2888225018978119,
0.1907179355621338,
0.019899100065231323,
0.067920982837677,
-0.045404594391584396,
0.12250387668609619,
-0.21180257201194763,
-0.4127752184867859,
0.4199669659137726,
-0.2443777322769165,
-0.25242379307746887,
0.15612086653709412,
0.3624410331249237,
-0.048907000571489334,
-0.2713668644428253,
-0.3034343719482422,
0.06232133507728577,
0.22989732027053833,
-0.031165534630417824,
-0.17313748598098755,
0.318583607673645,
-0.020208166912198067,
0.09446394443511963,
0.017308421432971954,
0.21690842509269714,
-0.05464550107717514,
-0.4848620891571045,
0.02581709623336792,
-0.18960770964622498
] |
https://github.com/huggingface/datasets/issues/6597 | Also note the information in the docstring: https://github.com/huggingface/datasets/blob/9d6d16117a30ba345b0236407975f701c5b288d4/src/datasets/dataset_dict.py#L1582-L1585
> Also accepts `<dataset_name>`, which will default to the namespace of the logged-in user.
This behavior was "reverted" by the PR:
- #6519
We have therefore contradictory requirements. We should decide:
- whether to support passing dataset_namespace without user/org that defaults to the logged-in user (and not support canonical datasets)
- or vice-versa, to support canonical datasets and not support passing only dataset_name
As canonical datasets are "deprecated" (and will eventually disappear), I would choose the first option. However, if so, the Space to convert datasets to Parquet will not work for canonical datasets: https://huggingface.co/spaces/albertvillanova/convert-dataset-to-parquet | Dataset.push_to_hub of a canonical dataset creates an additional dataset under the user namespace | While using `Dataset.push_to_hub` of a canonical dataset, an additional dataset was created under my user namespace.
## Steps to reproduce the bug
The command:
```python
commit_info = ds.push_to_hub(
"caner",
config_name="default",
commit_message="Convert dataset to Parquet",
commit_description="Convert dataset to Parquet.",
create_pr=True,
token=token,
)
```
creates the additional dataset `albertvillanova/caner`. | 103 | Dataset.push_to_hub of a canonical dataset creates an additional dataset under the user namespace
While using `Dataset.push_to_hub` of a canonical dataset, an additional dataset was created under my user namespace.
## Steps to reproduce the bug
The command:
```python
commit_info = ds.push_to_hub(
"caner",
config_name="default",
commit_message="Convert dataset to Parquet",
commit_description="Convert dataset to Parquet.",
create_pr=True,
token=token,
)
```
creates the additional dataset `albertvillanova/caner`.
Also note the information in the docstring: https://github.com/huggingface/datasets/blob/9d6d16117a30ba345b0236407975f701c5b288d4/src/datasets/dataset_dict.py#L1582-L1585
> Also accepts `<dataset_name>`, which will default to the namespace of the logged-in user.
This behavior was "reverted" by the PR:
- #6519
We have therefore contradictory requirements. We should decide:
- whether to support passing dataset_namespace without user/org that defaults to the logged-in user (and not support canonical datasets)
- or vice-versa, to support canonical datasets and not support passing only dataset_name
As canonical datasets are "deprecated" (and will eventually disappear), I would choose the first option. However, if so, the Space to convert datasets to Parquet will not work for canonical datasets: https://huggingface.co/spaces/albertvillanova/convert-dataset-to-parquet | [
-0.0006193593144416809,
-0.1821044683456421,
0.02426648885011673,
0.128635436296463,
0.1866663694381714,
-0.11163036525249481,
0.22518958151340485,
0.07185616344213486,
0.0009449049830436707,
0.29711079597473145,
-0.012589387595653534,
0.3734179735183716,
-0.135340616106987,
0.054037660360336304,
0.19700603187084198,
-0.03923250734806061,
0.33911949396133423,
-0.0015244744718074799,
0.003138061612844467,
-0.11203300952911377,
-0.3743405044078827,
-0.04713601991534233,
0.13511481881141663,
0.11890839040279388,
-0.23493900895118713,
0.07310835272073746,
-0.05401960760354996,
0.25431308150291443,
-0.13510097563266754,
-0.3024565577507019,
0.5114591121673584,
0.21550947427749634,
-0.13479667901992798,
0.5041071772575378,
-0.00011568101035663858,
0.2224593609571457,
0.33082327246665955,
0.13062971830368042,
-0.10451988130807877,
-0.2704402208328247,
-0.20516183972358704,
-0.10725314915180206,
0.22135528922080994,
-0.23084405064582825,
-0.19089847803115845,
0.0679246261715889,
-0.0799066349864006,
-0.40419960021972656,
0.1959097981452942,
0.17067775130271912,
0.14423039555549622,
0.15808457136154175,
-0.1700623780488968,
-0.3528490364551544,
0.11260400712490082,
0.29265546798706055,
-0.27500057220458984,
0.012042786926031113,
0.02086540497839451,
0.12505918741226196,
0.05407043173909187,
0.11494328826665878,
0.058204613626003265,
0.019586410373449326,
0.4307291805744171,
0.0436197854578495,
-0.05108977109193802,
-0.13702812790870667,
0.0289979949593544,
0.16841918230056763,
0.21627001464366913,
-0.34401997923851013,
-0.2468208372592926,
-0.28057923913002014,
-0.002645310014486313,
-0.14583353698253632,
0.2492872178554535,
0.23663640022277832,
-0.1966591626405716,
0.09043295681476593,
-0.06780741363763809,
-0.06065557897090912,
-0.16530859470367432,
0.0042997095733881,
-0.3830907940864563,
0.22903138399124146,
-0.07455174624919891,
0.25598853826522827,
-0.06311161816120148,
-0.05846819281578064,
0.20956511795520782,
-0.3232230842113495,
0.13313283026218414,
-0.4624115228652954,
-0.19524313509464264,
-0.06632500886917114,
0.0064894575625658035,
0.2667069733142853,
0.1650664210319519,
0.04771922901272774,
-0.16558891534805298,
-0.07752831280231476,
-0.08859186619520187,
-0.1165504977107048,
0.2547473907470703,
-0.06543869525194168,
0.03900893032550812,
0.30100947618484497,
0.22332468628883362,
0.13101813197135925,
0.04861469566822052,
0.07973082363605499,
0.06176766753196716,
-0.1620330512523651,
0.052431702613830566,
-0.15784117579460144,
0.6943709254264832,
-0.03711254894733429,
-0.10685247927904129,
0.11267183721065521,
0.10974191129207611,
0.2977963089942932,
0.06804963946342468,
0.2752745449542999,
0.062261804938316345,
0.1272103190422058,
-0.1674109399318695,
0.3516944646835327,
0.004291899502277374,
-0.13031089305877686,
-0.2837689518928528,
-0.09012308716773987,
-0.281045138835907,
-0.09743048995733261,
0.09370330721139908,
-0.22738651931285858,
0.08459363132715225,
0.35512685775756836,
0.4092574119567871,
-0.15401974320411682,
0.037708625197410583,
0.050111204385757446,
-0.039578430354595184,
0.18343383073806763,
0.08918033540248871,
0.3054547905921936,
0.12825798988342285,
-0.44283366203308105,
-0.1355622112751007,
0.28962114453315735,
-0.41249120235443115,
-0.2417585551738739,
-0.01977485790848732,
0.19000421464443207,
-0.07795559614896774,
0.12281107902526855,
-0.5264626145362854,
-0.004999574739485979,
-0.07474737614393234,
0.11241653561592102,
0.07467679679393768,
-0.2186504751443863,
0.011871673166751862,
-0.3377259075641632,
0.05847513675689697,
0.1429978460073471,
-0.015769504010677338,
0.001514241099357605,
-0.032274454832077026,
0.08981295675039291,
0.11849263310432434,
0.18715162575244904,
-0.32977840304374695,
0.03857210651040077,
-0.2050156593322754,
-0.009292244911193848,
0.30967873334884644,
-0.6608354449272156,
-0.4060669243335724,
-0.2808862030506134,
-0.09706291556358337,
0.09764594584703445,
0.3373275101184845,
-0.07098992168903351,
0.37467247247695923,
-0.18646332621574402,
0.046308934688568115,
0.11868632584810257,
0.10608933866024017,
0.18776586651802063,
-0.26294419169425964,
-0.030628681182861328,
0.195700541138649,
0.024129673838615417,
0.11475463211536407,
0.1303563117980957,
0.13723774254322052,
0.45189452171325684,
0.0938873440027237,
-0.1751326322555542,
0.34685835242271423,
0.07696758210659027,
0.2834663689136505,
0.05175205320119858,
-0.019062910228967667,
0.057366445660591125,
-0.2340879887342453,
0.10798084735870361,
0.22185060381889343,
0.2310897409915924,
-0.08145678043365479,
-0.5123896598815918,
-0.45450177788734436,
0.07164162397384644,
-0.36876633763313293,
-0.05550195649266243,
0.07687294483184814,
0.2937641441822052,
0.04187111556529999,
-0.1088452935218811,
-0.13252213597297668,
0.40573200583457947,
-0.29387471079826355,
0.4174847900867462,
-0.419457346200943,
0.5345686674118042,
0.04675225913524628,
0.01772923767566681,
0.031178437173366547,
0.33853042125701904,
0.3645530641078949,
-0.15530581772327423,
0.03922441974282265,
0.26492488384246826,
0.2716532349586487,
0.267180860042572,
0.01212337613105774,
0.20774123072624207,
0.25433802604675293,
-0.3245365619659424,
0.16547894477844238,
0.16025766730308533,
0.12310377508401871,
0.08446738123893738,
-0.39658883213996887,
0.43387556076049805,
0.19130434095859528,
0.1370377391576767,
-0.20507821440696716,
0.1197851300239563,
0.06786803901195526,
-0.034383200109004974,
-0.062066446989774704,
-0.2203221619129181,
-0.13742941617965698,
0.17450621724128723,
0.26915523409843445,
0.015559589490294456,
-0.20446407794952393,
0.15020227432250977,
0.31570982933044434,
0.08505123853683472,
0.019138773903250694,
-0.0387459322810173,
-0.2574441730976105,
-0.19789473712444305,
0.20657776296138763,
0.27888256311416626,
0.17170369625091553,
0.11325539648532867,
-0.0344061553478241,
0.06273483484983444,
-0.11187730729579926,
-0.2010229229927063,
0.1152161955833435,
0.0254670362919569,
-0.18165741860866547,
0.01261062454432249,
0.19179141521453857,
-0.08151599764823914,
-0.2460319995880127,
0.27117466926574707,
0.10842369496822357,
0.19138281047344208,
-0.31354326009750366,
-0.22843234241008759,
-0.20706090331077576,
-0.16345259547233582,
-0.16684412956237793,
-0.07657438516616821,
-0.224398672580719,
-0.3425995409488678,
-0.046183545142412186,
0.40665486454963684,
-0.075429767370224,
0.23811262845993042,
0.10531329363584518,
0.10814725607633591,
-0.23566627502441406,
-0.09235941618680954,
-0.15078379213809967,
-0.07977429032325745,
-0.0520823709666729,
0.06532076001167297,
0.08381947875022888,
-0.16427293419837952,
0.3343283534049988,
-0.039428528398275375,
0.31242287158966064,
-0.589493989944458,
-0.44459977746009827,
0.029672062024474144,
-0.24648064374923706,
0.15965814888477325,
0.08091939985752106,
-0.03774614632129669,
0.27327248454093933,
-0.10050738602876663,
0.10001150518655777,
-0.21952365338802338,
-0.11367414891719818,
0.06949879974126816,
-0.2420303374528885,
-0.1010420024394989,
0.059550732374191284,
-0.11919063329696655,
-0.1355588138103485,
-0.24222834408283234,
0.048278383910655975,
0.34385108947753906,
-0.09711430966854095,
-0.025078915059566498,
-0.2256859689950943,
-0.017465677112340927,
0.18550530076026917,
-0.04634920507669449,
-0.18329447507858276,
-0.18438486754894257,
-0.04554609954357147,
-0.17895947396755219,
-0.08821900188922882,
-0.07068853825330734,
-0.07394906878471375,
0.10145996510982513,
0.10460424423217773,
-0.20000000298023224,
-0.5768498778343201,
-0.21300475299358368,
0.5250096917152405,
0.012445341795682907,
0.012388477101922035,
0.2819978594779968,
0.2029149830341339,
0.0030206628143787384,
-0.06638547778129578,
-0.47647416591644287,
-0.08022916316986084,
0.37622612714767456,
-0.23200467228889465,
-0.0075224339962005615,
-0.058292727917432785,
-0.013601496815681458,
0.39604100584983826,
0.3386194109916687,
0.09550587087869644,
0.39826375246047974,
-0.0211485642939806,
0.6063766479492188,
-0.2959791421890259,
-0.10224075615406036,
0.1158977523446083,
0.2136029452085495,
0.13282397389411926,
0.37315329909324646,
0.04337390139698982,
0.03539743274450302,
0.12555444240570068,
-0.3616448640823364,
-0.27788713574409485,
-0.410860538482666,
-0.42901235818862915,
-0.13839003443717957,
-0.10291452705860138,
0.09323107451200485,
-0.0700099766254425,
-0.20056721568107605,
-0.21500198543071747,
0.059372760355472565,
0.5262933373451233,
-0.23003046214580536,
0.10493697971105576,
-0.6748554706573486,
0.3333721160888672,
-0.4013829529285431,
0.04672757163643837,
-0.24176159501075745,
0.29197418689727783,
0.04772104322910309,
0.04606598615646362,
0.28899458050727844,
0.18688341975212097,
0.8734764456748962,
-0.4366903007030487,
0.14776714146137238,
-0.22654330730438232,
0.11941276490688324,
-0.25874757766723633,
0.03912971913814545,
-0.1040039211511612,
0.3955487310886383,
-0.3169466555118561,
0.6511169075965881,
-0.1842261403799057,
-0.3233885169029236,
-0.07743187248706818,
0.0018215328454971313,
-0.0544283464550972,
0.16382502019405365,
-0.10428446531295776,
-0.3537379503250122,
-0.22193199396133423,
0.24752302467823029,
0.23575469851493835,
0.3410917818546295,
0.01010407879948616,
0.07021655142307281,
-0.2671365439891815,
-0.07676313072443008,
0.18687579035758972,
-0.010184485465288162,
0.297783225774765,
-0.016132282093167305,
0.06204822659492493,
0.06694623827934265,
0.22671115398406982,
0.3262232840061188,
0.553246796131134,
-0.18224936723709106,
-0.7771329879760742,
-0.0190596841275692,
-0.01758527383208275,
0.1916511356830597,
0.5204013586044312,
-0.09043167531490326,
0.27953580021858215,
-0.3712475895881653,
0.03316115960478783,
-0.2505612373352051,
0.13485035300254822,
0.1546136736869812,
-0.07157549262046814,
-0.5722108483314514,
-0.2831948697566986,
0.21041402220726013,
0.044165998697280884,
-0.12896126508712769,
0.22042500972747803,
0.8481853604316711,
-0.4569820165634155,
0.46418100595474243,
-0.05833550542593002,
1.107770562171936,
0.12321381270885468,
0.467387855052948,
0.27303603291511536,
-0.42979422211647034,
0.8078635334968567,
-0.18395671248435974,
-0.10163197666406631,
-0.32431560754776,
0.06692066788673401,
-0.06084790080785751,
-0.0840897187590599,
0.14235137403011322,
-0.12298141419887543,
-0.1264769732952118,
0.17322708666324615,
-0.12762314081192017,
0.6125106811523438,
-0.05247548967599869,
0.26137498021125793,
0.030419686809182167,
-0.22774843871593475,
-0.17879904806613922,
0.1995263546705246,
-0.01696489192545414,
-0.08199431002140045,
-0.08834026753902435,
-0.015964092686772346,
-0.30416426062583923,
-0.0323704369366169,
-0.011656999588012695,
0.1215086579322815,
0.07548059523105621,
-0.06270146369934082,
0.05948900058865547,
-0.3386105000972748,
0.11833120882511139,
0.19367334246635437,
0.9950634837150574,
0.1983267366886139,
-0.25637438893318176,
0.24980811774730682,
-0.1789604276418686,
0.20695184171199799,
-0.030576832592487335,
-0.12211790680885315,
0.15880487859249115,
0.10862568020820618,
-0.06978840380907059,
-0.06276337057352066,
-0.04067816212773323,
-0.2949497103691101,
-0.19463643431663513,
0.011144932359457016,
0.10405127704143524,
-0.4763191044330597,
-0.0018750615417957306,
-0.025348380208015442,
-0.056889183819293976,
-0.3174239695072174,
0.0671393871307373,
-0.18186822533607483,
-0.02162645384669304,
-0.0917503833770752,
-0.12902332842350006,
-0.38877394795417786,
-0.020435066893696785,
-0.024108048528432846,
0.38352474570274353,
0.1802377998828888,
0.11696717143058777,
-0.4535350203514099,
-0.17275260388851166,
-0.06226581335067749,
-0.07197614759206772,
0.2730448842048645,
-0.46630537509918213,
0.19850382208824158,
-0.030718479305505753,
0.06625019013881683,
0.20881392061710358,
0.0496811717748642,
0.09446823596954346,
-0.010347563773393631,
0.03415115177631378,
-0.10427588224411011,
0.08808022737503052,
0.05498617887496948,
-0.2915177345275879,
0.1679128259420395,
0.20443880558013916,
0.3463062047958374,
-0.11308316886425018,
-0.1498248428106308,
-0.29582199454307556,
0.1817624419927597,
0.02315881848335266,
0.15335014462471008,
0.14358335733413696,
-0.1402290165424347,
-0.0968892052769661,
-0.2100123167037964,
0.03945980966091156,
0.04124569147825241,
-0.20788800716400146,
-0.18502822518348694,
-0.3166090250015259,
0.16156744956970215,
0.2705487012863159,
0.032555900514125824,
-0.18975290656089783,
-0.03726818785071373,
0.11788715422153473,
-0.13075345754623413,
0.48394936323165894,
0.31615927815437317,
-0.03643709421157837,
-0.23167753219604492,
0.7876291275024414,
0.15695172548294067,
-0.311345636844635,
0.2058817744255066,
0.09937290102243423,
-0.11387482285499573,
-0.38602423667907715,
0.17399746179580688,
-0.24269306659698486,
-0.032411739230155945,
-0.0051774270832538605,
0.30437174439430237,
0.5298488140106201,
0.16196486353874207,
0.09355416893959045,
-0.12150120735168457,
0.012914828956127167,
0.06633394211530685,
0.3788864016532898,
0.15522249042987823,
-0.2954178750514984,
-0.1792675107717514,
0.1508820801973343,
0.14275449514389038,
-0.0767495185136795,
-0.24432092905044556,
0.4087345004081726,
0.036202240735292435,
0.20037874579429626,
0.3524792492389679,
0.6693417429924011,
0.2528342604637146,
-0.11226008832454681,
-0.08003047853708267,
0.49427616596221924,
-0.23977112770080566,
0.43722668290138245,
0.30600303411483765,
-0.16453537344932556,
0.1377473771572113,
0.47464361786842346,
0.1896679848432541,
-0.16262835264205933,
0.4890594482421875,
0.14590884745121002,
0.5508161783218384,
0.2559688985347748,
-0.4271281957626343,
0.33926817774772644,
0.06665761768817902,
0.1630234718322754,
-0.0746932178735733,
-0.06952954828739166,
-0.03424679487943649,
0.05232267081737518,
0.3210703730583191,
-0.23268669843673706,
-0.23559004068374634,
-0.2856046259403229,
-0.15770642459392548,
-0.2926197648048401,
-0.18945260345935822,
-0.13526484370231628,
-0.19658096134662628,
-0.29553934931755066,
0.08651451766490936,
-0.39822736382484436,
-0.27057886123657227,
-0.08208140730857849,
-0.15893223881721497,
-0.03288911283016205,
-0.1607247292995453,
-0.06621794402599335,
0.11170567572116852,
0.1035776436328888,
-0.07311288267374039,
0.31003251671791077,
-0.06185969337821007,
-0.27668941020965576,
0.0397910550236702,
0.39338111877441406,
0.3609282374382019,
-0.020022477954626083,
-0.02474631555378437,
-0.1011032909154892,
0.4690778851509094,
0.05223111808300018,
0.08317166566848755,
0.11411327123641968,
0.02764250710606575,
0.01063164696097374,
0.06844231486320496,
0.149361714720726,
-0.07895398139953613,
-0.07572454959154129,
0.10987898707389832,
-0.11232493072748184,
-0.35112616419792175,
0.12535516917705536,
-0.25226083397865295,
-0.17791453003883362,
0.1303611397743225,
0.18072889745235443,
-0.31600096821784973,
-0.27022480964660645,
0.433879554271698,
0.029943112283945084,
0.09014423936605453,
-0.44758543372154236,
0.06501162052154541,
0.17273971438407898,
0.25404292345046997,
0.03830048441886902,
-0.36405542492866516,
-0.28677845001220703,
-0.3366885781288147,
-0.598159670829773,
0.6450446844100952,
-0.2253197431564331,
-0.08254123479127884,
0.0658254623413086,
-0.19687964022159576,
0.11993984878063202,
0.04326338693499565,
-0.3782905340194702,
0.10215890407562256,
-0.10172510147094727,
0.024612873792648315,
-0.10345454514026642,
0.004819505847990513,
0.274820476770401,
-0.49963319301605225,
0.04835469275712967,
-0.3192002773284912,
0.3305763602256775,
0.21641264855861664,
-0.02338821068406105,
-0.08467932045459747,
0.36912980675697327,
0.3612574636936188,
-0.2026704102754593,
0.16207867860794067,
0.13591904938220978,
0.2411900758743286,
-0.047399021685123444,
-0.0037754327058792114,
-0.1531977653503418,
-0.31121790409088135,
-0.5565631985664368,
0.26806196570396423,
-0.30103400349617004,
0.1577187478542328,
-0.07700899243354797,
-0.220331072807312,
-0.06315097212791443,
-0.12130293250083923,
0.24394714832305908,
0.1962127983570099,
-0.19312867522239685,
0.0786498412489891,
-0.25866907835006714,
-0.022088173776865005,
0.24231673777103424,
0.25170397758483887,
0.06474773585796356,
0.21971431374549866,
-0.19759292900562286,
-0.4514490067958832,
0.25296804308891296,
-0.08173093944787979,
-0.3800187110900879,
0.03148842230439186,
0.2891227602958679,
0.13965532183647156,
-0.2743326425552368,
-0.3555436134338379,
0.02834184467792511,
0.3067229688167572,
-0.20822519063949585,
-0.019080456346273422,
0.2945013642311096,
-0.22225140035152435,
-0.05946291610598564,
-0.032565996050834656,
-0.0903668999671936,
0.19642849266529083,
-0.20503345131874084,
0.5043056011199951,
-0.149697408080101
] |
https://github.com/huggingface/datasets/issues/6597 | IIUC, this could also be "fixed" by `create_repo("dataset_name")` not defaulting to `create_repo("user/dataset_name")` (when the user's token is available), which would be consistent with the rest of the `HfApi` ops used in the `push_to_hub` implementation. This is a (small) breaking change for `huggingface_hub`, but justified to make the API more consistent. | Dataset.push_to_hub of a canonical dataset creates an additional dataset under the user namespace | While using `Dataset.push_to_hub` of a canonical dataset, an additional dataset was created under my user namespace.
## Steps to reproduce the bug
The command:
```python
commit_info = ds.push_to_hub(
"caner",
config_name="default",
commit_message="Convert dataset to Parquet",
commit_description="Convert dataset to Parquet.",
create_pr=True,
token=token,
)
```
creates the additional dataset `albertvillanova/caner`. | 50 | Dataset.push_to_hub of a canonical dataset creates an additional dataset under the user namespace
While using `Dataset.push_to_hub` of a canonical dataset, an additional dataset was created under my user namespace.
## Steps to reproduce the bug
The command:
```python
commit_info = ds.push_to_hub(
"caner",
config_name="default",
commit_message="Convert dataset to Parquet",
commit_description="Convert dataset to Parquet.",
create_pr=True,
token=token,
)
```
creates the additional dataset `albertvillanova/caner`.
IIUC, this could also be "fixed" by `create_repo("dataset_name")` not defaulting to `create_repo("user/dataset_name")` (when the user's token is available), which would be consistent with the rest of the `HfApi` ops used in the `push_to_hub` implementation. This is a (small) breaking change for `huggingface_hub`, but justified to make the API more consistent. | [
0.015438482165336609,
-0.24919451773166656,
0.0909704715013504,
0.20266947150230408,
0.17012590169906616,
-0.09327994287014008,
0.33426424860954285,
0.1293419897556305,
0.10203634202480316,
0.2504817545413971,
-0.17379999160766602,
0.16911724209785461,
0.13417616486549377,
0.18486499786376953,
0.33700326085090637,
0.00355176767334342,
0.37373703718185425,
0.05171223357319832,
0.10083949565887451,
-0.2227458357810974,
-0.3209478557109833,
0.20130577683448792,
0.3155643939971924,
0.24302104115486145,
-0.38403260707855225,
0.07512932270765305,
-0.0822150930762291,
0.3141355812549591,
0.04285726696252823,
-0.2703762948513031,
0.381867915391922,
0.08118689060211182,
-0.187546506524086,
0.5335442423820496,
-0.00011352430010447279,
0.032377928495407104,
0.32375937700271606,
0.14692780375480652,
-0.07764139026403427,
-0.1377038210630417,
-0.010118387639522552,
-0.03416093438863754,
0.20317047834396362,
-0.145224928855896,
-0.1636558473110199,
0.19253720343112946,
-0.1017942950129509,
-0.16848769783973694,
0.1554388850927353,
0.02717026323080063,
0.16871929168701172,
0.2954501807689667,
-0.215132474899292,
-0.3792538642883301,
0.24198895692825317,
0.2198897898197174,
-0.2396954596042633,
-0.1938498169183731,
-0.07619832456111908,
0.043617166578769684,
0.0403938852250576,
0.05226244032382965,
0.1358782798051834,
-0.008792130276560783,
0.3499837815761566,
0.19785721600055695,
-0.04423876106739044,
-0.17525912821292877,
0.08280886709690094,
0.20463357865810394,
0.0020503029227256775,
-0.3363734781742096,
-0.18119990825653076,
-0.2266252189874649,
-0.07720816880464554,
-0.26171875,
0.18662208318710327,
0.2123548984527588,
-0.046385087072849274,
-0.03636479005217552,
0.16176597774028778,
-0.08432255685329437,
-0.053364094346761703,
-0.1654127985239029,
-0.3474386930465698,
0.19285184144973755,
-0.04683656245470047,
0.21263180673122406,
0.0522976815700531,
-0.10138466954231262,
0.06061931699514389,
-0.22353911399841309,
0.08178189396858215,
-0.2885648012161255,
-0.3020673990249634,
-0.06670694053173065,
0.12056215107440948,
0.1724579632282257,
0.17624716460704803,
-0.06231488287448883,
-0.06324582546949387,
0.03075983002781868,
-0.1829710304737091,
-0.07587205618619919,
0.30829811096191406,
-0.06915590167045593,
-0.0482216402888298,
0.12731346487998962,
0.3331897258758545,
0.230097696185112,
0.08743730187416077,
0.051207128912210464,
0.15289627015590668,
-0.016327813267707825,
0.11902226507663727,
-0.3139321804046631,
0.5192510485649109,
-0.1886286437511444,
-0.24054041504859924,
0.15161418914794922,
0.12083028256893158,
0.2854456603527069,
-0.05104907974600792,
0.25258418917655945,
0.05923638492822647,
0.07650621235370636,
-0.20635583996772766,
0.4083736538887024,
-0.19485202431678772,
-0.01619287207722664,
-0.35425645112991333,
-0.12043152749538422,
-0.1735084056854248,
0.06902241706848145,
0.03100854903459549,
-0.29896974563598633,
0.09078947454690933,
0.2467953860759735,
0.26728036999702454,
-0.1283719837665558,
-0.09905122220516205,
0.1312398910522461,
-0.051006607711315155,
0.23462283611297607,
0.28534799814224243,
0.2924600839614868,
0.1311950534582138,
-0.3079206347465515,
-0.2401861846446991,
0.11798633635044098,
-0.3773583769798279,
-0.16128629446029663,
0.007875194773077965,
0.20182475447654724,
-0.058218151330947876,
0.021327055990695953,
-0.47829562425613403,
-0.10099470615386963,
-0.07956798374652863,
0.14405182003974915,
0.03555387258529663,
-0.10582209378480911,
-0.09019763767719269,
-0.24662764370441437,
-0.0029645562171936035,
0.1744874119758606,
0.16627492010593414,
-0.12877200543880463,
-0.0778149962425232,
0.04691034182906151,
0.1649138480424881,
0.3313930630683899,
-0.13963009417057037,
0.08928783237934113,
-0.31186074018478394,
0.24460723996162415,
0.12366741895675659,
-0.6206342577934265,
-0.36080753803253174,
-0.23052598536014557,
-0.2461414784193039,
0.1624334752559662,
0.1833711564540863,
0.034876562654972076,
0.26033368706703186,
-0.08892741799354553,
0.24719254672527313,
0.1505468487739563,
0.15008321404457092,
0.17409859597682953,
-0.20474596321582794,
-0.025881491601467133,
0.04110565409064293,
-0.07966998219490051,
0.05524221807718277,
0.21327164769172668,
0.14958608150482178,
0.26596906781196594,
0.1730917990207672,
-0.21138370037078857,
0.35901927947998047,
0.05938703566789627,
0.3196263015270233,
0.06833236664533615,
0.07005263864994049,
0.050139665603637695,
-0.16368594765663147,
0.09642506390810013,
-0.009244531393051147,
0.18709340691566467,
-0.0008850283920764923,
-0.4542750418186188,
-0.43277707695961,
0.05658646672964096,
-0.36993882060050964,
-0.11257076263427734,
0.08746469765901566,
0.19152523577213287,
-0.05690772831439972,
-0.09721484780311584,
-0.02257368713617325,
0.48097798228263855,
-0.09999658167362213,
0.36283886432647705,
-0.4081099033355713,
0.5923627018928528,
0.07231134921312332,
-0.043861910700798035,
0.06515716016292572,
0.4730664789676666,
0.42086347937583923,
-0.1541859209537506,
0.024269498884677887,
0.1276303380727768,
0.259639173746109,
0.234492689371109,
0.1132555902004242,
0.24414277076721191,
0.2902412414550781,
-0.1648636758327484,
0.17541901767253876,
0.08339287340641022,
0.12544086575508118,
-0.12359503656625748,
-0.11287081241607666,
0.36889582872390747,
0.1119919866323471,
0.16600173711776733,
-0.15368010103702545,
0.130827397108078,
0.264818012714386,
-0.0013761669397354126,
0.07731126248836517,
-0.17178253829479218,
-0.018297282978892326,
0.07703277468681335,
0.0722421407699585,
0.017098506912589073,
-0.1575428694486618,
0.279214471578598,
0.48250216245651245,
-0.01178266853094101,
0.030840342864394188,
0.06619742512702942,
-0.275278240442276,
-0.154794842004776,
0.1916249841451645,
0.08696343004703522,
0.08126148581504822,
0.07136828452348709,
0.021308107301592827,
0.22510893642902374,
-0.10836023092269897,
-0.14316408336162567,
-0.030855871737003326,
-0.02337169274687767,
-0.22792693972587585,
-0.08860008418560028,
0.2509044408798218,
-0.055873118340969086,
-0.34727421402931213,
0.2775126099586487,
-0.03519032523036003,
0.09796968102455139,
-0.3823314309120178,
-0.1713615208864212,
-0.22204908728599548,
-0.0037119388580322266,
-0.10967616736888885,
-0.2885034680366516,
-0.3210916817188263,
-0.4585382640361786,
-0.041058249771595,
0.5180985331535339,
-0.04613644629716873,
0.09305647760629654,
0.13586904108524323,
0.23850582540035248,
-0.3008367419242859,
0.01695082150399685,
-0.22288648784160614,
-0.10420495271682739,
-0.05905583128333092,
0.05400349199771881,
-0.013963498175144196,
0.04453994333744049,
0.24435172975063324,
-0.13748672604560852,
0.33168739080429077,
-0.5492722392082214,
-0.3512861728668213,
0.11461556702852249,
-0.25528576970100403,
0.06617090851068497,
0.06705127656459808,
-0.047894757241010666,
0.2615301311016083,
-0.12859168648719788,
0.1464330554008484,
-0.29124677181243896,
-0.24251940846443176,
0.13350003957748413,
-0.18995341658592224,
-0.15784123539924622,
0.05952198803424835,
0.009777428582310677,
0.009549157693982124,
-0.20420710742473602,
0.060553520917892456,
0.17715948820114136,
0.09420012682676315,
-0.029623933136463165,
-0.3841792643070221,
0.0521693080663681,
0.020154237747192383,
-0.20640146732330322,
-0.34809765219688416,
-0.14491528272628784,
-0.09713517129421234,
-0.2335827797651291,
-0.221814826130867,
0.01663704216480255,
-0.13702814280986786,
0.22358818352222443,
-0.1101173684000969,
-0.3155533969402313,
-0.4981982707977295,
-0.23160436749458313,
0.3555920422077179,
-0.02311769127845764,
0.04261180758476257,
0.19880017638206482,
0.06053983047604561,
-0.02102210745215416,
-0.08942591398954391,
-0.41790759563446045,
0.14565406739711761,
0.5093021392822266,
-0.28066879510879517,
-0.07690896093845367,
-0.09636072814464569,
-0.24560269713401794,
0.35579153895378113,
0.31062841415405273,
0.1560700535774231,
0.6169494390487671,
-0.09883132576942444,
0.47514811158180237,
-0.43596088886260986,
-0.13569432497024536,
0.03264351561665535,
0.18427060544490814,
0.09996844828128815,
0.4049713611602783,
0.04050024598836899,
0.06010504066944122,
0.1909005343914032,
-0.36196696758270264,
-0.17794862389564514,
-0.5026760101318359,
-0.3564576208591461,
0.06398200988769531,
-0.21312081813812256,
0.13489149510860443,
-0.013049066066741943,
-0.2555274963378906,
-0.1673997938632965,
0.30906054377555847,
0.34259098768234253,
-0.23928242921829224,
0.08687563240528107,
-0.5691158175468445,
0.07470659911632538,
-0.5470923185348511,
0.1835412085056305,
-0.2303580939769745,
0.15136751532554626,
-0.010515429079532623,
0.031392134726047516,
0.2776808738708496,
0.0996258333325386,
0.8311391472816467,
-0.3115123510360718,
0.14163461327552795,
-0.04891865700483322,
-0.01656734198331833,
-0.40508976578712463,
-0.04390167072415352,
-0.10944774001836777,
0.26145467162132263,
-0.4130733907222748,
0.7072532176971436,
-0.21280533075332642,
-0.2786579728126526,
0.007740329951047897,
-0.04816744849085808,
-0.09215038269758224,
0.18650951981544495,
-0.2121415138244629,
-0.38191932439804077,
-0.22606950998306274,
0.173415407538414,
0.04859102517366409,
0.37484660744667053,
-0.04616072401404381,
-0.14748723804950714,
-0.09382248669862747,
-0.12346405535936356,
0.04062727838754654,
0.12808051705360413,
0.3118191659450531,
-0.0018998794257640839,
0.19885733723640442,
-0.03279869630932808,
0.26752784848213196,
0.2237829566001892,
0.6339151263237,
-0.10645788162946701,
-0.6870294213294983,
0.05852962285280228,
-0.06843943893909454,
0.17005842924118042,
0.45944878458976746,
0.09557437896728516,
0.3866049647331238,
-0.36369505524635315,
0.11407245695590973,
-0.3710491359233856,
0.19127750396728516,
0.2654570937156677,
0.08417056500911713,
-0.34431004524230957,
-0.1326558142900467,
0.2998742163181305,
0.023508034646511078,
-0.13423897325992584,
0.24553972482681274,
0.9367734789848328,
-0.31878983974456787,
0.5409505367279053,
-0.14136560261249542,
1.0033704042434692,
0.025619061663746834,
0.42319732904434204,
0.28099632263183594,
-0.4333280324935913,
0.6217578649520874,
-0.26201751828193665,
-0.0035323016345500946,
-0.42063385248184204,
0.025446537882089615,
0.05331326276063919,
0.025886259973049164,
0.029813405126333237,
-0.26437506079673767,
-0.07161574065685272,
0.1853923499584198,
-0.21372264623641968,
0.5504489541053772,
-0.18524843454360962,
0.18715105950832367,
-0.09620016813278198,
-0.42404478788375854,
-0.15688928961753845,
0.21241536736488342,
-0.011570895090699196,
0.1431806981563568,
-0.1461666077375412,
0.006721474230289459,
-0.344632625579834,
0.004175454378128052,
-0.02446684241294861,
0.19816115498542786,
0.05090640112757683,
-0.18353912234306335,
0.043724965304136276,
-0.13275469839572906,
-0.059858985245227814,
-0.11435873806476593,
1.0006722211837769,
0.0069245873019099236,
-0.2422933280467987,
0.2318151891231537,
-0.23962755501270294,
0.20846855640411377,
-0.03630445897579193,
-0.1694645881652832,
0.1700008362531662,
0.021687187254428864,
-0.37960779666900635,
-0.1495327651500702,
0.11889614164829254,
-0.1315467357635498,
-0.07472050189971924,
0.05295143276453018,
0.08307655900716782,
-0.4339052140712738,
0.10350975394248962,
0.14721232652664185,
0.07970736920833588,
-0.2729911506175995,
0.10545456409454346,
-0.06572186201810837,
-0.1838650107383728,
-0.1389169991016388,
-0.00900870468467474,
-0.37692832946777344,
-0.049996938556432724,
0.010001406073570251,
0.1984853595495224,
0.19870276749134064,
0.16832411289215088,
-0.3958948254585266,
-0.062259282916784286,
-0.0819498673081398,
-0.18254169821739197,
0.43859750032424927,
-0.39738360047340393,
0.0718248039484024,
-0.12392060458660126,
-0.2540801167488098,
0.0998096615076065,
0.2231673151254654,
0.054531704634428024,
-0.07464607059955597,
-0.057024598121643066,
-0.10054543614387512,
-0.05113174766302109,
0.03461809083819389,
-0.21451377868652344,
0.10173691064119339,
0.2603514790534973,
0.202758327126503,
-0.17243242263793945,
0.04667159169912338,
-0.28888368606567383,
0.17305788397789001,
-0.0945029929280281,
0.2212722897529602,
-0.05770975723862648,
-0.2631433308124542,
0.05067907273769379,
-0.23213313519954681,
0.07571781426668167,
0.1735362559556961,
-0.230737566947937,
-0.23837721347808838,
-0.3798850178718567,
0.1566690355539322,
0.1725585013628006,
-0.1036723330616951,
-0.10195732116699219,
0.09310342371463776,
0.1086830198764801,
-0.27310553193092346,
0.6663407683372498,
0.2524029612541199,
-0.021757472306489944,
-0.25356581807136536,
0.8539038896560669,
0.10884953290224075,
-0.20060381293296814,
0.1622728407382965,
0.22788803279399872,
-0.0349600575864315,
-0.3551473319530487,
-0.021167559549212456,
-0.417603462934494,
-0.03228679299354553,
0.307204931974411,
0.3474805951118469,
0.6547709703445435,
0.1380648910999298,
-0.030784577131271362,
-0.14816835522651672,
-0.08384108543395996,
0.04037553817033768,
0.3304613530635834,
0.15826530754566193,
-0.16033713519573212,
-0.29257652163505554,
0.18597060441970825,
0.15798655152320862,
-0.12656432390213013,
-0.3595026433467865,
0.6165555715560913,
-0.06286454200744629,
0.09633414447307587,
0.3044627904891968,
0.6580751538276672,
0.2398742139339447,
-0.10078111290931702,
-0.10046687722206116,
0.5232782959938049,
-0.16502246260643005,
0.33581167459487915,
0.10404011607170105,
-0.2515929341316223,
0.18901222944259644,
0.43407875299453735,
0.11241107434034348,
-0.0643300712108612,
0.5753309726715088,
0.0966452807188034,
0.4571661949157715,
0.22271917760372162,
-0.2089390754699707,
0.4118124544620514,
-0.15909332036972046,
0.06448863446712494,
-0.09759178757667542,
0.015238184481859207,
0.08268800377845764,
0.13792438805103302,
0.24428044259548187,
-0.14261916279792786,
-0.35083723068237305,
-0.4052416682243347,
0.05619637295603752,
-0.40062636137008667,
-0.1708884984254837,
0.07933767139911652,
-0.05091501772403717,
-0.16169580817222595,
0.10880011320114136,
-0.24233387410640717,
-0.28904256224632263,
-0.037474051117897034,
-0.1654912233352661,
-0.008676107972860336,
-0.04437160864472389,
-0.15523864328861237,
0.12295311689376831,
0.13271750509738922,
-0.028219178318977356,
0.239038348197937,
0.029523033648729324,
-0.34726691246032715,
-0.008612276054918766,
0.30791786313056946,
0.3524678647518158,
-0.09737782925367355,
-0.028555700555443764,
0.09016966074705124,
0.36439651250839233,
0.13299426436424255,
0.07226812839508057,
-0.06755416095256805,
0.006089296191930771,
0.07196653634309769,
0.09461508691310883,
0.14286059141159058,
-0.13957703113555908,
-0.23822249472141266,
0.07178521156311035,
0.05087663605809212,
-0.28826990723609924,
0.32023704051971436,
-0.4579978287220001,
-0.160980224609375,
-0.15667185187339783,
0.20905698835849762,
-0.2820785343647003,
-0.162669375538826,
0.3944746255874634,
-0.09702666103839874,
0.14778026938438416,
-0.4504823386669159,
0.07281611859798431,
0.03426859900355339,
0.31305792927742004,
-0.003498038277029991,
-0.3764116168022156,
-0.23389089107513428,
-0.20591022074222565,
-0.5347474813461304,
0.6548901796340942,
-0.2989310026168823,
0.15617485344409943,
0.16271361708641052,
-0.14669401943683624,
-0.07339523732662201,
-0.10515842586755753,
-0.10497703403234482,
0.20678861439228058,
-0.06406062096357346,
-0.009253498166799545,
-0.20321106910705566,
0.10238340497016907,
0.1480119675397873,
-0.5023021101951599,
0.0621495395898819,
-0.25349169969558716,
0.3794822096824646,
0.14100536704063416,
-0.011313874274492264,
0.25654542446136475,
0.263011634349823,
0.21198125183582306,
-0.3605739176273346,
0.2156066596508026,
0.17518340051174164,
0.19271992146968842,
-0.04282510653138161,
-0.04067877680063248,
-0.17361488938331604,
-0.2942180335521698,
-0.5240721702575684,
0.16552838683128357,
-0.4019489586353302,
0.06369826197624207,
0.033196188509464264,
-0.19494500756263733,
-0.17799387872219086,
0.10164625942707062,
0.2791283428668976,
0.17898863554000854,
-0.1447395533323288,
0.2899530827999115,
-0.32634493708610535,
0.05746736750006676,
0.32403069734573364,
0.22841455042362213,
0.13152708113193512,
0.23535972833633423,
-0.10696305334568024,
-0.39469510316848755,
0.39391395449638367,
-0.14088653028011322,
-0.38701504468917847,
0.03746120259165764,
0.3415803909301758,
0.12050631642341614,
-0.40758535265922546,
-0.25619393587112427,
-0.01841726154088974,
0.12338203191757202,
-0.19340035319328308,
-0.033282071352005005,
0.261723130941391,
-0.23211973905563354,
-0.09920624643564224,
0.022709988057613373,
0.005024844780564308,
0.3209182024002075,
-0.2541312575340271,
0.597865879535675,
-0.22578281164169312
] |
https://github.com/huggingface/datasets/issues/6597 | Hmm, creating repo with implicit namespace (e.g. `create_repo("dataset_name")`) is a convenient feature used in a lot of integrations. It is not consistent with other HfApi methods specifically because it is the method to create repos. Once the repo is created, the return value provides the explicit repo_id (`namespace/repo_name`) that has to be passed to every `HfApi` method. Otherwise, libraries/scripts would often need to do a `whoami` call to get the namespace before creating a repo.
Another solution for https://github.com/huggingface/datasets/issues/6597#issuecomment-1893746690 could be that implicit namespace is allowed (same as today) except if the `repo_id` is in a hard-coded list of canonical datasets. This list can be maintained automatically and should be slowly decreasing. **Caveat:** as a normal user I wouldn't be able to implicitly push to `imagenet-1k` if I wanted to push to `Wauplin/imagenet-1k`. Shouldn't be too problematic, no? Worse case, would need to add a `whoami` call and allow implicit-canonical-name for non-HF users for instance (a bit too over-engineered IMO but doable). | Dataset.push_to_hub of a canonical dataset creates an additional dataset under the user namespace | While using `Dataset.push_to_hub` of a canonical dataset, an additional dataset was created under my user namespace.
## Steps to reproduce the bug
The command:
```python
commit_info = ds.push_to_hub(
"caner",
config_name="default",
commit_message="Convert dataset to Parquet",
commit_description="Convert dataset to Parquet.",
create_pr=True,
token=token,
)
```
creates the additional dataset `albertvillanova/caner`. | 162 | Dataset.push_to_hub of a canonical dataset creates an additional dataset under the user namespace
While using `Dataset.push_to_hub` of a canonical dataset, an additional dataset was created under my user namespace.
## Steps to reproduce the bug
The command:
```python
commit_info = ds.push_to_hub(
"caner",
config_name="default",
commit_message="Convert dataset to Parquet",
commit_description="Convert dataset to Parquet.",
create_pr=True,
token=token,
)
```
creates the additional dataset `albertvillanova/caner`.
Hmm, creating repo with implicit namespace (e.g. `create_repo("dataset_name")`) is a convenient feature used in a lot of integrations. It is not consistent with other HfApi methods specifically because it is the method to create repos. Once the repo is created, the return value provides the explicit repo_id (`namespace/repo_name`) that has to be passed to every `HfApi` method. Otherwise, libraries/scripts would often need to do a `whoami` call to get the namespace before creating a repo.
Another solution for https://github.com/huggingface/datasets/issues/6597#issuecomment-1893746690 could be that implicit namespace is allowed (same as today) except if the `repo_id` is in a hard-coded list of canonical datasets. This list can be maintained automatically and should be slowly decreasing. **Caveat:** as a normal user I wouldn't be able to implicitly push to `imagenet-1k` if I wanted to push to `Wauplin/imagenet-1k`. Shouldn't be too problematic, no? Worse case, would need to add a `whoami` call and allow implicit-canonical-name for non-HF users for instance (a bit too over-engineered IMO but doable). | [
-0.05977807939052582,
-0.03659529983997345,
0.11248317360877991,
0.10316121578216553,
0.3251781463623047,
-0.11299433559179306,
0.43455737829208374,
0.2440657913684845,
0.14013831317424774,
0.32332760095596313,
-0.33410531282424927,
0.3199589252471924,
0.16297756135463715,
0.12308022379875183,
0.20524966716766357,
0.03705506771802902,
0.26899945735931396,
0.014116492122411728,
0.006628796458244324,
-0.22308102250099182,
-0.41085660457611084,
0.04901973158121109,
0.29507768154144287,
0.1370788812637329,
-0.2578670382499695,
0.07038754969835281,
-0.1777668595314026,
0.22274252772331238,
0.04356729984283447,
-0.203155979514122,
0.37786975502967834,
0.26189714670181274,
-0.09016792476177216,
0.634026825428009,
-0.00011230853124288842,
0.1717502772808075,
0.3922570049762726,
0.1441270112991333,
-0.3107644319534302,
-0.08075900375843048,
-0.20740684866905212,
0.012277066707611084,
0.103012815117836,
-0.2285134494304657,
-0.06206190958619118,
0.2538836598396301,
-0.013530849479138851,
-0.23258128762245178,
0.15169569849967957,
-0.006102990359067917,
0.16763681173324585,
0.2778698205947876,
-0.09957729279994965,
-0.36867600679397583,
0.41225743293762207,
0.23840880393981934,
-0.33982184529304504,
-0.10506545007228851,
-0.08701138198375702,
0.046372219920158386,
0.050960931926965714,
0.1915317326784134,
0.12014555931091309,
0.045495424419641495,
0.2072119265794754,
0.21089166402816772,
0.040538862347602844,
-0.19295597076416016,
0.021484995260834694,
0.2253447026014328,
0.17963528633117676,
-0.33864593505859375,
-0.3816934823989868,
-0.22644957900047302,
-0.15401196479797363,
-0.23017609119415283,
0.1819608211517334,
0.22510835528373718,
-0.11296512186527252,
-0.024341000244021416,
-0.058869875967502594,
0.014443311840295792,
-0.08798623830080032,
-0.012742985039949417,
-0.17504580318927765,
0.24575559794902802,
0.04570920765399933,
0.1777157485485077,
0.1573440134525299,
-0.19769681990146637,
-0.06916916370391846,
-0.279570609331131,
0.07858727872371674,
-0.24952973425388336,
-0.1750980168581009,
-0.0972195640206337,
0.02976343408226967,
-0.014473862946033478,
0.3824990689754486,
-0.03153765946626663,
-0.12370114773511887,
0.05669250339269638,
-0.23988556861877441,
0.008628717623651028,
0.2893761992454529,
0.07227850705385208,
-0.09836028516292572,
0.20535723865032196,
0.35092756152153015,
0.32469478249549866,
0.10304426401853561,
0.028851032257080078,
0.03329809755086899,
0.04624954238533974,
0.18105900287628174,
-0.2683749794960022,
0.5649973154067993,
-0.2486787736415863,
-0.24442070722579956,
0.059520985931158066,
0.007769368588924408,
0.27374017238616943,
-0.15380440652370453,
0.27364885807037354,
0.055705513805150986,
0.030506066977977753,
-0.1247704029083252,
0.43659907579421997,
-0.16947202384471893,
-0.08578876405954361,
-0.23772338032722473,
-0.21054017543792725,
-0.2132616937160492,
0.021302636712789536,
0.026518896222114563,
-0.2536662220954895,
0.05268599092960358,
0.19195428490638733,
0.3829682767391205,
-0.13073314726352692,
-0.04512705281376839,
0.0953482985496521,
-0.11288292706012726,
0.3446022570133209,
0.19714996218681335,
0.1475694179534912,
0.17411671578884125,
-0.41458117961883545,
-0.18543002009391785,
0.060504112392663956,
-0.3984892666339874,
-0.1335357427597046,
-0.04425305873155594,
0.2050321251153946,
0.07946629077196121,
0.02480209246277809,
-0.5232733488082886,
-0.15538904070854187,
0.0306922048330307,
0.17921090126037598,
-0.007939085364341736,
-0.09638587385416031,
-0.04752564802765846,
-0.20108449459075928,
0.11173960566520691,
0.28311556577682495,
0.018902480602264404,
-0.10581114143133163,
-0.12211557477712631,
0.07169214636087418,
0.18955378234386444,
0.29178372025489807,
-0.13249363005161285,
-0.032615888863801956,
-0.28105100989341736,
0.12939436733722687,
0.025941070169210434,
-0.5734636783599854,
-0.2753417193889618,
0.03291894868016243,
-0.1165628507733345,
0.18140238523483276,
0.13757409155368805,
-0.04806030914187431,
0.2064935266971588,
-0.22442889213562012,
0.19285695254802704,
0.17536158859729767,
-0.02217523567378521,
0.22106431424617767,
-0.2980760931968689,
-0.1395142674446106,
-0.05131710693240166,
0.09401127696037292,
0.07193757593631744,
0.24052931368350983,
0.24585577845573425,
0.2226521074771881,
0.11160631477832794,
-0.24841263890266418,
0.3267415463924408,
0.021233126521110535,
0.43616926670074463,
0.15451861917972565,
0.13634498417377472,
0.04213327914476395,
-0.20511190593242645,
0.1020563542842865,
0.01938685029745102,
0.28069543838500977,
-0.0868142768740654,
-0.500942051410675,
-0.4004760980606079,
0.08439532667398453,
-0.3904734253883362,
-0.10661096125841141,
0.11625473201274872,
0.25406575202941895,
-0.1673847734928131,
-0.08771375566720963,
0.032512933015823364,
0.5732247829437256,
-0.1687871366739273,
0.394747257232666,
-0.37477245926856995,
0.5655501484870911,
0.017360655590891838,
0.002864006906747818,
0.07140220701694489,
0.4375894367694855,
0.372385174036026,
-0.29814350605010986,
-0.024470046162605286,
0.23756003379821777,
0.19451527297496796,
0.04841521754860878,
0.24582676589488983,
0.25487035512924194,
0.23098810017108917,
-0.24698247015476227,
0.21585793793201447,
0.1566026508808136,
0.19384735822677612,
0.04178816080093384,
-0.1450432538986206,
0.3656301498413086,
0.10969385504722595,
0.2056499719619751,
-0.17654168605804443,
0.10950259864330292,
0.36099329590797424,
-0.17717143893241882,
-0.0070060305297374725,
-0.25723618268966675,
-0.09981060773134232,
0.17334212362766266,
0.023699842393398285,
-0.018060242757201195,
-0.08680829405784607,
0.26353663206100464,
0.3738059997558594,
0.012372270226478577,
-0.01747918128967285,
0.08121839910745621,
-0.26163578033447266,
-0.1010502278804779,
0.0914246216416359,
0.26448386907577515,
0.04956935718655586,
0.14865857362747192,
-0.10524577647447586,
0.14222362637519836,
-0.22158506512641907,
-0.07483179122209549,
0.04586644470691681,
0.1500767320394516,
0.022371649742126465,
-0.13327372074127197,
0.34004005789756775,
-0.017127130180597305,
-0.24409162998199463,
0.15913079679012299,
0.03444787859916687,
0.1283804178237915,
-0.42770424485206604,
-0.09336134791374207,
-0.24211624264717102,
-0.15119343996047974,
-0.08244188129901886,
-0.01460878923535347,
-0.35733091831207275,
-0.45722904801368713,
-0.08255539834499359,
0.3527660071849823,
-0.1141914427280426,
0.2285502701997757,
0.12173959612846375,
0.29838961362838745,
-0.2679619789123535,
-0.06782541424036026,
-0.2455100119113922,
-0.14773429930210114,
-0.11707058548927307,
0.041269928216934204,
0.11775517463684082,
-0.20303824543952942,
0.3980371356010437,
-0.05060945078730583,
0.21222585439682007,
-0.5286516547203064,
-0.38128477334976196,
0.10706403851509094,
-0.2967281639575958,
0.18989942967891693,
-0.014814749360084534,
-0.13200414180755615,
0.332000732421875,
-0.1795870065689087,
0.15734407305717468,
-0.12707999348640442,
-0.27786120772361755,
0.1252453327178955,
-0.11666250973939896,
-0.18735840916633606,
-0.06816399842500687,
0.07208992540836334,
0.11329181492328644,
-0.18213051557540894,
0.036260806024074554,
0.188935786485672,
0.07376687228679657,
0.1180160790681839,
-0.3695157766342163,
0.10864855349063873,
0.06872624158859253,
-0.2227649837732315,
-0.30311447381973267,
-0.01214878261089325,
-0.031499892473220825,
-0.14489170908927917,
-0.18249203264713287,
0.09258480370044708,
-0.12615376710891724,
0.12557998299598694,
0.17452850937843323,
-0.3391905128955841,
-0.5050773620605469,
-0.20515002310276031,
0.5296434164047241,
0.0623447522521019,
0.03042914904654026,
0.28289327025413513,
0.047928545624017715,
-0.05438689514994621,
-0.1577134132385254,
-0.466619610786438,
0.1619076132774353,
0.3385436534881592,
-0.20668843388557434,
-0.03502049297094345,
0.06630502641201019,
-0.16076278686523438,
0.4012126624584198,
0.21560461819171906,
0.08648045361042023,
0.5967228412628174,
-0.07876411825418472,
0.4655742049217224,
-0.4287131130695343,
-0.11199747771024704,
0.12858818471431732,
0.11301102489233017,
0.09797251969575882,
0.37255895137786865,
0.04023386910557747,
-0.2036314308643341,
0.0889413133263588,
-0.30237680673599243,
-0.2249888926744461,
-0.45619434118270874,
-0.37538355588912964,
0.01021021418273449,
-0.13809862732887268,
0.19217517971992493,
-0.13134801387786865,
-0.2359384298324585,
-0.15506581962108612,
0.2635084390640259,
0.3689071536064148,
-0.2366134226322174,
0.043226249516010284,
-0.44148319959640503,
0.20942318439483643,
-0.3067355751991272,
0.19973129034042358,
-0.14148098230361938,
0.17441344261169434,
-0.009571023285388947,
0.034456200897693634,
0.2702353000640869,
-0.004533972591161728,
0.7913320064544678,
-0.44323113560676575,
0.2081916332244873,
-0.023518554866313934,
-0.10970473289489746,
-0.26367461681365967,
-0.05496501922607422,
-0.2429497092962265,
0.22934693098068237,
-0.2949514091014862,
0.6799044013023376,
-0.3741920590400696,
-0.3306266665458679,
0.11901417374610901,
-0.04772336408495903,
-0.06258207559585571,
0.19823111593723297,
-0.11185838282108307,
-0.2902217507362366,
-0.23593705892562866,
0.1526416391134262,
0.04284009337425232,
0.28630465269088745,
-0.08844472467899323,
-0.038136597722768784,
-0.1609308123588562,
0.013089895248413086,
-0.021062888205051422,
0.07664412260055542,
0.2748080790042877,
0.11203677952289581,
0.2862255871295929,
-0.08180688321590424,
0.37935343384742737,
0.35687902569770813,
0.5914340615272522,
-0.12718531489372253,
-0.7278500199317932,
0.029340073466300964,
-0.15585604310035706,
0.1739114224910736,
0.40829920768737793,
0.12985703349113464,
0.1092451736330986,
-0.37604331970214844,
0.1933450549840927,
-0.2902134358882904,
0.10441377758979797,
0.30081674456596375,
0.039049841463565826,
-0.3129197955131531,
-0.2547581195831299,
0.28986579179763794,
-0.044764094054698944,
-0.13220591843128204,
0.3073439598083496,
0.8300334811210632,
-0.3867587745189667,
0.5575939416885376,
-0.01991666853427887,
1.0052136182785034,
-0.04423756152391434,
0.3952365219593048,
0.2799164354801178,
-0.41095641255378723,
0.5700827240943909,
-0.30167144536972046,
-0.08866545557975769,
-0.3402063548564911,
0.16381032764911652,
0.12476201355457306,
0.05996514856815338,
0.04442637786269188,
-0.329018235206604,
-0.1822807788848877,
0.1487366259098053,
-0.16949717700481415,
0.5241379141807556,
-0.007938714697957039,
0.08051474392414093,
-0.017640238627791405,
-0.48786988854408264,
-0.07870741188526154,
0.228986918926239,
-0.04966035857796669,
0.01441505178809166,
-0.10185141861438751,
-0.05332859605550766,
-0.28934693336486816,
0.02413942664861679,
-0.0687224492430687,
0.29841724038124084,
-0.0816091001033783,
-0.1480739712715149,
0.1354524940252304,
0.05828094482421875,
0.05438512563705444,
-0.07296466827392578,
1.0307246446609497,
0.11740221083164215,
-0.2745482325553894,
0.19817110896110535,
-0.14001749455928802,
0.23253613710403442,
-0.05113277584314346,
-0.20182088017463684,
0.30608734488487244,
0.0037858188152313232,
-0.20375986397266388,
-0.3154503405094147,
0.037441615015268326,
-0.12220052629709244,
-0.047710493206977844,
-0.0565473772585392,
0.13125590980052948,
-0.4054866135120392,
0.18722105026245117,
0.18036684393882751,
0.07857063412666321,
-0.29734763503074646,
0.11458044499158859,
-0.19066883623600006,
-0.1481528878211975,
-0.2568823993206024,
0.015361068770289421,
-0.3979000747203827,
-0.010927197523415089,
0.011691346764564514,
0.18397250771522522,
0.2182171642780304,
0.19782675802707672,
-0.4198189079761505,
-0.08262035995721817,
-0.11097444593906403,
-0.1493099182844162,
0.3738681375980377,
-0.4965696930885315,
0.08486433327198029,
-0.14993125200271606,
-0.1856391280889511,
0.09948243945837021,
0.13872885704040527,
-0.002760405885055661,
-0.17108412086963654,
-0.04427554830908775,
-0.15887904167175293,
0.0027374327182769775,
-0.03429146856069565,
-0.3489267826080322,
0.014564594253897667,
0.09582504630088806,
0.2201911211013794,
-0.07019563019275665,
-0.009750822558999062,
-0.3177352845668793,
0.10260974615812302,
-0.19235029816627502,
0.16621237993240356,
0.11066776514053345,
-0.20263566076755524,
0.12242441624403,
-0.2745177149772644,
0.09538363665342331,
0.13999806344509125,
-0.28544116020202637,
-0.21602579951286316,
-0.4852214455604553,
0.1476907581090927,
0.17603549361228943,
-0.15891218185424805,
-0.047231774777173996,
-0.044204749166965485,
-0.03547920659184456,
-0.3067522644996643,
0.49938416481018066,
0.11762399226427078,
-0.10718603432178497,
-0.22938302159309387,
0.9484637379646301,
0.10505945980548859,
-0.16468565165996552,
0.19724076986312866,
0.14446137845516205,
0.06716340780258179,
-0.30126768350601196,
0.02211170084774494,
-0.45285263657569885,
-0.07848921418190002,
0.16553251445293427,
0.3220427334308624,
0.47888046503067017,
0.26104190945625305,
0.1446751058101654,
-0.24450550973415375,
-0.11698798835277557,
0.06535002589225769,
0.3642674684524536,
0.0666516125202179,
-0.18645422160625458,
-0.309261679649353,
0.21424797177314758,
0.15605339407920837,
-0.14865908026695251,
-0.25109246373176575,
0.5870227217674255,
-0.08507609367370605,
0.12667620182037354,
0.3474198281764984,
0.5995209813117981,
0.2717757225036621,
-0.029564306139945984,
-0.08964843302965164,
0.5845053195953369,
-0.2687779366970062,
0.27781006693840027,
0.23067232966423035,
-0.16290681064128876,
0.2642260193824768,
0.30887582898139954,
0.1345554143190384,
-0.09973670542240143,
0.4290516972541809,
-0.01926364004611969,
0.4643242061138153,
0.30409449338912964,
-0.1820554882287979,
0.3440558612346649,
-0.14024585485458374,
0.055206622928380966,
0.03586824983358383,
-0.005435485392808914,
0.13111373782157898,
0.003393009305000305,
0.26615971326828003,
-0.03825764358043671,
-0.3020477592945099,
-0.38542675971984863,
0.015233855694532394,
-0.2594309151172638,
-0.1314862072467804,
-0.17522433400154114,
-0.10279503464698792,
-0.32107287645339966,
0.10754507780075073,
-0.2530713379383087,
-0.15921221673488617,
0.17181922495365143,
-0.12175814807415009,
0.021495293825864792,
-0.1794995367527008,
-0.12150059640407562,
0.14204025268554688,
0.16687384247779846,
-0.109965480864048,
0.28610652685165405,
-0.05516964569687843,
-0.25823187828063965,
-0.0829109251499176,
0.4233897030353546,
0.3761536180973053,
-0.045732930302619934,
-0.04173262417316437,
0.047539111226797104,
0.35751697421073914,
0.1612488329410553,
0.07537424564361572,
-0.07630659639835358,
-0.056204210966825485,
0.09467661380767822,
0.1378220021724701,
0.10955868661403656,
-0.12288571894168854,
-0.11231954395771027,
-0.044840775430202484,
-0.008882353082299232,
-0.20617249608039856,
0.3139583468437195,
-0.28420567512512207,
-0.11000294238328934,
-0.05165095627307892,
0.13209587335586548,
-0.1856909990310669,
-0.16586333513259888,
0.4418795108795166,
-0.1472829282283783,
0.09241077303886414,
-0.3427301049232483,
0.0869549959897995,
0.030887380242347717,
0.32415279746055603,
0.18686184287071228,
-0.386003315448761,
-0.2514830231666565,
-0.16822540760040283,
-0.5709586143493652,
0.4791809618473053,
-0.4061506688594818,
-0.016731128096580505,
0.23577262461185455,
-0.050205573439598083,
0.10594993084669113,
-0.10445665568113327,
-0.15980875492095947,
-0.04891841113567352,
0.0374164804816246,
-0.08470034599304199,
-0.34522926807403564,
-0.015812668949365616,
0.13985179364681244,
-0.41669443249702454,
0.0917820855975151,
-0.3897078335285187,
0.3157920241355896,
0.20565073192119598,
-0.005865134298801422,
0.3575693666934967,
0.3436446487903595,
0.3068995177745819,
-0.39543789625167847,
0.16700232028961182,
0.13533353805541992,
0.1733723282814026,
-0.028249017894268036,
-0.09711441397666931,
-0.15419241786003113,
-0.3137553930282593,
-0.5140765309333801,
0.016465358436107635,
-0.34864649176597595,
0.09801508486270905,
-0.09060182422399521,
-0.16378086805343628,
-0.2127332091331482,
-0.03859354183077812,
0.20262673497200012,
0.22380603849887848,
-0.07583822309970856,
0.29624906182289124,
-0.26415014266967773,
-0.020931776612997055,
0.34456387162208557,
0.22010737657546997,
0.09890148788690567,
0.19624777138233185,
-0.1997479498386383,
-0.39908313751220703,
0.35904210805892944,
-0.18629103899002075,
-0.4825447201728821,
0.07403374463319778,
0.3602624535560608,
0.05898619815707207,
-0.4353143870830536,
-0.2106739580631256,
0.06056113541126251,
0.21184973418712616,
-0.12209643423557281,
-0.23922374844551086,
0.29694512486457825,
-0.16047237813472748,
-0.13587765395641327,
0.018756777048110962,
-0.13634702563285828,
0.272533118724823,
-0.2594897449016571,
0.4963993430137634,
-0.08892820030450821
] |
https://github.com/huggingface/datasets/issues/6597 | As canonical datasets are going to disappear in the following couple of months, I would not make any effort on their support.
I propose reverting #6519, so that the behavior of `push_to_hub` is aligned with the one described in its dosctring: "Also accepts `<dataset_name>`, which will default to the namespace of the logged-in user."
I'm opening a PR. | Dataset.push_to_hub of a canonical dataset creates an additional dataset under the user namespace | While using `Dataset.push_to_hub` of a canonical dataset, an additional dataset was created under my user namespace.
## Steps to reproduce the bug
The command:
```python
commit_info = ds.push_to_hub(
"caner",
config_name="default",
commit_message="Convert dataset to Parquet",
commit_description="Convert dataset to Parquet.",
create_pr=True,
token=token,
)
```
creates the additional dataset `albertvillanova/caner`. | 58 | Dataset.push_to_hub of a canonical dataset creates an additional dataset under the user namespace
While using `Dataset.push_to_hub` of a canonical dataset, an additional dataset was created under my user namespace.
## Steps to reproduce the bug
The command:
```python
commit_info = ds.push_to_hub(
"caner",
config_name="default",
commit_message="Convert dataset to Parquet",
commit_description="Convert dataset to Parquet.",
create_pr=True,
token=token,
)
```
creates the additional dataset `albertvillanova/caner`.
As canonical datasets are going to disappear in the following couple of months, I would not make any effort on their support.
I propose reverting #6519, so that the behavior of `push_to_hub` is aligned with the one described in its dosctring: "Also accepts `<dataset_name>`, which will default to the namespace of the logged-in user."
I'm opening a PR. | [
-0.11891815066337585,
-0.05135495960712433,
0.05666367709636688,
0.08923321962356567,
0.2523309886455536,
-0.1649923175573349,
0.24353288114070892,
0.13927210867404938,
-0.03309636563062668,
0.23708900809288025,
0.011932600289583206,
0.4353119730949402,
-0.10320337861776352,
0.06003129482269287,
0.28004300594329834,
0.048541247844696045,
0.33860939741134644,
0.020444165915250778,
-0.035493798553943634,
-0.08317258954048157,
-0.5006035566329956,
-0.013246928341686726,
0.10822488367557526,
0.15267254412174225,
-0.2815743684768677,
0.09620394557714462,
0.09897918999195099,
0.18556061387062073,
-0.055774033069610596,
-0.43649744987487793,
0.29661497473716736,
0.2090456336736679,
-0.08748824149370193,
0.48639175295829773,
-0.00011663133045658469,
0.045249246060848236,
0.39725741744041443,
0.15415102243423462,
-0.05295765772461891,
-0.1296321153640747,
-0.21777236461639404,
0.05721995234489441,
0.2456304430961609,
-0.12688803672790527,
-0.14092493057250977,
0.05054950714111328,
0.03049418143928051,
-0.3893197178840637,
-0.02994707226753235,
0.2032405138015747,
0.15665218234062195,
0.03775821626186371,
-0.01927054673433304,
-0.3978765606880188,
0.124422088265419,
0.2856203317642212,
-0.17489011585712433,
0.02312956005334854,
-0.027006831020116806,
-0.007649894803762436,
0.12415730953216553,
0.029999326914548874,
0.05990796536207199,
0.03689632564783096,
0.48747915029525757,
0.0767693743109703,
0.16468361020088196,
-0.2037990540266037,
0.04835999011993408,
0.0791485458612442,
0.11164941638708115,
-0.3534608483314514,
-0.07578955590724945,
-0.22314822673797607,
-0.1386028528213501,
-0.20959143340587616,
0.17252245545387268,
0.13079063594341278,
-0.1100715845823288,
0.06055289879441261,
0.026214107871055603,
-0.07827173173427582,
-0.14764872193336487,
-0.1486569046974182,
-0.4621342718601227,
0.44851216673851013,
-0.03155101090669632,
0.19710147380828857,
0.04596756026148796,
-0.1608695387840271,
0.3192278742790222,
-0.1202467828989029,
0.031665701419115067,
-0.5584366321563721,
-0.12431497126817703,
-0.0030810311436653137,
0.1961367428302765,
0.22912004590034485,
0.14684146642684937,
0.05361486226320267,
-0.03971850872039795,
-0.000025025568902492523,
-0.15962985157966614,
-0.1297701597213745,
0.2961072325706482,
-0.0017260909080505371,
0.07290208339691162,
0.3446643352508545,
0.17710527777671814,
0.20619596540927887,
-0.10209319740533829,
0.15252535045146942,
0.04353382810950279,
-0.32567134499549866,
0.19443248212337494,
-0.08964601159095764,
0.6540652513504028,
-0.011649809777736664,
-0.11285585910081863,
0.2444547712802887,
0.14503374695777893,
0.3590492010116577,
-0.0036361925303936005,
0.15064460039138794,
0.12320640683174133,
0.12770967185497284,
-0.2187453806400299,
0.2787615954875946,
-0.06442682445049286,
-0.07163193821907043,
-0.24592068791389465,
-0.0500231608748436,
-0.30617332458496094,
-0.15455666184425354,
0.046853139996528625,
-0.3228677213191986,
0.04361210763454437,
0.31579428911209106,
0.27717310190200806,
-0.2419682890176773,
-0.07974867522716522,
0.14639194309711456,
0.06949807703495026,
0.1787422001361847,
0.1539183109998703,
0.23447304964065552,
0.1058279499411583,
-0.5483894944190979,
-0.24577030539512634,
0.44044390320777893,
-0.3668965697288513,
-0.32181859016418457,
-0.12761200964450836,
0.19121506810188293,
-0.11991091072559357,
0.08933253586292267,
-0.45366138219833374,
0.0018806979060173035,
-0.09930254518985748,
0.10367214679718018,
0.10001608729362488,
-0.3523588180541992,
-0.04933268949389458,
-0.2823945879936218,
0.03218904137611389,
0.16209417581558228,
-0.08150289952754974,
0.11206753551959991,
-0.09638248383998871,
0.2030719816684723,
0.19323766231536865,
0.04063182324171066,
-0.2601463198661804,
0.05436905100941658,
-0.16269689798355103,
0.10244524478912354,
0.12058884650468826,
-0.5923395752906799,
-0.3941619098186493,
-0.3727356195449829,
-0.25960326194763184,
-0.010579794645309448,
0.17246036231517792,
-0.008845560252666473,
0.2895660102367401,
-0.08208683133125305,
0.2510779798030853,
0.061725836247205734,
0.14049582183361053,
0.2185530960559845,
-0.324007511138916,
-0.02931397780776024,
0.202956885099411,
-0.08481836318969727,
0.15878508985042572,
0.15926754474639893,
0.2639029622077942,
0.3451225757598877,
0.11155331134796143,
-0.14151732623577118,
0.23279617726802826,
0.06364960968494415,
0.39358121156692505,
-0.03264244273304939,
0.1233782172203064,
0.01144581288099289,
-0.18305031955242157,
0.11157800257205963,
0.24459700286388397,
0.21755236387252808,
-0.04634528607130051,
-0.3349955379962921,
-0.4790153205394745,
0.12598615884780884,
-0.4003435969352722,
-0.10879486799240112,
0.0882672592997551,
0.24949190020561218,
-0.10523545742034912,
-0.05185171589255333,
-0.12986122071743011,
0.38279008865356445,
-0.22883588075637817,
0.3223334550857544,
-0.34949636459350586,
0.4261358976364136,
0.07777541130781174,
-0.03180748596787453,
-0.060431547462940216,
0.30848681926727295,
0.4144720435142517,
-0.08667370676994324,
-0.026926422491669655,
0.20012763142585754,
0.2451748549938202,
0.27335551381111145,
0.004180907271802425,
0.20581553876399994,
0.16570550203323364,
-0.3988296687602997,
0.1354363113641739,
0.10560542345046997,
0.08311137557029724,
0.06037738919258118,
-0.2868897318840027,
0.4247514605522156,
-0.12739846110343933,
0.09689610451459885,
-0.28365299105644226,
0.11694525927305222,
0.2436811327934265,
-0.09742428362369537,
0.025655709207057953,
-0.21615342795848846,
-0.017762959003448486,
0.33454883098602295,
0.1312555968761444,
0.023624500259757042,
-0.05538178235292435,
0.26286622881889343,
0.21183165907859802,
0.15325796604156494,
0.08546385169029236,
0.015474657528102398,
-0.2481600046157837,
-0.14894999563694,
0.21014679968357086,
0.3480343520641327,
0.16972625255584717,
0.04751570150256157,
0.036885470151901245,
0.24493882060050964,
-0.09070966392755508,
-0.14268741011619568,
0.16427777707576752,
-0.029127582907676697,
-0.11468245089054108,
0.08829702436923981,
0.2919880747795105,
-0.14829276502132416,
-0.2831140160560608,
0.4085628092288971,
0.0715319961309433,
0.3098626434803009,
-0.3805638551712036,
-0.18830493092536926,
-0.22771409153938293,
-0.00018721818923950195,
-0.15234456956386566,
-0.0845845639705658,
-0.21859055757522583,
-0.4227384030818939,
-0.08299028873443604,
0.48648205399513245,
-0.16627690196037292,
0.10753326863050461,
0.119688019156456,
0.10077197104692459,
-0.17803926765918732,
0.03299415856599808,
-0.044525548815727234,
-0.08743961155414581,
-0.068583644926548,
0.026234135031700134,
0.06904895603656769,
-0.07633088529109955,
0.32611238956451416,
-0.08104443550109863,
0.33806464076042175,
-0.6109368801116943,
-0.45036622881889343,
0.04126203805208206,
-0.12824848294258118,
0.2611331641674042,
0.053336989134550095,
-0.0454496406018734,
0.24234122037887573,
-0.23174060881137848,
0.0025725625455379486,
-0.25343745946884155,
-0.06259416788816452,
-0.013757381588220596,
-0.1995553970336914,
-0.06942468136548996,
-0.008342228829860687,
-0.10856227576732635,
-0.07416864484548569,
-0.19079749286174774,
0.06200139597058296,
0.3626709580421448,
0.016255246475338936,
0.07256396114826202,
-0.28648537397384644,
-0.04878836125135422,
0.2459431290626526,
-0.30583828687667847,
-0.20855963230133057,
-0.17863819003105164,
0.0358547642827034,
-0.23484110832214355,
0.032226722687482834,
0.03379605710506439,
-0.172219380736351,
0.13312217593193054,
0.090268075466156,
-0.14299513399600983,
-0.46112266182899475,
-0.20861010253429413,
0.46193528175354004,
-0.0380205474793911,
-0.038415491580963135,
0.2686082720756531,
0.2875693142414093,
-0.009270533919334412,
-0.022984743118286133,
-0.40001440048217773,
-0.051394812762737274,
0.5264201164245605,
-0.2336486577987671,
-0.051839981228113174,
-0.15026909112930298,
-0.14122402667999268,
0.19145715236663818,
0.24376437067985535,
0.11617745459079742,
0.3911169171333313,
-0.05618342012166977,
0.452464759349823,
-0.31398680806159973,
-0.07929103076457977,
-0.0017397440969944,
0.16864293813705444,
-0.017561599612236023,
0.3547956347465515,
-0.015964534133672714,
-0.05350777134299278,
0.18244299292564392,
-0.3158637583255768,
-0.3143618404865265,
-0.49419769644737244,
-0.37396353483200073,
-0.21879711747169495,
-0.059089627116918564,
0.05248093605041504,
-0.15753783285617828,
-0.2583343982696533,
-0.26615187525749207,
0.0815424919128418,
0.3463146388530731,
-0.24214479327201843,
-0.028829514980316162,
-0.6320925951004028,
0.1985180824995041,
-0.38203662633895874,
0.06914936006069183,
-0.1785920262336731,
0.3096732497215271,
0.09834296256303787,
0.03620003163814545,
0.1567479819059372,
0.18063050508499146,
0.7975251078605652,
-0.5968824028968811,
0.31889790296554565,
-0.14961472153663635,
0.17794468998908997,
-0.18050271272659302,
-0.09510374814271927,
-0.03425776958465576,
0.4639583230018616,
-0.612617015838623,
0.4646787643432617,
-0.07161076366901398,
-0.11661083996295929,
-0.007944555021822453,
-0.11324302852153778,
-0.028589926660060883,
0.1699504256248474,
-0.11085467785596848,
-0.44443953037261963,
-0.10519067943096161,
0.2066785991191864,
0.3228000998497009,
0.2495768964290619,
-0.13493025302886963,
0.01666315644979477,
-0.18667446076869965,
-0.05915370583534241,
0.265353262424469,
-0.04245731234550476,
0.39325156807899475,
0.12755487859249115,
0.046042606234550476,
0.06732870638370514,
0.13467486202716827,
0.3194877803325653,
0.5517463088035583,
-0.10197747498750687,
-0.792567789554596,
-0.01557167898863554,
-0.09682241082191467,
0.2319941520690918,
0.5327823758125305,
0.0018606558442115784,
0.2225818634033203,
-0.29019421339035034,
-0.027050606906414032,
-0.25737982988357544,
0.26010769605636597,
0.1687895953655243,
0.02259138971567154,
-0.47205039858818054,
-0.2801082134246826,
0.23516936600208282,
0.12411333620548248,
-0.14405187964439392,
0.2493966519832611,
0.6235043406486511,
-0.4371246099472046,
0.4608389437198639,
-0.017207656055688858,
1.0583586692810059,
0.008003433234989643,
0.36619433760643005,
0.16031908988952637,
-0.3985464870929718,
0.8082411289215088,
-0.2661188840866089,
0.0026908814907073975,
-0.423404723405838,
0.03293123468756676,
0.007529206573963165,
-0.04153625667095184,
0.0561930313706398,
-0.26194149255752563,
-0.12923327088356018,
0.050694189965724945,
-0.25868719816207886,
0.6507608294487,
0.04621896892786026,
0.15963007509708405,
-0.03191077709197998,
-0.18084871768951416,
-0.011496614664793015,
0.15100514888763428,
-0.11933020502328873,
-0.10868538916110992,
-0.11978846043348312,
-0.010688889771699905,
-0.2714283764362335,
0.052590273320674896,
-0.17665505409240723,
0.21032842993736267,
0.14556026458740234,
0.022740382701158524,
-0.06461156904697418,
-0.16594277322292328,
0.04172912985086441,
0.15212270617485046,
0.9973570108413696,
0.23741699755191803,
-0.2782588601112366,
0.27666693925857544,
-0.06326339393854141,
0.2945006489753723,
0.09109959751367569,
-0.24627776443958282,
0.1108969897031784,
0.08123381435871124,
-0.19551509618759155,
-0.1022685319185257,
0.1617143750190735,
-0.26969629526138306,
-0.3577789068222046,
0.10200953483581543,
0.13207727670669556,
-0.38284099102020264,
0.07572552561759949,
0.1050117239356041,
-0.10486909747123718,
-0.24761897325515747,
0.09275037050247192,
-0.28201770782470703,
-0.09569501876831055,
-0.03090221807360649,
-0.17132753133773804,
-0.49784770607948303,
0.011580221354961395,
0.045933421701192856,
0.45052677392959595,
0.1705826371908188,
0.061596352607011795,
-0.3313209116458893,
-0.09244595468044281,
-0.0450553297996521,
-0.07746075093746185,
0.2247055619955063,
-0.31902241706848145,
0.1388399749994278,
-0.1998971700668335,
-0.04019278287887573,
0.2563377022743225,
0.08066625893115997,
0.083014577627182,
0.04493401199579239,
-0.011851072311401367,
0.04391545057296753,
0.05313751846551895,
-0.049218278378248215,
-0.3069734573364258,
0.12005899846553802,
0.2038859724998474,
0.3447510004043579,
-0.19493746757507324,
-0.1421063244342804,
-0.2653394043445587,
0.15362346172332764,
0.06913969665765762,
0.14897902309894562,
-0.1526767909526825,
-0.18474379181861877,
-0.23819243907928467,
-0.2618493139743805,
0.06858223676681519,
0.17037728428840637,
-0.16324186325073242,
-0.20469674468040466,
-0.26198723912239075,
0.18289121985435486,
0.2135663628578186,
-0.05163974314928055,
-0.16888244450092316,
-0.043993424624204636,
0.12607347965240479,
-0.08852201700210571,
0.2939351499080658,
0.3452841341495514,
-0.03491600975394249,
-0.1779932975769043,
0.9577744007110596,
0.20452453196048737,
-0.0912441611289978,
0.19412150979042053,
0.10100292414426804,
0.0318179726600647,
-0.40695005655288696,
0.19934889674186707,
-0.31468665599823,
-0.015343442559242249,
0.05050039291381836,
0.24429403245449066,
0.5553062558174133,
0.21609099209308624,
-0.061749882996082306,
-0.20015159249305725,
-0.12700270116329193,
0.010608185082674026,
0.3293534219264984,
0.23692595958709717,
-0.27563679218292236,
-0.283896803855896,
0.06304515153169632,
0.13039684295654297,
-0.08000892400741577,
-0.4311843514442444,
0.4808182716369629,
0.035950083285570145,
0.08223613351583481,
0.24216553568840027,
0.7051267623901367,
0.14911781251430511,
-0.1140524372458458,
-0.02627991884946823,
0.5228055715560913,
-0.3865283131599426,
0.49766725301742554,
0.2978450655937195,
-0.2560865879058838,
0.08088715374469757,
0.40866604447364807,
0.1950387805700302,
-0.08560539782047272,
0.6624047756195068,
0.18048298358917236,
0.49161893129348755,
0.3219645023345947,
-0.4123460352420807,
0.3709620237350464,
0.061292022466659546,
0.09074176847934723,
-0.05693582445383072,
-0.14162763953208923,
0.04101432114839554,
0.27029985189437866,
0.3173711895942688,
-0.20863422751426697,
-0.19167041778564453,
-0.29266485571861267,
-0.16475844383239746,
-0.37427979707717896,
-0.17476728558540344,
-0.06294675916433334,
-0.20040836930274963,
-0.32149538397789,
0.21467562019824982,
-0.41989392042160034,
-0.1083066314458847,
-0.034493982791900635,
-0.02163824811577797,
-0.12368088960647583,
-0.008786182850599289,
0.0505840964615345,
0.08224499225616455,
0.18905635178089142,
-0.1590639352798462,
0.2516714334487915,
-0.04045554995536804,
-0.2921704947948456,
-0.01734454184770584,
0.3293430507183075,
0.37823641300201416,
0.0878860205411911,
-0.1616813689470291,
-0.05989707261323929,
0.34660661220550537,
0.09445580840110779,
0.039276331663131714,
-0.06269368529319763,
0.058680228888988495,
0.12219752371311188,
0.03122057393193245,
0.16593196988105774,
-0.06783837825059891,
-0.009360188618302345,
0.019394338130950928,
-0.04162690043449402,
-0.20760506391525269,
0.05613924562931061,
-0.14520734548568726,
-0.20976226031780243,
0.16073179244995117,
0.1510443389415741,
-0.32227084040641785,
-0.36143913865089417,
0.5044333934783936,
0.08076818287372589,
0.12099410593509674,
-0.43210506439208984,
0.05507422983646393,
0.13946247100830078,
0.3081315755844116,
-0.04678645730018616,
-0.2746727466583252,
-0.2452649027109146,
-0.3692135214805603,
-0.6363661885261536,
0.7927396893501282,
-0.12685877084732056,
0.051235273480415344,
0.23253001272678375,
-0.24966147541999817,
-0.0033073686063289642,
-0.013976890593767166,
-0.3878430128097534,
0.1559598296880722,
-0.23806358873844147,
0.040150515735149384,
-0.19025570154190063,
0.0932379961013794,
0.29605725407600403,
-0.41785359382629395,
0.018571458756923676,
-0.254704087972641,
0.45595914125442505,
0.1663440465927124,
-0.009054049849510193,
-0.04176604002714157,
0.17393523454666138,
0.41046926379203796,
0.17491036653518677,
0.1809477061033249,
0.1555204540491104,
0.3445761799812317,
-0.10988739132881165,
0.10173607617616653,
-0.23830834031105042,
-0.32711929082870483,
-0.5210790038108826,
0.310211181640625,
-0.32997241616249084,
-0.04648124426603317,
-0.051065657287836075,
-0.23888806998729706,
-0.16207818686962128,
-0.22663259506225586,
0.24929915368556976,
0.35409632325172424,
-0.30535319447517395,
-0.06844346225261688,
-0.23055365681648254,
0.03869343176484108,
0.16531091928482056,
0.1915096640586853,
0.17086000740528107,
0.2518194913864136,
-0.0995904803276062,
-0.48617297410964966,
0.3014439046382904,
0.07245592772960663,
-0.5622507929801941,
-0.008606825023889542,
0.26571357250213623,
0.16364814341068268,
-0.22755120694637299,
-0.23056301474571228,
-0.09845203906297684,
0.26235952973365784,
-0.19916827976703644,
-0.006459251046180725,
0.23973917961120605,
-0.31216102838516235,
-0.07491490244865417,
-0.1108715832233429,
-0.0395553782582283,
0.36164921522140503,
-0.18626534938812256,
0.35387861728668213,
-0.23099026083946228
] |
https://github.com/huggingface/datasets/issues/6595 | Hi ! I think the issue comes from the "float16" features that are not supported yet in Parquet
Feel free to open an issue in `pyarrow` about this. In the meantime, I'd encourage you to use "float32" for your "pooled_prompt_embeds" and "prompt_embeds" features.
You can cast them to "float32" using
```python
from datasets import Value
ds = ds.cast_column("pooled_prompt_embeds", Value("float32"))
ds = ds.cast_column("prompt_embeds", Value("float32"))
``` | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 | ### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih | 64 | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
Hi ! I think the issue comes from the "float16" features that are not supported yet in Parquet
Feel free to open an issue in `pyarrow` about this. In the meantime, I'd encourage you to use "float32" for your "pooled_prompt_embeds" and "prompt_embeds" features.
You can cast them to "float32" using
```python
from datasets import Value
ds = ds.cast_column("pooled_prompt_embeds", Value("float32"))
ds = ds.cast_column("prompt_embeds", Value("float32"))
``` | [
-0.28692787885665894,
-0.0044410377740859985,
0.16262230277061462,
0.20641998946666718,
0.36014455556869507,
-0.21503600478172302,
0.30898481607437134,
0.37914708256721497,
-0.34722834825515747,
0.15772300958633423,
0.015633590519428253,
0.6490374207496643,
-0.33155137300491333,
0.27174314856529236,
0.03232838585972786,
0.07780680060386658,
0.044387124478816986,
0.10664567351341248,
0.00963687151670456,
0.0048987120389938354,
-0.15758396685123444,
-0.19536621868610382,
-0.14263565838336945,
-0.008043792098760605,
-0.2817932367324829,
0.00037721171975135803,
0.07331936061382294,
0.35752421617507935,
-0.2141372263431549,
-0.3937336802482605,
0.08243649452924728,
-0.12624694406986237,
0.21178603172302246,
0.28647738695144653,
-0.00012834150402341038,
0.06488712131977081,
0.40767624974250793,
0.03624340891838074,
-0.17105402052402496,
0.0033700168132781982,
0.2343895137310028,
-0.5461286306381226,
0.24369822442531586,
-0.35758259892463684,
0.05803541839122772,
-0.4624326229095459,
-0.13803523778915405,
0.33080971240997314,
0.17463010549545288,
0.25066423416137695,
0.12405610084533691,
0.0697508156299591,
0.16663311421871185,
0.3094941973686218,
0.6788209080696106,
0.3536756932735443,
-0.16680309176445007,
0.15855228900909424,
0.3307241201400757,
0.04394958168268204,
-0.43183979392051697,
0.15646421909332275,
0.09077764302492142,
-0.09082549810409546,
0.05356065183877945,
-0.04597010463476181,
-0.00040668994188308716,
-0.09710194170475006,
0.280001699924469,
0.14481139183044434,
0.23019567131996155,
-0.2740357518196106,
-0.22610828280448914,
-0.44828444719314575,
0.08256423473358154,
-0.42230916023254395,
0.30815255641937256,
0.30906522274017334,
-0.05385312810540199,
-0.13982877135276794,
-0.14953960478305817,
-0.31468409299850464,
-0.3078705966472626,
0.06161489337682724,
-0.18401801586151123,
0.4608347713947296,
-0.0480378195643425,
0.21515226364135742,
0.22612346708774567,
-0.2553112804889679,
0.20504365861415863,
0.02997533604502678,
-0.10449019074440002,
-0.06120007485151291,
-0.3290233612060547,
0.041264601051807404,
-0.078033447265625,
-0.03780768811702728,
0.1668643206357956,
0.12543977797031403,
-0.08024343103170395,
0.03766786307096481,
0.18836542963981628,
0.008389811962842941,
0.275597482919693,
0.19091089069843292,
-0.32839420437812805,
0.17092935740947723,
0.024846717715263367,
0.17379999160766602,
0.1079457551240921,
0.22107496857643127,
-0.27618104219436646,
-0.17445756494998932,
0.19315402209758759,
-0.14756394922733307,
0.40419018268585205,
-0.18426558375358582,
-0.22625389695167542,
0.08654677122831345,
-0.2322331964969635,
0.155229389667511,
0.08980399370193481,
0.2970046401023865,
-0.10243669152259827,
0.34675347805023193,
-0.15615585446357727,
0.2291359007358551,
-0.054334770888090134,
-0.007317960262298584,
-0.08237145841121674,
0.12905538082122803,
-0.1065257117152214,
-0.10816631466150284,
0.01833231747150421,
-0.30802851915359497,
0.028467662632465363,
0.04258029907941818,
0.0660407617688179,
-0.15129998326301575,
-0.13408830761909485,
-0.17006731033325195,
0.05530896782875061,
0.2526071071624756,
-0.18148986995220184,
0.13070470094680786,
-0.09777101129293442,
-0.1417735517024994,
-0.12302564829587936,
0.5319883823394775,
-0.49179941415786743,
-0.39513012766838074,
-0.43652814626693726,
0.08617695420980453,
-0.31598836183547974,
-0.06973753869533539,
-0.5748798251152039,
0.053794801235198975,
0.10401085019111633,
0.04331004619598389,
0.14214898645877838,
-0.3146522343158722,
-0.14436964690685272,
-0.3037573993206024,
0.2021169811487198,
0.0013077184557914734,
-0.5543399453163147,
0.0861220508813858,
0.09240235388278961,
-0.0743994414806366,
0.4539240002632141,
0.12665218114852905,
-0.296231210231781,
-0.09934785962104797,
-0.25425341725349426,
0.21887391805648804,
0.3095845878124237,
-0.3343796730041504,
-0.6185442805290222,
0.25418150424957275,
-0.31391483545303345,
0.14846298098564148,
0.12044719606637955,
-0.08597426116466522,
0.3489328622817993,
0.10245229303836823,
-0.12779581546783447,
0.3595367670059204,
-0.00784748699516058,
0.1956247091293335,
-0.44611167907714844,
-0.2642143666744232,
0.23005789518356323,
0.4100196957588196,
0.2968016266822815,
-0.1755615472793579,
0.23321053385734558,
0.10344618558883667,
0.27910134196281433,
-0.15002211928367615,
0.28916746377944946,
0.04790230095386505,
0.15392422676086426,
-0.08834744989871979,
-0.002467028796672821,
0.08344808220863342,
-0.594890832901001,
0.2965248227119446,
0.0477508008480072,
-0.08078782260417938,
-0.3421595096588135,
0.06908641755580902,
-0.18677596747875214,
0.30863484740257263,
-0.34628695249557495,
0.11969265341758728,
-0.022761544212698936,
-0.01871144026517868,
-0.028580300509929657,
0.1380607932806015,
-0.06199570745229721,
-0.15921145677566528,
-0.3845697045326233,
0.15430906414985657,
-0.0006786398589611053,
0.4430534243583679,
0.2269676774740219,
-0.41227516531944275,
-0.04970059171319008,
0.2720855474472046,
-0.017679810523986816,
-0.11930510401725769,
-0.2252207100391388,
0.3112631142139435,
-0.10421660542488098,
0.2572666108608246,
-0.38973844051361084,
-0.051454655826091766,
0.2198101431131363,
-0.3343258798122406,
0.04028276354074478,
0.07242009043693542,
0.18527854979038239,
-0.14531996846199036,
0.1698031723499298,
0.4245418608188629,
0.24095474183559418,
0.2904515266418457,
-0.010134086012840271,
-0.05459826439619064,
0.012592986226081848,
0.039926834404468536,
0.008881688117980957,
-0.16239458322525024,
0.008838442154228687,
0.13472050428390503,
0.26566922664642334,
0.053050898015499115,
-0.1601804494857788,
-0.04060773551464081,
0.3669394552707672,
-0.13288086652755737,
0.09428849071264267,
0.34957823157310486,
-0.3089854121208191,
-0.0002693459391593933,
0.24877378344535828,
0.10846177488565445,
0.07167858630418777,
0.10897835344076157,
0.01181017979979515,
0.11622335016727448,
0.02885151281952858,
0.050982505083084106,
0.041280657052993774,
0.22892649471759796,
0.604545533657074,
0.27275604009628296,
0.5209612250328064,
-0.15604262053966522,
-0.35989174246788025,
-0.028957948088645935,
0.07208938151597977,
0.37964364886283875,
-0.30939024686813354,
-0.023045670241117477,
-0.18052861094474792,
0.1293940544128418,
-0.20778098702430725,
-0.26482704281806946,
-0.1782638132572174,
-0.23459982872009277,
-0.006258354056626558,
0.3661822974681854,
-0.10901319235563278,
0.022802572697401047,
-0.504794716835022,
-0.027133986353874207,
0.018496006727218628,
-0.27501824498176575,
0.05059099197387695,
-0.17071092128753662,
-0.36962389945983887,
-0.02110457606613636,
0.4587472975254059,
-0.12515506148338318,
0.1882333904504776,
0.10954666882753372,
0.36828452348709106,
-0.4664030075073242,
-0.4941613972187042,
0.05754927918314934,
-0.1431126892566681,
-0.10074504464864731,
-0.09491655975580215,
-0.23862922191619873,
0.05986213684082031,
-0.2815753221511841,
0.24395814538002014,
-0.13518336415290833,
-0.314698189496994,
0.37958937883377075,
-0.25443974137306213,
0.13119395077228546,
-0.051734134554862976,
-0.06292867660522461,
-0.10624285787343979,
-0.2702234983444214,
0.1995532363653183,
0.25065261125564575,
0.24147990345954895,
-0.04999775066971779,
0.10889159142971039,
0.34600579738616943,
0.03145759552717209,
-0.18200407922267914,
0.03269542381167412,
-0.05292186141014099,
0.4130009412765503,
0.10543136298656464,
-0.35748153924942017,
0.18042714893817902,
-0.19938120245933533,
-0.08630204945802689,
0.3706178665161133,
-0.6093620657920837,
-0.07186820358037949,
-0.10554596036672592,
0.0535542368888855,
-0.21204666793346405,
-0.21262113749980927,
0.18315356969833374,
0.09810569882392883,
0.11497870832681656,
0.09448108077049255,
-0.13937070965766907,
0.1843811571598053,
0.18531151115894318,
0.1253596693277359,
-0.14149513840675354,
0.5173704028129578,
0.18273186683654785,
0.7609702944755554,
-0.2514157295227051,
-0.15328505635261536,
0.4215608835220337,
-0.004206467419862747,
0.03788496181368828,
-0.0025092773139476776,
-0.21491405367851257,
0.21247780323028564,
-0.11012335121631622,
0.11766456067562103,
0.2312818020582199,
-0.00467262789607048,
-0.3780919313430786,
0.05106711387634277,
0.00816192477941513,
-0.13097117841243744,
-0.15248221158981323,
0.16578003764152527,
-0.3027144968509674,
-0.173457533121109,
-0.23631538450717926,
-0.014544129371643066,
-0.03919021412730217,
-0.2933063209056854,
0.20753119885921478,
-0.03539060801267624,
-0.13088950514793396,
-0.003271784633398056,
-0.5666692852973938,
-0.12902413308620453,
-0.2909240424633026,
0.1284714639186859,
0.22086048126220703,
0.2876637279987335,
0.1764615774154663,
-0.4290253520011902,
0.34269237518310547,
-0.3482767641544342,
0.5372195243835449,
0.03365065157413483,
0.06724715232849121,
-0.026255004107952118,
-0.049901604652404785,
-0.6352043747901917,
-0.3425317406654358,
-0.23720985651016235,
0.09782671928405762,
-0.011633837595582008,
0.4497288465499878,
-0.37375980615615845,
-0.0046253502368927,
0.18555936217308044,
0.01582036167383194,
-0.2207271158695221,
-0.11730600893497467,
-0.3683891296386719,
-0.3900814652442932,
-0.16116251051425934,
0.21008646488189697,
-0.08549202978610992,
0.29503268003463745,
-0.16788676381111145,
0.016835637390613556,
-0.3898255228996277,
-0.12822921574115753,
-0.05260232090950012,
-0.025086771696805954,
0.33373787999153137,
0.002650834619998932,
0.1876506209373474,
-0.23384447395801544,
0.6536868214607239,
0.5415233969688416,
0.5010397434234619,
0.24643200635910034,
-0.3950539529323578,
0.1993260532617569,
0.0015073977410793304,
0.2977420687675476,
0.23868107795715332,
-0.1627882868051529,
0.3150475025177002,
-0.18478578329086304,
0.22801437973976135,
-0.36710095405578613,
0.2160699963569641,
0.32284075021743774,
-0.18221019208431244,
-0.20746314525604248,
0.13856923580169678,
0.5834920406341553,
0.2318260669708252,
0.013657256960868835,
-0.008939945138990879,
0.4135984182357788,
-0.24463817477226257,
0.22423872351646423,
0.17254453897476196,
0.9377955198287964,
-0.16507020592689514,
0.2108382135629654,
0.5665386319160461,
-0.2723202705383301,
0.1996874064207077,
0.1886368691921234,
0.03959786519408226,
-0.45790672302246094,
-0.06346439570188522,
0.09854656457901001,
-0.11666402220726013,
0.082853764295578,
0.014697459526360035,
0.04519137740135193,
0.10905759036540985,
-0.31836390495300293,
0.4060683250427246,
0.05332563817501068,
0.23933632671833038,
-0.07346481829881668,
-0.21219736337661743,
-0.3807991147041321,
-0.031983986496925354,
-0.12887339293956757,
-0.10769511014223099,
0.01231406256556511,
-0.1826002150774002,
-0.018371805548667908,
-0.25399571657180786,
-0.12476039677858353,
0.3193656802177429,
-0.26416024565696716,
0.08476407080888748,
0.052289366722106934,
-0.4152507185935974,
0.14123618602752686,
0.15897105634212494,
-0.21014940738677979,
-0.21267621219158173,
-0.09899556636810303,
-0.025041669607162476,
0.22496044635772705,
0.11330704391002655,
0.21585899591445923,
-0.04115910083055496,
0.28295785188674927,
-0.07864437997341156,
0.029086410999298096,
0.2765578627586365,
-0.09365473687648773,
-0.09817129373550415,
0.10659219324588776,
0.18263809382915497,
0.4168858230113983,
-0.14366690814495087,
-0.1832347810268402,
-0.14230811595916748,
0.07930241525173187,
-0.16993609070777893,
-0.013499293476343155,
-0.17892663180828094,
-0.0795440748333931,
0.029252927750349045,
0.10932968556880951,
-0.4153364300727844,
0.0435468927025795,
0.3104068338871002,
0.26022884249687195,
0.02336879074573517,
0.6574612855911255,
0.1011461541056633,
-0.1274321973323822,
-0.0027328431606292725,
0.043795160949230194,
0.4172667860984802,
-0.5469599962234497,
0.013855047523975372,
-0.11043375730514526,
0.03677062690258026,
-0.024795569479465485,
-0.04512740671634674,
0.16467256844043732,
-0.07169226557016373,
-0.25648194551467896,
-0.15067988634109497,
-0.44850218296051025,
0.20868071913719177,
-0.09615588188171387,
0.019732553511857986,
-0.2248377650976181,
0.011388421058654785,
-0.085748091340065,
0.12806576490402222,
-0.15794245898723602,
0.41796427965164185,
0.007664486765861511,
0.2007383555173874,
-0.17626440525054932,
-0.0410008430480957,
0.0777272880077362,
0.12619759142398834,
0.003964174538850784,
0.10371854901313782,
-0.03160195052623749,
-0.032059431076049805,
-0.13564956188201904,
0.13790513575077057,
0.24949640035629272,
-0.058961253613233566,
0.0010304450988769531,
-0.21521387994289398,
-0.04556751996278763,
0.09724458307027817,
0.3059769868850708,
0.028214186429977417,
-0.12514019012451172,
-0.3924717605113983,
0.6406344175338745,
0.028523892164230347,
-0.19758617877960205,
0.2864784300327301,
-0.18720051646232605,
0.289547324180603,
0.0917229950428009,
0.2597770392894745,
0.16811463236808777,
-0.011829443275928497,
-0.10842917859554291,
0.07066512852907181,
0.25520309805870056,
-0.01300356350839138,
0.11520706117153168,
-0.5115820169448853,
-0.044873591512441635,
-0.1531463861465454,
0.28612008690834045,
0.34986385703086853,
-0.28732776641845703,
-0.31640154123306274,
0.3721511662006378,
0.10377749800682068,
-0.17924967408180237,
-0.038160692900419235,
0.3873246908187866,
-0.17553922533988953,
-0.016284964978694916,
0.3582703471183777,
0.08701205253601074,
0.0912797749042511,
-0.4745889902114868,
0.22484688460826874,
-0.19880099594593048,
0.2047765851020813,
-0.09780913591384888,
0.5577723979949951,
-0.42872533202171326,
-0.06432685256004333,
0.527766227722168,
-0.028468556702136993,
0.24214275181293488,
0.23489627242088318,
-0.01083725318312645,
0.9540224075317383,
0.10424578189849854,
-0.019396429881453514,
0.19414818286895752,
-0.6462528109550476,
-0.18381737172603607,
0.28100454807281494,
0.08463999629020691,
0.06836876273155212,
-0.030822616070508957,
0.6247882843017578,
0.5054935812950134,
-0.29815900325775146,
-0.20873317122459412,
0.11152100563049316,
-0.35007697343826294,
-0.2414996325969696,
-0.0002682209014892578,
-0.32071393728256226,
-0.2228795289993286,
0.30384957790374756,
-0.25577956438064575,
-0.21012870967388153,
0.29467862844467163,
0.13642463088035583,
-0.18853265047073364,
-0.11754324287176132,
-0.012352032586932182,
0.35055989027023315,
0.12605030834674835,
-0.21098466217517853,
0.4667269289493561,
0.03488748148083687,
-0.008752629160881042,
-0.0008418653160333633,
-0.05305611714720726,
0.3887566030025482,
0.5587513446807861,
-0.25538015365600586,
-0.3039206862449646,
0.3673570454120636,
0.10891787707805634,
0.06696153432130814,
0.1895175278186798,
0.035410620272159576,
0.19887565076351166,
0.45779678225517273,
-0.0015284717082977295,
-0.13382965326309204,
0.02674785628914833,
0.07029777020215988,
0.11988351494073868,
0.0907236784696579,
0.13092133402824402,
-0.025602687150239944,
-0.2670104205608368,
-0.16739441454410553,
0.07153134047985077,
-0.08386416733264923,
-0.36983522772789,
0.33789288997650146,
0.010778550058603287,
0.13048896193504333,
-0.13841569423675537,
0.025288201868534088,
-0.13139232993125916,
0.5006673336029053,
0.44702959060668945,
-0.1341085135936737,
-0.11530622839927673,
-0.05443544685840607,
-0.5407018661499023,
0.5433887243270874,
-0.3874911963939667,
0.041204825043678284,
0.0914793387055397,
0.323763906955719,
-0.0644955188035965,
0.04292565584182739,
0.11541347950696945,
0.3992866277694702,
0.11660704016685486,
-0.05029482766985893,
-0.35721540451049805,
-0.014218704774975777,
0.2831236720085144,
-0.09338326752185822,
-0.14389577507972717,
-0.4796702563762665,
0.2346724569797516,
-0.10061018168926239,
-0.034008484333753586,
0.07000524550676346,
0.10943871736526489,
-0.15247729420661926,
-0.2076038271188736,
0.5004398822784424,
-0.11808068305253983,
0.364885151386261,
0.1840827614068985,
-0.14290916919708252,
-0.24913744628429413,
-0.26092007756233215,
-0.1742405891418457,
0.17882263660430908,
-0.0768154039978981,
0.3622146546840668,
0.040559910237789154,
0.23748016357421875,
-0.11797160655260086,
-0.17792339622974396,
-0.06395480036735535,
0.06468166410923004,
-0.07224631309509277,
0.24296365678310394,
-0.026193782687187195,
0.2886037230491638,
-0.028887491673231125,
-0.1097373366355896,
0.21014800667762756,
0.0283593088388443,
-0.21019145846366882,
-0.5273830890655518,
0.5341638326644897,
-0.2805638015270233,
-0.11210817843675613,
0.02702568843960762,
0.16643229126930237,
0.16392359137535095,
-0.04843372479081154,
-0.5384548902511597,
-0.022395916283130646,
0.21042267978191376,
-0.020939206704497337,
-0.10820503532886505,
0.11949830502271652,
-0.26638635993003845,
0.07350380718708038,
-0.16153913736343384,
0.08611112833023071,
-0.07548746466636658,
-0.0847281888127327,
-0.14078964293003082,
-0.29982349276542664
] |
https://github.com/huggingface/datasets/issues/6595 | @lhoestq hm. Thank you very much.
Do you think it won't have any impact on the training? That it won't break it or the quality won't degrade because of this?
I need to use it for [SDXL training](https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_sdxl.py) | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 | ### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih | 38 | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
@lhoestq hm. Thank you very much.
Do you think it won't have any impact on the training? That it won't break it or the quality won't degrade because of this?
I need to use it for [SDXL training](https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image_sdxl.py) | [
-0.28692787885665894,
-0.0044410377740859985,
0.16262230277061462,
0.20641998946666718,
0.36014455556869507,
-0.21503600478172302,
0.30898481607437134,
0.37914708256721497,
-0.34722834825515747,
0.15772300958633423,
0.015633590519428253,
0.6490374207496643,
-0.33155137300491333,
0.27174314856529236,
0.03232838585972786,
0.07780680060386658,
0.044387124478816986,
0.10664567351341248,
0.00963687151670456,
0.0048987120389938354,
-0.15758396685123444,
-0.19536621868610382,
-0.14263565838336945,
-0.008043792098760605,
-0.2817932367324829,
0.00037721171975135803,
0.07331936061382294,
0.35752421617507935,
-0.2141372263431549,
-0.3937336802482605,
0.08243649452924728,
-0.12624694406986237,
0.21178603172302246,
0.28647738695144653,
-0.00012834150402341038,
0.06488712131977081,
0.40767624974250793,
0.03624340891838074,
-0.17105402052402496,
0.0033700168132781982,
0.2343895137310028,
-0.5461286306381226,
0.24369822442531586,
-0.35758259892463684,
0.05803541839122772,
-0.4624326229095459,
-0.13803523778915405,
0.33080971240997314,
0.17463010549545288,
0.25066423416137695,
0.12405610084533691,
0.0697508156299591,
0.16663311421871185,
0.3094941973686218,
0.6788209080696106,
0.3536756932735443,
-0.16680309176445007,
0.15855228900909424,
0.3307241201400757,
0.04394958168268204,
-0.43183979392051697,
0.15646421909332275,
0.09077764302492142,
-0.09082549810409546,
0.05356065183877945,
-0.04597010463476181,
-0.00040668994188308716,
-0.09710194170475006,
0.280001699924469,
0.14481139183044434,
0.23019567131996155,
-0.2740357518196106,
-0.22610828280448914,
-0.44828444719314575,
0.08256423473358154,
-0.42230916023254395,
0.30815255641937256,
0.30906522274017334,
-0.05385312810540199,
-0.13982877135276794,
-0.14953960478305817,
-0.31468409299850464,
-0.3078705966472626,
0.06161489337682724,
-0.18401801586151123,
0.4608347713947296,
-0.0480378195643425,
0.21515226364135742,
0.22612346708774567,
-0.2553112804889679,
0.20504365861415863,
0.02997533604502678,
-0.10449019074440002,
-0.06120007485151291,
-0.3290233612060547,
0.041264601051807404,
-0.078033447265625,
-0.03780768811702728,
0.1668643206357956,
0.12543977797031403,
-0.08024343103170395,
0.03766786307096481,
0.18836542963981628,
0.008389811962842941,
0.275597482919693,
0.19091089069843292,
-0.32839420437812805,
0.17092935740947723,
0.024846717715263367,
0.17379999160766602,
0.1079457551240921,
0.22107496857643127,
-0.27618104219436646,
-0.17445756494998932,
0.19315402209758759,
-0.14756394922733307,
0.40419018268585205,
-0.18426558375358582,
-0.22625389695167542,
0.08654677122831345,
-0.2322331964969635,
0.155229389667511,
0.08980399370193481,
0.2970046401023865,
-0.10243669152259827,
0.34675347805023193,
-0.15615585446357727,
0.2291359007358551,
-0.054334770888090134,
-0.007317960262298584,
-0.08237145841121674,
0.12905538082122803,
-0.1065257117152214,
-0.10816631466150284,
0.01833231747150421,
-0.30802851915359497,
0.028467662632465363,
0.04258029907941818,
0.0660407617688179,
-0.15129998326301575,
-0.13408830761909485,
-0.17006731033325195,
0.05530896782875061,
0.2526071071624756,
-0.18148986995220184,
0.13070470094680786,
-0.09777101129293442,
-0.1417735517024994,
-0.12302564829587936,
0.5319883823394775,
-0.49179941415786743,
-0.39513012766838074,
-0.43652814626693726,
0.08617695420980453,
-0.31598836183547974,
-0.06973753869533539,
-0.5748798251152039,
0.053794801235198975,
0.10401085019111633,
0.04331004619598389,
0.14214898645877838,
-0.3146522343158722,
-0.14436964690685272,
-0.3037573993206024,
0.2021169811487198,
0.0013077184557914734,
-0.5543399453163147,
0.0861220508813858,
0.09240235388278961,
-0.0743994414806366,
0.4539240002632141,
0.12665218114852905,
-0.296231210231781,
-0.09934785962104797,
-0.25425341725349426,
0.21887391805648804,
0.3095845878124237,
-0.3343796730041504,
-0.6185442805290222,
0.25418150424957275,
-0.31391483545303345,
0.14846298098564148,
0.12044719606637955,
-0.08597426116466522,
0.3489328622817993,
0.10245229303836823,
-0.12779581546783447,
0.3595367670059204,
-0.00784748699516058,
0.1956247091293335,
-0.44611167907714844,
-0.2642143666744232,
0.23005789518356323,
0.4100196957588196,
0.2968016266822815,
-0.1755615472793579,
0.23321053385734558,
0.10344618558883667,
0.27910134196281433,
-0.15002211928367615,
0.28916746377944946,
0.04790230095386505,
0.15392422676086426,
-0.08834744989871979,
-0.002467028796672821,
0.08344808220863342,
-0.594890832901001,
0.2965248227119446,
0.0477508008480072,
-0.08078782260417938,
-0.3421595096588135,
0.06908641755580902,
-0.18677596747875214,
0.30863484740257263,
-0.34628695249557495,
0.11969265341758728,
-0.022761544212698936,
-0.01871144026517868,
-0.028580300509929657,
0.1380607932806015,
-0.06199570745229721,
-0.15921145677566528,
-0.3845697045326233,
0.15430906414985657,
-0.0006786398589611053,
0.4430534243583679,
0.2269676774740219,
-0.41227516531944275,
-0.04970059171319008,
0.2720855474472046,
-0.017679810523986816,
-0.11930510401725769,
-0.2252207100391388,
0.3112631142139435,
-0.10421660542488098,
0.2572666108608246,
-0.38973844051361084,
-0.051454655826091766,
0.2198101431131363,
-0.3343258798122406,
0.04028276354074478,
0.07242009043693542,
0.18527854979038239,
-0.14531996846199036,
0.1698031723499298,
0.4245418608188629,
0.24095474183559418,
0.2904515266418457,
-0.010134086012840271,
-0.05459826439619064,
0.012592986226081848,
0.039926834404468536,
0.008881688117980957,
-0.16239458322525024,
0.008838442154228687,
0.13472050428390503,
0.26566922664642334,
0.053050898015499115,
-0.1601804494857788,
-0.04060773551464081,
0.3669394552707672,
-0.13288086652755737,
0.09428849071264267,
0.34957823157310486,
-0.3089854121208191,
-0.0002693459391593933,
0.24877378344535828,
0.10846177488565445,
0.07167858630418777,
0.10897835344076157,
0.01181017979979515,
0.11622335016727448,
0.02885151281952858,
0.050982505083084106,
0.041280657052993774,
0.22892649471759796,
0.604545533657074,
0.27275604009628296,
0.5209612250328064,
-0.15604262053966522,
-0.35989174246788025,
-0.028957948088645935,
0.07208938151597977,
0.37964364886283875,
-0.30939024686813354,
-0.023045670241117477,
-0.18052861094474792,
0.1293940544128418,
-0.20778098702430725,
-0.26482704281806946,
-0.1782638132572174,
-0.23459982872009277,
-0.006258354056626558,
0.3661822974681854,
-0.10901319235563278,
0.022802572697401047,
-0.504794716835022,
-0.027133986353874207,
0.018496006727218628,
-0.27501824498176575,
0.05059099197387695,
-0.17071092128753662,
-0.36962389945983887,
-0.02110457606613636,
0.4587472975254059,
-0.12515506148338318,
0.1882333904504776,
0.10954666882753372,
0.36828452348709106,
-0.4664030075073242,
-0.4941613972187042,
0.05754927918314934,
-0.1431126892566681,
-0.10074504464864731,
-0.09491655975580215,
-0.23862922191619873,
0.05986213684082031,
-0.2815753221511841,
0.24395814538002014,
-0.13518336415290833,
-0.314698189496994,
0.37958937883377075,
-0.25443974137306213,
0.13119395077228546,
-0.051734134554862976,
-0.06292867660522461,
-0.10624285787343979,
-0.2702234983444214,
0.1995532363653183,
0.25065261125564575,
0.24147990345954895,
-0.04999775066971779,
0.10889159142971039,
0.34600579738616943,
0.03145759552717209,
-0.18200407922267914,
0.03269542381167412,
-0.05292186141014099,
0.4130009412765503,
0.10543136298656464,
-0.35748153924942017,
0.18042714893817902,
-0.19938120245933533,
-0.08630204945802689,
0.3706178665161133,
-0.6093620657920837,
-0.07186820358037949,
-0.10554596036672592,
0.0535542368888855,
-0.21204666793346405,
-0.21262113749980927,
0.18315356969833374,
0.09810569882392883,
0.11497870832681656,
0.09448108077049255,
-0.13937070965766907,
0.1843811571598053,
0.18531151115894318,
0.1253596693277359,
-0.14149513840675354,
0.5173704028129578,
0.18273186683654785,
0.7609702944755554,
-0.2514157295227051,
-0.15328505635261536,
0.4215608835220337,
-0.004206467419862747,
0.03788496181368828,
-0.0025092773139476776,
-0.21491405367851257,
0.21247780323028564,
-0.11012335121631622,
0.11766456067562103,
0.2312818020582199,
-0.00467262789607048,
-0.3780919313430786,
0.05106711387634277,
0.00816192477941513,
-0.13097117841243744,
-0.15248221158981323,
0.16578003764152527,
-0.3027144968509674,
-0.173457533121109,
-0.23631538450717926,
-0.014544129371643066,
-0.03919021412730217,
-0.2933063209056854,
0.20753119885921478,
-0.03539060801267624,
-0.13088950514793396,
-0.003271784633398056,
-0.5666692852973938,
-0.12902413308620453,
-0.2909240424633026,
0.1284714639186859,
0.22086048126220703,
0.2876637279987335,
0.1764615774154663,
-0.4290253520011902,
0.34269237518310547,
-0.3482767641544342,
0.5372195243835449,
0.03365065157413483,
0.06724715232849121,
-0.026255004107952118,
-0.049901604652404785,
-0.6352043747901917,
-0.3425317406654358,
-0.23720985651016235,
0.09782671928405762,
-0.011633837595582008,
0.4497288465499878,
-0.37375980615615845,
-0.0046253502368927,
0.18555936217308044,
0.01582036167383194,
-0.2207271158695221,
-0.11730600893497467,
-0.3683891296386719,
-0.3900814652442932,
-0.16116251051425934,
0.21008646488189697,
-0.08549202978610992,
0.29503268003463745,
-0.16788676381111145,
0.016835637390613556,
-0.3898255228996277,
-0.12822921574115753,
-0.05260232090950012,
-0.025086771696805954,
0.33373787999153137,
0.002650834619998932,
0.1876506209373474,
-0.23384447395801544,
0.6536868214607239,
0.5415233969688416,
0.5010397434234619,
0.24643200635910034,
-0.3950539529323578,
0.1993260532617569,
0.0015073977410793304,
0.2977420687675476,
0.23868107795715332,
-0.1627882868051529,
0.3150475025177002,
-0.18478578329086304,
0.22801437973976135,
-0.36710095405578613,
0.2160699963569641,
0.32284075021743774,
-0.18221019208431244,
-0.20746314525604248,
0.13856923580169678,
0.5834920406341553,
0.2318260669708252,
0.013657256960868835,
-0.008939945138990879,
0.4135984182357788,
-0.24463817477226257,
0.22423872351646423,
0.17254453897476196,
0.9377955198287964,
-0.16507020592689514,
0.2108382135629654,
0.5665386319160461,
-0.2723202705383301,
0.1996874064207077,
0.1886368691921234,
0.03959786519408226,
-0.45790672302246094,
-0.06346439570188522,
0.09854656457901001,
-0.11666402220726013,
0.082853764295578,
0.014697459526360035,
0.04519137740135193,
0.10905759036540985,
-0.31836390495300293,
0.4060683250427246,
0.05332563817501068,
0.23933632671833038,
-0.07346481829881668,
-0.21219736337661743,
-0.3807991147041321,
-0.031983986496925354,
-0.12887339293956757,
-0.10769511014223099,
0.01231406256556511,
-0.1826002150774002,
-0.018371805548667908,
-0.25399571657180786,
-0.12476039677858353,
0.3193656802177429,
-0.26416024565696716,
0.08476407080888748,
0.052289366722106934,
-0.4152507185935974,
0.14123618602752686,
0.15897105634212494,
-0.21014940738677979,
-0.21267621219158173,
-0.09899556636810303,
-0.025041669607162476,
0.22496044635772705,
0.11330704391002655,
0.21585899591445923,
-0.04115910083055496,
0.28295785188674927,
-0.07864437997341156,
0.029086410999298096,
0.2765578627586365,
-0.09365473687648773,
-0.09817129373550415,
0.10659219324588776,
0.18263809382915497,
0.4168858230113983,
-0.14366690814495087,
-0.1832347810268402,
-0.14230811595916748,
0.07930241525173187,
-0.16993609070777893,
-0.013499293476343155,
-0.17892663180828094,
-0.0795440748333931,
0.029252927750349045,
0.10932968556880951,
-0.4153364300727844,
0.0435468927025795,
0.3104068338871002,
0.26022884249687195,
0.02336879074573517,
0.6574612855911255,
0.1011461541056633,
-0.1274321973323822,
-0.0027328431606292725,
0.043795160949230194,
0.4172667860984802,
-0.5469599962234497,
0.013855047523975372,
-0.11043375730514526,
0.03677062690258026,
-0.024795569479465485,
-0.04512740671634674,
0.16467256844043732,
-0.07169226557016373,
-0.25648194551467896,
-0.15067988634109497,
-0.44850218296051025,
0.20868071913719177,
-0.09615588188171387,
0.019732553511857986,
-0.2248377650976181,
0.011388421058654785,
-0.085748091340065,
0.12806576490402222,
-0.15794245898723602,
0.41796427965164185,
0.007664486765861511,
0.2007383555173874,
-0.17626440525054932,
-0.0410008430480957,
0.0777272880077362,
0.12619759142398834,
0.003964174538850784,
0.10371854901313782,
-0.03160195052623749,
-0.032059431076049805,
-0.13564956188201904,
0.13790513575077057,
0.24949640035629272,
-0.058961253613233566,
0.0010304450988769531,
-0.21521387994289398,
-0.04556751996278763,
0.09724458307027817,
0.3059769868850708,
0.028214186429977417,
-0.12514019012451172,
-0.3924717605113983,
0.6406344175338745,
0.028523892164230347,
-0.19758617877960205,
0.2864784300327301,
-0.18720051646232605,
0.289547324180603,
0.0917229950428009,
0.2597770392894745,
0.16811463236808777,
-0.011829443275928497,
-0.10842917859554291,
0.07066512852907181,
0.25520309805870056,
-0.01300356350839138,
0.11520706117153168,
-0.5115820169448853,
-0.044873591512441635,
-0.1531463861465454,
0.28612008690834045,
0.34986385703086853,
-0.28732776641845703,
-0.31640154123306274,
0.3721511662006378,
0.10377749800682068,
-0.17924967408180237,
-0.038160692900419235,
0.3873246908187866,
-0.17553922533988953,
-0.016284964978694916,
0.3582703471183777,
0.08701205253601074,
0.0912797749042511,
-0.4745889902114868,
0.22484688460826874,
-0.19880099594593048,
0.2047765851020813,
-0.09780913591384888,
0.5577723979949951,
-0.42872533202171326,
-0.06432685256004333,
0.527766227722168,
-0.028468556702136993,
0.24214275181293488,
0.23489627242088318,
-0.01083725318312645,
0.9540224075317383,
0.10424578189849854,
-0.019396429881453514,
0.19414818286895752,
-0.6462528109550476,
-0.18381737172603607,
0.28100454807281494,
0.08463999629020691,
0.06836876273155212,
-0.030822616070508957,
0.6247882843017578,
0.5054935812950134,
-0.29815900325775146,
-0.20873317122459412,
0.11152100563049316,
-0.35007697343826294,
-0.2414996325969696,
-0.0002682209014892578,
-0.32071393728256226,
-0.2228795289993286,
0.30384957790374756,
-0.25577956438064575,
-0.21012870967388153,
0.29467862844467163,
0.13642463088035583,
-0.18853265047073364,
-0.11754324287176132,
-0.012352032586932182,
0.35055989027023315,
0.12605030834674835,
-0.21098466217517853,
0.4667269289493561,
0.03488748148083687,
-0.008752629160881042,
-0.0008418653160333633,
-0.05305611714720726,
0.3887566030025482,
0.5587513446807861,
-0.25538015365600586,
-0.3039206862449646,
0.3673570454120636,
0.10891787707805634,
0.06696153432130814,
0.1895175278186798,
0.035410620272159576,
0.19887565076351166,
0.45779678225517273,
-0.0015284717082977295,
-0.13382965326309204,
0.02674785628914833,
0.07029777020215988,
0.11988351494073868,
0.0907236784696579,
0.13092133402824402,
-0.025602687150239944,
-0.2670104205608368,
-0.16739441454410553,
0.07153134047985077,
-0.08386416733264923,
-0.36983522772789,
0.33789288997650146,
0.010778550058603287,
0.13048896193504333,
-0.13841569423675537,
0.025288201868534088,
-0.13139232993125916,
0.5006673336029053,
0.44702959060668945,
-0.1341085135936737,
-0.11530622839927673,
-0.05443544685840607,
-0.5407018661499023,
0.5433887243270874,
-0.3874911963939667,
0.041204825043678284,
0.0914793387055397,
0.323763906955719,
-0.0644955188035965,
0.04292565584182739,
0.11541347950696945,
0.3992866277694702,
0.11660704016685486,
-0.05029482766985893,
-0.35721540451049805,
-0.014218704774975777,
0.2831236720085144,
-0.09338326752185822,
-0.14389577507972717,
-0.4796702563762665,
0.2346724569797516,
-0.10061018168926239,
-0.034008484333753586,
0.07000524550676346,
0.10943871736526489,
-0.15247729420661926,
-0.2076038271188736,
0.5004398822784424,
-0.11808068305253983,
0.364885151386261,
0.1840827614068985,
-0.14290916919708252,
-0.24913744628429413,
-0.26092007756233215,
-0.1742405891418457,
0.17882263660430908,
-0.0768154039978981,
0.3622146546840668,
0.040559910237789154,
0.23748016357421875,
-0.11797160655260086,
-0.17792339622974396,
-0.06395480036735535,
0.06468166410923004,
-0.07224631309509277,
0.24296365678310394,
-0.026193782687187195,
0.2886037230491638,
-0.028887491673231125,
-0.1097373366355896,
0.21014800667762756,
0.0283593088388443,
-0.21019145846366882,
-0.5273830890655518,
0.5341638326644897,
-0.2805638015270233,
-0.11210817843675613,
0.02702568843960762,
0.16643229126930237,
0.16392359137535095,
-0.04843372479081154,
-0.5384548902511597,
-0.022395916283130646,
0.21042267978191376,
-0.020939206704497337,
-0.10820503532886505,
0.11949830502271652,
-0.26638635993003845,
0.07350380718708038,
-0.16153913736343384,
0.08611112833023071,
-0.07548746466636658,
-0.0847281888127327,
-0.14078964293003082,
-0.29982349276542664
] |
https://github.com/huggingface/datasets/issues/6595 | Increasing the precision should not degrade training (it only increases the precision), but make sure that it doesn't break your pytorch code (e.g. if it expects a float16 instead of a float32 somewhere) | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 | ### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih | 33 | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
Increasing the precision should not degrade training (it only increases the precision), but make sure that it doesn't break your pytorch code (e.g. if it expects a float16 instead of a float32 somewhere) | [
-0.28692787885665894,
-0.0044410377740859985,
0.16262230277061462,
0.20641998946666718,
0.36014455556869507,
-0.21503600478172302,
0.30898481607437134,
0.37914708256721497,
-0.34722834825515747,
0.15772300958633423,
0.015633590519428253,
0.6490374207496643,
-0.33155137300491333,
0.27174314856529236,
0.03232838585972786,
0.07780680060386658,
0.044387124478816986,
0.10664567351341248,
0.00963687151670456,
0.0048987120389938354,
-0.15758396685123444,
-0.19536621868610382,
-0.14263565838336945,
-0.008043792098760605,
-0.2817932367324829,
0.00037721171975135803,
0.07331936061382294,
0.35752421617507935,
-0.2141372263431549,
-0.3937336802482605,
0.08243649452924728,
-0.12624694406986237,
0.21178603172302246,
0.28647738695144653,
-0.00012834150402341038,
0.06488712131977081,
0.40767624974250793,
0.03624340891838074,
-0.17105402052402496,
0.0033700168132781982,
0.2343895137310028,
-0.5461286306381226,
0.24369822442531586,
-0.35758259892463684,
0.05803541839122772,
-0.4624326229095459,
-0.13803523778915405,
0.33080971240997314,
0.17463010549545288,
0.25066423416137695,
0.12405610084533691,
0.0697508156299591,
0.16663311421871185,
0.3094941973686218,
0.6788209080696106,
0.3536756932735443,
-0.16680309176445007,
0.15855228900909424,
0.3307241201400757,
0.04394958168268204,
-0.43183979392051697,
0.15646421909332275,
0.09077764302492142,
-0.09082549810409546,
0.05356065183877945,
-0.04597010463476181,
-0.00040668994188308716,
-0.09710194170475006,
0.280001699924469,
0.14481139183044434,
0.23019567131996155,
-0.2740357518196106,
-0.22610828280448914,
-0.44828444719314575,
0.08256423473358154,
-0.42230916023254395,
0.30815255641937256,
0.30906522274017334,
-0.05385312810540199,
-0.13982877135276794,
-0.14953960478305817,
-0.31468409299850464,
-0.3078705966472626,
0.06161489337682724,
-0.18401801586151123,
0.4608347713947296,
-0.0480378195643425,
0.21515226364135742,
0.22612346708774567,
-0.2553112804889679,
0.20504365861415863,
0.02997533604502678,
-0.10449019074440002,
-0.06120007485151291,
-0.3290233612060547,
0.041264601051807404,
-0.078033447265625,
-0.03780768811702728,
0.1668643206357956,
0.12543977797031403,
-0.08024343103170395,
0.03766786307096481,
0.18836542963981628,
0.008389811962842941,
0.275597482919693,
0.19091089069843292,
-0.32839420437812805,
0.17092935740947723,
0.024846717715263367,
0.17379999160766602,
0.1079457551240921,
0.22107496857643127,
-0.27618104219436646,
-0.17445756494998932,
0.19315402209758759,
-0.14756394922733307,
0.40419018268585205,
-0.18426558375358582,
-0.22625389695167542,
0.08654677122831345,
-0.2322331964969635,
0.155229389667511,
0.08980399370193481,
0.2970046401023865,
-0.10243669152259827,
0.34675347805023193,
-0.15615585446357727,
0.2291359007358551,
-0.054334770888090134,
-0.007317960262298584,
-0.08237145841121674,
0.12905538082122803,
-0.1065257117152214,
-0.10816631466150284,
0.01833231747150421,
-0.30802851915359497,
0.028467662632465363,
0.04258029907941818,
0.0660407617688179,
-0.15129998326301575,
-0.13408830761909485,
-0.17006731033325195,
0.05530896782875061,
0.2526071071624756,
-0.18148986995220184,
0.13070470094680786,
-0.09777101129293442,
-0.1417735517024994,
-0.12302564829587936,
0.5319883823394775,
-0.49179941415786743,
-0.39513012766838074,
-0.43652814626693726,
0.08617695420980453,
-0.31598836183547974,
-0.06973753869533539,
-0.5748798251152039,
0.053794801235198975,
0.10401085019111633,
0.04331004619598389,
0.14214898645877838,
-0.3146522343158722,
-0.14436964690685272,
-0.3037573993206024,
0.2021169811487198,
0.0013077184557914734,
-0.5543399453163147,
0.0861220508813858,
0.09240235388278961,
-0.0743994414806366,
0.4539240002632141,
0.12665218114852905,
-0.296231210231781,
-0.09934785962104797,
-0.25425341725349426,
0.21887391805648804,
0.3095845878124237,
-0.3343796730041504,
-0.6185442805290222,
0.25418150424957275,
-0.31391483545303345,
0.14846298098564148,
0.12044719606637955,
-0.08597426116466522,
0.3489328622817993,
0.10245229303836823,
-0.12779581546783447,
0.3595367670059204,
-0.00784748699516058,
0.1956247091293335,
-0.44611167907714844,
-0.2642143666744232,
0.23005789518356323,
0.4100196957588196,
0.2968016266822815,
-0.1755615472793579,
0.23321053385734558,
0.10344618558883667,
0.27910134196281433,
-0.15002211928367615,
0.28916746377944946,
0.04790230095386505,
0.15392422676086426,
-0.08834744989871979,
-0.002467028796672821,
0.08344808220863342,
-0.594890832901001,
0.2965248227119446,
0.0477508008480072,
-0.08078782260417938,
-0.3421595096588135,
0.06908641755580902,
-0.18677596747875214,
0.30863484740257263,
-0.34628695249557495,
0.11969265341758728,
-0.022761544212698936,
-0.01871144026517868,
-0.028580300509929657,
0.1380607932806015,
-0.06199570745229721,
-0.15921145677566528,
-0.3845697045326233,
0.15430906414985657,
-0.0006786398589611053,
0.4430534243583679,
0.2269676774740219,
-0.41227516531944275,
-0.04970059171319008,
0.2720855474472046,
-0.017679810523986816,
-0.11930510401725769,
-0.2252207100391388,
0.3112631142139435,
-0.10421660542488098,
0.2572666108608246,
-0.38973844051361084,
-0.051454655826091766,
0.2198101431131363,
-0.3343258798122406,
0.04028276354074478,
0.07242009043693542,
0.18527854979038239,
-0.14531996846199036,
0.1698031723499298,
0.4245418608188629,
0.24095474183559418,
0.2904515266418457,
-0.010134086012840271,
-0.05459826439619064,
0.012592986226081848,
0.039926834404468536,
0.008881688117980957,
-0.16239458322525024,
0.008838442154228687,
0.13472050428390503,
0.26566922664642334,
0.053050898015499115,
-0.1601804494857788,
-0.04060773551464081,
0.3669394552707672,
-0.13288086652755737,
0.09428849071264267,
0.34957823157310486,
-0.3089854121208191,
-0.0002693459391593933,
0.24877378344535828,
0.10846177488565445,
0.07167858630418777,
0.10897835344076157,
0.01181017979979515,
0.11622335016727448,
0.02885151281952858,
0.050982505083084106,
0.041280657052993774,
0.22892649471759796,
0.604545533657074,
0.27275604009628296,
0.5209612250328064,
-0.15604262053966522,
-0.35989174246788025,
-0.028957948088645935,
0.07208938151597977,
0.37964364886283875,
-0.30939024686813354,
-0.023045670241117477,
-0.18052861094474792,
0.1293940544128418,
-0.20778098702430725,
-0.26482704281806946,
-0.1782638132572174,
-0.23459982872009277,
-0.006258354056626558,
0.3661822974681854,
-0.10901319235563278,
0.022802572697401047,
-0.504794716835022,
-0.027133986353874207,
0.018496006727218628,
-0.27501824498176575,
0.05059099197387695,
-0.17071092128753662,
-0.36962389945983887,
-0.02110457606613636,
0.4587472975254059,
-0.12515506148338318,
0.1882333904504776,
0.10954666882753372,
0.36828452348709106,
-0.4664030075073242,
-0.4941613972187042,
0.05754927918314934,
-0.1431126892566681,
-0.10074504464864731,
-0.09491655975580215,
-0.23862922191619873,
0.05986213684082031,
-0.2815753221511841,
0.24395814538002014,
-0.13518336415290833,
-0.314698189496994,
0.37958937883377075,
-0.25443974137306213,
0.13119395077228546,
-0.051734134554862976,
-0.06292867660522461,
-0.10624285787343979,
-0.2702234983444214,
0.1995532363653183,
0.25065261125564575,
0.24147990345954895,
-0.04999775066971779,
0.10889159142971039,
0.34600579738616943,
0.03145759552717209,
-0.18200407922267914,
0.03269542381167412,
-0.05292186141014099,
0.4130009412765503,
0.10543136298656464,
-0.35748153924942017,
0.18042714893817902,
-0.19938120245933533,
-0.08630204945802689,
0.3706178665161133,
-0.6093620657920837,
-0.07186820358037949,
-0.10554596036672592,
0.0535542368888855,
-0.21204666793346405,
-0.21262113749980927,
0.18315356969833374,
0.09810569882392883,
0.11497870832681656,
0.09448108077049255,
-0.13937070965766907,
0.1843811571598053,
0.18531151115894318,
0.1253596693277359,
-0.14149513840675354,
0.5173704028129578,
0.18273186683654785,
0.7609702944755554,
-0.2514157295227051,
-0.15328505635261536,
0.4215608835220337,
-0.004206467419862747,
0.03788496181368828,
-0.0025092773139476776,
-0.21491405367851257,
0.21247780323028564,
-0.11012335121631622,
0.11766456067562103,
0.2312818020582199,
-0.00467262789607048,
-0.3780919313430786,
0.05106711387634277,
0.00816192477941513,
-0.13097117841243744,
-0.15248221158981323,
0.16578003764152527,
-0.3027144968509674,
-0.173457533121109,
-0.23631538450717926,
-0.014544129371643066,
-0.03919021412730217,
-0.2933063209056854,
0.20753119885921478,
-0.03539060801267624,
-0.13088950514793396,
-0.003271784633398056,
-0.5666692852973938,
-0.12902413308620453,
-0.2909240424633026,
0.1284714639186859,
0.22086048126220703,
0.2876637279987335,
0.1764615774154663,
-0.4290253520011902,
0.34269237518310547,
-0.3482767641544342,
0.5372195243835449,
0.03365065157413483,
0.06724715232849121,
-0.026255004107952118,
-0.049901604652404785,
-0.6352043747901917,
-0.3425317406654358,
-0.23720985651016235,
0.09782671928405762,
-0.011633837595582008,
0.4497288465499878,
-0.37375980615615845,
-0.0046253502368927,
0.18555936217308044,
0.01582036167383194,
-0.2207271158695221,
-0.11730600893497467,
-0.3683891296386719,
-0.3900814652442932,
-0.16116251051425934,
0.21008646488189697,
-0.08549202978610992,
0.29503268003463745,
-0.16788676381111145,
0.016835637390613556,
-0.3898255228996277,
-0.12822921574115753,
-0.05260232090950012,
-0.025086771696805954,
0.33373787999153137,
0.002650834619998932,
0.1876506209373474,
-0.23384447395801544,
0.6536868214607239,
0.5415233969688416,
0.5010397434234619,
0.24643200635910034,
-0.3950539529323578,
0.1993260532617569,
0.0015073977410793304,
0.2977420687675476,
0.23868107795715332,
-0.1627882868051529,
0.3150475025177002,
-0.18478578329086304,
0.22801437973976135,
-0.36710095405578613,
0.2160699963569641,
0.32284075021743774,
-0.18221019208431244,
-0.20746314525604248,
0.13856923580169678,
0.5834920406341553,
0.2318260669708252,
0.013657256960868835,
-0.008939945138990879,
0.4135984182357788,
-0.24463817477226257,
0.22423872351646423,
0.17254453897476196,
0.9377955198287964,
-0.16507020592689514,
0.2108382135629654,
0.5665386319160461,
-0.2723202705383301,
0.1996874064207077,
0.1886368691921234,
0.03959786519408226,
-0.45790672302246094,
-0.06346439570188522,
0.09854656457901001,
-0.11666402220726013,
0.082853764295578,
0.014697459526360035,
0.04519137740135193,
0.10905759036540985,
-0.31836390495300293,
0.4060683250427246,
0.05332563817501068,
0.23933632671833038,
-0.07346481829881668,
-0.21219736337661743,
-0.3807991147041321,
-0.031983986496925354,
-0.12887339293956757,
-0.10769511014223099,
0.01231406256556511,
-0.1826002150774002,
-0.018371805548667908,
-0.25399571657180786,
-0.12476039677858353,
0.3193656802177429,
-0.26416024565696716,
0.08476407080888748,
0.052289366722106934,
-0.4152507185935974,
0.14123618602752686,
0.15897105634212494,
-0.21014940738677979,
-0.21267621219158173,
-0.09899556636810303,
-0.025041669607162476,
0.22496044635772705,
0.11330704391002655,
0.21585899591445923,
-0.04115910083055496,
0.28295785188674927,
-0.07864437997341156,
0.029086410999298096,
0.2765578627586365,
-0.09365473687648773,
-0.09817129373550415,
0.10659219324588776,
0.18263809382915497,
0.4168858230113983,
-0.14366690814495087,
-0.1832347810268402,
-0.14230811595916748,
0.07930241525173187,
-0.16993609070777893,
-0.013499293476343155,
-0.17892663180828094,
-0.0795440748333931,
0.029252927750349045,
0.10932968556880951,
-0.4153364300727844,
0.0435468927025795,
0.3104068338871002,
0.26022884249687195,
0.02336879074573517,
0.6574612855911255,
0.1011461541056633,
-0.1274321973323822,
-0.0027328431606292725,
0.043795160949230194,
0.4172667860984802,
-0.5469599962234497,
0.013855047523975372,
-0.11043375730514526,
0.03677062690258026,
-0.024795569479465485,
-0.04512740671634674,
0.16467256844043732,
-0.07169226557016373,
-0.25648194551467896,
-0.15067988634109497,
-0.44850218296051025,
0.20868071913719177,
-0.09615588188171387,
0.019732553511857986,
-0.2248377650976181,
0.011388421058654785,
-0.085748091340065,
0.12806576490402222,
-0.15794245898723602,
0.41796427965164185,
0.007664486765861511,
0.2007383555173874,
-0.17626440525054932,
-0.0410008430480957,
0.0777272880077362,
0.12619759142398834,
0.003964174538850784,
0.10371854901313782,
-0.03160195052623749,
-0.032059431076049805,
-0.13564956188201904,
0.13790513575077057,
0.24949640035629272,
-0.058961253613233566,
0.0010304450988769531,
-0.21521387994289398,
-0.04556751996278763,
0.09724458307027817,
0.3059769868850708,
0.028214186429977417,
-0.12514019012451172,
-0.3924717605113983,
0.6406344175338745,
0.028523892164230347,
-0.19758617877960205,
0.2864784300327301,
-0.18720051646232605,
0.289547324180603,
0.0917229950428009,
0.2597770392894745,
0.16811463236808777,
-0.011829443275928497,
-0.10842917859554291,
0.07066512852907181,
0.25520309805870056,
-0.01300356350839138,
0.11520706117153168,
-0.5115820169448853,
-0.044873591512441635,
-0.1531463861465454,
0.28612008690834045,
0.34986385703086853,
-0.28732776641845703,
-0.31640154123306274,
0.3721511662006378,
0.10377749800682068,
-0.17924967408180237,
-0.038160692900419235,
0.3873246908187866,
-0.17553922533988953,
-0.016284964978694916,
0.3582703471183777,
0.08701205253601074,
0.0912797749042511,
-0.4745889902114868,
0.22484688460826874,
-0.19880099594593048,
0.2047765851020813,
-0.09780913591384888,
0.5577723979949951,
-0.42872533202171326,
-0.06432685256004333,
0.527766227722168,
-0.028468556702136993,
0.24214275181293488,
0.23489627242088318,
-0.01083725318312645,
0.9540224075317383,
0.10424578189849854,
-0.019396429881453514,
0.19414818286895752,
-0.6462528109550476,
-0.18381737172603607,
0.28100454807281494,
0.08463999629020691,
0.06836876273155212,
-0.030822616070508957,
0.6247882843017578,
0.5054935812950134,
-0.29815900325775146,
-0.20873317122459412,
0.11152100563049316,
-0.35007697343826294,
-0.2414996325969696,
-0.0002682209014892578,
-0.32071393728256226,
-0.2228795289993286,
0.30384957790374756,
-0.25577956438064575,
-0.21012870967388153,
0.29467862844467163,
0.13642463088035583,
-0.18853265047073364,
-0.11754324287176132,
-0.012352032586932182,
0.35055989027023315,
0.12605030834674835,
-0.21098466217517853,
0.4667269289493561,
0.03488748148083687,
-0.008752629160881042,
-0.0008418653160333633,
-0.05305611714720726,
0.3887566030025482,
0.5587513446807861,
-0.25538015365600586,
-0.3039206862449646,
0.3673570454120636,
0.10891787707805634,
0.06696153432130814,
0.1895175278186798,
0.035410620272159576,
0.19887565076351166,
0.45779678225517273,
-0.0015284717082977295,
-0.13382965326309204,
0.02674785628914833,
0.07029777020215988,
0.11988351494073868,
0.0907236784696579,
0.13092133402824402,
-0.025602687150239944,
-0.2670104205608368,
-0.16739441454410553,
0.07153134047985077,
-0.08386416733264923,
-0.36983522772789,
0.33789288997650146,
0.010778550058603287,
0.13048896193504333,
-0.13841569423675537,
0.025288201868534088,
-0.13139232993125916,
0.5006673336029053,
0.44702959060668945,
-0.1341085135936737,
-0.11530622839927673,
-0.05443544685840607,
-0.5407018661499023,
0.5433887243270874,
-0.3874911963939667,
0.041204825043678284,
0.0914793387055397,
0.323763906955719,
-0.0644955188035965,
0.04292565584182739,
0.11541347950696945,
0.3992866277694702,
0.11660704016685486,
-0.05029482766985893,
-0.35721540451049805,
-0.014218704774975777,
0.2831236720085144,
-0.09338326752185822,
-0.14389577507972717,
-0.4796702563762665,
0.2346724569797516,
-0.10061018168926239,
-0.034008484333753586,
0.07000524550676346,
0.10943871736526489,
-0.15247729420661926,
-0.2076038271188736,
0.5004398822784424,
-0.11808068305253983,
0.364885151386261,
0.1840827614068985,
-0.14290916919708252,
-0.24913744628429413,
-0.26092007756233215,
-0.1742405891418457,
0.17882263660430908,
-0.0768154039978981,
0.3622146546840668,
0.040559910237789154,
0.23748016357421875,
-0.11797160655260086,
-0.17792339622974396,
-0.06395480036735535,
0.06468166410923004,
-0.07224631309509277,
0.24296365678310394,
-0.026193782687187195,
0.2886037230491638,
-0.028887491673231125,
-0.1097373366355896,
0.21014800667762756,
0.0283593088388443,
-0.21019145846366882,
-0.5273830890655518,
0.5341638326644897,
-0.2805638015270233,
-0.11210817843675613,
0.02702568843960762,
0.16643229126930237,
0.16392359137535095,
-0.04843372479081154,
-0.5384548902511597,
-0.022395916283130646,
0.21042267978191376,
-0.020939206704497337,
-0.10820503532886505,
0.11949830502271652,
-0.26638635993003845,
0.07350380718708038,
-0.16153913736343384,
0.08611112833023071,
-0.07548746466636658,
-0.0847281888127327,
-0.14078964293003082,
-0.29982349276542664
] |
https://github.com/huggingface/datasets/issues/6595 | @lhoestq just fyi pyarrow 15.0.0 (just released) supports float16 as the underlying parquetcpp does as well now :) | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 | ### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih | 18 | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
@lhoestq just fyi pyarrow 15.0.0 (just released) supports float16 as the underlying parquetcpp does as well now :) | [
-0.28692787885665894,
-0.0044410377740859985,
0.16262230277061462,
0.20641998946666718,
0.36014455556869507,
-0.21503600478172302,
0.30898481607437134,
0.37914708256721497,
-0.34722834825515747,
0.15772300958633423,
0.015633590519428253,
0.6490374207496643,
-0.33155137300491333,
0.27174314856529236,
0.03232838585972786,
0.07780680060386658,
0.044387124478816986,
0.10664567351341248,
0.00963687151670456,
0.0048987120389938354,
-0.15758396685123444,
-0.19536621868610382,
-0.14263565838336945,
-0.008043792098760605,
-0.2817932367324829,
0.00037721171975135803,
0.07331936061382294,
0.35752421617507935,
-0.2141372263431549,
-0.3937336802482605,
0.08243649452924728,
-0.12624694406986237,
0.21178603172302246,
0.28647738695144653,
-0.00012834150402341038,
0.06488712131977081,
0.40767624974250793,
0.03624340891838074,
-0.17105402052402496,
0.0033700168132781982,
0.2343895137310028,
-0.5461286306381226,
0.24369822442531586,
-0.35758259892463684,
0.05803541839122772,
-0.4624326229095459,
-0.13803523778915405,
0.33080971240997314,
0.17463010549545288,
0.25066423416137695,
0.12405610084533691,
0.0697508156299591,
0.16663311421871185,
0.3094941973686218,
0.6788209080696106,
0.3536756932735443,
-0.16680309176445007,
0.15855228900909424,
0.3307241201400757,
0.04394958168268204,
-0.43183979392051697,
0.15646421909332275,
0.09077764302492142,
-0.09082549810409546,
0.05356065183877945,
-0.04597010463476181,
-0.00040668994188308716,
-0.09710194170475006,
0.280001699924469,
0.14481139183044434,
0.23019567131996155,
-0.2740357518196106,
-0.22610828280448914,
-0.44828444719314575,
0.08256423473358154,
-0.42230916023254395,
0.30815255641937256,
0.30906522274017334,
-0.05385312810540199,
-0.13982877135276794,
-0.14953960478305817,
-0.31468409299850464,
-0.3078705966472626,
0.06161489337682724,
-0.18401801586151123,
0.4608347713947296,
-0.0480378195643425,
0.21515226364135742,
0.22612346708774567,
-0.2553112804889679,
0.20504365861415863,
0.02997533604502678,
-0.10449019074440002,
-0.06120007485151291,
-0.3290233612060547,
0.041264601051807404,
-0.078033447265625,
-0.03780768811702728,
0.1668643206357956,
0.12543977797031403,
-0.08024343103170395,
0.03766786307096481,
0.18836542963981628,
0.008389811962842941,
0.275597482919693,
0.19091089069843292,
-0.32839420437812805,
0.17092935740947723,
0.024846717715263367,
0.17379999160766602,
0.1079457551240921,
0.22107496857643127,
-0.27618104219436646,
-0.17445756494998932,
0.19315402209758759,
-0.14756394922733307,
0.40419018268585205,
-0.18426558375358582,
-0.22625389695167542,
0.08654677122831345,
-0.2322331964969635,
0.155229389667511,
0.08980399370193481,
0.2970046401023865,
-0.10243669152259827,
0.34675347805023193,
-0.15615585446357727,
0.2291359007358551,
-0.054334770888090134,
-0.007317960262298584,
-0.08237145841121674,
0.12905538082122803,
-0.1065257117152214,
-0.10816631466150284,
0.01833231747150421,
-0.30802851915359497,
0.028467662632465363,
0.04258029907941818,
0.0660407617688179,
-0.15129998326301575,
-0.13408830761909485,
-0.17006731033325195,
0.05530896782875061,
0.2526071071624756,
-0.18148986995220184,
0.13070470094680786,
-0.09777101129293442,
-0.1417735517024994,
-0.12302564829587936,
0.5319883823394775,
-0.49179941415786743,
-0.39513012766838074,
-0.43652814626693726,
0.08617695420980453,
-0.31598836183547974,
-0.06973753869533539,
-0.5748798251152039,
0.053794801235198975,
0.10401085019111633,
0.04331004619598389,
0.14214898645877838,
-0.3146522343158722,
-0.14436964690685272,
-0.3037573993206024,
0.2021169811487198,
0.0013077184557914734,
-0.5543399453163147,
0.0861220508813858,
0.09240235388278961,
-0.0743994414806366,
0.4539240002632141,
0.12665218114852905,
-0.296231210231781,
-0.09934785962104797,
-0.25425341725349426,
0.21887391805648804,
0.3095845878124237,
-0.3343796730041504,
-0.6185442805290222,
0.25418150424957275,
-0.31391483545303345,
0.14846298098564148,
0.12044719606637955,
-0.08597426116466522,
0.3489328622817993,
0.10245229303836823,
-0.12779581546783447,
0.3595367670059204,
-0.00784748699516058,
0.1956247091293335,
-0.44611167907714844,
-0.2642143666744232,
0.23005789518356323,
0.4100196957588196,
0.2968016266822815,
-0.1755615472793579,
0.23321053385734558,
0.10344618558883667,
0.27910134196281433,
-0.15002211928367615,
0.28916746377944946,
0.04790230095386505,
0.15392422676086426,
-0.08834744989871979,
-0.002467028796672821,
0.08344808220863342,
-0.594890832901001,
0.2965248227119446,
0.0477508008480072,
-0.08078782260417938,
-0.3421595096588135,
0.06908641755580902,
-0.18677596747875214,
0.30863484740257263,
-0.34628695249557495,
0.11969265341758728,
-0.022761544212698936,
-0.01871144026517868,
-0.028580300509929657,
0.1380607932806015,
-0.06199570745229721,
-0.15921145677566528,
-0.3845697045326233,
0.15430906414985657,
-0.0006786398589611053,
0.4430534243583679,
0.2269676774740219,
-0.41227516531944275,
-0.04970059171319008,
0.2720855474472046,
-0.017679810523986816,
-0.11930510401725769,
-0.2252207100391388,
0.3112631142139435,
-0.10421660542488098,
0.2572666108608246,
-0.38973844051361084,
-0.051454655826091766,
0.2198101431131363,
-0.3343258798122406,
0.04028276354074478,
0.07242009043693542,
0.18527854979038239,
-0.14531996846199036,
0.1698031723499298,
0.4245418608188629,
0.24095474183559418,
0.2904515266418457,
-0.010134086012840271,
-0.05459826439619064,
0.012592986226081848,
0.039926834404468536,
0.008881688117980957,
-0.16239458322525024,
0.008838442154228687,
0.13472050428390503,
0.26566922664642334,
0.053050898015499115,
-0.1601804494857788,
-0.04060773551464081,
0.3669394552707672,
-0.13288086652755737,
0.09428849071264267,
0.34957823157310486,
-0.3089854121208191,
-0.0002693459391593933,
0.24877378344535828,
0.10846177488565445,
0.07167858630418777,
0.10897835344076157,
0.01181017979979515,
0.11622335016727448,
0.02885151281952858,
0.050982505083084106,
0.041280657052993774,
0.22892649471759796,
0.604545533657074,
0.27275604009628296,
0.5209612250328064,
-0.15604262053966522,
-0.35989174246788025,
-0.028957948088645935,
0.07208938151597977,
0.37964364886283875,
-0.30939024686813354,
-0.023045670241117477,
-0.18052861094474792,
0.1293940544128418,
-0.20778098702430725,
-0.26482704281806946,
-0.1782638132572174,
-0.23459982872009277,
-0.006258354056626558,
0.3661822974681854,
-0.10901319235563278,
0.022802572697401047,
-0.504794716835022,
-0.027133986353874207,
0.018496006727218628,
-0.27501824498176575,
0.05059099197387695,
-0.17071092128753662,
-0.36962389945983887,
-0.02110457606613636,
0.4587472975254059,
-0.12515506148338318,
0.1882333904504776,
0.10954666882753372,
0.36828452348709106,
-0.4664030075073242,
-0.4941613972187042,
0.05754927918314934,
-0.1431126892566681,
-0.10074504464864731,
-0.09491655975580215,
-0.23862922191619873,
0.05986213684082031,
-0.2815753221511841,
0.24395814538002014,
-0.13518336415290833,
-0.314698189496994,
0.37958937883377075,
-0.25443974137306213,
0.13119395077228546,
-0.051734134554862976,
-0.06292867660522461,
-0.10624285787343979,
-0.2702234983444214,
0.1995532363653183,
0.25065261125564575,
0.24147990345954895,
-0.04999775066971779,
0.10889159142971039,
0.34600579738616943,
0.03145759552717209,
-0.18200407922267914,
0.03269542381167412,
-0.05292186141014099,
0.4130009412765503,
0.10543136298656464,
-0.35748153924942017,
0.18042714893817902,
-0.19938120245933533,
-0.08630204945802689,
0.3706178665161133,
-0.6093620657920837,
-0.07186820358037949,
-0.10554596036672592,
0.0535542368888855,
-0.21204666793346405,
-0.21262113749980927,
0.18315356969833374,
0.09810569882392883,
0.11497870832681656,
0.09448108077049255,
-0.13937070965766907,
0.1843811571598053,
0.18531151115894318,
0.1253596693277359,
-0.14149513840675354,
0.5173704028129578,
0.18273186683654785,
0.7609702944755554,
-0.2514157295227051,
-0.15328505635261536,
0.4215608835220337,
-0.004206467419862747,
0.03788496181368828,
-0.0025092773139476776,
-0.21491405367851257,
0.21247780323028564,
-0.11012335121631622,
0.11766456067562103,
0.2312818020582199,
-0.00467262789607048,
-0.3780919313430786,
0.05106711387634277,
0.00816192477941513,
-0.13097117841243744,
-0.15248221158981323,
0.16578003764152527,
-0.3027144968509674,
-0.173457533121109,
-0.23631538450717926,
-0.014544129371643066,
-0.03919021412730217,
-0.2933063209056854,
0.20753119885921478,
-0.03539060801267624,
-0.13088950514793396,
-0.003271784633398056,
-0.5666692852973938,
-0.12902413308620453,
-0.2909240424633026,
0.1284714639186859,
0.22086048126220703,
0.2876637279987335,
0.1764615774154663,
-0.4290253520011902,
0.34269237518310547,
-0.3482767641544342,
0.5372195243835449,
0.03365065157413483,
0.06724715232849121,
-0.026255004107952118,
-0.049901604652404785,
-0.6352043747901917,
-0.3425317406654358,
-0.23720985651016235,
0.09782671928405762,
-0.011633837595582008,
0.4497288465499878,
-0.37375980615615845,
-0.0046253502368927,
0.18555936217308044,
0.01582036167383194,
-0.2207271158695221,
-0.11730600893497467,
-0.3683891296386719,
-0.3900814652442932,
-0.16116251051425934,
0.21008646488189697,
-0.08549202978610992,
0.29503268003463745,
-0.16788676381111145,
0.016835637390613556,
-0.3898255228996277,
-0.12822921574115753,
-0.05260232090950012,
-0.025086771696805954,
0.33373787999153137,
0.002650834619998932,
0.1876506209373474,
-0.23384447395801544,
0.6536868214607239,
0.5415233969688416,
0.5010397434234619,
0.24643200635910034,
-0.3950539529323578,
0.1993260532617569,
0.0015073977410793304,
0.2977420687675476,
0.23868107795715332,
-0.1627882868051529,
0.3150475025177002,
-0.18478578329086304,
0.22801437973976135,
-0.36710095405578613,
0.2160699963569641,
0.32284075021743774,
-0.18221019208431244,
-0.20746314525604248,
0.13856923580169678,
0.5834920406341553,
0.2318260669708252,
0.013657256960868835,
-0.008939945138990879,
0.4135984182357788,
-0.24463817477226257,
0.22423872351646423,
0.17254453897476196,
0.9377955198287964,
-0.16507020592689514,
0.2108382135629654,
0.5665386319160461,
-0.2723202705383301,
0.1996874064207077,
0.1886368691921234,
0.03959786519408226,
-0.45790672302246094,
-0.06346439570188522,
0.09854656457901001,
-0.11666402220726013,
0.082853764295578,
0.014697459526360035,
0.04519137740135193,
0.10905759036540985,
-0.31836390495300293,
0.4060683250427246,
0.05332563817501068,
0.23933632671833038,
-0.07346481829881668,
-0.21219736337661743,
-0.3807991147041321,
-0.031983986496925354,
-0.12887339293956757,
-0.10769511014223099,
0.01231406256556511,
-0.1826002150774002,
-0.018371805548667908,
-0.25399571657180786,
-0.12476039677858353,
0.3193656802177429,
-0.26416024565696716,
0.08476407080888748,
0.052289366722106934,
-0.4152507185935974,
0.14123618602752686,
0.15897105634212494,
-0.21014940738677979,
-0.21267621219158173,
-0.09899556636810303,
-0.025041669607162476,
0.22496044635772705,
0.11330704391002655,
0.21585899591445923,
-0.04115910083055496,
0.28295785188674927,
-0.07864437997341156,
0.029086410999298096,
0.2765578627586365,
-0.09365473687648773,
-0.09817129373550415,
0.10659219324588776,
0.18263809382915497,
0.4168858230113983,
-0.14366690814495087,
-0.1832347810268402,
-0.14230811595916748,
0.07930241525173187,
-0.16993609070777893,
-0.013499293476343155,
-0.17892663180828094,
-0.0795440748333931,
0.029252927750349045,
0.10932968556880951,
-0.4153364300727844,
0.0435468927025795,
0.3104068338871002,
0.26022884249687195,
0.02336879074573517,
0.6574612855911255,
0.1011461541056633,
-0.1274321973323822,
-0.0027328431606292725,
0.043795160949230194,
0.4172667860984802,
-0.5469599962234497,
0.013855047523975372,
-0.11043375730514526,
0.03677062690258026,
-0.024795569479465485,
-0.04512740671634674,
0.16467256844043732,
-0.07169226557016373,
-0.25648194551467896,
-0.15067988634109497,
-0.44850218296051025,
0.20868071913719177,
-0.09615588188171387,
0.019732553511857986,
-0.2248377650976181,
0.011388421058654785,
-0.085748091340065,
0.12806576490402222,
-0.15794245898723602,
0.41796427965164185,
0.007664486765861511,
0.2007383555173874,
-0.17626440525054932,
-0.0410008430480957,
0.0777272880077362,
0.12619759142398834,
0.003964174538850784,
0.10371854901313782,
-0.03160195052623749,
-0.032059431076049805,
-0.13564956188201904,
0.13790513575077057,
0.24949640035629272,
-0.058961253613233566,
0.0010304450988769531,
-0.21521387994289398,
-0.04556751996278763,
0.09724458307027817,
0.3059769868850708,
0.028214186429977417,
-0.12514019012451172,
-0.3924717605113983,
0.6406344175338745,
0.028523892164230347,
-0.19758617877960205,
0.2864784300327301,
-0.18720051646232605,
0.289547324180603,
0.0917229950428009,
0.2597770392894745,
0.16811463236808777,
-0.011829443275928497,
-0.10842917859554291,
0.07066512852907181,
0.25520309805870056,
-0.01300356350839138,
0.11520706117153168,
-0.5115820169448853,
-0.044873591512441635,
-0.1531463861465454,
0.28612008690834045,
0.34986385703086853,
-0.28732776641845703,
-0.31640154123306274,
0.3721511662006378,
0.10377749800682068,
-0.17924967408180237,
-0.038160692900419235,
0.3873246908187866,
-0.17553922533988953,
-0.016284964978694916,
0.3582703471183777,
0.08701205253601074,
0.0912797749042511,
-0.4745889902114868,
0.22484688460826874,
-0.19880099594593048,
0.2047765851020813,
-0.09780913591384888,
0.5577723979949951,
-0.42872533202171326,
-0.06432685256004333,
0.527766227722168,
-0.028468556702136993,
0.24214275181293488,
0.23489627242088318,
-0.01083725318312645,
0.9540224075317383,
0.10424578189849854,
-0.019396429881453514,
0.19414818286895752,
-0.6462528109550476,
-0.18381737172603607,
0.28100454807281494,
0.08463999629020691,
0.06836876273155212,
-0.030822616070508957,
0.6247882843017578,
0.5054935812950134,
-0.29815900325775146,
-0.20873317122459412,
0.11152100563049316,
-0.35007697343826294,
-0.2414996325969696,
-0.0002682209014892578,
-0.32071393728256226,
-0.2228795289993286,
0.30384957790374756,
-0.25577956438064575,
-0.21012870967388153,
0.29467862844467163,
0.13642463088035583,
-0.18853265047073364,
-0.11754324287176132,
-0.012352032586932182,
0.35055989027023315,
0.12605030834674835,
-0.21098466217517853,
0.4667269289493561,
0.03488748148083687,
-0.008752629160881042,
-0.0008418653160333633,
-0.05305611714720726,
0.3887566030025482,
0.5587513446807861,
-0.25538015365600586,
-0.3039206862449646,
0.3673570454120636,
0.10891787707805634,
0.06696153432130814,
0.1895175278186798,
0.035410620272159576,
0.19887565076351166,
0.45779678225517273,
-0.0015284717082977295,
-0.13382965326309204,
0.02674785628914833,
0.07029777020215988,
0.11988351494073868,
0.0907236784696579,
0.13092133402824402,
-0.025602687150239944,
-0.2670104205608368,
-0.16739441454410553,
0.07153134047985077,
-0.08386416733264923,
-0.36983522772789,
0.33789288997650146,
0.010778550058603287,
0.13048896193504333,
-0.13841569423675537,
0.025288201868534088,
-0.13139232993125916,
0.5006673336029053,
0.44702959060668945,
-0.1341085135936737,
-0.11530622839927673,
-0.05443544685840607,
-0.5407018661499023,
0.5433887243270874,
-0.3874911963939667,
0.041204825043678284,
0.0914793387055397,
0.323763906955719,
-0.0644955188035965,
0.04292565584182739,
0.11541347950696945,
0.3992866277694702,
0.11660704016685486,
-0.05029482766985893,
-0.35721540451049805,
-0.014218704774975777,
0.2831236720085144,
-0.09338326752185822,
-0.14389577507972717,
-0.4796702563762665,
0.2346724569797516,
-0.10061018168926239,
-0.034008484333753586,
0.07000524550676346,
0.10943871736526489,
-0.15247729420661926,
-0.2076038271188736,
0.5004398822784424,
-0.11808068305253983,
0.364885151386261,
0.1840827614068985,
-0.14290916919708252,
-0.24913744628429413,
-0.26092007756233215,
-0.1742405891418457,
0.17882263660430908,
-0.0768154039978981,
0.3622146546840668,
0.040559910237789154,
0.23748016357421875,
-0.11797160655260086,
-0.17792339622974396,
-0.06395480036735535,
0.06468166410923004,
-0.07224631309509277,
0.24296365678310394,
-0.026193782687187195,
0.2886037230491638,
-0.028887491673231125,
-0.1097373366355896,
0.21014800667762756,
0.0283593088388443,
-0.21019145846366882,
-0.5273830890655518,
0.5341638326644897,
-0.2805638015270233,
-0.11210817843675613,
0.02702568843960762,
0.16643229126930237,
0.16392359137535095,
-0.04843372479081154,
-0.5384548902511597,
-0.022395916283130646,
0.21042267978191376,
-0.020939206704497337,
-0.10820503532886505,
0.11949830502271652,
-0.26638635993003845,
0.07350380718708038,
-0.16153913736343384,
0.08611112833023071,
-0.07548746466636658,
-0.0847281888127327,
-0.14078964293003082,
-0.29982349276542664
] |
https://github.com/huggingface/datasets/issues/6595 | Oh that's amazing ! (and great timing ^^)
@kopyl can you try to update `pyarrow` and try again ?
Btw @assignUser there seems to be some casting implementations missing with float16 in 15.0.0, e.g.
```
ArrowNotImplementedError: Unsupported cast from int64 to halffloat using function cast_half_float
```
```
ArrowNotImplementedError: Unsupported cast from double to halffloat using function cast_half_float
``` | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 | ### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih | 58 | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
Oh that's amazing ! (and great timing ^^)
@kopyl can you try to update `pyarrow` and try again ?
Btw @assignUser there seems to be some casting implementations missing with float16 in 15.0.0, e.g.
```
ArrowNotImplementedError: Unsupported cast from int64 to halffloat using function cast_half_float
```
```
ArrowNotImplementedError: Unsupported cast from double to halffloat using function cast_half_float
``` | [
-0.28692787885665894,
-0.0044410377740859985,
0.16262230277061462,
0.20641998946666718,
0.36014455556869507,
-0.21503600478172302,
0.30898481607437134,
0.37914708256721497,
-0.34722834825515747,
0.15772300958633423,
0.015633590519428253,
0.6490374207496643,
-0.33155137300491333,
0.27174314856529236,
0.03232838585972786,
0.07780680060386658,
0.044387124478816986,
0.10664567351341248,
0.00963687151670456,
0.0048987120389938354,
-0.15758396685123444,
-0.19536621868610382,
-0.14263565838336945,
-0.008043792098760605,
-0.2817932367324829,
0.00037721171975135803,
0.07331936061382294,
0.35752421617507935,
-0.2141372263431549,
-0.3937336802482605,
0.08243649452924728,
-0.12624694406986237,
0.21178603172302246,
0.28647738695144653,
-0.00012834150402341038,
0.06488712131977081,
0.40767624974250793,
0.03624340891838074,
-0.17105402052402496,
0.0033700168132781982,
0.2343895137310028,
-0.5461286306381226,
0.24369822442531586,
-0.35758259892463684,
0.05803541839122772,
-0.4624326229095459,
-0.13803523778915405,
0.33080971240997314,
0.17463010549545288,
0.25066423416137695,
0.12405610084533691,
0.0697508156299591,
0.16663311421871185,
0.3094941973686218,
0.6788209080696106,
0.3536756932735443,
-0.16680309176445007,
0.15855228900909424,
0.3307241201400757,
0.04394958168268204,
-0.43183979392051697,
0.15646421909332275,
0.09077764302492142,
-0.09082549810409546,
0.05356065183877945,
-0.04597010463476181,
-0.00040668994188308716,
-0.09710194170475006,
0.280001699924469,
0.14481139183044434,
0.23019567131996155,
-0.2740357518196106,
-0.22610828280448914,
-0.44828444719314575,
0.08256423473358154,
-0.42230916023254395,
0.30815255641937256,
0.30906522274017334,
-0.05385312810540199,
-0.13982877135276794,
-0.14953960478305817,
-0.31468409299850464,
-0.3078705966472626,
0.06161489337682724,
-0.18401801586151123,
0.4608347713947296,
-0.0480378195643425,
0.21515226364135742,
0.22612346708774567,
-0.2553112804889679,
0.20504365861415863,
0.02997533604502678,
-0.10449019074440002,
-0.06120007485151291,
-0.3290233612060547,
0.041264601051807404,
-0.078033447265625,
-0.03780768811702728,
0.1668643206357956,
0.12543977797031403,
-0.08024343103170395,
0.03766786307096481,
0.18836542963981628,
0.008389811962842941,
0.275597482919693,
0.19091089069843292,
-0.32839420437812805,
0.17092935740947723,
0.024846717715263367,
0.17379999160766602,
0.1079457551240921,
0.22107496857643127,
-0.27618104219436646,
-0.17445756494998932,
0.19315402209758759,
-0.14756394922733307,
0.40419018268585205,
-0.18426558375358582,
-0.22625389695167542,
0.08654677122831345,
-0.2322331964969635,
0.155229389667511,
0.08980399370193481,
0.2970046401023865,
-0.10243669152259827,
0.34675347805023193,
-0.15615585446357727,
0.2291359007358551,
-0.054334770888090134,
-0.007317960262298584,
-0.08237145841121674,
0.12905538082122803,
-0.1065257117152214,
-0.10816631466150284,
0.01833231747150421,
-0.30802851915359497,
0.028467662632465363,
0.04258029907941818,
0.0660407617688179,
-0.15129998326301575,
-0.13408830761909485,
-0.17006731033325195,
0.05530896782875061,
0.2526071071624756,
-0.18148986995220184,
0.13070470094680786,
-0.09777101129293442,
-0.1417735517024994,
-0.12302564829587936,
0.5319883823394775,
-0.49179941415786743,
-0.39513012766838074,
-0.43652814626693726,
0.08617695420980453,
-0.31598836183547974,
-0.06973753869533539,
-0.5748798251152039,
0.053794801235198975,
0.10401085019111633,
0.04331004619598389,
0.14214898645877838,
-0.3146522343158722,
-0.14436964690685272,
-0.3037573993206024,
0.2021169811487198,
0.0013077184557914734,
-0.5543399453163147,
0.0861220508813858,
0.09240235388278961,
-0.0743994414806366,
0.4539240002632141,
0.12665218114852905,
-0.296231210231781,
-0.09934785962104797,
-0.25425341725349426,
0.21887391805648804,
0.3095845878124237,
-0.3343796730041504,
-0.6185442805290222,
0.25418150424957275,
-0.31391483545303345,
0.14846298098564148,
0.12044719606637955,
-0.08597426116466522,
0.3489328622817993,
0.10245229303836823,
-0.12779581546783447,
0.3595367670059204,
-0.00784748699516058,
0.1956247091293335,
-0.44611167907714844,
-0.2642143666744232,
0.23005789518356323,
0.4100196957588196,
0.2968016266822815,
-0.1755615472793579,
0.23321053385734558,
0.10344618558883667,
0.27910134196281433,
-0.15002211928367615,
0.28916746377944946,
0.04790230095386505,
0.15392422676086426,
-0.08834744989871979,
-0.002467028796672821,
0.08344808220863342,
-0.594890832901001,
0.2965248227119446,
0.0477508008480072,
-0.08078782260417938,
-0.3421595096588135,
0.06908641755580902,
-0.18677596747875214,
0.30863484740257263,
-0.34628695249557495,
0.11969265341758728,
-0.022761544212698936,
-0.01871144026517868,
-0.028580300509929657,
0.1380607932806015,
-0.06199570745229721,
-0.15921145677566528,
-0.3845697045326233,
0.15430906414985657,
-0.0006786398589611053,
0.4430534243583679,
0.2269676774740219,
-0.41227516531944275,
-0.04970059171319008,
0.2720855474472046,
-0.017679810523986816,
-0.11930510401725769,
-0.2252207100391388,
0.3112631142139435,
-0.10421660542488098,
0.2572666108608246,
-0.38973844051361084,
-0.051454655826091766,
0.2198101431131363,
-0.3343258798122406,
0.04028276354074478,
0.07242009043693542,
0.18527854979038239,
-0.14531996846199036,
0.1698031723499298,
0.4245418608188629,
0.24095474183559418,
0.2904515266418457,
-0.010134086012840271,
-0.05459826439619064,
0.012592986226081848,
0.039926834404468536,
0.008881688117980957,
-0.16239458322525024,
0.008838442154228687,
0.13472050428390503,
0.26566922664642334,
0.053050898015499115,
-0.1601804494857788,
-0.04060773551464081,
0.3669394552707672,
-0.13288086652755737,
0.09428849071264267,
0.34957823157310486,
-0.3089854121208191,
-0.0002693459391593933,
0.24877378344535828,
0.10846177488565445,
0.07167858630418777,
0.10897835344076157,
0.01181017979979515,
0.11622335016727448,
0.02885151281952858,
0.050982505083084106,
0.041280657052993774,
0.22892649471759796,
0.604545533657074,
0.27275604009628296,
0.5209612250328064,
-0.15604262053966522,
-0.35989174246788025,
-0.028957948088645935,
0.07208938151597977,
0.37964364886283875,
-0.30939024686813354,
-0.023045670241117477,
-0.18052861094474792,
0.1293940544128418,
-0.20778098702430725,
-0.26482704281806946,
-0.1782638132572174,
-0.23459982872009277,
-0.006258354056626558,
0.3661822974681854,
-0.10901319235563278,
0.022802572697401047,
-0.504794716835022,
-0.027133986353874207,
0.018496006727218628,
-0.27501824498176575,
0.05059099197387695,
-0.17071092128753662,
-0.36962389945983887,
-0.02110457606613636,
0.4587472975254059,
-0.12515506148338318,
0.1882333904504776,
0.10954666882753372,
0.36828452348709106,
-0.4664030075073242,
-0.4941613972187042,
0.05754927918314934,
-0.1431126892566681,
-0.10074504464864731,
-0.09491655975580215,
-0.23862922191619873,
0.05986213684082031,
-0.2815753221511841,
0.24395814538002014,
-0.13518336415290833,
-0.314698189496994,
0.37958937883377075,
-0.25443974137306213,
0.13119395077228546,
-0.051734134554862976,
-0.06292867660522461,
-0.10624285787343979,
-0.2702234983444214,
0.1995532363653183,
0.25065261125564575,
0.24147990345954895,
-0.04999775066971779,
0.10889159142971039,
0.34600579738616943,
0.03145759552717209,
-0.18200407922267914,
0.03269542381167412,
-0.05292186141014099,
0.4130009412765503,
0.10543136298656464,
-0.35748153924942017,
0.18042714893817902,
-0.19938120245933533,
-0.08630204945802689,
0.3706178665161133,
-0.6093620657920837,
-0.07186820358037949,
-0.10554596036672592,
0.0535542368888855,
-0.21204666793346405,
-0.21262113749980927,
0.18315356969833374,
0.09810569882392883,
0.11497870832681656,
0.09448108077049255,
-0.13937070965766907,
0.1843811571598053,
0.18531151115894318,
0.1253596693277359,
-0.14149513840675354,
0.5173704028129578,
0.18273186683654785,
0.7609702944755554,
-0.2514157295227051,
-0.15328505635261536,
0.4215608835220337,
-0.004206467419862747,
0.03788496181368828,
-0.0025092773139476776,
-0.21491405367851257,
0.21247780323028564,
-0.11012335121631622,
0.11766456067562103,
0.2312818020582199,
-0.00467262789607048,
-0.3780919313430786,
0.05106711387634277,
0.00816192477941513,
-0.13097117841243744,
-0.15248221158981323,
0.16578003764152527,
-0.3027144968509674,
-0.173457533121109,
-0.23631538450717926,
-0.014544129371643066,
-0.03919021412730217,
-0.2933063209056854,
0.20753119885921478,
-0.03539060801267624,
-0.13088950514793396,
-0.003271784633398056,
-0.5666692852973938,
-0.12902413308620453,
-0.2909240424633026,
0.1284714639186859,
0.22086048126220703,
0.2876637279987335,
0.1764615774154663,
-0.4290253520011902,
0.34269237518310547,
-0.3482767641544342,
0.5372195243835449,
0.03365065157413483,
0.06724715232849121,
-0.026255004107952118,
-0.049901604652404785,
-0.6352043747901917,
-0.3425317406654358,
-0.23720985651016235,
0.09782671928405762,
-0.011633837595582008,
0.4497288465499878,
-0.37375980615615845,
-0.0046253502368927,
0.18555936217308044,
0.01582036167383194,
-0.2207271158695221,
-0.11730600893497467,
-0.3683891296386719,
-0.3900814652442932,
-0.16116251051425934,
0.21008646488189697,
-0.08549202978610992,
0.29503268003463745,
-0.16788676381111145,
0.016835637390613556,
-0.3898255228996277,
-0.12822921574115753,
-0.05260232090950012,
-0.025086771696805954,
0.33373787999153137,
0.002650834619998932,
0.1876506209373474,
-0.23384447395801544,
0.6536868214607239,
0.5415233969688416,
0.5010397434234619,
0.24643200635910034,
-0.3950539529323578,
0.1993260532617569,
0.0015073977410793304,
0.2977420687675476,
0.23868107795715332,
-0.1627882868051529,
0.3150475025177002,
-0.18478578329086304,
0.22801437973976135,
-0.36710095405578613,
0.2160699963569641,
0.32284075021743774,
-0.18221019208431244,
-0.20746314525604248,
0.13856923580169678,
0.5834920406341553,
0.2318260669708252,
0.013657256960868835,
-0.008939945138990879,
0.4135984182357788,
-0.24463817477226257,
0.22423872351646423,
0.17254453897476196,
0.9377955198287964,
-0.16507020592689514,
0.2108382135629654,
0.5665386319160461,
-0.2723202705383301,
0.1996874064207077,
0.1886368691921234,
0.03959786519408226,
-0.45790672302246094,
-0.06346439570188522,
0.09854656457901001,
-0.11666402220726013,
0.082853764295578,
0.014697459526360035,
0.04519137740135193,
0.10905759036540985,
-0.31836390495300293,
0.4060683250427246,
0.05332563817501068,
0.23933632671833038,
-0.07346481829881668,
-0.21219736337661743,
-0.3807991147041321,
-0.031983986496925354,
-0.12887339293956757,
-0.10769511014223099,
0.01231406256556511,
-0.1826002150774002,
-0.018371805548667908,
-0.25399571657180786,
-0.12476039677858353,
0.3193656802177429,
-0.26416024565696716,
0.08476407080888748,
0.052289366722106934,
-0.4152507185935974,
0.14123618602752686,
0.15897105634212494,
-0.21014940738677979,
-0.21267621219158173,
-0.09899556636810303,
-0.025041669607162476,
0.22496044635772705,
0.11330704391002655,
0.21585899591445923,
-0.04115910083055496,
0.28295785188674927,
-0.07864437997341156,
0.029086410999298096,
0.2765578627586365,
-0.09365473687648773,
-0.09817129373550415,
0.10659219324588776,
0.18263809382915497,
0.4168858230113983,
-0.14366690814495087,
-0.1832347810268402,
-0.14230811595916748,
0.07930241525173187,
-0.16993609070777893,
-0.013499293476343155,
-0.17892663180828094,
-0.0795440748333931,
0.029252927750349045,
0.10932968556880951,
-0.4153364300727844,
0.0435468927025795,
0.3104068338871002,
0.26022884249687195,
0.02336879074573517,
0.6574612855911255,
0.1011461541056633,
-0.1274321973323822,
-0.0027328431606292725,
0.043795160949230194,
0.4172667860984802,
-0.5469599962234497,
0.013855047523975372,
-0.11043375730514526,
0.03677062690258026,
-0.024795569479465485,
-0.04512740671634674,
0.16467256844043732,
-0.07169226557016373,
-0.25648194551467896,
-0.15067988634109497,
-0.44850218296051025,
0.20868071913719177,
-0.09615588188171387,
0.019732553511857986,
-0.2248377650976181,
0.011388421058654785,
-0.085748091340065,
0.12806576490402222,
-0.15794245898723602,
0.41796427965164185,
0.007664486765861511,
0.2007383555173874,
-0.17626440525054932,
-0.0410008430480957,
0.0777272880077362,
0.12619759142398834,
0.003964174538850784,
0.10371854901313782,
-0.03160195052623749,
-0.032059431076049805,
-0.13564956188201904,
0.13790513575077057,
0.24949640035629272,
-0.058961253613233566,
0.0010304450988769531,
-0.21521387994289398,
-0.04556751996278763,
0.09724458307027817,
0.3059769868850708,
0.028214186429977417,
-0.12514019012451172,
-0.3924717605113983,
0.6406344175338745,
0.028523892164230347,
-0.19758617877960205,
0.2864784300327301,
-0.18720051646232605,
0.289547324180603,
0.0917229950428009,
0.2597770392894745,
0.16811463236808777,
-0.011829443275928497,
-0.10842917859554291,
0.07066512852907181,
0.25520309805870056,
-0.01300356350839138,
0.11520706117153168,
-0.5115820169448853,
-0.044873591512441635,
-0.1531463861465454,
0.28612008690834045,
0.34986385703086853,
-0.28732776641845703,
-0.31640154123306274,
0.3721511662006378,
0.10377749800682068,
-0.17924967408180237,
-0.038160692900419235,
0.3873246908187866,
-0.17553922533988953,
-0.016284964978694916,
0.3582703471183777,
0.08701205253601074,
0.0912797749042511,
-0.4745889902114868,
0.22484688460826874,
-0.19880099594593048,
0.2047765851020813,
-0.09780913591384888,
0.5577723979949951,
-0.42872533202171326,
-0.06432685256004333,
0.527766227722168,
-0.028468556702136993,
0.24214275181293488,
0.23489627242088318,
-0.01083725318312645,
0.9540224075317383,
0.10424578189849854,
-0.019396429881453514,
0.19414818286895752,
-0.6462528109550476,
-0.18381737172603607,
0.28100454807281494,
0.08463999629020691,
0.06836876273155212,
-0.030822616070508957,
0.6247882843017578,
0.5054935812950134,
-0.29815900325775146,
-0.20873317122459412,
0.11152100563049316,
-0.35007697343826294,
-0.2414996325969696,
-0.0002682209014892578,
-0.32071393728256226,
-0.2228795289993286,
0.30384957790374756,
-0.25577956438064575,
-0.21012870967388153,
0.29467862844467163,
0.13642463088035583,
-0.18853265047073364,
-0.11754324287176132,
-0.012352032586932182,
0.35055989027023315,
0.12605030834674835,
-0.21098466217517853,
0.4667269289493561,
0.03488748148083687,
-0.008752629160881042,
-0.0008418653160333633,
-0.05305611714720726,
0.3887566030025482,
0.5587513446807861,
-0.25538015365600586,
-0.3039206862449646,
0.3673570454120636,
0.10891787707805634,
0.06696153432130814,
0.1895175278186798,
0.035410620272159576,
0.19887565076351166,
0.45779678225517273,
-0.0015284717082977295,
-0.13382965326309204,
0.02674785628914833,
0.07029777020215988,
0.11988351494073868,
0.0907236784696579,
0.13092133402824402,
-0.025602687150239944,
-0.2670104205608368,
-0.16739441454410553,
0.07153134047985077,
-0.08386416733264923,
-0.36983522772789,
0.33789288997650146,
0.010778550058603287,
0.13048896193504333,
-0.13841569423675537,
0.025288201868534088,
-0.13139232993125916,
0.5006673336029053,
0.44702959060668945,
-0.1341085135936737,
-0.11530622839927673,
-0.05443544685840607,
-0.5407018661499023,
0.5433887243270874,
-0.3874911963939667,
0.041204825043678284,
0.0914793387055397,
0.323763906955719,
-0.0644955188035965,
0.04292565584182739,
0.11541347950696945,
0.3992866277694702,
0.11660704016685486,
-0.05029482766985893,
-0.35721540451049805,
-0.014218704774975777,
0.2831236720085144,
-0.09338326752185822,
-0.14389577507972717,
-0.4796702563762665,
0.2346724569797516,
-0.10061018168926239,
-0.034008484333753586,
0.07000524550676346,
0.10943871736526489,
-0.15247729420661926,
-0.2076038271188736,
0.5004398822784424,
-0.11808068305253983,
0.364885151386261,
0.1840827614068985,
-0.14290916919708252,
-0.24913744628429413,
-0.26092007756233215,
-0.1742405891418457,
0.17882263660430908,
-0.0768154039978981,
0.3622146546840668,
0.040559910237789154,
0.23748016357421875,
-0.11797160655260086,
-0.17792339622974396,
-0.06395480036735535,
0.06468166410923004,
-0.07224631309509277,
0.24296365678310394,
-0.026193782687187195,
0.2886037230491638,
-0.028887491673231125,
-0.1097373366355896,
0.21014800667762756,
0.0283593088388443,
-0.21019145846366882,
-0.5273830890655518,
0.5341638326644897,
-0.2805638015270233,
-0.11210817843675613,
0.02702568843960762,
0.16643229126930237,
0.16392359137535095,
-0.04843372479081154,
-0.5384548902511597,
-0.022395916283130646,
0.21042267978191376,
-0.020939206704497337,
-0.10820503532886505,
0.11949830502271652,
-0.26638635993003845,
0.07350380718708038,
-0.16153913736343384,
0.08611112833023071,
-0.07548746466636658,
-0.0847281888127327,
-0.14078964293003082,
-0.29982349276542664
] |
https://github.com/huggingface/datasets/issues/6595 | Ah you are right casting is not implemented yet, it's even mentioned in the docs. This pr references the relevant issues if you'd like to track them
https://github.com/apache/arrow/pull/38494 | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 | ### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih | 28 | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
Ah you are right casting is not implemented yet, it's even mentioned in the docs. This pr references the relevant issues if you'd like to track them
https://github.com/apache/arrow/pull/38494 | [
-0.28692787885665894,
-0.0044410377740859985,
0.16262230277061462,
0.20641998946666718,
0.36014455556869507,
-0.21503600478172302,
0.30898481607437134,
0.37914708256721497,
-0.34722834825515747,
0.15772300958633423,
0.015633590519428253,
0.6490374207496643,
-0.33155137300491333,
0.27174314856529236,
0.03232838585972786,
0.07780680060386658,
0.044387124478816986,
0.10664567351341248,
0.00963687151670456,
0.0048987120389938354,
-0.15758396685123444,
-0.19536621868610382,
-0.14263565838336945,
-0.008043792098760605,
-0.2817932367324829,
0.00037721171975135803,
0.07331936061382294,
0.35752421617507935,
-0.2141372263431549,
-0.3937336802482605,
0.08243649452924728,
-0.12624694406986237,
0.21178603172302246,
0.28647738695144653,
-0.00012834150402341038,
0.06488712131977081,
0.40767624974250793,
0.03624340891838074,
-0.17105402052402496,
0.0033700168132781982,
0.2343895137310028,
-0.5461286306381226,
0.24369822442531586,
-0.35758259892463684,
0.05803541839122772,
-0.4624326229095459,
-0.13803523778915405,
0.33080971240997314,
0.17463010549545288,
0.25066423416137695,
0.12405610084533691,
0.0697508156299591,
0.16663311421871185,
0.3094941973686218,
0.6788209080696106,
0.3536756932735443,
-0.16680309176445007,
0.15855228900909424,
0.3307241201400757,
0.04394958168268204,
-0.43183979392051697,
0.15646421909332275,
0.09077764302492142,
-0.09082549810409546,
0.05356065183877945,
-0.04597010463476181,
-0.00040668994188308716,
-0.09710194170475006,
0.280001699924469,
0.14481139183044434,
0.23019567131996155,
-0.2740357518196106,
-0.22610828280448914,
-0.44828444719314575,
0.08256423473358154,
-0.42230916023254395,
0.30815255641937256,
0.30906522274017334,
-0.05385312810540199,
-0.13982877135276794,
-0.14953960478305817,
-0.31468409299850464,
-0.3078705966472626,
0.06161489337682724,
-0.18401801586151123,
0.4608347713947296,
-0.0480378195643425,
0.21515226364135742,
0.22612346708774567,
-0.2553112804889679,
0.20504365861415863,
0.02997533604502678,
-0.10449019074440002,
-0.06120007485151291,
-0.3290233612060547,
0.041264601051807404,
-0.078033447265625,
-0.03780768811702728,
0.1668643206357956,
0.12543977797031403,
-0.08024343103170395,
0.03766786307096481,
0.18836542963981628,
0.008389811962842941,
0.275597482919693,
0.19091089069843292,
-0.32839420437812805,
0.17092935740947723,
0.024846717715263367,
0.17379999160766602,
0.1079457551240921,
0.22107496857643127,
-0.27618104219436646,
-0.17445756494998932,
0.19315402209758759,
-0.14756394922733307,
0.40419018268585205,
-0.18426558375358582,
-0.22625389695167542,
0.08654677122831345,
-0.2322331964969635,
0.155229389667511,
0.08980399370193481,
0.2970046401023865,
-0.10243669152259827,
0.34675347805023193,
-0.15615585446357727,
0.2291359007358551,
-0.054334770888090134,
-0.007317960262298584,
-0.08237145841121674,
0.12905538082122803,
-0.1065257117152214,
-0.10816631466150284,
0.01833231747150421,
-0.30802851915359497,
0.028467662632465363,
0.04258029907941818,
0.0660407617688179,
-0.15129998326301575,
-0.13408830761909485,
-0.17006731033325195,
0.05530896782875061,
0.2526071071624756,
-0.18148986995220184,
0.13070470094680786,
-0.09777101129293442,
-0.1417735517024994,
-0.12302564829587936,
0.5319883823394775,
-0.49179941415786743,
-0.39513012766838074,
-0.43652814626693726,
0.08617695420980453,
-0.31598836183547974,
-0.06973753869533539,
-0.5748798251152039,
0.053794801235198975,
0.10401085019111633,
0.04331004619598389,
0.14214898645877838,
-0.3146522343158722,
-0.14436964690685272,
-0.3037573993206024,
0.2021169811487198,
0.0013077184557914734,
-0.5543399453163147,
0.0861220508813858,
0.09240235388278961,
-0.0743994414806366,
0.4539240002632141,
0.12665218114852905,
-0.296231210231781,
-0.09934785962104797,
-0.25425341725349426,
0.21887391805648804,
0.3095845878124237,
-0.3343796730041504,
-0.6185442805290222,
0.25418150424957275,
-0.31391483545303345,
0.14846298098564148,
0.12044719606637955,
-0.08597426116466522,
0.3489328622817993,
0.10245229303836823,
-0.12779581546783447,
0.3595367670059204,
-0.00784748699516058,
0.1956247091293335,
-0.44611167907714844,
-0.2642143666744232,
0.23005789518356323,
0.4100196957588196,
0.2968016266822815,
-0.1755615472793579,
0.23321053385734558,
0.10344618558883667,
0.27910134196281433,
-0.15002211928367615,
0.28916746377944946,
0.04790230095386505,
0.15392422676086426,
-0.08834744989871979,
-0.002467028796672821,
0.08344808220863342,
-0.594890832901001,
0.2965248227119446,
0.0477508008480072,
-0.08078782260417938,
-0.3421595096588135,
0.06908641755580902,
-0.18677596747875214,
0.30863484740257263,
-0.34628695249557495,
0.11969265341758728,
-0.022761544212698936,
-0.01871144026517868,
-0.028580300509929657,
0.1380607932806015,
-0.06199570745229721,
-0.15921145677566528,
-0.3845697045326233,
0.15430906414985657,
-0.0006786398589611053,
0.4430534243583679,
0.2269676774740219,
-0.41227516531944275,
-0.04970059171319008,
0.2720855474472046,
-0.017679810523986816,
-0.11930510401725769,
-0.2252207100391388,
0.3112631142139435,
-0.10421660542488098,
0.2572666108608246,
-0.38973844051361084,
-0.051454655826091766,
0.2198101431131363,
-0.3343258798122406,
0.04028276354074478,
0.07242009043693542,
0.18527854979038239,
-0.14531996846199036,
0.1698031723499298,
0.4245418608188629,
0.24095474183559418,
0.2904515266418457,
-0.010134086012840271,
-0.05459826439619064,
0.012592986226081848,
0.039926834404468536,
0.008881688117980957,
-0.16239458322525024,
0.008838442154228687,
0.13472050428390503,
0.26566922664642334,
0.053050898015499115,
-0.1601804494857788,
-0.04060773551464081,
0.3669394552707672,
-0.13288086652755737,
0.09428849071264267,
0.34957823157310486,
-0.3089854121208191,
-0.0002693459391593933,
0.24877378344535828,
0.10846177488565445,
0.07167858630418777,
0.10897835344076157,
0.01181017979979515,
0.11622335016727448,
0.02885151281952858,
0.050982505083084106,
0.041280657052993774,
0.22892649471759796,
0.604545533657074,
0.27275604009628296,
0.5209612250328064,
-0.15604262053966522,
-0.35989174246788025,
-0.028957948088645935,
0.07208938151597977,
0.37964364886283875,
-0.30939024686813354,
-0.023045670241117477,
-0.18052861094474792,
0.1293940544128418,
-0.20778098702430725,
-0.26482704281806946,
-0.1782638132572174,
-0.23459982872009277,
-0.006258354056626558,
0.3661822974681854,
-0.10901319235563278,
0.022802572697401047,
-0.504794716835022,
-0.027133986353874207,
0.018496006727218628,
-0.27501824498176575,
0.05059099197387695,
-0.17071092128753662,
-0.36962389945983887,
-0.02110457606613636,
0.4587472975254059,
-0.12515506148338318,
0.1882333904504776,
0.10954666882753372,
0.36828452348709106,
-0.4664030075073242,
-0.4941613972187042,
0.05754927918314934,
-0.1431126892566681,
-0.10074504464864731,
-0.09491655975580215,
-0.23862922191619873,
0.05986213684082031,
-0.2815753221511841,
0.24395814538002014,
-0.13518336415290833,
-0.314698189496994,
0.37958937883377075,
-0.25443974137306213,
0.13119395077228546,
-0.051734134554862976,
-0.06292867660522461,
-0.10624285787343979,
-0.2702234983444214,
0.1995532363653183,
0.25065261125564575,
0.24147990345954895,
-0.04999775066971779,
0.10889159142971039,
0.34600579738616943,
0.03145759552717209,
-0.18200407922267914,
0.03269542381167412,
-0.05292186141014099,
0.4130009412765503,
0.10543136298656464,
-0.35748153924942017,
0.18042714893817902,
-0.19938120245933533,
-0.08630204945802689,
0.3706178665161133,
-0.6093620657920837,
-0.07186820358037949,
-0.10554596036672592,
0.0535542368888855,
-0.21204666793346405,
-0.21262113749980927,
0.18315356969833374,
0.09810569882392883,
0.11497870832681656,
0.09448108077049255,
-0.13937070965766907,
0.1843811571598053,
0.18531151115894318,
0.1253596693277359,
-0.14149513840675354,
0.5173704028129578,
0.18273186683654785,
0.7609702944755554,
-0.2514157295227051,
-0.15328505635261536,
0.4215608835220337,
-0.004206467419862747,
0.03788496181368828,
-0.0025092773139476776,
-0.21491405367851257,
0.21247780323028564,
-0.11012335121631622,
0.11766456067562103,
0.2312818020582199,
-0.00467262789607048,
-0.3780919313430786,
0.05106711387634277,
0.00816192477941513,
-0.13097117841243744,
-0.15248221158981323,
0.16578003764152527,
-0.3027144968509674,
-0.173457533121109,
-0.23631538450717926,
-0.014544129371643066,
-0.03919021412730217,
-0.2933063209056854,
0.20753119885921478,
-0.03539060801267624,
-0.13088950514793396,
-0.003271784633398056,
-0.5666692852973938,
-0.12902413308620453,
-0.2909240424633026,
0.1284714639186859,
0.22086048126220703,
0.2876637279987335,
0.1764615774154663,
-0.4290253520011902,
0.34269237518310547,
-0.3482767641544342,
0.5372195243835449,
0.03365065157413483,
0.06724715232849121,
-0.026255004107952118,
-0.049901604652404785,
-0.6352043747901917,
-0.3425317406654358,
-0.23720985651016235,
0.09782671928405762,
-0.011633837595582008,
0.4497288465499878,
-0.37375980615615845,
-0.0046253502368927,
0.18555936217308044,
0.01582036167383194,
-0.2207271158695221,
-0.11730600893497467,
-0.3683891296386719,
-0.3900814652442932,
-0.16116251051425934,
0.21008646488189697,
-0.08549202978610992,
0.29503268003463745,
-0.16788676381111145,
0.016835637390613556,
-0.3898255228996277,
-0.12822921574115753,
-0.05260232090950012,
-0.025086771696805954,
0.33373787999153137,
0.002650834619998932,
0.1876506209373474,
-0.23384447395801544,
0.6536868214607239,
0.5415233969688416,
0.5010397434234619,
0.24643200635910034,
-0.3950539529323578,
0.1993260532617569,
0.0015073977410793304,
0.2977420687675476,
0.23868107795715332,
-0.1627882868051529,
0.3150475025177002,
-0.18478578329086304,
0.22801437973976135,
-0.36710095405578613,
0.2160699963569641,
0.32284075021743774,
-0.18221019208431244,
-0.20746314525604248,
0.13856923580169678,
0.5834920406341553,
0.2318260669708252,
0.013657256960868835,
-0.008939945138990879,
0.4135984182357788,
-0.24463817477226257,
0.22423872351646423,
0.17254453897476196,
0.9377955198287964,
-0.16507020592689514,
0.2108382135629654,
0.5665386319160461,
-0.2723202705383301,
0.1996874064207077,
0.1886368691921234,
0.03959786519408226,
-0.45790672302246094,
-0.06346439570188522,
0.09854656457901001,
-0.11666402220726013,
0.082853764295578,
0.014697459526360035,
0.04519137740135193,
0.10905759036540985,
-0.31836390495300293,
0.4060683250427246,
0.05332563817501068,
0.23933632671833038,
-0.07346481829881668,
-0.21219736337661743,
-0.3807991147041321,
-0.031983986496925354,
-0.12887339293956757,
-0.10769511014223099,
0.01231406256556511,
-0.1826002150774002,
-0.018371805548667908,
-0.25399571657180786,
-0.12476039677858353,
0.3193656802177429,
-0.26416024565696716,
0.08476407080888748,
0.052289366722106934,
-0.4152507185935974,
0.14123618602752686,
0.15897105634212494,
-0.21014940738677979,
-0.21267621219158173,
-0.09899556636810303,
-0.025041669607162476,
0.22496044635772705,
0.11330704391002655,
0.21585899591445923,
-0.04115910083055496,
0.28295785188674927,
-0.07864437997341156,
0.029086410999298096,
0.2765578627586365,
-0.09365473687648773,
-0.09817129373550415,
0.10659219324588776,
0.18263809382915497,
0.4168858230113983,
-0.14366690814495087,
-0.1832347810268402,
-0.14230811595916748,
0.07930241525173187,
-0.16993609070777893,
-0.013499293476343155,
-0.17892663180828094,
-0.0795440748333931,
0.029252927750349045,
0.10932968556880951,
-0.4153364300727844,
0.0435468927025795,
0.3104068338871002,
0.26022884249687195,
0.02336879074573517,
0.6574612855911255,
0.1011461541056633,
-0.1274321973323822,
-0.0027328431606292725,
0.043795160949230194,
0.4172667860984802,
-0.5469599962234497,
0.013855047523975372,
-0.11043375730514526,
0.03677062690258026,
-0.024795569479465485,
-0.04512740671634674,
0.16467256844043732,
-0.07169226557016373,
-0.25648194551467896,
-0.15067988634109497,
-0.44850218296051025,
0.20868071913719177,
-0.09615588188171387,
0.019732553511857986,
-0.2248377650976181,
0.011388421058654785,
-0.085748091340065,
0.12806576490402222,
-0.15794245898723602,
0.41796427965164185,
0.007664486765861511,
0.2007383555173874,
-0.17626440525054932,
-0.0410008430480957,
0.0777272880077362,
0.12619759142398834,
0.003964174538850784,
0.10371854901313782,
-0.03160195052623749,
-0.032059431076049805,
-0.13564956188201904,
0.13790513575077057,
0.24949640035629272,
-0.058961253613233566,
0.0010304450988769531,
-0.21521387994289398,
-0.04556751996278763,
0.09724458307027817,
0.3059769868850708,
0.028214186429977417,
-0.12514019012451172,
-0.3924717605113983,
0.6406344175338745,
0.028523892164230347,
-0.19758617877960205,
0.2864784300327301,
-0.18720051646232605,
0.289547324180603,
0.0917229950428009,
0.2597770392894745,
0.16811463236808777,
-0.011829443275928497,
-0.10842917859554291,
0.07066512852907181,
0.25520309805870056,
-0.01300356350839138,
0.11520706117153168,
-0.5115820169448853,
-0.044873591512441635,
-0.1531463861465454,
0.28612008690834045,
0.34986385703086853,
-0.28732776641845703,
-0.31640154123306274,
0.3721511662006378,
0.10377749800682068,
-0.17924967408180237,
-0.038160692900419235,
0.3873246908187866,
-0.17553922533988953,
-0.016284964978694916,
0.3582703471183777,
0.08701205253601074,
0.0912797749042511,
-0.4745889902114868,
0.22484688460826874,
-0.19880099594593048,
0.2047765851020813,
-0.09780913591384888,
0.5577723979949951,
-0.42872533202171326,
-0.06432685256004333,
0.527766227722168,
-0.028468556702136993,
0.24214275181293488,
0.23489627242088318,
-0.01083725318312645,
0.9540224075317383,
0.10424578189849854,
-0.019396429881453514,
0.19414818286895752,
-0.6462528109550476,
-0.18381737172603607,
0.28100454807281494,
0.08463999629020691,
0.06836876273155212,
-0.030822616070508957,
0.6247882843017578,
0.5054935812950134,
-0.29815900325775146,
-0.20873317122459412,
0.11152100563049316,
-0.35007697343826294,
-0.2414996325969696,
-0.0002682209014892578,
-0.32071393728256226,
-0.2228795289993286,
0.30384957790374756,
-0.25577956438064575,
-0.21012870967388153,
0.29467862844467163,
0.13642463088035583,
-0.18853265047073364,
-0.11754324287176132,
-0.012352032586932182,
0.35055989027023315,
0.12605030834674835,
-0.21098466217517853,
0.4667269289493561,
0.03488748148083687,
-0.008752629160881042,
-0.0008418653160333633,
-0.05305611714720726,
0.3887566030025482,
0.5587513446807861,
-0.25538015365600586,
-0.3039206862449646,
0.3673570454120636,
0.10891787707805634,
0.06696153432130814,
0.1895175278186798,
0.035410620272159576,
0.19887565076351166,
0.45779678225517273,
-0.0015284717082977295,
-0.13382965326309204,
0.02674785628914833,
0.07029777020215988,
0.11988351494073868,
0.0907236784696579,
0.13092133402824402,
-0.025602687150239944,
-0.2670104205608368,
-0.16739441454410553,
0.07153134047985077,
-0.08386416733264923,
-0.36983522772789,
0.33789288997650146,
0.010778550058603287,
0.13048896193504333,
-0.13841569423675537,
0.025288201868534088,
-0.13139232993125916,
0.5006673336029053,
0.44702959060668945,
-0.1341085135936737,
-0.11530622839927673,
-0.05443544685840607,
-0.5407018661499023,
0.5433887243270874,
-0.3874911963939667,
0.041204825043678284,
0.0914793387055397,
0.323763906955719,
-0.0644955188035965,
0.04292565584182739,
0.11541347950696945,
0.3992866277694702,
0.11660704016685486,
-0.05029482766985893,
-0.35721540451049805,
-0.014218704774975777,
0.2831236720085144,
-0.09338326752185822,
-0.14389577507972717,
-0.4796702563762665,
0.2346724569797516,
-0.10061018168926239,
-0.034008484333753586,
0.07000524550676346,
0.10943871736526489,
-0.15247729420661926,
-0.2076038271188736,
0.5004398822784424,
-0.11808068305253983,
0.364885151386261,
0.1840827614068985,
-0.14290916919708252,
-0.24913744628429413,
-0.26092007756233215,
-0.1742405891418457,
0.17882263660430908,
-0.0768154039978981,
0.3622146546840668,
0.040559910237789154,
0.23748016357421875,
-0.11797160655260086,
-0.17792339622974396,
-0.06395480036735535,
0.06468166410923004,
-0.07224631309509277,
0.24296365678310394,
-0.026193782687187195,
0.2886037230491638,
-0.028887491673231125,
-0.1097373366355896,
0.21014800667762756,
0.0283593088388443,
-0.21019145846366882,
-0.5273830890655518,
0.5341638326644897,
-0.2805638015270233,
-0.11210817843675613,
0.02702568843960762,
0.16643229126930237,
0.16392359137535095,
-0.04843372479081154,
-0.5384548902511597,
-0.022395916283130646,
0.21042267978191376,
-0.020939206704497337,
-0.10820503532886505,
0.11949830502271652,
-0.26638635993003845,
0.07350380718708038,
-0.16153913736343384,
0.08611112833023071,
-0.07548746466636658,
-0.0847281888127327,
-0.14078964293003082,
-0.29982349276542664
] |
https://github.com/huggingface/datasets/issues/6595 | @lhoestq i just recently found out that it's supported in 15.0.0, but wanted to try it first before telling you...
Trying this right now and it seemingly works (although i need to wait till the end to make sure there is nothing wrong). Will update you when it's finished.
<img width="918" alt="image" src="https://github.com/huggingface/datasets/assets/17604849/4821e215-e782-4736-8c76-d06187078175">
A couple of questions though:
1. What does that missing casting implementation mean for my specific case and what does it mean in general?
2. Do you know how to `push_to_hub` with multiple processes? | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 | ### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih | 87 | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
@lhoestq i just recently found out that it's supported in 15.0.0, but wanted to try it first before telling you...
Trying this right now and it seemingly works (although i need to wait till the end to make sure there is nothing wrong). Will update you when it's finished.
<img width="918" alt="image" src="https://github.com/huggingface/datasets/assets/17604849/4821e215-e782-4736-8c76-d06187078175">
A couple of questions though:
1. What does that missing casting implementation mean for my specific case and what does it mean in general?
2. Do you know how to `push_to_hub` with multiple processes? | [
-0.28692787885665894,
-0.0044410377740859985,
0.16262230277061462,
0.20641998946666718,
0.36014455556869507,
-0.21503600478172302,
0.30898481607437134,
0.37914708256721497,
-0.34722834825515747,
0.15772300958633423,
0.015633590519428253,
0.6490374207496643,
-0.33155137300491333,
0.27174314856529236,
0.03232838585972786,
0.07780680060386658,
0.044387124478816986,
0.10664567351341248,
0.00963687151670456,
0.0048987120389938354,
-0.15758396685123444,
-0.19536621868610382,
-0.14263565838336945,
-0.008043792098760605,
-0.2817932367324829,
0.00037721171975135803,
0.07331936061382294,
0.35752421617507935,
-0.2141372263431549,
-0.3937336802482605,
0.08243649452924728,
-0.12624694406986237,
0.21178603172302246,
0.28647738695144653,
-0.00012834150402341038,
0.06488712131977081,
0.40767624974250793,
0.03624340891838074,
-0.17105402052402496,
0.0033700168132781982,
0.2343895137310028,
-0.5461286306381226,
0.24369822442531586,
-0.35758259892463684,
0.05803541839122772,
-0.4624326229095459,
-0.13803523778915405,
0.33080971240997314,
0.17463010549545288,
0.25066423416137695,
0.12405610084533691,
0.0697508156299591,
0.16663311421871185,
0.3094941973686218,
0.6788209080696106,
0.3536756932735443,
-0.16680309176445007,
0.15855228900909424,
0.3307241201400757,
0.04394958168268204,
-0.43183979392051697,
0.15646421909332275,
0.09077764302492142,
-0.09082549810409546,
0.05356065183877945,
-0.04597010463476181,
-0.00040668994188308716,
-0.09710194170475006,
0.280001699924469,
0.14481139183044434,
0.23019567131996155,
-0.2740357518196106,
-0.22610828280448914,
-0.44828444719314575,
0.08256423473358154,
-0.42230916023254395,
0.30815255641937256,
0.30906522274017334,
-0.05385312810540199,
-0.13982877135276794,
-0.14953960478305817,
-0.31468409299850464,
-0.3078705966472626,
0.06161489337682724,
-0.18401801586151123,
0.4608347713947296,
-0.0480378195643425,
0.21515226364135742,
0.22612346708774567,
-0.2553112804889679,
0.20504365861415863,
0.02997533604502678,
-0.10449019074440002,
-0.06120007485151291,
-0.3290233612060547,
0.041264601051807404,
-0.078033447265625,
-0.03780768811702728,
0.1668643206357956,
0.12543977797031403,
-0.08024343103170395,
0.03766786307096481,
0.18836542963981628,
0.008389811962842941,
0.275597482919693,
0.19091089069843292,
-0.32839420437812805,
0.17092935740947723,
0.024846717715263367,
0.17379999160766602,
0.1079457551240921,
0.22107496857643127,
-0.27618104219436646,
-0.17445756494998932,
0.19315402209758759,
-0.14756394922733307,
0.40419018268585205,
-0.18426558375358582,
-0.22625389695167542,
0.08654677122831345,
-0.2322331964969635,
0.155229389667511,
0.08980399370193481,
0.2970046401023865,
-0.10243669152259827,
0.34675347805023193,
-0.15615585446357727,
0.2291359007358551,
-0.054334770888090134,
-0.007317960262298584,
-0.08237145841121674,
0.12905538082122803,
-0.1065257117152214,
-0.10816631466150284,
0.01833231747150421,
-0.30802851915359497,
0.028467662632465363,
0.04258029907941818,
0.0660407617688179,
-0.15129998326301575,
-0.13408830761909485,
-0.17006731033325195,
0.05530896782875061,
0.2526071071624756,
-0.18148986995220184,
0.13070470094680786,
-0.09777101129293442,
-0.1417735517024994,
-0.12302564829587936,
0.5319883823394775,
-0.49179941415786743,
-0.39513012766838074,
-0.43652814626693726,
0.08617695420980453,
-0.31598836183547974,
-0.06973753869533539,
-0.5748798251152039,
0.053794801235198975,
0.10401085019111633,
0.04331004619598389,
0.14214898645877838,
-0.3146522343158722,
-0.14436964690685272,
-0.3037573993206024,
0.2021169811487198,
0.0013077184557914734,
-0.5543399453163147,
0.0861220508813858,
0.09240235388278961,
-0.0743994414806366,
0.4539240002632141,
0.12665218114852905,
-0.296231210231781,
-0.09934785962104797,
-0.25425341725349426,
0.21887391805648804,
0.3095845878124237,
-0.3343796730041504,
-0.6185442805290222,
0.25418150424957275,
-0.31391483545303345,
0.14846298098564148,
0.12044719606637955,
-0.08597426116466522,
0.3489328622817993,
0.10245229303836823,
-0.12779581546783447,
0.3595367670059204,
-0.00784748699516058,
0.1956247091293335,
-0.44611167907714844,
-0.2642143666744232,
0.23005789518356323,
0.4100196957588196,
0.2968016266822815,
-0.1755615472793579,
0.23321053385734558,
0.10344618558883667,
0.27910134196281433,
-0.15002211928367615,
0.28916746377944946,
0.04790230095386505,
0.15392422676086426,
-0.08834744989871979,
-0.002467028796672821,
0.08344808220863342,
-0.594890832901001,
0.2965248227119446,
0.0477508008480072,
-0.08078782260417938,
-0.3421595096588135,
0.06908641755580902,
-0.18677596747875214,
0.30863484740257263,
-0.34628695249557495,
0.11969265341758728,
-0.022761544212698936,
-0.01871144026517868,
-0.028580300509929657,
0.1380607932806015,
-0.06199570745229721,
-0.15921145677566528,
-0.3845697045326233,
0.15430906414985657,
-0.0006786398589611053,
0.4430534243583679,
0.2269676774740219,
-0.41227516531944275,
-0.04970059171319008,
0.2720855474472046,
-0.017679810523986816,
-0.11930510401725769,
-0.2252207100391388,
0.3112631142139435,
-0.10421660542488098,
0.2572666108608246,
-0.38973844051361084,
-0.051454655826091766,
0.2198101431131363,
-0.3343258798122406,
0.04028276354074478,
0.07242009043693542,
0.18527854979038239,
-0.14531996846199036,
0.1698031723499298,
0.4245418608188629,
0.24095474183559418,
0.2904515266418457,
-0.010134086012840271,
-0.05459826439619064,
0.012592986226081848,
0.039926834404468536,
0.008881688117980957,
-0.16239458322525024,
0.008838442154228687,
0.13472050428390503,
0.26566922664642334,
0.053050898015499115,
-0.1601804494857788,
-0.04060773551464081,
0.3669394552707672,
-0.13288086652755737,
0.09428849071264267,
0.34957823157310486,
-0.3089854121208191,
-0.0002693459391593933,
0.24877378344535828,
0.10846177488565445,
0.07167858630418777,
0.10897835344076157,
0.01181017979979515,
0.11622335016727448,
0.02885151281952858,
0.050982505083084106,
0.041280657052993774,
0.22892649471759796,
0.604545533657074,
0.27275604009628296,
0.5209612250328064,
-0.15604262053966522,
-0.35989174246788025,
-0.028957948088645935,
0.07208938151597977,
0.37964364886283875,
-0.30939024686813354,
-0.023045670241117477,
-0.18052861094474792,
0.1293940544128418,
-0.20778098702430725,
-0.26482704281806946,
-0.1782638132572174,
-0.23459982872009277,
-0.006258354056626558,
0.3661822974681854,
-0.10901319235563278,
0.022802572697401047,
-0.504794716835022,
-0.027133986353874207,
0.018496006727218628,
-0.27501824498176575,
0.05059099197387695,
-0.17071092128753662,
-0.36962389945983887,
-0.02110457606613636,
0.4587472975254059,
-0.12515506148338318,
0.1882333904504776,
0.10954666882753372,
0.36828452348709106,
-0.4664030075073242,
-0.4941613972187042,
0.05754927918314934,
-0.1431126892566681,
-0.10074504464864731,
-0.09491655975580215,
-0.23862922191619873,
0.05986213684082031,
-0.2815753221511841,
0.24395814538002014,
-0.13518336415290833,
-0.314698189496994,
0.37958937883377075,
-0.25443974137306213,
0.13119395077228546,
-0.051734134554862976,
-0.06292867660522461,
-0.10624285787343979,
-0.2702234983444214,
0.1995532363653183,
0.25065261125564575,
0.24147990345954895,
-0.04999775066971779,
0.10889159142971039,
0.34600579738616943,
0.03145759552717209,
-0.18200407922267914,
0.03269542381167412,
-0.05292186141014099,
0.4130009412765503,
0.10543136298656464,
-0.35748153924942017,
0.18042714893817902,
-0.19938120245933533,
-0.08630204945802689,
0.3706178665161133,
-0.6093620657920837,
-0.07186820358037949,
-0.10554596036672592,
0.0535542368888855,
-0.21204666793346405,
-0.21262113749980927,
0.18315356969833374,
0.09810569882392883,
0.11497870832681656,
0.09448108077049255,
-0.13937070965766907,
0.1843811571598053,
0.18531151115894318,
0.1253596693277359,
-0.14149513840675354,
0.5173704028129578,
0.18273186683654785,
0.7609702944755554,
-0.2514157295227051,
-0.15328505635261536,
0.4215608835220337,
-0.004206467419862747,
0.03788496181368828,
-0.0025092773139476776,
-0.21491405367851257,
0.21247780323028564,
-0.11012335121631622,
0.11766456067562103,
0.2312818020582199,
-0.00467262789607048,
-0.3780919313430786,
0.05106711387634277,
0.00816192477941513,
-0.13097117841243744,
-0.15248221158981323,
0.16578003764152527,
-0.3027144968509674,
-0.173457533121109,
-0.23631538450717926,
-0.014544129371643066,
-0.03919021412730217,
-0.2933063209056854,
0.20753119885921478,
-0.03539060801267624,
-0.13088950514793396,
-0.003271784633398056,
-0.5666692852973938,
-0.12902413308620453,
-0.2909240424633026,
0.1284714639186859,
0.22086048126220703,
0.2876637279987335,
0.1764615774154663,
-0.4290253520011902,
0.34269237518310547,
-0.3482767641544342,
0.5372195243835449,
0.03365065157413483,
0.06724715232849121,
-0.026255004107952118,
-0.049901604652404785,
-0.6352043747901917,
-0.3425317406654358,
-0.23720985651016235,
0.09782671928405762,
-0.011633837595582008,
0.4497288465499878,
-0.37375980615615845,
-0.0046253502368927,
0.18555936217308044,
0.01582036167383194,
-0.2207271158695221,
-0.11730600893497467,
-0.3683891296386719,
-0.3900814652442932,
-0.16116251051425934,
0.21008646488189697,
-0.08549202978610992,
0.29503268003463745,
-0.16788676381111145,
0.016835637390613556,
-0.3898255228996277,
-0.12822921574115753,
-0.05260232090950012,
-0.025086771696805954,
0.33373787999153137,
0.002650834619998932,
0.1876506209373474,
-0.23384447395801544,
0.6536868214607239,
0.5415233969688416,
0.5010397434234619,
0.24643200635910034,
-0.3950539529323578,
0.1993260532617569,
0.0015073977410793304,
0.2977420687675476,
0.23868107795715332,
-0.1627882868051529,
0.3150475025177002,
-0.18478578329086304,
0.22801437973976135,
-0.36710095405578613,
0.2160699963569641,
0.32284075021743774,
-0.18221019208431244,
-0.20746314525604248,
0.13856923580169678,
0.5834920406341553,
0.2318260669708252,
0.013657256960868835,
-0.008939945138990879,
0.4135984182357788,
-0.24463817477226257,
0.22423872351646423,
0.17254453897476196,
0.9377955198287964,
-0.16507020592689514,
0.2108382135629654,
0.5665386319160461,
-0.2723202705383301,
0.1996874064207077,
0.1886368691921234,
0.03959786519408226,
-0.45790672302246094,
-0.06346439570188522,
0.09854656457901001,
-0.11666402220726013,
0.082853764295578,
0.014697459526360035,
0.04519137740135193,
0.10905759036540985,
-0.31836390495300293,
0.4060683250427246,
0.05332563817501068,
0.23933632671833038,
-0.07346481829881668,
-0.21219736337661743,
-0.3807991147041321,
-0.031983986496925354,
-0.12887339293956757,
-0.10769511014223099,
0.01231406256556511,
-0.1826002150774002,
-0.018371805548667908,
-0.25399571657180786,
-0.12476039677858353,
0.3193656802177429,
-0.26416024565696716,
0.08476407080888748,
0.052289366722106934,
-0.4152507185935974,
0.14123618602752686,
0.15897105634212494,
-0.21014940738677979,
-0.21267621219158173,
-0.09899556636810303,
-0.025041669607162476,
0.22496044635772705,
0.11330704391002655,
0.21585899591445923,
-0.04115910083055496,
0.28295785188674927,
-0.07864437997341156,
0.029086410999298096,
0.2765578627586365,
-0.09365473687648773,
-0.09817129373550415,
0.10659219324588776,
0.18263809382915497,
0.4168858230113983,
-0.14366690814495087,
-0.1832347810268402,
-0.14230811595916748,
0.07930241525173187,
-0.16993609070777893,
-0.013499293476343155,
-0.17892663180828094,
-0.0795440748333931,
0.029252927750349045,
0.10932968556880951,
-0.4153364300727844,
0.0435468927025795,
0.3104068338871002,
0.26022884249687195,
0.02336879074573517,
0.6574612855911255,
0.1011461541056633,
-0.1274321973323822,
-0.0027328431606292725,
0.043795160949230194,
0.4172667860984802,
-0.5469599962234497,
0.013855047523975372,
-0.11043375730514526,
0.03677062690258026,
-0.024795569479465485,
-0.04512740671634674,
0.16467256844043732,
-0.07169226557016373,
-0.25648194551467896,
-0.15067988634109497,
-0.44850218296051025,
0.20868071913719177,
-0.09615588188171387,
0.019732553511857986,
-0.2248377650976181,
0.011388421058654785,
-0.085748091340065,
0.12806576490402222,
-0.15794245898723602,
0.41796427965164185,
0.007664486765861511,
0.2007383555173874,
-0.17626440525054932,
-0.0410008430480957,
0.0777272880077362,
0.12619759142398834,
0.003964174538850784,
0.10371854901313782,
-0.03160195052623749,
-0.032059431076049805,
-0.13564956188201904,
0.13790513575077057,
0.24949640035629272,
-0.058961253613233566,
0.0010304450988769531,
-0.21521387994289398,
-0.04556751996278763,
0.09724458307027817,
0.3059769868850708,
0.028214186429977417,
-0.12514019012451172,
-0.3924717605113983,
0.6406344175338745,
0.028523892164230347,
-0.19758617877960205,
0.2864784300327301,
-0.18720051646232605,
0.289547324180603,
0.0917229950428009,
0.2597770392894745,
0.16811463236808777,
-0.011829443275928497,
-0.10842917859554291,
0.07066512852907181,
0.25520309805870056,
-0.01300356350839138,
0.11520706117153168,
-0.5115820169448853,
-0.044873591512441635,
-0.1531463861465454,
0.28612008690834045,
0.34986385703086853,
-0.28732776641845703,
-0.31640154123306274,
0.3721511662006378,
0.10377749800682068,
-0.17924967408180237,
-0.038160692900419235,
0.3873246908187866,
-0.17553922533988953,
-0.016284964978694916,
0.3582703471183777,
0.08701205253601074,
0.0912797749042511,
-0.4745889902114868,
0.22484688460826874,
-0.19880099594593048,
0.2047765851020813,
-0.09780913591384888,
0.5577723979949951,
-0.42872533202171326,
-0.06432685256004333,
0.527766227722168,
-0.028468556702136993,
0.24214275181293488,
0.23489627242088318,
-0.01083725318312645,
0.9540224075317383,
0.10424578189849854,
-0.019396429881453514,
0.19414818286895752,
-0.6462528109550476,
-0.18381737172603607,
0.28100454807281494,
0.08463999629020691,
0.06836876273155212,
-0.030822616070508957,
0.6247882843017578,
0.5054935812950134,
-0.29815900325775146,
-0.20873317122459412,
0.11152100563049316,
-0.35007697343826294,
-0.2414996325969696,
-0.0002682209014892578,
-0.32071393728256226,
-0.2228795289993286,
0.30384957790374756,
-0.25577956438064575,
-0.21012870967388153,
0.29467862844467163,
0.13642463088035583,
-0.18853265047073364,
-0.11754324287176132,
-0.012352032586932182,
0.35055989027023315,
0.12605030834674835,
-0.21098466217517853,
0.4667269289493561,
0.03488748148083687,
-0.008752629160881042,
-0.0008418653160333633,
-0.05305611714720726,
0.3887566030025482,
0.5587513446807861,
-0.25538015365600586,
-0.3039206862449646,
0.3673570454120636,
0.10891787707805634,
0.06696153432130814,
0.1895175278186798,
0.035410620272159576,
0.19887565076351166,
0.45779678225517273,
-0.0015284717082977295,
-0.13382965326309204,
0.02674785628914833,
0.07029777020215988,
0.11988351494073868,
0.0907236784696579,
0.13092133402824402,
-0.025602687150239944,
-0.2670104205608368,
-0.16739441454410553,
0.07153134047985077,
-0.08386416733264923,
-0.36983522772789,
0.33789288997650146,
0.010778550058603287,
0.13048896193504333,
-0.13841569423675537,
0.025288201868534088,
-0.13139232993125916,
0.5006673336029053,
0.44702959060668945,
-0.1341085135936737,
-0.11530622839927673,
-0.05443544685840607,
-0.5407018661499023,
0.5433887243270874,
-0.3874911963939667,
0.041204825043678284,
0.0914793387055397,
0.323763906955719,
-0.0644955188035965,
0.04292565584182739,
0.11541347950696945,
0.3992866277694702,
0.11660704016685486,
-0.05029482766985893,
-0.35721540451049805,
-0.014218704774975777,
0.2831236720085144,
-0.09338326752185822,
-0.14389577507972717,
-0.4796702563762665,
0.2346724569797516,
-0.10061018168926239,
-0.034008484333753586,
0.07000524550676346,
0.10943871736526489,
-0.15247729420661926,
-0.2076038271188736,
0.5004398822784424,
-0.11808068305253983,
0.364885151386261,
0.1840827614068985,
-0.14290916919708252,
-0.24913744628429413,
-0.26092007756233215,
-0.1742405891418457,
0.17882263660430908,
-0.0768154039978981,
0.3622146546840668,
0.040559910237789154,
0.23748016357421875,
-0.11797160655260086,
-0.17792339622974396,
-0.06395480036735535,
0.06468166410923004,
-0.07224631309509277,
0.24296365678310394,
-0.026193782687187195,
0.2886037230491638,
-0.028887491673231125,
-0.1097373366355896,
0.21014800667762756,
0.0283593088388443,
-0.21019145846366882,
-0.5273830890655518,
0.5341638326644897,
-0.2805638015270233,
-0.11210817843675613,
0.02702568843960762,
0.16643229126930237,
0.16392359137535095,
-0.04843372479081154,
-0.5384548902511597,
-0.022395916283130646,
0.21042267978191376,
-0.020939206704497337,
-0.10820503532886505,
0.11949830502271652,
-0.26638635993003845,
0.07350380718708038,
-0.16153913736343384,
0.08611112833023071,
-0.07548746466636658,
-0.0847281888127327,
-0.14078964293003082,
-0.29982349276542664
] |
https://github.com/huggingface/datasets/issues/6595 | @lhoestq also it's strange that there was no error for a dataset with the same features, same data type, but smaller (much smaller).
Altho i'm not sure about this, but chances are the dataset was loaded directly, not `load_from_disk`.... Maybe because of this. | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 | ### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih | 43 | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
@lhoestq also it's strange that there was no error for a dataset with the same features, same data type, but smaller (much smaller).
Altho i'm not sure about this, but chances are the dataset was loaded directly, not `load_from_disk`.... Maybe because of this. | [
-0.28692787885665894,
-0.0044410377740859985,
0.16262230277061462,
0.20641998946666718,
0.36014455556869507,
-0.21503600478172302,
0.30898481607437134,
0.37914708256721497,
-0.34722834825515747,
0.15772300958633423,
0.015633590519428253,
0.6490374207496643,
-0.33155137300491333,
0.27174314856529236,
0.03232838585972786,
0.07780680060386658,
0.044387124478816986,
0.10664567351341248,
0.00963687151670456,
0.0048987120389938354,
-0.15758396685123444,
-0.19536621868610382,
-0.14263565838336945,
-0.008043792098760605,
-0.2817932367324829,
0.00037721171975135803,
0.07331936061382294,
0.35752421617507935,
-0.2141372263431549,
-0.3937336802482605,
0.08243649452924728,
-0.12624694406986237,
0.21178603172302246,
0.28647738695144653,
-0.00012834150402341038,
0.06488712131977081,
0.40767624974250793,
0.03624340891838074,
-0.17105402052402496,
0.0033700168132781982,
0.2343895137310028,
-0.5461286306381226,
0.24369822442531586,
-0.35758259892463684,
0.05803541839122772,
-0.4624326229095459,
-0.13803523778915405,
0.33080971240997314,
0.17463010549545288,
0.25066423416137695,
0.12405610084533691,
0.0697508156299591,
0.16663311421871185,
0.3094941973686218,
0.6788209080696106,
0.3536756932735443,
-0.16680309176445007,
0.15855228900909424,
0.3307241201400757,
0.04394958168268204,
-0.43183979392051697,
0.15646421909332275,
0.09077764302492142,
-0.09082549810409546,
0.05356065183877945,
-0.04597010463476181,
-0.00040668994188308716,
-0.09710194170475006,
0.280001699924469,
0.14481139183044434,
0.23019567131996155,
-0.2740357518196106,
-0.22610828280448914,
-0.44828444719314575,
0.08256423473358154,
-0.42230916023254395,
0.30815255641937256,
0.30906522274017334,
-0.05385312810540199,
-0.13982877135276794,
-0.14953960478305817,
-0.31468409299850464,
-0.3078705966472626,
0.06161489337682724,
-0.18401801586151123,
0.4608347713947296,
-0.0480378195643425,
0.21515226364135742,
0.22612346708774567,
-0.2553112804889679,
0.20504365861415863,
0.02997533604502678,
-0.10449019074440002,
-0.06120007485151291,
-0.3290233612060547,
0.041264601051807404,
-0.078033447265625,
-0.03780768811702728,
0.1668643206357956,
0.12543977797031403,
-0.08024343103170395,
0.03766786307096481,
0.18836542963981628,
0.008389811962842941,
0.275597482919693,
0.19091089069843292,
-0.32839420437812805,
0.17092935740947723,
0.024846717715263367,
0.17379999160766602,
0.1079457551240921,
0.22107496857643127,
-0.27618104219436646,
-0.17445756494998932,
0.19315402209758759,
-0.14756394922733307,
0.40419018268585205,
-0.18426558375358582,
-0.22625389695167542,
0.08654677122831345,
-0.2322331964969635,
0.155229389667511,
0.08980399370193481,
0.2970046401023865,
-0.10243669152259827,
0.34675347805023193,
-0.15615585446357727,
0.2291359007358551,
-0.054334770888090134,
-0.007317960262298584,
-0.08237145841121674,
0.12905538082122803,
-0.1065257117152214,
-0.10816631466150284,
0.01833231747150421,
-0.30802851915359497,
0.028467662632465363,
0.04258029907941818,
0.0660407617688179,
-0.15129998326301575,
-0.13408830761909485,
-0.17006731033325195,
0.05530896782875061,
0.2526071071624756,
-0.18148986995220184,
0.13070470094680786,
-0.09777101129293442,
-0.1417735517024994,
-0.12302564829587936,
0.5319883823394775,
-0.49179941415786743,
-0.39513012766838074,
-0.43652814626693726,
0.08617695420980453,
-0.31598836183547974,
-0.06973753869533539,
-0.5748798251152039,
0.053794801235198975,
0.10401085019111633,
0.04331004619598389,
0.14214898645877838,
-0.3146522343158722,
-0.14436964690685272,
-0.3037573993206024,
0.2021169811487198,
0.0013077184557914734,
-0.5543399453163147,
0.0861220508813858,
0.09240235388278961,
-0.0743994414806366,
0.4539240002632141,
0.12665218114852905,
-0.296231210231781,
-0.09934785962104797,
-0.25425341725349426,
0.21887391805648804,
0.3095845878124237,
-0.3343796730041504,
-0.6185442805290222,
0.25418150424957275,
-0.31391483545303345,
0.14846298098564148,
0.12044719606637955,
-0.08597426116466522,
0.3489328622817993,
0.10245229303836823,
-0.12779581546783447,
0.3595367670059204,
-0.00784748699516058,
0.1956247091293335,
-0.44611167907714844,
-0.2642143666744232,
0.23005789518356323,
0.4100196957588196,
0.2968016266822815,
-0.1755615472793579,
0.23321053385734558,
0.10344618558883667,
0.27910134196281433,
-0.15002211928367615,
0.28916746377944946,
0.04790230095386505,
0.15392422676086426,
-0.08834744989871979,
-0.002467028796672821,
0.08344808220863342,
-0.594890832901001,
0.2965248227119446,
0.0477508008480072,
-0.08078782260417938,
-0.3421595096588135,
0.06908641755580902,
-0.18677596747875214,
0.30863484740257263,
-0.34628695249557495,
0.11969265341758728,
-0.022761544212698936,
-0.01871144026517868,
-0.028580300509929657,
0.1380607932806015,
-0.06199570745229721,
-0.15921145677566528,
-0.3845697045326233,
0.15430906414985657,
-0.0006786398589611053,
0.4430534243583679,
0.2269676774740219,
-0.41227516531944275,
-0.04970059171319008,
0.2720855474472046,
-0.017679810523986816,
-0.11930510401725769,
-0.2252207100391388,
0.3112631142139435,
-0.10421660542488098,
0.2572666108608246,
-0.38973844051361084,
-0.051454655826091766,
0.2198101431131363,
-0.3343258798122406,
0.04028276354074478,
0.07242009043693542,
0.18527854979038239,
-0.14531996846199036,
0.1698031723499298,
0.4245418608188629,
0.24095474183559418,
0.2904515266418457,
-0.010134086012840271,
-0.05459826439619064,
0.012592986226081848,
0.039926834404468536,
0.008881688117980957,
-0.16239458322525024,
0.008838442154228687,
0.13472050428390503,
0.26566922664642334,
0.053050898015499115,
-0.1601804494857788,
-0.04060773551464081,
0.3669394552707672,
-0.13288086652755737,
0.09428849071264267,
0.34957823157310486,
-0.3089854121208191,
-0.0002693459391593933,
0.24877378344535828,
0.10846177488565445,
0.07167858630418777,
0.10897835344076157,
0.01181017979979515,
0.11622335016727448,
0.02885151281952858,
0.050982505083084106,
0.041280657052993774,
0.22892649471759796,
0.604545533657074,
0.27275604009628296,
0.5209612250328064,
-0.15604262053966522,
-0.35989174246788025,
-0.028957948088645935,
0.07208938151597977,
0.37964364886283875,
-0.30939024686813354,
-0.023045670241117477,
-0.18052861094474792,
0.1293940544128418,
-0.20778098702430725,
-0.26482704281806946,
-0.1782638132572174,
-0.23459982872009277,
-0.006258354056626558,
0.3661822974681854,
-0.10901319235563278,
0.022802572697401047,
-0.504794716835022,
-0.027133986353874207,
0.018496006727218628,
-0.27501824498176575,
0.05059099197387695,
-0.17071092128753662,
-0.36962389945983887,
-0.02110457606613636,
0.4587472975254059,
-0.12515506148338318,
0.1882333904504776,
0.10954666882753372,
0.36828452348709106,
-0.4664030075073242,
-0.4941613972187042,
0.05754927918314934,
-0.1431126892566681,
-0.10074504464864731,
-0.09491655975580215,
-0.23862922191619873,
0.05986213684082031,
-0.2815753221511841,
0.24395814538002014,
-0.13518336415290833,
-0.314698189496994,
0.37958937883377075,
-0.25443974137306213,
0.13119395077228546,
-0.051734134554862976,
-0.06292867660522461,
-0.10624285787343979,
-0.2702234983444214,
0.1995532363653183,
0.25065261125564575,
0.24147990345954895,
-0.04999775066971779,
0.10889159142971039,
0.34600579738616943,
0.03145759552717209,
-0.18200407922267914,
0.03269542381167412,
-0.05292186141014099,
0.4130009412765503,
0.10543136298656464,
-0.35748153924942017,
0.18042714893817902,
-0.19938120245933533,
-0.08630204945802689,
0.3706178665161133,
-0.6093620657920837,
-0.07186820358037949,
-0.10554596036672592,
0.0535542368888855,
-0.21204666793346405,
-0.21262113749980927,
0.18315356969833374,
0.09810569882392883,
0.11497870832681656,
0.09448108077049255,
-0.13937070965766907,
0.1843811571598053,
0.18531151115894318,
0.1253596693277359,
-0.14149513840675354,
0.5173704028129578,
0.18273186683654785,
0.7609702944755554,
-0.2514157295227051,
-0.15328505635261536,
0.4215608835220337,
-0.004206467419862747,
0.03788496181368828,
-0.0025092773139476776,
-0.21491405367851257,
0.21247780323028564,
-0.11012335121631622,
0.11766456067562103,
0.2312818020582199,
-0.00467262789607048,
-0.3780919313430786,
0.05106711387634277,
0.00816192477941513,
-0.13097117841243744,
-0.15248221158981323,
0.16578003764152527,
-0.3027144968509674,
-0.173457533121109,
-0.23631538450717926,
-0.014544129371643066,
-0.03919021412730217,
-0.2933063209056854,
0.20753119885921478,
-0.03539060801267624,
-0.13088950514793396,
-0.003271784633398056,
-0.5666692852973938,
-0.12902413308620453,
-0.2909240424633026,
0.1284714639186859,
0.22086048126220703,
0.2876637279987335,
0.1764615774154663,
-0.4290253520011902,
0.34269237518310547,
-0.3482767641544342,
0.5372195243835449,
0.03365065157413483,
0.06724715232849121,
-0.026255004107952118,
-0.049901604652404785,
-0.6352043747901917,
-0.3425317406654358,
-0.23720985651016235,
0.09782671928405762,
-0.011633837595582008,
0.4497288465499878,
-0.37375980615615845,
-0.0046253502368927,
0.18555936217308044,
0.01582036167383194,
-0.2207271158695221,
-0.11730600893497467,
-0.3683891296386719,
-0.3900814652442932,
-0.16116251051425934,
0.21008646488189697,
-0.08549202978610992,
0.29503268003463745,
-0.16788676381111145,
0.016835637390613556,
-0.3898255228996277,
-0.12822921574115753,
-0.05260232090950012,
-0.025086771696805954,
0.33373787999153137,
0.002650834619998932,
0.1876506209373474,
-0.23384447395801544,
0.6536868214607239,
0.5415233969688416,
0.5010397434234619,
0.24643200635910034,
-0.3950539529323578,
0.1993260532617569,
0.0015073977410793304,
0.2977420687675476,
0.23868107795715332,
-0.1627882868051529,
0.3150475025177002,
-0.18478578329086304,
0.22801437973976135,
-0.36710095405578613,
0.2160699963569641,
0.32284075021743774,
-0.18221019208431244,
-0.20746314525604248,
0.13856923580169678,
0.5834920406341553,
0.2318260669708252,
0.013657256960868835,
-0.008939945138990879,
0.4135984182357788,
-0.24463817477226257,
0.22423872351646423,
0.17254453897476196,
0.9377955198287964,
-0.16507020592689514,
0.2108382135629654,
0.5665386319160461,
-0.2723202705383301,
0.1996874064207077,
0.1886368691921234,
0.03959786519408226,
-0.45790672302246094,
-0.06346439570188522,
0.09854656457901001,
-0.11666402220726013,
0.082853764295578,
0.014697459526360035,
0.04519137740135193,
0.10905759036540985,
-0.31836390495300293,
0.4060683250427246,
0.05332563817501068,
0.23933632671833038,
-0.07346481829881668,
-0.21219736337661743,
-0.3807991147041321,
-0.031983986496925354,
-0.12887339293956757,
-0.10769511014223099,
0.01231406256556511,
-0.1826002150774002,
-0.018371805548667908,
-0.25399571657180786,
-0.12476039677858353,
0.3193656802177429,
-0.26416024565696716,
0.08476407080888748,
0.052289366722106934,
-0.4152507185935974,
0.14123618602752686,
0.15897105634212494,
-0.21014940738677979,
-0.21267621219158173,
-0.09899556636810303,
-0.025041669607162476,
0.22496044635772705,
0.11330704391002655,
0.21585899591445923,
-0.04115910083055496,
0.28295785188674927,
-0.07864437997341156,
0.029086410999298096,
0.2765578627586365,
-0.09365473687648773,
-0.09817129373550415,
0.10659219324588776,
0.18263809382915497,
0.4168858230113983,
-0.14366690814495087,
-0.1832347810268402,
-0.14230811595916748,
0.07930241525173187,
-0.16993609070777893,
-0.013499293476343155,
-0.17892663180828094,
-0.0795440748333931,
0.029252927750349045,
0.10932968556880951,
-0.4153364300727844,
0.0435468927025795,
0.3104068338871002,
0.26022884249687195,
0.02336879074573517,
0.6574612855911255,
0.1011461541056633,
-0.1274321973323822,
-0.0027328431606292725,
0.043795160949230194,
0.4172667860984802,
-0.5469599962234497,
0.013855047523975372,
-0.11043375730514526,
0.03677062690258026,
-0.024795569479465485,
-0.04512740671634674,
0.16467256844043732,
-0.07169226557016373,
-0.25648194551467896,
-0.15067988634109497,
-0.44850218296051025,
0.20868071913719177,
-0.09615588188171387,
0.019732553511857986,
-0.2248377650976181,
0.011388421058654785,
-0.085748091340065,
0.12806576490402222,
-0.15794245898723602,
0.41796427965164185,
0.007664486765861511,
0.2007383555173874,
-0.17626440525054932,
-0.0410008430480957,
0.0777272880077362,
0.12619759142398834,
0.003964174538850784,
0.10371854901313782,
-0.03160195052623749,
-0.032059431076049805,
-0.13564956188201904,
0.13790513575077057,
0.24949640035629272,
-0.058961253613233566,
0.0010304450988769531,
-0.21521387994289398,
-0.04556751996278763,
0.09724458307027817,
0.3059769868850708,
0.028214186429977417,
-0.12514019012451172,
-0.3924717605113983,
0.6406344175338745,
0.028523892164230347,
-0.19758617877960205,
0.2864784300327301,
-0.18720051646232605,
0.289547324180603,
0.0917229950428009,
0.2597770392894745,
0.16811463236808777,
-0.011829443275928497,
-0.10842917859554291,
0.07066512852907181,
0.25520309805870056,
-0.01300356350839138,
0.11520706117153168,
-0.5115820169448853,
-0.044873591512441635,
-0.1531463861465454,
0.28612008690834045,
0.34986385703086853,
-0.28732776641845703,
-0.31640154123306274,
0.3721511662006378,
0.10377749800682068,
-0.17924967408180237,
-0.038160692900419235,
0.3873246908187866,
-0.17553922533988953,
-0.016284964978694916,
0.3582703471183777,
0.08701205253601074,
0.0912797749042511,
-0.4745889902114868,
0.22484688460826874,
-0.19880099594593048,
0.2047765851020813,
-0.09780913591384888,
0.5577723979949951,
-0.42872533202171326,
-0.06432685256004333,
0.527766227722168,
-0.028468556702136993,
0.24214275181293488,
0.23489627242088318,
-0.01083725318312645,
0.9540224075317383,
0.10424578189849854,
-0.019396429881453514,
0.19414818286895752,
-0.6462528109550476,
-0.18381737172603607,
0.28100454807281494,
0.08463999629020691,
0.06836876273155212,
-0.030822616070508957,
0.6247882843017578,
0.5054935812950134,
-0.29815900325775146,
-0.20873317122459412,
0.11152100563049316,
-0.35007697343826294,
-0.2414996325969696,
-0.0002682209014892578,
-0.32071393728256226,
-0.2228795289993286,
0.30384957790374756,
-0.25577956438064575,
-0.21012870967388153,
0.29467862844467163,
0.13642463088035583,
-0.18853265047073364,
-0.11754324287176132,
-0.012352032586932182,
0.35055989027023315,
0.12605030834674835,
-0.21098466217517853,
0.4667269289493561,
0.03488748148083687,
-0.008752629160881042,
-0.0008418653160333633,
-0.05305611714720726,
0.3887566030025482,
0.5587513446807861,
-0.25538015365600586,
-0.3039206862449646,
0.3673570454120636,
0.10891787707805634,
0.06696153432130814,
0.1895175278186798,
0.035410620272159576,
0.19887565076351166,
0.45779678225517273,
-0.0015284717082977295,
-0.13382965326309204,
0.02674785628914833,
0.07029777020215988,
0.11988351494073868,
0.0907236784696579,
0.13092133402824402,
-0.025602687150239944,
-0.2670104205608368,
-0.16739441454410553,
0.07153134047985077,
-0.08386416733264923,
-0.36983522772789,
0.33789288997650146,
0.010778550058603287,
0.13048896193504333,
-0.13841569423675537,
0.025288201868534088,
-0.13139232993125916,
0.5006673336029053,
0.44702959060668945,
-0.1341085135936737,
-0.11530622839927673,
-0.05443544685840607,
-0.5407018661499023,
0.5433887243270874,
-0.3874911963939667,
0.041204825043678284,
0.0914793387055397,
0.323763906955719,
-0.0644955188035965,
0.04292565584182739,
0.11541347950696945,
0.3992866277694702,
0.11660704016685486,
-0.05029482766985893,
-0.35721540451049805,
-0.014218704774975777,
0.2831236720085144,
-0.09338326752185822,
-0.14389577507972717,
-0.4796702563762665,
0.2346724569797516,
-0.10061018168926239,
-0.034008484333753586,
0.07000524550676346,
0.10943871736526489,
-0.15247729420661926,
-0.2076038271188736,
0.5004398822784424,
-0.11808068305253983,
0.364885151386261,
0.1840827614068985,
-0.14290916919708252,
-0.24913744628429413,
-0.26092007756233215,
-0.1742405891418457,
0.17882263660430908,
-0.0768154039978981,
0.3622146546840668,
0.040559910237789154,
0.23748016357421875,
-0.11797160655260086,
-0.17792339622974396,
-0.06395480036735535,
0.06468166410923004,
-0.07224631309509277,
0.24296365678310394,
-0.026193782687187195,
0.2886037230491638,
-0.028887491673231125,
-0.1097373366355896,
0.21014800667762756,
0.0283593088388443,
-0.21019145846366882,
-0.5273830890655518,
0.5341638326644897,
-0.2805638015270233,
-0.11210817843675613,
0.02702568843960762,
0.16643229126930237,
0.16392359137535095,
-0.04843372479081154,
-0.5384548902511597,
-0.022395916283130646,
0.21042267978191376,
-0.020939206704497337,
-0.10820503532886505,
0.11949830502271652,
-0.26638635993003845,
0.07350380718708038,
-0.16153913736343384,
0.08611112833023071,
-0.07548746466636658,
-0.0847281888127327,
-0.14078964293003082,
-0.29982349276542664
] |
https://github.com/huggingface/datasets/issues/6595 | > What does that missing casting implementation mean for my specific case and what does it mean in general?
Nothing for you, just that casting to float16 using `.cast_column("my_column_name", Value("float16"))` raises an error
> Do you know how to push_to_hub with multiple processes?
It's not possible (yet ?). Mostly because we haven't implemented yet how to do parallel uploads to the Hub from `datasets`.
Though if you want faster uploads you can already enable `hf_transfer`
```
pip install hf_transfer
```
and setting `HF_HUB_ENABLE_HF_TRANSFER=1` as an environment variable
see https://huggingface.co/docs/huggingface_hub/guides/upload#tips-and-tricks-for-large-uploads | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 | ### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih | 89 | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
> What does that missing casting implementation mean for my specific case and what does it mean in general?
Nothing for you, just that casting to float16 using `.cast_column("my_column_name", Value("float16"))` raises an error
> Do you know how to push_to_hub with multiple processes?
It's not possible (yet ?). Mostly because we haven't implemented yet how to do parallel uploads to the Hub from `datasets`.
Though if you want faster uploads you can already enable `hf_transfer`
```
pip install hf_transfer
```
and setting `HF_HUB_ENABLE_HF_TRANSFER=1` as an environment variable
see https://huggingface.co/docs/huggingface_hub/guides/upload#tips-and-tricks-for-large-uploads | [
-0.28692787885665894,
-0.0044410377740859985,
0.16262230277061462,
0.20641998946666718,
0.36014455556869507,
-0.21503600478172302,
0.30898481607437134,
0.37914708256721497,
-0.34722834825515747,
0.15772300958633423,
0.015633590519428253,
0.6490374207496643,
-0.33155137300491333,
0.27174314856529236,
0.03232838585972786,
0.07780680060386658,
0.044387124478816986,
0.10664567351341248,
0.00963687151670456,
0.0048987120389938354,
-0.15758396685123444,
-0.19536621868610382,
-0.14263565838336945,
-0.008043792098760605,
-0.2817932367324829,
0.00037721171975135803,
0.07331936061382294,
0.35752421617507935,
-0.2141372263431549,
-0.3937336802482605,
0.08243649452924728,
-0.12624694406986237,
0.21178603172302246,
0.28647738695144653,
-0.00012834150402341038,
0.06488712131977081,
0.40767624974250793,
0.03624340891838074,
-0.17105402052402496,
0.0033700168132781982,
0.2343895137310028,
-0.5461286306381226,
0.24369822442531586,
-0.35758259892463684,
0.05803541839122772,
-0.4624326229095459,
-0.13803523778915405,
0.33080971240997314,
0.17463010549545288,
0.25066423416137695,
0.12405610084533691,
0.0697508156299591,
0.16663311421871185,
0.3094941973686218,
0.6788209080696106,
0.3536756932735443,
-0.16680309176445007,
0.15855228900909424,
0.3307241201400757,
0.04394958168268204,
-0.43183979392051697,
0.15646421909332275,
0.09077764302492142,
-0.09082549810409546,
0.05356065183877945,
-0.04597010463476181,
-0.00040668994188308716,
-0.09710194170475006,
0.280001699924469,
0.14481139183044434,
0.23019567131996155,
-0.2740357518196106,
-0.22610828280448914,
-0.44828444719314575,
0.08256423473358154,
-0.42230916023254395,
0.30815255641937256,
0.30906522274017334,
-0.05385312810540199,
-0.13982877135276794,
-0.14953960478305817,
-0.31468409299850464,
-0.3078705966472626,
0.06161489337682724,
-0.18401801586151123,
0.4608347713947296,
-0.0480378195643425,
0.21515226364135742,
0.22612346708774567,
-0.2553112804889679,
0.20504365861415863,
0.02997533604502678,
-0.10449019074440002,
-0.06120007485151291,
-0.3290233612060547,
0.041264601051807404,
-0.078033447265625,
-0.03780768811702728,
0.1668643206357956,
0.12543977797031403,
-0.08024343103170395,
0.03766786307096481,
0.18836542963981628,
0.008389811962842941,
0.275597482919693,
0.19091089069843292,
-0.32839420437812805,
0.17092935740947723,
0.024846717715263367,
0.17379999160766602,
0.1079457551240921,
0.22107496857643127,
-0.27618104219436646,
-0.17445756494998932,
0.19315402209758759,
-0.14756394922733307,
0.40419018268585205,
-0.18426558375358582,
-0.22625389695167542,
0.08654677122831345,
-0.2322331964969635,
0.155229389667511,
0.08980399370193481,
0.2970046401023865,
-0.10243669152259827,
0.34675347805023193,
-0.15615585446357727,
0.2291359007358551,
-0.054334770888090134,
-0.007317960262298584,
-0.08237145841121674,
0.12905538082122803,
-0.1065257117152214,
-0.10816631466150284,
0.01833231747150421,
-0.30802851915359497,
0.028467662632465363,
0.04258029907941818,
0.0660407617688179,
-0.15129998326301575,
-0.13408830761909485,
-0.17006731033325195,
0.05530896782875061,
0.2526071071624756,
-0.18148986995220184,
0.13070470094680786,
-0.09777101129293442,
-0.1417735517024994,
-0.12302564829587936,
0.5319883823394775,
-0.49179941415786743,
-0.39513012766838074,
-0.43652814626693726,
0.08617695420980453,
-0.31598836183547974,
-0.06973753869533539,
-0.5748798251152039,
0.053794801235198975,
0.10401085019111633,
0.04331004619598389,
0.14214898645877838,
-0.3146522343158722,
-0.14436964690685272,
-0.3037573993206024,
0.2021169811487198,
0.0013077184557914734,
-0.5543399453163147,
0.0861220508813858,
0.09240235388278961,
-0.0743994414806366,
0.4539240002632141,
0.12665218114852905,
-0.296231210231781,
-0.09934785962104797,
-0.25425341725349426,
0.21887391805648804,
0.3095845878124237,
-0.3343796730041504,
-0.6185442805290222,
0.25418150424957275,
-0.31391483545303345,
0.14846298098564148,
0.12044719606637955,
-0.08597426116466522,
0.3489328622817993,
0.10245229303836823,
-0.12779581546783447,
0.3595367670059204,
-0.00784748699516058,
0.1956247091293335,
-0.44611167907714844,
-0.2642143666744232,
0.23005789518356323,
0.4100196957588196,
0.2968016266822815,
-0.1755615472793579,
0.23321053385734558,
0.10344618558883667,
0.27910134196281433,
-0.15002211928367615,
0.28916746377944946,
0.04790230095386505,
0.15392422676086426,
-0.08834744989871979,
-0.002467028796672821,
0.08344808220863342,
-0.594890832901001,
0.2965248227119446,
0.0477508008480072,
-0.08078782260417938,
-0.3421595096588135,
0.06908641755580902,
-0.18677596747875214,
0.30863484740257263,
-0.34628695249557495,
0.11969265341758728,
-0.022761544212698936,
-0.01871144026517868,
-0.028580300509929657,
0.1380607932806015,
-0.06199570745229721,
-0.15921145677566528,
-0.3845697045326233,
0.15430906414985657,
-0.0006786398589611053,
0.4430534243583679,
0.2269676774740219,
-0.41227516531944275,
-0.04970059171319008,
0.2720855474472046,
-0.017679810523986816,
-0.11930510401725769,
-0.2252207100391388,
0.3112631142139435,
-0.10421660542488098,
0.2572666108608246,
-0.38973844051361084,
-0.051454655826091766,
0.2198101431131363,
-0.3343258798122406,
0.04028276354074478,
0.07242009043693542,
0.18527854979038239,
-0.14531996846199036,
0.1698031723499298,
0.4245418608188629,
0.24095474183559418,
0.2904515266418457,
-0.010134086012840271,
-0.05459826439619064,
0.012592986226081848,
0.039926834404468536,
0.008881688117980957,
-0.16239458322525024,
0.008838442154228687,
0.13472050428390503,
0.26566922664642334,
0.053050898015499115,
-0.1601804494857788,
-0.04060773551464081,
0.3669394552707672,
-0.13288086652755737,
0.09428849071264267,
0.34957823157310486,
-0.3089854121208191,
-0.0002693459391593933,
0.24877378344535828,
0.10846177488565445,
0.07167858630418777,
0.10897835344076157,
0.01181017979979515,
0.11622335016727448,
0.02885151281952858,
0.050982505083084106,
0.041280657052993774,
0.22892649471759796,
0.604545533657074,
0.27275604009628296,
0.5209612250328064,
-0.15604262053966522,
-0.35989174246788025,
-0.028957948088645935,
0.07208938151597977,
0.37964364886283875,
-0.30939024686813354,
-0.023045670241117477,
-0.18052861094474792,
0.1293940544128418,
-0.20778098702430725,
-0.26482704281806946,
-0.1782638132572174,
-0.23459982872009277,
-0.006258354056626558,
0.3661822974681854,
-0.10901319235563278,
0.022802572697401047,
-0.504794716835022,
-0.027133986353874207,
0.018496006727218628,
-0.27501824498176575,
0.05059099197387695,
-0.17071092128753662,
-0.36962389945983887,
-0.02110457606613636,
0.4587472975254059,
-0.12515506148338318,
0.1882333904504776,
0.10954666882753372,
0.36828452348709106,
-0.4664030075073242,
-0.4941613972187042,
0.05754927918314934,
-0.1431126892566681,
-0.10074504464864731,
-0.09491655975580215,
-0.23862922191619873,
0.05986213684082031,
-0.2815753221511841,
0.24395814538002014,
-0.13518336415290833,
-0.314698189496994,
0.37958937883377075,
-0.25443974137306213,
0.13119395077228546,
-0.051734134554862976,
-0.06292867660522461,
-0.10624285787343979,
-0.2702234983444214,
0.1995532363653183,
0.25065261125564575,
0.24147990345954895,
-0.04999775066971779,
0.10889159142971039,
0.34600579738616943,
0.03145759552717209,
-0.18200407922267914,
0.03269542381167412,
-0.05292186141014099,
0.4130009412765503,
0.10543136298656464,
-0.35748153924942017,
0.18042714893817902,
-0.19938120245933533,
-0.08630204945802689,
0.3706178665161133,
-0.6093620657920837,
-0.07186820358037949,
-0.10554596036672592,
0.0535542368888855,
-0.21204666793346405,
-0.21262113749980927,
0.18315356969833374,
0.09810569882392883,
0.11497870832681656,
0.09448108077049255,
-0.13937070965766907,
0.1843811571598053,
0.18531151115894318,
0.1253596693277359,
-0.14149513840675354,
0.5173704028129578,
0.18273186683654785,
0.7609702944755554,
-0.2514157295227051,
-0.15328505635261536,
0.4215608835220337,
-0.004206467419862747,
0.03788496181368828,
-0.0025092773139476776,
-0.21491405367851257,
0.21247780323028564,
-0.11012335121631622,
0.11766456067562103,
0.2312818020582199,
-0.00467262789607048,
-0.3780919313430786,
0.05106711387634277,
0.00816192477941513,
-0.13097117841243744,
-0.15248221158981323,
0.16578003764152527,
-0.3027144968509674,
-0.173457533121109,
-0.23631538450717926,
-0.014544129371643066,
-0.03919021412730217,
-0.2933063209056854,
0.20753119885921478,
-0.03539060801267624,
-0.13088950514793396,
-0.003271784633398056,
-0.5666692852973938,
-0.12902413308620453,
-0.2909240424633026,
0.1284714639186859,
0.22086048126220703,
0.2876637279987335,
0.1764615774154663,
-0.4290253520011902,
0.34269237518310547,
-0.3482767641544342,
0.5372195243835449,
0.03365065157413483,
0.06724715232849121,
-0.026255004107952118,
-0.049901604652404785,
-0.6352043747901917,
-0.3425317406654358,
-0.23720985651016235,
0.09782671928405762,
-0.011633837595582008,
0.4497288465499878,
-0.37375980615615845,
-0.0046253502368927,
0.18555936217308044,
0.01582036167383194,
-0.2207271158695221,
-0.11730600893497467,
-0.3683891296386719,
-0.3900814652442932,
-0.16116251051425934,
0.21008646488189697,
-0.08549202978610992,
0.29503268003463745,
-0.16788676381111145,
0.016835637390613556,
-0.3898255228996277,
-0.12822921574115753,
-0.05260232090950012,
-0.025086771696805954,
0.33373787999153137,
0.002650834619998932,
0.1876506209373474,
-0.23384447395801544,
0.6536868214607239,
0.5415233969688416,
0.5010397434234619,
0.24643200635910034,
-0.3950539529323578,
0.1993260532617569,
0.0015073977410793304,
0.2977420687675476,
0.23868107795715332,
-0.1627882868051529,
0.3150475025177002,
-0.18478578329086304,
0.22801437973976135,
-0.36710095405578613,
0.2160699963569641,
0.32284075021743774,
-0.18221019208431244,
-0.20746314525604248,
0.13856923580169678,
0.5834920406341553,
0.2318260669708252,
0.013657256960868835,
-0.008939945138990879,
0.4135984182357788,
-0.24463817477226257,
0.22423872351646423,
0.17254453897476196,
0.9377955198287964,
-0.16507020592689514,
0.2108382135629654,
0.5665386319160461,
-0.2723202705383301,
0.1996874064207077,
0.1886368691921234,
0.03959786519408226,
-0.45790672302246094,
-0.06346439570188522,
0.09854656457901001,
-0.11666402220726013,
0.082853764295578,
0.014697459526360035,
0.04519137740135193,
0.10905759036540985,
-0.31836390495300293,
0.4060683250427246,
0.05332563817501068,
0.23933632671833038,
-0.07346481829881668,
-0.21219736337661743,
-0.3807991147041321,
-0.031983986496925354,
-0.12887339293956757,
-0.10769511014223099,
0.01231406256556511,
-0.1826002150774002,
-0.018371805548667908,
-0.25399571657180786,
-0.12476039677858353,
0.3193656802177429,
-0.26416024565696716,
0.08476407080888748,
0.052289366722106934,
-0.4152507185935974,
0.14123618602752686,
0.15897105634212494,
-0.21014940738677979,
-0.21267621219158173,
-0.09899556636810303,
-0.025041669607162476,
0.22496044635772705,
0.11330704391002655,
0.21585899591445923,
-0.04115910083055496,
0.28295785188674927,
-0.07864437997341156,
0.029086410999298096,
0.2765578627586365,
-0.09365473687648773,
-0.09817129373550415,
0.10659219324588776,
0.18263809382915497,
0.4168858230113983,
-0.14366690814495087,
-0.1832347810268402,
-0.14230811595916748,
0.07930241525173187,
-0.16993609070777893,
-0.013499293476343155,
-0.17892663180828094,
-0.0795440748333931,
0.029252927750349045,
0.10932968556880951,
-0.4153364300727844,
0.0435468927025795,
0.3104068338871002,
0.26022884249687195,
0.02336879074573517,
0.6574612855911255,
0.1011461541056633,
-0.1274321973323822,
-0.0027328431606292725,
0.043795160949230194,
0.4172667860984802,
-0.5469599962234497,
0.013855047523975372,
-0.11043375730514526,
0.03677062690258026,
-0.024795569479465485,
-0.04512740671634674,
0.16467256844043732,
-0.07169226557016373,
-0.25648194551467896,
-0.15067988634109497,
-0.44850218296051025,
0.20868071913719177,
-0.09615588188171387,
0.019732553511857986,
-0.2248377650976181,
0.011388421058654785,
-0.085748091340065,
0.12806576490402222,
-0.15794245898723602,
0.41796427965164185,
0.007664486765861511,
0.2007383555173874,
-0.17626440525054932,
-0.0410008430480957,
0.0777272880077362,
0.12619759142398834,
0.003964174538850784,
0.10371854901313782,
-0.03160195052623749,
-0.032059431076049805,
-0.13564956188201904,
0.13790513575077057,
0.24949640035629272,
-0.058961253613233566,
0.0010304450988769531,
-0.21521387994289398,
-0.04556751996278763,
0.09724458307027817,
0.3059769868850708,
0.028214186429977417,
-0.12514019012451172,
-0.3924717605113983,
0.6406344175338745,
0.028523892164230347,
-0.19758617877960205,
0.2864784300327301,
-0.18720051646232605,
0.289547324180603,
0.0917229950428009,
0.2597770392894745,
0.16811463236808777,
-0.011829443275928497,
-0.10842917859554291,
0.07066512852907181,
0.25520309805870056,
-0.01300356350839138,
0.11520706117153168,
-0.5115820169448853,
-0.044873591512441635,
-0.1531463861465454,
0.28612008690834045,
0.34986385703086853,
-0.28732776641845703,
-0.31640154123306274,
0.3721511662006378,
0.10377749800682068,
-0.17924967408180237,
-0.038160692900419235,
0.3873246908187866,
-0.17553922533988953,
-0.016284964978694916,
0.3582703471183777,
0.08701205253601074,
0.0912797749042511,
-0.4745889902114868,
0.22484688460826874,
-0.19880099594593048,
0.2047765851020813,
-0.09780913591384888,
0.5577723979949951,
-0.42872533202171326,
-0.06432685256004333,
0.527766227722168,
-0.028468556702136993,
0.24214275181293488,
0.23489627242088318,
-0.01083725318312645,
0.9540224075317383,
0.10424578189849854,
-0.019396429881453514,
0.19414818286895752,
-0.6462528109550476,
-0.18381737172603607,
0.28100454807281494,
0.08463999629020691,
0.06836876273155212,
-0.030822616070508957,
0.6247882843017578,
0.5054935812950134,
-0.29815900325775146,
-0.20873317122459412,
0.11152100563049316,
-0.35007697343826294,
-0.2414996325969696,
-0.0002682209014892578,
-0.32071393728256226,
-0.2228795289993286,
0.30384957790374756,
-0.25577956438064575,
-0.21012870967388153,
0.29467862844467163,
0.13642463088035583,
-0.18853265047073364,
-0.11754324287176132,
-0.012352032586932182,
0.35055989027023315,
0.12605030834674835,
-0.21098466217517853,
0.4667269289493561,
0.03488748148083687,
-0.008752629160881042,
-0.0008418653160333633,
-0.05305611714720726,
0.3887566030025482,
0.5587513446807861,
-0.25538015365600586,
-0.3039206862449646,
0.3673570454120636,
0.10891787707805634,
0.06696153432130814,
0.1895175278186798,
0.035410620272159576,
0.19887565076351166,
0.45779678225517273,
-0.0015284717082977295,
-0.13382965326309204,
0.02674785628914833,
0.07029777020215988,
0.11988351494073868,
0.0907236784696579,
0.13092133402824402,
-0.025602687150239944,
-0.2670104205608368,
-0.16739441454410553,
0.07153134047985077,
-0.08386416733264923,
-0.36983522772789,
0.33789288997650146,
0.010778550058603287,
0.13048896193504333,
-0.13841569423675537,
0.025288201868534088,
-0.13139232993125916,
0.5006673336029053,
0.44702959060668945,
-0.1341085135936737,
-0.11530622839927673,
-0.05443544685840607,
-0.5407018661499023,
0.5433887243270874,
-0.3874911963939667,
0.041204825043678284,
0.0914793387055397,
0.323763906955719,
-0.0644955188035965,
0.04292565584182739,
0.11541347950696945,
0.3992866277694702,
0.11660704016685486,
-0.05029482766985893,
-0.35721540451049805,
-0.014218704774975777,
0.2831236720085144,
-0.09338326752185822,
-0.14389577507972717,
-0.4796702563762665,
0.2346724569797516,
-0.10061018168926239,
-0.034008484333753586,
0.07000524550676346,
0.10943871736526489,
-0.15247729420661926,
-0.2076038271188736,
0.5004398822784424,
-0.11808068305253983,
0.364885151386261,
0.1840827614068985,
-0.14290916919708252,
-0.24913744628429413,
-0.26092007756233215,
-0.1742405891418457,
0.17882263660430908,
-0.0768154039978981,
0.3622146546840668,
0.040559910237789154,
0.23748016357421875,
-0.11797160655260086,
-0.17792339622974396,
-0.06395480036735535,
0.06468166410923004,
-0.07224631309509277,
0.24296365678310394,
-0.026193782687187195,
0.2886037230491638,
-0.028887491673231125,
-0.1097373366355896,
0.21014800667762756,
0.0283593088388443,
-0.21019145846366882,
-0.5273830890655518,
0.5341638326644897,
-0.2805638015270233,
-0.11210817843675613,
0.02702568843960762,
0.16643229126930237,
0.16392359137535095,
-0.04843372479081154,
-0.5384548902511597,
-0.022395916283130646,
0.21042267978191376,
-0.020939206704497337,
-0.10820503532886505,
0.11949830502271652,
-0.26638635993003845,
0.07350380718708038,
-0.16153913736343384,
0.08611112833023071,
-0.07548746466636658,
-0.0847281888127327,
-0.14078964293003082,
-0.29982349276542664
] |
https://github.com/huggingface/datasets/issues/6595 | @lhoestq thank you very much.
That would be amazing, I need to create a feature request for this :)
By the way, in short, how does hf_transfer improves the upload speed under the hood? | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 | ### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih | 34 | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
@lhoestq thank you very much.
That would be amazing, I need to create a feature request for this :)
By the way, in short, how does hf_transfer improves the upload speed under the hood? | [
-0.28692787885665894,
-0.0044410377740859985,
0.16262230277061462,
0.20641998946666718,
0.36014455556869507,
-0.21503600478172302,
0.30898481607437134,
0.37914708256721497,
-0.34722834825515747,
0.15772300958633423,
0.015633590519428253,
0.6490374207496643,
-0.33155137300491333,
0.27174314856529236,
0.03232838585972786,
0.07780680060386658,
0.044387124478816986,
0.10664567351341248,
0.00963687151670456,
0.0048987120389938354,
-0.15758396685123444,
-0.19536621868610382,
-0.14263565838336945,
-0.008043792098760605,
-0.2817932367324829,
0.00037721171975135803,
0.07331936061382294,
0.35752421617507935,
-0.2141372263431549,
-0.3937336802482605,
0.08243649452924728,
-0.12624694406986237,
0.21178603172302246,
0.28647738695144653,
-0.00012834150402341038,
0.06488712131977081,
0.40767624974250793,
0.03624340891838074,
-0.17105402052402496,
0.0033700168132781982,
0.2343895137310028,
-0.5461286306381226,
0.24369822442531586,
-0.35758259892463684,
0.05803541839122772,
-0.4624326229095459,
-0.13803523778915405,
0.33080971240997314,
0.17463010549545288,
0.25066423416137695,
0.12405610084533691,
0.0697508156299591,
0.16663311421871185,
0.3094941973686218,
0.6788209080696106,
0.3536756932735443,
-0.16680309176445007,
0.15855228900909424,
0.3307241201400757,
0.04394958168268204,
-0.43183979392051697,
0.15646421909332275,
0.09077764302492142,
-0.09082549810409546,
0.05356065183877945,
-0.04597010463476181,
-0.00040668994188308716,
-0.09710194170475006,
0.280001699924469,
0.14481139183044434,
0.23019567131996155,
-0.2740357518196106,
-0.22610828280448914,
-0.44828444719314575,
0.08256423473358154,
-0.42230916023254395,
0.30815255641937256,
0.30906522274017334,
-0.05385312810540199,
-0.13982877135276794,
-0.14953960478305817,
-0.31468409299850464,
-0.3078705966472626,
0.06161489337682724,
-0.18401801586151123,
0.4608347713947296,
-0.0480378195643425,
0.21515226364135742,
0.22612346708774567,
-0.2553112804889679,
0.20504365861415863,
0.02997533604502678,
-0.10449019074440002,
-0.06120007485151291,
-0.3290233612060547,
0.041264601051807404,
-0.078033447265625,
-0.03780768811702728,
0.1668643206357956,
0.12543977797031403,
-0.08024343103170395,
0.03766786307096481,
0.18836542963981628,
0.008389811962842941,
0.275597482919693,
0.19091089069843292,
-0.32839420437812805,
0.17092935740947723,
0.024846717715263367,
0.17379999160766602,
0.1079457551240921,
0.22107496857643127,
-0.27618104219436646,
-0.17445756494998932,
0.19315402209758759,
-0.14756394922733307,
0.40419018268585205,
-0.18426558375358582,
-0.22625389695167542,
0.08654677122831345,
-0.2322331964969635,
0.155229389667511,
0.08980399370193481,
0.2970046401023865,
-0.10243669152259827,
0.34675347805023193,
-0.15615585446357727,
0.2291359007358551,
-0.054334770888090134,
-0.007317960262298584,
-0.08237145841121674,
0.12905538082122803,
-0.1065257117152214,
-0.10816631466150284,
0.01833231747150421,
-0.30802851915359497,
0.028467662632465363,
0.04258029907941818,
0.0660407617688179,
-0.15129998326301575,
-0.13408830761909485,
-0.17006731033325195,
0.05530896782875061,
0.2526071071624756,
-0.18148986995220184,
0.13070470094680786,
-0.09777101129293442,
-0.1417735517024994,
-0.12302564829587936,
0.5319883823394775,
-0.49179941415786743,
-0.39513012766838074,
-0.43652814626693726,
0.08617695420980453,
-0.31598836183547974,
-0.06973753869533539,
-0.5748798251152039,
0.053794801235198975,
0.10401085019111633,
0.04331004619598389,
0.14214898645877838,
-0.3146522343158722,
-0.14436964690685272,
-0.3037573993206024,
0.2021169811487198,
0.0013077184557914734,
-0.5543399453163147,
0.0861220508813858,
0.09240235388278961,
-0.0743994414806366,
0.4539240002632141,
0.12665218114852905,
-0.296231210231781,
-0.09934785962104797,
-0.25425341725349426,
0.21887391805648804,
0.3095845878124237,
-0.3343796730041504,
-0.6185442805290222,
0.25418150424957275,
-0.31391483545303345,
0.14846298098564148,
0.12044719606637955,
-0.08597426116466522,
0.3489328622817993,
0.10245229303836823,
-0.12779581546783447,
0.3595367670059204,
-0.00784748699516058,
0.1956247091293335,
-0.44611167907714844,
-0.2642143666744232,
0.23005789518356323,
0.4100196957588196,
0.2968016266822815,
-0.1755615472793579,
0.23321053385734558,
0.10344618558883667,
0.27910134196281433,
-0.15002211928367615,
0.28916746377944946,
0.04790230095386505,
0.15392422676086426,
-0.08834744989871979,
-0.002467028796672821,
0.08344808220863342,
-0.594890832901001,
0.2965248227119446,
0.0477508008480072,
-0.08078782260417938,
-0.3421595096588135,
0.06908641755580902,
-0.18677596747875214,
0.30863484740257263,
-0.34628695249557495,
0.11969265341758728,
-0.022761544212698936,
-0.01871144026517868,
-0.028580300509929657,
0.1380607932806015,
-0.06199570745229721,
-0.15921145677566528,
-0.3845697045326233,
0.15430906414985657,
-0.0006786398589611053,
0.4430534243583679,
0.2269676774740219,
-0.41227516531944275,
-0.04970059171319008,
0.2720855474472046,
-0.017679810523986816,
-0.11930510401725769,
-0.2252207100391388,
0.3112631142139435,
-0.10421660542488098,
0.2572666108608246,
-0.38973844051361084,
-0.051454655826091766,
0.2198101431131363,
-0.3343258798122406,
0.04028276354074478,
0.07242009043693542,
0.18527854979038239,
-0.14531996846199036,
0.1698031723499298,
0.4245418608188629,
0.24095474183559418,
0.2904515266418457,
-0.010134086012840271,
-0.05459826439619064,
0.012592986226081848,
0.039926834404468536,
0.008881688117980957,
-0.16239458322525024,
0.008838442154228687,
0.13472050428390503,
0.26566922664642334,
0.053050898015499115,
-0.1601804494857788,
-0.04060773551464081,
0.3669394552707672,
-0.13288086652755737,
0.09428849071264267,
0.34957823157310486,
-0.3089854121208191,
-0.0002693459391593933,
0.24877378344535828,
0.10846177488565445,
0.07167858630418777,
0.10897835344076157,
0.01181017979979515,
0.11622335016727448,
0.02885151281952858,
0.050982505083084106,
0.041280657052993774,
0.22892649471759796,
0.604545533657074,
0.27275604009628296,
0.5209612250328064,
-0.15604262053966522,
-0.35989174246788025,
-0.028957948088645935,
0.07208938151597977,
0.37964364886283875,
-0.30939024686813354,
-0.023045670241117477,
-0.18052861094474792,
0.1293940544128418,
-0.20778098702430725,
-0.26482704281806946,
-0.1782638132572174,
-0.23459982872009277,
-0.006258354056626558,
0.3661822974681854,
-0.10901319235563278,
0.022802572697401047,
-0.504794716835022,
-0.027133986353874207,
0.018496006727218628,
-0.27501824498176575,
0.05059099197387695,
-0.17071092128753662,
-0.36962389945983887,
-0.02110457606613636,
0.4587472975254059,
-0.12515506148338318,
0.1882333904504776,
0.10954666882753372,
0.36828452348709106,
-0.4664030075073242,
-0.4941613972187042,
0.05754927918314934,
-0.1431126892566681,
-0.10074504464864731,
-0.09491655975580215,
-0.23862922191619873,
0.05986213684082031,
-0.2815753221511841,
0.24395814538002014,
-0.13518336415290833,
-0.314698189496994,
0.37958937883377075,
-0.25443974137306213,
0.13119395077228546,
-0.051734134554862976,
-0.06292867660522461,
-0.10624285787343979,
-0.2702234983444214,
0.1995532363653183,
0.25065261125564575,
0.24147990345954895,
-0.04999775066971779,
0.10889159142971039,
0.34600579738616943,
0.03145759552717209,
-0.18200407922267914,
0.03269542381167412,
-0.05292186141014099,
0.4130009412765503,
0.10543136298656464,
-0.35748153924942017,
0.18042714893817902,
-0.19938120245933533,
-0.08630204945802689,
0.3706178665161133,
-0.6093620657920837,
-0.07186820358037949,
-0.10554596036672592,
0.0535542368888855,
-0.21204666793346405,
-0.21262113749980927,
0.18315356969833374,
0.09810569882392883,
0.11497870832681656,
0.09448108077049255,
-0.13937070965766907,
0.1843811571598053,
0.18531151115894318,
0.1253596693277359,
-0.14149513840675354,
0.5173704028129578,
0.18273186683654785,
0.7609702944755554,
-0.2514157295227051,
-0.15328505635261536,
0.4215608835220337,
-0.004206467419862747,
0.03788496181368828,
-0.0025092773139476776,
-0.21491405367851257,
0.21247780323028564,
-0.11012335121631622,
0.11766456067562103,
0.2312818020582199,
-0.00467262789607048,
-0.3780919313430786,
0.05106711387634277,
0.00816192477941513,
-0.13097117841243744,
-0.15248221158981323,
0.16578003764152527,
-0.3027144968509674,
-0.173457533121109,
-0.23631538450717926,
-0.014544129371643066,
-0.03919021412730217,
-0.2933063209056854,
0.20753119885921478,
-0.03539060801267624,
-0.13088950514793396,
-0.003271784633398056,
-0.5666692852973938,
-0.12902413308620453,
-0.2909240424633026,
0.1284714639186859,
0.22086048126220703,
0.2876637279987335,
0.1764615774154663,
-0.4290253520011902,
0.34269237518310547,
-0.3482767641544342,
0.5372195243835449,
0.03365065157413483,
0.06724715232849121,
-0.026255004107952118,
-0.049901604652404785,
-0.6352043747901917,
-0.3425317406654358,
-0.23720985651016235,
0.09782671928405762,
-0.011633837595582008,
0.4497288465499878,
-0.37375980615615845,
-0.0046253502368927,
0.18555936217308044,
0.01582036167383194,
-0.2207271158695221,
-0.11730600893497467,
-0.3683891296386719,
-0.3900814652442932,
-0.16116251051425934,
0.21008646488189697,
-0.08549202978610992,
0.29503268003463745,
-0.16788676381111145,
0.016835637390613556,
-0.3898255228996277,
-0.12822921574115753,
-0.05260232090950012,
-0.025086771696805954,
0.33373787999153137,
0.002650834619998932,
0.1876506209373474,
-0.23384447395801544,
0.6536868214607239,
0.5415233969688416,
0.5010397434234619,
0.24643200635910034,
-0.3950539529323578,
0.1993260532617569,
0.0015073977410793304,
0.2977420687675476,
0.23868107795715332,
-0.1627882868051529,
0.3150475025177002,
-0.18478578329086304,
0.22801437973976135,
-0.36710095405578613,
0.2160699963569641,
0.32284075021743774,
-0.18221019208431244,
-0.20746314525604248,
0.13856923580169678,
0.5834920406341553,
0.2318260669708252,
0.013657256960868835,
-0.008939945138990879,
0.4135984182357788,
-0.24463817477226257,
0.22423872351646423,
0.17254453897476196,
0.9377955198287964,
-0.16507020592689514,
0.2108382135629654,
0.5665386319160461,
-0.2723202705383301,
0.1996874064207077,
0.1886368691921234,
0.03959786519408226,
-0.45790672302246094,
-0.06346439570188522,
0.09854656457901001,
-0.11666402220726013,
0.082853764295578,
0.014697459526360035,
0.04519137740135193,
0.10905759036540985,
-0.31836390495300293,
0.4060683250427246,
0.05332563817501068,
0.23933632671833038,
-0.07346481829881668,
-0.21219736337661743,
-0.3807991147041321,
-0.031983986496925354,
-0.12887339293956757,
-0.10769511014223099,
0.01231406256556511,
-0.1826002150774002,
-0.018371805548667908,
-0.25399571657180786,
-0.12476039677858353,
0.3193656802177429,
-0.26416024565696716,
0.08476407080888748,
0.052289366722106934,
-0.4152507185935974,
0.14123618602752686,
0.15897105634212494,
-0.21014940738677979,
-0.21267621219158173,
-0.09899556636810303,
-0.025041669607162476,
0.22496044635772705,
0.11330704391002655,
0.21585899591445923,
-0.04115910083055496,
0.28295785188674927,
-0.07864437997341156,
0.029086410999298096,
0.2765578627586365,
-0.09365473687648773,
-0.09817129373550415,
0.10659219324588776,
0.18263809382915497,
0.4168858230113983,
-0.14366690814495087,
-0.1832347810268402,
-0.14230811595916748,
0.07930241525173187,
-0.16993609070777893,
-0.013499293476343155,
-0.17892663180828094,
-0.0795440748333931,
0.029252927750349045,
0.10932968556880951,
-0.4153364300727844,
0.0435468927025795,
0.3104068338871002,
0.26022884249687195,
0.02336879074573517,
0.6574612855911255,
0.1011461541056633,
-0.1274321973323822,
-0.0027328431606292725,
0.043795160949230194,
0.4172667860984802,
-0.5469599962234497,
0.013855047523975372,
-0.11043375730514526,
0.03677062690258026,
-0.024795569479465485,
-0.04512740671634674,
0.16467256844043732,
-0.07169226557016373,
-0.25648194551467896,
-0.15067988634109497,
-0.44850218296051025,
0.20868071913719177,
-0.09615588188171387,
0.019732553511857986,
-0.2248377650976181,
0.011388421058654785,
-0.085748091340065,
0.12806576490402222,
-0.15794245898723602,
0.41796427965164185,
0.007664486765861511,
0.2007383555173874,
-0.17626440525054932,
-0.0410008430480957,
0.0777272880077362,
0.12619759142398834,
0.003964174538850784,
0.10371854901313782,
-0.03160195052623749,
-0.032059431076049805,
-0.13564956188201904,
0.13790513575077057,
0.24949640035629272,
-0.058961253613233566,
0.0010304450988769531,
-0.21521387994289398,
-0.04556751996278763,
0.09724458307027817,
0.3059769868850708,
0.028214186429977417,
-0.12514019012451172,
-0.3924717605113983,
0.6406344175338745,
0.028523892164230347,
-0.19758617877960205,
0.2864784300327301,
-0.18720051646232605,
0.289547324180603,
0.0917229950428009,
0.2597770392894745,
0.16811463236808777,
-0.011829443275928497,
-0.10842917859554291,
0.07066512852907181,
0.25520309805870056,
-0.01300356350839138,
0.11520706117153168,
-0.5115820169448853,
-0.044873591512441635,
-0.1531463861465454,
0.28612008690834045,
0.34986385703086853,
-0.28732776641845703,
-0.31640154123306274,
0.3721511662006378,
0.10377749800682068,
-0.17924967408180237,
-0.038160692900419235,
0.3873246908187866,
-0.17553922533988953,
-0.016284964978694916,
0.3582703471183777,
0.08701205253601074,
0.0912797749042511,
-0.4745889902114868,
0.22484688460826874,
-0.19880099594593048,
0.2047765851020813,
-0.09780913591384888,
0.5577723979949951,
-0.42872533202171326,
-0.06432685256004333,
0.527766227722168,
-0.028468556702136993,
0.24214275181293488,
0.23489627242088318,
-0.01083725318312645,
0.9540224075317383,
0.10424578189849854,
-0.019396429881453514,
0.19414818286895752,
-0.6462528109550476,
-0.18381737172603607,
0.28100454807281494,
0.08463999629020691,
0.06836876273155212,
-0.030822616070508957,
0.6247882843017578,
0.5054935812950134,
-0.29815900325775146,
-0.20873317122459412,
0.11152100563049316,
-0.35007697343826294,
-0.2414996325969696,
-0.0002682209014892578,
-0.32071393728256226,
-0.2228795289993286,
0.30384957790374756,
-0.25577956438064575,
-0.21012870967388153,
0.29467862844467163,
0.13642463088035583,
-0.18853265047073364,
-0.11754324287176132,
-0.012352032586932182,
0.35055989027023315,
0.12605030834674835,
-0.21098466217517853,
0.4667269289493561,
0.03488748148083687,
-0.008752629160881042,
-0.0008418653160333633,
-0.05305611714720726,
0.3887566030025482,
0.5587513446807861,
-0.25538015365600586,
-0.3039206862449646,
0.3673570454120636,
0.10891787707805634,
0.06696153432130814,
0.1895175278186798,
0.035410620272159576,
0.19887565076351166,
0.45779678225517273,
-0.0015284717082977295,
-0.13382965326309204,
0.02674785628914833,
0.07029777020215988,
0.11988351494073868,
0.0907236784696579,
0.13092133402824402,
-0.025602687150239944,
-0.2670104205608368,
-0.16739441454410553,
0.07153134047985077,
-0.08386416733264923,
-0.36983522772789,
0.33789288997650146,
0.010778550058603287,
0.13048896193504333,
-0.13841569423675537,
0.025288201868534088,
-0.13139232993125916,
0.5006673336029053,
0.44702959060668945,
-0.1341085135936737,
-0.11530622839927673,
-0.05443544685840607,
-0.5407018661499023,
0.5433887243270874,
-0.3874911963939667,
0.041204825043678284,
0.0914793387055397,
0.323763906955719,
-0.0644955188035965,
0.04292565584182739,
0.11541347950696945,
0.3992866277694702,
0.11660704016685486,
-0.05029482766985893,
-0.35721540451049805,
-0.014218704774975777,
0.2831236720085144,
-0.09338326752185822,
-0.14389577507972717,
-0.4796702563762665,
0.2346724569797516,
-0.10061018168926239,
-0.034008484333753586,
0.07000524550676346,
0.10943871736526489,
-0.15247729420661926,
-0.2076038271188736,
0.5004398822784424,
-0.11808068305253983,
0.364885151386261,
0.1840827614068985,
-0.14290916919708252,
-0.24913744628429413,
-0.26092007756233215,
-0.1742405891418457,
0.17882263660430908,
-0.0768154039978981,
0.3622146546840668,
0.040559910237789154,
0.23748016357421875,
-0.11797160655260086,
-0.17792339622974396,
-0.06395480036735535,
0.06468166410923004,
-0.07224631309509277,
0.24296365678310394,
-0.026193782687187195,
0.2886037230491638,
-0.028887491673231125,
-0.1097373366355896,
0.21014800667762756,
0.0283593088388443,
-0.21019145846366882,
-0.5273830890655518,
0.5341638326644897,
-0.2805638015270233,
-0.11210817843675613,
0.02702568843960762,
0.16643229126930237,
0.16392359137535095,
-0.04843372479081154,
-0.5384548902511597,
-0.022395916283130646,
0.21042267978191376,
-0.020939206704497337,
-0.10820503532886505,
0.11949830502271652,
-0.26638635993003845,
0.07350380718708038,
-0.16153913736343384,
0.08611112833023071,
-0.07548746466636658,
-0.0847281888127327,
-0.14078964293003082,
-0.29982349276542664
] |
https://github.com/huggingface/datasets/issues/6595 | @lhoestq i was just able to successfully upload without the dataset with the new pyarrow update and without increasing the precision :) | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2 | ### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih | 22 | Loading big dataset raises pyarrow.lib.ArrowNotImplementedError 2
### Describe the bug
I'm aware of the issue #5695 .
I'm using a modified SDXL trainer: https://github.com/kopyl/diffusers/blob/5e70f604155aeecee254a5c63c5e4236ad4a0d3d/examples/text_to_image/train_text_to_image_sdxl.py#L1027C16-L1027C16
So i
1. Map dataset
2. Save to disk
3. Try to upload:
```
import datasets
from datasets import load_from_disk
dataset = load_from_disk("ds")
datasets.config.DEFAULT_MAX_BATCH_SIZE = 1
dataset.push_to_hub("kopyl/ds", private=True, max_shard_size="500MB")
```
And i get this error:
`pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat`
Full traceback:
```
>>> dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, max_shard_size="500MB")
Map: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1451/1451 [00:00<00:00, 6827.40 examples/s]
Uploading the dataset shards: 0%| | 0/2099 [00:00<?, ?it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py", line 1705, in push_to_hub
split_additions, uploaded_size, dataset_nbytes = self[split]._push_parquet_shards_to_hub(
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 5208, in _push_parquet_shards_to_hub
shard.to_parquet(buffer)
File "/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py", line 4931, in to_parquet
return ParquetDatasetWriter(self, path_or_buf, batch_size=batch_size, **parquet_writer_kwargs).write()
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 129, in write
written = self._write(file_obj=self.path_or_buf, batch_size=batch_size, **self.parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/datasets/io/parquet.py", line 141, in _write
writer = pq.ParquetWriter(file_obj, schema=schema, **parquet_writer_kwargs)
File "/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1869, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: halffloat
```
Smaller datasets with the same way of saving and pushing work wonders. Big ones are not.
I'm currently trying to upload dataset like this:
`HfApi().upload_folder...`
But i'm not sure that in this case "load_dataset" would work well.
This setting num_shards does not help too:
```
dataset.push_to_hub("kopyl/3M_icons_monochrome_only_no_captioning_mapped-for-SDXL-2", private=True, num_shards={'train': 500})
```
Tried 3000, 500, 478, 100
Also do you know if it's possible to push a dataset with multiple processes? It would take an eternity pushing 1TB...
### Steps to reproduce the bug
Described above
### Expected behavior
Should be able to upload...
### Environment info
Total dataset size: 978G
Amount of `.arrow` files: 2101
Each `.arrow` file size: 477M (i know 477 megabytes * 2101 does not equal 978G, but i just checked the size of a couple `.arrow` files, i don't know if some might have different size)
Some files:
- "ds/train/state.json": https://pastebin.com/tJ3ZLGAg
- "ds/train/dataset_info.json": https://pastebin.com/JdXMQ5ih
@lhoestq i was just able to successfully upload without the dataset with the new pyarrow update and without increasing the precision :) | [
-0.28692787885665894,
-0.0044410377740859985,
0.16262230277061462,
0.20641998946666718,
0.36014455556869507,
-0.21503600478172302,
0.30898481607437134,
0.37914708256721497,
-0.34722834825515747,
0.15772300958633423,
0.015633590519428253,
0.6490374207496643,
-0.33155137300491333,
0.27174314856529236,
0.03232838585972786,
0.07780680060386658,
0.044387124478816986,
0.10664567351341248,
0.00963687151670456,
0.0048987120389938354,
-0.15758396685123444,
-0.19536621868610382,
-0.14263565838336945,
-0.008043792098760605,
-0.2817932367324829,
0.00037721171975135803,
0.07331936061382294,
0.35752421617507935,
-0.2141372263431549,
-0.3937336802482605,
0.08243649452924728,
-0.12624694406986237,
0.21178603172302246,
0.28647738695144653,
-0.00012834150402341038,
0.06488712131977081,
0.40767624974250793,
0.03624340891838074,
-0.17105402052402496,
0.0033700168132781982,
0.2343895137310028,
-0.5461286306381226,
0.24369822442531586,
-0.35758259892463684,
0.05803541839122772,
-0.4624326229095459,
-0.13803523778915405,
0.33080971240997314,
0.17463010549545288,
0.25066423416137695,
0.12405610084533691,
0.0697508156299591,
0.16663311421871185,
0.3094941973686218,
0.6788209080696106,
0.3536756932735443,
-0.16680309176445007,
0.15855228900909424,
0.3307241201400757,
0.04394958168268204,
-0.43183979392051697,
0.15646421909332275,
0.09077764302492142,
-0.09082549810409546,
0.05356065183877945,
-0.04597010463476181,
-0.00040668994188308716,
-0.09710194170475006,
0.280001699924469,
0.14481139183044434,
0.23019567131996155,
-0.2740357518196106,
-0.22610828280448914,
-0.44828444719314575,
0.08256423473358154,
-0.42230916023254395,
0.30815255641937256,
0.30906522274017334,
-0.05385312810540199,
-0.13982877135276794,
-0.14953960478305817,
-0.31468409299850464,
-0.3078705966472626,
0.06161489337682724,
-0.18401801586151123,
0.4608347713947296,
-0.0480378195643425,
0.21515226364135742,
0.22612346708774567,
-0.2553112804889679,
0.20504365861415863,
0.02997533604502678,
-0.10449019074440002,
-0.06120007485151291,
-0.3290233612060547,
0.041264601051807404,
-0.078033447265625,
-0.03780768811702728,
0.1668643206357956,
0.12543977797031403,
-0.08024343103170395,
0.03766786307096481,
0.18836542963981628,
0.008389811962842941,
0.275597482919693,
0.19091089069843292,
-0.32839420437812805,
0.17092935740947723,
0.024846717715263367,
0.17379999160766602,
0.1079457551240921,
0.22107496857643127,
-0.27618104219436646,
-0.17445756494998932,
0.19315402209758759,
-0.14756394922733307,
0.40419018268585205,
-0.18426558375358582,
-0.22625389695167542,
0.08654677122831345,
-0.2322331964969635,
0.155229389667511,
0.08980399370193481,
0.2970046401023865,
-0.10243669152259827,
0.34675347805023193,
-0.15615585446357727,
0.2291359007358551,
-0.054334770888090134,
-0.007317960262298584,
-0.08237145841121674,
0.12905538082122803,
-0.1065257117152214,
-0.10816631466150284,
0.01833231747150421,
-0.30802851915359497,
0.028467662632465363,
0.04258029907941818,
0.0660407617688179,
-0.15129998326301575,
-0.13408830761909485,
-0.17006731033325195,
0.05530896782875061,
0.2526071071624756,
-0.18148986995220184,
0.13070470094680786,
-0.09777101129293442,
-0.1417735517024994,
-0.12302564829587936,
0.5319883823394775,
-0.49179941415786743,
-0.39513012766838074,
-0.43652814626693726,
0.08617695420980453,
-0.31598836183547974,
-0.06973753869533539,
-0.5748798251152039,
0.053794801235198975,
0.10401085019111633,
0.04331004619598389,
0.14214898645877838,
-0.3146522343158722,
-0.14436964690685272,
-0.3037573993206024,
0.2021169811487198,
0.0013077184557914734,
-0.5543399453163147,
0.0861220508813858,
0.09240235388278961,
-0.0743994414806366,
0.4539240002632141,
0.12665218114852905,
-0.296231210231781,
-0.09934785962104797,
-0.25425341725349426,
0.21887391805648804,
0.3095845878124237,
-0.3343796730041504,
-0.6185442805290222,
0.25418150424957275,
-0.31391483545303345,
0.14846298098564148,
0.12044719606637955,
-0.08597426116466522,
0.3489328622817993,
0.10245229303836823,
-0.12779581546783447,
0.3595367670059204,
-0.00784748699516058,
0.1956247091293335,
-0.44611167907714844,
-0.2642143666744232,
0.23005789518356323,
0.4100196957588196,
0.2968016266822815,
-0.1755615472793579,
0.23321053385734558,
0.10344618558883667,
0.27910134196281433,
-0.15002211928367615,
0.28916746377944946,
0.04790230095386505,
0.15392422676086426,
-0.08834744989871979,
-0.002467028796672821,
0.08344808220863342,
-0.594890832901001,
0.2965248227119446,
0.0477508008480072,
-0.08078782260417938,
-0.3421595096588135,
0.06908641755580902,
-0.18677596747875214,
0.30863484740257263,
-0.34628695249557495,
0.11969265341758728,
-0.022761544212698936,
-0.01871144026517868,
-0.028580300509929657,
0.1380607932806015,
-0.06199570745229721,
-0.15921145677566528,
-0.3845697045326233,
0.15430906414985657,
-0.0006786398589611053,
0.4430534243583679,
0.2269676774740219,
-0.41227516531944275,
-0.04970059171319008,
0.2720855474472046,
-0.017679810523986816,
-0.11930510401725769,
-0.2252207100391388,
0.3112631142139435,
-0.10421660542488098,
0.2572666108608246,
-0.38973844051361084,
-0.051454655826091766,
0.2198101431131363,
-0.3343258798122406,
0.04028276354074478,
0.07242009043693542,
0.18527854979038239,
-0.14531996846199036,
0.1698031723499298,
0.4245418608188629,
0.24095474183559418,
0.2904515266418457,
-0.010134086012840271,
-0.05459826439619064,
0.012592986226081848,
0.039926834404468536,
0.008881688117980957,
-0.16239458322525024,
0.008838442154228687,
0.13472050428390503,
0.26566922664642334,
0.053050898015499115,
-0.1601804494857788,
-0.04060773551464081,
0.3669394552707672,
-0.13288086652755737,
0.09428849071264267,
0.34957823157310486,
-0.3089854121208191,
-0.0002693459391593933,
0.24877378344535828,
0.10846177488565445,
0.07167858630418777,
0.10897835344076157,
0.01181017979979515,
0.11622335016727448,
0.02885151281952858,
0.050982505083084106,
0.041280657052993774,
0.22892649471759796,
0.604545533657074,
0.27275604009628296,
0.5209612250328064,
-0.15604262053966522,
-0.35989174246788025,
-0.028957948088645935,
0.07208938151597977,
0.37964364886283875,
-0.30939024686813354,
-0.023045670241117477,
-0.18052861094474792,
0.1293940544128418,
-0.20778098702430725,
-0.26482704281806946,
-0.1782638132572174,
-0.23459982872009277,
-0.006258354056626558,
0.3661822974681854,
-0.10901319235563278,
0.022802572697401047,
-0.504794716835022,
-0.027133986353874207,
0.018496006727218628,
-0.27501824498176575,
0.05059099197387695,
-0.17071092128753662,
-0.36962389945983887,
-0.02110457606613636,
0.4587472975254059,
-0.12515506148338318,
0.1882333904504776,
0.10954666882753372,
0.36828452348709106,
-0.4664030075073242,
-0.4941613972187042,
0.05754927918314934,
-0.1431126892566681,
-0.10074504464864731,
-0.09491655975580215,
-0.23862922191619873,
0.05986213684082031,
-0.2815753221511841,
0.24395814538002014,
-0.13518336415290833,
-0.314698189496994,
0.37958937883377075,
-0.25443974137306213,
0.13119395077228546,
-0.051734134554862976,
-0.06292867660522461,
-0.10624285787343979,
-0.2702234983444214,
0.1995532363653183,
0.25065261125564575,
0.24147990345954895,
-0.04999775066971779,
0.10889159142971039,
0.34600579738616943,
0.03145759552717209,
-0.18200407922267914,
0.03269542381167412,
-0.05292186141014099,
0.4130009412765503,
0.10543136298656464,
-0.35748153924942017,
0.18042714893817902,
-0.19938120245933533,
-0.08630204945802689,
0.3706178665161133,
-0.6093620657920837,
-0.07186820358037949,
-0.10554596036672592,
0.0535542368888855,
-0.21204666793346405,
-0.21262113749980927,
0.18315356969833374,
0.09810569882392883,
0.11497870832681656,
0.09448108077049255,
-0.13937070965766907,
0.1843811571598053,
0.18531151115894318,
0.1253596693277359,
-0.14149513840675354,
0.5173704028129578,
0.18273186683654785,
0.7609702944755554,
-0.2514157295227051,
-0.15328505635261536,
0.4215608835220337,
-0.004206467419862747,
0.03788496181368828,
-0.0025092773139476776,
-0.21491405367851257,
0.21247780323028564,
-0.11012335121631622,
0.11766456067562103,
0.2312818020582199,
-0.00467262789607048,
-0.3780919313430786,
0.05106711387634277,
0.00816192477941513,
-0.13097117841243744,
-0.15248221158981323,
0.16578003764152527,
-0.3027144968509674,
-0.173457533121109,
-0.23631538450717926,
-0.014544129371643066,
-0.03919021412730217,
-0.2933063209056854,
0.20753119885921478,
-0.03539060801267624,
-0.13088950514793396,
-0.003271784633398056,
-0.5666692852973938,
-0.12902413308620453,
-0.2909240424633026,
0.1284714639186859,
0.22086048126220703,
0.2876637279987335,
0.1764615774154663,
-0.4290253520011902,
0.34269237518310547,
-0.3482767641544342,
0.5372195243835449,
0.03365065157413483,
0.06724715232849121,
-0.026255004107952118,
-0.049901604652404785,
-0.6352043747901917,
-0.3425317406654358,
-0.23720985651016235,
0.09782671928405762,
-0.011633837595582008,
0.4497288465499878,
-0.37375980615615845,
-0.0046253502368927,
0.18555936217308044,
0.01582036167383194,
-0.2207271158695221,
-0.11730600893497467,
-0.3683891296386719,
-0.3900814652442932,
-0.16116251051425934,
0.21008646488189697,
-0.08549202978610992,
0.29503268003463745,
-0.16788676381111145,
0.016835637390613556,
-0.3898255228996277,
-0.12822921574115753,
-0.05260232090950012,
-0.025086771696805954,
0.33373787999153137,
0.002650834619998932,
0.1876506209373474,
-0.23384447395801544,
0.6536868214607239,
0.5415233969688416,
0.5010397434234619,
0.24643200635910034,
-0.3950539529323578,
0.1993260532617569,
0.0015073977410793304,
0.2977420687675476,
0.23868107795715332,
-0.1627882868051529,
0.3150475025177002,
-0.18478578329086304,
0.22801437973976135,
-0.36710095405578613,
0.2160699963569641,
0.32284075021743774,
-0.18221019208431244,
-0.20746314525604248,
0.13856923580169678,
0.5834920406341553,
0.2318260669708252,
0.013657256960868835,
-0.008939945138990879,
0.4135984182357788,
-0.24463817477226257,
0.22423872351646423,
0.17254453897476196,
0.9377955198287964,
-0.16507020592689514,
0.2108382135629654,
0.5665386319160461,
-0.2723202705383301,
0.1996874064207077,
0.1886368691921234,
0.03959786519408226,
-0.45790672302246094,
-0.06346439570188522,
0.09854656457901001,
-0.11666402220726013,
0.082853764295578,
0.014697459526360035,
0.04519137740135193,
0.10905759036540985,
-0.31836390495300293,
0.4060683250427246,
0.05332563817501068,
0.23933632671833038,
-0.07346481829881668,
-0.21219736337661743,
-0.3807991147041321,
-0.031983986496925354,
-0.12887339293956757,
-0.10769511014223099,
0.01231406256556511,
-0.1826002150774002,
-0.018371805548667908,
-0.25399571657180786,
-0.12476039677858353,
0.3193656802177429,
-0.26416024565696716,
0.08476407080888748,
0.052289366722106934,
-0.4152507185935974,
0.14123618602752686,
0.15897105634212494,
-0.21014940738677979,
-0.21267621219158173,
-0.09899556636810303,
-0.025041669607162476,
0.22496044635772705,
0.11330704391002655,
0.21585899591445923,
-0.04115910083055496,
0.28295785188674927,
-0.07864437997341156,
0.029086410999298096,
0.2765578627586365,
-0.09365473687648773,
-0.09817129373550415,
0.10659219324588776,
0.18263809382915497,
0.4168858230113983,
-0.14366690814495087,
-0.1832347810268402,
-0.14230811595916748,
0.07930241525173187,
-0.16993609070777893,
-0.013499293476343155,
-0.17892663180828094,
-0.0795440748333931,
0.029252927750349045,
0.10932968556880951,
-0.4153364300727844,
0.0435468927025795,
0.3104068338871002,
0.26022884249687195,
0.02336879074573517,
0.6574612855911255,
0.1011461541056633,
-0.1274321973323822,
-0.0027328431606292725,
0.043795160949230194,
0.4172667860984802,
-0.5469599962234497,
0.013855047523975372,
-0.11043375730514526,
0.03677062690258026,
-0.024795569479465485,
-0.04512740671634674,
0.16467256844043732,
-0.07169226557016373,
-0.25648194551467896,
-0.15067988634109497,
-0.44850218296051025,
0.20868071913719177,
-0.09615588188171387,
0.019732553511857986,
-0.2248377650976181,
0.011388421058654785,
-0.085748091340065,
0.12806576490402222,
-0.15794245898723602,
0.41796427965164185,
0.007664486765861511,
0.2007383555173874,
-0.17626440525054932,
-0.0410008430480957,
0.0777272880077362,
0.12619759142398834,
0.003964174538850784,
0.10371854901313782,
-0.03160195052623749,
-0.032059431076049805,
-0.13564956188201904,
0.13790513575077057,
0.24949640035629272,
-0.058961253613233566,
0.0010304450988769531,
-0.21521387994289398,
-0.04556751996278763,
0.09724458307027817,
0.3059769868850708,
0.028214186429977417,
-0.12514019012451172,
-0.3924717605113983,
0.6406344175338745,
0.028523892164230347,
-0.19758617877960205,
0.2864784300327301,
-0.18720051646232605,
0.289547324180603,
0.0917229950428009,
0.2597770392894745,
0.16811463236808777,
-0.011829443275928497,
-0.10842917859554291,
0.07066512852907181,
0.25520309805870056,
-0.01300356350839138,
0.11520706117153168,
-0.5115820169448853,
-0.044873591512441635,
-0.1531463861465454,
0.28612008690834045,
0.34986385703086853,
-0.28732776641845703,
-0.31640154123306274,
0.3721511662006378,
0.10377749800682068,
-0.17924967408180237,
-0.038160692900419235,
0.3873246908187866,
-0.17553922533988953,
-0.016284964978694916,
0.3582703471183777,
0.08701205253601074,
0.0912797749042511,
-0.4745889902114868,
0.22484688460826874,
-0.19880099594593048,
0.2047765851020813,
-0.09780913591384888,
0.5577723979949951,
-0.42872533202171326,
-0.06432685256004333,
0.527766227722168,
-0.028468556702136993,
0.24214275181293488,
0.23489627242088318,
-0.01083725318312645,
0.9540224075317383,
0.10424578189849854,
-0.019396429881453514,
0.19414818286895752,
-0.6462528109550476,
-0.18381737172603607,
0.28100454807281494,
0.08463999629020691,
0.06836876273155212,
-0.030822616070508957,
0.6247882843017578,
0.5054935812950134,
-0.29815900325775146,
-0.20873317122459412,
0.11152100563049316,
-0.35007697343826294,
-0.2414996325969696,
-0.0002682209014892578,
-0.32071393728256226,
-0.2228795289993286,
0.30384957790374756,
-0.25577956438064575,
-0.21012870967388153,
0.29467862844467163,
0.13642463088035583,
-0.18853265047073364,
-0.11754324287176132,
-0.012352032586932182,
0.35055989027023315,
0.12605030834674835,
-0.21098466217517853,
0.4667269289493561,
0.03488748148083687,
-0.008752629160881042,
-0.0008418653160333633,
-0.05305611714720726,
0.3887566030025482,
0.5587513446807861,
-0.25538015365600586,
-0.3039206862449646,
0.3673570454120636,
0.10891787707805634,
0.06696153432130814,
0.1895175278186798,
0.035410620272159576,
0.19887565076351166,
0.45779678225517273,
-0.0015284717082977295,
-0.13382965326309204,
0.02674785628914833,
0.07029777020215988,
0.11988351494073868,
0.0907236784696579,
0.13092133402824402,
-0.025602687150239944,
-0.2670104205608368,
-0.16739441454410553,
0.07153134047985077,
-0.08386416733264923,
-0.36983522772789,
0.33789288997650146,
0.010778550058603287,
0.13048896193504333,
-0.13841569423675537,
0.025288201868534088,
-0.13139232993125916,
0.5006673336029053,
0.44702959060668945,
-0.1341085135936737,
-0.11530622839927673,
-0.05443544685840607,
-0.5407018661499023,
0.5433887243270874,
-0.3874911963939667,
0.041204825043678284,
0.0914793387055397,
0.323763906955719,
-0.0644955188035965,
0.04292565584182739,
0.11541347950696945,
0.3992866277694702,
0.11660704016685486,
-0.05029482766985893,
-0.35721540451049805,
-0.014218704774975777,
0.2831236720085144,
-0.09338326752185822,
-0.14389577507972717,
-0.4796702563762665,
0.2346724569797516,
-0.10061018168926239,
-0.034008484333753586,
0.07000524550676346,
0.10943871736526489,
-0.15247729420661926,
-0.2076038271188736,
0.5004398822784424,
-0.11808068305253983,
0.364885151386261,
0.1840827614068985,
-0.14290916919708252,
-0.24913744628429413,
-0.26092007756233215,
-0.1742405891418457,
0.17882263660430908,
-0.0768154039978981,
0.3622146546840668,
0.040559910237789154,
0.23748016357421875,
-0.11797160655260086,
-0.17792339622974396,
-0.06395480036735535,
0.06468166410923004,
-0.07224631309509277,
0.24296365678310394,
-0.026193782687187195,
0.2886037230491638,
-0.028887491673231125,
-0.1097373366355896,
0.21014800667762756,
0.0283593088388443,
-0.21019145846366882,
-0.5273830890655518,
0.5341638326644897,
-0.2805638015270233,
-0.11210817843675613,
0.02702568843960762,
0.16643229126930237,
0.16392359137535095,
-0.04843372479081154,
-0.5384548902511597,
-0.022395916283130646,
0.21042267978191376,
-0.020939206704497337,
-0.10820503532886505,
0.11949830502271652,
-0.26638635993003845,
0.07350380718708038,
-0.16153913736343384,
0.08611112833023071,
-0.07548746466636658,
-0.0847281888127327,
-0.14078964293003082,
-0.29982349276542664
] |
https://github.com/huggingface/datasets/issues/6592 | Hi! `tqdm` doesn't work well in non-interactive environments, so there isn't much we can do about this. It's best to [disable it](https://huggingface.co/docs/datasets/v2.16.1/en/package_reference/utilities#datasets.disable_progress_bars) in such environments and instead use logging to track progress. | Logs are delayed when doing .map when `docker logs` | ### Describe the bug
When I run my SD training in a Docker image and then listen to logs like `docker logs train -f`, the progress bar is delayed.
It's updating every few percent.
When you have a large dataset that has to be mapped (like 1+ million samples), it's crucial to see the updates in real-time, not every couple hours to make sure nothing got frozen or broken
### Steps to reproduce the bug
1. Run any huge dataset processing as a Docker image
2. `docker logs image_name` to it
### Expected behavior
...
### Environment info
... | 32 | Logs are delayed when doing .map when `docker logs`
### Describe the bug
When I run my SD training in a Docker image and then listen to logs like `docker logs train -f`, the progress bar is delayed.
It's updating every few percent.
When you have a large dataset that has to be mapped (like 1+ million samples), it's crucial to see the updates in real-time, not every couple hours to make sure nothing got frozen or broken
### Steps to reproduce the bug
1. Run any huge dataset processing as a Docker image
2. `docker logs image_name` to it
### Expected behavior
...
### Environment info
...
Hi! `tqdm` doesn't work well in non-interactive environments, so there isn't much we can do about this. It's best to [disable it](https://huggingface.co/docs/datasets/v2.16.1/en/package_reference/utilities#datasets.disable_progress_bars) in such environments and instead use logging to track progress. | [
-0.5378693342208862,
-0.46852540969848633,
-0.023110635578632355,
-0.14820663630962372,
0.2111946940422058,
-0.05372349172830582,
0.33600133657455444,
0.13271595537662506,
-0.030799970030784607,
0.34662723541259766,
-0.05821090191602707,
0.3205311596393585,
-0.1769188642501831,
0.22483918070793152,
0.040432486683130264,
0.16777244210243225,
0.09079477190971375,
-0.06420503556728363,
-0.5752913355827332,
0.07442426681518555,
0.10298039764165878,
0.051697783172130585,
-0.26153355836868286,
0.005649242550134659,
-0.6055144667625427,
-0.09786573052406311,
-0.06632602214813232,
-0.156321182847023,
-0.08839868009090424,
-0.3280082941055298,
0.08170191943645477,
0.1443731188774109,
0.02320646494626999,
0.8334176540374756,
-0.0001162689586635679,
0.07379406690597534,
0.325501948595047,
0.12293379753828049,
0.07312080264091492,
-0.004381731152534485,
-0.055953510105609894,
-0.5082775950431824,
0.14349491894245148,
-0.07825435698032379,
-0.14443954825401306,
-0.15273581445217133,
0.07877610623836517,
0.13237984478473663,
0.6983026266098022,
-0.1806267499923706,
0.17426332831382751,
0.34241020679473877,
-0.373404860496521,
0.022516291588544846,
0.10741642862558365,
-0.012320108711719513,
-0.24271133542060852,
0.5841785073280334,
0.4775216281414032,
-0.030080435797572136,
-0.34660667181015015,
0.5930808782577515,
0.06845471262931824,
0.13196775317192078,
0.234863743185997,
0.13964512944221497,
0.6387960910797119,
-0.39989542961120605,
0.03716876357793808,
0.39677950739860535,
0.487854540348053,
0.10672168433666229,
-0.2724163234233856,
-0.35790711641311646,
0.03152140974998474,
-0.16393935680389404,
0.20379137992858887,
-0.2560712695121765,
-0.04837527871131897,
-0.0009356031659990549,
-0.7967394590377808,
-0.031052416190505028,
0.038071244955062866,
-0.24226202070713043,
-0.17397832870483398,
-0.0499921590089798,
-0.22917485237121582,
0.10493098199367523,
-0.16878600418567657,
0.058217670768499374,
-0.3078886568546295,
0.10686801373958588,
0.10903394967317581,
0.058574266731739044,
-0.3876720070838928,
-0.15771518647670746,
-0.018412955105304718,
-0.3246106505393982,
-0.10383690148591995,
0.28322842717170715,
-0.23559166491031647,
0.11063665896654129,
-0.07785461843013763,
0.2746574878692627,
0.11749918758869171,
0.21184340119361877,
-0.08660569787025452,
0.018299996852874756,
0.49478599429130554,
0.050846438854932785,
-0.38442152738571167,
0.06801658868789673,
0.13999122381210327,
-0.21030135452747345,
0.168991819024086,
-0.08088237047195435,
0.11459195613861084,
0.066592738032341,
0.23644083738327026,
0.012485645711421967,
0.4046701192855835,
0.11570311337709427,
0.16341088712215424,
0.3329157829284668,
-0.12932035326957703,
-0.15164855122566223,
0.08301679790019989,
0.1361384093761444,
-0.2390339970588684,
0.2691415250301361,
-0.12516912817955017,
-0.32174044847488403,
-0.16784004867076874,
0.26419204473495483,
-0.24375727772712708,
0.13759969174861908,
0.22228731215000153,
-0.02655193954706192,
0.018648210912942886,
0.05920570343732834,
-0.020682014524936676,
-0.07819980382919312,
0.3349764347076416,
0.3243032991886139,
-0.2556231617927551,
0.11719934642314911,
-0.1355942189693451,
0.032838091254234314,
-0.19458186626434326,
0.00896137673407793,
-0.26036590337753296,
-0.1991954743862152,
0.0749540627002716,
0.09651867300271988,
0.03191535919904709,
0.19464051723480225,
-0.379652738571167,
0.39065632224082947,
0.20882393419742584,
-0.1338968425989151,
0.11031463742256165,
-0.3729246258735657,
-0.5186256766319275,
0.02911590039730072,
0.4584236145019531,
0.3136073350906372,
0.0662151575088501,
-0.1903255581855774,
0.04022378847002983,
0.14244498312473297,
0.24464601278305054,
0.1688431352376938,
0.009382583200931549,
0.2869972884654999,
-0.07501674443483353,
0.1845029592514038,
0.0898718535900116,
-0.31194359064102173,
-0.1852911114692688,
0.0936870276927948,
-0.4784454107284546,
-0.029092006385326385,
-0.11890418082475662,
0.14621809124946594,
0.7360666394233704,
-0.03889267146587372,
0.1401035189628601,
0.12743708491325378,
-0.06411880999803543,
0.016009896993637085,
-0.02592851221561432,
0.029409021139144897,
-0.02913438342511654,
0.16969792544841766,
-0.1558210402727127,
-0.06581878662109375,
-0.02626238763332367,
-0.009053494781255722,
0.055923495441675186,
0.32750025391578674,
0.16434311866760254,
0.3630479574203491,
0.11937767267227173,
-0.1260717511177063,
0.007060479372739792,
-0.2173478901386261,
-0.3239745497703552,
0.15086472034454346,
0.11299638450145721,
-0.024609439074993134,
0.18458890914916992,
0.026189476251602173,
-0.016683347523212433,
0.12991979718208313,
-0.11588802933692932,
-0.2264520674943924,
-0.03584125638008118,
0.01538490317761898,
0.14191934466362,
0.22516021132469177,
-0.16730913519859314,
-0.08543699234724045,
-0.3987801671028137,
0.20189183950424194,
0.12913551926612854,
0.2132975161075592,
0.16740845143795013,
-0.3093196749687195,
0.08808103203773499,
0.027967490255832672,
-0.056186240166425705,
-0.29180315136909485,
-0.12633463740348816,
0.21744103729724884,
-0.045872971415519714,
0.48106709122657776,
0.21295061707496643,
0.23608358204364777,
0.2677462697029114,
-0.05348717421293259,
-0.13998587429523468,
-0.039950303733348846,
-0.2297472357749939,
-0.14467012882232666,
0.07594013214111328,
0.06390072405338287,
0.027934886515140533,
0.3996681272983551,
-0.23140805959701538,
0.04135478287935257,
0.18102151155471802,
0.053627029061317444,
-0.28056150674819946,
-0.11179430782794952,
0.16221599280834198,
-0.17238041758537292,
0.33893510699272156,
-0.363663911819458,
-0.17476768791675568,
0.2798140048980713,
0.5837681293487549,
0.1502481997013092,
-0.19525891542434692,
0.2748531699180603,
-0.2448064386844635,
0.04414115846157074,
0.15690059959888458,
-0.022810645401477814,
0.043592240661382675,
-0.009329242631793022,
0.45683473348617554,
0.19799497723579407,
-0.18799415230751038,
-0.15676403045654297,
-0.13104721903800964,
-0.08426746726036072,
0.06512993574142456,
0.20276084542274475,
0.19269773364067078,
-0.015887994319200516,
-0.04470857232809067,
0.13961447775363922,
-0.05178365111351013,
-0.06947224587202072,
0.05985385179519653,
0.11604321002960205,
-0.19721344113349915,
0.050788164138793945,
-0.19677391648292542,
-0.045255303382873535,
-0.2034240961074829,
-0.3879685401916504,
0.2791292667388916,
0.29621776938438416,
-0.18507394194602966,
0.48811075091362,
0.4346408545970917,
0.05686517059803009,
0.3118783235549927,
0.06865694373846054,
-0.4190518856048584,
-0.03830242156982422,
-0.09208773076534271,
-0.020795615389943123,
-0.02577855996787548,
-0.12368409335613251,
0.2400941103696823,
-0.34349995851516724,
0.03073742240667343,
-0.4706163704395294,
-0.5390496850013733,
0.07343681156635284,
-0.29575684666633606,
0.24385836720466614,
-0.04294302687048912,
0.2601461112499237,
-0.014159321784973145,
0.2914206087589264,
0.22397755086421967,
-0.4895758032798767,
-0.1724528670310974,
-0.22851134836673737,
-0.20504598319530487,
-0.05751046538352966,
-0.1536020040512085,
0.11042031645774841,
-0.1657012552022934,
-0.27819985151290894,
0.28700321912765503,
-0.04216676205396652,
-0.06387579441070557,
-0.04633713886141777,
-0.059890568256378174,
0.22260089218616486,
-0.3873823285102844,
0.10302545875310898,
-0.038855019956827164,
-0.5785691738128662,
0.30630189180374146,
-0.14969953894615173,
-0.09829091280698776,
-0.03755946457386017,
0.041364654898643494,
-0.018641555681824684,
-0.1432565450668335,
-0.6688516139984131,
-0.5573723316192627,
-0.28216567635536194,
0.24094782769680023,
-0.02379637397825718,
0.029105419293045998,
0.23175178468227386,
-0.19480548799037933,
-0.11779782176017761,
0.09054049849510193,
-0.33539924025535583,
-0.025055956095457077,
0.3260852098464966,
0.20348553359508514,
-0.05209650099277496,
0.2375909388065338,
-0.06432772427797318,
0.6656942963600159,
0.27039480209350586,
-0.08965098112821579,
-0.20674699544906616,
-0.10056793689727783,
0.4572184085845947,
-0.3458636999130249,
0.0911034494638443,
0.16778764128684998,
-0.13863271474838257,
-0.20336732268333435,
0.0814482644200325,
0.1535218507051468,
0.30878642201423645,
0.007751986384391785,
0.1315002143383026,
0.12676145136356354,
-0.21516624093055725,
-0.051574379205703735,
-0.3151555061340332,
-0.05539272353053093,
0.068261057138443,
0.2521475851535797,
0.01629696786403656,
-0.12224452197551727,
0.012252971529960632,
0.356056272983551,
0.22930413484573364,
-0.06258086860179901,
-0.4475184679031372,
-0.17217890918254852,
-0.5859792232513428,
0.15968890488147736,
-0.05991674214601517,
0.037896618247032166,
-0.21953296661376953,
0.03341176360845566,
0.38173907995224,
0.022396858781576157,
0.31559208035469055,
-0.10564079880714417,
0.07191093266010284,
-0.08404500037431717,
-0.39868754148483276,
-0.23552145063877106,
-0.20928233861923218,
-0.033716123551130295,
0.13317620754241943,
0.40164831280708313,
0.7272648811340332,
-0.0981874018907547,
0.009039275348186493,
-0.20546822249889374,
0.12453576922416687,
-0.17302636802196503,
-0.2393888682126999,
-0.3352092504501343,
-0.15705832839012146,
-0.10925300419330597,
0.15470203757286072,
0.04901987314224243,
-0.40765246748924255,
-0.027136677876114845,
-0.31955769658088684,
0.24365083873271942,
0.029440216720104218,
-0.3894333243370056,
0.2722935080528259,
0.06269364804029465,
0.012526974081993103,
0.3474457263946533,
0.36822012066841125,
0.14130300283432007,
-0.11199229210615158,
0.34345269203186035,
-0.023659931495785713,
-0.24102900922298431,
0.13983342051506042,
-0.09536580741405487,
-0.08502338826656342,
0.49235057830810547,
0.11253871023654938,
0.2898254096508026,
0.21217817068099976,
0.513776421546936,
-0.46396827697753906,
0.21703043580055237,
0.4486234784126282,
0.476737916469574,
-0.07453341782093048,
-0.012633107602596283,
0.3377799689769745,
0.10936109721660614,
0.07012182474136353,
0.5275147557258606,
-0.2114134430885315,
0.016935933381319046,
-0.09209464490413666,
0.014331143349409103,
0.8672400116920471,
-0.3197614252567291,
0.12007762491703033,
0.15464116632938385,
-0.09510282427072525,
0.23638774454593658,
-0.13524048030376434,
0.09850937128067017,
-0.19900023937225342,
-0.11088325083255768,
-0.019200395792722702,
-0.21481162309646606,
-0.1548401415348053,
-0.17924614250659943,
-0.10321874171495438,
0.13528242707252502,
-0.05833229422569275,
0.6470811367034912,
-0.38043510913848877,
-0.049495868384838104,
0.23768503963947296,
-0.34840914607048035,
-0.37873610854148865,
0.14933714270591736,
0.15161466598510742,
0.3543093502521515,
0.13710537552833557,
-0.032147910445928574,
0.23332957923412323,
0.04596523940563202,
0.018977195024490356,
-0.14602747559547424,
0.17562206089496613,
-0.1249026209115982,
0.5305547714233398,
-0.2650928497314453,
-0.19035013020038605,
0.1042441874742508,
0.06105813756585121,
0.06704852730035782,
-0.13076455891132355,
0.27266210317611694,
0.03442663699388504,
0.35380175709724426,
0.008579667657613754,
-0.25858980417251587,
0.28364646434783936,
-0.14661172032356262,
0.10955515503883362,
0.2137582004070282,
-0.19443590939044952,
-0.3720874488353729,
0.04106779396533966,
0.30304858088493347,
0.10333079099655151,
0.3006027936935425,
0.32754263281822205,
0.09015434980392456,
-0.039349380880594254,
-0.1362249106168747,
0.08727425336837769,
0.05749386548995972,
-0.2177382856607437,
0.5721909403800964,
0.1861812025308609,
-0.3460535705089569,
-0.006214888766407967,
0.36466583609580994,
-0.09460234642028809,
0.29070985317230225,
0.47530221939086914,
0.05104118585586548,
-0.24197715520858765,
-0.04448381066322327,
0.12354102730751038,
0.16816601157188416,
-0.11394176632165909,
0.2618456184864044,
-0.18573160469532013,
0.15568943321704865,
0.11209239810705185,
0.1571938693523407,
0.11876973509788513,
-0.34929949045181274,
-0.4480002820491791,
-0.1854703426361084,
-0.6698125004768372,
-0.003939364105463028,
-0.2879183292388916,
-0.10040576756000519,
0.023470573127269745,
0.36568817496299744,
0.04271102696657181,
0.2261229157447815,
-0.27369236946105957,
-0.1404421627521515,
-0.5328817367553711,
0.2694500684738159,
0.3198195695877075,
-0.09874024987220764,
0.15448318421840668,
0.11307014524936676,
-0.0781177505850792,
0.21494056284427643,
-0.546708881855011,
-0.14655053615570068,
0.015548229217529297,
0.10916347801685333,
-0.07817763090133667,
-0.054082948714494705,
-0.0814068615436554,
-0.11590937525033951,
-0.2631900906562805,
-0.1578814536333084,
0.10823744535446167,
0.007292039692401886,
0.0277426615357399,
-0.31949758529663086,
-0.3000054359436035,
0.1320865899324417,
0.15139564871788025,
0.11831191182136536,
-0.024596843868494034,
0.25184574723243713,
-0.1710696816444397,
-0.05565817281603813,
0.07125240564346313,
-0.03273056447505951,
-0.2542632222175598,
0.014641173183918,
0.0598980188369751,
-0.11199460923671722,
0.4912734627723694,
0.025627560913562775,
0.3892211318016052,
-0.04577930271625519,
0.6025848984718323,
0.15383504331111908,
-0.2089393436908722,
-0.48139244318008423,
0.3206244707107544,
0.07851256430149078,
-0.056202542036771774,
0.01737324893474579,
0.05562626197934151,
0.21342891454696655,
0.1569218933582306,
-0.07284407317638397,
0.10809475183486938,
0.3270524740219116,
-0.10672487318515778,
0.31082794070243835,
0.026076149195432663,
-0.4855372905731201,
-0.10401463508605957,
-0.15468977391719818,
-0.1242901161313057,
0.3682680130004883,
0.5303033590316772,
0.3623141348361969,
-0.09338634461164474,
0.1486278474330902,
0.29897361993789673,
0.3952963054180145,
-0.030053509399294853,
-0.03948373720049858,
-0.05311770364642143,
-0.1074921041727066,
0.03338972106575966,
0.33228862285614014,
-0.22370348870754242,
-0.10965924710035324,
-0.054321203380823135,
0.17709805071353912,
-0.4878920912742615,
-0.3575590252876282,
-0.2407957911491394,
0.30938848853111267,
-0.13824568688869476,
-0.008362378925085068,
0.3644551634788513,
0.105600506067276,
0.2460038810968399,
0.12580975890159607,
-0.0017466640565544367,
0.2711411714553833,
0.34839439392089844,
0.029695387929677963,
0.009545039385557175,
-0.10771267861127853,
-0.4884333610534668,
-0.14193329215049744,
0.27157142758369446,
-0.20382457971572876,
0.2276345044374466,
0.021687492728233337,
0.20222941040992737,
0.2872689366340637,
0.1623433530330658,
0.3170051574707031,
0.1820131242275238,
-0.02163715288043022,
-0.002611178904771805,
0.03648541867733002,
-0.06434053182601929,
0.13534021377563477,
0.5368284583091736,
-0.09606234729290009,
-0.6452897191047668,
0.36418983340263367,
0.04194255918264389,
-0.21803100407123566,
0.3268670439720154,
-0.07205238938331604,
0.3020477890968323,
-0.14882858097553253,
0.08937835693359375,
-0.14557641744613647,
0.08074004203081131,
-0.33378949761390686,
-0.042883846908807755,
-0.261406809091568,
0.058481331914663315,
0.21106791496276855,
-0.43592891097068787,
0.029274247586727142,
-0.10977309942245483,
0.06605575978755951,
-0.3566701412200928,
0.5574354529380798,
0.6178803443908691,
-0.016312239691615105,
0.045237988233566284,
-0.14543572068214417,
-0.3284856677055359,
0.12486577033996582,
-0.17823390662670135,
-0.1731695681810379,
-0.23144946992397308,
0.29214605689048767,
-0.04424813389778137,
0.2595977783203125,
0.5342922210693359,
-0.4022986590862274,
-0.10385285317897797,
-0.21433866024017334,
-0.25801876187324524,
0.0669403225183487,
-0.2614174783229828,
0.033776409924030304,
-0.06586174666881561,
-0.2519775927066803,
0.4331672787666321,
0.056380439549684525,
-0.014876965433359146,
0.3630107045173645,
0.2634352743625641,
-0.07304137200117111,
0.28078514337539673,
0.37652891874313354,
-0.006155766546726227,
-0.026190005242824554,
-0.09183618426322937,
-0.21721330285072327,
-0.006944688037037849,
-0.27984166145324707,
-0.21631842851638794,
-0.04113475978374481,
-0.32786282896995544,
0.35971179604530334,
-0.12800011038780212,
-0.05856017768383026,
-0.3390309810638428,
-0.03717825561761856,
0.13102521002292633,
-0.2752212584018707,
-0.012436851859092712,
-0.02468382939696312,
0.05353941023349762,
0.07747353613376617,
0.28159844875335693,
0.16691258549690247,
0.21932865679264069,
-0.056459154933691025,
-0.20006202161312103,
-0.23455065488815308,
0.6014279127120972,
-0.17627805471420288,
-0.32051533460617065,
-0.030726436525583267,
-0.06094273179769516,
0.15734130144119263,
-0.0020095836371183395,
-0.5110329389572144,
-0.057124435901641846,
0.1305316686630249,
-0.04099152237176895,
-0.10792894661426544,
0.3010040521621704,
-0.06906429678201675,
0.01338135451078415,
-0.19022098183631897,
0.05270951986312866,
-0.059910815209150314,
-0.038953494280576706,
-0.1784621775150299,
-0.08101754635572433
] |
https://github.com/huggingface/datasets/issues/6591 | Hi! Indeed, Dropbox is not a reliable host. I've just merged https://huggingface.co/datasets/PolyAI/minds14/discussions/24 to fix this by hosting the data files inside the repo. | The datasets models housed in Dropbox can't support a lot of users downloading them | ### Describe the bug
I'm using the datasets
```
from datasets import load_dataset, Audio
dataset = load_dataset("PolyAI/minds14", name="en-US", split="train")
```
And it seems that sometimes when I imagine a lot of users are accessing the same resources, the Dropbox host fails:
`raise ConnectionError(f"Couldn't reach {url} (error {response.status_code})") ConnectionError: Couldn't reach https://www.dropbox.com/s/e2us0hcs3ilr20e/MInDS-14.zip?dl=1 (error 429)`
My question is if we can somehow host these files elsewhere or can you change the limit of simultaneous users accessing those resources or any other solution?
Also, has anyone had this issue before?
Thanks
### Steps to reproduce the bug
1: Create a python script like so:
```
from datasets import load_dataset, Audio
dataset = load_dataset("PolyAI/minds14", name="en-US", split="train")
```
2: Execute this by a certain number of users at the same time
### Expected behavior
I woudl expect that this shouldnt happen unless its a huge amount of users, which it is not the case
### Environment info
This was done in an Ubuntu 22 environment. | 23 | The datasets models housed in Dropbox can't support a lot of users downloading them
### Describe the bug
I'm using the datasets
```
from datasets import load_dataset, Audio
dataset = load_dataset("PolyAI/minds14", name="en-US", split="train")
```
And it seems that sometimes when I imagine a lot of users are accessing the same resources, the Dropbox host fails:
`raise ConnectionError(f"Couldn't reach {url} (error {response.status_code})") ConnectionError: Couldn't reach https://www.dropbox.com/s/e2us0hcs3ilr20e/MInDS-14.zip?dl=1 (error 429)`
My question is if we can somehow host these files elsewhere or can you change the limit of simultaneous users accessing those resources or any other solution?
Also, has anyone had this issue before?
Thanks
### Steps to reproduce the bug
1: Create a python script like so:
```
from datasets import load_dataset, Audio
dataset = load_dataset("PolyAI/minds14", name="en-US", split="train")
```
2: Execute this by a certain number of users at the same time
### Expected behavior
I woudl expect that this shouldnt happen unless its a huge amount of users, which it is not the case
### Environment info
This was done in an Ubuntu 22 environment.
Hi! Indeed, Dropbox is not a reliable host. I've just merged https://huggingface.co/datasets/PolyAI/minds14/discussions/24 to fix this by hosting the data files inside the repo. | [
-0.34906262159347534,
0.30475425720214844,
-0.036654695868492126,
0.5930954217910767,
0.2086874395608902,
-0.12326231598854065,
0.3543434739112854,
0.08312855660915375,
0.21345342695713043,
0.14639872312545776,
-0.38722750544548035,
-0.04541517421603203,
-0.1008751392364502,
0.19324469566345215,
-0.0011590104550123215,
-0.22802318632602692,
0.11695431172847748,
-0.2087624967098236,
-0.18063272535800934,
0.01932821422815323,
0.0036475583910942078,
-0.17517144978046417,
-0.0603385865688324,
-0.05301240086555481,
-0.11521061509847641,
-0.162139430642128,
0.020772404968738556,
0.19726631045341492,
-0.09253740310668945,
-0.06385917216539383,
0.3169559836387634,
0.3259480893611908,
-0.006197478622198105,
0.47269031405448914,
-0.00012059611617587507,
0.10101113468408585,
0.11729992181062698,
0.010809704661369324,
-0.4866940975189209,
-0.3966272473335266,
-0.31543058156967163,
-0.18912914395332336,
-0.16727082431316376,
-0.024103671312332153,
0.08138547837734222,
0.16363206505775452,
-0.09641788899898529,
-0.26491278409957886,
0.4691128730773926,
0.049543604254722595,
0.13248705863952637,
0.538135290145874,
0.2096829116344452,
0.018230915069580078,
0.366950660943985,
0.28578585386276245,
-0.02341148629784584,
1.031994342803955,
0.5136939287185669,
-0.25483590364456177,
0.01966508850455284,
0.10691266506910324,
0.01710514724254608,
0.09721969813108444,
0.002421930432319641,
-0.15899665653705597,
-0.20539017021656036,
-0.5709231495857239,
-0.2839927077293396,
0.44344672560691833,
0.6144892573356628,
0.1821741759777069,
-0.612619161605835,
-0.47819703817367554,
-0.1445782631635666,
0.2922690808773041,
0.22078439593315125,
0.29425618052482605,
-0.10822989046573639,
0.09603406488895416,
-0.13825750350952148,
-0.0720628872513771,
-0.15264959633350372,
0.20686675608158112,
0.2214779108762741,
0.19082415103912354,
-0.017407219856977463,
0.1342446357011795,
0.2525429427623749,
-0.2261800765991211,
0.34398531913757324,
-0.16740533709526062,
0.00879954919219017,
0.03120427578687668,
-0.43475788831710815,
-0.15999135375022888,
-0.3491464853286743,
0.015955397859215736,
0.4355824291706085,
0.18698260188102722,
0.3502656817436218,
-0.061050936579704285,
-0.2933349311351776,
0.07961131632328033,
0.48076674342155457,
-0.030551636591553688,
-0.2366350293159485,
-0.13127706944942474,
0.43354836106300354,
0.35784682631492615,
0.05127765238285065,
0.0528116337954998,
-0.12714405357837677,
-0.2279665470123291,
-0.48746705055236816,
-0.20933890342712402,
0.33159881830215454,
-0.01247810572385788,
-0.2988400161266327,
0.017094198614358902,
-0.34144866466522217,
-0.08493968844413757,
0.17944660782814026,
-0.07533742487430573,
-0.06158168613910675,
0.5560657978057861,
-0.08181233704090118,
-0.0327601283788681,
-0.12452339380979538,
-0.6439999341964722,
-0.014974763616919518,
0.0804469883441925,
0.007933340966701508,
0.20813050866127014,
0.039389386773109436,
-0.13607817888259888,
0.20017631351947784,
0.10636721551418304,
0.27311620116233826,
-0.40299925208091736,
0.4125467538833618,
-0.18519631028175354,
-0.42668408155441284,
0.21395322680473328,
0.06018347293138504,
0.14263585209846497,
-0.0768895298242569,
-0.2923147976398468,
0.06350699067115784,
-0.09679040312767029,
-0.42343005537986755,
-0.24606342613697052,
-0.014537932351231575,
0.034412089735269547,
0.08502897620201111,
-0.013651415705680847,
-0.44952666759490967,
-0.03133884817361832,
0.15037645399570465,
-0.13077889382839203,
-0.09320289641618729,
0.08713125437498093,
0.08229470252990723,
0.09522079676389694,
0.1650177240371704,
0.784038245677948,
-0.18594737350940704,
0.20476004481315613,
-0.04840681329369545,
0.19633594155311584,
0.12999385595321655,
0.40290355682373047,
-0.3453598916530609,
0.1799461990594864,
-0.2160215675830841,
-0.14010222256183624,
0.17064492404460907,
-0.4134587049484253,
-0.4820816218852997,
0.3513178825378418,
-0.31770190596580505,
0.001693911850452423,
0.20589591562747955,
0.10538385808467865,
0.38574695587158203,
-0.06955049932003021,
0.44237709045410156,
0.1328412890434265,
0.1388503611087799,
-0.0659477561712265,
-0.22212037444114685,
-0.38198956847190857,
0.1707647442817688,
0.1460590660572052,
-0.04746117815375328,
0.07430727779865265,
0.23825670778751373,
0.5121104717254639,
0.3691937029361725,
0.03758842498064041,
0.15790262818336487,
0.13321152329444885,
0.1868947446346283,
0.07206705957651138,
-0.23774446547031403,
-0.002927906811237335,
-0.08964955806732178,
0.12463760375976562,
0.1851743459701538,
-0.16570526361465454,
0.4350147247314453,
-0.022662300616502762,
-0.21597783267498016,
0.02775045484304428,
-0.08349204063415527,
0.23790711164474487,
-0.043844517320394516,
-0.03316919133067131,
-0.10011879354715347,
0.07653118669986725,
0.01914956420660019,
0.3858061134815216,
-0.2725967764854431,
0.1561327427625656,
-0.4965721368789673,
0.6936954259872437,
-0.3075629770755768,
0.0355728380382061,
0.20337000489234924,
-0.13875415921211243,
0.12903858721256256,
-0.12545298039913177,
-0.06137695908546448,
0.27099668979644775,
0.01660235971212387,
-0.1250087022781372,
0.2715582549571991,
0.4489666223526001,
0.5344020128250122,
0.06611188501119614,
0.045813724398612976,
0.1261754333972931,
0.17391479015350342,
0.06975587457418442,
0.00844527781009674,
0.12995979189872742,
0.029143627732992172,
0.3422437906265259,
0.09858892858028412,
0.18958231806755066,
0.37119537591934204,
0.19246900081634521,
-0.05055705085396767,
0.0059462785720825195,
0.10050137341022491,
-0.32987502217292786,
0.651333749294281,
-0.09648546576499939,
-0.5143778920173645,
-0.09021414071321487,
-0.19333362579345703,
-0.04143471270799637,
0.13709130883216858,
0.05784588307142258,
0.02356533333659172,
-0.29618093371391296,
0.31294676661491394,
0.3223075270652771,
0.44270551204681396,
-0.01187177188694477,
0.2536565661430359,
-0.13536451756954193,
0.2525619864463806,
-0.38384905457496643,
0.14354823529720306,
0.1298704296350479,
-0.3148688077926636,
0.11463847756385803,
0.2929903566837311,
-0.05536171793937683,
-0.3125128746032715,
-0.4400450587272644,
0.13902705907821655,
0.10137081146240234,
-0.4092806577682495,
0.14167529344558716,
-0.08791182935237885,
-0.1490957885980606,
-0.09803302586078644,
-0.2737939953804016,
-0.38486072421073914,
-0.1811661720275879,
-0.09884242713451385,
0.5308657288551331,
-0.16051515936851501,
0.0030668266117572784,
-0.0523412749171257,
0.40032345056533813,
-0.018542330712080002,
0.7165916562080383,
-0.22272488474845886,
0.353158563375473,
-0.017031598836183548,
-0.04305245354771614,
0.4778655171394348,
-0.25951850414276123,
0.2189568132162094,
-0.05803099647164345,
-0.2861115336418152,
-0.2743470072746277,
-0.038729749619960785,
-0.05602557957172394,
0.3778602182865143,
0.3329117000102997,
-0.08080961555242538,
0.4306657910346985,
0.3781977891921997,
-0.21177101135253906,
-0.0866936668753624,
0.22042705118656158,
0.14474454522132874,
-0.10891503095626831,
-0.10517188906669617,
-0.017533067613840103,
0.08187788724899292,
-0.16206365823745728,
-0.4709759056568146,
-0.3829686641693115,
0.06312212347984314,
-0.16653558611869812,
0.1185225397348404,
0.3813387155532837,
0.3101556599140167,
-0.05377796292304993,
-0.2704675793647766,
-0.15217676758766174,
-0.05707055330276489,
-0.7085325717926025,
0.19924357533454895,
-0.13225731253623962,
-0.3466174304485321,
-0.045939892530441284,
0.24667701125144958,
-0.15609237551689148,
-0.23059113323688507,
-0.28649193048477173,
-0.3517354726791382,
-0.23138251900672913,
-0.004945434629917145,
-0.14051073789596558,
0.07661132514476776,
-0.09523758292198181,
-0.15922442078590393,
0.04006531834602356,
0.21455709636211395,
0.09993869811296463,
0.20014606416225433,
0.39993953704833984,
0.14909206330776215,
0.00029321014881134033,
0.04636295139789581,
0.09404988586902618,
0.2747355103492737,
0.3187411427497864,
0.09903356432914734,
0.5184029340744019,
0.22993534803390503,
0.4053952395915985,
-0.11443421989679337,
-0.13574905693531036,
-0.05525942146778107,
-0.06019115447998047,
-0.12520399689674377,
0.26373910903930664,
0.14137977361679077,
0.07755628228187561,
-0.20382076501846313,
-0.5625351071357727,
0.04997768998146057,
-0.27683785557746887,
-0.1582871377468109,
-0.2893672585487366,
0.019709065556526184,
0.06064578890800476,
-0.11397548019886017,
-0.026401016861200333,
-0.13879624009132385,
-0.14083005487918854,
0.23154258728027344,
0.2929227352142334,
0.12422927469015121,
-0.1126146912574768,
-0.011391948908567429,
-0.2010079324245453,
0.0720105990767479,
-0.1025591641664505,
0.6583530306816101,
-0.2290605902671814,
0.40352630615234375,
0.1955634206533432,
0.10835246741771698,
0.5710563063621521,
-0.06533316522836685,
0.33667561411857605,
-0.3773016333580017,
0.22548533976078033,
0.04691373556852341,
-0.1947566270828247,
0.01599794626235962,
-0.05856527015566826,
0.15598300099372864,
0.447812020778656,
-0.20418119430541992,
-0.062213726341724396,
-0.2246263027191162,
0.2936951518058777,
-0.17234164476394653,
-0.0051294490694999695,
0.11074036359786987,
-0.33743399381637573,
-0.2704894542694092,
0.16707107424736023,
0.026788152754306793,
-0.03695268929004669,
-0.1638488471508026,
-0.39723634719848633,
0.3504811227321625,
-0.0009193569421768188,
0.08551670610904694,
-0.02027731016278267,
-0.11701366305351257,
0.20044159889221191,
0.40045660734176636,
0.14510734379291534,
0.05178489536046982,
0.5281598567962646,
0.47957274317741394,
0.002642693929374218,
-0.18869109451770782,
-0.1388319879770279,
0.02055780589580536,
0.04423202574253082,
0.47010499238967896,
-0.07010363787412643,
0.22544129192829132,
0.2717859447002411,
0.19994528591632843,
-0.09975354373455048,
0.1847398579120636,
0.2004639357328415,
-0.11443585157394409,
-0.3668820858001709,
-0.5607014298439026,
0.2666074335575104,
-0.26201510429382324,
-0.11891275644302368,
0.01540878601372242,
-0.04304993897676468,
-0.09479637444019318,
0.3055400550365448,
-0.054974265396595,
1.0395841598510742,
0.03977903723716736,
0.33776459097862244,
-0.22277604043483734,
-0.31248605251312256,
0.2570669651031494,
-0.4514039158821106,
-0.0525435209274292,
-0.17208102345466614,
-0.20307135581970215,
-0.14640960097312927,
-0.040761034935712814,
0.12513549625873566,
0.3256374001502991,
0.1769498735666275,
0.24215953052043915,
-0.35880956053733826,
-0.027354862540960312,
-0.10208683460950851,
0.40548792481422424,
-0.06043323129415512,
-0.06945507228374481,
-0.03438136726617813,
0.106120765209198,
-0.22445686161518097,
-0.13409510254859924,
-0.13487161695957184,
-0.1994473934173584,
-0.04950692132115364,
-0.20532570779323578,
-0.2601102888584137,
0.03618671000003815,
-0.1484188586473465,
0.21064305305480957,
-0.2702657878398895,
-0.1839393675327301,
0.19895808398723602,
0.22018185257911682,
-0.13423576951026917,
0.2697121202945709,
-0.21610087156295776,
-0.0909712016582489,
-0.4067266583442688,
0.03327227011322975,
0.11488193273544312,
0.10712172836065292,
-0.023108255118131638,
-0.037498075515031815,
-0.23849694430828094,
-0.20578332245349884,
0.04751927778124809,
0.012976102530956268,
-0.21358554065227509,
0.16574594378471375,
-0.029137812554836273,
-0.19631555676460266,
0.0025145262479782104,
-0.1536080241203308,
-0.07182200253009796,
-0.2828516662120819,
0.013795126229524612,
0.09832484275102615,
-0.18958553671836853,
0.05454159155488014,
-0.13447582721710205,
0.09502758085727692,
-0.06728289276361465,
0.48401015996932983,
-0.24403099715709686,
0.6413314342498779,
0.16697052121162415,
-0.03291972726583481,
-0.1474524438381195,
-0.028939664363861084,
0.498877614736557,
-0.3084981441497803,
-0.33750247955322266,
0.17533349990844727,
-0.07534293830394745,
0.22304323315620422,
-0.5090773105621338,
0.17488586902618408,
0.29821619391441345,
-0.07153521478176117,
0.06182470917701721,
-0.4839436709880829,
-0.12489714473485947,
-0.0028875917196273804,
0.05955422297120094,
-0.013905579224228859,
-0.1388559490442276,
-0.2938847541809082,
-0.04019872844219208,
0.04889398813247681,
-0.1475439965724945,
-0.04070571810007095,
-0.4518354535102844,
-0.06870944797992706,
0.12597166001796722,
-0.07122578471899033,
0.035223934799432755,
-0.030017821118235588,
-0.07604116201400757,
-0.12478338181972504,
0.024748999625444412,
-0.043620407581329346,
-0.14139260351657867,
0.2122957408428192,
0.331927627325058,
-0.20307934284210205,
0.137737438082695,
-0.43489640951156616,
-0.09451411664485931,
0.006318286061286926,
-0.14222636818885803,
0.1893482804298401,
0.10771037638187408,
-0.19460973143577576,
0.1059972420334816,
0.259208083152771,
-0.3611067533493042,
0.6863635182380676,
0.009709194302558899,
0.08135591447353363,
-0.01156570017337799,
0.08195675909519196,
0.533565104007721,
-0.15314581990242004,
-0.48906782269477844,
0.022555552423000336,
0.09814313054084778,
-0.04573561251163483,
0.45453041791915894,
-0.1193055510520935,
0.027171872556209564,
0.4367977976799011,
0.2256019115447998,
0.5700404047966003,
-0.043804578483104706,
0.08966866135597229,
0.16351643204689026,
0.053895581513643265,
-0.1267017424106598,
-0.4981590509414673,
0.2596032917499542,
0.09639875590801239,
-0.06487494707107544,
0.06021331250667572,
0.4172857701778412,
-0.4280468821525574,
-0.37558984756469727,
0.08334562927484512,
0.2634715437889099,
0.3853907883167267,
0.024904191493988037,
0.3410814702510834,
0.015588469803333282,
0.080381378531456,
0.09330346435308456,
-0.07530716806650162,
0.28908517956733704,
0.2401297241449356,
-0.15543146431446075,
0.19618773460388184,
0.05985713005065918,
-0.048066381365060806,
0.047636453062295914,
-0.3706510663032532,
0.11941644549369812,
-0.09854184836149216,
0.1165054440498352,
0.009202834218740463,
-0.18145626783370972,
0.1166512668132782,
-0.3196353018283844,
0.14032207429409027,
-0.17908614873886108,
-0.021638527512550354,
0.12672023475170135,
0.0030631422996520996,
0.09913025796413422,
-0.16117337346076965,
-0.16479039192199707,
-0.1036285012960434,
-0.07345674932003021,
-0.2539909780025482,
0.2951852083206177,
0.0459800660610199,
-0.11420553922653198,
-0.28488487005233765,
-0.02579999342560768,
0.48290008306503296,
-0.15654206275939941,
-0.41036486625671387,
0.24331550300121307,
0.5072838664054871,
-0.11213860660791397,
0.03974579647183418,
0.3100396394729614,
0.26596832275390625,
0.15341120958328247,
0.1809539496898651,
0.0965755507349968,
0.1777205765247345,
-0.019949153065681458,
-0.12869304418563843,
0.22673925757408142,
0.018982285633683205,
0.0541980117559433,
0.3400738835334778,
-0.0021012891083955765,
-0.07208514213562012,
0.20349445939064026,
-0.016284694895148277,
-0.17181280255317688,
-0.3644014000892639,
0.37769901752471924,
-0.20838646590709686,
-0.3342970311641693,
-0.1482611894607544,
-0.17382043600082397,
-0.33766666054725647,
0.22595328092575073,
0.2937901020050049,
-0.24256104230880737,
0.07959824800491333,
-0.18095871806144714,
-0.026401568204164505,
-0.12631279230117798,
0.4996488392353058,
0.28008705377578735,
-0.13654954731464386,
-0.0726889818906784,
-0.012880951166152954,
-0.46603459119796753,
0.1569090485572815,
-0.3219239413738251,
0.22696469724178314,
-0.25114142894744873,
-0.11716865003108978,
-0.10073478519916534,
0.03455562889575958,
-0.016760043799877167,
0.049851272255182266,
-0.30194833874702454,
0.434814453125,
-0.270252525806427,
-0.16739073395729065,
-0.08417458832263947,
0.20493924617767334,
-0.1196732148528099,
-0.2310779094696045,
0.5603910684585571,
-0.01928672194480896,
-0.11945578455924988,
0.13712474703788757,
0.14710001647472382,
0.04321959614753723,
-0.27187734842300415,
0.3970136046409607,
0.19369781017303467,
0.4182116687297821,
0.019577644765377045,
0.00705999881029129,
-0.2533201575279236,
-0.15868709981441498,
-0.2283119112253189,
-0.146126851439476,
-0.01895628683269024,
0.27509942650794983,
-0.2425115704536438,
-0.08223223686218262,
-0.27752289175987244,
0.10042151808738708,
-0.27389031648635864,
0.1594095528125763,
-0.1747795194387436,
-0.32918649911880493,
-0.0919608473777771,
0.04560423642396927,
0.2267928570508957,
0.04353092610836029,
-0.12125203013420105,
-0.25256243348121643,
-0.26080673933029175,
-0.20873695611953735,
0.19289849698543549,
-0.27708396315574646,
-0.32899290323257446,
-0.23428687453269958,
0.3372357189655304,
-0.11157642304897308,
-0.1409219652414322,
0.08947369456291199,
-0.039101600646972656,
0.48309803009033203,
-0.06864911317825317,
-0.07798925787210464,
0.17048205435276031,
-0.020144524052739143,
0.090975821018219,
0.06976588070392609,
0.36426424980163574,
0.013355394825339317,
-0.1229887455701828,
0.4651418924331665,
-0.12192465364933014
] |
https://github.com/huggingface/datasets/issues/6585 | Hi ! This issue comes from the fact that `map()` with `num_proc>1` shards the dataset in multiple chunks to be processed (one per process) and merges them. The DatasetInfos of each chunk are then merged together, but for some fields like `dataset_name` it's not been implemented and default to None.
The DatasetInfo merge is defined here, in case you'd like to contribute an improvement:
https://github.com/huggingface/datasets/blob/d2e0034122a788015c0834a72e6c6279e7ecbac5/src/datasets/info.py#L269-L270 | losing DatasetInfo in Dataset.map when num_proc > 1 | ### Describe the bug
Hello and thanks for developing this package!
When I process a Dataset with the map function using multiple processors some set attributes of the DatasetInfo get lost and are None in the resulting Dataset.
### Steps to reproduce the bug
```python
from datasets import Dataset, DatasetInfo
def run_map(num_proc):
dataset = Dataset.from_dict(
{"col1": [0, 1], "col2": [3, 4]},
info=DatasetInfo(
dataset_name="my_dataset",
),
)
ds = dataset.map(lambda x: x, num_proc=num_proc)
print(ds.info.dataset_name)
run_map(1)
run_map(2)
```
This puts out:
```bash
Map: 100%|██████████| 2/2 [00:00<00:00, 724.66 examples/s]
my_dataset
Map (num_proc=2): 100%|██████████| 2/2 [00:00<00:00, 18.25 examples/s]
None
```
### Expected behavior
I expect the DatasetInfo to be kept as it was and there should be no difference in the output of running map with num_proc=1 and num_proc=2.
Expected output:
```bash
Map: 100%|██████████| 2/2 [00:00<00:00, 724.66 examples/s]
my_dataset
Map (num_proc=2): 100%|██████████| 2/2 [00:00<00:00, 18.25 examples/s]
my_dataset
```
### Environment info
- `datasets` version: 2.16.1
- Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.17
- Python version: 3.8.18
- `huggingface_hub` version: 0.20.2
- PyArrow version: 12.0.1
- Pandas version: 2.0.3
- `fsspec` version: 2023.9.2 | 65 | losing DatasetInfo in Dataset.map when num_proc > 1
### Describe the bug
Hello and thanks for developing this package!
When I process a Dataset with the map function using multiple processors some set attributes of the DatasetInfo get lost and are None in the resulting Dataset.
### Steps to reproduce the bug
```python
from datasets import Dataset, DatasetInfo
def run_map(num_proc):
dataset = Dataset.from_dict(
{"col1": [0, 1], "col2": [3, 4]},
info=DatasetInfo(
dataset_name="my_dataset",
),
)
ds = dataset.map(lambda x: x, num_proc=num_proc)
print(ds.info.dataset_name)
run_map(1)
run_map(2)
```
This puts out:
```bash
Map: 100%|██████████| 2/2 [00:00<00:00, 724.66 examples/s]
my_dataset
Map (num_proc=2): 100%|██████████| 2/2 [00:00<00:00, 18.25 examples/s]
None
```
### Expected behavior
I expect the DatasetInfo to be kept as it was and there should be no difference in the output of running map with num_proc=1 and num_proc=2.
Expected output:
```bash
Map: 100%|██████████| 2/2 [00:00<00:00, 724.66 examples/s]
my_dataset
Map (num_proc=2): 100%|██████████| 2/2 [00:00<00:00, 18.25 examples/s]
my_dataset
```
### Environment info
- `datasets` version: 2.16.1
- Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.17
- Python version: 3.8.18
- `huggingface_hub` version: 0.20.2
- PyArrow version: 12.0.1
- Pandas version: 2.0.3
- `fsspec` version: 2023.9.2
Hi ! This issue comes from the fact that `map()` with `num_proc>1` shards the dataset in multiple chunks to be processed (one per process) and merges them. The DatasetInfos of each chunk are then merged together, but for some fields like `dataset_name` it's not been implemented and default to None.
The DatasetInfo merge is defined here, in case you'd like to contribute an improvement:
https://github.com/huggingface/datasets/blob/d2e0034122a788015c0834a72e6c6279e7ecbac5/src/datasets/info.py#L269-L270 | [
-0.35594192147254944,
-0.10743378102779388,
-0.007776990532875061,
0.6413049101829529,
0.2363981008529663,
0.20442619919776917,
0.16280147433280945,
0.22665756940841675,
0.17084787786006927,
0.3607620298862457,
0.25110965967178345,
0.6130760908126831,
0.121337890625,
0.14003291726112366,
-0.1783961057662964,
0.17011480033397675,
0.09898559749126434,
0.02765503153204918,
-0.0899694412946701,
-0.13389089703559875,
-0.36770856380462646,
0.06443457305431366,
-0.307568222284317,
-0.26112422347068787,
-0.1411897987127304,
-0.1100536361336708,
0.04930867999792099,
0.17221558094024658,
0.3406822085380554,
-0.24031834304332733,
0.060937099158763885,
-0.15086036920547485,
-0.19922806322574615,
0.3899756669998169,
-0.00012630113633349538,
0.0312701016664505,
0.21787425875663757,
0.05240496248006821,
-0.0708666443824768,
-0.10022728890180588,
-0.47568100690841675,
-0.23188304901123047,
-0.1475551724433899,
-0.21139919757843018,
0.09373269975185394,
0.21084699034690857,
-0.17675811052322388,
-0.7475442290306091,
-0.21800382435321808,
0.1603916883468628,
0.09108671545982361,
0.07896046340465546,
-0.22437423467636108,
0.2967505156993866,
-0.03423871099948883,
0.2327192723751068,
-0.0967441201210022,
-0.37960097193717957,
0.14458759129047394,
-0.06349065154790878,
0.46268290281295776,
0.3652350902557373,
-0.16776007413864136,
-0.011929257772862911,
-0.0702095627784729,
0.16012035310268402,
0.3667883276939392,
-0.5146741271018982,
0.34131184220314026,
-0.03113381937146187,
0.06641543656587601,
-0.3808515965938568,
-0.4555741548538208,
-0.36409488320350647,
0.09394752234220505,
-0.35504186153411865,
-0.040010496973991394,
0.03291039168834686,
0.11277399957180023,
0.18530942499637604,
-0.17637063562870026,
0.1864423155784607,
0.11593656241893768,
0.17687544226646423,
-0.21544329822063446,
0.4166242182254791,
0.06126561388373375,
0.2978060841560364,
-0.06925695389509201,
0.19794383645057678,
-0.3226947486400604,
-0.2461216151714325,
-0.09116329997777939,
0.11376911401748657,
-0.28054043650627136,
0.04972320795059204,
0.29494038224220276,
0.2129015475511551,
0.03602214157581329,
-0.16849122941493988,
-0.03505358844995499,
0.023824196308851242,
-0.2337193638086319,
0.26547467708587646,
0.3721844553947449,
-0.220251202583313,
0.16316644847393036,
0.27946358919143677,
0.3314630389213562,
-0.3442727327346802,
-0.2105642557144165,
-0.0665743350982666,
0.5086453557014465,
0.03971705585718155,
0.4166730046272278,
0.09467218071222305,
0.5206435918807983,
-0.2105320245027542,
-0.14259377121925354,
0.38411933183670044,
-0.43340864777565,
0.04695957154035568,
-0.07658735662698746,
0.2025316208600998,
0.17701135575771332,
0.5956434011459351,
-0.24882008135318756,
0.10171288996934891,
-0.27996736764907837,
-0.2748727798461914,
-0.29467037320137024,
-0.2955440282821655,
-0.0785306990146637,
0.131984144449234,
0.15046818554401398,
0.11237539350986481,
0.1970292627811432,
0.10498499870300293,
0.18695199489593506,
-0.40307918190956116,
0.22271080315113068,
-0.5375765562057495,
0.16016298532485962,
0.23253917694091797,
-0.19779962301254272,
0.4305339455604553,
0.022278906777501106,
-0.1635550558567047,
-0.135986328125,
0.23581786453723907,
-0.012416243553161621,
-0.027838125824928284,
0.13797134160995483,
0.06756116449832916,
-0.0734746977686882,
0.22052820026874542,
-0.13818509876728058,
0.3382094204425812,
0.35474497079849243,
-0.14990174770355225,
0.050476133823394775,
-0.5391979217529297,
-0.654456377029419,
-0.22861941158771515,
-0.010196175426244736,
0.6097245812416077,
-0.2593623995780945,
-0.07461350411176682,
0.046567898243665695,
0.09082925319671631,
0.18695494532585144,
0.28927451372146606,
-0.05412444844841957,
0.18184904754161835,
-0.007341977208852768,
0.03950588405132294,
0.22433368861675262,
-0.4511169195175171,
-0.8372582793235779,
0.1797613650560379,
-0.11557497829198837,
0.03837817907333374,
0.03740262985229492,
0.09568601101636887,
0.23682533204555511,
-0.12303490936756134,
-0.1525932103395462,
0.2633562982082367,
-0.183447927236557,
0.25063198804855347,
-0.14988616108894348,
-0.01819417253136635,
0.36995255947113037,
-0.10850463807582855,
0.32885411381721497,
0.13415563106536865,
0.2925404906272888,
-0.6212630867958069,
0.36426568031311035,
0.05031675100326538,
0.386599063873291,
0.4405115246772766,
0.16884127259254456,
0.11976442486047745,
0.07913549244403839,
-0.29631170630455017,
-0.23875606060028076,
0.25431913137435913,
0.21158839762210846,
-0.1773904711008072,
-0.34483209252357483,
-0.20443439483642578,
0.030630789697170258,
0.140895277261734,
0.03339745104312897,
-0.049728069454431534,
-0.01624615490436554,
0.06770157814025879,
-0.17575277388095856,
0.11382189393043518,
-0.02655978500843048,
0.37636706233024597,
0.16989925503730774,
-0.050325505435466766,
-0.11086833477020264,
0.2983427345752716,
0.22249306738376617,
-0.2117142677307129,
-0.21228507161140442,
0.12854093313217163,
0.4177859425544739,
0.1305915117263794,
-0.19762574136257172,
0.2743111252784729,
0.4598274827003479,
0.1394636034965515,
-0.07753509283065796,
0.17671456933021545,
0.5364245176315308,
0.02607119083404541,
-0.12010534852743149,
0.04024128243327141,
0.27028152346611023,
-0.10780757665634155,
0.0010097203776240349,
-0.09311004728078842,
0.14807848632335663,
0.27476513385772705,
-0.03482517600059509,
-0.006703265011310577,
0.08004046231508255,
-0.06312156468629837,
0.08195280283689499,
-0.2767476439476013,
-0.3134356439113617,
-0.032946038991212845,
0.2195151448249817,
0.13385415077209473,
-0.33383840322494507,
0.36051735281944275,
0.38806816935539246,
0.1298401653766632,
-0.096927210688591,
-0.21269504725933075,
-0.19485154747962952,
0.14956261217594147,
0.36893230676651,
0.17512039840221405,
0.6095551252365112,
0.19070975482463837,
0.1394045501947403,
-0.016988031566143036,
-0.02497808262705803,
-0.003059547394514084,
0.062440820038318634,
0.30445289611816406,
0.2651797831058502,
0.17454424500465393,
0.33301135897636414,
0.03594342619180679,
-0.09668415039777756,
-0.27451586723327637,
0.3312295377254486,
0.1900404393672943,
-0.38681739568710327,
0.206656351685524,
-0.45298048853874207,
0.19861763715744019,
-0.12597113847732544,
-0.18392375111579895,
-0.01222940068691969,
-0.4596298933029175,
-0.3597833216190338,
0.3552776575088501,
-0.13707886636257172,
0.11161939799785614,
-0.35067087411880493,
-0.23193344473838806,
0.05945982784032822,
-0.06344440579414368,
-0.05401534587144852,
-0.4144245386123657,
-0.300696462392807,
-0.21743513643741608,
0.0749051421880722,
0.01642879843711853,
0.08432529121637344,
0.1702679544687271,
-0.4421917796134949,
-0.3615204691886902,
-0.2066950798034668,
0.05157479643821716,
0.0009290585294365883,
0.19155944883823395,
-0.18752814829349518,
0.01085895299911499,
-0.09921135008335114,
0.143227219581604,
0.2520485520362854,
-0.027068041265010834,
-0.05598302558064461,
0.022304385900497437,
0.029901720583438873,
-0.3769029974937439,
-0.1283242255449295,
-0.24457433819770813,
-0.2589172124862671,
-0.2124147117137909,
0.19151782989501953,
-0.14359761774539948,
0.27310851216316223,
-0.041984397917985916,
0.025126565247774124,
-0.1753607839345932,
0.032125119119882584,
0.0983661562204361,
-0.34466058015823364,
0.04897169768810272,
0.11147324740886688,
-0.09362317621707916,
-0.009173305705189705,
-0.1713203340768814,
0.0817953422665596,
0.051847051829099655,
0.2609020471572876,
-0.4275144636631012,
-0.19959357380867004,
-0.16942764818668365,
0.38043510913848877,
-0.18621017038822174,
0.20628848671913147,
0.4279334843158722,
0.2794992923736572,
0.07661867886781693,
-0.28331753611564636,
-0.5095665454864502,
0.2173764407634735,
0.11621488630771637,
0.03631136566400528,
0.07607686519622803,
0.2567773759365082,
0.005189821124076843,
0.2989523410797119,
0.4018958806991577,
-0.193274587392807,
0.1335030198097229,
-0.06880085170269012,
0.11448756605386734,
0.018821191042661667,
-0.34145256876945496,
-0.002738337963819504,
-0.026522822678089142,
-0.326626181602478,
0.02099701389670372,
-0.007896138355135918,
-0.3057970404624939,
0.09154336154460907,
0.1794181764125824,
-0.4391363263130188,
-0.22499987483024597,
-0.2314828783273697,
0.0998133048415184,
0.2449023276567459,
0.18407800793647766,
0.32713714241981506,
-0.28062474727630615,
0.07613489776849747,
0.26877719163894653,
-0.09431111812591553,
0.008554507046937943,
-0.09798090159893036,
-0.17427995800971985,
-0.2644246518611908,
-0.3419572114944458,
0.33397096395492554,
0.15741631388664246,
0.41717326641082764,
-0.0872916579246521,
-0.274536669254303,
-0.07676300406455994,
0.2728009819984436,
0.6902691125869751,
-0.38460901379585266,
-0.008143916726112366,
0.1636873334646225,
-0.22649484872817993,
-0.1628563404083252,
-0.12408633530139923,
-0.1135963648557663,
0.3296022415161133,
0.3787417411804199,
0.336773544549942,
-0.0860222652554512,
-0.10798569023609161,
0.023850392550230026,
0.013043567538261414,
-0.06972561031579971,
-0.24391117691993713,
-0.15750205516815186,
-0.11026901006698608,
-0.10627731680870056,
0.10054264962673187,
-0.02017604187130928,
0.07695921510457993,
-0.14378468692302704,
-0.28759822249412537,
-0.23418399691581726,
-0.24000105261802673,
0.22387120127677917,
0.00709833949804306,
0.3196587860584259,
0.07650905102491379,
0.1699950098991394,
0.18530896306037903,
0.03935305029153824,
0.35033729672431946,
0.3700484037399292,
-0.007611934095621109,
-0.26464396715164185,
-0.10882943868637085,
-0.02213125303387642,
0.3677254021167755,
0.19673588871955872,
0.05035488307476044,
-0.07152172923088074,
-0.14509953558444977,
0.22888275980949402,
-0.35638460516929626,
-0.01144237071275711,
0.24068070948123932,
0.16978120803833008,
-0.336238294839859,
-0.22236207127571106,
0.33021846413612366,
0.22288812696933746,
-0.4029877185821533,
0.636753499507904,
-0.10057045519351959,
-0.34368741512298584,
0.26373156905174255,
0.08471125364303589,
0.7401434779167175,
-0.05073816329240799,
-0.07181601226329803,
-0.06378971040248871,
-0.06284350156784058,
0.08493484556674957,
0.06619589030742645,
0.12153567373752594,
-0.3118433952331543,
-0.35213175415992737,
-0.050457973033189774,
-0.11154084652662277,
0.14156977832317352,
0.07076874375343323,
-0.15405723452568054,
0.2893168330192566,
0.014265745878219604,
0.2638320028781891,
0.029943235218524933,
-0.1149764135479927,
0.16464316844940186,
-0.24405820667743683,
-0.04802323877811432,
-0.0006364993751049042,
-0.023622389882802963,
0.054281238466501236,
-0.05561577528715134,
0.045296069234609604,
-0.1582537591457367,
0.008523456752300262,
-0.12809191644191742,
-0.08269068598747253,
-0.5457926988601685,
0.37530457973480225,
0.015167893841862679,
-0.1662636399269104,
0.07270537316799164,
0.29053494334220886,
0.16165465116500854,
0.11152491718530655,
-0.16588492691516876,
0.06140988692641258,
0.29959145188331604,
0.33196696639060974,
0.1942473202943802,
-0.1261816769838333,
0.04487118870019913,
0.2756675183773041,
-0.41547244787216187,
0.04984327405691147,
-0.041305359452962875,
0.14382000267505646,
-0.08918727189302444,
0.02778647094964981,
0.010927221737802029,
-0.196149542927742,
0.0714789405465126,
0.17221768200397491,
0.17019546031951904,
-0.3306872844696045,
-0.02277771383523941,
0.25536614656448364,
-0.12670394778251648,
0.6503556370735168,
-0.20819327235221863,
-0.4529479146003723,
-0.12220051884651184,
0.36969658732414246,
0.00875156931579113,
0.20383310317993164,
0.2584493160247803,
0.0015102550387382507,
-0.17857375741004944,
-0.13457712531089783,
0.10475524514913559,
-0.48538994789123535,
0.12558411061763763,
0.17352257668972015,
-0.25738224387168884,
0.10916799306869507,
-0.2187325358390808,
-0.06554937362670898,
-0.2754349112510681,
0.17389914393424988,
-0.16845330595970154,
-0.4918147325515747,
-0.29696008563041687,
0.010329796001315117,
-0.0691164880990982,
0.2000957578420639,
0.05453789234161377,
-0.07744885236024857,
-0.23873838782310486,
0.28907328844070435,
-0.1617112010717392,
-0.05358362942934036,
0.0003320947289466858,
0.20173333585262299,
0.3523816168308258,
0.3472467362880707,
-0.04317859187722206,
-0.3646465539932251,
0.039651058614254,
0.12949512898921967,
0.02047773078083992,
-0.0478280633687973,
-0.23661036789417267,
0.20436836779117584,
-0.04161514714360237,
0.020357750356197357,
0.030892081558704376,
-0.19237945973873138,
0.14105971157550812,
-0.3336057662963867,
0.2383660227060318,
0.3599640429019928,
-0.21202073991298676,
0.3447701334953308,
0.19394716620445251,
0.0423760712146759,
0.043050616979599,
0.19487504661083221,
-0.11338106542825699,
-0.05450398102402687,
0.18694481253623962,
0.49162518978118896,
0.33071067929267883,
0.1579645872116089,
-0.0457458570599556,
-0.22906729578971863,
-0.16173739731311798,
0.01183277741074562,
0.4408111572265625,
-0.28591498732566833,
0.029314465820789337,
0.6418352723121643,
0.07937265932559967,
-0.08232080936431885,
-0.26718106865882874,
0.006325051188468933,
-0.008781496435403824,
0.1612546145915985,
-0.08816511929035187,
-0.1373210847377777,
0.5955939888954163,
0.22597762942314148,
0.03966046869754791,
0.4454430937767029,
0.22847357392311096,
-0.19303332269191742,
-0.26312822103500366,
0.10835124552249908,
0.009701572358608246,
-0.10246652364730835,
0.21070118248462677,
0.28714877367019653,
0.07704555988311768,
0.26282382011413574,
0.10849104821681976,
0.19146761298179626,
0.11038786172866821,
0.5869245529174805,
0.40343958139419556,
0.2666608691215515,
0.08257342129945755,
0.028690138831734657,
-0.06668177247047424,
-0.32836809754371643,
0.23162473738193512,
0.025598689913749695,
-0.5226951837539673,
0.10814300179481506,
0.16252091526985168,
0.2508004307746887,
-0.28316935896873474,
-0.174340158700943,
0.010030776262283325,
0.32012462615966797,
-0.34288644790649414,
-0.15194261074066162,
-0.12713868916034698,
-0.03836604952812195,
0.04116646945476532,
-0.02727755531668663,
0.1110863909125328,
-0.13250836730003357,
0.8480552434921265,
0.25969576835632324,
-0.17815375328063965,
-0.4755786955356598,
-0.3180554211139679,
0.18830598890781403,
0.43876516819000244,
-0.4128590226173401,
0.026398146525025368,
-0.011982318013906479,
-0.2705170512199402,
-0.10047046840190887,
0.01951119862496853,
0.41877779364585876,
0.17664676904678345,
-0.10336573421955109,
-0.016054769977927208,
0.32242220640182495,
-0.11059100925922394,
-0.20350514352321625,
0.14349137246608734,
-0.20204780995845795,
0.2362092137336731,
0.21010740101337433,
-0.019963111728429794,
0.010874781757593155,
-0.15774455666542053,
0.2580581307411194,
0.22539134323596954,
-0.48315954208374023,
0.5516542196273804,
-0.05386661738157272,
-0.34037718176841736,
-0.0376458466053009,
-0.050237711519002914,
0.04792758822441101,
-0.1304076910018921,
0.5736386775970459,
-0.06705734133720398,
0.2939422130584717,
-0.08101220428943634,
-0.01717090792953968,
0.025525934994220734,
0.1136024221777916,
0.07263126969337463,
-0.2183569371700287,
-0.4334840774536133,
0.053540393710136414,
-0.3399921655654907,
0.14727002382278442,
-0.2330610305070877,
-0.049836792051792145,
-0.04473022371530533,
0.23417454957962036,
-0.08368808776140213,
0.050053682178258896,
0.4345478117465973,
-0.11061763018369675,
0.27675217390060425,
0.542506217956543,
-0.33700719475746155,
-0.17609980702400208,
-0.49057096242904663,
-0.2936343550682068,
0.194915309548378,
-0.3812665641307831,
0.3425144851207733,
-0.056202732026576996,
-0.0022916868329048157,
-0.2948168218135834,
0.1076584905385971,
-0.10958889871835709,
-0.2525510787963867,
0.5578663349151611,
0.34866631031036377,
0.26537346839904785,
-0.08427861332893372,
0.04487708956003189,
0.05938449129462242,
-0.0052610598504543304,
-0.24481524527072906,
0.054170943796634674,
-0.3595515787601471,
0.4696041941642761,
-0.2648372948169708,
-0.21702080965042114,
-0.06766049563884735,
-0.028621481731534004,
0.17721596360206604,
-0.12665051221847534,
-0.29523739218711853,
-0.0040254369378089905,
-0.22649675607681274,
0.1719791442155838,
0.03309076279401779,
0.2708493769168854,
0.08124013245105743,
0.23166054487228394,
-0.1681220531463623,
-0.37550705671310425,
0.372430682182312,
-0.35769495368003845,
-0.47016143798828125,
-0.5362527370452881,
0.2839357256889343,
-0.04547811299562454,
-0.10880829393863678,
-0.30145853757858276,
-0.26413804292678833,
0.4097033441066742,
-0.2291336953639984,
-0.42861565947532654,
0.06979820132255554,
-0.0770396962761879,
-0.04243933781981468,
0.0142274871468544,
0.11767908930778503,
0.1152326837182045,
-0.1443515121936798,
0.4914076626300812,
-0.03415418416261673
] |
https://github.com/huggingface/datasets/issues/6584 | @lhoestq
```
Traceback (most recent call last):
File "/home/dongzf/miniconda3/envs/dataset_ai/lib/python3.11/runpy.py", line 198, in _run_module_as_main
return _run_code(code, main_globals, None,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dongzf/miniconda3/envs/dataset_ai/lib/python3.11/runpy.py", line 88, in _run_code
exec(code, run_globals)
File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module>
cli.main()
File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
run()
File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
runpy.run_path(target, run_name="__main__")
File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path
return _run_module_code(code, init_globals, run_name,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
exec(code, run_globals)
File "/mnt/sda/code/dataset_ai/dataset_ai/example/test.py", line 83, in <module>
data = xnumpy_fromfile(current_dir, download_config=config,dtype=numpy.float32,)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/sda/code/dataset_ai/dataset_ai/src/datasets/download/streaming_download_manager.py", line 765, in xnumpy_fromfile
return np.fromfile(xopen(filepath_or_buffer, "rb", download_config=download_config).read(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: embedded null byte
``` | np.fromfile not supported | How to do np.fromfile to use it like np.load
```python
def xnumpy_fromfile(filepath_or_buffer, *args, download_config: Optional[DownloadConfig] = None, **kwargs):
import numpy as np
if hasattr(filepath_or_buffer, "read"):
return np.fromfile(filepath_or_buffer, *args, **kwargs)
else:
filepath_or_buffer = str(filepath_or_buffer)
return np.fromfile(xopen(filepath_or_buffer, "rb", download_config=download_config).read(), *args, **kwargs)
```
this is not work
| 105 | np.fromfile not supported
How to do np.fromfile to use it like np.load
```python
def xnumpy_fromfile(filepath_or_buffer, *args, download_config: Optional[DownloadConfig] = None, **kwargs):
import numpy as np
if hasattr(filepath_or_buffer, "read"):
return np.fromfile(filepath_or_buffer, *args, **kwargs)
else:
filepath_or_buffer = str(filepath_or_buffer)
return np.fromfile(xopen(filepath_or_buffer, "rb", download_config=download_config).read(), *args, **kwargs)
```
this is not work
@lhoestq
```
Traceback (most recent call last):
File "/home/dongzf/miniconda3/envs/dataset_ai/lib/python3.11/runpy.py", line 198, in _run_module_as_main
return _run_code(code, main_globals, None,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dongzf/miniconda3/envs/dataset_ai/lib/python3.11/runpy.py", line 88, in _run_code
exec(code, run_globals)
File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module>
cli.main()
File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
run()
File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
runpy.run_path(target, run_name="__main__")
File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path
return _run_module_code(code, init_globals, run_name,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/home/dongzf/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
exec(code, run_globals)
File "/mnt/sda/code/dataset_ai/dataset_ai/example/test.py", line 83, in <module>
data = xnumpy_fromfile(current_dir, download_config=config,dtype=numpy.float32,)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/sda/code/dataset_ai/dataset_ai/src/datasets/download/streaming_download_manager.py", line 765, in xnumpy_fromfile
return np.fromfile(xopen(filepath_or_buffer, "rb", download_config=download_config).read(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: embedded null byte
``` | [
-0.17793172597885132,
-0.15880124270915985,
-0.05569717288017273,
0.12712755799293518,
0.36935845017433167,
-0.17062661051750183,
0.31794315576553345,
0.3332071900367737,
0.26488226652145386,
0.1581835001707077,
-0.04350850731134415,
0.40969303250312805,
0.08633576333522797,
0.3399331569671631,
0.11457675695419312,
-0.12579527497291565,
-0.1291278898715973,
0.2135966420173645,
0.26952293515205383,
0.0920061394572258,
-0.4582267999649048,
0.29106199741363525,
-0.15148983895778656,
0.23194420337677002,
0.11535000801086426,
-0.14217618107795715,
0.19686637818813324,
0.4493582248687744,
-0.2380470335483551,
-0.27301305532455444,
0.17876353859901428,
-0.2360306978225708,
0.30034342408180237,
0.1283111870288849,
-0.00010223464050795883,
0.14951181411743164,
0.25511160492897034,
-0.0920022651553154,
-0.10412002354860306,
-0.419685035943985,
0.5573023557662964,
-0.13144299387931824,
0.2643290162086487,
-0.30971598625183105,
-0.20096135139465332,
-0.2077960968017578,
0.026092899963259697,
-0.13247600197792053,
0.4913041293621063,
0.27381253242492676,
0.21719972789287567,
0.5509709119796753,
0.43281182646751404,
-0.2116941213607788,
0.10725995153188705,
-0.0631960928440094,
-0.10853724181652069,
0.31375643610954285,
0.4199593961238861,
-0.08465764671564102,
0.27570268511772156,
-0.09330013394355774,
-0.2159658521413803,
-0.20217415690422058,
0.16206513345241547,
0.024726487696170807,
0.6670992374420166,
-0.1832498162984848,
-0.28643956780433655,
0.44843536615371704,
-0.11688166856765747,
-0.0411839485168457,
-0.04139627516269684,
-0.20383349061012268,
-0.2405073046684265,
-0.6173346042633057,
0.0642809346318245,
0.1535879373550415,
-0.34208759665489197,
0.2667074203491211,
0.2525641620159149,
-0.060192182660102844,
-0.12065744400024414,
0.27991852164268494,
0.10029730200767517,
-0.10147836804389954,
-0.1878153532743454,
0.10149780660867691,
0.3808545172214508,
0.0574653334915638,
0.07660270482301712,
0.20305439829826355,
0.20154577493667603,
0.059301845729351044,
-0.07734636217355728,
0.19685012102127075,
0.12982270121574402,
-0.17535550892353058,
-0.03847596049308777,
-0.17589980363845825,
0.3307467997074127,
0.05336974933743477,
-0.34251534938812256,
0.23301897943019867,
-0.04229024052619934,
0.317856103181839,
0.17848600447177887,
-0.07463010400533676,
0.0832548439502716,
0.519162654876709,
0.03425052762031555,
-0.14061234891414642,
-0.29112082719802856,
-0.37702298164367676,
-0.24768392741680145,
0.20108072459697723,
0.24315530061721802,
0.11872071027755737,
-0.23895056545734406,
-0.3003348410129547,
0.16785362362861633,
0.05129106342792511,
0.22689618170261383,
0.20876947045326233,
0.2561333179473877,
0.3033464848995209,
0.33553868532180786,
0.07876461744308472,
-0.19130544364452362,
-0.39063242077827454,
-0.13434119522571564,
0.1744059920310974,
-0.24920868873596191,
-0.23898495733737946,
-0.1047743558883667,
-0.15414761006832123,
0.3238731622695923,
0.03407764807343483,
-0.09069540351629257,
-0.18091453611850739,
0.262184739112854,
-0.04750198498368263,
0.10615824162960052,
0.016061492264270782,
0.09481452405452728,
-0.15898221731185913,
0.5132429599761963,
-0.5795819759368896,
-0.06862612068653107,
0.2862568497657776,
-0.3763435184955597,
-0.14202022552490234,
-0.1936493068933487,
0.21585215628147125,
0.1851082146167755,
0.22520720958709717,
-0.0643167570233345,
-0.22686974704265594,
0.0002685748040676117,
-0.2975388467311859,
0.07020261138677597,
-0.3960443437099457,
-0.14174121618270874,
-0.3448600471019745,
0.20255881547927856,
0.17915308475494385,
-0.1375695765018463,
-0.06246519088745117,
0.056566424667835236,
-0.3454098701477051,
0.24631504714488983,
-0.03193558752536774,
-0.28053560853004456,
-0.0015139281749725342,
-0.20970338582992554,
-0.04959319531917572,
0.6083080768585205,
-0.5470092296600342,
-0.1404537856578827,
0.39451929926872253,
-0.28379157185554504,
-0.16560348868370056,
0.20787984132766724,
0.2541908025741577,
-0.11600425839424133,
-0.1459742784500122,
0.12351293861865997,
0.423662006855011,
0.13928183913230896,
-0.16920223832130432,
-0.20358970761299133,
-0.30583539605140686,
-0.2042429894208908,
0.24266697466373444,
-0.17069654166698456,
0.021521644666790962,
0.15231366455554962,
-0.048517610877752304,
0.6023910045623779,
-0.2640919089317322,
-0.2603972554206848,
0.023031972348690033,
0.13188397884368896,
0.10226289927959442,
-0.13586173951625824,
-0.131170853972435,
0.025849739089608192,
0.1336078643798828,
-0.6103296279907227,
-0.31242477893829346,
0.18975397944450378,
0.007811814546585083,
-0.031895022839307785,
-0.03202781453728676,
-0.3838118314743042,
-0.09726357460021973,
0.16245101392269135,
0.2112172544002533,
0.12264396250247955,
-0.07746481895446777,
-0.3067817687988281,
0.22557590901851654,
-0.5752643346786499,
0.185513436794281,
-0.5080645084381104,
0.14136691391468048,
-0.0138405067846179,
-0.26749300956726074,
-0.23234020173549652,
-0.0012589450925588608,
0.2401919662952423,
-0.08092042803764343,
0.07279911637306213,
0.3964519798755646,
0.35428905487060547,
0.01563228666782379,
-0.34450721740722656,
-0.2926371693611145,
0.19022661447525024,
0.1351029872894287,
0.14247387647628784,
0.42357125878334045,
-0.03856123983860016,
0.08963646739721298,
0.000057620927691459656,
0.3551836311817169,
-0.47521403431892395,
-0.06231921166181564,
0.38147324323654175,
0.19716888666152954,
0.1978565901517868,
-0.09924746304750443,
-0.007767859846353531,
0.04974859952926636,
0.33421286940574646,
0.4071531295776367,
0.20428496599197388,
-0.20864291489124298,
-0.18664759397506714,
-0.2407771348953247,
0.3229544460773468,
0.09730614721775055,
0.1260099709033966,
-0.16866694390773773,
-0.058529939502477646,
0.11390066146850586,
-0.2809091806411743,
0.043084144592285156,
0.011366434395313263,
0.1656685471534729,
-0.13938552141189575,
0.17368267476558685,
0.16769151389598846,
-0.23414011299610138,
0.051813431084156036,
-0.13010689616203308,
0.24413177371025085,
0.21796730160713196,
-0.20846952497959137,
-0.2167353332042694,
-0.10853558778762817,
0.03217196464538574,
-0.23123593628406525,
0.032263658940792084,
-0.15929965674877167,
0.05005528777837753,
-0.1273975670337677,
-0.3202100992202759,
-0.16036124527454376,
-0.0715656653046608,
0.33219510316848755,
0.0336516872048378,
-0.25482261180877686,
0.21137194335460663,
0.13697002828121185,
-0.046112194657325745,
0.011093996465206146,
-0.3119087815284729,
0.09630110114812851,
-0.4849742352962494,
0.1926461160182953,
0.16140857338905334,
-0.18762366473674774,
0.13829372823238373,
0.2422204464673996,
-0.0298178531229496,
0.024595478549599648,
-0.2917923331260681,
-0.1954127550125122,
0.005427191033959389,
-0.04498746246099472,
0.1200321614742279,
0.20907153189182281,
0.24787499010562897,
0.19184660911560059,
0.004726465791463852,
-0.22632962465286255,
-0.08305974304676056,
0.1780305802822113,
-0.43856358528137207,
-0.09090320765972137,
0.10164818167686462,
0.050149474292993546,
-0.023792890831828117,
-0.1770325005054474,
-0.35804763436317444,
-0.3905452787876129,
-0.5255942940711975,
0.3343174457550049,
0.39167433977127075,
0.17071294784545898,
0.3251967132091522,
0.07246316224336624,
0.26919305324554443,
0.16369077563285828,
0.025443334132432938,
0.11664039641618729,
-0.16547971963882446,
0.1278609037399292,
-0.253319650888443,
-0.27915289998054504,
-0.056844767183065414,
0.03503798693418503,
-0.19225622713565826,
0.009336616843938828,
-0.05711446329951286,
-0.4918099343776703,
0.15484458208084106,
0.26688286662101746,
0.05512958765029907,
0.1030053049325943,
0.4054703116416931,
0.13293565809726715,
-0.14342236518859863,
-0.011798098683357239,
0.11136656999588013,
0.32684364914894104,
-0.018923325464129448,
0.011626124382019043,
0.4046143889427185,
0.31188294291496277,
-0.007161937654018402,
0.10838223993778229,
0.3209652304649353,
-0.014667626470327377,
0.5507137179374695,
-0.08446038514375687,
0.34821996092796326,
-0.19884397089481354,
-0.09537924826145172,
-0.28029924631118774,
-0.05189526081085205,
-0.11334320902824402,
0.07123943418264389,
-0.050129324197769165,
0.0775327980518341,
-0.38134729862213135,
-0.3082020580768585,
-0.2793189287185669,
0.007565245032310486,
-0.22993265092372894,
0.401363730430603,
0.1600918173789978,
-0.37700361013412476,
0.12381445616483688,
0.005258936434984207,
0.09371835738420486,
0.12286164611577988,
0.2419227957725525,
0.2923811376094818,
0.007066961377859116,
-0.31339478492736816,
-0.11844173073768616,
-0.10492405295372009,
0.3330603539943695,
-0.022483527660369873,
-0.058926910161972046,
0.06213440001010895,
-0.23572155833244324,
0.10236905515193939,
-0.1786496341228485,
0.43102577328681946,
0.3813733160495758,
0.15543676912784576,
0.2824917733669281,
-0.19534248113632202,
-0.38842278718948364,
-0.04770251736044884,
-0.07161150872707367,
0.07451409846544266,
0.26274165511131287,
0.34377846121788025,
-0.16169244050979614,
0.10827314853668213,
0.0983874499797821,
0.33195123076438904,
-0.1095246821641922,
-0.007057391107082367,
-0.3217768669128418,
-0.33553850650787354,
-0.22284752130508423,
-0.19978290796279907,
0.014134034514427185,
0.40090101957321167,
0.04264979809522629,
0.20483513176441193,
0.11523974686861038,
-0.10546933114528656,
-0.0015389062464237213,
-0.16419333219528198,
0.5238053202629089,
-0.1333312690258026,
-0.23581819236278534,
0.0157820712774992,
0.3004288971424103,
-0.14917109906673431,
0.4085143804550171,
-0.16369953751564026,
-0.3256951570510864,
-0.04598696529865265,
-0.01599523425102234,
-0.019422397017478943,
0.18935555219650269,
-0.024980029091238976,
-0.074813112616539,
0.04000503569841385,
-0.03513849899172783,
0.36482957005500793,
-0.01177675649523735,
0.2603280544281006,
-0.11701460927724838,
0.20770356059074402,
-0.3484600782394409,
0.47743844985961914,
0.05948902666568756,
0.1667812168598175,
0.28489625453948975,
-0.046615712344646454,
-0.1969514936208725,
0.14558805525302887,
0.05898671597242355,
0.5934922695159912,
-0.029864680022001266,
-0.0073331790044903755,
0.6051344871520996,
0.03721719980239868,
0.24727162718772888,
-0.25942373275756836,
0.19127939641475677,
-0.4065625071525574,
-0.21806345880031586,
-0.028920531272888184,
-0.3164665102958679,
0.13568679988384247,
0.03208796679973602,
-0.14020246267318726,
0.265961229801178,
-0.3941226005554199,
-0.09044710546731949,
0.0263131782412529,
0.22932939231395721,
0.008379893377423286,
0.09866015613079071,
-0.40682798624038696,
0.0546342097222805,
-0.021191101521253586,
0.013672498986124992,
-0.06272734701633453,
-0.3343020975589752,
0.07827229797840118,
-0.06258079409599304,
0.20130670070648193,
0.18001732230186462,
-0.30016860365867615,
0.19741696119308472,
0.06982181966304779,
-0.21560344099998474,
-0.3801981806755066,
0.5649957060813904,
0.3375896215438843,
-0.10242283344268799,
0.020109063014388084,
-0.013865494169294834,
0.002548675984144211,
-0.3058716952800751,
0.013076059520244598,
0.19428278505802155,
0.5013838410377502,
-0.19969478249549866,
-0.008630350232124329,
0.34943440556526184,
-0.028247013688087463,
-0.32091987133026123,
-0.11653155088424683,
-0.13465501368045807,
0.08135263621807098,
-0.15175780653953552,
-0.24045425653457642,
-0.08764784038066864,
-0.18936559557914734,
-0.2002497911453247,
0.16990257799625397,
-0.020763084292411804,
-0.19015176594257355,
-0.091011181473732,
-0.045567821711301804,
-0.11433430016040802,
0.04761715233325958,
-0.049512218683958054,
-0.036474429070949554,
0.1828930377960205,
0.34517329931259155,
0.2848605513572693,
-0.14555495977401733,
-0.16589272022247314,
-0.016656406223773956,
-0.022826462984085083,
0.055318593978881836,
0.3532012104988098,
0.31139612197875977,
0.281380832195282,
0.03507448360323906,
0.25412213802337646,
0.09137687087059021,
0.1446179300546646,
-0.08560238033533096,
-0.2027968168258667,
-0.3206574320793152,
0.03653678297996521,
-0.04710749536752701,
-0.03979703038930893,
0.35577595233917236,
0.14083799719810486,
0.08524150401353836,
-0.2569182217121124,
-0.3384056091308594,
0.24378767609596252,
-0.018986668437719345,
-0.16379958391189575,
0.4085610508918762,
-0.18763932585716248,
-0.0952555239200592,
0.2426835298538208,
0.25983649492263794,
-0.18598052859306335,
-0.21354010701179504,
-0.22461500763893127,
-0.07231815904378891,
0.06533090770244598,
-0.09367042779922485,
-0.25531843304634094,
0.2546628713607788,
-0.43627482652664185,
-0.23880308866500854,
-0.11214929074048996,
0.06076483428478241,
0.02670038491487503,
-0.04460429400205612,
0.26465293765068054,
0.1191219836473465,
0.236186683177948,
-0.12531767785549164,
0.3446555733680725,
-0.3337306082248688,
0.16332927346229553,
-0.2247311919927597,
-0.036169975996017456,
-0.02964639663696289,
-0.09476593881845474,
-0.5129696726799011,
-0.09875135123729706,
0.18602769076824188,
-0.08531935513019562,
0.38745588064193726,
-0.09229940176010132,
-0.16837593913078308,
-0.16987541317939758,
0.28911346197128296,
0.13870859146118164,
-0.2153160274028778,
0.3822225332260132,
0.013618439435958862,
0.27204179763793945,
-0.361816942691803,
0.16025662422180176,
0.03915109112858772,
-0.15210631489753723,
0.08665917813777924,
0.17254972457885742,
0.09911875426769257,
-0.341788649559021,
0.20571765303611755,
0.09607633948326111,
0.24726465344429016,
-0.2656354010105133,
-0.12816131114959717,
0.6889211535453796,
0.1687089204788208,
-0.1431271731853485,
0.08528097718954086,
0.07853126525878906,
0.335976243019104,
0.35549232363700867,
-0.42238447070121765,
-0.05185813456773758,
0.013680996373295784,
-0.0024069789797067642,
-0.05663452669978142,
-0.16437000036239624,
-0.02138175442814827,
0.2622295618057251,
-0.1873880922794342,
-0.1721307337284088,
-0.1873750537633896,
0.2522646188735962,
-0.22492079436779022,
0.4340990483760834,
-0.20988212525844574,
0.39362770318984985,
-0.08456988632678986,
-0.14200621843338013,
-0.21168985962867737,
-0.26911941170692444,
0.003974393010139465,
0.011493772268295288,
0.08453148603439331,
0.06009027361869812,
-0.460464745759964,
0.21548248827457428,
-0.14361995458602905,
0.16445758938789368,
0.15575635433197021,
-0.02946038916707039,
0.027833180502057076,
-0.33022341132164,
0.08279909938573837,
0.2952633202075958,
0.386748731136322,
-0.05103762447834015,
0.07460395991802216,
0.37763169407844543,
0.3395847678184509,
-0.27781665325164795,
-0.25091224908828735,
-0.02777162380516529,
-0.10259711742401123,
-0.016649968922138214,
-0.15488432347774506,
0.15769831836223602,
0.3974829912185669,
0.30693143606185913,
0.23214402794837952,
-0.2775309085845947,
-0.03298060595989227,
-0.13995742797851562,
0.19580085575580597,
-0.2012869268655777,
0.47412243485450745,
0.07461026310920715,
-0.2701053023338318,
-0.28366202116012573,
-0.07438191771507263,
-0.4485670328140259,
0.28675809502601624,
0.13793939352035522,
0.2866939306259155,
0.13875867426395416,
0.1890069544315338,
0.14344368875026703,
-0.21314163506031036,
-0.2180728018283844,
0.1520557403564453,
-0.008898714557290077,
-0.14735011756420135,
-0.06316260248422623,
-0.46298760175704956,
0.24532777070999146,
0.3583851754665375,
-0.6251113414764404,
-0.03208398446440697,
-0.04353739321231842,
0.16535837948322296,
-0.04440082237124443,
-0.014278769493103027,
-0.18703646957874298,
0.33457380533218384,
0.07790765911340714,
0.002504117786884308,
0.020631683990359306,
0.14747227728366852,
0.05995707958936691,
-0.05169760435819626,
-0.4274790287017822,
0.03165988624095917,
-0.07174646854400635,
0.16454234719276428,
-0.30708858370780945,
0.06922218948602676,
0.07759158313274384,
0.30569958686828613,
0.25510960817337036,
0.08082249015569687,
0.01894013211131096,
-0.11268550157546997,
-0.023539312183856964,
0.09874340891838074,
0.15902678668498993,
-0.23316648602485657,
0.022645635530352592,
-0.1863987296819687,
0.16384455561637878,
-0.12545154988765717,
-0.15150800347328186,
-0.5044673681259155,
0.26913517713546753,
-0.18853086233139038,
-0.03804877772927284,
-0.3254348635673523,
-0.15885378420352936,
-0.14111122488975525,
-0.17642085254192352,
0.2813575267791748,
0.11981354653835297,
0.049721427261829376,
-0.02541784942150116,
-0.3050187826156616,
-0.08578585088253021,
0.17071619629859924,
-0.10412261635065079,
-0.07138782739639282,
-0.050647057592868805,
0.14750584959983826,
-0.1497892290353775,
0.08364573866128922,
0.09775520861148834,
0.25072258710861206,
0.46711111068725586,
0.04955516755580902,
0.02232331782579422,
0.09893965721130371,
-0.3244880139827728,
0.17379719018936157,
0.031207643449306488,
-0.259377658367157,
0.18543781340122223,
-0.055893853306770325,
-0.4065796136856079,
-0.22621911764144897
] |
https://github.com/huggingface/datasets/issues/6584 | I used this method to read point cloud data in the script
```python
with open(velodyne_filepath,"rb") as obj:
velodyne_data = numpy.frombuffer(obj.read(), dtype=numpy.float32).reshape([-1, 4])
``` | np.fromfile not supported | How to do np.fromfile to use it like np.load
```python
def xnumpy_fromfile(filepath_or_buffer, *args, download_config: Optional[DownloadConfig] = None, **kwargs):
import numpy as np
if hasattr(filepath_or_buffer, "read"):
return np.fromfile(filepath_or_buffer, *args, **kwargs)
else:
filepath_or_buffer = str(filepath_or_buffer)
return np.fromfile(xopen(filepath_or_buffer, "rb", download_config=download_config).read(), *args, **kwargs)
```
this is not work
| 23 | np.fromfile not supported
How to do np.fromfile to use it like np.load
```python
def xnumpy_fromfile(filepath_or_buffer, *args, download_config: Optional[DownloadConfig] = None, **kwargs):
import numpy as np
if hasattr(filepath_or_buffer, "read"):
return np.fromfile(filepath_or_buffer, *args, **kwargs)
else:
filepath_or_buffer = str(filepath_or_buffer)
return np.fromfile(xopen(filepath_or_buffer, "rb", download_config=download_config).read(), *args, **kwargs)
```
this is not work
I used this method to read point cloud data in the script
```python
with open(velodyne_filepath,"rb") as obj:
velodyne_data = numpy.frombuffer(obj.read(), dtype=numpy.float32).reshape([-1, 4])
``` | [
-0.26546746492385864,
-0.19931796193122864,
-0.07483597099781036,
0.15513744950294495,
0.2779790163040161,
-0.2699272930622101,
0.21601557731628418,
0.22307102382183075,
0.18922102451324463,
0.20724502205848694,
0.07521598786115646,
0.3033961057662964,
0.22715897858142853,
0.43538713455200195,
0.26911595463752747,
-0.14375469088554382,
-0.06807918101549149,
0.08431855589151382,
0.052878350019454956,
0.035888671875,
-0.37577369809150696,
0.323514461517334,
-0.14866909384727478,
0.13237228989601135,
0.13445866107940674,
-0.18322701752185822,
0.1959649622440338,
0.43219903111457825,
-0.13340625166893005,
-0.19001054763793945,
0.20535704493522644,
-0.24196183681488037,
0.20488294959068298,
0.24474504590034485,
-0.00010891222336795181,
0.09626561403274536,
0.1775851845741272,
-0.1528681218624115,
-0.1628773808479309,
-0.2409006506204605,
0.4450203776359558,
-0.08633096516132355,
0.216374933719635,
-0.4087597727775574,
-0.24801968038082123,
-0.06126442551612854,
-0.0061818016692996025,
-0.21908265352249146,
0.45087265968322754,
0.28436028957366943,
0.14892500638961792,
0.453052818775177,
0.3770756125450134,
0.03834345191717148,
-0.04240153729915619,
-0.011329900473356247,
-0.1569978892803192,
0.2819691300392151,
0.5050457715988159,
0.07292735576629639,
0.2645619511604309,
-0.07636088132858276,
-0.35036131739616394,
-0.22358232736587524,
0.3492504358291626,
0.11415879428386688,
0.5681220889091492,
-0.23590895533561707,
-0.32071205973625183,
0.4746730327606201,
0.1257944256067276,
0.080701544880867,
-0.101342111825943,
-0.03622075915336609,
-0.21638371050357819,
-0.36993932723999023,
-0.10578663647174835,
0.239216148853302,
-0.30793696641921997,
0.22246196866035461,
0.17681914567947388,
-0.030639061704277992,
-0.2082318365573883,
0.4509415626525879,
0.07920601963996887,
0.016861148178577423,
-0.17301955819129944,
0.10761009156703949,
0.2501479983329773,
0.00964571163058281,
0.060099486261606216,
0.1664908528327942,
0.16350378096103668,
0.04851894453167915,
-0.005299756303429604,
0.1319010853767395,
-0.0578589029610157,
-0.200669065117836,
0.08217998594045639,
-0.07994034141302109,
0.7466168403625488,
0.1485716998577118,
-0.28956174850463867,
0.3400097191333771,
0.14850297570228577,
0.17685775458812714,
0.0612868033349514,
-0.1212419718503952,
0.3461947739124298,
0.5734533667564392,
0.25580185651779175,
-0.1788904368877411,
-0.22595322132110596,
-0.23446330428123474,
-0.09320338070392609,
0.317087858915329,
0.44200757145881653,
0.020716533064842224,
-0.13733991980552673,
-0.239386647939682,
0.4153718054294586,
0.12385368347167969,
0.2973354756832123,
0.17388927936553955,
0.11575475335121155,
0.38134765625,
0.2945275902748108,
0.09704574197530746,
-0.2133275717496872,
-0.40199682116508484,
-0.07167254388332367,
0.1731773316860199,
-0.05444367974996567,
-0.13300037384033203,
0.08625528216362,
0.0036520734429359436,
0.3598964810371399,
-0.038986071944236755,
0.09308925271034241,
-0.2678678631782532,
0.22173310816287994,
-0.1509189009666443,
0.20680131018161774,
0.039359770715236664,
0.20394745469093323,
-0.2423972189426422,
0.294408917427063,
-0.29293376207351685,
-0.055360548198223114,
0.29290470480918884,
-0.6260541677474976,
-0.18524520099163055,
-0.21707291901111603,
0.15481625497341156,
0.25130048394203186,
0.13885411620140076,
-0.52712482213974,
-0.40666663646698,
-0.043121930211782455,
-0.44824275374412537,
0.027995241805911064,
-0.24974265694618225,
-0.1798294633626938,
-0.3551468551158905,
0.13165482878684998,
0.11529156565666199,
-0.18041962385177612,
0.1401437222957611,
0.04329776018857956,
-0.18384051322937012,
0.3045192062854767,
-0.099378302693367,
-0.19566132128238678,
-0.2680472433567047,
-0.2941347360610962,
0.03871588408946991,
0.5166333317756653,
-0.680370032787323,
-0.017775092273950577,
0.5191072225570679,
-0.2244163304567337,
-0.35039693117141724,
0.23545466363430023,
0.3001861572265625,
-0.13132841885089874,
-0.15178313851356506,
0.1327504813671112,
0.4430803656578064,
0.2158738374710083,
-0.009283848106861115,
-0.004451826214790344,
-0.2226639688014984,
-0.3679255247116089,
0.24467168748378754,
-0.3249710500240326,
0.07349585741758347,
0.22806251049041748,
-0.20989137887954712,
0.53314608335495,
-0.24471427500247955,
-0.08189220726490021,
0.2192976474761963,
0.1841782033443451,
-0.13294367492198944,
-0.07139720022678375,
-0.15764476358890533,
-0.17990805208683014,
0.09706149995326996,
-0.4800347685813904,
-0.3473232388496399,
0.07535035908222198,
-0.07346126437187195,
0.015310186892747879,
-0.05870674550533295,
-0.1639823019504547,
0.017473284155130386,
0.10751419514417648,
0.037713099271059036,
0.14166313409805298,
-0.2564381957054138,
-0.34956076741218567,
-0.01210886798799038,
-0.3823791742324829,
0.16685381531715393,
-0.4069750905036926,
0.23116686940193176,
-0.047034911811351776,
-0.3086971044540405,
-0.09893807023763657,
0.01772565022110939,
0.42632392048835754,
-0.12559953331947327,
-0.03060624748468399,
0.40449681878089905,
0.33511286973953247,
0.10051029920578003,
-0.3393191993236542,
0.17481128871440887,
0.17862336337566376,
0.17504127323627472,
0.12248092144727707,
0.3629966676235199,
0.028832513839006424,
-0.0026389434933662415,
-0.042694613337516785,
0.5198348164558411,
-0.5507766008377075,
-0.036319803446531296,
0.3580939471721649,
0.1776040494441986,
0.1959986537694931,
-0.12467484921216965,
0.023181453347206116,
-0.1071229875087738,
0.15335611999034882,
0.16553722321987152,
0.05844560265541077,
-0.3011470139026642,
-0.2127726674079895,
-0.24178054928779602,
0.16380856931209564,
-0.11622500419616699,
0.16788826882839203,
-0.22428424656391144,
-0.1346018761396408,
0.056024931371212006,
-0.053457699716091156,
-0.030297808349132538,
0.08842697739601135,
0.18642066419124603,
-0.14175960421562195,
0.12313137948513031,
0.4089583158493042,
-0.27550747990608215,
0.03914767503738403,
-0.08512033522129059,
0.22482457756996155,
0.205889493227005,
-0.21872560679912567,
-0.1936292201280594,
-0.12383616715669632,
-0.08442334830760956,
-0.25525516271591187,
-0.07035987079143524,
-0.19301852583885193,
0.049531176686286926,
-0.09247379750013351,
-0.4499662220478058,
-0.14221549034118652,
0.22645437717437744,
0.37345924973487854,
-0.1027679294347763,
-0.3028831481933594,
0.5073546171188354,
0.13490962982177734,
-0.2796339988708496,
0.07035806775093079,
-0.0716044008731842,
0.22534900903701782,
-0.5209082961082458,
-0.18035303056240082,
0.14996406435966492,
-0.14234936237335205,
0.10437898337841034,
0.07579594105482101,
0.1097354143857956,
-0.051683999598026276,
-0.25265124440193176,
-0.03945831209421158,
-0.24469465017318726,
0.08773067593574524,
0.18405839800834656,
0.21685075759887695,
0.49996131658554077,
0.16016703844070435,
0.15638643503189087,
-0.2538023889064789,
0.024713188409805298,
0.07846046984195709,
-0.5074639916419983,
-0.12011846899986267,
0.15883027017116547,
-0.14868399500846863,
-0.1542847454547882,
-0.14621125161647797,
-0.1903148889541626,
-0.3847699463367462,
-0.37897711992263794,
0.09784571826457977,
0.3560131788253784,
0.23542693257331848,
0.10670644044876099,
-0.004464946687221527,
0.1434135138988495,
0.36096644401550293,
0.03070048987865448,
0.08300506323575974,
-0.2734803855419159,
0.18088504672050476,
-0.3310181498527527,
-0.39075320959091187,
0.07739429175853729,
0.07782943546772003,
-0.020941516384482384,
-0.009938068687915802,
-0.1488022357225418,
-0.6850120425224304,
0.01992584951221943,
0.4037059247493744,
-0.06692539155483246,
0.1005530133843422,
0.42877086997032166,
0.0004537925124168396,
-0.10924480855464935,
-0.08239061385393143,
0.13593991100788116,
0.08914276957511902,
0.32848483324050903,
0.0007528625428676605,
0.4041387140750885,
0.10343562066555023,
-0.03165026009082794,
-0.06272141635417938,
0.1594822108745575,
-0.1222139224410057,
0.5661975741386414,
-0.32952648401260376,
-0.003487236797809601,
-0.17196772992610931,
0.003471851348876953,
-0.10514991730451584,
-0.18174020946025848,
-0.1335451453924179,
-0.018653683364391327,
-0.0012648198753595352,
0.11289381980895996,
-0.44251590967178345,
-0.35863834619522095,
-0.48949432373046875,
-0.022565528750419617,
-0.27196550369262695,
0.46014273166656494,
0.204166978597641,
-0.28889942169189453,
0.10157501697540283,
-0.025754403322935104,
-0.12163745611906052,
0.040045369416475296,
0.26063403487205505,
0.31482744216918945,
-0.004101000726222992,
-0.04485375061631203,
-0.13311168551445007,
-0.22923380136489868,
0.4939444065093994,
-0.05155419185757637,
-0.12199211120605469,
0.04675087332725525,
-0.03744448348879814,
0.10564365983009338,
-0.2650052309036255,
0.46784263849258423,
0.18776045739650726,
0.2537241578102112,
0.1204816997051239,
-0.1372065544128418,
-0.324761301279068,
0.02365073561668396,
-0.11069627851247787,
-0.12628096342086792,
0.28580281138420105,
0.4510369300842285,
-0.10791211575269699,
0.03702830150723457,
0.05431168153882027,
0.3244098722934723,
-0.12346912175416946,
0.15757112205028534,
-0.23092003166675568,
-0.46823596954345703,
-0.2297275960445404,
-0.21702687442302704,
0.06931019574403763,
0.36676469445228577,
0.12291155010461807,
-0.033915597945451736,
0.1580430120229721,
-0.08074251562356949,
-0.09841905534267426,
-0.11644881963729858,
0.4655033051967621,
-0.22316795587539673,
-0.29714053869247437,
0.10773637890815735,
0.3522282838821411,
0.20742788910865784,
0.4629148244857788,
0.38699495792388916,
-0.005059625953435898,
0.056694455444812775,
-0.03184074908494949,
-0.015427462756633759,
0.14539992809295654,
-0.08185724914073944,
-0.20184382796287537,
0.058172501623630524,
0.13960136473178864,
0.2656700313091278,
-0.06785662472248077,
0.11220064759254456,
-0.07902209460735321,
0.12129529565572739,
-0.35836851596832275,
0.3639809787273407,
0.18780472874641418,
0.1209162175655365,
0.03138912469148636,
-0.10939909517765045,
-0.17280498147010803,
0.45332661271095276,
0.19820931553840637,
0.656170666217804,
0.027672331780195236,
-0.0021610725671052933,
0.6561883687973022,
0.19518838822841644,
0.09565231204032898,
-0.5075036883354187,
0.1984119564294815,
-0.32743293046951294,
-0.08893914520740509,
-0.1948167383670807,
-0.23308907449245453,
0.17622441053390503,
0.19546130299568176,
-0.280650794506073,
0.3953736126422882,
-0.3501790165901184,
-0.21979503333568573,
-0.1778540015220642,
0.2369270920753479,
-0.0872369259595871,
-0.05491184443235397,
-0.1298656463623047,
0.011674679815769196,
-0.14271658658981323,
0.07754272222518921,
-0.002078048884868622,
-0.281934916973114,
-0.02285180240869522,
-0.15839064121246338,
0.2183845490217209,
0.20504575967788696,
-0.22260409593582153,
0.26690077781677246,
-0.2009091079235077,
-0.11672322452068329,
-0.49620112776756287,
0.6723939180374146,
0.29481956362724304,
-0.09196151793003082,
-0.07974488288164139,
0.08378106355667114,
0.13418550789356232,
-0.2444887012243271,
-0.10864827036857605,
0.031593527644872665,
0.2736097276210785,
-0.28187626600265503,
-0.10713185369968414,
0.09958784282207489,
-0.008992336690425873,
-0.33443135023117065,
-0.16081379354000092,
-0.15327931940555573,
-0.06664514541625977,
-0.19630089402198792,
-0.24341709911823273,
-0.09104195982217789,
-0.3576379716396332,
-0.12852506339550018,
0.12608596682548523,
-0.00560370460152626,
-0.18307608366012573,
-0.14295797049999237,
0.3956573009490967,
-0.007008589804172516,
0.03763116896152496,
0.25583547353744507,
0.03946531563997269,
-0.03549093380570412,
0.24095962941646576,
0.08799004554748535,
-0.04110873118042946,
-0.2153070569038391,
0.07050032913684845,
0.03415866196155548,
0.009237810969352722,
0.252244770526886,
0.4386003017425537,
0.252199649810791,
0.21661052107810974,
0.462119460105896,
0.019978245720267296,
0.29946190118789673,
-0.11423581838607788,
-0.4455297887325287,
-0.17901074886322021,
0.15856775641441345,
0.08851780742406845,
-0.06635027378797531,
0.4445619583129883,
-0.010577904060482979,
-0.10548371076583862,
-0.24503383040428162,
-0.29089677333831787,
0.20592889189720154,
-0.00958484411239624,
-0.16407938301563263,
0.5768635869026184,
-0.13253670930862427,
-0.12850266695022583,
0.1627444475889206,
0.19673962891101837,
-0.140711709856987,
-0.11191496253013611,
-0.16056516766548157,
-0.06883492320775986,
0.11421684920787811,
-0.0592644102871418,
-0.25470635294914246,
0.027906130999326706,
-0.39537274837493896,
-0.3457571268081665,
-0.10037735104560852,
0.17097406089305878,
-0.019595623016357422,
-0.02489718422293663,
0.2554399371147156,
-0.00942782498896122,
0.26532143354415894,
-0.2613362967967987,
0.3536728620529175,
-0.35523778200149536,
0.18620096147060394,
-0.32984209060668945,
-0.01345716044306755,
-0.003862142562866211,
-0.12865446507930756,
-0.36204105615615845,
-0.14925798773765564,
0.20529843866825104,
-0.0599246546626091,
0.5130007266998291,
-0.09716528654098511,
-0.15921062231063843,
-0.32558169960975647,
0.23850597441196442,
0.10403521358966827,
-0.18411216139793396,
0.32041600346565247,
-0.06861941516399384,
0.23509731888771057,
-0.2462814450263977,
0.03490332141518593,
0.0015042442828416824,
-0.05965384840965271,
0.11437900364398956,
0.20189169049263,
0.20940923690795898,
-0.2049885094165802,
0.03462895005941391,
-0.010693259537220001,
0.3378753364086151,
-0.32330575585365295,
-0.11591547727584839,
0.5376895666122437,
0.12504002451896667,
-0.10444603860378265,
0.020755546167492867,
0.10019834339618683,
0.3018823564052582,
0.5084912776947021,
-0.36540693044662476,
0.07075349986553192,
0.2903735339641571,
0.2598414421081543,
-0.1315014362335205,
-0.18510478734970093,
0.09102697670459747,
0.14053218066692352,
-0.2540823519229889,
-0.029498301446437836,
-0.046827465295791626,
0.04402836784720421,
-0.19252434372901917,
0.3532586395740509,
-0.33795297145843506,
0.44157060980796814,
-0.09025144577026367,
-0.08346040546894073,
-0.506597101688385,
-0.14648883044719696,
0.17531755566596985,
-0.06631018221378326,
0.12208519130945206,
0.07014110684394836,
-0.4592408239841461,
0.32974106073379517,
-0.12182766199111938,
0.25087064504623413,
0.060612112283706665,
0.015269646421074867,
0.1983422040939331,
-0.16452249884605408,
-0.0007612742483615875,
0.23819293081760406,
0.5214352011680603,
-0.031605254858732224,
-0.020603353157639503,
0.39519667625427246,
0.3484560549259186,
-0.14474913477897644,
-0.028455043211579323,
0.01258944347500801,
-0.2245146632194519,
-0.015219669789075851,
-0.19171705842018127,
0.2617094814777374,
0.4211971163749695,
0.35294830799102783,
0.21108373999595642,
-0.12762093544006348,
0.11951850354671478,
-0.20365218818187714,
0.37503665685653687,
-0.1602090299129486,
0.25860920548439026,
0.0656353235244751,
-0.27140143513679504,
-0.40539538860321045,
-0.22006399929523468,
-0.3612903952598572,
0.24878135323524475,
0.15052418410778046,
0.15576408803462982,
0.19242671132087708,
0.30322781205177307,
0.08101917058229446,
-0.15440954267978668,
-0.15543928742408752,
0.17370925843715668,
-0.09513199329376221,
-0.1657179892063141,
-0.03174564242362976,
-0.32538294792175293,
0.1089971587061882,
0.40141651034355164,
-0.5643208026885986,
-0.0653034895658493,
-0.06128763407468796,
0.055763255804777145,
0.06900723278522491,
-0.12535637617111206,
-0.3142315745353699,
0.40196692943573,
0.3554381728172302,
-0.031495414674282074,
-0.1223829984664917,
0.03703634440898895,
0.22308975458145142,
-0.03184571862220764,
-0.4678541421890259,
-0.016567613929510117,
0.07607507705688477,
0.10042930394411087,
-0.2748074233531952,
0.025545969605445862,
-0.046859752386808395,
0.2874101996421814,
0.24773649871349335,
0.0835631713271141,
0.2162768393754959,
-0.2320203185081482,
0.12645083665847778,
0.08433645218610764,
-0.010562965646386147,
-0.15639647841453552,
0.061888813972473145,
-0.16210946440696716,
0.16667631268501282,
0.10382385551929474,
-0.10949592292308807,
-0.5155984163284302,
0.14035044610500336,
-0.40139472484588623,
-0.13422703742980957,
-0.15801411867141724,
-0.028716765344142914,
-0.2701391577720642,
-0.13934877514839172,
0.13484904170036316,
0.048077937215566635,
0.03143104910850525,
-0.13986733555793762,
-0.11665869504213333,
-0.17814192175865173,
0.3199712932109833,
-0.08957800269126892,
0.08359207957983017,
0.06421223282814026,
0.15047648549079895,
-0.358960896730423,
-0.026409339159727097,
0.19777008891105652,
0.25858262181282043,
0.31449735164642334,
0.04161693900823593,
0.03140933811664581,
0.10488535463809967,
-0.2864397168159485,
0.0038055330514907837,
-0.0038380324840545654,
0.018433256074786186,
0.2405998557806015,
-0.2005312293767929,
-0.49389514327049255,
-0.265735924243927
] |
https://github.com/huggingface/datasets/issues/6579 | Hi @haok1402, I have created an issue in the Discussion tab of the corresponding dataset: https://huggingface.co/datasets/eli5/discussions/7
Let's continue the discussion there! | Unable to load `eli5` dataset with streaming | ### Describe the bug
Unable to load `eli5` dataset with streaming.
### Steps to reproduce the bug
This fails with FileNotFoundError: https://files.pushshift.io/reddit/submissions
```
from datasets import load_dataset
load_dataset("eli5", streaming=True)
```
This works correctly.
```
from datasets import load_dataset
load_dataset("eli5")
```
### Expected behavior
- Loading `eli5` dataset should not raise an error under the streaming mode.
- Or at the very least, show a warning that streaming mode is not supported with `eli5` dataset.
### Environment info
- `datasets` version: 2.16.1
- Platform: Linux-6.2.0-39-generic-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.19.4
- PyArrow version: 12.0.1
- Pandas version: 2.0.3
- `fsspec` version: 2023.6.0
| 21 | Unable to load `eli5` dataset with streaming
### Describe the bug
Unable to load `eli5` dataset with streaming.
### Steps to reproduce the bug
This fails with FileNotFoundError: https://files.pushshift.io/reddit/submissions
```
from datasets import load_dataset
load_dataset("eli5", streaming=True)
```
This works correctly.
```
from datasets import load_dataset
load_dataset("eli5")
```
### Expected behavior
- Loading `eli5` dataset should not raise an error under the streaming mode.
- Or at the very least, show a warning that streaming mode is not supported with `eli5` dataset.
### Environment info
- `datasets` version: 2.16.1
- Platform: Linux-6.2.0-39-generic-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.19.4
- PyArrow version: 12.0.1
- Pandas version: 2.0.3
- `fsspec` version: 2023.6.0
Hi @haok1402, I have created an issue in the Discussion tab of the corresponding dataset: https://huggingface.co/datasets/eli5/discussions/7
Let's continue the discussion there! | [
-0.3034294843673706,
-0.37919026613235474,
0.0074720680713653564,
0.35745134949684143,
0.3565647602081299,
-0.05574629455804825,
0.20355500280857086,
0.06192155182361603,
0.0340673103928566,
0.1009824275970459,
-0.22593586146831512,
0.18525493144989014,
0.04847179725766182,
0.3414548337459564,
0.04651985317468643,
-0.0871707946062088,
0.17384453117847443,
0.07062694430351257,
-0.12542176246643066,
0.060710176825523376,
0.010979920625686646,
0.005735715851187706,
-0.22949263453483582,
-0.10699515044689178,
-0.15859480202198029,
0.23986469209194183,
-0.0038858577609062195,
0.3995707631111145,
-0.2897292673587799,
-0.178878515958786,
0.2816711366176605,
0.1206703707575798,
0.29406553506851196,
0.39182406663894653,
-0.00011336134048178792,
0.14824515581130981,
0.4644579589366913,
-0.19557785987854004,
-0.22858336567878723,
-0.4194473624229431,
0.0016756132245063782,
-0.014226194471120834,
0.23251983523368835,
0.016643226146697998,
-0.1023687869310379,
-0.04633717238903046,
0.18986037373542786,
-0.004772469401359558,
0.6474074721336365,
0.1131286770105362,
0.21177938580513,
0.32296448945999146,
0.1193036288022995,
-0.033186398446559906,
0.004915529862046242,
-0.028756026178598404,
-0.1626887321472168,
0.10263973474502563,
0.06403274834156036,
0.10555275529623032,
-0.056062981486320496,
0.2424221932888031,
-0.11523889005184174,
-0.01210988499224186,
0.5077376961708069,
0.01579856127500534,
-0.2756880521774292,
-0.2713199853897095,
-0.03443553298711777,
0.36769619584083557,
0.5924935340881348,
-0.1489214301109314,
-0.4117317497730255,
-0.20502963662147522,
-0.015582025051116943,
-0.30661144852638245,
0.31127676367759705,
-0.09017626941204071,
-0.056134551763534546,
0.16288504004478455,
0.10780996829271317,
-0.1282055377960205,
-0.27795112133026123,
0.11015325784683228,
0.024312905967235565,
0.15306305885314941,
-0.17195554077625275,
-0.03449418768286705,
-0.02532562054693699,
-0.13353824615478516,
-0.10148641467094421,
-0.13475126028060913,
-0.3042074739933014,
0.13093191385269165,
-0.36690303683280945,
0.24786047637462616,
0.1889471411705017,
0.32003188133239746,
0.28620702028274536,
0.267807275056839,
0.07798875868320465,
0.0531129390001297,
-0.26474881172180176,
0.1233709305524826,
0.25458428263664246,
0.15501508116722107,
0.19067266583442688,
-0.06648075580596924,
0.1727742850780487,
0.45515668392181396,
-0.1440957635641098,
-0.3547530472278595,
-0.017576146870851517,
-0.022711722180247307,
-0.3502625524997711,
-0.3198820650577545,
0.3932309150695801,
-0.4045545756816864,
-0.5150323510169983,
0.13991433382034302,
-0.34588342905044556,
0.0615864172577858,
0.1776261180639267,
0.48475149273872375,
-0.17257478833198547,
0.2544748783111572,
0.024761095643043518,
0.34542030096054077,
-0.12776124477386475,
-0.12065380811691284,
-0.2801695168018341,
-0.0645308792591095,
-0.08609028905630112,
0.0007374435663223267,
0.08462360501289368,
-0.551811695098877,
0.3983936905860901,
0.058449652045965195,
0.48875606060028076,
0.07921719551086426,
-0.3093852400779724,
-0.014881633222103119,
-0.20882382988929749,
0.2827589213848114,
-0.0016243904829025269,
0.12742871046066284,
0.20302288234233856,
-0.046917181462049484,
0.09761859476566315,
0.03294525295495987,
0.15178251266479492,
-0.2879399061203003,
-0.02680910751223564,
0.16247870028018951,
-0.3946671485900879,
-0.047418657690286636,
-0.36319392919540405,
0.2532098591327667,
-0.3575736880302429,
-0.33394792675971985,
-0.10595957934856415,
0.04187639057636261,
-0.15527021884918213,
-0.11064240336418152,
0.49982476234436035,
0.520005464553833,
0.04429060220718384,
-0.2254820168018341,
-0.18478086590766907,
-0.17317096889019012,
0.21800917387008667,
0.2567920684814453,
-0.113367460668087,
-0.32319071888923645,
-0.11487461626529694,
0.2973101735115051,
0.36679261922836304,
-0.2610388994216919,
-0.6415413618087769,
0.20476184785366058,
-0.1139429584145546,
0.4550272822380066,
0.25094661116600037,
-0.019200418144464493,
0.047773104161024094,
-0.16298328340053558,
0.13386288285255432,
0.2738981246948242,
-0.004812288098037243,
-0.1492805927991867,
-0.3575519323348999,
-0.2662699520587921,
-0.012843318283557892,
0.16925881803035736,
-0.053885601460933685,
0.04146471247076988,
0.07111654430627823,
0.07123735547065735,
0.1510302722454071,
-0.04328615218400955,
-0.11160112917423248,
0.045448265969753265,
0.4298023581504822,
0.31652742624282837,
-0.12230269610881805,
-0.22768566012382507,
-0.44775301218032837,
0.31284099817276,
0.2565295994281769,
0.037517987191677094,
-0.09056665003299713,
-0.09972474724054337,
-0.20113146305084229,
-0.02173348143696785,
-0.21664315462112427,
-0.37185031175613403,
0.11867252737283707,
-0.09416776150465012,
-0.07898876070976257,
0.1660584956407547,
-0.40320277214050293,
0.5581983923912048,
-0.3892466425895691,
0.17247793078422546,
-0.24780818819999695,
0.44186657667160034,
-0.041016045957803726,
-0.2742414176464081,
0.03841986507177353,
-0.0895967185497284,
0.06542212516069412,
-0.05233003944158554,
-0.13289260864257812,
0.33730170130729675,
-0.3090935945510864,
0.24299666285514832,
-0.1332109272480011,
0.14380061626434326,
0.18552212417125702,
-0.37933361530303955,
0.05065616965293884,
0.1307225525379181,
0.21945364773273468,
0.05265156924724579,
-0.19593070447444916,
0.22259894013404846,
-0.1261504590511322,
-0.005276687443256378,
0.10569168627262115,
0.06527244299650192,
0.34865888953208923,
0.010175526142120361,
-0.12989002466201782,
-0.12840420007705688,
0.5232700705528259,
0.13347554206848145,
0.3094758689403534,
-0.11766181141138077,
-0.43564531207084656,
0.0025549903512001038,
0.12581560015678406,
0.23162133991718292,
-0.1344369351863861,
0.18198831379413605,
-0.3662605583667755,
-0.0336214080452919,
0.13221853971481323,
-0.1662737876176834,
0.44805723428726196,
0.23030304908752441,
-0.009845888242125511,
0.23521201312541962,
-0.08821853250265121,
-0.05892845243215561,
0.2425093948841095,
0.02220980077981949,
0.031629182398319244,
0.3426946997642517,
0.08425292372703552,
0.09663277864456177,
-0.47268834710121155,
-0.21408966183662415,
-0.1423092782497406,
0.1584935486316681,
-0.42905694246292114,
0.1548968255519867,
-0.11290476471185684,
-0.2480735182762146,
0.12653467059135437,
-0.3394361436367035,
-0.3156892955303192,
-0.20220761001110077,
0.054864536970853806,
0.6259101033210754,
-0.12733866274356842,
0.13152849674224854,
-0.1878024786710739,
0.010121062397956848,
0.015013612806797028,
0.09034987539052963,
-0.492493212223053,
-0.10352600365877151,
-0.13293005526065826,
0.09241046011447906,
0.43039470911026,
0.12088528275489807,
0.23378410935401917,
-0.06294972449541092,
-0.14814013242721558,
-0.2720623314380646,
-0.35701984167099,
0.08190777897834778,
-0.20823833346366882,
0.6623492240905762,
-0.11147788166999817,
0.2902466058731079,
0.013375319540500641,
-0.32209643721580505,
0.34997889399528503,
-0.35180121660232544,
-0.18139450252056122,
0.15058773756027222,
-0.033271729946136475,
0.07811007648706436,
-0.04754164442420006,
-0.3255394399166107,
-0.05873212218284607,
-0.5046719908714294,
0.23011836409568787,
-0.006073690950870514,
-0.13422948122024536,
0.26615652441978455,
-0.001596599817276001,
0.10382574051618576,
0.026072580367326736,
-0.03017565794289112,
-0.2122337371110916,
-0.4160885214805603,
0.29867643117904663,
-0.07450926303863525,
-0.2934236526489258,
0.07241867482662201,
0.17391644418239594,
-0.167758509516716,
0.15386682748794556,
-0.26092398166656494,
-0.22367851436138153,
-0.03788747638463974,
0.09439364075660706,
-0.053253937512636185,
-0.05445094406604767,
0.11172963678836823,
-0.12616008520126343,
0.0014117062091827393,
-0.11490736901760101,
-0.05153337121009827,
-0.04525128751993179,
0.2968049645423889,
0.05600964277982712,
-0.15626034140586853,
0.6900193691253662,
0.07974199950695038,
0.6245879530906677,
0.36309537291526794,
0.026636751368641853,
0.5495598316192627,
0.043104059994220734,
0.3278808295726776,
-0.37123119831085205,
-0.2209334671497345,
0.025699611753225327,
-0.10266552865505219,
-0.11864402890205383,
0.27504783868789673,
0.13045218586921692,
0.18084518611431122,
-0.3468560576438904,
-0.18353235721588135,
-0.19463378190994263,
-0.14713707566261292,
0.02958967722952366,
-0.16055557131767273,
-0.11066317558288574,
0.04445897787809372,
-0.008505120873451233,
0.09641037881374359,
-0.22509242594242096,
-0.09488828480243683,
0.4739759862422943,
0.32988160848617554,
-0.022184360772371292,
-0.13504983484745026,
0.00912143662571907,
-0.5304208993911743,
0.3634377121925354,
0.054072458297014236,
0.147467702627182,
-0.24107767641544342,
-0.0788269191980362,
0.17578327655792236,
-0.12047165632247925,
0.5259800553321838,
-0.08924941718578339,
0.07844291627407074,
0.01833118498325348,
0.012101002037525177,
-0.20970195531845093,
-0.08606453984975815,
-0.09132734686136246,
0.1587660163640976,
0.25191041827201843,
-0.0792611762881279,
-0.40122753381729126,
-0.1290794312953949,
0.1291467398405075,
0.0006210468709468842,
0.03231702744960785,
-0.26168596744537354,
-0.4434654414653778,
-0.020916372537612915,
-0.305958092212677,
-0.05519711226224899,
0.18711860477924347,
0.1676587462425232,
-0.242452472448349,
0.21272897720336914,
-0.058437757194042206,
-0.012962870299816132,
0.25396624207496643,
-0.022207114845514297,
0.17944620549678802,
-0.052060194313526154,
0.1962786763906479,
0.3467584252357483,
-0.010823763906955719,
0.11506148427724838,
0.793571949005127,
0.4130028486251831,
-0.753388524055481,
-0.17832697927951813,
0.2305048406124115,
-0.03675859421491623,
0.2962479293346405,
-0.05060846358537674,
0.027944430708885193,
0.281890869140625,
-0.013216301798820496,
-0.08185207098722458,
0.061115335673093796,
0.291806161403656,
-0.01806623488664627,
-0.04445350542664528,
-0.33511921763420105,
0.6527771353721619,
0.06295831501483917,
0.13550592958927155,
0.6307625770568848,
0.25191986560821533,
-0.038506414741277695,
0.16823455691337585,
-0.2001873254776001,
0.8563508987426758,
0.04322923719882965,
0.053918369114398956,
0.3995651304721832,
-0.06028871238231659,
0.48245155811309814,
-0.17603150010108948,
0.02551780268549919,
-0.3126024603843689,
-0.5816286206245422,
-0.04996030405163765,
-0.06877533346414566,
0.24957679212093353,
-0.17991633713245392,
-0.11143767088651657,
0.28699785470962524,
-0.14313268661499023,
0.4302147626876831,
0.06552718579769135,
-0.0026520192623138428,
-0.4551086723804474,
-0.03866209462285042,
-0.8380074501037598,
0.12146173417568207,
0.06298588216304779,
0.26260054111480713,
-0.12394370883703232,
-0.18513183295726776,
-0.13907897472381592,
-0.2314637005329132,
-0.36463961005210876,
0.38172584772109985,
-0.03585750237107277,
0.00803065299987793,
-0.03967902064323425,
-0.28525838255882263,
0.14918950200080872,
0.417282372713089,
0.13578392565250397,
-0.42984265089035034,
-0.3586377203464508,
0.20156489312648773,
-0.22092418372631073,
-0.03100043535232544,
0.03722221404314041,
0.0315791592001915,
0.48297059535980225,
-0.18852241337299347,
-0.13662609457969666,
0.324079692363739,
-0.026968995109200478,
-0.23520752787590027,
0.08592461049556732,
-0.07945989072322845,
0.11887103319168091,
-0.20392924547195435,
-0.15412373840808868,
0.08619408309459686,
0.11156619340181351,
-0.19131407141685486,
0.1501150280237198,
0.14412707090377808,
-0.127656951546669,
-0.15577444434165955,
0.0038516889326274395,
0.014176160097122192,
-0.15157727897167206,
0.6070519685745239,
-0.2533271610736847,
0.05014559626579285,
0.3152852952480316,
0.18957924842834473,
-0.16298744082450867,
-0.07013554871082306,
0.009766332805156708,
-0.08957632631063461,
-0.4517832398414612,
0.027529194951057434,
0.15530171990394592,
0.11213520169258118,
-0.11696593463420868,
0.28293177485466003,
0.04942454397678375,
-0.34734025597572327,
0.01325514167547226,
-0.27794694900512695,
-0.13833624124526978,
0.25618064403533936,
-0.39258939027786255,
0.005729898810386658,
-0.1098366305232048,
0.20200605690479279,
0.05271279811859131,
-0.056758470833301544,
-0.30400705337524414,
0.06304814666509628,
-0.04197772964835167,
-0.023544209077954292,
0.0991227924823761,
0.012427246198058128,
0.4627840220928192,
-0.0702693834900856,
0.17795370519161224,
0.09240402281284332,
-0.3628734350204468,
-0.17621514201164246,
-0.12969867885112762,
0.1576923429965973,
0.11958800256252289,
-0.12905454635620117,
-0.2066842019557953,
0.009164571762084961,
-0.19291900098323822,
-0.19443751871585846,
0.35214298963546753,
0.30844539403915405,
-0.06327494978904724,
0.012884184718132019,
0.301002562046051,
0.23691917955875397,
-0.3544045388698578,
0.04492545500397682,
-0.05201546847820282,
0.2143375724554062,
-0.011242255568504333,
-0.09392420202493668,
-0.12671253085136414,
0.00567520409822464,
-0.16503234207630157,
-0.030901223421096802,
0.021556435152888298,
0.11872823536396027,
0.35455238819122314,
-0.21912799775600433,
0.008861280977725983,
-0.031631454825401306,
0.2388065755367279,
0.5788992643356323,
-0.12752515077590942,
0.1430666148662567,
0.23470453917980194,
0.21500378847122192,
-0.1800878643989563,
0.0315827950835228,
0.2633490264415741,
0.04137832671403885,
0.032420456409454346,
-0.13633224368095398,
0.17114034295082092,
-0.1519375592470169,
0.08582853525876999,
0.18271447718143463,
0.3000504970550537,
-0.09982448816299438,
0.3566102683544159,
0.18774153292179108,
0.049980565905570984,
0.26733407378196716,
-0.010602880269289017,
0.050563763827085495,
0.3546149730682373,
0.4179285168647766,
-0.07920384407043457,
-0.03787655383348465,
-0.4717273712158203,
0.2952254116535187,
-0.09375157952308655,
-0.5170793533325195,
-0.3737940490245819,
0.16668105125427246,
-0.047918614000082016,
0.2603183388710022,
-0.026935599744319916,
0.24030721187591553,
-0.2024262249469757,
0.21525096893310547,
-0.3282676339149475,
0.08327696472406387,
-0.06578332185745239,
-0.11146533489227295,
-0.03797856718301773,
-0.19394713640213013,
-0.10122283548116684,
0.13057750463485718,
-0.10203643143177032,
0.14278021454811096,
0.038534097373485565,
0.23717212677001953,
-0.07215020060539246,
-0.26291126012802124,
-0.1333065629005432,
0.3909260928630829,
0.23389360308647156,
-0.15374970436096191,
0.26548707485198975,
0.2724364399909973,
-0.04544442519545555,
0.3041606843471527,
0.29078230261802673,
0.48201999068260193,
0.06375858187675476,
-0.09460075199604034,
0.09135279059410095,
0.1759018450975418,
-0.09363776445388794,
-0.042856112122535706,
0.25920891761779785,
0.042503464967012405,
0.1650674194097519,
0.10847926139831543,
0.20050272345542908,
-0.2137656807899475,
0.06017094478011131,
-0.24826966226100922,
0.4016021490097046,
-0.48734140396118164,
0.07415703684091568,
-0.2607218027114868,
0.16422095894813538,
-0.08578330278396606,
-0.14715950191020966,
-0.4149051010608673,
0.2734323740005493,
-0.11339078098535538,
0.11641834676265717,
0.00014907494187355042,
0.007291056215763092,
0.07369540631771088,
0.08933781087398529,
0.1575286090373993,
0.376031756401062,
0.1730920672416687,
-0.10126692056655884,
-0.17618529498577118,
-0.7052342891693115,
0.1718607246875763,
0.24634677171707153,
0.07649053633213043,
0.1196618527173996,
0.019474543631076813,
0.08685918152332306,
0.11480437219142914,
-0.08318866789340973,
-0.2550559639930725,
0.008377797901630402,
0.23024366796016693,
-0.22094279527664185,
-0.16183626651763916,
-0.10272923111915588,
0.13478778302669525,
-0.2657577395439148,
-0.07872018963098526,
0.0025948090478777885,
-0.25510072708129883,
0.07431142777204514,
-0.0013291537761688232,
-0.014721490442752838,
-0.1412362903356552,
-0.10218525677919388,
0.40023893117904663,
0.12460537254810333,
0.44317710399627686,
-0.20408861339092255,
-0.24575898051261902,
-0.3297351598739624,
-0.29659074544906616,
-0.1882312297821045,
-0.05968955531716347,
-0.08337995409965515,
0.5255988240242004,
-0.19000054895877838,
-0.13749784231185913,
-0.3249165713787079,
0.3034455180168152,
-0.021593548357486725,
-0.0075635649263858795,
-0.47874128818511963,
0.038568899035453796,
-0.1441737711429596,
0.21922962367534637,
-0.21034634113311768,
0.4164908826351166,
-0.21996335685253143,
-0.09443114697933197,
-0.315171480178833,
-0.19277355074882507,
0.7371947169303894,
-0.3276502788066864,
-0.09867661446332932,
-0.058540359139442444,
0.20623669028282166,
0.34273701906204224,
-0.10457850247621536,
-0.5046932697296143,
0.3040298521518707,
0.20532174408435822,
0.011208036914467812,
-0.21776580810546875,
0.18417616188526154,
0.26837214827537537,
0.037700772285461426,
-0.1067621111869812,
-0.06172013655304909,
0.04450291395187378,
-0.027739040553569794,
0.33862918615341187,
-0.20603972673416138
] |
https://github.com/huggingface/datasets/issues/6577 | Hi! We should be able to avoid this error by retrying to read the data when it happens. I'll open a PR in `huggingface_hub` to address this. | 502 Server Errors when streaming large dataset | ### Describe the bug
When streaming a [large ASR dataset](https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set) from the Hug (~3TB) I often encounter 502 Server Errors seemingly randomly during streaming:
```
huggingface_hub.utils._errors.HfHubHTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet
```
This is despite the parquet file definitely existing on the Hub: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/blob/main/train/train-00228-of-07135.parquet
And having the correct commit id: [7d2acc5c59de848e456e951a76e805304d6fb350](https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/commits/main/train)
I’m wondering whether this is coming from datasets? Or from the Hub side?
### Steps to reproduce the bug
Reproducer:
```python
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
NUM_EPOCHS = 20
dataset = load_dataset("sanchit-gandhi/concatenated-train-set", "train", streaming=True)
dataset = dataset.with_format("torch")
dataloader = DataLoader(dataset["train"], batch_size=256, drop_last=True, pin_memory=True, num_workers=16)
for epoch in tqdm(range(NUM_EPOCHS), desc="Epoch", position=0):
for batch in tqdm(dataloader, desc="Batch", position=1):
continue
```
Running the above script tends to fail within about 2 hours with a traceback like the following:
<details>
<summary> Traceback: </summary>
```python
1029 for batch in train_loader:
1030 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 630, in __next__
1031 data = self._next_data()
1032 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1325, in _next_data
1033 return self._process_data(data)
1034 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1371, in _process_data
1035 data.reraise()
1036 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/_utils.py", line 694, in reraise
1037 raise exception
1038 huggingface_hub.utils._errors.HfHubHTTPError: Caught HfHubHTTPError in DataLoader worker process 10.
1039 Original Traceback (most recent call last):
1040 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 286, in hf_raise_for_status
1041 response.raise_for_status()
1042 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
1043 raise HTTPError(http_error_msg, response=self)
1044 requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet
1045 The above exception was the direct cause of the following exception:
1046 Traceback (most recent call last):
1047 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
1048 data = fetcher.fetch(index)
1049 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 32, in fetch
1050 data.append(next(self.dataset_iter))
1051 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1363, in __iter__
1052 yield from self._iter_pytorch()
1053 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1298, in _iter_pytorch
1054 for key, example in ex_iterable:
1055 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 983, in __iter__
1056 for x in self.ex_iterable:
1057 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 863, in __iter__
1058 yield from self._iter()
1059 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 900, in _iter
1060 for key, example in iterator:
1061 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 679, in __iter__
1062 yield from self._iter()
1063 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 741, in _iter
1064 for key, example in iterator:
1065 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 863, in __iter__
1066 yield from self._iter()
1067 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 900, in _iter
1068 for key, example in iterator:
1069 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1115, in __iter__
1070 for key, example in self.ex_iterable:
1071 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 679, in __iter__
1072 yield from self._iter()
1073 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 741, in _iter
1074 for key, example in iterator:
1075 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1115, in __iter__
1076 for key, example in self.ex_iterable:
1077 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 282, in __iter__
1078 for key, pa_table in self.generate_tables_fn(**self.kwargs):
1079 File "/home/sanchitgandhi/datasets/src/datasets/packaged_modules/parquet/parquet.py", line 87, in _generate_tables
1080 for batch_idx, record_batch in enumerate(
1081 File "pyarrow/_parquet.pyx", line 1367, in iter_batches
1082 File "pyarrow/types.pxi", line 88, in pyarrow.lib._datatype_to_pep3118
1083 File "/home/sanchitgandhi/datasets/src/datasets/download/streaming_download_manager.py", line 341, in read_with_retries
1084 out = read(*args, **kwargs)
1085 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/fsspec/spec.py", line 1856, in read
1086 out = self.cache._fetch(self.loc, self.loc + length)
1087 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/fsspec/caching.py", line 189, in _fetch
1088 self.cache = self.fetcher(start, end) # new block replaces old
1089 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/hf_file_system.py", line 626, in _fetch_range
1090 hf_raise_for_status(r)
1091 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 333, in hf_raise_for_status
1092 raise HfHubHTTPError(str(e), response=response) from e
1093 huggingface_hub.utils._errors.HfHubHTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet
```
</details>
### Expected behavior
Should be able to stream the dataset without any 502 error.
### Environment info
- `datasets` version: 2.16.2.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- `huggingface_hub` version: 0.20.1
- PyArrow version: 14.0.2
- Pandas version: 2.0.3
- `fsspec` version: 2023.10.0 | 27 | 502 Server Errors when streaming large dataset
### Describe the bug
When streaming a [large ASR dataset](https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set) from the Hug (~3TB) I often encounter 502 Server Errors seemingly randomly during streaming:
```
huggingface_hub.utils._errors.HfHubHTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet
```
This is despite the parquet file definitely existing on the Hub: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/blob/main/train/train-00228-of-07135.parquet
And having the correct commit id: [7d2acc5c59de848e456e951a76e805304d6fb350](https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/commits/main/train)
I’m wondering whether this is coming from datasets? Or from the Hub side?
### Steps to reproduce the bug
Reproducer:
```python
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
NUM_EPOCHS = 20
dataset = load_dataset("sanchit-gandhi/concatenated-train-set", "train", streaming=True)
dataset = dataset.with_format("torch")
dataloader = DataLoader(dataset["train"], batch_size=256, drop_last=True, pin_memory=True, num_workers=16)
for epoch in tqdm(range(NUM_EPOCHS), desc="Epoch", position=0):
for batch in tqdm(dataloader, desc="Batch", position=1):
continue
```
Running the above script tends to fail within about 2 hours with a traceback like the following:
<details>
<summary> Traceback: </summary>
```python
1029 for batch in train_loader:
1030 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 630, in __next__
1031 data = self._next_data()
1032 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1325, in _next_data
1033 return self._process_data(data)
1034 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1371, in _process_data
1035 data.reraise()
1036 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/_utils.py", line 694, in reraise
1037 raise exception
1038 huggingface_hub.utils._errors.HfHubHTTPError: Caught HfHubHTTPError in DataLoader worker process 10.
1039 Original Traceback (most recent call last):
1040 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 286, in hf_raise_for_status
1041 response.raise_for_status()
1042 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
1043 raise HTTPError(http_error_msg, response=self)
1044 requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet
1045 The above exception was the direct cause of the following exception:
1046 Traceback (most recent call last):
1047 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
1048 data = fetcher.fetch(index)
1049 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 32, in fetch
1050 data.append(next(self.dataset_iter))
1051 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1363, in __iter__
1052 yield from self._iter_pytorch()
1053 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1298, in _iter_pytorch
1054 for key, example in ex_iterable:
1055 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 983, in __iter__
1056 for x in self.ex_iterable:
1057 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 863, in __iter__
1058 yield from self._iter()
1059 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 900, in _iter
1060 for key, example in iterator:
1061 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 679, in __iter__
1062 yield from self._iter()
1063 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 741, in _iter
1064 for key, example in iterator:
1065 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 863, in __iter__
1066 yield from self._iter()
1067 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 900, in _iter
1068 for key, example in iterator:
1069 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1115, in __iter__
1070 for key, example in self.ex_iterable:
1071 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 679, in __iter__
1072 yield from self._iter()
1073 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 741, in _iter
1074 for key, example in iterator:
1075 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1115, in __iter__
1076 for key, example in self.ex_iterable:
1077 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 282, in __iter__
1078 for key, pa_table in self.generate_tables_fn(**self.kwargs):
1079 File "/home/sanchitgandhi/datasets/src/datasets/packaged_modules/parquet/parquet.py", line 87, in _generate_tables
1080 for batch_idx, record_batch in enumerate(
1081 File "pyarrow/_parquet.pyx", line 1367, in iter_batches
1082 File "pyarrow/types.pxi", line 88, in pyarrow.lib._datatype_to_pep3118
1083 File "/home/sanchitgandhi/datasets/src/datasets/download/streaming_download_manager.py", line 341, in read_with_retries
1084 out = read(*args, **kwargs)
1085 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/fsspec/spec.py", line 1856, in read
1086 out = self.cache._fetch(self.loc, self.loc + length)
1087 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/fsspec/caching.py", line 189, in _fetch
1088 self.cache = self.fetcher(start, end) # new block replaces old
1089 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/hf_file_system.py", line 626, in _fetch_range
1090 hf_raise_for_status(r)
1091 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 333, in hf_raise_for_status
1092 raise HfHubHTTPError(str(e), response=response) from e
1093 huggingface_hub.utils._errors.HfHubHTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet
```
</details>
### Expected behavior
Should be able to stream the dataset without any 502 error.
### Environment info
- `datasets` version: 2.16.2.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- `huggingface_hub` version: 0.20.1
- PyArrow version: 14.0.2
- Pandas version: 2.0.3
- `fsspec` version: 2023.10.0
Hi! We should be able to avoid this error by retrying to read the data when it happens. I'll open a PR in `huggingface_hub` to address this. | [
-0.22672490775585175,
-0.5951704978942871,
0.15816134214401245,
0.31269171833992004,
0.21198102831840515,
-0.14130067825317383,
0.1209697276353836,
0.03074195235967636,
-0.4138365089893341,
-0.19666787981987,
-0.00406932458281517,
-0.03385841101408005,
-0.0011482946574687958,
0.14881344139575958,
0.11635453999042511,
-0.15325546264648438,
-0.018423426896333694,
-0.2293916791677475,
-0.49636757373809814,
-0.11409241706132889,
-0.1513170450925827,
0.11971064656972885,
0.19027164578437805,
0.12175499647855759,
-0.5765932202339172,
-0.03333793580532074,
-0.03813065588474274,
0.4741724133491516,
-0.22466257214546204,
-0.41784512996673584,
-0.012973986566066742,
-0.24887585639953613,
0.10712557286024094,
0.3409941494464874,
-0.00012958036677446216,
0.06612342596054077,
0.32800665497779846,
0.09679264575242996,
-0.37890905141830444,
0.2015654444694519,
-0.3142157793045044,
-0.2047288715839386,
0.0072572678327560425,
0.0950944721698761,
0.16116994619369507,
0.072980135679245,
-0.05159886181354523,
-0.11118688434362411,
0.24864473938941956,
0.48270919919013977,
0.025718238204717636,
0.39231446385383606,
-0.18166249990463257,
-0.07569253444671631,
0.2968015670776367,
-0.15837451815605164,
-0.016870956867933273,
0.19652248919010162,
0.11026878654956818,
0.14411115646362305,
-0.533576488494873,
0.1020396500825882,
0.07703634351491928,
-0.2314254492521286,
0.22270958125591278,
-0.2081197053194046,
0.017239686101675034,
-0.3296172618865967,
0.014222441241145134,
0.34328022599220276,
-0.0257575586438179,
-0.06744563579559326,
-0.2672533690929413,
-0.4688505530357361,
-0.2029171884059906,
-0.18874110281467438,
0.1997726410627365,
0.34820282459259033,
0.05980873107910156,
0.21571853756904602,
-0.31371399760246277,
-0.3511556088924408,
-0.05281972885131836,
-0.0783199593424797,
-0.11182388663291931,
0.14608179032802582,
-0.028770383447408676,
0.21108926832675934,
-0.19614958763122559,
-0.1788134127855301,
0.017705697566270828,
-0.17413505911827087,
-0.22262710332870483,
-0.17558656632900238,
-0.7149903178215027,
0.11598201841115952,
0.25070270895957947,
0.02055630087852478,
0.04721028357744217,
0.4523201882839203,
0.21365460753440857,
0.009275522083044052,
-0.1335587203502655,
0.19188028573989868,
0.3552560806274414,
0.05184231325984001,
-0.1883874386548996,
-0.04300034046173096,
0.24472744762897491,
0.31591129302978516,
0.15628066658973694,
0.15922848880290985,
0.11707708239555359,
-0.11919926106929779,
-0.4622672200202942,
-0.2228398472070694,
0.15629853308200836,
-0.14966869354248047,
-0.4521414637565613,
0.4145105183124542,
0.024873986840248108,
0.09140567481517792,
0.5031002759933472,
0.1112595871090889,
-0.06577540934085846,
0.6213890910148621,
-0.32740992307662964,
0.11265508830547333,
-0.11412841081619263,
-0.4606536030769348,
-0.21923089027404785,
-0.012871094979345798,
-0.03803730010986328,
0.026693541556596756,
-0.08487702161073685,
-0.4903702437877655,
-0.031054385006427765,
0.13593843579292297,
0.2695939838886261,
-0.065561443567276,
-0.1579052358865738,
-0.2916228771209717,
-0.019354198127985,
0.32376986742019653,
0.017073646187782288,
0.33621954917907715,
0.14316101372241974,
0.3105735778808594,
0.05726860463619232,
-0.11297301948070526,
-0.24364250898361206,
-0.5234113335609436,
0.1443571150302887,
0.03365568444132805,
-0.16230644285678864,
0.013128388673067093,
-0.13867507874965668,
0.07041953504085541,
-0.038236457854509354,
-0.01849021017551422,
0.03580581024289131,
0.1877537965774536,
-0.27448296546936035,
-0.10131444036960602,
0.048353999853134155,
0.5301847457885742,
-0.025478675961494446,
-0.12243214249610901,
0.32633069157600403,
0.13287587463855743,
0.21472576260566711,
0.401135116815567,
-0.05677241086959839,
-0.08240224421024323,
-0.1918359398841858,
0.00909346342086792,
0.12591451406478882,
-0.35094141960144043,
-0.16236776113510132,
0.47476106882095337,
-0.2446492612361908,
0.047882504761219025,
0.30246037244796753,
0.024051979184150696,
0.4103977680206299,
-0.09217751026153564,
0.5288958549499512,
0.09697408974170685,
0.11719273775815964,
0.11742234230041504,
-0.5494970083236694,
-0.3037050664424896,
-0.33910951018333435,
0.13529494404792786,
0.28706490993499756,
0.07853124290704727,
0.2601461112499237,
-0.2787840962409973,
-0.001945633441209793,
-0.014338904991745949,
0.14392805099487305,
0.40381404757499695,
0.04539820924401283,
0.10766620934009552,
0.04843098297715187,
0.05432486534118652,
-0.2885257303714752,
0.15902172029018402,
0.014194674789905548,
-0.0754743218421936,
0.22077849507331848,
0.12797081470489502,
-0.15276959538459778,
-0.12732043862342834,
0.028189631178975105,
0.011863034218549728,
-0.08291417360305786,
0.01761770248413086,
0.020462535321712494,
0.09355143457651138,
-0.3534315228462219,
0.6511549949645996,
-0.21352432668209076,
0.3303191065788269,
-0.4098541736602783,
0.31914854049682617,
0.26558253169059753,
-0.20557045936584473,
0.330650269985199,
-0.028565648943185806,
0.40957215428352356,
0.0787227526307106,
-0.009647663682699203,
0.4893660247325897,
-0.1775600165128708,
0.31364282965660095,
0.15041059255599976,
0.07618175446987152,
0.37186816334724426,
-0.0406486913561821,
-0.18454405665397644,
-0.11051410436630249,
-0.1071634441614151,
0.07860352843999863,
0.07524879276752472,
0.16725414991378784,
-0.20867064595222473,
0.276738703250885,
0.19121070206165314,
0.3572307229042053,
0.16338856518268585,
0.20940670371055603,
-0.23248887062072754,
0.09987440705299377,
0.4095522463321686,
-0.023355966433882713,
0.1845775842666626,
0.14176639914512634,
-0.3438040018081665,
0.0417972132563591,
0.020726006478071213,
-0.01702876016497612,
0.017278460785746574,
0.24636396765708923,
-0.17327891290187836,
-0.05267995595932007,
0.21483340859413147,
0.29279541969299316,
0.30839061737060547,
-0.06165790930390358,
-0.14914679527282715,
0.026728695258498192,
-0.12757231295108795,
-0.1684267520904541,
0.3210414946079254,
0.3712770342826843,
-0.08640669286251068,
0.2834063768386841,
0.10521852970123291,
-0.06639612466096878,
-0.4625815451145172,
-0.13998320698738098,
0.11659596115350723,
0.18084947764873505,
-0.612250804901123,
0.14959612488746643,
-0.2159741222858429,
-0.16699206829071045,
-0.2239597886800766,
0.04878241568803787,
-0.42752689123153687,
-0.3954008221626282,
-0.07361836731433868,
0.2628181576728821,
-0.44333603978157043,
-0.0038208812475204468,
-0.2800581455230713,
0.33701324462890625,
0.017631560564041138,
0.29494214057922363,
0.05060480535030365,
-0.10700035840272903,
-0.08237345516681671,
-0.09216105937957764,
0.10486789047718048,
-0.30124181509017944,
0.12147880345582962,
-0.22688496112823486,
0.13715732097625732,
-0.5803179740905762,
-0.1423576921224594,
0.3004574775695801,
0.07903420180082321,
0.12404653429985046,
0.08588050305843353,
0.13927213847637177,
-0.22440552711486816,
-0.16106274724006653,
0.13689298927783966,
0.1888943314552307,
0.08987265080213547,
0.26420140266418457,
-0.062311042100191116,
0.08602101355791092,
0.1270870715379715,
0.028624296188354492,
0.16411304473876953,
-0.4027656614780426,
0.2627314031124115,
-0.193173348903656,
0.18966515362262726,
-0.1445847898721695,
-0.11715415120124817,
0.019943691790103912,
-0.14017324149608612,
-0.012395823374390602,
-0.0659443736076355,
-0.8555179238319397,
0.3188782334327698,
-0.10088853538036346,
-0.2066129893064499,
-0.0030669420957565308,
0.16384945809841156,
0.12470357120037079,
0.3376142084598541,
-0.4241468906402588,
-0.26946866512298584,
-0.22868098318576813,
-0.06590334326028824,
-0.15028557181358337,
0.1089400127530098,
-0.003155849874019623,
-0.15887629985809326,
0.01584462821483612,
-0.03151727840304375,
0.04305429756641388,
0.18267321586608887,
0.2849319577217102,
0.23950356245040894,
-0.026885105296969414,
0.4528467357158661,
0.005732789635658264,
0.3141430616378784,
0.3306630253791809,
0.2839587330818176,
0.5497276186943054,
-0.0018575415015220642,
0.2872813045978546,
0.1868283599615097,
-0.05232542008161545,
0.03644433245062828,
-0.1970205307006836,
-0.14365491271018982,
0.254458487033844,
0.13426965475082397,
0.21452727913856506,
-0.19766682386398315,
-0.24735745787620544,
0.01562592387199402,
-0.22945502400398254,
0.026850489899516106,
-0.48607173562049866,
0.2694200873374939,
0.08030916750431061,
0.041126884520053864,
0.15169356763362885,
-0.08215107768774033,
-0.06762069463729858,
0.08130106329917908,
0.16521668434143066,
0.028559528291225433,
-0.03482794016599655,
-0.008382786065340042,
-0.4206946790218353,
0.09163278341293335,
0.09905307739973068,
0.7096068263053894,
-0.0615299716591835,
-0.12938912212848663,
0.2116037905216217,
0.010657928884029388,
0.39509162306785583,
-0.3172484040260315,
0.012574898079037666,
-0.2421964406967163,
0.04231882095336914,
-0.5206639766693115,
-0.0050808340311050415,
-0.004529736936092377,
0.32748132944107056,
0.2589341402053833,
0.4298582673072815,
-0.4116394519805908,
-0.04754411056637764,
0.0803312435746193,
-0.2097700983285904,
-0.04071522131562233,
0.1626887172460556,
-0.47547170519828796,
-0.2500946521759033,
-0.14146867394447327,
0.07308825105428696,
0.2419528365135193,
0.0035720691084861755,
-0.2041843831539154,
0.28397437930107117,
-0.044327471405267715,
-0.015516042709350586,
0.1918792426586151,
-0.03469420596957207,
0.3075754642486572,
-0.3205716609954834,
0.43420541286468506,
0.34288352727890015,
0.5453113913536072,
0.13054607808589935,
0.7411035299301147,
0.008386833593249321,
-0.6654378175735474,
0.3813937306404114,
0.2571749687194824,
0.2564491927623749,
0.606289267539978,
-0.03342883288860321,
0.1426626741886139,
0.10491780936717987,
0.32428258657455444,
-0.14262592792510986,
0.16808241605758667,
0.33423516154289246,
-0.18668141961097717,
-0.4840812683105469,
-0.08128422498703003,
0.3273612856864929,
-0.005633346736431122,
-0.018827445805072784,
0.12816433608531952,
0.3300391733646393,
-0.08899201452732086,
0.006897959858179092,
0.03414777293801308,
1.019761323928833,
0.053157221525907516,
0.21712079644203186,
0.09811221808195114,
-0.2882554233074188,
0.5061947107315063,
-0.3468606472015381,
0.12844529747962952,
-0.4757455885410309,
-0.10918602347373962,
-0.01360352337360382,
-0.09119898080825806,
-0.10634923726320267,
-0.05248023942112923,
-0.028233066201210022,
0.32107552886009216,
-0.017837367951869965,
0.4316791892051697,
0.09291714429855347,
0.16111144423484802,
-0.4321517050266266,
-0.14563791453838348,
-0.4679882228374481,
-0.04537387564778328,
-0.2641971707344055,
-0.036326318979263306,
-0.13536086678504944,
-0.13826924562454224,
0.10615428537130356,
-0.4177361726760864,
-0.20005109906196594,
-0.00033511966466903687,
-0.10809265077114105,
0.23594655096530914,
0.05139743536710739,
-0.3846437335014343,
-0.09776482731103897,
-0.046796396374702454,
0.05883149057626724,
-0.10908280313014984,
-0.05633845925331116,
0.29460397362709045,
-0.10369241237640381,
0.25387072563171387,
0.008054818958044052,
-0.10652114450931549,
0.1780494898557663,
0.0226130411028862,
-0.11851784586906433,
0.17838791012763977,
-0.03330677002668381,
-0.0030749067664146423,
-0.30997976660728455,
0.19416624307632446,
0.10190753638744354,
-0.1199241429567337,
0.17343232035636902,
-0.1859561800956726,
-0.1432022750377655,
-0.2118232697248459,
-0.042621396481990814,
0.13449102640151978,
-0.10999070852994919,
0.09605901688337326,
0.05924689769744873,
-0.3104195296764374,
-0.07502275705337524,
0.5249305367469788,
-0.15637975931167603,
-0.023470886051654816,
0.16096079349517822,
0.11795837432146072,
-0.30359235405921936,
0.029589585959911346,
0.18040309846401215,
-0.11649274080991745,
-0.5765732526779175,
0.15966321527957916,
-0.2519155442714691,
-0.015898793935775757,
-0.22581864893436432,
-0.0486895926296711,
-0.008237045258283615,
-0.04696470871567726,
-0.1391143500804901,
-0.2623436152935028,
-0.07387153059244156,
0.32643502950668335,
-0.07572051137685776,
-0.04779554903507233,
0.07069860398769379,
-0.09862690418958664,
0.08551457524299622,
-0.18132412433624268,
-0.0911041721701622,
0.27499204874038696,
-0.08627867698669434,
0.1121857613325119,
0.013174600899219513,
-0.14820066094398499,
0.23615092039108276,
-0.23861165344715118,
-0.20424272119998932,
0.2226412147283554,
0.06953206658363342,
0.061504825949668884,
-0.166920006275177,
0.22030295431613922,
0.09317873418331146,
-0.27773547172546387,
-0.34477245807647705,
0.06736557185649872,
0.035880133509635925,
0.09807208180427551,
0.21973396837711334,
0.3733527362346649,
-0.004801902920007706,
-0.5639166831970215,
0.1510172188282013,
-0.09470643848180771,
-0.2933691442012787,
0.40253451466560364,
0.14065779745578766,
0.3823642432689667,
0.011888597160577774,
0.17359128594398499,
0.0007951259613037109,
-0.16897563636302948,
0.14607955515384674,
0.2095707207918167,
0.3190028667449951,
-0.16734574735164642,
0.24086084961891174,
-0.4783458411693573,
0.09576575458049774,
0.04329719394445419,
0.1891784965991974,
0.4678424596786499,
-0.09056324511766434,
-0.4894031286239624,
0.18036586046218872,
0.015209009870886803,
0.09686841070652008,
-0.26079145073890686,
0.10626772046089172,
0.07290369272232056,
-0.07329972088336945,
0.0849592536687851,
0.25038355588912964,
-0.3534901738166809,
-0.295000821352005,
0.29196488857269287,
0.5073562264442444,
0.2431287169456482,
0.19352246820926666,
0.23567581176757812,
0.18957629799842834,
0.10859668254852295,
-0.13063450157642365,
-0.05761494114995003,
0.06744387000799179,
0.4154256582260132,
-0.05511883273720741,
0.15863031148910522,
0.0007302723824977875,
-0.13447131216526031,
0.258188933134079,
-0.4820250868797302,
-0.2258700132369995,
0.10853177309036255,
-0.2744225859642029,
0.08310365676879883,
-0.2313379943370819,
0.7644414305686951,
0.09496366232633591,
-0.06422585994005203,
-0.3673376739025116,
0.27588579058647156,
-0.15686926245689392,
-0.08982204645872116,
-0.0481451116502285,
-0.20955924689769745,
-0.18224412202835083,
0.3722248375415802,
-0.07823806256055832,
0.27425533533096313,
0.14035704731941223,
0.20170211791992188,
0.19801174104213715,
-0.30333971977233887,
-0.012817848473787308,
0.3088618218898773,
0.3186323940753937,
-0.1443990021944046,
0.4410896897315979,
0.6181504130363464,
-0.12263123691082001,
0.3608301877975464,
0.01645803265273571,
0.5661805272102356,
0.10305178165435791,
-0.07626405358314514,
0.18596620857715607,
0.09776881337165833,
0.2110048532485962,
-0.022475555539131165,
0.09037983417510986,
-0.15529479086399078,
-0.16951121389865875,
0.35793977975845337,
-0.009985620155930519,
-0.041285451501607895,
0.052751604467630386,
-0.2274063527584076,
0.16304843127727509,
-0.1524517685174942,
0.16100265085697174,
-0.32655203342437744,
-0.025905422866344452,
-0.22791306674480438,
-0.16830086708068848,
-0.4317322075366974,
0.12829338014125824,
0.4793339967727661,
-0.16311612725257874,
0.007963061332702637,
-0.16751742362976074,
-0.0529576912522316,
-0.13345055282115936,
0.9205738306045532,
0.2560823857784271,
-0.21817532181739807,
-0.24679982662200928,
-0.3968575596809387,
-0.3903970718383789,
0.15272361040115356,
-0.1467907428741455,
0.15076538920402527,
0.10183476656675339,
0.2021477222442627,
-0.3132683336734772,
0.20067967474460602,
0.10606424510478973,
0.2352461814880371,
-0.5360376834869385,
0.34090471267700195,
-0.10899443924427032,
-0.04042832553386688,
-0.05499086529016495,
0.038410983979701996,
-0.07540322840213776,
-0.0892721489071846,
0.48329365253448486,
0.29282504320144653,
-0.12660017609596252,
0.14312633872032166,
-0.15975388884544373,
-0.2924485206604004,
-0.47435837984085083,
-0.0570555254817009,
0.31711554527282715,
0.30722537636756897,
0.10390964150428772,
-0.3858226537704468,
-0.3338167667388916,
-0.5497469902038574,
-0.03785398229956627,
0.0984053909778595,
-0.08973702043294907,
0.34696164727211,
0.051265276968479156,
-0.14142708480358124,
-0.22974924743175507,
0.4220114052295685,
0.07918164134025574,
0.06415876746177673,
-0.14108118414878845,
-0.1482563465833664,
0.06182734668254852,
0.27667471766471863,
0.11395929753780365,
0.44164493680000305,
0.10638823360204697,
0.31401628255844116,
-0.07405323535203934,
-0.7448225617408752,
0.5567172169685364,
-0.4150905907154083,
-0.05144559219479561,
-0.2703673839569092,
0.46540409326553345,
0.6008333563804626,
-0.00043955445289611816,
-0.26801174879074097,
-0.07360287010669708,
0.07351283729076385,
-0.033120956271886826,
-0.01746033877134323,
0.05493350327014923,
-0.08129412680864334,
-0.1256699413061142,
-0.013926409184932709,
-0.194503054022789,
0.10245335102081299,
-0.28349098563194275,
0.4803299307823181,
-0.11475228518247604
] |
https://github.com/huggingface/datasets/issues/6577 | Thanks for the fix @mariosasko! Just wondering whether "500 error" should also be excluded? I got these errors overnight:
```
huggingface_hub.utils._errors.HfHubHTTPError: 500 Server Error: Internal Server Error for url: https://huggingface.co/da
tasets/sanchit-gandhi/concatenated-train-set-label-length-256/resolve/91e6a0cd0356605b021384ded813cfcf356a221c/train/tra
in-02618-of-04012.parquet (Request ID: Root=1-65b18b81-627f2c2943bbb8ab68d19ee2;129537bd-1934-4257-a4d8-1cb774f8e1f8)
Internal Error - We're working hard to fix this as soon as possible!
``` | 502 Server Errors when streaming large dataset | ### Describe the bug
When streaming a [large ASR dataset](https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set) from the Hug (~3TB) I often encounter 502 Server Errors seemingly randomly during streaming:
```
huggingface_hub.utils._errors.HfHubHTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet
```
This is despite the parquet file definitely existing on the Hub: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/blob/main/train/train-00228-of-07135.parquet
And having the correct commit id: [7d2acc5c59de848e456e951a76e805304d6fb350](https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/commits/main/train)
I’m wondering whether this is coming from datasets? Or from the Hub side?
### Steps to reproduce the bug
Reproducer:
```python
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
NUM_EPOCHS = 20
dataset = load_dataset("sanchit-gandhi/concatenated-train-set", "train", streaming=True)
dataset = dataset.with_format("torch")
dataloader = DataLoader(dataset["train"], batch_size=256, drop_last=True, pin_memory=True, num_workers=16)
for epoch in tqdm(range(NUM_EPOCHS), desc="Epoch", position=0):
for batch in tqdm(dataloader, desc="Batch", position=1):
continue
```
Running the above script tends to fail within about 2 hours with a traceback like the following:
<details>
<summary> Traceback: </summary>
```python
1029 for batch in train_loader:
1030 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 630, in __next__
1031 data = self._next_data()
1032 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1325, in _next_data
1033 return self._process_data(data)
1034 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1371, in _process_data
1035 data.reraise()
1036 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/_utils.py", line 694, in reraise
1037 raise exception
1038 huggingface_hub.utils._errors.HfHubHTTPError: Caught HfHubHTTPError in DataLoader worker process 10.
1039 Original Traceback (most recent call last):
1040 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 286, in hf_raise_for_status
1041 response.raise_for_status()
1042 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
1043 raise HTTPError(http_error_msg, response=self)
1044 requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet
1045 The above exception was the direct cause of the following exception:
1046 Traceback (most recent call last):
1047 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
1048 data = fetcher.fetch(index)
1049 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 32, in fetch
1050 data.append(next(self.dataset_iter))
1051 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1363, in __iter__
1052 yield from self._iter_pytorch()
1053 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1298, in _iter_pytorch
1054 for key, example in ex_iterable:
1055 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 983, in __iter__
1056 for x in self.ex_iterable:
1057 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 863, in __iter__
1058 yield from self._iter()
1059 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 900, in _iter
1060 for key, example in iterator:
1061 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 679, in __iter__
1062 yield from self._iter()
1063 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 741, in _iter
1064 for key, example in iterator:
1065 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 863, in __iter__
1066 yield from self._iter()
1067 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 900, in _iter
1068 for key, example in iterator:
1069 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1115, in __iter__
1070 for key, example in self.ex_iterable:
1071 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 679, in __iter__
1072 yield from self._iter()
1073 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 741, in _iter
1074 for key, example in iterator:
1075 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1115, in __iter__
1076 for key, example in self.ex_iterable:
1077 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 282, in __iter__
1078 for key, pa_table in self.generate_tables_fn(**self.kwargs):
1079 File "/home/sanchitgandhi/datasets/src/datasets/packaged_modules/parquet/parquet.py", line 87, in _generate_tables
1080 for batch_idx, record_batch in enumerate(
1081 File "pyarrow/_parquet.pyx", line 1367, in iter_batches
1082 File "pyarrow/types.pxi", line 88, in pyarrow.lib._datatype_to_pep3118
1083 File "/home/sanchitgandhi/datasets/src/datasets/download/streaming_download_manager.py", line 341, in read_with_retries
1084 out = read(*args, **kwargs)
1085 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/fsspec/spec.py", line 1856, in read
1086 out = self.cache._fetch(self.loc, self.loc + length)
1087 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/fsspec/caching.py", line 189, in _fetch
1088 self.cache = self.fetcher(start, end) # new block replaces old
1089 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/hf_file_system.py", line 626, in _fetch_range
1090 hf_raise_for_status(r)
1091 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 333, in hf_raise_for_status
1092 raise HfHubHTTPError(str(e), response=response) from e
1093 huggingface_hub.utils._errors.HfHubHTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet
```
</details>
### Expected behavior
Should be able to stream the dataset without any 502 error.
### Environment info
- `datasets` version: 2.16.2.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- `huggingface_hub` version: 0.20.1
- PyArrow version: 14.0.2
- Pandas version: 2.0.3
- `fsspec` version: 2023.10.0 | 49 | 502 Server Errors when streaming large dataset
### Describe the bug
When streaming a [large ASR dataset](https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set) from the Hug (~3TB) I often encounter 502 Server Errors seemingly randomly during streaming:
```
huggingface_hub.utils._errors.HfHubHTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet
```
This is despite the parquet file definitely existing on the Hub: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/blob/main/train/train-00228-of-07135.parquet
And having the correct commit id: [7d2acc5c59de848e456e951a76e805304d6fb350](https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/commits/main/train)
I’m wondering whether this is coming from datasets? Or from the Hub side?
### Steps to reproduce the bug
Reproducer:
```python
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
NUM_EPOCHS = 20
dataset = load_dataset("sanchit-gandhi/concatenated-train-set", "train", streaming=True)
dataset = dataset.with_format("torch")
dataloader = DataLoader(dataset["train"], batch_size=256, drop_last=True, pin_memory=True, num_workers=16)
for epoch in tqdm(range(NUM_EPOCHS), desc="Epoch", position=0):
for batch in tqdm(dataloader, desc="Batch", position=1):
continue
```
Running the above script tends to fail within about 2 hours with a traceback like the following:
<details>
<summary> Traceback: </summary>
```python
1029 for batch in train_loader:
1030 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 630, in __next__
1031 data = self._next_data()
1032 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1325, in _next_data
1033 return self._process_data(data)
1034 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1371, in _process_data
1035 data.reraise()
1036 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/_utils.py", line 694, in reraise
1037 raise exception
1038 huggingface_hub.utils._errors.HfHubHTTPError: Caught HfHubHTTPError in DataLoader worker process 10.
1039 Original Traceback (most recent call last):
1040 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 286, in hf_raise_for_status
1041 response.raise_for_status()
1042 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
1043 raise HTTPError(http_error_msg, response=self)
1044 requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet
1045 The above exception was the direct cause of the following exception:
1046 Traceback (most recent call last):
1047 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
1048 data = fetcher.fetch(index)
1049 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 32, in fetch
1050 data.append(next(self.dataset_iter))
1051 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1363, in __iter__
1052 yield from self._iter_pytorch()
1053 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1298, in _iter_pytorch
1054 for key, example in ex_iterable:
1055 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 983, in __iter__
1056 for x in self.ex_iterable:
1057 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 863, in __iter__
1058 yield from self._iter()
1059 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 900, in _iter
1060 for key, example in iterator:
1061 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 679, in __iter__
1062 yield from self._iter()
1063 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 741, in _iter
1064 for key, example in iterator:
1065 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 863, in __iter__
1066 yield from self._iter()
1067 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 900, in _iter
1068 for key, example in iterator:
1069 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1115, in __iter__
1070 for key, example in self.ex_iterable:
1071 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 679, in __iter__
1072 yield from self._iter()
1073 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 741, in _iter
1074 for key, example in iterator:
1075 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 1115, in __iter__
1076 for key, example in self.ex_iterable:
1077 File "/home/sanchitgandhi/datasets/src/datasets/iterable_dataset.py", line 282, in __iter__
1078 for key, pa_table in self.generate_tables_fn(**self.kwargs):
1079 File "/home/sanchitgandhi/datasets/src/datasets/packaged_modules/parquet/parquet.py", line 87, in _generate_tables
1080 for batch_idx, record_batch in enumerate(
1081 File "pyarrow/_parquet.pyx", line 1367, in iter_batches
1082 File "pyarrow/types.pxi", line 88, in pyarrow.lib._datatype_to_pep3118
1083 File "/home/sanchitgandhi/datasets/src/datasets/download/streaming_download_manager.py", line 341, in read_with_retries
1084 out = read(*args, **kwargs)
1085 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/fsspec/spec.py", line 1856, in read
1086 out = self.cache._fetch(self.loc, self.loc + length)
1087 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/fsspec/caching.py", line 189, in _fetch
1088 self.cache = self.fetcher(start, end) # new block replaces old
1089 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/hf_file_system.py", line 626, in _fetch_range
1090 hf_raise_for_status(r)
1091 File "/home/sanchitgandhi/hf/lib/python3.8/site-packages/huggingface_hub/utils/_errors.py", line 333, in hf_raise_for_status
1092 raise HfHubHTTPError(str(e), response=response) from e
1093 huggingface_hub.utils._errors.HfHubHTTPError: 502 Server Error: Bad Gateway for url: https://huggingface.co/datasets/sanchit-gandhi/concatenated-train-set/resolve/7d2acc5c59de848e456e951a76e805304d6fb350/train/train-00288-of-07135.parquet
```
</details>
### Expected behavior
Should be able to stream the dataset without any 502 error.
### Environment info
- `datasets` version: 2.16.2.dev0
- Platform: Linux-5.13.0-1023-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- `huggingface_hub` version: 0.20.1
- PyArrow version: 14.0.2
- Pandas version: 2.0.3
- `fsspec` version: 2023.10.0
Thanks for the fix @mariosasko! Just wondering whether "500 error" should also be excluded? I got these errors overnight:
```
huggingface_hub.utils._errors.HfHubHTTPError: 500 Server Error: Internal Server Error for url: https://huggingface.co/da
tasets/sanchit-gandhi/concatenated-train-set-label-length-256/resolve/91e6a0cd0356605b021384ded813cfcf356a221c/train/tra
in-02618-of-04012.parquet (Request ID: Root=1-65b18b81-627f2c2943bbb8ab68d19ee2;129537bd-1934-4257-a4d8-1cb774f8e1f8)
Internal Error - We're working hard to fix this as soon as possible!
``` | [
-0.22672490775585175,
-0.5951704978942871,
0.15816134214401245,
0.31269171833992004,
0.21198102831840515,
-0.14130067825317383,
0.1209697276353836,
0.03074195235967636,
-0.4138365089893341,
-0.19666787981987,
-0.00406932458281517,
-0.03385841101408005,
-0.0011482946574687958,
0.14881344139575958,
0.11635453999042511,
-0.15325546264648438,
-0.018423426896333694,
-0.2293916791677475,
-0.49636757373809814,
-0.11409241706132889,
-0.1513170450925827,
0.11971064656972885,
0.19027164578437805,
0.12175499647855759,
-0.5765932202339172,
-0.03333793580532074,
-0.03813065588474274,
0.4741724133491516,
-0.22466257214546204,
-0.41784512996673584,
-0.012973986566066742,
-0.24887585639953613,
0.10712557286024094,
0.3409941494464874,
-0.00012958036677446216,
0.06612342596054077,
0.32800665497779846,
0.09679264575242996,
-0.37890905141830444,
0.2015654444694519,
-0.3142157793045044,
-0.2047288715839386,
0.0072572678327560425,
0.0950944721698761,
0.16116994619369507,
0.072980135679245,
-0.05159886181354523,
-0.11118688434362411,
0.24864473938941956,
0.48270919919013977,
0.025718238204717636,
0.39231446385383606,
-0.18166249990463257,
-0.07569253444671631,
0.2968015670776367,
-0.15837451815605164,
-0.016870956867933273,
0.19652248919010162,
0.11026878654956818,
0.14411115646362305,
-0.533576488494873,
0.1020396500825882,
0.07703634351491928,
-0.2314254492521286,
0.22270958125591278,
-0.2081197053194046,
0.017239686101675034,
-0.3296172618865967,
0.014222441241145134,
0.34328022599220276,
-0.0257575586438179,
-0.06744563579559326,
-0.2672533690929413,
-0.4688505530357361,
-0.2029171884059906,
-0.18874110281467438,
0.1997726410627365,
0.34820282459259033,
0.05980873107910156,
0.21571853756904602,
-0.31371399760246277,
-0.3511556088924408,
-0.05281972885131836,
-0.0783199593424797,
-0.11182388663291931,
0.14608179032802582,
-0.028770383447408676,
0.21108926832675934,
-0.19614958763122559,
-0.1788134127855301,
0.017705697566270828,
-0.17413505911827087,
-0.22262710332870483,
-0.17558656632900238,
-0.7149903178215027,
0.11598201841115952,
0.25070270895957947,
0.02055630087852478,
0.04721028357744217,
0.4523201882839203,
0.21365460753440857,
0.009275522083044052,
-0.1335587203502655,
0.19188028573989868,
0.3552560806274414,
0.05184231325984001,
-0.1883874386548996,
-0.04300034046173096,
0.24472744762897491,
0.31591129302978516,
0.15628066658973694,
0.15922848880290985,
0.11707708239555359,
-0.11919926106929779,
-0.4622672200202942,
-0.2228398472070694,
0.15629853308200836,
-0.14966869354248047,
-0.4521414637565613,
0.4145105183124542,
0.024873986840248108,
0.09140567481517792,
0.5031002759933472,
0.1112595871090889,
-0.06577540934085846,
0.6213890910148621,
-0.32740992307662964,
0.11265508830547333,
-0.11412841081619263,
-0.4606536030769348,
-0.21923089027404785,
-0.012871094979345798,
-0.03803730010986328,
0.026693541556596756,
-0.08487702161073685,
-0.4903702437877655,
-0.031054385006427765,
0.13593843579292297,
0.2695939838886261,
-0.065561443567276,
-0.1579052358865738,
-0.2916228771209717,
-0.019354198127985,
0.32376986742019653,
0.017073646187782288,
0.33621954917907715,
0.14316101372241974,
0.3105735778808594,
0.05726860463619232,
-0.11297301948070526,
-0.24364250898361206,
-0.5234113335609436,
0.1443571150302887,
0.03365568444132805,
-0.16230644285678864,
0.013128388673067093,
-0.13867507874965668,
0.07041953504085541,
-0.038236457854509354,
-0.01849021017551422,
0.03580581024289131,
0.1877537965774536,
-0.27448296546936035,
-0.10131444036960602,
0.048353999853134155,
0.5301847457885742,
-0.025478675961494446,
-0.12243214249610901,
0.32633069157600403,
0.13287587463855743,
0.21472576260566711,
0.401135116815567,
-0.05677241086959839,
-0.08240224421024323,
-0.1918359398841858,
0.00909346342086792,
0.12591451406478882,
-0.35094141960144043,
-0.16236776113510132,
0.47476106882095337,
-0.2446492612361908,
0.047882504761219025,
0.30246037244796753,
0.024051979184150696,
0.4103977680206299,
-0.09217751026153564,
0.5288958549499512,
0.09697408974170685,
0.11719273775815964,
0.11742234230041504,
-0.5494970083236694,
-0.3037050664424896,
-0.33910951018333435,
0.13529494404792786,
0.28706490993499756,
0.07853124290704727,
0.2601461112499237,
-0.2787840962409973,
-0.001945633441209793,
-0.014338904991745949,
0.14392805099487305,
0.40381404757499695,
0.04539820924401283,
0.10766620934009552,
0.04843098297715187,
0.05432486534118652,
-0.2885257303714752,
0.15902172029018402,
0.014194674789905548,
-0.0754743218421936,
0.22077849507331848,
0.12797081470489502,
-0.15276959538459778,
-0.12732043862342834,
0.028189631178975105,
0.011863034218549728,
-0.08291417360305786,
0.01761770248413086,
0.020462535321712494,
0.09355143457651138,
-0.3534315228462219,
0.6511549949645996,
-0.21352432668209076,
0.3303191065788269,
-0.4098541736602783,
0.31914854049682617,
0.26558253169059753,
-0.20557045936584473,
0.330650269985199,
-0.028565648943185806,
0.40957215428352356,
0.0787227526307106,
-0.009647663682699203,
0.4893660247325897,
-0.1775600165128708,
0.31364282965660095,
0.15041059255599976,
0.07618175446987152,
0.37186816334724426,
-0.0406486913561821,
-0.18454405665397644,
-0.11051410436630249,
-0.1071634441614151,
0.07860352843999863,
0.07524879276752472,
0.16725414991378784,
-0.20867064595222473,
0.276738703250885,
0.19121070206165314,
0.3572307229042053,
0.16338856518268585,
0.20940670371055603,
-0.23248887062072754,
0.09987440705299377,
0.4095522463321686,
-0.023355966433882713,
0.1845775842666626,
0.14176639914512634,
-0.3438040018081665,
0.0417972132563591,
0.020726006478071213,
-0.01702876016497612,
0.017278460785746574,
0.24636396765708923,
-0.17327891290187836,
-0.05267995595932007,
0.21483340859413147,
0.29279541969299316,
0.30839061737060547,
-0.06165790930390358,
-0.14914679527282715,
0.026728695258498192,
-0.12757231295108795,
-0.1684267520904541,
0.3210414946079254,
0.3712770342826843,
-0.08640669286251068,
0.2834063768386841,
0.10521852970123291,
-0.06639612466096878,
-0.4625815451145172,
-0.13998320698738098,
0.11659596115350723,
0.18084947764873505,
-0.612250804901123,
0.14959612488746643,
-0.2159741222858429,
-0.16699206829071045,
-0.2239597886800766,
0.04878241568803787,
-0.42752689123153687,
-0.3954008221626282,
-0.07361836731433868,
0.2628181576728821,
-0.44333603978157043,
-0.0038208812475204468,
-0.2800581455230713,
0.33701324462890625,
0.017631560564041138,
0.29494214057922363,
0.05060480535030365,
-0.10700035840272903,
-0.08237345516681671,
-0.09216105937957764,
0.10486789047718048,
-0.30124181509017944,
0.12147880345582962,
-0.22688496112823486,
0.13715732097625732,
-0.5803179740905762,
-0.1423576921224594,
0.3004574775695801,
0.07903420180082321,
0.12404653429985046,
0.08588050305843353,
0.13927213847637177,
-0.22440552711486816,
-0.16106274724006653,
0.13689298927783966,
0.1888943314552307,
0.08987265080213547,
0.26420140266418457,
-0.062311042100191116,
0.08602101355791092,
0.1270870715379715,
0.028624296188354492,
0.16411304473876953,
-0.4027656614780426,
0.2627314031124115,
-0.193173348903656,
0.18966515362262726,
-0.1445847898721695,
-0.11715415120124817,
0.019943691790103912,
-0.14017324149608612,
-0.012395823374390602,
-0.0659443736076355,
-0.8555179238319397,
0.3188782334327698,
-0.10088853538036346,
-0.2066129893064499,
-0.0030669420957565308,
0.16384945809841156,
0.12470357120037079,
0.3376142084598541,
-0.4241468906402588,
-0.26946866512298584,
-0.22868098318576813,
-0.06590334326028824,
-0.15028557181358337,
0.1089400127530098,
-0.003155849874019623,
-0.15887629985809326,
0.01584462821483612,
-0.03151727840304375,
0.04305429756641388,
0.18267321586608887,
0.2849319577217102,
0.23950356245040894,
-0.026885105296969414,
0.4528467357158661,
0.005732789635658264,
0.3141430616378784,
0.3306630253791809,
0.2839587330818176,
0.5497276186943054,
-0.0018575415015220642,
0.2872813045978546,
0.1868283599615097,
-0.05232542008161545,
0.03644433245062828,
-0.1970205307006836,
-0.14365491271018982,
0.254458487033844,
0.13426965475082397,
0.21452727913856506,
-0.19766682386398315,
-0.24735745787620544,
0.01562592387199402,
-0.22945502400398254,
0.026850489899516106,
-0.48607173562049866,
0.2694200873374939,
0.08030916750431061,
0.041126884520053864,
0.15169356763362885,
-0.08215107768774033,
-0.06762069463729858,
0.08130106329917908,
0.16521668434143066,
0.028559528291225433,
-0.03482794016599655,
-0.008382786065340042,
-0.4206946790218353,
0.09163278341293335,
0.09905307739973068,
0.7096068263053894,
-0.0615299716591835,
-0.12938912212848663,
0.2116037905216217,
0.010657928884029388,
0.39509162306785583,
-0.3172484040260315,
0.012574898079037666,
-0.2421964406967163,
0.04231882095336914,
-0.5206639766693115,
-0.0050808340311050415,
-0.004529736936092377,
0.32748132944107056,
0.2589341402053833,
0.4298582673072815,
-0.4116394519805908,
-0.04754411056637764,
0.0803312435746193,
-0.2097700983285904,
-0.04071522131562233,
0.1626887172460556,
-0.47547170519828796,
-0.2500946521759033,
-0.14146867394447327,
0.07308825105428696,
0.2419528365135193,
0.0035720691084861755,
-0.2041843831539154,
0.28397437930107117,
-0.044327471405267715,
-0.015516042709350586,
0.1918792426586151,
-0.03469420596957207,
0.3075754642486572,
-0.3205716609954834,
0.43420541286468506,
0.34288352727890015,
0.5453113913536072,
0.13054607808589935,
0.7411035299301147,
0.008386833593249321,
-0.6654378175735474,
0.3813937306404114,
0.2571749687194824,
0.2564491927623749,
0.606289267539978,
-0.03342883288860321,
0.1426626741886139,
0.10491780936717987,
0.32428258657455444,
-0.14262592792510986,
0.16808241605758667,
0.33423516154289246,
-0.18668141961097717,
-0.4840812683105469,
-0.08128422498703003,
0.3273612856864929,
-0.005633346736431122,
-0.018827445805072784,
0.12816433608531952,
0.3300391733646393,
-0.08899201452732086,
0.006897959858179092,
0.03414777293801308,
1.019761323928833,
0.053157221525907516,
0.21712079644203186,
0.09811221808195114,
-0.2882554233074188,
0.5061947107315063,
-0.3468606472015381,
0.12844529747962952,
-0.4757455885410309,
-0.10918602347373962,
-0.01360352337360382,
-0.09119898080825806,
-0.10634923726320267,
-0.05248023942112923,
-0.028233066201210022,
0.32107552886009216,
-0.017837367951869965,
0.4316791892051697,
0.09291714429855347,
0.16111144423484802,
-0.4321517050266266,
-0.14563791453838348,
-0.4679882228374481,
-0.04537387564778328,
-0.2641971707344055,
-0.036326318979263306,
-0.13536086678504944,
-0.13826924562454224,
0.10615428537130356,
-0.4177361726760864,
-0.20005109906196594,
-0.00033511966466903687,
-0.10809265077114105,
0.23594655096530914,
0.05139743536710739,
-0.3846437335014343,
-0.09776482731103897,
-0.046796396374702454,
0.05883149057626724,
-0.10908280313014984,
-0.05633845925331116,
0.29460397362709045,
-0.10369241237640381,
0.25387072563171387,
0.008054818958044052,
-0.10652114450931549,
0.1780494898557663,
0.0226130411028862,
-0.11851784586906433,
0.17838791012763977,
-0.03330677002668381,
-0.0030749067664146423,
-0.30997976660728455,
0.19416624307632446,
0.10190753638744354,
-0.1199241429567337,
0.17343232035636902,
-0.1859561800956726,
-0.1432022750377655,
-0.2118232697248459,
-0.042621396481990814,
0.13449102640151978,
-0.10999070852994919,
0.09605901688337326,
0.05924689769744873,
-0.3104195296764374,
-0.07502275705337524,
0.5249305367469788,
-0.15637975931167603,
-0.023470886051654816,
0.16096079349517822,
0.11795837432146072,
-0.30359235405921936,
0.029589585959911346,
0.18040309846401215,
-0.11649274080991745,
-0.5765732526779175,
0.15966321527957916,
-0.2519155442714691,
-0.015898793935775757,
-0.22581864893436432,
-0.0486895926296711,
-0.008237045258283615,
-0.04696470871567726,
-0.1391143500804901,
-0.2623436152935028,
-0.07387153059244156,
0.32643502950668335,
-0.07572051137685776,
-0.04779554903507233,
0.07069860398769379,
-0.09862690418958664,
0.08551457524299622,
-0.18132412433624268,
-0.0911041721701622,
0.27499204874038696,
-0.08627867698669434,
0.1121857613325119,
0.013174600899219513,
-0.14820066094398499,
0.23615092039108276,
-0.23861165344715118,
-0.20424272119998932,
0.2226412147283554,
0.06953206658363342,
0.061504825949668884,
-0.166920006275177,
0.22030295431613922,
0.09317873418331146,
-0.27773547172546387,
-0.34477245807647705,
0.06736557185649872,
0.035880133509635925,
0.09807208180427551,
0.21973396837711334,
0.3733527362346649,
-0.004801902920007706,
-0.5639166831970215,
0.1510172188282013,
-0.09470643848180771,
-0.2933691442012787,
0.40253451466560364,
0.14065779745578766,
0.3823642432689667,
0.011888597160577774,
0.17359128594398499,
0.0007951259613037109,
-0.16897563636302948,
0.14607955515384674,
0.2095707207918167,
0.3190028667449951,
-0.16734574735164642,
0.24086084961891174,
-0.4783458411693573,
0.09576575458049774,
0.04329719394445419,
0.1891784965991974,
0.4678424596786499,
-0.09056324511766434,
-0.4894031286239624,
0.18036586046218872,
0.015209009870886803,
0.09686841070652008,
-0.26079145073890686,
0.10626772046089172,
0.07290369272232056,
-0.07329972088336945,
0.0849592536687851,
0.25038355588912964,
-0.3534901738166809,
-0.295000821352005,
0.29196488857269287,
0.5073562264442444,
0.2431287169456482,
0.19352246820926666,
0.23567581176757812,
0.18957629799842834,
0.10859668254852295,
-0.13063450157642365,
-0.05761494114995003,
0.06744387000799179,
0.4154256582260132,
-0.05511883273720741,
0.15863031148910522,
0.0007302723824977875,
-0.13447131216526031,
0.258188933134079,
-0.4820250868797302,
-0.2258700132369995,
0.10853177309036255,
-0.2744225859642029,
0.08310365676879883,
-0.2313379943370819,
0.7644414305686951,
0.09496366232633591,
-0.06422585994005203,
-0.3673376739025116,
0.27588579058647156,
-0.15686926245689392,
-0.08982204645872116,
-0.0481451116502285,
-0.20955924689769745,
-0.18224412202835083,
0.3722248375415802,
-0.07823806256055832,
0.27425533533096313,
0.14035704731941223,
0.20170211791992188,
0.19801174104213715,
-0.30333971977233887,
-0.012817848473787308,
0.3088618218898773,
0.3186323940753937,
-0.1443990021944046,
0.4410896897315979,
0.6181504130363464,
-0.12263123691082001,
0.3608301877975464,
0.01645803265273571,
0.5661805272102356,
0.10305178165435791,
-0.07626405358314514,
0.18596620857715607,
0.09776881337165833,
0.2110048532485962,
-0.022475555539131165,
0.09037983417510986,
-0.15529479086399078,
-0.16951121389865875,
0.35793977975845337,
-0.009985620155930519,
-0.041285451501607895,
0.052751604467630386,
-0.2274063527584076,
0.16304843127727509,
-0.1524517685174942,
0.16100265085697174,
-0.32655203342437744,
-0.025905422866344452,
-0.22791306674480438,
-0.16830086708068848,
-0.4317322075366974,
0.12829338014125824,
0.4793339967727661,
-0.16311612725257874,
0.007963061332702637,
-0.16751742362976074,
-0.0529576912522316,
-0.13345055282115936,
0.9205738306045532,
0.2560823857784271,
-0.21817532181739807,
-0.24679982662200928,
-0.3968575596809387,
-0.3903970718383789,
0.15272361040115356,
-0.1467907428741455,
0.15076538920402527,
0.10183476656675339,
0.2021477222442627,
-0.3132683336734772,
0.20067967474460602,
0.10606424510478973,
0.2352461814880371,
-0.5360376834869385,
0.34090471267700195,
-0.10899443924427032,
-0.04042832553386688,
-0.05499086529016495,
0.038410983979701996,
-0.07540322840213776,
-0.0892721489071846,
0.48329365253448486,
0.29282504320144653,
-0.12660017609596252,
0.14312633872032166,
-0.15975388884544373,
-0.2924485206604004,
-0.47435837984085083,
-0.0570555254817009,
0.31711554527282715,
0.30722537636756897,
0.10390964150428772,
-0.3858226537704468,
-0.3338167667388916,
-0.5497469902038574,
-0.03785398229956627,
0.0984053909778595,
-0.08973702043294907,
0.34696164727211,
0.051265276968479156,
-0.14142708480358124,
-0.22974924743175507,
0.4220114052295685,
0.07918164134025574,
0.06415876746177673,
-0.14108118414878845,
-0.1482563465833664,
0.06182734668254852,
0.27667471766471863,
0.11395929753780365,
0.44164493680000305,
0.10638823360204697,
0.31401628255844116,
-0.07405323535203934,
-0.7448225617408752,
0.5567172169685364,
-0.4150905907154083,
-0.05144559219479561,
-0.2703673839569092,
0.46540409326553345,
0.6008333563804626,
-0.00043955445289611816,
-0.26801174879074097,
-0.07360287010669708,
0.07351283729076385,
-0.033120956271886826,
-0.01746033877134323,
0.05493350327014923,
-0.08129412680864334,
-0.1256699413061142,
-0.013926409184932709,
-0.194503054022789,
0.10245335102081299,
-0.28349098563194275,
0.4803299307823181,
-0.11475228518247604
] |
https://github.com/huggingface/datasets/issues/6568 | Seems like I just used the old code which did not have `keep_in_memory=True` argument, sorry.
Although i encountered a different problem – at 97% my python process just hung for around 11 minutes with no logs (when running dataset.map without `keep_in_memory=True` over around 3 million of dataset samples)... | keep_in_memory=True does not seem to work | UPD: [Fixed](https://github.com/huggingface/datasets/issues/6568#issuecomment-1880817794) . But a new issue came up :( | 48 | keep_in_memory=True does not seem to work
UPD: [Fixed](https://github.com/huggingface/datasets/issues/6568#issuecomment-1880817794) . But a new issue came up :(
Seems like I just used the old code which did not have `keep_in_memory=True` argument, sorry.
Although i encountered a different problem – at 97% my python process just hung for around 11 minutes with no logs (when running dataset.map without `keep_in_memory=True` over around 3 million of dataset samples)... | [
-0.5037835240364075,
-0.29181116819381714,
-0.12347058951854706,
0.014672212302684784,
0.3082585036754608,
-0.032749563455581665,
0.06944156438112259,
0.22768092155456543,
0.14811402559280396,
0.21746718883514404,
-0.13731825351715088,
0.2877124547958374,
-0.2045990377664566,
0.29882973432540894,
-0.12862589955329895,
0.15352129936218262,
0.10632164776325226,
0.0549330897629261,
-0.16557031869888306,
-0.007164791226387024,
-0.275452584028244,
0.11598708480596542,
-0.3187810778617859,
-0.18235576152801514,
-0.30599239468574524,
-0.05199853330850601,
0.0767739936709404,
-0.04706953093409538,
-0.07505758851766586,
-0.3602343201637268,
0.12010399997234344,
0.07784105837345123,
-0.24763518571853638,
0.4803788959980011,
-0.00010249038314213976,
0.05173367261886597,
0.38155660033226013,
0.12593665719032288,
-0.22589443624019623,
-0.01163455843925476,
0.02087462693452835,
-0.1546342521905899,
0.020442768931388855,
-0.028541482985019684,
-0.1147371381521225,
-0.007442742586135864,
0.14353220164775848,
-0.3624698519706726,
0.42005354166030884,
0.008349470794200897,
0.3454478979110718,
0.44653603434562683,
0.12267833948135376,
-0.07657814025878906,
0.04115266352891922,
0.12131746858358383,
-0.06549707055091858,
0.09637050330638885,
0.14788833260536194,
-0.2264476716518402,
-0.06817632913589478,
0.4063165485858917,
-0.08390946686267853,
0.12046931684017181,
0.04752999544143677,
-0.02551751211285591,
-0.18666592240333557,
-0.26629799604415894,
0.2845291793346405,
0.13695552945137024,
0.1279313564300537,
-0.17488320171833038,
-0.2890092730522156,
-0.33573609590530396,
-0.1848001629114151,
-0.2687380313873291,
0.12658408284187317,
0.1439673900604248,
-0.2822686731815338,
0.06144312396645546,
-0.36983293294906616,
-0.12365024536848068,
0.014212250709533691,
-0.04472370818257332,
-0.21047541499137878,
0.050871800631284714,
-0.18978899717330933,
0.06323596090078354,
0.3802511990070343,
-0.08110573142766953,
-0.35178712010383606,
0.10103416442871094,
-0.028701800853013992,
-0.059580959379673004,
-0.46616071462631226,
0.00981517881155014,
0.3747028410434723,
0.21672427654266357,
0.3365113139152527,
-0.1387670934200287,
-0.11491270363330841,
0.15411892533302307,
0.13596759736537933,
0.10210546851158142,
0.27772149443626404,
0.13400542736053467,
-0.051819853484630585,
0.10614444315433502,
0.556812584400177,
-0.032551560550928116,
-0.2049024999141693,
0.005117945373058319,
0.23321190476417542,
-0.3166777491569519,
0.26170647144317627,
-0.2650798559188843,
0.3934401571750641,
-0.19274738430976868,
-0.04550008103251457,
0.20194798707962036,
0.029496125876903534,
0.16796602308750153,
-0.03512465953826904,
0.4332428276538849,
-0.01847190223634243,
-0.03628198057413101,
0.17418722808361053,
-0.18730951845645905,
-0.34913548827171326,
0.0979585349559784,
-0.29705682396888733,
-0.016252560541033745,
-0.3040006756782532,
-0.061237409710884094,
0.17442210018634796,
-0.10713164508342743,
0.4727219045162201,
0.015944499522447586,
-0.008489884436130524,
0.10230370610952377,
0.1679242104291916,
-0.27985307574272156,
0.3125671148300171,
0.41218429803848267,
-0.029335398226976395,
0.1622910350561142,
-0.09403269737958908,
0.08778363466262817,
-0.056810662150382996,
0.2851606607437134,
0.11636726558208466,
-0.20394299924373627,
0.22161875665187836,
0.25072991847991943,
-0.06944964081048965,
-0.009664701297879219,
-0.3128071129322052,
0.08037739992141724,
0.2942344844341278,
0.10249489545822144,
-0.007904447615146637,
-0.13010725378990173,
-0.17004132270812988,
-0.06660006195306778,
0.27546417713165283,
0.42602062225341797,
-0.11877154558897018,
-0.0020347759127616882,
-0.01682627573609352,
-0.182029128074646,
-0.06496299803256989,
0.3628074824810028,
0.02607591077685356,
-0.015502702444791794,
-0.2541733384132385,
0.07615940272808075,
-0.053491994738578796,
-0.17528733611106873,
-0.331194132566452,
0.026325900107622147,
-0.07935549318790436,
-0.08663555234670639,
-0.17194151878356934,
0.06138676032423973,
0.24843257665634155,
0.19773660600185394,
0.20281851291656494,
0.04844822362065315,
-0.031241081655025482,
0.289880633354187,
-0.23708689212799072,
-0.19826176762580872,
0.011494047939777374,
0.2366209626197815,
0.06873974949121475,
-0.22341319918632507,
-0.010081678628921509,
-0.008416388183832169,
0.35756585001945496,
0.023582955822348595,
0.11322606354951859,
0.28546881675720215,
0.3423699736595154,
-0.14166922867298126,
-0.11809144914150238,
-0.2589459717273712,
-0.30100369453430176,
0.09711018204689026,
0.17341238260269165,
0.04815123602747917,
-0.182968407869339,
-0.1040821373462677,
0.018674444407224655,
0.0784032940864563,
-0.16008713841438293,
-0.25850796699523926,
0.21190384030342102,
-0.06875165551900864,
0.061140745878219604,
0.27127689123153687,
-0.19948896765708923,
0.10204306989908218,
0.053478024899959564,
0.0910709798336029,
-0.4021000266075134,
0.09747209399938583,
0.057586729526519775,
-0.3263404667377472,
0.1574302464723587,
-0.017799928784370422,
-0.02998247742652893,
0.02806267887353897,
-0.1119438111782074,
0.3463819622993469,
0.06389184296131134,
0.24642038345336914,
-0.1228875145316124,
0.01206786185503006,
0.1828273981809616,
0.018889382481575012,
0.14156723022460938,
-0.06921269744634628,
-0.034042540937662125,
0.029617831110954285,
-0.1243840754032135,
0.11718631535768509,
0.09383618831634521,
0.279622346162796,
0.16721075773239136,
-0.07576820999383926,
0.17763996124267578,
-0.03113037720322609,
-0.09498333930969238,
-0.11115729063749313,
0.257642924785614,
0.09155549108982086,
0.32346364855766296,
0.09076488763093948,
-0.259543776512146,
0.10810630023479462,
0.617824137210846,
0.028561294078826904,
0.07363233715295792,
0.1169939637184143,
-0.179660826921463,
-0.15384188294410706,
0.2524823248386383,
0.015807025134563446,
0.32683002948760986,
0.3379792273044586,
0.24769265949726105,
0.05354958772659302,
-0.02901756577193737,
-0.09096819162368774,
0.2468603253364563,
0.08491726964712143,
0.008602172136306763,
0.09967860579490662,
0.2151777744293213,
-0.3715510368347168,
-0.5469002723693848,
0.0346808135509491,
-0.03272368386387825,
0.1422475129365921,
-0.10581126064062119,
-0.2109609842300415,
-0.24948765337467194,
-0.057516686618328094,
0.06798112392425537,
0.10242906212806702,
-0.2720481753349304,
-0.33172324299812317,
0.001983080990612507,
0.2822442352771759,
-0.28525155782699585,
0.4085726737976074,
0.07176724076271057,
0.11249257624149323,
0.22510981559753418,
-0.016614684835076332,
-0.22440806031227112,
-0.27750182151794434,
-0.00600481079891324,
0.1291276216506958,
0.08510399609804153,
-0.10035504400730133,
0.5298952460289001,
0.09763221442699432,
-0.20158971846103668,
-0.200644388794899,
-0.2721961736679077,
0.14775536954402924,
-0.13437415659427643,
0.1843968778848648,
0.15815040469169617,
0.42412635684013367,
0.06060586869716644,
0.12339504808187485,
0.2645522356033325,
-0.5142367482185364,
-0.2351801097393036,
-0.08321066200733185,
0.19927069544792175,
-0.025635601952672005,
-0.21625405550003052,
-0.1785011738538742,
-0.2061380296945572,
-0.48711687326431274,
0.5636680126190186,
-0.12480546534061432,
-0.07927583158016205,
0.2872636020183563,
0.2601504325866699,
0.2077801674604416,
-0.15376439690589905,
-0.04750952869653702,
-0.390525758266449,
-0.3946371078491211,
0.22795408964157104,
-0.29259729385375977,
-0.27530840039253235,
0.05064105987548828,
0.22150984406471252,
0.02028309367597103,
0.09739787876605988,
-0.4046177268028259,
-0.3588367700576782,
-0.5100377798080444,
0.16217543184757233,
0.0861155092716217,
0.24100494384765625,
0.19848985970020294,
-0.01637454517185688,
-0.30279189348220825,
-0.05008368939161301,
-0.22608640789985657,
0.17892886698246002,
-0.06042816862463951,
-0.08375898003578186,
-0.01067289337515831,
0.3854925334453583,
0.1806248277425766,
0.3795938789844513,
0.2953445017337799,
0.10525007545948029,
0.002298913896083832,
-0.12453220784664154,
0.5051476955413818,
-0.4441539943218231,
-0.21181423962116241,
0.0798448845744133,
-0.050797730684280396,
-0.16854476928710938,
0.10784901678562164,
0.16535402834415436,
-0.11203564703464508,
-0.007048264145851135,
-0.1728724241256714,
0.059797510504722595,
-0.3547194004058838,
-0.024076813831925392,
0.2956535220146179,
0.04113934561610222,
0.12917287647724152,
0.1363878846168518,
-0.13128727674484253,
-0.12569560110569,
0.14100036025047302,
-0.05080053582787514,
0.07478632032871246,
-0.2715843915939331,
-0.3536982536315918,
0.06126852706074715,
-0.8544574975967407,
0.26988595724105835,
-0.1572260707616806,
0.23292607069015503,
-0.0732157826423645,
-0.14698779582977295,
-0.01663810759782791,
-0.06641952693462372,
0.6519909501075745,
-0.00793717335909605,
0.06317823380231857,
-0.05014696717262268,
-0.22777003049850464,
-0.27645859122276306,
0.22391757369041443,
-0.12094287574291229,
0.1789100468158722,
0.17272445559501648,
0.3531675338745117,
-0.2728424668312073,
-0.15393519401550293,
0.2190573811531067,
0.15408316254615784,
-0.0406566821038723,
-0.057800501585006714,
-0.318667471408844,
-0.3207644522190094,
-0.2622770071029663,
0.20975475013256073,
0.2436915785074234,
-0.2072480320930481,
-0.0009195581078529358,
-0.3772742450237274,
-0.11469153314828873,
-0.2725306749343872,
-0.00763113796710968,
0.07197390496730804,
0.3255554437637329,
-0.02693270891904831,
0.3300155997276306,
0.24896548688411713,
-0.017146524041891098,
0.25573286414146423,
0.4418405294418335,
-0.27755680680274963,
0.0002685263752937317,
0.08773814141750336,
-0.006728176027536392,
0.302693247795105,
0.33157455921173096,
-0.0797237753868103,
0.15631398558616638,
-0.07230626046657562,
0.491380512714386,
-0.4566209316253662,
0.17741602659225464,
0.183791846036911,
0.37590208649635315,
-0.2085428237915039,
-0.2014622688293457,
0.30624592304229736,
0.15685006976127625,
0.03388592600822449,
0.3972787857055664,
-0.0000805780291557312,
-0.30822208523750305,
0.19613124430179596,
-0.08129627257585526,
0.7626072764396667,
-0.16925878822803497,
0.2584724426269531,
0.16896715760231018,
-0.0026512891054153442,
0.17371414601802826,
-0.04340082406997681,
0.06885514408349991,
-0.26657044887542725,
-0.26475054025650024,
0.13297145068645477,
0.0028564780950546265,
0.18094202876091003,
-0.1626219004392624,
-0.04724786430597305,
0.10726289451122284,
0.14924558997154236,
0.18457376956939697,
-0.34440386295318604,
0.1924269050359726,
-0.027025854215025902,
-0.3089561462402344,
-0.38095682859420776,
0.30860990285873413,
0.18177610635757446,
-0.029269905760884285,
-0.04876795783638954,
0.07350486516952515,
0.19542743265628815,
-0.13735555112361908,
-0.1495414674282074,
-0.04636796563863754,
-0.2537527084350586,
0.26689133048057556,
-0.1418142169713974,
-0.07040712237358093,
-0.17056694626808167,
0.06923562288284302,
0.04971325024962425,
0.30272597074508667,
-0.04199014604091644,
0.23120395839214325,
-0.07552269846200943,
0.11896444857120514,
0.03777359053492546,
-0.0011169835925102234,
0.1719733029603958,
0.007792025804519653,
-0.22227123379707336,
-0.004374286159873009,
-0.12217199057340622,
-0.2525942027568817,
-0.07389409840106964,
0.02596125565469265,
-0.18842823803424835,
-0.22233858704566956,
-0.005762241780757904,
-0.051758185029029846,
-0.07042296230792999,
-0.1439674198627472,
0.21556447446346283,
0.2369375079870224,
-0.03340299800038338,
0.4123642146587372,
0.01480117253959179,
-0.24706321954727173,
-0.13690605759620667,
0.4746687114238739,
-0.1341458559036255,
0.3414495587348938,
0.33177924156188965,
0.09954883903265,
-0.3330954611301422,
-0.2995886504650116,
0.01381133496761322,
0.16365090012550354,
-0.05590495467185974,
0.48369142413139343,
0.07760006189346313,
0.04530663788318634,
0.03695300593972206,
0.08588850498199463,
-0.1446191519498825,
-0.20436275005340576,
-0.001203484833240509,
-0.11804617196321487,
-0.6011271476745605,
0.19207319617271423,
-0.02760440669953823,
0.4238705337047577,
-0.0036136656999588013,
0.07775299996137619,
-0.0235418900847435,
-0.035572610795497894,
-0.4508097171783447,
-0.08985385298728943,
-0.26987355947494507,
0.08033104240894318,
0.2636842727661133,
-0.2233455628156662,
0.29157212376594543,
-0.2038598656654358,
0.19257313013076782,
0.4304125905036926,
-0.2724350094795227,
-0.34627532958984375,
-0.008782241493463516,
0.04258604347705841,
-0.052871428430080414,
-0.08669914305210114,
0.126791849732399,
-0.16512559354305267,
0.012739578261971474,
-0.25218769907951355,
0.33505678176879883,
0.2384990006685257,
0.014188585802912712,
0.05907053500413895,
0.07551383227109909,
-0.0015271548181772232,
0.36171871423721313,
0.16706426441669464,
-0.0031859204173088074,
-0.16586825251579285,
0.04243805259466171,
0.0024740202352404594,
-0.10864343494176865,
0.011339791119098663,
0.0594964437186718,
0.04019976779818535,
0.02737155370414257,
0.06662856042385101,
0.23155297338962555,
-0.09048689901828766,
-0.29589521884918213,
0.2109367996454239,
0.6399414539337158,
0.38284119963645935,
-0.11719780415296555,
-0.17746055126190186,
0.2689012289047241,
0.3647826015949249,
-0.31351885199546814,
0.0211675763130188,
0.2580697238445282,
-0.06566942483186722,
0.3154837489128113,
0.13210166990756989,
-0.0930526852607727,
0.14854483306407928,
-0.004576206207275391,
0.29431191086769104,
0.31831908226013184,
-0.29743343591690063,
0.05174177885055542,
-0.060806650668382645,
0.018626883625984192,
-0.05768538638949394,
0.3913150727748871,
0.3816699981689453,
0.30679047107696533,
0.4986681640148163,
-0.11099377274513245,
0.2365117371082306,
-0.16926181316375732,
0.2737438380718231,
-0.1957969069480896,
-0.3212488293647766,
0.18562862277030945,
0.36194324493408203,
-0.3765043616294861,
0.1629592478275299,
0.017665740102529526,
0.35642173886299133,
-0.20900914072990417,
-0.29626038670539856,
-0.22838540375232697,
0.4613748788833618,
-0.23948198556900024,
-0.17476786673069,
0.3602641820907593,
-0.08141003549098969,
0.005210086703300476,
0.22175699472427368,
0.1276531219482422,
-0.1387622356414795,
0.37165367603302,
0.001034887507557869,
-0.02970051020383835,
-0.21938855946063995,
-0.07491305470466614,
-0.09473404288291931,
0.29985663294792175,
-0.1543775498867035,
-0.06496413797140121,
-0.013350024819374084,
0.034999191761016846,
-0.22657500207424164,
0.3398306965827942,
0.34870773553848267,
0.201370969414711,
-0.15565872192382812,
0.19235140085220337,
-0.007483590394258499,
-0.05460526421666145,
-0.33466339111328125,
0.2736705243587494,
-0.03377041593194008,
0.15181699395179749,
0.22000929713249207,
0.24566082656383514,
-0.29664671421051025,
0.0717356875538826,
0.011998878791928291,
0.08555460721254349,
-0.3438021242618561,
0.10637839138507843,
0.13648010790348053,
-0.30720484256744385,
-0.23070216178894043,
-0.34896519780158997,
-0.35805797576904297,
-0.14737752079963684,
0.1818852424621582,
-0.42975714802742004,
0.10976926982402802,
-0.27157872915267944,
0.16410747170448303,
-0.0938938558101654,
0.4737684726715088,
0.07643100619316101,
-0.02416757121682167,
-0.20770014822483063,
-0.054441675543785095,
-0.7003724575042725,
-0.1550997644662857,
-0.2110345959663391,
-0.09320367127656937,
-0.17945316433906555,
0.14064714312553406,
-0.04602175951004028,
-0.016240524128079414,
0.10612793266773224,
-0.17342545092105865,
0.010475825518369675,
-0.02488798275589943,
-0.24906224012374878,
0.059487901628017426,
-0.20165716111660004,
-0.08984234184026718,
0.2186451107263565,
-0.3949018716812134,
0.1505843997001648,
-0.20553404092788696,
0.142907053232193,
-0.09532414376735687,
0.1988769769668579,
-0.027684848755598068,
0.037868354469537735,
0.4251376986503601,
0.12305150926113129,
-0.006416656076908112,
-0.11994977295398712,
-0.20152175426483154,
-0.20024311542510986,
-0.1711677610874176,
-0.162582665681839,
-0.17853830754756927,
0.05197589099407196,
0.3508046269416809,
-0.17110295593738556,
-0.33817681670188904,
-0.20157423615455627,
0.12113184481859207,
0.05710804462432861,
-0.06887851655483246,
0.04046206176280975,
0.19910332560539246,
0.17954784631729126,
0.09737157821655273,
0.008256234228610992,
0.4219166040420532,
-0.12768298387527466,
0.1378035992383957,
-0.38622230291366577,
-0.4040508270263672,
0.4103242754936218,
-0.38890311121940613,
-0.281185507774353,
-0.10803684592247009,
0.21590906381607056,
0.12759673595428467,
-0.3243325650691986,
-0.577500581741333,
0.02792412042617798,
0.15833619236946106,
0.04595794156193733,
-0.3311629891395569,
0.32235509157180786,
-0.1471520960330963,
-0.03419409319758415,
-0.15183308720588684,
0.5162773132324219,
0.18694309890270233,
-0.34409549832344055,
0.3139776885509491,
-0.09894512593746185
] |
https://github.com/huggingface/datasets/issues/6568 | Can you open a new issue and provide a bit more details ? What kind of map operations did you run ? | keep_in_memory=True does not seem to work | UPD: [Fixed](https://github.com/huggingface/datasets/issues/6568#issuecomment-1880817794) . But a new issue came up :( | 22 | keep_in_memory=True does not seem to work
UPD: [Fixed](https://github.com/huggingface/datasets/issues/6568#issuecomment-1880817794) . But a new issue came up :(
Can you open a new issue and provide a bit more details ? What kind of map operations did you run ? | [
-0.3748677968978882,
-0.49990132451057434,
-0.11895636469125748,
0.2844051420688629,
0.3289105296134949,
-0.2569744288921356,
0.14168044924736023,
0.1253788322210312,
0.10821300745010376,
0.3469023108482361,
-0.14063313603401184,
0.25066202878952026,
-0.0918361097574234,
0.2976199984550476,
-0.05970807000994682,
0.11980603635311127,
0.020184140652418137,
0.09874440729618073,
-0.3077094852924347,
-0.08217497169971466,
-0.18651646375656128,
0.10428296029567719,
-0.18431994318962097,
-0.1975100338459015,
-0.22302846610546112,
-0.04478062689304352,
-0.05312839895486832,
0.22295349836349487,
-0.14082171022891998,
-0.172740638256073,
0.05876965820789337,
0.07440710067749023,
-0.33300402760505676,
0.2317264974117279,
-0.00009949349623639137,
0.10695318132638931,
0.2392432987689972,
-0.033344343304634094,
-0.11180027574300766,
0.13491690158843994,
-0.06368723511695862,
-0.08409987390041351,
-0.11728879064321518,
-0.056987613439559937,
-0.1339026242494583,
0.11455637216567993,
0.05519378185272217,
-0.27211880683898926,
0.44077417254447937,
-0.02771953120827675,
0.3935902714729309,
0.3193121552467346,
0.1444503664970398,
-0.08760534226894379,
0.09327071160078049,
0.19484363496303558,
-0.009339280426502228,
0.059764761477708817,
0.09506207704544067,
-0.15492451190948486,
-0.08775176107883453,
0.47716453671455383,
-0.035314593464136124,
0.16602446138858795,
0.16720515489578247,
0.06147710233926773,
-0.16606038808822632,
0.00760231539607048,
0.2716730535030365,
0.030725087970495224,
0.0694434642791748,
-0.07590481638908386,
-0.09531305730342865,
-0.25001561641693115,
-0.2844617962837219,
-0.23704548180103302,
0.19374965131282806,
-0.007756344974040985,
-0.2079554796218872,
0.15029707551002502,
-0.22563599050045013,
-0.17801903188228607,
0.0354267954826355,
0.03899544104933739,
-0.14695854485034943,
0.004043370485305786,
-0.21927779912948608,
-0.027474049478769302,
0.46228739619255066,
-0.17522229254245758,
-0.30221083760261536,
0.1759909689426422,
-0.24297748506069183,
-0.006349558010697365,
-0.1693500578403473,
-0.06890831142663956,
0.2765328586101532,
0.16397961974143982,
0.34299081563949585,
-0.05848018825054169,
0.07465203106403351,
0.3174237906932831,
0.14134763181209564,
0.14326652884483337,
0.1401401162147522,
0.2168641835451126,
-0.04168760031461716,
0.06290249526500702,
0.4237405061721802,
0.06119144335389137,
-0.11339814960956573,
-0.1297009140253067,
0.16216987371444702,
-0.1531054973602295,
0.0794273242354393,
-0.2392638772726059,
0.3217742443084717,
-0.21018919348716736,
0.043325915932655334,
0.08401413261890411,
0.08149991929531097,
0.07310082018375397,
-0.0015542879700660706,
0.4603322446346283,
0.06430016458034515,
-0.16522058844566345,
0.09318187087774277,
-0.025729862973093987,
-0.2984858453273773,
-0.033520717173814774,
-0.4251870810985565,
-0.04766687750816345,
-0.2511928975582123,
0.08086544275283813,
0.1321374475955963,
0.054546188563108444,
0.4426302909851074,
-0.03677420690655708,
-0.11032917350530624,
0.01351737231016159,
0.07016069442033768,
-0.14959418773651123,
0.3142413794994354,
0.21540144085884094,
-0.04444519802927971,
0.11243894696235657,
0.04176200181245804,
-0.007434174418449402,
0.13205057382583618,
0.10759931802749634,
-0.0814671590924263,
-0.25155338644981384,
0.17229335010051727,
0.3198665976524353,
0.06748761236667633,
0.00681169331073761,
-0.2521425783634186,
0.1511092483997345,
0.3088558614253998,
0.08793861418962479,
-0.08117102831602097,
0.09702648967504501,
-0.31437087059020996,
-0.048246465623378754,
0.17408348619937897,
0.3933316469192505,
-0.18928280472755432,
-0.10707926005125046,
0.17048028111457825,
-0.19389089941978455,
0.04169483855366707,
0.3848651051521301,
-0.0703044906258583,
-0.14310961961746216,
-0.2738276720046997,
0.2251555621623993,
-0.07737848907709122,
-0.18717651069164276,
-0.44418397545814514,
-0.03084097057580948,
-0.1399168223142624,
-0.1456916630268097,
-0.09291127324104309,
-0.006618265062570572,
0.16789734363555908,
0.30946892499923706,
0.19379255175590515,
-0.015834586694836617,
0.022698184475302696,
0.29488900303840637,
-0.33296728134155273,
-0.019088372588157654,
-0.09127453714609146,
-0.013771101832389832,
0.09452188014984131,
-0.0928717851638794,
0.04939160495996475,
0.1462092399597168,
0.34187427163124084,
-0.02731163054704666,
0.2743295729160309,
0.24584296345710754,
0.3078875243663788,
-0.07638220489025116,
-0.06037742644548416,
-0.09974776208400726,
-0.2770719528198242,
0.04049783945083618,
0.025373131036758423,
0.10520395636558533,
-0.009978193789720535,
-0.05262591317296028,
-0.18285465240478516,
0.021020129323005676,
-0.06413872539997101,
-0.21186500787734985,
0.33505845069885254,
0.060647591948509216,
-0.06413985788822174,
0.08157558739185333,
-0.151872918009758,
0.14147235453128815,
-0.08721660822629929,
0.15396437048912048,
-0.27891525626182556,
0.18211829662322998,
-0.13077057898044586,
-0.3213925361633301,
0.04329301416873932,
0.025691267102956772,
0.02816116251051426,
-0.060166649520397186,
-0.04243973270058632,
0.21091145277023315,
0.046461451798677444,
0.22687038779258728,
-0.16074857115745544,
0.03077729046344757,
0.2094593495130539,
-0.159121572971344,
0.10015396028757095,
-0.22993215918540955,
0.09972051531076431,
-0.10214551538228989,
-0.1055605560541153,
0.13090071082115173,
0.05082041025161743,
0.15172848105430603,
0.1986623853445053,
-0.11737193167209625,
0.09479545801877975,
-0.10457974672317505,
0.09909142553806305,
-0.33087772130966187,
0.20170047879219055,
0.08827519416809082,
0.1987900733947754,
0.22033649682998657,
-0.22513282299041748,
0.16919194161891937,
0.5853829383850098,
0.22418582439422607,
0.13272619247436523,
0.06667323410511017,
-0.15092438459396362,
-0.16630832850933075,
0.1667003333568573,
0.026370033621788025,
0.31463855504989624,
0.3028225898742676,
0.16798333823680878,
0.09962686896324158,
0.08429600298404694,
-0.14295119047164917,
0.20129966735839844,
-0.04737098887562752,
0.01242571696639061,
0.1177787035703659,
0.17907074093818665,
-0.39715656638145447,
-0.741890013217926,
0.2822563648223877,
0.06425460427999496,
0.1937677264213562,
-0.13714057207107544,
-0.17801980674266815,
-0.2891502380371094,
-0.21017678081989288,
0.02487276867032051,
0.06424908339977264,
-0.2890172600746155,
-0.19726233184337616,
0.09362854808568954,
0.3512144088745117,
-0.27291572093963623,
0.34569022059440613,
0.26207348704338074,
0.2179577499628067,
0.0965251624584198,
0.2135656327009201,
-0.1926964819431305,
-0.14052753150463104,
-0.08392749726772308,
0.17928209900856018,
0.03476755693554878,
-0.15021158754825592,
0.3050076961517334,
0.09494802355766296,
-0.15305601060390472,
-0.17369045317173004,
-0.26562753319740295,
0.2324819266796112,
-0.08092355728149414,
0.14995433390140533,
0.08795028924942017,
0.3646423816680908,
-0.15714114904403687,
-0.0008408613502979279,
0.2958933711051941,
-0.4084019064903259,
-0.45488449931144714,
-0.06205182895064354,
0.06918598711490631,
-0.042104337364435196,
-0.33111119270324707,
-0.18451842665672302,
0.04813358932733536,
-0.4370303153991699,
0.5021949410438538,
-0.003763347864151001,
0.034413933753967285,
0.36743223667144775,
0.2332385778427124,
0.058594055473804474,
-0.17019444704055786,
0.01668597012758255,
-0.5375038981437683,
-0.3316696584224701,
0.08801698684692383,
-0.31667959690093994,
-0.3478384017944336,
-0.10026827454566956,
0.15654167532920837,
0.15487056970596313,
0.041570182889699936,
-0.3296569287776947,
-0.4352273941040039,
-0.2598135471343994,
0.09469598531723022,
0.06518875062465668,
0.05064525455236435,
0.2947534918785095,
-0.09153810143470764,
-0.3478730618953705,
-0.20852696895599365,
-0.21337981522083282,
0.3790097236633301,
-0.024777092039585114,
-0.013857003301382065,
-0.09460269659757614,
0.29699456691741943,
0.1745387315750122,
0.37046927213668823,
0.11198122799396515,
0.15887832641601562,
0.28055569529533386,
-0.12015990912914276,
0.4716363549232483,
-0.3175649344921112,
-0.2708582878112793,
0.17388945817947388,
0.08771498501300812,
-0.05868956074118614,
0.15054060518741608,
0.12927907705307007,
-0.1728588193655014,
-0.03204595670104027,
-0.029400087893009186,
0.050916701555252075,
-0.27333328127861023,
-0.04385857284069061,
0.4405304789543152,
-0.017913855612277985,
0.27990972995758057,
0.041510507464408875,
-0.1363847404718399,
-0.07094205915927887,
0.1623205989599228,
-0.1021396666765213,
-0.04872916266322136,
-0.1986662745475769,
-0.37603867053985596,
0.09285014122724533,
-0.7190296053886414,
0.18889279663562775,
-0.13513889908790588,
0.047889698296785355,
-0.2704117000102997,
-0.23312465846538544,
0.090709388256073,
-0.05569418519735336,
0.6433628797531128,
0.04493676871061325,
0.035071082413196564,
-0.07366912066936493,
-0.3152034878730774,
-0.19214758276939392,
0.2501184344291687,
-0.18339887261390686,
0.042923979461193085,
0.16032475233078003,
0.433919757604599,
-0.25621509552001953,
-0.1072407066822052,
0.1266861855983734,
-0.09966431558132172,
-0.19848179817199707,
-0.031896211206912994,
-0.21431802213191986,
-0.31423717737197876,
-0.3234539330005646,
0.12631484866142273,
0.19332754611968994,
-0.010704174637794495,
0.22229886054992676,
-0.3223228454589844,
-0.11214423179626465,
-0.1837804615497589,
-0.0764828622341156,
0.11101874709129333,
0.38737717270851135,
0.02185380458831787,
0.13547348976135254,
0.3103000521659851,
0.08225063979625702,
0.21675749123096466,
0.5323046445846558,
-0.11447488516569138,
0.09063975512981415,
0.06747039407491684,
-0.1502954661846161,
0.2731176018714905,
0.2846755087375641,
-0.04294314235448837,
0.12260738015174866,
0.040077727288007736,
0.3132968246936798,
-0.44377392530441284,
0.23288200795650482,
0.19648021459579468,
0.22749844193458557,
0.08511982858181,
-0.05580989271402359,
0.21171586215496063,
-0.045613981783390045,
-0.07385566830635071,
0.3160918951034546,
0.11918690800666809,
-0.32190370559692383,
0.21477176249027252,
0.13833585381507874,
0.9003668427467346,
-0.08095330744981766,
0.16500461101531982,
0.25271719694137573,
-0.07260031998157501,
0.1203811839222908,
-0.017654970288276672,
0.05572579801082611,
-0.3753812313079834,
-0.2359798103570938,
0.15591421723365784,
0.13105833530426025,
0.031754545867443085,
-0.06130538508296013,
-0.10081803798675537,
-0.1149383932352066,
0.21593095362186432,
0.17602279782295227,
-0.3710457980632782,
-0.14212752878665924,
0.07429290562868118,
-0.3368307650089264,
-0.27613046765327454,
0.3611154854297638,
0.18425512313842773,
0.0489700548350811,
-0.10691791772842407,
0.034355830401182175,
0.19111713767051697,
-0.1827060878276825,
-0.12267729640007019,
-0.04601423442363739,
-0.2539278268814087,
0.31187695264816284,
-0.015798596665263176,
-0.026409178972244263,
-0.3856257200241089,
0.055513493716716766,
0.25987520813941956,
0.1925368309020996,
-0.019032763317227364,
0.14281141757965088,
0.012575547210872173,
0.06477005779743195,
-0.22801923751831055,
0.05705150589346886,
0.19801495969295502,
-0.051251012831926346,
-0.24508124589920044,
-0.07155177742242813,
0.0037471987307071686,
-0.2288733273744583,
-0.21622906625270844,
-0.024608958512544632,
-0.19879278540611267,
-0.24360986053943634,
0.05386435240507126,
-0.0580388680100441,
-0.015586026012897491,
-0.21781571209430695,
0.280256986618042,
0.09962150454521179,
0.012915138155221939,
0.15880462527275085,
0.3157019317150116,
-0.17852945625782013,
-0.08342891931533813,
0.5218777656555176,
0.02153085730969906,
0.16034048795700073,
0.2681378424167633,
0.018735378980636597,
-0.2793113589286804,
-0.37114542722702026,
-0.13900823891162872,
0.11041946709156036,
-0.05842300131917,
0.4223214387893677,
0.12136724591255188,
-0.14382219314575195,
0.010515466332435608,
0.2021077275276184,
-0.02829207479953766,
-0.038415975868701935,
-0.04764683544635773,
-0.06688183546066284,
-0.6658767461776733,
0.18023711442947388,
-0.09829512238502502,
0.39418721199035645,
0.046783447265625,
-0.008384188637137413,
-0.07008335739374161,
0.19735369086265564,
-0.5009440183639526,
-0.01973862573504448,
-0.3363814949989319,
0.12690004706382751,
0.06914544105529785,
-0.30367588996887207,
0.1788996309041977,
-0.1770917773246765,
0.22726261615753174,
0.38700971007347107,
-0.3704051077365875,
-0.40138572454452515,
-0.09558417648077011,
0.0537763386964798,
0.06497800350189209,
-0.12427940964698792,
-0.0010188929736614227,
0.019634217023849487,
-0.06324297189712524,
-0.21778416633605957,
0.38763558864593506,
0.2684803903102875,
0.018301721662282944,
0.05363054573535919,
0.1926758587360382,
-0.017353031784296036,
0.2437094897031784,
-0.02970218099653721,
0.1249745637178421,
-0.04093823954463005,
-0.04316670447587967,
-0.20362889766693115,
-0.2082592397928238,
-0.07187191396951675,
0.1365594118833542,
0.09442894160747528,
0.09903495013713837,
0.039921827614307404,
0.2261071503162384,
-0.14283092319965363,
-0.2722800374031067,
0.20098762214183807,
0.4573427736759186,
0.046297550201416016,
-0.08699226379394531,
-0.07399925589561462,
0.16678595542907715,
0.4242320954799652,
-0.2979971766471863,
-0.05669742822647095,
0.30892837047576904,
-0.140764057636261,
0.23095658421516418,
0.19089072942733765,
0.00873509794473648,
-0.007769830524921417,
0.00786740705370903,
0.23644615709781647,
0.1627102494239807,
-0.34140482544898987,
-0.10350942611694336,
-0.12016530334949493,
-0.196022167801857,
-0.06856545805931091,
0.5251096487045288,
0.3520168364048004,
0.37141093611717224,
0.4246827960014343,
-0.12836144864559174,
0.17384247481822968,
-0.2421666830778122,
0.34189414978027344,
-0.08061868697404861,
-0.38570868968963623,
0.10149133205413818,
0.3660455346107483,
-0.16781461238861084,
0.1670505553483963,
-0.05790604278445244,
0.28311407566070557,
-0.07546212524175644,
-0.27027422189712524,
-0.2291860282421112,
0.3116385340690613,
-0.4151802361011505,
-0.2886396646499634,
0.11867422610521317,
-0.13608548045158386,
-0.07884213328361511,
0.2110448181629181,
0.13462796807289124,
-0.023788508027791977,
0.5373774170875549,
-0.10577210038900375,
-0.07632069289684296,
-0.2881694436073303,
-0.11246801912784576,
0.005937889218330383,
0.22049236297607422,
-0.1491621732711792,
0.1492404043674469,
-0.027791481465101242,
0.04344424232840538,
-0.0559689961373806,
0.38223397731781006,
0.24103599786758423,
0.16030292212963104,
0.10014253854751587,
0.18982166051864624,
-0.09795483946800232,
-0.0850963145494461,
-0.47997620701789856,
0.2872130870819092,
0.09150081872940063,
0.2150365561246872,
0.13874715566635132,
0.2679569125175476,
-0.35277777910232544,
0.14221903681755066,
0.06748749315738678,
0.14847125113010406,
0.00013694167137145996,
-0.07957349717617035,
0.08527970314025879,
-0.15775161981582642,
-0.2124006152153015,
-0.31576284766197205,
-0.25399351119995117,
-0.09405162185430527,
0.05684706196188927,
-0.3796083927154541,
0.29175126552581787,
-0.19724400341510773,
0.16211777925491333,
0.00751156359910965,
0.5201836824417114,
-0.02420702949166298,
-0.25285136699676514,
-0.18261924386024475,
-0.23214930295944214,
-0.6121253371238708,
0.15016776323318481,
-0.06799814105033875,
0.11676298081874847,
-0.18204742670059204,
0.19914200901985168,
-0.03645792230963707,
-0.02579863741993904,
0.09724006056785583,
-0.15668681263923645,
0.050387755036354065,
-0.13580480217933655,
-0.41749653220176697,
-0.02587067522108555,
-0.029584337025880814,
-0.10305605083703995,
0.3333725929260254,
-0.18187487125396729,
0.16874757409095764,
-0.004061322659254074,
0.1887005716562271,
-0.08566159009933472,
0.24665014445781708,
-0.32551997900009155,
0.03417706489562988,
0.4030531644821167,
0.044075652956962585,
0.0268828384578228,
-0.1559140980243683,
-0.1455482691526413,
-0.07062797248363495,
-0.30595308542251587,
-0.23000338673591614,
-0.1390606313943863,
0.09589678794145584,
0.34144651889801025,
-0.1738189160823822,
-0.26223325729370117,
-0.0878981202840805,
0.23286223411560059,
0.14377166330814362,
0.01891370117664337,
-0.08794252574443817,
0.3457202911376953,
0.1719226837158203,
0.0042954012751579285,
0.021373700350522995,
0.31019148230552673,
-0.0015756729990243912,
0.0411088764667511,
-0.2943633794784546,
-0.5705053806304932,
0.4930059611797333,
-0.14320774376392365,
-0.15882840752601624,
-0.02708354964852333,
0.11767958104610443,
0.19851435720920563,
-0.43275848031044006,
-0.7165586352348328,
0.021250203251838684,
0.12633384764194489,
-0.05990437790751457,
-0.27181148529052734,
0.3156498372554779,
-0.2276005893945694,
0.010012470185756683,
-0.16137999296188354,
0.5174587965011597,
0.2719056010246277,
-0.2919190227985382,
0.3250465989112854,
-0.019553717225790024
] |
https://github.com/huggingface/datasets/issues/6568 | Hey. I will try to find some free time to describe it.
(can't do it now, cause i need to reproduce it myself to be sure about everything, which requires spinning a new Azuree VM, copying a huge dataset to drive from network disk for a long time etc...) | keep_in_memory=True does not seem to work | UPD: [Fixed](https://github.com/huggingface/datasets/issues/6568#issuecomment-1880817794) . But a new issue came up :( | 49 | keep_in_memory=True does not seem to work
UPD: [Fixed](https://github.com/huggingface/datasets/issues/6568#issuecomment-1880817794) . But a new issue came up :(
Hey. I will try to find some free time to describe it.
(can't do it now, cause i need to reproduce it myself to be sure about everything, which requires spinning a new Azuree VM, copying a huge dataset to drive from network disk for a long time etc...) | [
-0.30082494020462036,
-0.45631641149520874,
-0.1075349673628807,
0.14783304929733276,
0.19342222809791565,
-0.2760157883167267,
0.03683233633637428,
0.1468944251537323,
-0.1389954388141632,
0.28641635179519653,
-0.086149200797081,
0.16647785902023315,
-0.02673282101750374,
0.308779776096344,
0.10982458293437958,
0.13566145300865173,
0.11805873364210129,
0.03258257359266281,
-0.1588260531425476,
-0.1451004296541214,
-0.13876503705978394,
0.18450148403644562,
-0.20908913016319275,
-0.2822563350200653,
-0.17810991406440735,
-0.031742364168167114,
-0.09117155522108078,
0.2862855792045593,
-0.04851476848125458,
-0.17018002271652222,
-0.030273709446191788,
-0.04936989024281502,
-0.16204065084457397,
0.16443637013435364,
-0.00010415558790555224,
0.08115314692258835,
0.09313318133354187,
-0.03815339505672455,
-0.196955144405365,
0.1811891347169876,
0.07322296500205994,
-0.1597176492214203,
-0.08903101086616516,
0.010793164372444153,
-0.1342519372701645,
0.039286594837903976,
-0.019875241443514824,
-0.43840116262435913,
0.4021068513393402,
0.1610317826271057,
0.3293534517288208,
0.4898652136325836,
0.08364672213792801,
-0.1310565024614334,
-0.006420299410820007,
0.008088544011116028,
-0.17871958017349243,
0.08321470022201538,
0.2768016457557678,
0.022088423371315002,
-0.18897749483585358,
0.4887706935405731,
-0.003937564790248871,
0.2326938509941101,
0.2219928652048111,
0.11044679582118988,
0.11741819977760315,
-0.0029446890112012625,
0.24262815713882446,
-0.04589748755097389,
0.12447568029165268,
-0.17022444307804108,
-0.1788240671157837,
-0.3691335618495941,
-0.16084180772304535,
-0.17972567677497864,
0.2271975576877594,
0.0665130615234375,
-0.2191465049982071,
0.1715533435344696,
-0.15588900446891785,
-0.2868758738040924,
-0.13167192041873932,
0.015659894794225693,
-0.12092848122119904,
-0.09521031379699707,
-0.15469422936439514,
-0.05575023964047432,
0.460716187953949,
-0.07422617077827454,
-0.22442315518856049,
0.12921275198459625,
-0.38639476895332336,
-0.008393021300435066,
-0.383023738861084,
-0.16746786236763,
0.01373199000954628,
-0.03099285066127777,
0.3640015423297882,
0.32378360629081726,
0.2687147855758667,
0.3360629081726074,
0.14563047885894775,
0.07927218079566956,
0.17293564975261688,
0.39807891845703125,
-0.034341614693403244,
-0.14070777595043182,
0.49168431758880615,
0.06886035203933716,
0.08826713263988495,
-0.029713332653045654,
0.1331736147403717,
-0.07159591466188431,
0.2276323437690735,
-0.28528866171836853,
0.3993089497089386,
-0.19939984381198883,
-0.14931076765060425,
0.15259934961795807,
0.0956076830625534,
0.1552804410457611,
0.0620625764131546,
0.39355969429016113,
-0.01843569613993168,
-0.1509016752243042,
0.0068059563636779785,
-0.12237769365310669,
-0.36893388628959656,
-0.275278776884079,
-0.36611485481262207,
-0.05957268178462982,
-0.2968607246875763,
0.10289356112480164,
0.2906438708305359,
-0.09120574593544006,
0.3864310383796692,
-0.10634184628725052,
-0.02152193710207939,
-0.030748490244150162,
0.20423369109630585,
-0.25811460614204407,
0.30397024750709534,
0.1511920690536499,
-0.1180029809474945,
0.01477251946926117,
-0.03111416846513748,
-0.10725144296884537,
0.07505364716053009,
0.15600897371768951,
0.032125912606716156,
-0.3458130359649658,
0.0358567088842392,
0.27961114048957825,
0.05277150124311447,
-0.09402617812156677,
-0.2259427011013031,
0.19421780109405518,
0.17876474559307098,
0.04344383627176285,
-0.028428856283426285,
0.06591200828552246,
-0.10802589356899261,
0.03243575617671013,
0.19694694876670837,
0.20493772625923157,
-0.34853652119636536,
0.0031456127762794495,
0.08018960058689117,
-0.24347524344921112,
0.016965482383966446,
0.33137643337249756,
-0.027254847809672356,
-0.2170223593711853,
-0.21864448487758636,
0.1291659027338028,
-0.29141250252723694,
-0.14341913163661957,
-0.395010381937027,
0.008342839777469635,
-0.1395609974861145,
-0.16826260089874268,
-0.008473381400108337,
0.10451550781726837,
0.491651713848114,
0.16496878862380981,
0.34391456842422485,
0.0609833262860775,
0.05250846594572067,
0.29265594482421875,
-0.3604908585548401,
-0.08956578373908997,
-0.4136759638786316,
0.044177763164043427,
0.008212090469896793,
-0.2715396285057068,
-0.04346363991498947,
0.3930783271789551,
0.16300377249717712,
-0.06820939481258392,
0.4234105050563812,
0.22907961905002594,
0.35905227065086365,
-0.09352949261665344,
0.04708722606301308,
-0.07821942120790482,
-0.6689528822898865,
0.13763639330863953,
0.03698382526636124,
0.03619137033820152,
0.06014564633369446,
-0.157075434923172,
0.018648359924554825,
0.1153981015086174,
-0.1191752552986145,
-0.29814764857292175,
0.2457435131072998,
-0.05781200900673866,
-0.04748670384287834,
0.056037843227386475,
-0.2919575572013855,
0.11914055794477463,
-0.13625995814800262,
0.21948488056659698,
-0.09037846326828003,
0.2610569894313812,
-0.012491057626903057,
-0.4069810211658478,
0.06800273060798645,
0.022013194859027863,
-0.07767494022846222,
-0.03471479192376137,
-0.05981804057955742,
0.2632446587085724,
-0.10723268985748291,
0.27777692675590515,
-0.3366716504096985,
0.11802355200052261,
0.3301564157009125,
-0.08524170517921448,
0.27622032165527344,
-0.11273352056741714,
0.04461017623543739,
-0.09132999181747437,
-0.17603938281536102,
0.07472610473632812,
-0.14924216270446777,
0.25754275918006897,
0.17488020658493042,
-0.16595914959907532,
0.07718992233276367,
-0.14511990547180176,
-0.06832259893417358,
-0.33130085468292236,
0.2723037302494049,
-0.16169261932373047,
0.3295406103134155,
0.034911349415779114,
-0.3837600350379944,
0.2606959342956543,
0.3108646869659424,
0.24023090302944183,
0.16187967360019684,
0.060924824327230453,
-0.2881937623023987,
-0.1753646433353424,
0.3412482440471649,
-0.0522899404168129,
0.4062328338623047,
0.3077271580696106,
0.2328881025314331,
0.14186637103557587,
0.03996919468045235,
-0.21054109930992126,
0.1985752284526825,
0.07001842558383942,
0.06896388530731201,
0.19538980722427368,
0.19483718276023865,
-0.4964079260826111,
-0.7477690577507019,
0.23906534910202026,
0.29976263642311096,
0.08395711332559586,
-0.18121647834777832,
-0.06864619255065918,
-0.2339630424976349,
-0.217458114027977,
-0.016823286190629005,
0.006180882453918457,
-0.17629390954971313,
-0.14282497763633728,
0.1678771674633026,
0.6262645125389099,
-0.28578445315361023,
0.21010231971740723,
0.030784495174884796,
0.401760995388031,
-0.006026402115821838,
0.031622521579265594,
-0.21056976914405823,
-0.012918492779135704,
-0.12654632329940796,
0.189076766371727,
0.030536193400621414,
-0.20332962274551392,
0.3739793300628662,
0.2689999043941498,
-0.12057557702064514,
-0.40691477060317993,
-0.328429639339447,
0.28974297642707825,
-0.08231668174266815,
0.29395297169685364,
-0.09654408693313599,
0.27470964193344116,
-0.006081126630306244,
0.035630080848932266,
0.2503201365470886,
-0.38363179564476013,
-0.305121511220932,
-0.025988493114709854,
0.05752343684434891,
-0.023209398612380028,
-0.29056259989738464,
-0.3642636835575104,
0.06397955864667892,
-0.3620833158493042,
0.3316110074520111,
-0.14065290987491608,
0.1109616830945015,
0.21889425814151764,
0.1636417955160141,
0.0942678302526474,
-0.12895110249519348,
-0.08818452060222626,
-0.37266436219215393,
-0.3000727891921997,
0.06685216724872589,
-0.3052096664905548,
-0.2817413806915283,
0.12205309420824051,
0.19095078110694885,
0.05675787106156349,
-0.051508452743291855,
-0.30717331171035767,
-0.6100958585739136,
-0.3246263861656189,
0.20137429237365723,
-0.15970614552497864,
-0.0809432789683342,
0.3086215555667877,
-0.21522775292396545,
-0.3787584602832794,
-0.09675534814596176,
-0.180003821849823,
0.4041720926761627,
0.08134400099515915,
0.032325636595487595,
-0.16789983212947845,
0.11940142512321472,
0.2956467270851135,
0.2613748610019684,
0.18024973571300507,
0.13745109736919403,
0.27993324398994446,
-0.023641658946871758,
0.4055575132369995,
-0.3060932159423828,
-0.10794483125209808,
0.16752299666404724,
-0.07473621517419815,
-0.08605119585990906,
0.2337884157896042,
0.2530996799468994,
-0.06608911603689194,
0.10698528587818146,
-0.023687925189733505,
0.22828924655914307,
-0.2091529816389084,
0.0027516260743141174,
0.369418203830719,
-0.025103725492954254,
0.2564166784286499,
0.14388954639434814,
-0.010889913886785507,
-0.18528826534748077,
0.013593286275863647,
-0.03264350816607475,
-0.19695201516151428,
-0.1028798446059227,
-0.4580973982810974,
0.08325769007205963,
-0.764717161655426,
0.14021149277687073,
-0.24498529732227325,
0.13601890206336975,
-0.19987767934799194,
-0.07762742787599564,
0.1854333132505417,
-0.19128580391407013,
0.6604037284851074,
0.13652315735816956,
0.03684432432055473,
-0.1417613923549652,
-0.3315153419971466,
-0.11364072561264038,
0.0964532196521759,
-0.2511960566043854,
0.11173257231712341,
0.21266449987888336,
0.4664648473262787,
-0.17456844449043274,
-0.16527889668941498,
0.20228758454322815,
-0.06024579703807831,
-0.231408953666687,
0.13809092342853546,
-0.1386324167251587,
-0.37020188570022583,
-0.30537161231040955,
0.21063202619552612,
0.2645334005355835,
-0.004775054752826691,
0.14953696727752686,
-0.21176594495773315,
-0.11951681971549988,
-0.157038614153862,
-0.04208112880587578,
0.011913470923900604,
0.3730044662952423,
0.014035891741514206,
0.3471229374408722,
0.2985026240348816,
0.09019739925861359,
0.27501365542411804,
0.541290283203125,
0.048477813601493835,
-0.1040298193693161,
0.07947590947151184,
-0.12423136830329895,
0.35937562584877014,
0.36396464705467224,
-0.030328653752803802,
0.014038728550076485,
-0.01813509687781334,
0.2509722411632538,
-0.41360148787498474,
0.23353388905525208,
0.0570966899394989,
0.29110464453697205,
0.067817822098732,
-0.06597299873828888,
0.2764221727848053,
-0.05864822119474411,
-0.011198192834854126,
0.07195276021957397,
0.14344657957553864,
-0.4339948296546936,
0.23473238945007324,
0.22095614671707153,
0.7580066919326782,
0.05090099573135376,
0.3355156183242798,
0.19209977984428406,
0.12829291820526123,
0.06193891167640686,
-0.06693028658628464,
0.23236733675003052,
-0.3206988573074341,
-0.29173770546913147,
0.12199738621711731,
0.06507080793380737,
0.012670129537582397,
-0.21837234497070312,
-0.10227232426404953,
0.03647923469543457,
0.35087862610816956,
0.03841864690184593,
-0.32848411798477173,
0.05131484568119049,
-0.08779621124267578,
-0.4928326904773712,
-0.14662733674049377,
0.3188757300376892,
0.0965479388833046,
0.04519737511873245,
-0.0707416981458664,
0.1190674677491188,
0.20861636102199554,
-0.06125839799642563,
-0.13484469056129456,
-0.03089025989174843,
-0.2394016683101654,
0.26985225081443787,
-0.15950748324394226,
-0.03339055925607681,
-0.31741493940353394,
-0.14006954431533813,
0.27561572194099426,
0.09552636742591858,
-0.05827956646680832,
0.15397462248802185,
0.057519737631082535,
-0.041108060628175735,
-0.1505393087863922,
-0.11494015157222748,
0.27322450280189514,
-0.14768607914447784,
-0.2876369059085846,
0.05277819558978081,
0.018844716250896454,
-0.17101338505744934,
-0.24489997327327728,
-0.10513991117477417,
-0.14848186075687408,
-0.1318957507610321,
0.07135221362113953,
0.0285184383392334,
-0.16759976744651794,
-0.27876514196395874,
0.22955793142318726,
0.08890651166439056,
-0.039346687495708466,
0.295399010181427,
0.191183403134346,
-0.13585253059864044,
-0.06612097471952438,
0.5295789241790771,
0.10913611948490143,
0.03294460475444794,
0.3842127025127411,
0.15485595166683197,
-0.1812470704317093,
-0.33553770184516907,
0.06152139604091644,
-0.08210553228855133,
-0.09883188456296921,
0.446914941072464,
0.040752261877059937,
-0.1664067953824997,
0.13709081709384918,
0.46030768752098083,
0.01699693873524666,
-0.11753736436367035,
-0.19544169306755066,
-0.06950235366821289,
-0.3836546540260315,
0.20854398608207703,
0.03926656395196915,
0.4051854908466339,
0.07619862258434296,
0.02554170787334442,
0.024329982697963715,
0.029963595792651176,
-0.4627191722393036,
-0.06244247406721115,
-0.27584308385849,
0.054169222712516785,
-0.09843030571937561,
-0.2351056933403015,
0.2635294198989868,
-0.16831038892269135,
0.09011238068342209,
0.29586663842201233,
-0.3609200119972229,
-0.34733596444129944,
-0.07259754836559296,
0.09018061310052872,
0.08005189150571823,
-0.11308368295431137,
-0.09144647419452667,
-0.05627121776342392,
-0.13828009366989136,
-0.1504892110824585,
0.5688748359680176,
0.24927181005477905,
0.0002329256385564804,
-0.029516084119677544,
0.1003720760345459,
0.1381959319114685,
0.40667861700057983,
0.06471158564090729,
0.22145609557628632,
0.0626898780465126,
-0.027880297973752022,
-0.06064571440219879,
-0.21147476136684418,
-0.08363679051399231,
0.05029093846678734,
0.09728483855724335,
0.06576952338218689,
0.11897537112236023,
0.028945881873369217,
-0.18573638796806335,
-0.27598512172698975,
-0.008768197149038315,
0.21122632920742035,
0.1975831389427185,
-0.021859703585505486,
-0.18574756383895874,
0.10405533015727997,
0.3498401343822479,
-0.16525566577911377,
-0.11866691708564758,
-0.18388891220092773,
-0.26805979013442993,
0.23727929592132568,
0.07695112377405167,
0.06149443984031677,
0.05272263288497925,
-0.1188100278377533,
0.33689212799072266,
0.4275178909301758,
-0.3242305517196655,
-0.13526560366153717,
-0.23203527927398682,
-0.14807912707328796,
0.026500873267650604,
0.5221849679946899,
0.19612690806388855,
0.3812491297721863,
0.39915019273757935,
-0.1532438099384308,
0.23051030933856964,
0.18200519680976868,
0.487130343914032,
-0.020556677132844925,
-0.19388070702552795,
-0.05643875151872635,
0.3132990002632141,
0.008923862129449844,
0.24660593271255493,
-0.03940964490175247,
0.19890998303890228,
-0.06477437913417816,
-0.24748098850250244,
-0.37836360931396484,
0.26823288202285767,
-0.28819966316223145,
-0.2394358217716217,
-0.11569543182849884,
-0.16814304888248444,
0.1486005187034607,
0.16915960609912872,
0.007873919792473316,
-0.15373575687408447,
0.4488006830215454,
-0.09352501481771469,
-0.05705196410417557,
-0.20576077699661255,
-0.09323425590991974,
0.09523481130599976,
-0.04261079058051109,
-0.03878258168697357,
0.20021235942840576,
0.19742591679096222,
0.09980598092079163,
-0.11069440841674805,
0.3573836088180542,
0.2519681453704834,
0.15973150730133057,
0.13543951511383057,
0.3464065492153168,
-0.19438697397708893,
-0.05968330428004265,
-0.357327401638031,
0.27752068638801575,
0.0681830421090126,
0.13401935994625092,
0.17237114906311035,
0.22770504653453827,
-0.24226808547973633,
0.17416243255138397,
0.1133624017238617,
-0.10579036921262741,
-0.021554699167609215,
0.22822730243206024,
0.2127567082643509,
-0.16246631741523743,
-0.10205647349357605,
-0.3395230770111084,
-0.22990170121192932,
-0.22163401544094086,
0.1894596517086029,
-0.49136632680892944,
0.08647748827934265,
-0.05173352360725403,
0.16187900304794312,
-0.07482907176017761,
0.579692006111145,
-0.07793157547712326,
-0.3437822759151459,
-0.20279660820960999,
-0.04446820169687271,
-0.5785212516784668,
0.16197986900806427,
-0.1888168454170227,
-0.021350957453250885,
-0.003427550196647644,
0.40353602170944214,
-0.03189747408032417,
0.12283138930797577,
0.09333289414644241,
-0.0029727332293987274,
-0.05134175345301628,
-0.03122870624065399,
-0.5178283452987671,
0.04713486507534981,
0.12122592329978943,
0.07612211257219315,
0.26000720262527466,
-0.3338191509246826,
0.23772798478603363,
0.019780844449996948,
0.09077851474285126,
-0.030342411249876022,
0.34427937865257263,
-0.07259992510080338,
-0.02672090381383896,
0.5312130451202393,
-0.030746299773454666,
0.0646834522485733,
-0.03784620389342308,
-0.11282225698232651,
-0.19083787500858307,
-0.23294246196746826,
-0.2778780162334442,
-0.24923734366893768,
0.15821504592895508,
0.33386147022247314,
-0.15654268860816956,
-0.197543203830719,
-0.031889431178569794,
0.256832480430603,
0.17336075007915497,
-0.11235268414020538,
-0.05495872348546982,
0.4865339696407318,
0.17652159929275513,
0.1889026165008545,
-0.12607674300670624,
0.3847203254699707,
-0.003808382898569107,
-0.04034372419118881,
-0.31600067019462585,
-0.5725783109664917,
0.42845505475997925,
-0.2136804163455963,
-0.1258551925420761,
-0.10197747498750687,
0.3591984510421753,
0.2280511111021042,
-0.41149118542671204,
-0.5168395042419434,
0.054224058985710144,
0.08508674055337906,
-0.07265642285346985,
-0.3501569330692291,
0.3177300989627838,
-0.10213378816843033,
-0.09210271388292313,
-0.24502971768379211,
0.4091232120990753,
0.26228415966033936,
-0.4342893362045288,
0.18414202332496643,
-0.08526493608951569
] |
https://github.com/huggingface/datasets/issues/6568 | @lhoestq loading dataset like this does not spawn 50 python processes:
```
datasets.load_dataset("/preprocessed_2256k/train", num_proc=50)
```
I have 64 vCPU so i hoped it could speed up the dataset loading...
My dataset onlly has images and metadata.csv with text column alongside image file path column | keep_in_memory=True does not seem to work | UPD: [Fixed](https://github.com/huggingface/datasets/issues/6568#issuecomment-1880817794) . But a new issue came up :( | 44 | keep_in_memory=True does not seem to work
UPD: [Fixed](https://github.com/huggingface/datasets/issues/6568#issuecomment-1880817794) . But a new issue came up :(
@lhoestq loading dataset like this does not spawn 50 python processes:
```
datasets.load_dataset("/preprocessed_2256k/train", num_proc=50)
```
I have 64 vCPU so i hoped it could speed up the dataset loading...
My dataset onlly has images and metadata.csv with text column alongside image file path column | [
-0.4864200949668884,
-0.2658992111682892,
-0.0638510063290596,
0.3380093276500702,
0.3865876793861389,
-0.06995498389005661,
0.20234602689743042,
0.1355111449956894,
0.1304621696472168,
0.05938532203435898,
-0.12590380012989044,
0.1253167688846588,
-0.19034166634082794,
0.3952617347240448,
0.040891747921705246,
0.01570921018719673,
0.056251272559165955,
0.059994373470544815,
-0.24295859038829803,
0.017994612455368042,
-0.5089954733848572,
0.1362379491329193,
-0.39961859583854675,
-0.3019794523715973,
-0.2798430323600769,
-0.004508913494646549,
0.05806935578584671,
0.2682557702064514,
-0.18849995732307434,
-0.3360542953014374,
-0.10210621356964111,
0.25092020630836487,
0.14340737462043762,
0.31947606801986694,
-0.00011357237963238731,
0.09302876144647598,
0.3088180720806122,
-0.009572241455316544,
-0.2837750315666199,
-0.014283448457717896,
0.07036757469177246,
-0.3840183615684509,
0.10679361969232559,
0.06360357999801636,
-0.10085965692996979,
-0.11920907348394394,
0.038813456892967224,
-0.25050821900367737,
0.40626731514930725,
0.20074714720249176,
0.19080328941345215,
0.3819972276687622,
-0.07909628003835678,
0.08569031208753586,
0.11178795993328094,
0.23445135354995728,
0.004845164716243744,
0.14690831303596497,
0.14151650667190552,
-0.19133196771144867,
0.08588423579931259,
0.23164528608322144,
-0.1690763533115387,
0.05304306000471115,
0.1458500623703003,
0.13363675773143768,
-0.276760995388031,
-0.36623597145080566,
0.11589999496936798,
0.13052719831466675,
0.2758895754814148,
-0.07687327265739441,
-0.2713189125061035,
-0.3322552442550659,
-0.09731649607419968,
-0.7100062370300293,
0.20670658349990845,
0.13085761666297913,
-0.09234589338302612,
0.00849138293415308,
-0.37104034423828125,
-0.08996351063251495,
0.08978420495986938,
-0.10908736288547516,
0.1999855637550354,
-0.2534879148006439,
-0.11732451617717743,
0.040439456701278687,
0.5532022714614868,
0.07924630492925644,
-0.13607847690582275,
0.029786627739667892,
0.02306056022644043,
0.2092723250389099,
-0.7658474445343018,
0.08028265833854675,
0.0701235756278038,
0.0013316534459590912,
0.22604238986968994,
0.22294916212558746,
-0.14449761807918549,
0.1606581211090088,
0.12780442833900452,
0.154441237449646,
0.11165500432252884,
0.17174190282821655,
-0.3809620440006256,
0.15774354338645935,
0.4845882058143616,
0.05443302541971207,
-0.23338423669338226,
-0.15219080448150635,
-0.26918697357177734,
-0.3319953382015228,
0.1752406805753708,
-0.3827139735221863,
0.19862662255764008,
0.0075265392661094666,
-0.08363115042448044,
0.16938167810440063,
0.13928371667861938,
-0.2123033106327057,
0.10709673166275024,
0.428094744682312,
0.21421736478805542,
0.2685331702232361,
0.1142895370721817,
-0.1296716183423996,
-0.6325213313102722,
-0.04888416826725006,
-0.2687237560749054,
0.1545810103416443,
-0.29547810554504395,
0.1747046858072281,
0.13389161229133606,
0.022482261061668396,
0.274949848651886,
0.14151696860790253,
-0.08349645137786865,
-0.0717252641916275,
0.2568890452384949,
-0.32577478885650635,
0.08557376265525818,
0.41402730345726013,
-0.13419489562511444,
0.0051869601011276245,
0.0933874249458313,
0.14635668694972992,
-0.1594468355178833,
0.3398091793060303,
-0.31601041555404663,
-0.35254842042922974,
0.1366925835609436,
0.14422592520713806,
0.07035179436206818,
0.10773533582687378,
-0.6651045083999634,
0.2598963975906372,
0.14728295803070068,
0.16851820051670074,
-0.048490971326828,
-0.0893188863992691,
-0.378359317779541,
0.019015125930309296,
0.3990427255630493,
0.5853838920593262,
-0.3815883994102478,
-0.012690469622612,
0.1932031512260437,
-0.12185336649417877,
0.2008071392774582,
0.45428183674812317,
-0.09651640057563782,
0.2333429455757141,
-0.35561996698379517,
-0.3515275716781616,
0.020026788115501404,
-0.23440824449062347,
-0.29010066390037537,
0.11882121860980988,
-0.05232870578765869,
-0.020888667553663254,
0.039977483451366425,
0.3450838029384613,
0.04571175202727318,
0.26196905970573425,
0.045462466776371,
0.17447200417518616,
0.003472590819001198,
0.24178385734558105,
-0.36370527744293213,
-0.2622608542442322,
-0.13083049654960632,
0.30341100692749023,
0.04796142503619194,
0.07083521783351898,
-0.1883581429719925,
-0.06787009537220001,
0.33988475799560547,
-0.028685394674539566,
0.16547435522079468,
0.09867725521326065,
0.21721014380455017,
0.018053464591503143,
0.1419920176267624,
0.014995783567428589,
-0.4329841136932373,
0.23339703679084778,
0.3130558133125305,
0.038410745561122894,
-0.05723962560296059,
0.1610409915447235,
-0.06831902265548706,
0.06133446842432022,
-0.23065970838069916,
-0.22579726576805115,
-0.029674747958779335,
-0.08005385845899582,
-0.05625814199447632,
0.04728454351425171,
-0.4716620445251465,
0.5344868302345276,
-0.11427746713161469,
0.23578588664531708,
-0.44083505868911743,
0.25780779123306274,
0.18113099038600922,
-0.18106089532375336,
0.032833732664585114,
0.07742944359779358,
-0.1864050328731537,
-0.07267529517412186,
-0.057576000690460205,
0.21837224066257477,
0.22942012548446655,
0.2253899872303009,
-0.06056860461831093,
0.07527704536914825,
0.2121906727552414,
0.01111682504415512,
-0.054498255252838135,
-0.5403537750244141,
0.12981680035591125,
-0.0009141489863395691,
-0.1421503722667694,
0.2986258864402771,
-0.2603801190853119,
0.2915685176849365,
0.19016452133655548,
-0.3218925893306732,
0.09315274655818939,
0.01010114699602127,
-0.02558959648013115,
-0.06142884120345116,
0.42354172468185425,
0.5165380835533142,
0.5774425864219666,
0.3316936194896698,
-0.2961747944355011,
-0.042892128229141235,
0.3814983367919922,
0.17326916754245758,
-0.26259803771972656,
0.2581217885017395,
0.09897714853286743,
-0.1194530576467514,
0.09178062528371811,
-0.17749905586242676,
0.4177272915840149,
0.21300837397575378,
-0.25917187333106995,
0.04225017875432968,
0.07804776728153229,
-0.2074775993824005,
0.13317830860614777,
0.10471785068511963,
0.12972316145896912,
0.12376940250396729,
0.1858120709657669,
-0.13033823668956757,
-0.5710299611091614,
0.016176193952560425,
0.14812803268432617,
0.2544626295566559,
-0.15737555921077728,
-0.06730673462152481,
-0.19885995984077454,
0.048748135566711426,
0.027402542531490326,
0.3200720250606537,
-0.06225718557834625,
-0.010001078248023987,
-0.20211823284626007,
0.23664844036102295,
-0.09028886258602142,
0.31165313720703125,
-0.048841893672943115,
0.34533026814460754,
0.10741154104471207,
-0.3001602590084076,
-0.05816289782524109,
-0.05757209658622742,
0.10991564393043518,
0.011524554342031479,
0.2003021091222763,
-0.19557973742485046,
0.44709908962249756,
0.11733421683311462,
-0.22996562719345093,
-0.17068414390087128,
-0.1468363255262375,
0.23325201869010925,
-0.08502107858657837,
0.3986823558807373,
-0.02704377844929695,
0.18262293934822083,
-0.06760919094085693,
-0.01680769771337509,
0.2827867567539215,
-0.19638237357139587,
-0.14843866229057312,
-0.04401327297091484,
0.1903986930847168,
0.13794788718223572,
-0.0740652084350586,
-0.35370945930480957,
-0.14127394556999207,
-0.4006098210811615,
0.3816494345664978,
-0.0843074768781662,
-0.020569924265146255,
0.24027279019355774,
0.17140567302703857,
-0.07581070065498352,
0.16559085249900818,
-0.09293776750564575,
-0.2827988862991333,
-0.5695139169692993,
0.08849360048770905,
-0.13043805956840515,
-0.15751513838768005,
-0.048616353422403336,
-0.05498515069484711,
0.1437220722436905,
0.193117156624794,
-0.5401646494865417,
-0.40832075476646423,
-0.4350118041038513,
0.1543773114681244,
0.03405559062957764,
0.1907733827829361,
0.16411633789539337,
-0.14980176091194153,
-0.1530224084854126,
0.016198650002479553,
-0.14126445353031158,
0.2098139375448227,
-0.20802311599254608,
-0.06516413390636444,
0.11442922055721283,
0.598962128162384,
-0.23277974128723145,
0.6119824647903442,
0.1603822410106659,
0.1379438042640686,
0.35580214858055115,
-0.21946914494037628,
0.4293556213378906,
-0.39689305424690247,
-0.22581738233566284,
0.08205065131187439,
0.01487451046705246,
-0.22670359909534454,
0.12243552505970001,
0.010393574833869934,
0.0036163944751024246,
-0.09311700612306595,
0.08576394617557526,
0.11448879539966583,
-0.1220848560333252,
0.11628036201000214,
0.20364968478679657,
0.05722929537296295,
0.1192774772644043,
-0.06493449211120605,
0.03186199069023132,
-0.15619918704032898,
-0.1553301215171814,
0.0676996037364006,
0.24487172067165375,
-0.22805003821849823,
-0.28206515312194824,
0.04089363291859627,
-0.8198462724685669,
0.02917231246829033,
-0.20607107877731323,
0.2036939412355423,
0.06654965877532959,
-0.20801937580108643,
0.18495377898216248,
-0.018786532804369926,
0.8917117118835449,
0.0929974690079689,
-0.21541307866573334,
-0.028734005987644196,
-0.39011266827583313,
-0.1062711700797081,
0.012396663427352905,
-0.0014794468879699707,
-0.12150795757770538,
-0.0901065543293953,
0.49614283442497253,
-0.20260971784591675,
-0.1350662112236023,
0.29756784439086914,
0.021243784576654434,
-0.19072023034095764,
-0.36022692918777466,
-0.48390933871269226,
-0.35041314363479614,
-0.25715309381484985,
0.2021278738975525,
0.08815410733222961,
0.013514794409275055,
-0.30630531907081604,
-0.17061884701251984,
-0.11245452612638474,
-0.20157957077026367,
0.07335798442363739,
-0.04009970277547836,
0.2785266637802124,
0.11664173752069473,
0.46200352907180786,
0.31659629940986633,
0.05595768615603447,
0.3603644371032715,
0.6707118153572083,
-0.3416856527328491,
-0.22018492221832275,
0.23454226553440094,
0.13269051909446716,
0.4208217263221741,
0.27222442626953125,
-0.05517888441681862,
0.1647096872329712,
-0.04747328907251358,
0.4150520861148834,
-0.5888201594352722,
0.2981433868408203,
0.306521475315094,
0.11498723924160004,
-0.21373552083969116,
-0.4804089069366455,
0.5744403004646301,
0.2318187654018402,
0.1203574538230896,
0.13001862168312073,
-0.016652528196573257,
-0.16248297691345215,
0.06671111285686493,
0.14249907433986664,
0.8251379728317261,
-0.35844483971595764,
0.3799523115158081,
0.19447533786296844,
0.0879795253276825,
0.4308767020702362,
-0.25287896394729614,
0.09712962061166763,
-0.4947822690010071,
-0.22316545248031616,
0.10552891343832016,
0.010537512600421906,
-0.03547126427292824,
0.016761694103479385,
-0.030813492834568024,
0.20987701416015625,
0.12077760696411133,
0.1362323760986328,
-0.28229954838752747,
0.21870337426662445,
-0.012405751273036003,
-0.5421637296676636,
-0.4523282051086426,
0.11284352093935013,
0.2952735722064972,
-0.038167163729667664,
-0.014202173799276352,
0.31535398960113525,
0.2034505009651184,
-0.06170106306672096,
-0.07954251766204834,
-0.14639151096343994,
-0.09452174603939056,
0.33772242069244385,
-0.06952772289514542,
-0.32403847575187683,
-0.2357209324836731,
0.0850609689950943,
0.19114479422569275,
0.017142541706562042,
0.08941220492124557,
0.2575017213821411,
-0.006077278405427933,
0.018762703984975815,
-0.17232930660247803,
-0.23322473466396332,
0.19871175289154053,
0.051430441439151764,
-0.15120357275009155,
0.004031922668218613,
-0.12142996490001678,
-0.25027137994766235,
-0.15547341108322144,
0.12267497181892395,
0.02161034569144249,
-0.05776890739798546,
-0.07064013183116913,
-0.04487287998199463,
-0.0005746632814407349,
-0.20202955603599548,
0.11744976043701172,
0.2534501254558563,
0.07996974885463715,
0.2918994426727295,
0.015985900536179543,
-0.37022078037261963,
-0.2102779746055603,
0.2732226550579071,
0.06955937296152115,
0.03309931606054306,
0.45632031559944153,
0.3046403229236603,
-0.14482104778289795,
-0.19852274656295776,
0.11706045269966125,
0.44671353697776794,
-0.05575741454958916,
0.6009750366210938,
0.4710198938846588,
-0.0006104558706283569,
0.10452459752559662,
0.17056192457675934,
-0.24512161314487457,
-0.44690683484077454,
0.038701921701431274,
-0.10473146289587021,
-0.626976728439331,
0.1512797325849533,
-0.32294389605522156,
0.3723980486392975,
0.18296858668327332,
-0.1370755434036255,
-0.03280705586075783,
0.15547731518745422,
-0.26886916160583496,
-0.23275618255138397,
-0.3333580791950226,
0.00929502584040165,
0.137204110622406,
0.013515046797692776,
0.17105379700660706,
-0.04191698506474495,
0.040312834084033966,
0.20610493421554565,
-0.2414349764585495,
-0.20958882570266724,
-0.128836989402771,
0.1586562991142273,
-0.02963845804333687,
-0.08652180433273315,
0.09838314354419708,
0.008256077766418457,
-0.2708699703216553,
-0.33991074562072754,
0.3178812265396118,
0.13655556738376617,
-0.027395673096179962,
0.011743362993001938,
-0.020589083433151245,
0.06996219605207443,
0.10025745630264282,
0.31677207350730896,
-0.06654410064220428,
0.16076019406318665,
0.27046090364456177,
-0.11055251955986023,
-0.015483086928725243,
0.006095007061958313,
-0.09921477735042572,
-0.035050686448812485,
0.3023274540901184,
-0.056966930627822876,
0.09549526870250702,
-0.2127334326505661,
-0.22802621126174927,
0.15102547407150269,
0.45291951298713684,
0.5004758238792419,
0.003742203116416931,
-0.23757332563400269,
0.1754450798034668,
0.17336174845695496,
-0.18807685375213623,
-0.022754238918423653,
-0.06734392046928406,
-0.11934319883584976,
0.1735042929649353,
0.3127801716327667,
0.14442485570907593,
0.35126549005508423,
-0.1013350784778595,
0.14802055060863495,
0.45022332668304443,
-0.4019404649734497,
-0.009507019072771072,
-0.14994190633296967,
0.005769029259681702,
0.09225229918956757,
0.3148740231990814,
0.3334061801433563,
0.19417676329612732,
0.44250860810279846,
-0.25863608717918396,
0.057395823299884796,
-0.062281664460897446,
0.5144004821777344,
-0.22423353791236877,
-0.5518926382064819,
0.05997437611222267,
0.4130280613899231,
-0.433584988117218,
0.1531911939382553,
-0.23101985454559326,
0.3426001965999603,
-0.013622289523482323,
-0.14723320305347443,
-0.15525278449058533,
0.4408141076564789,
-0.1939605325460434,
-0.35800307989120483,
0.18797186017036438,
-0.13321883976459503,
-0.30814239382743835,
0.4436805546283722,
0.04321177303791046,
-0.14181223511695862,
0.17004552483558655,
0.0654255598783493,
-0.05013011395931244,
-0.4013538360595703,
0.06461131572723389,
0.20629490911960602,
0.2199922353029251,
-0.05838478356599808,
0.14035239815711975,
0.017069458961486816,
-0.07695178687572479,
0.19445687532424927,
0.16383321583271027,
0.3162400722503662,
0.38862067461013794,
0.22762693464756012,
-0.03360980749130249,
-0.1604597568511963,
0.11911739408969879,
-0.24092867970466614,
0.34261414408683777,
-0.037618331611156464,
0.27846190333366394,
-0.04205172508955002,
0.08562329411506653,
-0.14928266406059265,
0.11225725710391998,
0.10872793197631836,
0.014943491667509079,
-0.43491289019584656,
0.08952078968286514,
0.21858708560466766,
-0.07198416441679001,
-0.23573094606399536,
-0.055375438183546066,
-0.24599438905715942,
-0.04775822535157204,
0.243470698595047,
-0.2760218381881714,
0.05762536823749542,
-0.020589685067534447,
0.066735178232193,
-0.21325543522834778,
0.6746929883956909,
0.1725866049528122,
-0.020490873605012894,
-0.31402987241744995,
0.021960049867630005,
-0.8156689405441284,
-0.15115097165107727,
-0.20565497875213623,
-0.11821288615465164,
0.029498271644115448,
0.30762457847595215,
-0.05607234314084053,
0.000034907832741737366,
-0.006424345076084137,
-0.018244775012135506,
0.1227264553308487,
0.13955053687095642,
-0.27327394485473633,
0.05645810067653656,
-0.3007882833480835,
0.1239134892821312,
-0.041834767907857895,
-0.3312096893787384,
0.22978299856185913,
0.06252144277095795,
-0.1092565655708313,
-0.113385871052742,
0.1029280573129654,
0.010444968938827515,
0.062210362404584885,
0.423383504152298,
0.1830098181962967,
0.04046136513352394,
-0.11607213318347931,
0.019002802670001984,
-0.40743446350097656,
-0.26627668738365173,
-0.29071176052093506,
-0.2017703354358673,
0.03304920718073845,
0.22994500398635864,
-0.24017804861068726,
-0.13376939296722412,
-0.31876954436302185,
0.18842703104019165,
0.024968542158603668,
-0.2347348928451538,
-0.08645285665988922,
0.0047273337841033936,
0.3915562629699707,
0.24364130198955536,
-0.0005939565598964691,
0.39728885889053345,
0.04176349192857742,
0.03286390006542206,
-0.32694804668426514,
-0.3227914571762085,
0.2582935094833374,
-0.3563790023326874,
-0.13428515195846558,
-0.23050706088542938,
0.13302934169769287,
0.20184697210788727,
-0.05997646600008011,
-0.4397728443145752,
0.16215023398399353,
0.16761130094528198,
0.04906074330210686,
-0.3321441411972046,
0.5901539325714111,
0.0889197438955307,
-0.027270078659057617,
-0.22034870088100433,
0.39551880955696106,
0.11243011057376862,
-0.2531346380710602,
0.2044147253036499,
-0.07738125324249268
] |
https://github.com/huggingface/datasets/issues/6568 | now noticed
```
'Setting num_proc from 50 back to 1 for the train split to disable multiprocessing as it only contains one shard
```
Any way to work around this? | keep_in_memory=True does not seem to work | UPD: [Fixed](https://github.com/huggingface/datasets/issues/6568#issuecomment-1880817794) . But a new issue came up :( | 30 | keep_in_memory=True does not seem to work
UPD: [Fixed](https://github.com/huggingface/datasets/issues/6568#issuecomment-1880817794) . But a new issue came up :(
now noticed
```
'Setting num_proc from 50 back to 1 for the train split to disable multiprocessing as it only contains one shard
```
Any way to work around this? | [
-0.3578808009624481,
-0.48597973585128784,
-0.05335165560245514,
0.24324099719524384,
0.22478020191192627,
-0.3293018937110901,
0.29327523708343506,
0.05787957087159157,
-0.25964412093162537,
0.37969741225242615,
-0.09009426832199097,
-0.006218463182449341,
-0.20374412834644318,
0.6056236624717712,
-0.003964388743042946,
-0.05188514292240143,
0.014305666089057922,
-0.10616683214902878,
-0.18805444240570068,
0.08745705336332321,
-0.10141142457723618,
0.2243935763835907,
-0.24813079833984375,
-0.20832495391368866,
-0.6507155895233154,
-0.1951770782470703,
-0.08187202364206314,
0.30371034145355225,
-0.027473775669932365,
-0.16011783480644226,
0.032059647142887115,
0.25530776381492615,
-0.2393893003463745,
0.25924167037010193,
-0.00011199811706319451,
0.003858335316181183,
0.08936865627765656,
-0.0068795569241046906,
0.0639672726392746,
0.0011911541223526,
-0.07453648000955582,
0.09006284922361374,
-0.004590917378664017,
-0.0022110342979431152,
0.08836168050765991,
0.45725584030151367,
0.04421311616897583,
-0.01185549795627594,
0.6775997877120972,
0.1009189635515213,
0.19698883593082428,
0.1573413908481598,
-0.045135580003261566,
0.09688381850719452,
0.10370831191539764,
0.3175036907196045,
-0.09209815412759781,
-0.07918616384267807,
-0.08392740786075592,
-0.082135871052742,
-0.039662934839725494,
0.3110266923904419,
0.027068406343460083,
0.020764708518981934,
-0.09342887252569199,
0.16109493374824524,
-0.14246101677417755,
-0.22316868603229523,
0.11276805400848389,
0.23662801086902618,
-0.24964609742164612,
-0.12793929874897003,
-0.15893100202083588,
-0.33939531445503235,
-0.15856541693210602,
-0.6865773797035217,
0.26314276456832886,
-0.02793247252702713,
-0.4057537913322449,
0.34906941652297974,
-0.3489551544189453,
-0.24933569133281708,
0.05101214349269867,
-0.16915439069271088,
0.009066298604011536,
-0.04944271594285965,
-0.03683634474873543,
0.05208936333656311,
0.6444265246391296,
0.060060370713472366,
-0.3530973792076111,
0.37558552622795105,
0.020366951823234558,
-0.16325967013835907,
-0.4156920909881592,
-0.07712395489215851,
0.03890835866332054,
0.024703163653612137,
0.12914729118347168,
0.14677628874778748,
-0.18285082280635834,
0.4129562973976135,
0.11155939102172852,
0.09216918796300888,
0.2122572809457779,
0.0617806650698185,
-0.15996001660823822,
0.013389982283115387,
0.49384891986846924,
0.22334112226963043,
-0.14316993951797485,
-0.09580020606517792,
0.18655744194984436,
-0.3199255168437958,
-0.024393964558839798,
-0.1641862988471985,
0.05945076048374176,
-0.16836833953857422,
-0.002664804458618164,
0.06387030333280563,
0.24696049094200134,
-0.10446037352085114,
0.1254979372024536,
0.44265881180763245,
0.21493412554264069,
0.20267261564731598,
-0.19617457687854767,
-0.100125253200531,
-0.538806140422821,
-0.23911595344543457,
-0.3593156635761261,
0.08537928760051727,
-0.417003870010376,
0.31177636981010437,
0.0033655762672424316,
0.07987399399280548,
0.1354438066482544,
0.19590255618095398,
0.10626552999019623,
-0.04572507366538048,
-0.09296125918626785,
-0.401461660861969,
0.3060646057128906,
0.37197810411453247,
-0.16167297959327698,
0.08617386966943741,
-0.1542196422815323,
0.08493582904338837,
-0.07283328473567963,
0.18264618515968323,
-0.22212740778923035,
-0.45712345838546753,
0.14754419028759003,
0.1444939523935318,
-0.11382566392421722,
0.12366439402103424,
-0.39521801471710205,
0.25563791394233704,
0.4081910252571106,
0.2036469280719757,
-0.054315779358148575,
-0.026835810393095016,
-0.38368648290634155,
-0.09267019480466843,
0.36591026186943054,
0.25714385509490967,
-0.18669702112674713,
-0.05135888606309891,
0.02000095322728157,
-0.3806607723236084,
0.4154045879840851,
0.4160219132900238,
-0.08708485960960388,
-0.15314698219299316,
-0.2501649260520935,
0.37213748693466187,
0.0814070776104927,
0.06833991408348083,
-0.3841646909713745,
-0.06569620966911316,
-0.11580934375524521,
-0.04950340837240219,
0.18346776068210602,
0.13892751932144165,
0.13960343599319458,
0.24930651485919952,
0.1253565400838852,
0.13696396350860596,
-0.08444471657276154,
0.09244625270366669,
-0.34711164236068726,
-0.19120705127716064,
-0.24230366945266724,
-0.03346357122063637,
0.3372730612754822,
-0.07114189118146896,
-0.027341347187757492,
-0.052044034004211426,
0.40003758668899536,
0.05636310204863548,
0.2669881284236908,
0.010287905111908913,
0.20222537219524384,
-0.1122891828417778,
-0.0035442784428596497,
-0.3009513020515442,
-0.21699610352516174,
0.12178181111812592,
0.05211978405714035,
0.11478079855442047,
-0.05855834484100342,
-0.03920092061161995,
0.05387869477272034,
-0.0783822163939476,
-0.059552475810050964,
-0.1665613055229187,
0.06279164552688599,
-0.29007017612457275,
-0.24146345257759094,
0.01038331538438797,
-0.4448743462562561,
0.36917027831077576,
-0.02630297839641571,
0.13120777904987335,
-0.2524096667766571,
0.36313506960868835,
-0.04470837861299515,
-0.44701245427131653,
-0.15598848462104797,
0.16628387570381165,
-0.01722842827439308,
-0.05702103301882744,
-0.0685163214802742,
0.2522210478782654,
0.11717937141656876,
0.2294306457042694,
-0.28589051961898804,
0.1279725879430771,
0.22674117982387543,
-0.03876372426748276,
-0.29861173033714294,
-0.48389682173728943,
-0.17622949182987213,
-0.10816077888011932,
0.005345797631889582,
0.3865184187889099,
-0.013270399533212185,
0.2523554861545563,
0.23312880098819733,
-0.002654988318681717,
0.14025704562664032,
-0.416838675737381,
0.3115900456905365,
-0.33901000022888184,
0.3454311192035675,
0.047529663890600204,
0.013550452888011932,
0.22633865475654602,
-0.4345492124557495,
0.2326623648405075,
0.6498938202857971,
0.326546311378479,
-0.1312388777732849,
0.029288042336702347,
0.13153669238090515,
-0.2274473011493683,
0.3152323365211487,
0.29960572719573975,
0.313563734292984,
0.25327470898628235,
0.12896206974983215,
0.07452316582202911,
-0.022962450981140137,
-0.3402717113494873,
0.015626605600118637,
0.06763134896755219,
0.018399164080619812,
0.10136356204748154,
0.11134611815214157,
-0.2921924889087677,
-0.4122515320777893,
0.2422589510679245,
0.14479076862335205,
0.23251459002494812,
-0.2735693156719208,
-0.08400164544582367,
-0.5269862413406372,
0.022499337792396545,
-0.28880685567855835,
0.21167074143886566,
-0.42831164598464966,
-0.21360361576080322,
0.1426624357700348,
0.3651584982872009,
-0.22380639612674713,
0.2783217132091522,
0.29813289642333984,
0.2683582603931427,
-0.2632085680961609,
0.2569703161716461,
-0.19354236125946045,
-0.10694171488285065,
-0.22024385631084442,
0.07425839453935623,
0.3603128492832184,
0.014214873313903809,
0.34646177291870117,
0.16439613699913025,
-0.5217716097831726,
0.0010929573327302933,
0.009197816252708435,
0.25748178362846375,
-0.07475996017456055,
0.2249719649553299,
-0.03200322389602661,
0.11244580149650574,
-0.2122131735086441,
-0.1398163139820099,
0.1892150193452835,
-0.3112550377845764,
-0.18452951312065125,
-0.0030382275581359863,
0.18671995401382446,
0.17559728026390076,
-0.32366928458213806,
-0.2148159146308899,
0.0037954282015562057,
-0.25602656602859497,
0.5320466160774231,
-0.26570600271224976,
0.16059531271457672,
0.1642816811800003,
0.1790696233510971,
0.0368218794465065,
-0.0731009989976883,
-0.19522397220134735,
-0.3988766372203827,
-0.48953163623809814,
0.11587095260620117,
-0.09322148561477661,
-0.2711470127105713,
0.043099358677864075,
0.1207924485206604,
0.003681897185742855,
0.24413159489631653,
-0.37594282627105713,
-0.2717736065387726,
-0.3490332365036011,
0.047964803874492645,
0.08161894232034683,
0.06986603885889053,
0.3732230067253113,
-0.22249452769756317,
-0.26061758399009705,
-0.029255706816911697,
-0.06895432621240616,
0.5542057752609253,
-0.1574300080537796,
0.20470917224884033,
-0.040662750601768494,
0.299895316362381,
0.3388313353061676,
0.8381049036979675,
0.054660193622112274,
0.056278374046087265,
0.094397634267807,
-0.18653187155723572,
0.0939786359667778,
-0.0824902132153511,
-0.19298195838928223,
0.2673775553703308,
-0.06851880252361298,
-0.15325340628623962,
0.04721636697649956,
0.04412296414375305,
-0.04403556138277054,
-0.06920403242111206,
0.06502743065357208,
0.15921737253665924,
-0.45535629987716675,
0.10055723786354065,
0.3378814160823822,
-0.03162616118788719,
0.09108678996562958,
-0.053978048264980316,
0.219122514128685,
-0.12140905112028122,
-0.051651742309331894,
0.11708361655473709,
-0.13081705570220947,
-0.2391374260187149,
-0.4335097670555115,
-0.13257233798503876,
-0.7964127063751221,
0.22985431551933289,
0.09144693613052368,
0.15728960931301117,
-0.15889577567577362,
-0.21795536577701569,
0.305002897977829,
0.006322845816612244,
0.8306612372398376,
0.027559133246541023,
-0.19222018122673035,
-0.03732109069824219,
-0.31854158639907837,
0.07087890803813934,
0.021186068654060364,
-0.10015511512756348,
0.1770460307598114,
0.1919541209936142,
0.22389613091945648,
-0.15217164158821106,
-0.18336555361747742,
0.35731759667396545,
-0.20721665024757385,
-0.20659416913986206,
-0.2282109558582306,
-0.31846293807029724,
-0.16325703263282776,
-0.19069048762321472,
0.29689136147499084,
0.3442803621292114,
-0.04493408650159836,
-0.2192300409078598,
-0.249332457780838,
0.027229340746998787,
-0.14258834719657898,
0.21678617596626282,
0.02905474603176117,
0.2761278450489044,
-0.017392998561263084,
0.027473390102386475,
0.2533250153064728,
0.009251005947589874,
0.34571731090545654,
0.39306947588920593,
-0.2638913094997406,
0.06309162080287933,
0.18970035016536713,
-0.15595903992652893,
0.41192182898521423,
0.4516066908836365,
-0.09896184504032135,
0.29750287532806396,
0.1119438037276268,
0.437764436006546,
-0.3690999448299408,
0.3052923083305359,
0.20711487531661987,
0.15506432950496674,
0.0176420658826828,
-0.011986754834651947,
0.2661837339401245,
0.10137582570314407,
0.039855584502220154,
0.16975973546504974,
0.14263716340065002,
-0.23025134205818176,
0.18252459168434143,
0.0014512352645397186,
1.1119740009307861,
-0.24834993481636047,
0.3510984778404236,
0.17414939403533936,
0.06336888670921326,
0.30016884207725525,
-0.13010549545288086,
0.21687766909599304,
-0.26961252093315125,
0.007337141782045364,
0.0843234658241272,
0.1150449886918068,
0.028166916221380234,
-0.13830435276031494,
-0.05275357887148857,
0.06303509324789047,
0.12225097417831421,
0.08897525072097778,
-0.3862951099872589,
-0.03949481248855591,
0.17319515347480774,
-0.3625902831554413,
-0.05121147260069847,
0.11894309520721436,
0.16976779699325562,
-0.2078884094953537,
-0.06566713005304337,
0.05287567153573036,
0.12693676352500916,
-0.022692859172821045,
-0.3622291684150696,
-0.13446448743343353,
-0.10420180857181549,
0.39217594265937805,
0.001279524527490139,
-0.23174510896205902,
-0.13714087009429932,
0.027688946574926376,
0.36861634254455566,
-0.11597158014774323,
0.10391610860824585,
0.18812650442123413,
-0.05688958615064621,
0.10238772630691528,
-0.21495503187179565,
-0.0522686243057251,
0.38166046142578125,
-0.04815260320901871,
-0.35592013597488403,
-0.15589328110218048,
0.12039075791835785,
-0.21529510617256165,
-0.16984029114246368,
0.06268147379159927,
-0.036736324429512024,
-0.10304908454418182,
0.2994903326034546,
0.03840169310569763,
0.09436319768428802,
-0.274122953414917,
0.14838853478431702,
0.029622748494148254,
-0.1705893725156784,
0.32388219237327576,
0.03457864746451378,
-0.23378387093544006,
-0.07115615904331207,
0.2914366126060486,
0.1405998170375824,
0.09821031242609024,
0.24629876017570496,
0.11694223433732986,
-0.2020403891801834,
-0.24805384874343872,
-0.11417455226182938,
0.21654146909713745,
-0.05069193243980408,
0.4952891170978546,
0.051545582711696625,
-0.09759673476219177,
-0.09900667518377304,
0.02608540654182434,
-0.16469793021678925,
-0.04126350209116936,
-0.15406951308250427,
0.020007625222206116,
-0.5290787816047668,
0.07990413904190063,
-0.25201013684272766,
0.41443586349487305,
-0.0076828524470329285,
0.347925066947937,
-0.0639505535364151,
0.37961167097091675,
-0.30485308170318604,
-0.008542433381080627,
-0.3826800584793091,
0.0900263860821724,
0.06273644417524338,
-0.26005819439888,
0.033320195972919464,
-0.2502703070640564,
0.02776464819908142,
0.37146955728530884,
-0.40702804923057556,
-0.2468130886554718,
-0.15237239003181458,
0.12203141301870346,
-0.12159246951341629,
-0.16197839379310608,
0.016121182590723038,
0.20789840817451477,
-0.10691908001899719,
-0.06987432390451431,
0.37105873227119446,
0.3338504731655121,
0.09808825701475143,
0.2967238426208496,
0.5582310557365417,
0.17701725661754608,
-0.0728982463479042,
-0.014452925883233547,
0.06323114782571793,
0.20097088813781738,
0.05355590581893921,
-0.025303544476628304,
-0.19665415585041046,
-0.052651651203632355,
0.09428533911705017,
-0.09498228132724762,
0.2762358784675598,
0.0431089922785759,
-0.2069888710975647,
-0.1465284824371338,
-0.37997695803642273,
-0.03292436525225639,
0.43722549080848694,
0.3794437646865845,
-0.020815545693039894,
-0.12138038873672485,
0.4389260709285736,
0.21466630697250366,
-0.17244431376457214,
0.05028529092669487,
0.5239749550819397,
-0.017524056136608124,
0.10165038704872131,
0.2984945774078369,
0.33673638105392456,
0.11735670268535614,
-0.06248989328742027,
0.1594723016023636,
-0.036814622581005096,
-0.37831440567970276,
0.039003536105155945,
-0.2840259075164795,
-0.13536055386066437,
-0.0766146183013916,
0.414246141910553,
0.06191529333591461,
0.32210803031921387,
0.39104121923446655,
-0.4024730324745178,
0.32895195484161377,
-0.3899276554584503,
0.47662776708602905,
-0.028566498309373856,
-0.4226239323616028,
-0.13373973965644836,
0.23259875178337097,
-0.44897371530532837,
0.10023412108421326,
-0.1235731914639473,
0.7821851968765259,
0.04355986788868904,
-0.2580694556236267,
0.040449582040309906,
0.44126689434051514,
-0.25255146622657776,
-0.23197197914123535,
0.19137823581695557,
-0.09847632050514221,
-0.3177949786186218,
0.2579593360424042,
0.20622332394123077,
0.09288941323757172,
0.8318274617195129,
0.1298416703939438,
-0.13225077092647552,
0.012592220678925514,
-0.08622810244560242,
0.13014379143714905,
0.3282659649848938,
-0.22797414660453796,
-0.0030533410608768463,
0.07637155801057816,
-0.06370814144611359,
0.06097160652279854,
0.08831632137298584,
0.2598792612552643,
0.10929784178733826,
0.1212032288312912,
0.020828623324632645,
-0.01656471937894821,
0.14001959562301636,
-0.3342362940311432,
0.2195536494255066,
0.13697290420532227,
0.43176987767219543,
-0.05398865416646004,
0.06582342088222504,
-0.19778724014759064,
0.0473342128098011,
0.04985331743955612,
0.3403056263923645,
-0.33578652143478394,
0.20465132594108582,
0.23372973501682281,
-0.18572382628917694,
-0.04273547977209091,
-0.13876672089099884,
-0.22308310866355896,
-0.09329588711261749,
0.2891005873680115,
-0.6056492328643799,
0.19950851798057556,
-0.030780881643295288,
0.0746820867061615,
-0.04091542586684227,
0.5644431114196777,
-0.10133486986160278,
-0.1744948923587799,
-0.14946043491363525,
-0.06387952715158463,
-0.692146897315979,
0.0677446648478508,
-0.08881412446498871,
0.18549591302871704,
-0.07329036295413971,
0.3653481602668762,
-0.24058155715465546,
-0.03781270980834961,
0.1550385057926178,
-0.28416746854782104,
0.08961400389671326,
0.17317594587802887,
-0.42749711871147156,
0.2647445499897003,
-0.24340705573558807,
-0.2935662567615509,
0.25695139169692993,
-0.11661777645349503,
0.34718087315559387,
0.19665302336215973,
-0.09457852691411972,
0.12383060157299042,
0.0426461398601532,
0.0738922506570816,
0.09342767298221588,
0.22157010436058044,
0.22119711339473724,
0.10457386076450348,
-0.04855150729417801,
0.07149912416934967,
-0.22659608721733093,
-0.17575126886367798,
-0.32962530851364136,
-0.26566562056541443,
0.007545603439211845,
0.37728410959243774,
-0.38994744420051575,
-0.009546982124447823,
-0.2521820366382599,
0.24555259943008423,
0.04702509939670563,
-0.044068969786167145,
-0.05590515583753586,
0.14321894943714142,
0.4310380816459656,
0.23188042640686035,
0.1370222121477127,
0.49069660902023315,
-0.0722580999135971,
-0.05217788368463516,
-0.4278322458267212,
-0.4367756247520447,
0.3216027617454529,
-0.0891064777970314,
-0.09588737040758133,
-0.3952716886997223,
0.2795923054218292,
0.3125171959400177,
-0.154462993144989,
-0.8380304574966431,
-0.3824373185634613,
0.011561036109924316,
0.061270035803318024,
-0.34754741191864014,
0.48526570200920105,
-0.1036086231470108,
-0.1557854861021042,
-0.13157281279563904,
0.23750513792037964,
0.26854658126831055,
-0.3220546841621399,
0.29575401544570923,
-0.179657980799675
] |
https://github.com/huggingface/datasets/issues/6567 | I think you are reporting an issue with the `transformers` library. Note this is the repository of the `datasets` library. I recommend that you open an issue in their repository: https://github.com/huggingface/transformers/issues
EDIT: I have not the rights to transfer the issue
~~I am transferring your issue to their repository.~~ | AttributeError: 'str' object has no attribute 'to' | ### Describe the bug
```
--------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
[<ipython-input-6-80c6086794e8>](https://localhost:8080/#) in <cell line: 10>()
8 report_to="wandb")
9
---> 10 trainer = Trainer(
11 model=model,
12 args=training_args,
1 frames
[/usr/local/lib/python3.10/dist-packages/transformers/trainer.py](https://localhost:8080/#) in _move_model_to_device(self, model, device)
688
689 def _move_model_to_device(self, model, device):
--> 690 model = model.to(device)
691 # Moving a model to an XLA device disconnects the tied weights, so we have to retie them.
692 if self.args.parallel_mode == ParallelMode.TPU and hasattr(model, "tie_weights"):
AttributeError: 'str' object has no attribute 'to'
```
### Steps to reproduce the bug
here is the notebook:
```
https://colab.research.google.com/drive/10JDBNsLlYrQdnI2FWfDK3F5M8wvVUDXG?usp=sharing
```
### Expected behavior
run the Training
### Environment info
Colab Notebook , T4 | 49 | AttributeError: 'str' object has no attribute 'to'
### Describe the bug
```
--------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
[<ipython-input-6-80c6086794e8>](https://localhost:8080/#) in <cell line: 10>()
8 report_to="wandb")
9
---> 10 trainer = Trainer(
11 model=model,
12 args=training_args,
1 frames
[/usr/local/lib/python3.10/dist-packages/transformers/trainer.py](https://localhost:8080/#) in _move_model_to_device(self, model, device)
688
689 def _move_model_to_device(self, model, device):
--> 690 model = model.to(device)
691 # Moving a model to an XLA device disconnects the tied weights, so we have to retie them.
692 if self.args.parallel_mode == ParallelMode.TPU and hasattr(model, "tie_weights"):
AttributeError: 'str' object has no attribute 'to'
```
### Steps to reproduce the bug
here is the notebook:
```
https://colab.research.google.com/drive/10JDBNsLlYrQdnI2FWfDK3F5M8wvVUDXG?usp=sharing
```
### Expected behavior
run the Training
### Environment info
Colab Notebook , T4
I think you are reporting an issue with the `transformers` library. Note this is the repository of the `datasets` library. I recommend that you open an issue in their repository: https://github.com/huggingface/transformers/issues
EDIT: I have not the rights to transfer the issue
~~I am transferring your issue to their repository.~~ | [
-0.08758515119552612,
-0.32732489705085754,
0.08826373517513275,
0.04437369853258133,
0.5676831007003784,
0.01807337999343872,
0.5729138255119324,
0.4033966362476349,
-0.17493602633476257,
0.32560089230537415,
-0.011736348271369934,
0.22309105098247528,
-0.11257587373256683,
-0.03418769687414169,
0.058715254068374634,
-0.31582483649253845,
0.04296316206455231,
0.14200225472450256,
-0.1409429907798767,
-0.06308028101921082,
0.019868023693561554,
0.3189191222190857,
-0.05012856423854828,
0.3180600106716156,
-0.43863457441329956,
-0.053569309413433075,
0.09534945338964462,
-0.10458208620548248,
0.12058557569980621,
-0.22580477595329285,
0.23994189500808716,
-0.10195490717887878,
0.03177399933338165,
0.30587491393089294,
-0.00011427733988966793,
0.11357990652322769,
0.06372198462486267,
0.12427397072315216,
-0.43306446075439453,
-0.1904914826154709,
-0.26234737038612366,
0.03362240642309189,
0.3975362777709961,
-0.21864116191864014,
-0.1910867989063263,
0.2939935326576233,
0.021646713837981224,
-0.0771799236536026,
0.20161163806915283,
0.5999909043312073,
0.25665760040283203,
0.4940606951713562,
0.19188997149467468,
-0.31422242522239685,
0.24433113634586334,
0.08435021340847015,
-0.2600957453250885,
0.2964865565299988,
0.04011329263448715,
0.030204609036445618,
0.14810681343078613,
0.10082562267780304,
0.15658998489379883,
0.20641788840293884,
0.19086766242980957,
0.18289895355701447,
0.04017634689807892,
-0.18469776213169098,
-0.02361437678337097,
0.22368460893630981,
0.04456726834177971,
-0.3989562392234802,
-0.20626680552959442,
-0.1067623421549797,
0.09859790652990341,
-0.1264142245054245,
0.008064497262239456,
-0.014277184382081032,
-0.12729237973690033,
0.01920010894536972,
-0.1108882948756218,
-0.10854896903038025,
0.003855764865875244,
-0.06101442128419876,
-0.292597234249115,
0.27594852447509766,
-0.09867203235626221,
-0.04531680420041084,
0.12831327319145203,
0.09447157382965088,
0.05450925603508949,
0.03038642555475235,
0.1925235092639923,
0.056616559624671936,
-0.32642364501953125,
-0.1264466941356659,
-0.1282173991203308,
-0.46333858370780945,
-0.2967069745063782,
-0.21198570728302002,
0.2960624098777771,
-0.310381680727005,
0.217337504029274,
0.29139018058776855,
0.11448173224925995,
0.2750653624534607,
-0.45043566823005676,
0.5767239928245544,
0.244816854596138,
0.36879444122314453,
-0.1918736696243286,
-0.12059594690799713,
-0.019716398790478706,
0.02430862933397293,
0.14482322335243225,
-0.09030731767416,
0.3346872329711914,
-0.16491727530956268,
-0.49701106548309326,
0.13371124863624573,
-0.41073787212371826,
0.10295136272907257,
-0.00035140663385391235,
0.12161166965961456,
-0.1853535771369934,
0.33133596181869507,
0.4100289046764374,
-0.0157000869512558,
-0.3211379647254944,
0.2369135469198227,
-0.35809847712516785,
0.33828112483024597,
-0.1189446970820427,
-0.22098562121391296,
-0.0666191428899765,
0.03774367645382881,
-0.032864123582839966,
-0.09405364096164703,
0.25931310653686523,
0.05166761577129364,
0.0004991218447685242,
-0.13515542447566986,
-0.011737894266843796,
0.5023083686828613,
-0.2077518105506897,
0.19703945517539978,
0.13962578773498535,
-0.5701727867126465,
-0.15046192705631256,
0.2689779996871948,
-0.3194403052330017,
-0.2566714882850647,
-0.050332650542259216,
0.25283440947532654,
-0.2353225201368332,
-0.17211827635765076,
-0.3584791123867035,
0.015891987830400467,
0.13527172803878784,
-0.22465907037258148,
-0.021136801689863205,
-0.44969239830970764,
-0.31730619072914124,
-0.0886833518743515,
0.19800665974617004,
0.014968767762184143,
-0.27258050441741943,
-0.3952726721763611,
0.16325941681861877,
-0.13755743205547333,
0.13810083270072937,
0.04095734655857086,
-0.041604962199926376,
0.3618042469024658,
-0.13041101396083832,
0.04461447894573212,
0.20841193199157715,
-0.19489505887031555,
-0.42400649189949036,
-0.06800515949726105,
-0.19204184412956238,
-0.016870349645614624,
-0.029132820665836334,
0.13551510870456696,
0.11614131927490234,
0.042175766080617905,
-0.1693546622991562,
0.2386055886745453,
0.01295381411910057,
0.188044011592865,
-0.35809510946273804,
0.09437309205532074,
-0.0032786745578050613,
0.30341699719429016,
0.24236755073070526,
0.41919898986816406,
-0.07505440711975098,
0.5642216205596924,
0.189848393201828,
0.013551315292716026,
0.152187779545784,
0.02036997675895691,
0.47854629158973694,
-0.4029935598373413,
-0.20181433856487274,
-0.15690721571445465,
-0.22153811156749725,
-0.03167128935456276,
0.07575391978025436,
0.36443856358528137,
-0.014066480100154877,
0.17580127716064453,
-0.13522449135780334,
0.11127728968858719,
-0.09686634689569473,
-0.28456395864486694,
0.09343741834163666,
0.105296291410923,
-0.10822047293186188,
0.022218473255634308,
-0.31601205468177795,
0.42404109239578247,
-0.05623848736286163,
0.21113955974578857,
-0.40670180320739746,
0.4350358545780182,
-0.22909919917583466,
-0.1633545160293579,
-0.23626521229743958,
0.19383665919303894,
-0.05783478543162346,
-0.055516768246889114,
-0.3348681926727295,
0.14074701070785522,
-0.14827199280261993,
-0.10085225850343704,
-0.07216109335422516,
0.44187793135643005,
0.3167802691459656,
-0.09186418354511261,
-0.215629443526268,
0.3691719174385071,
0.35273972153663635,
-0.04933606833219528,
-0.2118990123271942,
0.3370470702648163,
0.12394005060195923,
0.29588136076927185,
0.2593684792518616,
0.2183387279510498,
0.014123968780040741,
-0.10420036315917969,
0.0334332212805748,
0.16987812519073486,
0.08548077940940857,
0.05179877206683159,
0.058176204562187195,
-0.019222410395741463,
-0.4287348985671997,
-0.046130623668432236,
0.42611637711524963,
0.06745576858520508,
0.018848730251193047,
0.35685300827026367,
-0.20551623404026031,
0.1021183505654335,
-0.12648087739944458,
0.3355500400066376,
0.5218337178230286,
-0.01232524961233139,
-0.08149158954620361,
0.14315849542617798,
-0.021850338205695152,
-0.2628588080406189,
0.23861795663833618,
0.017743900418281555,
-0.1646205335855484,
-0.008773408830165863,
0.26240983605384827,
0.1607111394405365,
-0.07805108278989792,
-0.44960224628448486,
-0.16130203008651733,
0.362535297870636,
-0.34172287583351135,
0.3437931537628174,
0.09285584837198257,
0.32768094539642334,
-0.483480840921402,
-0.31222569942474365,
-0.07782717049121857,
-0.3827926218509674,
0.0844026654958725,
0.38302475214004517,
-0.09323745220899582,
0.11557202786207199,
-0.17427238821983337,
0.05813458561897278,
0.07772059738636017,
-0.048652756959199905,
-0.10177460312843323,
0.048557061702013016,
-0.3949509561061859,
0.128805011510849,
-0.08165327459573746,
-0.1171666830778122,
-0.1848565936088562,
-0.08107689023017883,
0.23077325522899628,
0.27326542139053345,
-0.1900751292705536,
0.06061265617609024,
-0.08477772772312164,
0.12471629679203033,
0.17156998813152313,
0.1490536481142044,
-0.2594197988510132,
-0.30067336559295654,
0.5005359649658203,
-0.3058415353298187,
-0.2192993313074112,
0.3871685862541199,
0.09997428953647614,
-0.05988685041666031,
-0.006135977804660797,
-0.5211727619171143,
-0.2241022288799286,
-0.35634541511535645,
0.07029077410697937,
-0.09889330714941025,
0.18880580365657806,
0.38657963275909424,
0.3998183012008667,
0.22101789712905884,
0.19581717252731323,
0.13928082585334778,
0.05005870386958122,
-0.2715661823749542,
0.2696123719215393,
-0.013182342052459717,
-0.30086320638656616,
-0.27527040243148804,
-0.006792761385440826,
0.2634026110172272,
-0.123146653175354,
-0.5247805714607239,
-0.03732258081436157,
-0.3209400475025177,
0.03727634251117706,
-0.20965373516082764,
0.15693973004817963,
0.35497331619262695,
0.18411101400852203,
-0.12770962715148926,
0.03977853059768677,
-0.11750276386737823,
0.14900729060173035,
0.13180865347385406,
-0.013068240135908127,
-0.1140984296798706,
0.13988228142261505,
-0.008346758782863617,
0.4515620172023773,
-0.23243889212608337,
-0.49271830916404724,
0.23644064366817474,
-0.14586254954338074,
-0.05267074704170227,
-0.1407422572374344,
-0.648513913154602,
0.17912410199642181,
0.008252471685409546,
-0.22524090111255646,
0.031131921336054802,
-0.1652589589357376,
0.12208296358585358,
-0.2702326774597168,
0.03246108442544937,
0.1924402415752411,
-0.3298083543777466,
0.16506727039813995,
-0.04472730681300163,
0.10981449484825134,
-0.1882145255804062,
0.005054101347923279,
-0.004024907946586609,
-0.00452210009098053,
0.1434651017189026,
0.14753708243370056,
-0.12432782351970673,
-0.15119807422161102,
-0.14070576429367065,
-0.4676625430583954,
-0.23974324762821198,
0.11574403941631317,
-0.013119012117385864,
0.5061631798744202,
-0.09242924302816391,
-0.287717342376709,
0.19515211880207062,
0.1546899378299713,
0.43048402667045593,
0.3727838099002838,
-0.0674203559756279,
0.3951696753501892,
-0.28912103176116943,
-0.2214917540550232,
-0.2513844966888428,
-0.38991543650627136,
-0.09655977785587311,
0.14376585185527802,
0.2740156948566437,
-0.12801995873451233,
-0.12749652564525604,
0.2530774772167206,
-0.00601625069975853,
-0.20985229313373566,
0.0836346298456192,
-0.36885660886764526,
-0.22663648426532745,
-0.2847502529621124,
0.24166128039360046,
-0.0016026347875595093,
0.3828981816768646,
0.1381385773420334,
-0.11297167837619781,
-0.1682649403810501,
-0.3790956139564514,
0.1751476526260376,
0.06319337338209152,
-0.054088130593299866,
-0.0459090881049633,
0.2721274793148041,
-0.17221394181251526,
0.15161775052547455,
0.21226061880588531,
0.3196388781070709,
0.12007422745227814,
-0.2156243771314621,
-0.01005497295409441,
0.16253826022148132,
0.2514963746070862,
0.15312254428863525,
-0.08114504814147949,
0.16502371430397034,
-0.09553883224725723,
0.3300096392631531,
0.004477363079786301,
0.23179000616073608,
0.2406769096851349,
0.030290547758340836,
-0.002940051257610321,
-0.037595558911561966,
0.2302762269973755,
-0.047035668045282364,
0.11717748641967773,
0.09739400446414948,
-0.03827700391411781,
-0.10399554669857025,
0.08622796088457108,
0.054677315056324005,
1.107297420501709,
0.05398347228765488,
0.1958358734846115,
0.3732786178588867,
-0.2156713902950287,
0.2701660692691803,
-0.25110432505607605,
0.25904640555381775,
-0.44972994923591614,
-0.5446449518203735,
-0.05955551564693451,
-0.15259358286857605,
0.09004276245832443,
-0.11513344943523407,
-0.1622541844844818,
0.15357491374015808,
-0.12357813864946365,
0.3503260016441345,
0.2394338697195053,
-0.04672675207257271,
0.09749215841293335,
-0.16108667850494385,
-0.35443294048309326,
0.13142509758472443,
-0.25358086824417114,
0.3702431917190552,
0.12199011445045471,
-0.20371249318122864,
-0.29973721504211426,
-0.20377641916275024,
-0.027321353554725647,
0.2369409203529358,
-0.18058577179908752,
0.11062946915626526,
0.4199519753456116,
-0.2924826443195343,
0.19358986616134644,
0.001721749547868967,
0.08592641353607178,
0.20637579262256622,
-0.05129818618297577,
0.10016541182994843,
-0.22233596444129944,
0.18206411600112915,
0.08806454390287399,
0.1114332377910614,
0.5541040897369385,
-0.10231100022792816,
-0.248545303940773,
0.1692265272140503,
-0.007652450352907181,
-0.05519811436533928,
0.23640239238739014,
0.05747983977198601,
0.08912820369005203,
-0.4969985783100128,
0.015296407043933868,
0.06259237974882126,
-0.05149507522583008,
-0.3470431864261627,
0.20607517659664154,
0.07150081545114517,
-0.49973493814468384,
0.28008654713630676,
0.2227068394422531,
-0.2510972023010254,
-0.032746583223342896,
0.523213267326355,
0.03107370436191559,
0.2990812659263611,
0.472490131855011,
0.08169074356555939,
-0.10290248692035675,
-0.1903047263622284,
-0.09046679735183716,
0.4304616153240204,
-0.6447473168373108,
0.4572187662124634,
-0.30041834712028503,
-0.1736561805009842,
-0.39786356687545776,
0.42532414197921753,
-0.09676986932754517,
0.10200174152851105,
-0.18702924251556396,
-0.3029313087463379,
-0.4575052559375763,
-0.1244705393910408,
0.12482468783855438,
0.2770746052265167,
-0.28217241168022156,
0.497815877199173,
0.04063054919242859,
-0.009988637641072273,
-0.3482639193534851,
0.12228643894195557,
-0.4575382173061371,
0.10888273268938065,
0.00896868109703064,
-0.20028173923492432,
0.1874534785747528,
-0.09552978724241257,
0.15270832180976868,
0.19912424683570862,
-0.0027638617902994156,
-0.2449517697095871,
-0.25264281034469604,
0.11221463233232498,
0.18908634781837463,
-0.03207921236753464,
-0.03359771519899368,
0.252795934677124,
-0.12431011348962784,
-0.1534135937690735,
-0.04329004883766174,
0.2113657295703888,
-0.07674998044967651,
0.35750728845596313,
0.19289687275886536,
-0.019030705094337463,
0.06872501969337463,
-0.11098766326904297,
0.05288261920213699,
-0.016270998865365982,
0.1864132136106491,
-0.07087063044309616,
-0.01538035273551941,
-0.03935842961072922,
-0.37513697147369385,
0.14133106172084808,
-0.11981384456157684,
-0.05138125643134117,
0.3015194535255432,
-0.2523069381713867,
-0.15779241919517517,
0.1467491090297699,
0.24719509482383728,
0.1500653475522995,
-0.1352858543395996,
0.11254700273275375,
-0.04623716324567795,
0.23992857336997986,
-0.31987082958221436,
0.010005228221416473,
0.12103066593408585,
-0.055496007204055786,
-0.07129302620887756,
0.26744091510772705,
-0.08544853329658508,
-0.02998039871454239,
0.013458581641316414,
0.19102084636688232,
0.004127047955989838,
0.05335010215640068,
0.028245899826288223,
0.4502750635147095,
-0.05245917662978172,
0.33423659205436707,
0.31148356199264526,
-0.13707348704338074,
0.07470415532588959,
0.16486358642578125,
-0.24388054013252258,
0.18711620569229126,
0.11718027293682098,
-0.1628168374300003,
0.35223913192749023,
-0.0728127658367157,
-0.11726783215999603,
-0.00827520340681076,
0.19942639768123627,
-0.17484115064144135,
-0.07456520199775696,
0.32516783475875854,
-0.1469372808933258,
-0.15035516023635864,
0.044066883623600006,
0.08715330064296722,
-0.33034586906433105,
0.11424466222524643,
0.05506230890750885,
-0.0010963231325149536,
-0.5420821905136108,
-0.09862291067838669,
-0.10525024682283401,
0.06938578188419342,
0.5946497321128845,
-0.04664622247219086,
-0.07413570582866669,
-0.2673405408859253,
-0.138398215174675,
0.3255883455276489,
0.18868666887283325,
-0.17175689339637756,
0.234541118144989,
0.27081891894340515,
-0.1949029415845871,
-0.10538385808467865,
0.5402457118034363,
0.427590012550354,
0.07438290864229202,
-0.02717532590031624,
0.08558015525341034,
-0.10104241967201233,
-0.18880793452262878,
0.10323627293109894,
0.24270892143249512,
-0.12081184983253479,
0.2649831175804138,
0.08678179234266281,
0.12321725487709045,
-0.21204006671905518,
0.4372066259384155,
-0.20560836791992188,
0.030435506254434586,
-0.26736482977867126,
0.8229358196258545,
-0.019096730276942253,
-0.3099750876426697,
-0.30728793144226074,
-0.02139940857887268,
-0.23454022407531738,
0.21983206272125244,
0.20088410377502441,
-0.05430874973535538,
0.008260492235422134,
-0.222096785902977,
0.08547194302082062,
0.026699203997850418,
0.2693706452846527,
0.18922892212867737,
0.08690944314002991,
-0.5263440012931824,
0.050333619117736816,
-0.2152126282453537,
0.2483057975769043,
0.08911274373531342,
0.14144791662693024,
-0.13402990996837616,
-0.07316125929355621,
-0.08717609941959381,
0.10741861164569855,
0.09264709055423737,
-0.1484655886888504,
0.057479456067085266,
0.1307927817106247,
-0.11942476034164429,
-0.16555680334568024,
-0.1378258913755417,
-0.09692222625017166,
0.1851930469274521,
-0.1746809333562851,
0.01622929982841015,
-0.021307550370693207,
0.0724841058254242,
-0.07268103212118149,
-0.06956682354211807,
-0.10350316762924194,
0.0077083478681743145,
0.11530503630638123,
0.037248045206069946,
0.2832149267196655,
0.010529778897762299,
0.1197502389550209,
0.13643786311149597,
-0.14719830453395844,
-0.2857438027858734,
0.09743674099445343,
0.04881143197417259,
0.6039170026779175,
0.1559256762266159,
-0.08582102507352829,
-0.4458862245082855,
-0.01223510131239891,
0.08635810017585754,
0.03320680931210518,
-0.2374192774295807,
0.2504565119743347,
-0.2068198174238205,
0.1736845225095749,
0.34076112508773804,
0.232599139213562,
0.011972052976489067,
0.10694210231304169,
-0.6414797306060791,
-0.7082111835479736,
0.4613809585571289,
-0.31442150473594666,
-0.2555356025695801,
-0.12849895656108856,
0.13970646262168884,
0.09191963821649551,
-0.023206794634461403,
-0.7739472389221191,
0.03471145033836365,
0.2363339066505432,
-0.29960769414901733,
-0.33853402733802795,
0.26479408144950867,
0.14712265133857727,
0.2800688147544861,
0.0754094272851944,
0.7390705943107605,
0.11314120888710022,
0.1022886335849762,
0.054533444344997406,
-0.1350041627883911
] |
https://github.com/huggingface/datasets/issues/6567 | Thanks, I hope someone from transformers library addresses this issue.
On Mon, Jan 8, 2024 at 15:29 Albert Villanova del Moral <
***@***.***> wrote:
> I think you are reporting an issue with the transformers library. Note
> this is the repository of the datasets library. I am transferring your
> issue to their repository.
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/6567#issuecomment-1880688586>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AE4LJNOYMD6WJMXFKPMH6DLYNO7PJAVCNFSM6AAAAABBQ63HWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBQGY4DQNJYGY>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
| AttributeError: 'str' object has no attribute 'to' | ### Describe the bug
```
--------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
[<ipython-input-6-80c6086794e8>](https://localhost:8080/#) in <cell line: 10>()
8 report_to="wandb")
9
---> 10 trainer = Trainer(
11 model=model,
12 args=training_args,
1 frames
[/usr/local/lib/python3.10/dist-packages/transformers/trainer.py](https://localhost:8080/#) in _move_model_to_device(self, model, device)
688
689 def _move_model_to_device(self, model, device):
--> 690 model = model.to(device)
691 # Moving a model to an XLA device disconnects the tied weights, so we have to retie them.
692 if self.args.parallel_mode == ParallelMode.TPU and hasattr(model, "tie_weights"):
AttributeError: 'str' object has no attribute 'to'
```
### Steps to reproduce the bug
here is the notebook:
```
https://colab.research.google.com/drive/10JDBNsLlYrQdnI2FWfDK3F5M8wvVUDXG?usp=sharing
```
### Expected behavior
run the Training
### Environment info
Colab Notebook , T4 | 91 | AttributeError: 'str' object has no attribute 'to'
### Describe the bug
```
--------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
[<ipython-input-6-80c6086794e8>](https://localhost:8080/#) in <cell line: 10>()
8 report_to="wandb")
9
---> 10 trainer = Trainer(
11 model=model,
12 args=training_args,
1 frames
[/usr/local/lib/python3.10/dist-packages/transformers/trainer.py](https://localhost:8080/#) in _move_model_to_device(self, model, device)
688
689 def _move_model_to_device(self, model, device):
--> 690 model = model.to(device)
691 # Moving a model to an XLA device disconnects the tied weights, so we have to retie them.
692 if self.args.parallel_mode == ParallelMode.TPU and hasattr(model, "tie_weights"):
AttributeError: 'str' object has no attribute 'to'
```
### Steps to reproduce the bug
here is the notebook:
```
https://colab.research.google.com/drive/10JDBNsLlYrQdnI2FWfDK3F5M8wvVUDXG?usp=sharing
```
### Expected behavior
run the Training
### Environment info
Colab Notebook , T4
Thanks, I hope someone from transformers library addresses this issue.
On Mon, Jan 8, 2024 at 15:29 Albert Villanova del Moral <
***@***.***> wrote:
> I think you are reporting an issue with the transformers library. Note
> this is the repository of the datasets library. I am transferring your
> issue to their repository.
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/6567#issuecomment-1880688586>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AE4LJNOYMD6WJMXFKPMH6DLYNO7PJAVCNFSM6AAAAABBQ63HWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBQGY4DQNJYGY>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
| [
-0.021199770271778107,
-0.24903526902198792,
0.0938526839017868,
0.019450323656201363,
0.608004629611969,
0.023181691765785217,
0.6019617319107056,
0.42540740966796875,
-0.18105585873126984,
0.31553900241851807,
0.025728940963745117,
0.1877838373184204,
-0.1374649852514267,
-0.15173020958900452,
0.03735188767313957,
-0.2979094982147217,
0.07160252332687378,
0.12853991985321045,
-0.11001992225646973,
-0.04551273211836815,
0.02573089301586151,
0.3605198562145233,
-0.07435831427574158,
0.2769191563129425,
-0.44601714611053467,
0.019362619146704674,
0.15459582209587097,
-0.1662847399711609,
0.1520530879497528,
-0.23885253071784973,
0.27474743127822876,
-0.1591241955757141,
0.052128612995147705,
0.24640002846717834,
-0.00011664444173220545,
0.13894528150558472,
0.13794846832752228,
0.11776197701692581,
-0.41954290866851807,
-0.17298199236392975,
-0.25566136837005615,
0.07812657952308655,
0.37530815601348877,
-0.19499099254608154,
-0.17641681432724,
0.31153562664985657,
0.06642130017280579,
-0.10199432820081711,
0.10874517261981964,
0.5685552954673767,
0.23341378569602966,
0.45376044511795044,
0.2287592589855194,
-0.29368436336517334,
0.3004910945892334,
0.11217159032821655,
-0.26145458221435547,
0.254713773727417,
0.030155042186379433,
0.03936564177274704,
0.14868342876434326,
0.09585278481245041,
0.17566341161727905,
0.15813995897769928,
0.165415957570076,
0.14920255541801453,
0.06839296966791153,
-0.09586271643638611,
-0.06935617327690125,
0.21833589673042297,
0.06747892498970032,
-0.39860817790031433,
-0.1870635747909546,
-0.0417594388127327,
0.06540611386299133,
-0.023592472076416016,
0.036171115934848785,
-0.020592696964740753,
-0.0924844890832901,
0.011620580218732357,
-0.0603831447660923,
-0.0938398540019989,
-0.019504360854625702,
-0.07875825464725494,
-0.29344266653060913,
0.3653905391693115,
-0.024436865001916885,
-0.03798744082450867,
0.06816869974136353,
0.11766096949577332,
0.08825364708900452,
0.0332917682826519,
0.14593733847141266,
0.08185891807079315,
-0.3014514446258545,
-0.14405901730060577,
-0.1342582404613495,
-0.5682247877120972,
-0.3655480444431305,
-0.20679442584514618,
0.29601597785949707,
-0.31092917919158936,
0.25613659620285034,
0.2856135964393616,
0.13427233695983887,
0.28976091742515564,
-0.46441054344177246,
0.6654629707336426,
0.20903344452381134,
0.3257468342781067,
-0.20055270195007324,
-0.11815999448299408,
-0.014102991670370102,
0.07779170572757721,
0.2110021710395813,
-0.04988245666027069,
0.3108813464641571,
-0.14687302708625793,
-0.40248680114746094,
0.16543427109718323,
-0.46418827772140503,
0.09994398057460785,
-0.006226830184459686,
0.09460770338773727,
-0.17740370333194733,
0.41594988107681274,
0.39489424228668213,
-0.03781851381063461,
-0.24811187386512756,
0.24627217650413513,
-0.34002381563186646,
0.386615514755249,
-0.0693100169301033,
-0.31701815128326416,
-0.027706071734428406,
0.09459595382213593,
-0.0713639110326767,
-0.12923723459243774,
0.2142089158296585,
-0.034026049077510834,
-0.02676551789045334,
-0.13352638483047485,
0.07805219292640686,
0.5457662343978882,
-0.2333633303642273,
0.22712472081184387,
0.12572890520095825,
-0.6100165247917175,
-0.14959970116615295,
0.37645453214645386,
-0.3563147485256195,
-0.31682088971138,
-0.07681050151586533,
0.23415181040763855,
-0.24566861987113953,
-0.18127456307411194,
-0.27610769867897034,
-0.02915983647108078,
0.15594255924224854,
-0.24529482424259186,
0.0037842728197574615,
-0.4680045545101166,
-0.2785598635673523,
-0.09132099151611328,
0.12276683002710342,
0.007020220160484314,
-0.24311508238315582,
-0.3575798273086548,
0.1808808147907257,
-0.11225870251655579,
0.15736374258995056,
0.0015461184084415436,
-0.053122103214263916,
0.31468114256858826,
-0.1191500723361969,
0.04419104754924774,
0.21685338020324707,
-0.2327624261379242,
-0.4126972556114197,
-0.048802800476551056,
-0.1482512354850769,
-0.01901455968618393,
-0.004680212587118149,
0.18330657482147217,
0.08870355784893036,
0.013169709593057632,
-0.26135537028312683,
0.2507016360759735,
0.03291639685630798,
0.24059250950813293,
-0.3885344862937927,
0.08947305381298065,
0.040283046662807465,
0.3042069673538208,
0.27701666951179504,
0.4342876374721527,
-0.07197484374046326,
0.6959620714187622,
0.19318734109401703,
0.07411752641201019,
0.17428088188171387,
-0.011462187394499779,
0.44244855642318726,
-0.4442189931869507,
-0.16211964190006256,
-0.13793721795082092,
-0.20412227511405945,
-0.06681007146835327,
0.08675454556941986,
0.37375104427337646,
-0.0011976100504398346,
0.21346136927604675,
-0.07478291541337967,
0.1396542489528656,
-0.08042895793914795,
-0.29955095052719116,
0.07081075757741928,
0.06651845574378967,
-0.11955328285694122,
-0.03109617531299591,
-0.3191260099411011,
0.36795344948768616,
-0.006189718842506409,
0.16662326455116272,
-0.38868987560272217,
0.4023779332637787,
-0.22733277082443237,
-0.1331518441438675,
-0.30276280641555786,
0.17490825057029724,
-0.0833800658583641,
-0.044088538736104965,
-0.37781116366386414,
0.12963031232357025,
-0.08454206585884094,
-0.09978924691677094,
-0.1411270946264267,
0.46466293931007385,
0.30689966678619385,
-0.16514618694782257,
-0.2099834680557251,
0.46767401695251465,
0.3996541500091553,
-0.024581320583820343,
-0.21110470592975616,
0.3039235472679138,
0.0820196270942688,
0.3255273401737213,
0.2471287101507187,
0.23137837648391724,
0.0042586252093315125,
-0.10602864623069763,
0.034372478723526,
0.1280738264322281,
0.05358860269188881,
0.05885239318013191,
-0.00007062405347824097,
-0.009827254340052605,
-0.3654436469078064,
-0.0927097499370575,
0.3498446047306061,
0.08151915669441223,
0.012256650254130363,
0.36154836416244507,
-0.19603519141674042,
0.09434303641319275,
-0.17225177586078644,
0.40984785556793213,
0.4668833315372467,
-0.06655430048704147,
-0.10280859470367432,
0.10315178334712982,
-0.021943632513284683,
-0.2627517879009247,
0.2635389566421509,
0.05764959752559662,
-0.14150482416152954,
0.016891835257411003,
0.28338509798049927,
0.2220316082239151,
-0.014579154551029205,
-0.48702865839004517,
-0.12619194388389587,
0.33308735489845276,
-0.33481287956237793,
0.31876713037490845,
0.12425228208303452,
0.3677959442138672,
-0.5087293982505798,
-0.33469241857528687,
-0.07022780179977417,
-0.39383435249328613,
0.057939302176237106,
0.3414885103702545,
-0.16022685170173645,
0.07927420735359192,
-0.27421891689300537,
-0.017609328031539917,
0.09911545366048813,
-0.11851388961076736,
-0.07336500287055969,
0.06489267200231552,
-0.3614612817764282,
0.10049831122159958,
-0.07202015817165375,
-0.14593538641929626,
-0.2929452955722809,
0.004013463854789734,
0.22100336849689484,
0.3148559629917145,
-0.14645911753177643,
0.07149089872837067,
-0.024303369224071503,
0.027811935171484947,
0.16331206262111664,
0.05006813257932663,
-0.24127385020256042,
-0.3101409077644348,
0.4530181884765625,
-0.35925328731536865,
-0.173493430018425,
0.465393602848053,
0.08158981800079346,
-0.04347202926874161,
0.00011371821165084839,
-0.5201785564422607,
-0.22756005823612213,
-0.334360271692276,
-0.01807381957769394,
-0.13408783078193665,
0.2505797743797302,
0.4248095452785492,
0.3686685264110565,
0.1529752016067505,
0.23842690885066986,
0.10012699663639069,
0.09708871692419052,
-0.23380407691001892,
0.29975247383117676,
-0.011006370186805725,
-0.25301069021224976,
-0.30877041816711426,
-0.04117075353860855,
0.2104823738336563,
-0.09696021676063538,
-0.4940272569656372,
0.06864899396896362,
-0.3084922432899475,
-0.015622138977050781,
-0.245461106300354,
0.08300366997718811,
0.3719520568847656,
0.24921151995658875,
-0.1066797524690628,
0.04810190200805664,
-0.07151791453361511,
0.17453600466251373,
0.1642017364501953,
-0.019065745174884796,
-0.10834665596485138,
0.09193100035190582,
0.014046765863895416,
0.358916699886322,
-0.2622724771499634,
-0.4446808099746704,
0.240381121635437,
-0.07402638345956802,
-0.11802749335765839,
-0.134881392121315,
-0.5695095062255859,
0.16736304759979248,
0.017258048057556152,
-0.3008360266685486,
0.006830599159002304,
-0.13130062818527222,
0.09702536463737488,
-0.2620965242385864,
0.0284324511885643,
0.23880326747894287,
-0.29869306087493896,
0.1994086056947708,
-0.13158831000328064,
0.1158813089132309,
-0.20526868104934692,
-0.004942543804645538,
0.0020236894488334656,
-0.005613148212432861,
0.1523512899875641,
0.12274220585823059,
-0.11246272921562195,
-0.12922774255275726,
-0.102730393409729,
-0.4654839038848877,
-0.15121692419052124,
0.03716915473341942,
0.05105481669306755,
0.5678057670593262,
-0.050313036888837814,
-0.33613505959510803,
0.16710515320301056,
0.15794479846954346,
0.4026002287864685,
0.38314032554626465,
0.023037845268845558,
0.4232916831970215,
-0.22256982326507568,
-0.19145682454109192,
-0.31416797637939453,
-0.3777885437011719,
-0.11126219481229782,
0.12569178640842438,
0.20589104294776917,
-0.029101654887199402,
-0.0709025114774704,
0.2476269155740738,
-0.027860824018716812,
-0.23100383579730988,
0.05575214698910713,
-0.32386577129364014,
-0.2025500237941742,
-0.2388700246810913,
0.22385916113853455,
0.031115978956222534,
0.3907196819782257,
0.1679268628358841,
-0.13663913309574127,
-0.17824934422969818,
-0.3845663070678711,
0.15063118934631348,
-0.061693158000707626,
-0.08325101435184479,
-0.10512815415859222,
0.26113754510879517,
-0.2412692755460739,
0.13887432217597961,
0.15531209111213684,
0.2771884799003601,
0.1930357664823532,
-0.1412528157234192,
0.055007513612508774,
0.16005417704582214,
0.23936614394187927,
0.11086130142211914,
-0.08980774879455566,
0.128902405500412,
-0.11215993762016296,
0.272635281085968,
-0.0013602860271930695,
0.1446182280778885,
0.1625707745552063,
-0.0541885606944561,
-0.022343166172504425,
-0.0034580081701278687,
0.215750589966774,
-0.14168497920036316,
0.14417801797389984,
0.033477142453193665,
-0.08197705447673798,
-0.09865595400333405,
0.1734706461429596,
0.08445113152265549,
1.0828909873962402,
0.05932239443063736,
0.14836791157722473,
0.34021276235580444,
-0.2539185881614685,
0.2776731550693512,
-0.33117908239364624,
0.2886314392089844,
-0.47163668274879456,
-0.5364699363708496,
-0.06729930639266968,
-0.17934244871139526,
0.05818004161119461,
-0.12057284265756607,
-0.1269281506538391,
0.11270330846309662,
-0.13946053385734558,
0.32774803042411804,
0.2939988374710083,
-0.02635902911424637,
0.11116965115070343,
-0.13726288080215454,
-0.2858603596687317,
0.10720150172710419,
-0.20576997101306915,
0.3739166557788849,
0.14980454742908478,
-0.21039904654026031,
-0.2912142872810364,
-0.24345317482948303,
-0.08591535687446594,
0.30689123272895813,
-0.10390983521938324,
0.13446535170078278,
0.5016880631446838,
-0.22960147261619568,
0.19666370749473572,
-0.020897692069411278,
0.0068595558404922485,
0.18237483501434326,
-0.03582663834095001,
0.16054034233093262,
-0.1784389764070511,
0.1992562711238861,
0.16658377647399902,
0.18654312193393707,
0.6019720435142517,
-0.11180911958217621,
-0.2251293659210205,
0.16281293332576752,
-0.0518888458609581,
-0.14954127371311188,
0.2506723403930664,
0.02522245980799198,
0.13614417612552643,
-0.45104658603668213,
0.041539695113897324,
0.06212534010410309,
-0.11562825739383698,
-0.32476675510406494,
0.20134472846984863,
0.038601186126470566,
-0.5123504996299744,
0.2778242528438568,
0.2047768533229828,
-0.2681867480278015,
-0.03365308791399002,
0.5383485555648804,
0.03500783443450928,
0.3448544144630432,
0.4541092813014984,
0.09172755479812622,
-0.10968519747257233,
-0.18083801865577698,
-0.10136756300926208,
0.4145587384700775,
-0.7181199789047241,
0.44905608892440796,
-0.38746365904808044,
-0.192584827542305,
-0.3855218291282654,
0.40149784088134766,
-0.1132199838757515,
0.1891433149576187,
-0.2359769195318222,
-0.3247711658477783,
-0.45325160026550293,
-0.16936863958835602,
0.1468696892261505,
0.2329394817352295,
-0.35160815715789795,
0.5262702107429504,
0.025812961161136627,
-0.021257223561406136,
-0.31506600975990295,
0.09330452233552933,
-0.4375864267349243,
0.14378955960273743,
-0.10503202676773071,
-0.17794881761074066,
0.13510049879550934,
-0.11691129952669144,
0.1444721519947052,
0.17529962956905365,
0.04671136289834976,
-0.20980602502822876,
-0.31181800365448,
0.11527813971042633,
0.2191079556941986,
-0.005731493234634399,
-0.08266197144985199,
0.2514042258262634,
-0.12759548425674438,
-0.11749903857707977,
-0.10644561052322388,
0.22913852334022522,
-0.13863405585289001,
0.4301932454109192,
0.2096853405237198,
-0.02520860731601715,
0.030514054000377655,
-0.07342405617237091,
0.01499803178012371,
0.0069225989282131195,
0.20792320370674133,
-0.043555282056331635,
0.03210192918777466,
-0.00929626077413559,
-0.45709165930747986,
0.09480486065149307,
-0.21295638382434845,
-0.028819987550377846,
0.3294591009616852,
-0.245169997215271,
-0.1515205204486847,
0.15402570366859436,
0.15182076394557953,
0.09559155255556107,
-0.1412326693534851,
0.09075485914945602,
-0.11639777570962906,
0.21810570359230042,
-0.2753159999847412,
-0.01628175564110279,
0.01454954594373703,
-0.021983155980706215,
-0.13169537484645844,
0.2319543957710266,
-0.075400210916996,
-0.10762719064950943,
0.031999316066503525,
0.20313780009746552,
0.042879730463027954,
0.020097054541110992,
0.046898942440748215,
0.5115418434143066,
-0.04982634261250496,
0.35688257217407227,
0.24844515323638916,
-0.19180192053318024,
0.052353717386722565,
0.12317515164613724,
-0.21125754714012146,
0.14914797246456146,
0.20894856750965118,
-0.15801076591014862,
0.310865193605423,
-0.01779455691576004,
-0.14193236827850342,
0.05143578350543976,
0.21801641583442688,
-0.14285123348236084,
-0.03282536566257477,
0.22125890851020813,
-0.08218394219875336,
-0.06564420461654663,
0.054939985275268555,
0.03773351013660431,
-0.30475008487701416,
0.07707077264785767,
0.1437220424413681,
0.01004442572593689,
-0.5928364396095276,
-0.08277080953121185,
-0.11307407915592194,
0.12206880003213882,
0.5545052886009216,
-0.024347715079784393,
-0.12488169968128204,
-0.22798630595207214,
-0.10289892554283142,
0.28723451495170593,
0.19281068444252014,
-0.24277320504188538,
0.21456465125083923,
0.27746766805648804,
-0.21452638506889343,
-0.07718516886234283,
0.4867764413356781,
0.4229413568973541,
0.10328006744384766,
-0.03713091462850571,
0.08207206428050995,
-0.11970588564872742,
-0.1985229253768921,
0.14211711287498474,
0.25403472781181335,
-0.09328268468379974,
0.2598032057285309,
0.01821829006075859,
0.10703324526548386,
-0.16172394156455994,
0.45253053307533264,
-0.16765332221984863,
0.059409383684396744,
-0.1912667155265808,
0.9066122174263,
0.04643916338682175,
-0.3559562861919403,
-0.25470101833343506,
0.04677823930978775,
-0.18526926636695862,
0.18553020060062408,
0.15623393654823303,
-0.03583845868706703,
0.02724170684814453,
-0.16879919171333313,
0.06693413108587265,
0.05801345780491829,
0.22361822426319122,
0.15362218022346497,
0.06881541013717651,
-0.5263348817825317,
0.0419185608625412,
-0.0990147739648819,
0.292471706867218,
0.11855653673410416,
0.18714845180511475,
-0.08368690311908722,
-0.08548735082149506,
-0.13369610905647278,
0.045251090079545975,
0.025711707770824432,
-0.12427349388599396,
0.03623941168189049,
0.2195485383272171,
-0.050971951335668564,
-0.13714148104190826,
-0.06487150490283966,
-0.042336732149124146,
0.14930887520313263,
-0.19385938346385956,
0.01668303832411766,
0.03417765349149704,
0.06735360622406006,
-0.10207908600568771,
-0.11277581006288528,
-0.013798844069242477,
0.0871603712439537,
0.08951731026172638,
0.0151048693805933,
0.27939459681510925,
-0.0067639946937561035,
0.13318857550621033,
0.09133948385715485,
-0.10149428993463516,
-0.2646749019622803,
0.02178838476538658,
0.02619856595993042,
0.5807562470436096,
0.19053855538368225,
-0.006084938533604145,
-0.4290986657142639,
-0.08902890235185623,
-0.027289368212223053,
0.12139217555522919,
-0.29400962591171265,
0.23399177193641663,
-0.2917524576187134,
0.2238202840089798,
0.3038783073425293,
0.12663909792900085,
0.06927581131458282,
0.08816982060670853,
-0.6744308471679688,
-0.7016345262527466,
0.39566928148269653,
-0.3009098470211029,
-0.2449234277009964,
-0.146192729473114,
0.14068683981895447,
0.04937729611992836,
0.053878672420978546,
-0.7765921354293823,
0.006193146109580994,
0.23158125579357147,
-0.26740455627441406,
-0.32136988639831543,
0.19122716784477234,
0.19671326875686646,
0.30891305208206177,
0.05099571496248245,
0.702396810054779,
0.12149723619222641,
0.14434298872947693,
-0.010687842965126038,
-0.12689489126205444
] |
https://github.com/huggingface/datasets/issues/6567 | @andysingal, I recommend that you open an issue in their repository: https://github.com/huggingface/transformers/issues
I don't have the rights to transfer this issue to their repo. | AttributeError: 'str' object has no attribute 'to' | ### Describe the bug
```
--------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
[<ipython-input-6-80c6086794e8>](https://localhost:8080/#) in <cell line: 10>()
8 report_to="wandb")
9
---> 10 trainer = Trainer(
11 model=model,
12 args=training_args,
1 frames
[/usr/local/lib/python3.10/dist-packages/transformers/trainer.py](https://localhost:8080/#) in _move_model_to_device(self, model, device)
688
689 def _move_model_to_device(self, model, device):
--> 690 model = model.to(device)
691 # Moving a model to an XLA device disconnects the tied weights, so we have to retie them.
692 if self.args.parallel_mode == ParallelMode.TPU and hasattr(model, "tie_weights"):
AttributeError: 'str' object has no attribute 'to'
```
### Steps to reproduce the bug
here is the notebook:
```
https://colab.research.google.com/drive/10JDBNsLlYrQdnI2FWfDK3F5M8wvVUDXG?usp=sharing
```
### Expected behavior
run the Training
### Environment info
Colab Notebook , T4 | 24 | AttributeError: 'str' object has no attribute 'to'
### Describe the bug
```
--------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
[<ipython-input-6-80c6086794e8>](https://localhost:8080/#) in <cell line: 10>()
8 report_to="wandb")
9
---> 10 trainer = Trainer(
11 model=model,
12 args=training_args,
1 frames
[/usr/local/lib/python3.10/dist-packages/transformers/trainer.py](https://localhost:8080/#) in _move_model_to_device(self, model, device)
688
689 def _move_model_to_device(self, model, device):
--> 690 model = model.to(device)
691 # Moving a model to an XLA device disconnects the tied weights, so we have to retie them.
692 if self.args.parallel_mode == ParallelMode.TPU and hasattr(model, "tie_weights"):
AttributeError: 'str' object has no attribute 'to'
```
### Steps to reproduce the bug
here is the notebook:
```
https://colab.research.google.com/drive/10JDBNsLlYrQdnI2FWfDK3F5M8wvVUDXG?usp=sharing
```
### Expected behavior
run the Training
### Environment info
Colab Notebook , T4
@andysingal, I recommend that you open an issue in their repository: https://github.com/huggingface/transformers/issues
I don't have the rights to transfer this issue to their repo. | [
0.0757463276386261,
-0.4929776191711426,
0.0982719212770462,
0.06737048178911209,
0.5980656743049622,
-0.017362095415592194,
0.5761122107505798,
0.3846137523651123,
-0.1268261820077896,
0.3702743947505951,
-0.019784869626164436,
0.16745971143245697,
-0.11638899147510529,
-0.06340529769659042,
0.08663733303546906,
-0.3659118413925171,
0.05191367119550705,
0.0997089296579361,
-0.06795185059309006,
-0.03547881543636322,
0.03974558413028717,
0.3885669410228729,
-0.04581362009048462,
0.30980125069618225,
-0.41295114159584045,
0.04393681138753891,
0.11130215972661972,
-0.15564587712287903,
0.20409458875656128,
-0.17835445702075958,
0.2191045880317688,
-0.13358692824840546,
-0.0015909560024738312,
0.2377568632364273,
-0.00011663842451525852,
0.15458974242210388,
0.060707855969667435,
0.11298779398202896,
-0.3586145043373108,
-0.16879230737686157,
-0.19015422463417053,
0.07972786575555801,
0.3544091582298279,
-0.1650061309337616,
-0.1778651475906372,
0.3098980784416199,
0.04567945748567581,
-0.00918307900428772,
0.20973888039588928,
0.588948667049408,
0.23994861543178558,
0.4866815507411957,
0.22274097800254822,
-0.2852988541126251,
0.23989281058311462,
0.07056660950183868,
-0.21584555506706238,
0.3510495126247406,
-0.03782854601740837,
0.023371152579784393,
0.15724873542785645,
0.08463342487812042,
0.16869452595710754,
0.11244536936283112,
0.14743667840957642,
0.2325524389743805,
0.11793653666973114,
-0.15595878660678864,
-0.06920745223760605,
0.23038499057292938,
-0.13653242588043213,
-0.32761862874031067,
-0.17296406626701355,
-0.0693528801202774,
0.06814566254615784,
-0.07018961012363434,
0.011744356714189053,
-0.025858938694000244,
-0.10725265741348267,
0.03776983544230461,
-0.04632612317800522,
-0.10076829046010971,
-0.021956712007522583,
-0.1220005452632904,
-0.27045220136642456,
0.3282963037490845,
-0.08492830395698547,
-0.05487428978085518,
0.14096619188785553,
0.1366068422794342,
-0.08915726840496063,
0.039171986281871796,
0.18155895173549652,
0.09688424319028854,
-0.2566233277320862,
-0.14445549249649048,
-0.09656259417533875,
-0.5046318173408508,
-0.3058854043483734,
-0.2228083610534668,
0.3150405287742615,
-0.3485186994075775,
0.27839305996894836,
0.29800695180892944,
0.008140657097101212,
0.3337225615978241,
-0.4582713544368744,
0.5429752469062805,
0.17697006464004517,
0.3969680070877075,
-0.19115664064884186,
-0.10454532504081726,
0.01255810633301735,
0.06066008284687996,
0.17967712879180908,
-0.03637650981545448,
0.3309522271156311,
-0.10407151281833649,
-0.4566602408885956,
0.2062692791223526,
-0.4712292551994324,
0.1190711259841919,
-0.029059695079922676,
0.10649731010198593,
-0.16602367162704468,
0.3581608533859253,
0.4270789623260498,
-0.003456825390458107,
-0.31261953711509705,
0.25857678055763245,
-0.3479400873184204,
0.3799443542957306,
-0.01147780567407608,
-0.2844330668449402,
-0.11676944047212601,
0.10806172341108322,
-0.026748551055788994,
-0.10757756978273392,
0.25535205006599426,
-0.05711871758103371,
-0.09402622282505035,
-0.060167346149683,
0.02746877819299698,
0.5261686444282532,
-0.253221333026886,
0.14009299874305725,
0.1619645059108734,
-0.616222083568573,
-0.13281899690628052,
0.2601146399974823,
-0.29610079526901245,
-0.33198946714401245,
-0.040280748158693314,
0.24444429576396942,
-0.19666816294193268,
-0.17892727255821228,
-0.3224177956581116,
-0.019477088004350662,
0.13237550854682922,
-0.12945470213890076,
0.029337914660573006,
-0.4290938377380371,
-0.316103458404541,
-0.06882792711257935,
0.17615322768688202,
0.031566500663757324,
-0.1593867689371109,
-0.4330437183380127,
0.28674763441085815,
-0.1382964849472046,
0.14584533870220184,
0.0004036165773868561,
0.029271092265844345,
0.38545796275138855,
-0.15983855724334717,
-0.026703178882598877,
0.15346631407737732,
-0.22899731993675232,
-0.38307425379753113,
-0.07028506696224213,
-0.21841612458229065,
0.04125291109085083,
0.08010251820087433,
0.05439796298742294,
0.038998205214738846,
0.04937572777271271,
-0.11348800361156464,
0.21765337884426117,
0.014483032748103142,
0.21299253404140472,
-0.3635227084159851,
0.1354409158229828,
-0.02159387618303299,
0.24297073483467102,
0.21837911009788513,
0.4485528767108917,
-0.13592877984046936,
0.5633639097213745,
0.18997839093208313,
0.0713241845369339,
0.1398559808731079,
-0.029482394456863403,
0.4295644164085388,
-0.4469780921936035,
-0.1702221930027008,
-0.15912406146526337,
-0.21932359039783478,
-0.0654982253909111,
-0.023896466940641403,
0.37707242369651794,
0.03268459066748619,
0.14592038094997406,
-0.14058318734169006,
0.0982230007648468,
-0.07111652195453644,
-0.3303133547306061,
0.09594815224409103,
0.05280604213476181,
-0.06119581311941147,
0.04956745356321335,
-0.29471030831336975,
0.36969512701034546,
0.004067137837409973,
0.2301563322544098,
-0.35685625672340393,
0.3780409097671509,
-0.2863309383392334,
-0.12368510663509369,
-0.33054399490356445,
0.17482784390449524,
-0.011481896042823792,
-0.08995633572340012,
-0.30055925250053406,
0.1379968374967575,
-0.14781835675239563,
-0.04357730969786644,
-0.14595693349838257,
0.388837069272995,
0.35593515634536743,
-0.09043796360492706,
-0.30050039291381836,
0.4163092374801636,
0.374538779258728,
-0.04220300912857056,
-0.16933666169643402,
0.3684239983558655,
0.14432698488235474,
0.3732443153858185,
0.24935004115104675,
0.23057004809379578,
-0.07854853570461273,
-0.07445478439331055,
0.03668425232172012,
0.1988632082939148,
0.084074005484581,
-0.009435148909687996,
-0.011632576584815979,
-0.043790511786937714,
-0.43299126625061035,
-0.08234918117523193,
0.34833014011383057,
0.07324077188968658,
-0.008733035996556282,
0.3192554712295532,
-0.16296038031578064,
0.11500676721334457,
-0.2000523805618286,
0.2611315846443176,
0.40235838294029236,
-0.050984691828489304,
-0.14493270218372345,
0.14218555390834808,
0.037032417953014374,
-0.2372732311487198,
0.2829584777355194,
0.028482504189014435,
-0.1477276235818863,
0.03157241642475128,
0.2645944058895111,
0.20097601413726807,
-0.03324747458100319,
-0.4827786087989807,
-0.19154566526412964,
0.27560955286026,
-0.3807355761528015,
0.33209794759750366,
0.20967772603034973,
0.38774052262306213,
-0.49320662021636963,
-0.3261827826499939,
-0.08679629117250443,
-0.35786932706832886,
0.04912734404206276,
0.4149859547615051,
-0.15134142339229584,
0.06207042187452316,
-0.16735967993736267,
0.027044445276260376,
0.10586119443178177,
-0.04706043004989624,
-0.1568298488855362,
0.14895856380462646,
-0.35892608761787415,
0.10131961852312088,
-0.12194506824016571,
-0.20067095756530762,
-0.30534160137176514,
-0.055158574134111404,
0.1533564031124115,
0.3767434358596802,
-0.18681614100933075,
0.07246115803718567,
-0.09227534383535385,
0.08543858677148819,
0.15552741289138794,
0.10413497686386108,
-0.2591327726840973,
-0.24975749850273132,
0.48389217257499695,
-0.28016966581344604,
-0.23971068859100342,
0.4750175476074219,
0.11504966020584106,
-0.013728026300668716,
-0.03931032866239548,
-0.4820314049720764,
-0.19042281806468964,
-0.321294367313385,
0.10971342772245407,
-0.10913704335689545,
0.219911590218544,
0.43203210830688477,
0.3673401474952698,
0.22940941154956818,
0.22840556502342224,
0.18034058809280396,
0.13706181943416595,
-0.19192469120025635,
0.22688399255275726,
-0.0016415566205978394,
-0.2513865530490875,
-0.36599308252334595,
-0.045820336788892746,
0.15072330832481384,
-0.21481077373027802,
-0.487557590007782,
-0.0708254873752594,
-0.3494149148464203,
-0.03320927172899246,
-0.2560819685459137,
0.10327264666557312,
0.38822853565216064,
0.21830734610557556,
-0.1028750091791153,
0.062432482838630676,
-0.08412333577871323,
0.1901051551103592,
0.20029425621032715,
-0.11194639652967453,
-0.10280653834342957,
0.1162562370300293,
0.00875847041606903,
0.4080480635166168,
-0.24095690250396729,
-0.3996953070163727,
0.18103429675102234,
-0.13535545766353607,
-0.11763523519039154,
-0.1884288638830185,
-0.6196489930152893,
0.1783050298690796,
0.06941311061382294,
-0.2891942262649536,
-0.028560683131217957,
-0.1539917290210724,
0.18040266633033752,
-0.26421207189559937,
0.007501006126403809,
0.24016998708248138,
-0.29259952902793884,
0.1770535558462143,
-0.07263219356536865,
0.027143755927681923,
-0.17666243016719818,
-0.01896878331899643,
0.050307631492614746,
0.07811839133501053,
0.2018360197544098,
0.1379314512014389,
-0.0694321021437645,
-0.11735512316226959,
-0.1349909007549286,
-0.5162981152534485,
-0.19071903824806213,
0.08251413702964783,
0.04520951211452484,
0.4773796796798706,
-0.042377669364213943,
-0.35273855924606323,
0.21000418066978455,
0.1143089234828949,
0.4560565948486328,
0.42471662163734436,
0.028159277513623238,
0.3689001202583313,
-0.2641289234161377,
-0.2165558934211731,
-0.25999367237091064,
-0.3870614767074585,
-0.14838333427906036,
0.1706523299217224,
0.2959992289543152,
-0.08578089624643326,
-0.1179676204919815,
0.26092103123664856,
-0.07631674408912659,
-0.25108522176742554,
0.12164437025785446,
-0.4077277183532715,
-0.21305841207504272,
-0.23373427987098694,
0.30753207206726074,
0.0543813481926918,
0.3992098569869995,
0.19251206517219543,
-0.07346305251121521,
-0.1314486414194107,
-0.42003893852233887,
0.105855792760849,
-0.036409132182598114,
-0.10395081341266632,
-0.09955069422721863,
0.2151152640581131,
-0.20672129094600677,
0.1401093602180481,
0.08558814972639084,
0.2572696805000305,
0.15859833359718323,
-0.23017190396785736,
-0.0464809313416481,
0.20773319900035858,
0.2819799780845642,
0.15420402586460114,
-0.061199769377708435,
0.14768993854522705,
-0.07394582033157349,
0.3613271415233612,
-0.03015933185815811,
0.1490619033575058,
0.17251767218112946,
0.0075690001249313354,
0.06908345222473145,
0.06479751318693161,
0.21964776515960693,
-0.16064009070396423,
0.1235315352678299,
-0.010853192768990993,
0.08701770007610321,
-0.13432157039642334,
0.17309929430484772,
-0.0001382976770401001,
1.119912028312683,
0.13091865181922913,
0.16484029591083527,
0.4307404160499573,
-0.2848649024963379,
0.21139687299728394,
-0.22783268988132477,
0.2663682699203491,
-0.42584243416786194,
-0.49607062339782715,
-0.0710759311914444,
-0.1540263444185257,
0.004197584465146065,
-0.19661635160446167,
-0.15801770985126495,
0.14009466767311096,
-0.17670774459838867,
0.32398608326911926,
0.2762417197227478,
-0.10160793364048004,
0.13025888800621033,
-0.12170439213514328,
-0.29735350608825684,
0.1017279326915741,
-0.17880122363567352,
0.4385213851928711,
0.14618337154388428,
-0.20250394940376282,
-0.27436530590057373,
-0.257724404335022,
-0.006714090704917908,
0.2284075915813446,
-0.2051597237586975,
0.061756279319524765,
0.4854869246482849,
-0.2592623233795166,
0.09081709384918213,
0.007585247978568077,
0.04066289961338043,
0.13241615891456604,
-0.02572336234152317,
0.09513883292675018,
-0.19902876019477844,
0.19970014691352844,
0.12267151474952698,
0.12202136963605881,
0.5873230695724487,
-0.08682629466056824,
-0.24018576741218567,
0.12898027896881104,
-0.04574371874332428,
-0.0846891701221466,
0.2345002442598343,
0.03807079792022705,
0.08504028618335724,
-0.4329543709754944,
0.049261730164289474,
0.04740409925580025,
-0.09657926857471466,
-0.35469865798950195,
0.19668269157409668,
0.006447497755289078,
-0.5674805045127869,
0.1650136113166809,
0.20456522703170776,
-0.24755987524986267,
-0.03410716354846954,
0.5049222111701965,
0.03910426050424576,
0.35217854380607605,
0.41928935050964355,
0.04535149037837982,
-0.08351737260818481,
-0.17478182911872864,
-0.08544538170099258,
0.4745052456855774,
-0.6889722943305969,
0.49685004353523254,
-0.36776626110076904,
-0.20772294700145721,
-0.49060875177383423,
0.4232516884803772,
-0.05712365731596947,
0.14132598042488098,
-0.1638156622648239,
-0.2989742159843445,
-0.47862327098846436,
-0.13416892290115356,
0.1578959822654724,
0.22792527079582214,
-0.3047301173210144,
0.532139003276825,
0.005801394581794739,
0.008744927123188972,
-0.3190688490867615,
0.11810901015996933,
-0.4422301650047302,
0.10608041286468506,
-0.03058955818414688,
-0.22860178351402283,
0.2248086780309677,
-0.056025952100753784,
0.16142550110816956,
0.22689391672611237,
0.05468699336051941,
-0.2301059365272522,
-0.28650766611099243,
0.1020301952958107,
0.1769256591796875,
-0.006593883037567139,
-0.04284190386533737,
0.35543596744537354,
-0.1185581237077713,
-0.12139203399419785,
-0.07404399663209915,
0.20464296638965607,
-0.05145047977566719,
0.37375348806381226,
0.1827147901058197,
0.05741134285926819,
0.07698895037174225,
-0.13506488502025604,
0.03737784922122955,
-0.006790287792682648,
0.19735835492610931,
-0.10468724370002747,
-0.06680797785520554,
-0.025758974254131317,
-0.3858826458454132,
0.12258449196815491,
-0.1496051847934723,
-0.037859734147787094,
0.3082321882247925,
-0.23636659979820251,
-0.24616390466690063,
0.07940937578678131,
0.1766890287399292,
0.07142607867717743,
-0.14132119715213776,
0.1558825671672821,
-0.08951430767774582,
0.22464033961296082,
-0.27010872960090637,
0.08298070728778839,
0.10139212012290955,
-0.07249465584754944,
-0.08524204790592194,
0.29161331057548523,
-0.16227102279663086,
-0.06502444297075272,
0.006508512422442436,
0.24884860217571259,
-0.031088601797819138,
0.04467450827360153,
-0.0013622231781482697,
0.3302004337310791,
-0.05217582732439041,
0.36406493186950684,
0.2957881689071655,
-0.19056081771850586,
0.10123203694820404,
0.057419076561927795,
-0.19985538721084595,
0.09426027536392212,
0.10057928413152695,
-0.15303906798362732,
0.3934313952922821,
0.016065150499343872,
-0.18594825267791748,
0.030495498329401016,
0.16863000392913818,
-0.11285434663295746,
-0.057595714926719666,
0.31030428409576416,
-0.10639092326164246,
-0.15730880200862885,
0.07089398056268692,
0.03468797355890274,
-0.3403416574001312,
0.06494714319705963,
0.15075048804283142,
-0.00788029283285141,
-0.5050100088119507,
-0.10510151088237762,
-0.02000677026808262,
0.08215053379535675,
0.5677183866500854,
-0.04201488196849823,
-0.10028372704982758,
-0.14852872490882874,
-0.2710264027118683,
0.3087542951107025,
0.2709955871105194,
-0.23261646926403046,
0.22852563858032227,
0.34351423382759094,
-0.23384149372577667,
-0.14475825428962708,
0.5633389949798584,
0.43315279483795166,
0.0407768152654171,
-0.10668942332267761,
0.1013452559709549,
-0.07421189546585083,
-0.20739492774009705,
0.11666150391101837,
0.23515291512012482,
-0.12291468679904938,
0.23692458868026733,
0.02689124271273613,
0.12370285391807556,
-0.20214402675628662,
0.4402475655078888,
-0.1514202505350113,
0.03534192591905594,
-0.22239243984222412,
0.8842219114303589,
-0.035164471715688705,
-0.32933348417282104,
-0.3221450448036194,
0.006371214985847473,
-0.20632290840148926,
0.22446951270103455,
0.014162447303533554,
-0.019560379907488823,
0.07458094507455826,
-0.14137724041938782,
0.07327024638652802,
0.07825028896331787,
0.19506984949111938,
0.17763154208660126,
0.03672456741333008,
-0.48503488302230835,
0.13063086569309235,
-0.0848851352930069,
0.2523498237133026,
0.17174288630485535,
0.1953240931034088,
-0.10677577555179596,
-0.058132704347372055,
-0.14613518118858337,
0.07480311393737793,
0.086324542760849,
-0.17884695529937744,
0.07335008680820465,
0.20008806884288788,
-0.048946622759103775,
-0.13435611128807068,
-0.07140698283910751,
-0.09865394234657288,
0.18631310760974884,
-0.16163310408592224,
0.026264380663633347,
-0.019700367003679276,
0.08620073646306992,
-0.07257822155952454,
-0.02848341315984726,
-0.10928123444318771,
0.0654572993516922,
0.06650541722774506,
0.04797227680683136,
0.21638020873069763,
0.00013862550258636475,
0.08283990621566772,
0.17284490168094635,
-0.06134580448269844,
-0.2557108700275421,
0.03306017071008682,
-0.0012929970398545265,
0.5639699101448059,
0.1571512520313263,
-0.15514527261257172,
-0.4210185110569,
-0.018509749323129654,
0.08894897997379303,
0.028211630880832672,
-0.2639956474304199,
0.27535706758499146,
-0.2685801386833191,
0.16624288260936737,
0.3076024353504181,
0.20193049311637878,
0.03947465121746063,
0.08377757668495178,
-0.6669365167617798,
-0.7254316806793213,
0.41686052083969116,
-0.29002445936203003,
-0.23636047542095184,
-0.10034742951393127,
0.19616572558879852,
0.052787162363529205,
0.013354213908314705,
-0.7676568627357483,
0.008879929780960083,
0.21738600730895996,
-0.29953935742378235,
-0.3462603986263275,
0.2937743067741394,
0.13255660235881805,
0.24275317788124084,
0.0681343674659729,
0.6872341632843018,
0.1506785750389099,
0.1390015184879303,
0.061967089772224426,
-0.17281284928321838
] |
https://github.com/huggingface/datasets/issues/6566 | I also see the same error and get passed it by casting that line to float.
so `for x in obj.detach().cpu().numpy()` becomes `for x in obj.detach().to(torch.float).cpu().numpy()`
I got the idea from [this ](https://github.com/kohya-ss/sd-webui-additional-networks/pull/128/files) PR where someone was facing a similar issue (in a different repository). I guess numpy doesn't support bfloat16.
| I train controlnet_sdxl in bf16 datatype, got unsupported ERROR in datasets | ### Describe the bug
```
Traceback (most recent call last):
File "train_controlnet_sdxl.py", line 1252, in <module>
main(args)
File "train_controlnet_sdxl.py", line 1013, in main
train_dataset = train_dataset.map(compute_embeddings_fn, batched=True, new_fingerprint=new_fingerprint)
File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 592, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 557, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3093, in map
for rank, done, content in Dataset._map_single(**dataset_kwargs):
File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3489, in _map_single
writer.write_batch(batch)
File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_writer.py", line 557, in write_batch
arrays.append(pa.array(typed_sequence))
File "pyarrow/array.pxi", line 248, in pyarrow.lib.array
File "pyarrow/array.pxi", line 113, in pyarrow.lib._handle_arrow_array_protocol
File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_writer.py", line 191, in __arrow_array__
out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/features/features.py", line 447, in cast_to_python_objects
return _cast_to_python_objects(
File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/features/features.py", line 324, in _cast_to_python_objects
for x in obj.detach().cpu().numpy()
TypeError: Got unsupported ScalarType BFloat16
```
### Steps to reproduce the bug
Here is my train script I use BF16 type,I use diffusers train my model
```
export MODEL_DIR="/home/mhh/sd_models/stable-diffusion-xl-base-1.0"
export OUTPUT_DIR="./control_net"
export VAE_NAME="/home/mhh/sd_models/sdxl-vae-fp16-fix"
accelerate launch train_controlnet_sdxl.py \
--pretrained_model_name_or_path=$MODEL_DIR \
--output_dir=$OUTPUT_DIR \
--pretrained_vae_model_name_or_path=$VAE_NAME \
--dataset_name=/home/mhh/sd_datasets/fusing/fill50k \
--mixed_precision="bf16" \
--resolution=1024 \
--learning_rate=1e-5 \
--max_train_steps=200 \
--validation_image "/home/mhh/sd_datasets/controlnet_image/conditioning_image_1.png" "/home/mhh/sd_datasets/controlnet_image/conditioning_image_2.png" \
--validation_prompt "red circle with blue background" "cyan circle with brown floral background" \
--validation_steps=50 \
--train_batch_size=1 \
--gradient_accumulation_steps=4 \
--report_to="wandb" \
--seed=42 \
```
### Expected behavior
When I changed the data type to fp16, it worked.
### Environment info
datasets 2.16.1
numpy 1.24.4 | 51 | I train controlnet_sdxl in bf16 datatype, got unsupported ERROR in datasets
### Describe the bug
```
Traceback (most recent call last):
File "train_controlnet_sdxl.py", line 1252, in <module>
main(args)
File "train_controlnet_sdxl.py", line 1013, in main
train_dataset = train_dataset.map(compute_embeddings_fn, batched=True, new_fingerprint=new_fingerprint)
File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 592, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 557, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3093, in map
for rank, done, content in Dataset._map_single(**dataset_kwargs):
File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3489, in _map_single
writer.write_batch(batch)
File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_writer.py", line 557, in write_batch
arrays.append(pa.array(typed_sequence))
File "pyarrow/array.pxi", line 248, in pyarrow.lib.array
File "pyarrow/array.pxi", line 113, in pyarrow.lib._handle_arrow_array_protocol
File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/arrow_writer.py", line 191, in __arrow_array__
out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/features/features.py", line 447, in cast_to_python_objects
return _cast_to_python_objects(
File "/home/miniconda3/envs/mhh_df/lib/python3.8/site-packages/datasets/features/features.py", line 324, in _cast_to_python_objects
for x in obj.detach().cpu().numpy()
TypeError: Got unsupported ScalarType BFloat16
```
### Steps to reproduce the bug
Here is my train script I use BF16 type,I use diffusers train my model
```
export MODEL_DIR="/home/mhh/sd_models/stable-diffusion-xl-base-1.0"
export OUTPUT_DIR="./control_net"
export VAE_NAME="/home/mhh/sd_models/sdxl-vae-fp16-fix"
accelerate launch train_controlnet_sdxl.py \
--pretrained_model_name_or_path=$MODEL_DIR \
--output_dir=$OUTPUT_DIR \
--pretrained_vae_model_name_or_path=$VAE_NAME \
--dataset_name=/home/mhh/sd_datasets/fusing/fill50k \
--mixed_precision="bf16" \
--resolution=1024 \
--learning_rate=1e-5 \
--max_train_steps=200 \
--validation_image "/home/mhh/sd_datasets/controlnet_image/conditioning_image_1.png" "/home/mhh/sd_datasets/controlnet_image/conditioning_image_2.png" \
--validation_prompt "red circle with blue background" "cyan circle with brown floral background" \
--validation_steps=50 \
--train_batch_size=1 \
--gradient_accumulation_steps=4 \
--report_to="wandb" \
--seed=42 \
```
### Expected behavior
When I changed the data type to fp16, it worked.
### Environment info
datasets 2.16.1
numpy 1.24.4
I also see the same error and get passed it by casting that line to float.
so `for x in obj.detach().cpu().numpy()` becomes `for x in obj.detach().to(torch.float).cpu().numpy()`
I got the idea from [this ](https://github.com/kohya-ss/sd-webui-additional-networks/pull/128/files) PR where someone was facing a similar issue (in a different repository). I guess numpy doesn't support bfloat16.
| [
-0.5037292242050171,
-0.22553563117980957,
-0.013837732374668121,
0.18832528591156006,
0.5082089304924011,
0.14244911074638367,
0.488095223903656,
0.20407439768314362,
0.4085872173309326,
0.15492910146713257,
0.07041168957948685,
0.09321921318769455,
-0.4428427815437317,
0.28239578008651733,
0.10053114593029022,
0.04923497885465622,
0.1566818207502365,
0.18906539678573608,
-0.20537079870700836,
0.05932542681694031,
-0.38782569766044617,
-0.10407666116952896,
-0.5449900031089783,
0.01786739006638527,
-0.47240033745765686,
-0.2847910225391388,
0.10106676816940308,
0.0760425329208374,
-0.26560813188552856,
-0.5933980941772461,
0.5540056228637695,
-0.2382853627204895,
0.31497901678085327,
0.42568451166152954,
-0.0001094119215849787,
0.28895479440689087,
0.19321148097515106,
0.05921038240194321,
-0.13738280534744263,
-0.1644386500120163,
0.07785386592149734,
0.00851428508758545,
-0.12660203874111176,
-0.16152338683605194,
-0.20107367634773254,
-0.3531474173069,
-0.0967109352350235,
-0.40552425384521484,
0.17166215181350708,
0.35842227935791016,
0.2291528284549713,
0.24770085513591766,
0.19409853219985962,
-0.12670841813087463,
0.025664933025836945,
0.1525047868490219,
-0.13990724086761475,
0.13149774074554443,
0.05385778844356537,
-0.059447936713695526,
-0.04273928329348564,
0.18506701290607452,
0.05205827206373215,
-0.2117960900068283,
0.029535168781876564,
-0.18660758435726166,
0.041014425456523895,
-0.2149946689605713,
0.17546670138835907,
0.26512956619262695,
0.062196001410484314,
-0.2689892649650574,
-0.3593844473361969,
0.0330536812543869,
0.07458016276359558,
-0.4075605273246765,
0.08380727469921112,
-0.049107491970062256,
0.16828545928001404,
0.18594972789287567,
-0.11483098566532135,
-0.12974029779434204,
-0.07147113978862762,
-0.09048003703355789,
-0.021350115537643433,
0.7118738889694214,
-0.1398741602897644,
0.2223092019557953,
0.13704349100589752,
-0.16141770780086517,
0.22810059785842896,
-0.08952391147613525,
0.023749079555273056,
0.2571730315685272,
-0.5380403995513916,
-0.04599703475832939,
-0.28618696331977844,
-0.29045599699020386,
0.1291792243719101,
-0.12271369248628616,
-0.3157559335231781,
-0.1691504716873169,
0.13364022970199585,
0.16690929234027863,
0.06146805360913277,
0.06548421829938889,
-0.1285485029220581,
0.5814549326896667,
0.20494501292705536,
0.2396288812160492,
-0.022172629833221436,
-0.08472020924091339,
-0.26982587575912476,
-0.21639284491539001,
0.1468052715063095,
0.08716140687465668,
0.02583061158657074,
0.06282966583967209,
-0.47517576813697815,
0.16250461339950562,
-0.07409445196390152,
0.10354617238044739,
0.375002384185791,
0.2657804787158966,
-0.05740322172641754,
0.1444956213235855,
0.22382602095603943,
0.12634462118148804,
0.061405785381793976,
-0.011969704180955887,
-0.26555415987968445,
0.046508416533470154,
-0.09802347421646118,
-0.27414852380752563,
-0.061606258153915405,
-0.04723897576332092,
0.04964739829301834,
-0.01119665801525116,
-0.11207695305347443,
0.04542429745197296,
-0.04237506538629532,
-0.27616187930107117,
0.37173834443092346,
0.11631825566291809,
-0.18367835879325867,
-0.0030671656131744385,
0.16420525312423706,
0.14852525293827057,
-0.061530619859695435,
0.10357220470905304,
-0.15267722308635712,
-0.4167586863040924,
-0.39422327280044556,
0.27572566270828247,
0.15878237783908844,
-0.004857821390032768,
-0.2876134216785431,
0.003928042948246002,
0.07573442161083221,
-0.017364658415317535,
0.19253572821617126,
-0.1388632208108902,
-0.2105644792318344,
-0.2150433361530304,
0.38659146428108215,
0.10370629280805588,
-0.1552981734275818,
-0.02883957326412201,
-0.0340079665184021,
-0.31922394037246704,
0.4776534140110016,
0.18602214753627777,
-0.2943902611732483,
0.06480686366558075,
-0.261482834815979,
0.22619491815567017,
0.43347692489624023,
-0.42142099142074585,
-0.11686308681964874,
0.3153285086154938,
0.0191849023103714,
-0.06694906204938889,
-0.25840774178504944,
0.020117636770009995,
0.3545074164867401,
0.1747685968875885,
0.15626275539398193,
0.1274457424879074,
-0.042813990265131,
0.047290802001953125,
-0.19493192434310913,
-0.27590829133987427,
0.4948500990867615,
0.2087814062833786,
0.18492892384529114,
-0.04165629670023918,
0.22091324627399445,
0.041096050292253494,
0.35744670033454895,
-0.10943260043859482,
0.17134764790534973,
0.32693004608154297,
0.33637598156929016,
-0.21720343828201294,
-0.057254303246736526,
-0.2865225672721863,
-0.5543864965438843,
0.19799016416072845,
0.267440527677536,
-0.09123191237449646,
0.13048918545246124,
-0.1833638846874237,
-0.13773812353610992,
0.18468257784843445,
-0.14300322532653809,
-0.17340737581253052,
0.17159968614578247,
-0.12738099694252014,
-0.020320087671279907,
-0.09306924790143967,
-0.31050974130630493,
-0.029846180230379105,
-0.6016952395439148,
0.06532353907823563,
0.050238415598869324,
0.1230054423213005,
-0.16293229162693024,
-0.17764857411384583,
0.19136539101600647,
0.31594711542129517,
-0.07891400158405304,
-0.14586737751960754,
-0.22313152253627777,
0.4866800904273987,
-0.07175987958908081,
0.005955185741186142,
-0.02171313762664795,
-0.020578667521476746,
0.09762490540742874,
-0.48248544335365295,
-0.15377581119537354,
0.22889143228530884,
-0.039463549852371216,
0.00875122845172882,
0.4946105182170868,
0.14735907316207886,
0.2599775493144989,
0.01119181513786316,
-0.039385098963975906,
0.20076988637447357,
0.04799220710992813,
0.0658622533082962,
0.06338279694318771,
-0.25017139315605164,
-0.04634321108460426,
-0.1362091302871704,
0.4365898370742798,
0.13440193235874176,
-0.3552299439907074,
-0.16163960099220276,
0.5429256558418274,
0.18263857066631317,
-0.008001390844583511,
0.06626403331756592,
0.02407504990696907,
0.09608364850282669,
0.07770191878080368,
0.09427101910114288,
0.0948239266872406,
0.06242452189326286,
-0.0533849336206913,
0.11605506390333176,
-0.059679511934518814,
0.006086070090532303,
0.38765430450439453,
-0.20511922240257263,
0.5205270648002625,
0.16432377696037292,
-0.14867745339870453,
0.06480701267719269,
-0.19450944662094116,
-0.14091536402702332,
-0.040072545409202576,
0.28813180327415466,
-0.17508888244628906,
-0.1478569507598877,
-0.2811691164970398,
-0.18411871790885925,
-0.36045801639556885,
-0.07374756038188934,
-0.1503336876630783,
0.1276124119758606,
-0.2105897068977356,
-0.11606085300445557,
-0.0924011692404747,
0.47740551829338074,
-0.556367039680481,
0.1943741738796234,
0.15702441334724426,
0.1076408326625824,
0.008003078401088715,
0.06172368675470352,
-0.3073118031024933,
0.11756521463394165,
0.20405767858028412,
-0.4568619132041931,
0.3436024785041809,
0.29437240958213806,
-0.035171132534742355,
-0.25557875633239746,
-0.2118779718875885,
0.05777334049344063,
-0.06629155576229095,
0.09328678995370865,
0.34891006350517273,
0.00026237592101097107,
-0.16515478491783142,
-0.4226212501525879,
0.260547399520874,
-0.5075392127037048,
-0.24879661202430725,
0.004043020308017731,
-0.24055133759975433,
-0.09103453159332275,
-0.2338862121105194,
-0.2316528856754303,
-0.4306623935699463,
-0.32663124799728394,
-0.06956254690885544,
-0.265508770942688,
0.08671285212039948,
0.12444227933883667,
0.017855070531368256,
0.08065296709537506,
0.2739766538143158,
-0.21582743525505066,
-0.13056020438671112,
-0.29899394512176514,
0.21020381152629852,
-0.03402707725763321,
-0.20268160104751587,
0.012559972703456879,
-0.247101828455925,
0.3456135094165802,
0.2886073887348175,
-0.22956345975399017,
0.47208356857299805,
-0.046015143394470215,
-0.11055976897478104,
-0.36993682384490967,
-0.06950298696756363,
0.16385531425476074,
0.000058554112911224365,
-0.06595028936862946,
-0.22258102893829346,
-0.20049931108951569,
0.13211223483085632,
-0.33349791169166565,
0.3570571839809418,
0.10653112828731537,
0.2513759136199951,
0.17470592260360718,
0.238937646150589,
0.32097867131233215,
-0.3210079073905945,
0.41817203164100647,
-0.2877710461616516,
0.13525032997131348,
0.06176483631134033,
-0.3122310936450958,
0.35431548953056335,
0.0028114095330238342,
-0.005061671137809753,
-0.01663268357515335,
-0.3010801672935486,
-0.12453383952379227,
-0.09694445878267288,
0.016605712473392487,
-0.18110299110412598,
-0.024203121662139893,
0.08822377771139145,
-0.37780940532684326,
0.5962285399436951,
-0.11195097118616104,
-0.06293658912181854,
0.01102001965045929,
0.033961765468120575,
0.18162637948989868,
0.02937033586204052,
0.03893871232867241,
0.03267715871334076,
-0.25284135341644287,
-0.26579323410987854,
-0.18794192373752594,
0.18112201988697052,
0.1805158406496048,
0.5061678886413574,
0.005788795650005341,
0.10350976884365082,
-0.04788041114807129,
0.026623006910085678,
0.5294820666313171,
-0.27992182970046997,
0.03580636531114578,
0.020582430064678192,
0.19017712771892548,
-0.4493984580039978,
-0.13251955807209015,
-0.07932483404874802,
0.11152489483356476,
0.1173662543296814,
0.48502621054649353,
-0.2612381875514984,
-0.36291515827178955,
0.3930164575576782,
-0.21772637963294983,
-0.1516590416431427,
-0.2144317477941513,
-0.17133323848247528,
0.0028204694390296936,
-0.21674199402332306,
0.13175824284553528,
0.1280522495508194,
0.20407608151435852,
-0.23199506103992462,
-0.2047184705734253,
-0.14929866790771484,
0.0464644730091095,
-0.16396227478981018,
-0.037067707628011703,
0.3909647464752197,
0.022227872163057327,
0.1725478321313858,
0.02455468475818634,
0.2640373706817627,
0.6258909702301025,
0.22225907444953918,
-0.11327303946018219,
-0.07771813869476318,
0.02064136043190956,
0.10103517770767212,
0.36782214045524597,
0.09223487973213196,
-0.2060624063014984,
0.3955838978290558,
0.3894786536693573,
0.11659504473209381,
-0.18035045266151428,
0.06751691550016403,
0.4633970260620117,
-0.0948466956615448,
-0.32688620686531067,
-0.29294610023498535,
0.10510270297527313,
0.2478596419095993,
0.17908160388469696,
0.3285386264324188,
0.13436664640903473,
-0.2852713167667389,
0.05248201638460159,
0.3595203459262848,
0.6413891315460205,
0.05969090387225151,
0.013706440106034279,
0.13760143518447876,
-0.23760545253753662,
0.06360123306512833,
0.37334904074668884,
0.004612918943166733,
-0.3576982915401459,
0.1910378336906433,
-0.046111710369586945,
-0.08805631101131439,
0.20172208547592163,
0.06018662080168724,
-0.14629018306732178,
0.131667360663414,
-0.07127431035041809,
0.45987457036972046,
-0.09761113673448563,
0.016385823488235474,
-0.24404117465019226,
-0.093860924243927,
-0.25673767924308777,
0.14639535546302795,
-0.09467314183712006,
-0.12129208445549011,
-0.2794356942176819,
-0.19521476328372955,
0.024271264672279358,
-0.3885918855667114,
-0.12638074159622192,
0.1071128100156784,
-0.5967444181442261,
0.31406205892562866,
0.34687042236328125,
0.12477411329746246,
0.1733107566833496,
0.19054526090621948,
0.1966010481119156,
0.07704088091850281,
-0.0861637070775032,
-0.052650921046733856,
0.08652369678020477,
0.04420817643404007,
-0.14326675236225128,
0.026314515620470047,
0.4150155484676361,
-0.08478447794914246,
-0.377006858587265,
0.030101895332336426,
-0.19840078055858612,
-0.31511086225509644,
0.2798898220062256,
-0.07756032049655914,
-0.09862007200717926,
-0.1527371108531952,
-0.07426948100328445,
-0.22305962443351746,
-0.11374638974666595,
-0.1385779231786728,
0.1750238537788391,
-0.13883310556411743,
-0.32119929790496826,
0.2394915372133255,
0.14917032420635223,
-0.023190289735794067,
-0.05494549497961998,
0.19442357122898102,
0.05238094553351402,
0.5251802206039429,
0.5473232865333557,
-0.08808039128780365,
-0.1580827832221985,
-0.2781907916069031,
-0.10954093933105469,
0.48640382289886475,
0.038745611906051636,
0.12821288406848907,
-0.04743969067931175,
0.061424434185028076,
0.1455167531967163,
0.3213338553905487,
0.19735562801361084,
0.06558804214000702,
-0.03654470667243004,
-0.1333155632019043,
-0.546312689781189,
0.1098206639289856,
-0.26562294363975525,
0.26601874828338623,
-0.20094409584999084,
0.6640206575393677,
-0.054096344858407974,
-0.1865680068731308,
-0.3591737151145935,
0.16856440901756287,
-0.46077078580856323,
0.29087600111961365,
-0.19420590996742249,
-0.06738603115081787,
0.16292297840118408,
-0.026636481285095215,
0.21582622826099396,
0.12225489318370819,
-0.2755264639854431,
-0.21628381311893463,
-0.13974489271640778,
0.09524738788604736,
0.21783609688282013,
-0.4227474629878998,
-0.048826783895492554,
-0.1880033314228058,
-0.3173165023326874,
0.13016502559185028,
-0.07720809429883957,
0.08996794372797012,
0.1054297462105751,
0.20465239882469177,
-0.13507498800754547,
0.11542248725891113,
0.0836634561419487,
0.056276120245456696,
-0.03009732812643051,
0.15559875965118408,
-0.004508215934038162,
0.0888587236404419,
0.08187857270240784,
-0.15772831439971924,
-0.00028709322214126587,
-0.09955534338951111,
0.13068033754825592,
0.0873490571975708,
0.21977753937244415,
-0.2819613218307495,
-0.14330187439918518,
0.32148149609565735,
0.5813008546829224,
0.27278220653533936,
-0.27558159828186035,
-0.11993587017059326,
0.1123419925570488,
0.24450142681598663,
-0.23659348487854004,
0.12197978794574738,
0.12480401992797852,
0.020183388143777847,
-0.029224388301372528,
0.22200194001197815,
0.33756744861602783,
0.062760129570961,
-0.0452788807451725,
0.07822945713996887,
0.059543464332818985,
-0.23915380239486694,
0.03228633850812912,
0.2895474135875702,
0.02857097238302231,
0.15356381237506866,
0.029719149693846703,
0.12436720728874207,
0.47143059968948364,
0.41775259375572205,
-0.055845435708761215,
0.4289676249027252,
-0.028488095849752426,
0.056087225675582886,
0.20698818564414978,
-0.4616311192512512,
0.21476081013679504,
0.014184102416038513,
-0.36001116037368774,
-0.04206465557217598,
-0.10486650466918945,
0.3361084461212158,
-0.15397155284881592,
-0.40083548426628113,
0.08622310310602188,
0.1182030439376831,
-0.40628373622894287,
0.05745028704404831,
-0.2889648377895355,
0.023471176624298096,
-0.18726593255996704,
-0.08300860971212387,
0.08630886673927307,
0.2536284327507019,
0.2832528054714203,
0.06264445185661316,
-0.2181580662727356,
-0.22769610583782196,
-0.018734972923994064,
0.4464884400367737,
0.2945705056190491,
-0.14078110456466675,
0.18763256072998047,
0.28796035051345825,
0.0787549614906311,
0.020920399576425552,
0.5863887667655945,
0.4155171513557434,
0.45940956473350525,
0.012267332524061203,
0.007270261645317078,
0.19308316707611084,
-0.12115450203418732,
-0.0018909052014350891,
0.04971467703580856,
0.16064710915088654,
-0.00665418803691864,
0.31181707978248596,
0.18615742027759552,
-0.0955173522233963,
0.03426327928900719,
0.0032180193811655045,
0.18270614743232727,
0.045712441205978394,
0.05489164963364601,
-0.1136038601398468,
-0.12693078815937042,
-0.38774216175079346,
0.017840102314949036,
-0.061131637543439865,
0.10784722864627838,
0.5204010009765625,
-0.198045551776886,
0.30621370673179626,
-0.2929861545562744,
0.10810457915067673,
0.07508671283721924,
0.5347382426261902,
0.30885425209999084,
0.06684255599975586,
-0.13425177335739136,
-0.40056952834129333,
-0.5852621793746948,
0.26353710889816284,
-0.07653588056564331,
0.10967370867729187,
0.0021748170256614685,
0.14715468883514404,
-0.09168641269207001,
-0.373577356338501,
0.3498714566230774,
-0.16557416319847107,
0.17951083183288574,
0.08288241922855377,
-0.20519137382507324,
0.03142626956105232,
-0.093535415828228,
-0.10324615985155106,
0.12569227814674377,
-0.48020094633102417,
0.22559165954589844,
-0.002419453114271164,
0.032081931829452515,
-0.06438642740249634,
0.09940151125192642,
-0.16539700329303741,
-0.0435316264629364,
0.6498481035232544,
0.13601060211658478,
0.2711316645145416,
-0.3490021228790283,
0.007677234709262848,
-0.14774109423160553,
-0.03559113293886185,
-0.31492140889167786,
0.09775571525096893,
0.144550621509552,
0.3633309602737427,
-0.09554526209831238,
-0.3346664011478424,
-0.2770150303840637,
0.013944346457719803,
0.1640373170375824,
-0.1452486217021942,
-0.2952762246131897,
0.27979162335395813,
-0.11255951225757599,
-0.19282034039497375,
0.22473593056201935,
0.18983881175518036,
0.18595100939273834,
0.05782265216112137,
-0.3402698040008545,
-0.5313521027565002,
0.48867958784103394,
0.07081496715545654,
-0.11095033586025238,
-0.2147495448589325,
0.041295334696769714,
0.4172348976135254,
-0.19105631113052368,
-0.756514310836792,
0.04346299171447754,
0.29645687341690063,
-0.05277052894234657,
0.07735695689916611,
0.12668395042419434,
-0.04486686736345291,
0.2018168717622757,
0.016644246876239777,
0.34247228503227234,
-0.1772146224975586,
-0.10330215096473694,
0.19543814659118652,
-0.1763134002685547
] |
https://github.com/huggingface/datasets/issues/6565 | My current workaround this issue is to return `None` in the second element and then filter out samples which have `None` in them.
```python
def merge_samples(batch):
if len(batch['a']) == 1:
batch['c'] = [batch['a'][0]]
batch['d'] = [None]
else:
batch['c'] = [batch['a'][0]]
batch['d'] = [batch['a'][1]]
return batch
def filter_fn(x):
return x['d'] is not None
# other code...
mapped = mapped.filter(filter_fn)
``` | `drop_last_batch=True` for IterableDataset map function is ignored with multiprocessing DataLoader | ### Describe the bug
Scenario:
- Interleaving two iterable datasets of unequal lengths (`all_exhausted`), followed by a batch mapping with batch size 2 to effectively merge the two datasets and get a sample from each dataset in a single batch, with `drop_last_batch=True` to skip the last batch in case it doesn't have two samples.
What works:
- Using DataLoader with `num_workers=0`
What does not work:
- Using DataLoader with `num_workers=1`, errors in the last batch.
Basically, `drop_last_batch=True` is ignored when using multiple dataloading workers.
Please take a look at the minimal repro script below.
### Steps to reproduce the bug
```python
from datasets import Dataset, interleave_datasets
from torch.utils.data import DataLoader
def merge_samples(batch):
assert len(batch['a']) == 2, "Batch size must be 2"
batch['c'] = [batch['a'][0]]
batch['d'] = [batch['a'][1]]
return batch
def gen1():
for ii in range(1, 8385):
yield {"a": ii}
def gen2():
for ii in range(1, 5302):
yield {"a": ii}
if __name__ == '__main__':
dataset1 = Dataset.from_generator(gen1).to_iterable_dataset(num_shards=1024)
dataset2 = Dataset.from_generator(gen2).to_iterable_dataset(num_shards=1024)
interleaved = interleave_datasets([dataset1, dataset2], stopping_strategy="all_exhausted")
mapped = interleaved.map(merge_samples, batched=True, batch_size=2, remove_columns=interleaved.column_names,
drop_last_batch=True)
# Works
loader = DataLoader(mapped, batch_size=32, num_workers=0)
i = 0
for b in loader:
print(i, b['c'].shape, b['d'].shape)
i += 1
print("DataLoader with num_workers=0 works")
# Doesn't work
loader = DataLoader(mapped, batch_size=32, num_workers=1)
i = 0
for b in loader:
print(i, b['c'].shape, b['d'].shape)
i += 1
```
### Expected behavior
`drop_last_batch=True` should have same behaviour for `num_workers=0` and `num_workers>=1`
### Environment info
- `datasets` version: 2.16.1
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.2
- PyArrow version: 12.0.1
- Pandas version: 2.0.3
- `fsspec` version: 2023.6.0
I have also tested on Linux and got the same behavior. | 59 | `drop_last_batch=True` for IterableDataset map function is ignored with multiprocessing DataLoader
### Describe the bug
Scenario:
- Interleaving two iterable datasets of unequal lengths (`all_exhausted`), followed by a batch mapping with batch size 2 to effectively merge the two datasets and get a sample from each dataset in a single batch, with `drop_last_batch=True` to skip the last batch in case it doesn't have two samples.
What works:
- Using DataLoader with `num_workers=0`
What does not work:
- Using DataLoader with `num_workers=1`, errors in the last batch.
Basically, `drop_last_batch=True` is ignored when using multiple dataloading workers.
Please take a look at the minimal repro script below.
### Steps to reproduce the bug
```python
from datasets import Dataset, interleave_datasets
from torch.utils.data import DataLoader
def merge_samples(batch):
assert len(batch['a']) == 2, "Batch size must be 2"
batch['c'] = [batch['a'][0]]
batch['d'] = [batch['a'][1]]
return batch
def gen1():
for ii in range(1, 8385):
yield {"a": ii}
def gen2():
for ii in range(1, 5302):
yield {"a": ii}
if __name__ == '__main__':
dataset1 = Dataset.from_generator(gen1).to_iterable_dataset(num_shards=1024)
dataset2 = Dataset.from_generator(gen2).to_iterable_dataset(num_shards=1024)
interleaved = interleave_datasets([dataset1, dataset2], stopping_strategy="all_exhausted")
mapped = interleaved.map(merge_samples, batched=True, batch_size=2, remove_columns=interleaved.column_names,
drop_last_batch=True)
# Works
loader = DataLoader(mapped, batch_size=32, num_workers=0)
i = 0
for b in loader:
print(i, b['c'].shape, b['d'].shape)
i += 1
print("DataLoader with num_workers=0 works")
# Doesn't work
loader = DataLoader(mapped, batch_size=32, num_workers=1)
i = 0
for b in loader:
print(i, b['c'].shape, b['d'].shape)
i += 1
```
### Expected behavior
`drop_last_batch=True` should have same behaviour for `num_workers=0` and `num_workers>=1`
### Environment info
- `datasets` version: 2.16.1
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.2
- PyArrow version: 12.0.1
- Pandas version: 2.0.3
- `fsspec` version: 2023.6.0
I have also tested on Linux and got the same behavior.
My current workaround this issue is to return `None` in the second element and then filter out samples which have `None` in them.
```python
def merge_samples(batch):
if len(batch['a']) == 1:
batch['c'] = [batch['a'][0]]
batch['d'] = [None]
else:
batch['c'] = [batch['a'][0]]
batch['d'] = [batch['a'][1]]
return batch
def filter_fn(x):
return x['d'] is not None
# other code...
mapped = mapped.filter(filter_fn)
``` | [
-0.29564857482910156,
-0.06441396474838257,
-0.031954340636730194,
0.10420383512973785,
-0.08406788110733032,
-0.06830085813999176,
0.658607006072998,
0.2046472430229187,
0.2394963800907135,
0.4104592502117157,
-0.027381081134080887,
0.37076422572135925,
-0.1618267297744751,
-0.24033448100090027,
-0.3354009985923767,
0.06458159536123276,
0.1024688258767128,
0.01339704915881157,
-0.16959287226200104,
0.09647218883037567,
-0.1789240837097168,
0.25936171412467957,
-0.5185925960540771,
-0.19963566958904266,
-0.22980336844921112,
0.2035800963640213,
-0.1307854801416397,
0.098019078373909,
0.3334900140762329,
-0.07039228081703186,
0.3505817949771881,
0.11531728506088257,
0.207238107919693,
0.5579012036323547,
-0.00012212585716042668,
0.14409157633781433,
0.22173282504081726,
0.04811714589595795,
-0.17738023400306702,
-0.2759828567504883,
-0.1439393013715744,
-0.17852634191513062,
-0.15303263068199158,
-0.10714977979660034,
0.13689669966697693,
0.07031205296516418,
-0.02997848019003868,
-0.4961398243904114,
0.1800316870212555,
-0.08173292875289917,
0.10004227608442307,
0.4679620862007141,
-0.13357219099998474,
0.06264536082744598,
0.10214578360319138,
-0.0023317113518714905,
0.11308010667562485,
0.3563404083251953,
0.4128827452659607,
-0.37000155448913574,
-0.222243994474411,
0.18639327585697174,
-0.2049829661846161,
0.03562706708908081,
-0.32723385095596313,
-0.15817585587501526,
-0.022236138582229614,
-0.4500707685947418,
0.022871535271406174,
0.0920163244009018,
0.09300167858600616,
-0.28012987971305847,
-0.22787916660308838,
-0.4202061891555786,
-0.037993330508470535,
-0.19997692108154297,
0.25820615887641907,
-0.07312021404504776,
-0.1721690148115158,
-0.07924032211303711,
-0.12781769037246704,
0.3217103183269501,
-0.08861004561185837,
0.13715660572052002,
-0.003710143268108368,
0.48199689388275146,
-0.05870414525270462,
0.2128358781337738,
0.306289941072464,
0.0542418546974659,
0.12397883832454681,
-0.14690887928009033,
0.22633647918701172,
-0.008758284151554108,
-0.44367384910583496,
-0.08481292426586151,
0.0819128006696701,
-0.10830648988485336,
0.16747495532035828,
0.1564934253692627,
-0.1582515686750412,
-0.09397877752780914,
0.29275786876678467,
0.14634951949119568,
0.4376104176044464,
-0.03953654319047928,
-0.10082139074802399,
0.009069237858057022,
0.2321096658706665,
-0.02364763244986534,
-0.041095830500125885,
0.08128070086240768,
0.20536646246910095,
-0.6338819861412048,
0.12796452641487122,
0.2158777415752411,
0.3606489598751068,
0.003309592604637146,
-0.4774684011936188,
-0.2719123065471649,
-0.22513476014137268,
-0.2321697622537613,
-0.017497152090072632,
-0.008885741233825684,
0.02407071366906166,
0.5214048027992249,
-0.11589076370000839,
0.3609742522239685,
-0.31928643584251404,
-0.40069150924682617,
-0.0144596416503191,
-0.14448396861553192,
-0.12251609563827515,
-0.10076360404491425,
0.36722707748413086,
-0.10856516659259796,
0.37964585423469543,
0.44232696294784546,
0.05622628703713417,
0.018977679312229156,
0.36014583706855774,
-0.337155282497406,
0.23265747725963593,
0.09094514697790146,
0.32081520557403564,
0.19173817336559296,
0.03488343581557274,
0.002959735691547394,
-0.05084284394979477,
0.26879405975341797,
-0.45748165249824524,
-0.12282556295394897,
-0.062087282538414,
0.05584948509931564,
-0.06962277740240097,
0.02355557307600975,
-0.44477730989456177,
-0.04461580514907837,
0.45074817538261414,
-0.0895533338189125,
0.21174685657024384,
-0.2770940065383911,
-0.06848234683275223,
-0.31929296255111694,
0.07344862818717957,
0.5102411508560181,
-0.12362167239189148,
-0.009271688759326935,
0.04938765987753868,
-0.05070602893829346,
0.45984140038490295,
0.06050251051783562,
-0.16703873872756958,
0.06958042085170746,
-0.308129221200943,
0.022736117243766785,
0.03740110248327255,
-0.3894785940647125,
-0.24894702434539795,
0.6811385154724121,
-0.1833345890045166,
0.4567883610725403,
0.031206300482153893,
0.04176304116845131,
0.45551222562789917,
-0.2664852738380432,
0.14118431508541107,
0.2814567983150482,
-0.2805463671684265,
0.0913252979516983,
-0.15709269046783447,
0.05667576938867569,
0.4247930645942688,
0.1346810758113861,
0.1881440430879593,
0.058971792459487915,
0.014992918819189072,
-0.04334573447704315,
0.5442727208137512,
0.2013568878173828,
0.22444698214530945,
0.2603001296520233,
-0.12776640057563782,
-0.19271856546401978,
0.14909964799880981,
0.05433134734630585,
-0.46760815382003784,
0.19676972925662994,
0.006180308759212494,
-0.3392447829246521,
0.23601122200489044,
0.12372817099094391,
0.18487092852592468,
-0.04684861749410629,
-0.3999021649360657,
-0.21342939138412476,
-0.023987075313925743,
0.1980476677417755,
-0.1464422345161438,
-0.16744622588157654,
-0.12338390201330185,
0.2350412905216217,
0.04168421030044556,
0.03894167020916939,
-0.35758858919143677,
0.1953769326210022,
0.08899977803230286,
-0.2233991026878357,
-0.05179940164089203,
0.21279945969581604,
0.21259722113609314,
-0.10602481663227081,
-0.09683744609355927,
0.5127167701721191,
0.03354235365986824,
0.08644863963127136,
-0.04509811848402023,
-0.051719918847084045,
0.1737382858991623,
-0.2146972417831421,
0.0604434534907341,
0.22862476110458374,
-0.0013104677200317383,
-0.10077613592147827,
0.032905060797929764,
0.37153422832489014,
-0.166244238615036,
0.37634530663490295,
-0.18961185216903687,
-0.008101437240839005,
0.04813176393508911,
-0.17340373992919922,
-0.3037054240703583,
-0.06368692964315414,
0.025259174406528473,
-0.3471037447452545,
0.3706599771976471,
-0.22931647300720215,
-0.23771849274635315,
0.08998004347085953,
0.2394229769706726,
0.24975600838661194,
-0.15076559782028198,
-0.08611057698726654,
0.004457484930753708,
0.0699714720249176,
0.20619800686836243,
-0.0927460789680481,
0.7959359288215637,
0.12949654459953308,
0.08070721477270126,
-0.3199504613876343,
0.2524524927139282,
-0.12900219857692719,
-0.024220988154411316,
0.11953873932361603,
0.08559027314186096,
0.16837367415428162,
0.10647816210985184,
0.08717081695795059,
-0.07068607211112976,
-0.2383439689874649,
-0.09580826759338379,
-0.17605507373809814,
-0.17459213733673096,
0.13950535655021667,
-0.13124002516269684,
0.04887973517179489,
-0.23812580108642578,
-0.40347912907600403,
-0.34824514389038086,
-0.3919660151004791,
-0.2014351487159729,
0.4156161844730377,
-0.21545493602752686,
0.2681756317615509,
-0.11806702613830566,
0.00277160108089447,
-0.09877366572618484,
-0.07224801182746887,
-0.04666732996702194,
0.34003525972366333,
-0.11490162461996078,
-0.029501132667064667,
0.12426440417766571,
-0.24107405543327332,
0.1913917511701584,
0.28658726811408997,
-0.39999452233314514,
-0.31206339597702026,
0.1043815165758133,
0.09145840257406235,
-0.1442214697599411,
-0.08558162301778793,
0.17584159970283508,
-0.08679431676864624,
0.2548012137413025,
-0.08833836019039154,
-0.03212893381714821,
-0.1927868127822876,
0.08007986843585968,
0.023676656186580658,
-0.13030391931533813,
0.034122537821531296,
-0.15374642610549927,
-0.0026412233710289,
-0.1361943483352661,
-0.36363399028778076,
-0.1700756698846817,
-0.1828577220439911,
-0.046877384185791016,
0.07735033333301544,
0.1211797222495079,
-0.0779898464679718,
0.3492963910102844,
-0.2937641739845276,
-0.02486477605998516,
-0.7863902449607849,
0.11480887979269028,
-0.27780696749687195,
-0.04726371541619301,
-0.03977157920598984,
0.11938923597335815,
0.17024432122707367,
0.2868203818798065,
-0.174601212143898,
0.2267833799123764,
-0.04720402508974075,
0.1824842393398285,
-0.030529256910085678,
0.3391844630241394,
0.1196332573890686,
0.06950923800468445,
0.07521358132362366,
-0.24164661765098572,
0.12217798829078674,
0.349107027053833,
-0.034929610788822174,
0.3143142759799957,
0.29546263813972473,
0.22915855050086975,
0.21451154351234436,
0.8670512437820435,
0.44442957639694214,
0.12695497274398804,
0.38955724239349365,
0.1377497911453247,
0.005015396513044834,
0.27428776025772095,
-0.3994016647338867,
-0.01104247197508812,
-0.13918492197990417,
0.28219375014305115,
0.06439267843961716,
-0.25452977418899536,
-0.37272268533706665,
-0.03725554049015045,
-0.19309577345848083,
-0.2715055048465729,
-0.12472280859947205,
0.32368403673171997,
-0.5145384073257446,
0.05347725749015808,
-0.25253888964653015,
0.01315116137266159,
-0.25555187463760376,
-0.07507732510566711,
-0.05641105771064758,
-0.022952400147914886,
0.46443524956703186,
-0.0004574693739414215,
0.2545141577720642,
0.02723720297217369,
-0.5072177648544312,
0.2435271441936493,
-0.011695951223373413,
0.3975214958190918,
0.4204678237438202,
-0.23732762038707733,
-0.14436516165733337,
0.15538467466831207,
0.8186808228492737,
-0.15426482260227203,
0.06261444091796875,
0.21048805117607117,
-0.22885259985923767,
-0.12987008690834045,
-0.3145139515399933,
-0.1449446976184845,
0.38640737533569336,
0.49737548828125,
0.21815869212150574,
-0.2296830713748932,
-0.32239675521850586,
0.2892724871635437,
-0.13099469244480133,
0.10298888385295868,
-0.2810494899749756,
-0.3713549077510834,
0.0017494261264801025,
-0.31053322553634644,
0.05387827754020691,
0.3178982138633728,
0.25731873512268066,
-0.3982676565647125,
-0.04633254185318947,
-0.08590136468410492,
-0.21692687273025513,
0.07979631423950195,
-0.039273664355278015,
0.025384634733200073,
-0.02735946699976921,
0.22195610404014587,
0.20804834365844727,
0.11405349522829056,
0.396508127450943,
0.3410337567329407,
-0.40522095561027527,
-0.3416665494441986,
0.3719812333583832,
-0.21686789393424988,
0.4774898588657379,
0.263692170381546,
-0.07634150981903076,
0.028412003070116043,
0.0715736374258995,
0.11561968922615051,
-0.03314211964607239,
-0.20774051547050476,
0.2222447395324707,
-0.040615569800138474,
-0.6187974810600281,
0.004128254950046539,
0.18603482842445374,
0.2429148554801941,
0.14197546243667603,
0.6918272376060486,
-0.4246825575828552,
-0.16037991642951965,
0.1320694088935852,
-0.04576202481985092,
0.6113078594207764,
0.25547826290130615,
-0.031719837337732315,
0.13408733904361725,
0.23976118862628937,
-0.10941459238529205,
0.03243626654148102,
0.3818567991256714,
-0.23060011863708496,
-0.36413851380348206,
0.09235301613807678,
-0.1275707185268402,
0.2182944416999817,
0.21039406955242157,
-0.07712946832180023,
0.3506586253643036,
-0.07037204504013062,
0.17290113866329193,
-0.17410260438919067,
-0.08197367191314697,
-0.05531519651412964,
-0.3046770989894867,
0.1737392246723175,
-0.013920743018388748,
0.171758234500885,
0.3705644905567169,
-0.11221259832382202,
-0.31887930631637573,
0.2995176613330841,
-0.32825183868408203,
-0.10566449910402298,
0.19410225749015808,
-0.3443030118942261,
0.3107466399669647,
0.18230901658535004,
-0.16088375449180603,
0.23521073162555695,
0.318111389875412,
0.2166644185781479,
-0.38664481043815613,
0.07219675183296204,
-0.14461034536361694,
0.26485955715179443,
0.21701650321483612,
0.005475148558616638,
-0.2244410663843155,
0.19807831943035126,
-0.058260366320610046,
-0.04626183211803436,
-0.02021607756614685,
0.032383162528276443,
-0.42036598920822144,
-0.1890123337507248,
0.6131531596183777,
-0.05785360559821129,
-0.11528714001178741,
0.053217753767967224,
0.08268074691295624,
0.1946486532688141,
-0.340227335691452,
-0.02687978371977806,
0.1025705337524414,
-0.05811479315161705,
0.2919226288795471,
-0.6810059547424316,
-0.16887275874614716,
-0.14148956537246704,
0.3758436143398285,
0.06169624626636505,
-0.0285414457321167,
0.22767366468906403,
0.07299383729696274,
-0.07707837224006653,
-0.05217558518052101,
-0.1986183524131775,
0.12012074887752533,
-0.5138775110244751,
0.3281696140766144,
-0.3114825487136841,
0.19456087052822113,
0.11324122548103333,
0.16519546508789062,
-0.23356714844703674,
0.13111138343811035,
-0.06369520723819733,
-0.23503082990646362,
-0.27061063051223755,
0.03372257202863693,
0.009891616180539131,
0.0947883203625679,
-0.17525434494018555,
0.37954866886138916,
0.2427690029144287,
0.3123517632484436,
-0.20033925771713257,
0.04378823935985565,
0.07866031676530838,
0.11155780404806137,
0.17733535170555115,
0.10834749042987823,
-0.05668855085968971,
0.14958089590072632,
-0.11874575912952423,
0.3008357882499695,
0.15812215209007263,
-0.08951813727617264,
-0.2135518193244934,
0.11831487715244293,
-0.047303758561611176,
-0.019789274781942368,
0.12047355622053146,
-0.14895227551460266,
-0.17876097559928894,
-0.2448546290397644,
0.4002630114555359,
0.08816014230251312,
0.02216210588812828,
0.10871683061122894,
0.2580004930496216,
0.30270013213157654,
0.0024192333221435547,
0.04333005100488663,
0.06101822108030319,
-0.030789244920015335,
0.08606673777103424,
0.4252483546733856,
0.15212951600551605,
-0.12069527059793472,
-0.3310932219028473,
-0.23139597475528717,
0.26945579051971436,
0.2693237364292145,
-0.10750588774681091,
-0.35863053798675537,
-0.17045658826828003,
0.10747155547142029,
0.1348874419927597,
0.0747290551662445,
-0.219235360622406,
-0.005574028939008713,
-0.06425978243350983,
0.08768891543149948,
-0.2153458595275879,
-0.10572116076946259,
0.2611790895462036,
0.010548464953899384,
0.0003821626305580139,
0.3128330707550049,
0.18501660227775574,
-0.17683738470077515,
0.15221214294433594,
0.18386876583099365,
0.053233709186315536,
-0.2978713810443878,
0.16241253912448883,
0.15416382253170013,
-0.10062816739082336,
0.22374790906906128,
0.13013680279254913,
0.21753443777561188,
0.0648534893989563,
0.14561522006988525,
-0.04199809953570366,
0.8913434147834778,
0.2553320527076721,
-0.29818129539489746,
-0.14244553446769714,
-0.7889389991760254,
-0.08844582736492157,
-0.1122286468744278,
-0.2845819592475891,
0.2769738733768463,
-0.013193607330322266,
0.19640083611011505,
-0.22034871578216553,
-0.2812257707118988,
-0.07775706797838211,
0.19665123522281647,
-0.1681050956249237,
-0.053026922047138214,
0.05842136591672897,
-0.051549240946769714,
0.0010833144187927246,
-0.08991202712059021,
0.06148069351911545,
-0.04213691130280495,
0.6090590953826904,
0.013576067052781582,
-0.2852725684642792,
-0.29422393441200256,
-0.2871480882167816,
0.19769930839538574,
0.17085081338882446,
-0.182340607047081,
-0.13873688876628876,
0.16622589528560638,
0.05810878053307533,
-0.16773420572280884,
0.20483797788619995,
0.5825796127319336,
0.28921765089035034,
0.06452330946922302,
-0.11774822324514389,
0.08065339922904968,
-0.015480943024158478,
-0.2692580819129944,
0.24767810106277466,
-0.13536150753498077,
-0.20635999739170074,
0.2697327435016632,
0.040565960109233856,
-0.1620214432477951,
-0.16068394482135773,
0.3520524501800537,
0.15179070830345154,
-0.3777996301651001,
0.12706609070301056,
0.036309123039245605,
-0.07363323122262955,
-0.16635911166667938,
-0.08913955092430115,
-0.12103478610515594,
-0.10162947326898575,
0.1618775725364685,
-0.04252694547176361,
0.000253528356552124,
-0.0458918996155262,
0.02270573377609253,
-0.03611595183610916,
0.024078544229269028,
0.22420482337474823,
0.08141867816448212,
-0.4932078421115875,
-0.16123174130916595,
-0.4598226249217987,
0.1328836977481842,
-0.2719130218029022,
0.42398080229759216,
-0.02051267772912979,
0.4041275084018707,
-0.11800724267959595,
-0.08412797749042511,
0.3290722370147705,
-0.06240078806877136,
0.3660956025123596,
0.4654206931591034,
-0.33009642362594604,
-0.11571121215820312,
-0.1956319361925125,
-0.058384209871292114,
0.3208259046077728,
-0.4701782166957855,
0.09850484877824783,
0.04248521849513054,
0.03427805006504059,
-0.1540575474500656,
-0.06593945622444153,
0.4212643802165985,
-0.008962529711425304,
0.2809622287750244,
0.06616262346506119,
0.025304798036813736,
-0.04506554454565048,
-0.2552250027656555,
-0.2977229356765747,
0.2725107669830322,
-0.27559325098991394,
-0.20609509944915771,
0.17865951359272003,
0.27769356966018677,
-0.2565370500087738,
0.04155392199754715,
-0.3494873344898224,
0.21687084436416626,
0.2126937061548233,
0.4554237723350525,
-0.3663049340248108,
0.11198009550571442,
-0.06222817674279213,
0.4432608187198639,
-0.0509856715798378,
0.3541387915611267,
-0.04122129827737808,
0.24695977568626404,
-0.5926719307899475,
-0.13536567986011505,
0.06994685530662537,
-0.6332335472106934,
-0.4468545913696289,
-0.611618161201477,
0.2981855273246765,
-0.21910560131072998,
0.1408456414937973,
-0.3438819944858551,
0.03549662232398987,
0.2456866353750229,
-0.10904677957296371,
-0.12524081766605377,
0.3833305835723877,
0.11702033132314682,
0.21686585247516632,
0.15149231255054474,
-0.03694625571370125,
0.33688774704933167,
-0.1886671632528305,
0.4126129150390625,
-0.24639427661895752
] |
https://github.com/huggingface/datasets/issues/6563 | <del>Installing `datasets` from `main` did the trick so I guess it will be fixed in the next release.
NVM https://github.com/huggingface/datasets/blob/d26abadce0b884db32382b92422d8a6aa997d40a/src/datasets/utils/info_utils.py#L5 | `ImportError`: cannot import name 'insecure_hashlib' from 'huggingface_hub.utils' (.../huggingface_hub/utils/__init__.py) | ### Describe the bug
Yep its not [there](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/utils/__init__.py) anymore.
```text
+ python /home/trainer/sft_train.py --model_name cognitivecomputations/dolphin-2.2.1-mistral-7b --dataset_name wasertech/OneOS --load_in_4bit --use_peft --batch_size 4 --num_train_epochs 1 --learning_rate 1.41e-5 --gradient_accumulation_steps 8 --seq_length 4096 --output_dir output --log_with wandb
Traceback (most recent call last):
File "/home/trainer/sft_train.py", line 22, in <module>
from datasets import load_dataset
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/__init__.py", line 22, in <module>
from .arrow_dataset import Dataset
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 66, in <module>
from .arrow_reader import ArrowReader
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/arrow_reader.py", line 30, in <module>
from .download.download_config import DownloadConfig
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/download/__init__.py", line 9, in <module>
from .download_manager import DownloadManager, DownloadMode
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/download/download_manager.py", line 31, in <module>
from ..utils import tqdm as hf_tqdm
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/utils/__init__.py", line 19, in <module>
from .info_utils import VerificationMode
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/utils/info_utils.py", line 5, in <module>
from huggingface_hub.utils import insecure_hashlib
ImportError: cannot import name 'insecure_hashlib' from 'huggingface_hub.utils' (/home/trainer/llm-train/lib/python3.8/site-packages/huggingface_hub/utils/__init__.py)
```
### Steps to reproduce the bug
Using `datasets==2.16.1` and `huggingface_hub== 0.17.3`, load a dataset with `load_dataset`.
### Expected behavior
The dataset should be (downloaded - if needed - and) returned.
### Environment info
```text
trainer@a311ae86939e:/mnt$ pip show datasets
Name: datasets
Version: 2.16.1
Summary: HuggingFace community-driven open-source library of datasets
Home-page: https://github.com/huggingface/datasets
Author: HuggingFace Inc.
Author-email: thomas@huggingface.co
License: Apache 2.0
Location: /home/trainer/llm-train/lib/python3.8/site-packages
Requires: packaging, pyyaml, multiprocess, pyarrow-hotfix, pandas, pyarrow, xxhash, dill, numpy, aiohttp, tqdm, fsspec, requests, filelock, huggingface-hub
Required-by: trl, lm-eval, evaluate
trainer@a311ae86939e:/mnt$ pip show huggingface_hub
Name: huggingface-hub
Version: 0.17.3
Summary: Client library to download and publish models, datasets and other repos on the huggingface.co hub
Home-page: https://github.com/huggingface/huggingface_hub
Author: Hugging Face, Inc.
Author-email: julien@huggingface.co
License: Apache
Location: /home/trainer/llm-train/lib/python3.8/site-packages
Requires: requests, pyyaml, packaging, typing-extensions, tqdm, filelock, fsspec
Required-by: transformers, tokenizers, peft, evaluate, datasets, accelerate
trainer@a311ae86939e:/mnt$ huggingface-cli env
Copy-and-paste the text below in your GitHub issue.
- huggingface_hub version: 0.17.3
- Platform: Linux-6.5.13-7-MANJARO-x86_64-with-glibc2.29
- Python version: 3.8.10
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /home/trainer/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: wasertech
- Configured git credential helpers:
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.2
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 10.2.0
- hf_transfer: N/A
- gradio: N/A
- tensorboard: N/A
- numpy: 1.24.4
- pydantic: N/A
- aiohttp: 3.9.1
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /home/trainer/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /home/trainer/.cache/huggingface/assets
- HF_TOKEN_PATH: /home/trainer/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
``` | 20 | `ImportError`: cannot import name 'insecure_hashlib' from 'huggingface_hub.utils' (.../huggingface_hub/utils/__init__.py)
### Describe the bug
Yep its not [there](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/utils/__init__.py) anymore.
```text
+ python /home/trainer/sft_train.py --model_name cognitivecomputations/dolphin-2.2.1-mistral-7b --dataset_name wasertech/OneOS --load_in_4bit --use_peft --batch_size 4 --num_train_epochs 1 --learning_rate 1.41e-5 --gradient_accumulation_steps 8 --seq_length 4096 --output_dir output --log_with wandb
Traceback (most recent call last):
File "/home/trainer/sft_train.py", line 22, in <module>
from datasets import load_dataset
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/__init__.py", line 22, in <module>
from .arrow_dataset import Dataset
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 66, in <module>
from .arrow_reader import ArrowReader
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/arrow_reader.py", line 30, in <module>
from .download.download_config import DownloadConfig
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/download/__init__.py", line 9, in <module>
from .download_manager import DownloadManager, DownloadMode
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/download/download_manager.py", line 31, in <module>
from ..utils import tqdm as hf_tqdm
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/utils/__init__.py", line 19, in <module>
from .info_utils import VerificationMode
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/utils/info_utils.py", line 5, in <module>
from huggingface_hub.utils import insecure_hashlib
ImportError: cannot import name 'insecure_hashlib' from 'huggingface_hub.utils' (/home/trainer/llm-train/lib/python3.8/site-packages/huggingface_hub/utils/__init__.py)
```
### Steps to reproduce the bug
Using `datasets==2.16.1` and `huggingface_hub== 0.17.3`, load a dataset with `load_dataset`.
### Expected behavior
The dataset should be (downloaded - if needed - and) returned.
### Environment info
```text
trainer@a311ae86939e:/mnt$ pip show datasets
Name: datasets
Version: 2.16.1
Summary: HuggingFace community-driven open-source library of datasets
Home-page: https://github.com/huggingface/datasets
Author: HuggingFace Inc.
Author-email: thomas@huggingface.co
License: Apache 2.0
Location: /home/trainer/llm-train/lib/python3.8/site-packages
Requires: packaging, pyyaml, multiprocess, pyarrow-hotfix, pandas, pyarrow, xxhash, dill, numpy, aiohttp, tqdm, fsspec, requests, filelock, huggingface-hub
Required-by: trl, lm-eval, evaluate
trainer@a311ae86939e:/mnt$ pip show huggingface_hub
Name: huggingface-hub
Version: 0.17.3
Summary: Client library to download and publish models, datasets and other repos on the huggingface.co hub
Home-page: https://github.com/huggingface/huggingface_hub
Author: Hugging Face, Inc.
Author-email: julien@huggingface.co
License: Apache
Location: /home/trainer/llm-train/lib/python3.8/site-packages
Requires: requests, pyyaml, packaging, typing-extensions, tqdm, filelock, fsspec
Required-by: transformers, tokenizers, peft, evaluate, datasets, accelerate
trainer@a311ae86939e:/mnt$ huggingface-cli env
Copy-and-paste the text below in your GitHub issue.
- huggingface_hub version: 0.17.3
- Platform: Linux-6.5.13-7-MANJARO-x86_64-with-glibc2.29
- Python version: 3.8.10
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /home/trainer/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: wasertech
- Configured git credential helpers:
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.2
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 10.2.0
- hf_transfer: N/A
- gradio: N/A
- tensorboard: N/A
- numpy: 1.24.4
- pydantic: N/A
- aiohttp: 3.9.1
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /home/trainer/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /home/trainer/.cache/huggingface/assets
- HF_TOKEN_PATH: /home/trainer/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
<del>Installing `datasets` from `main` did the trick so I guess it will be fixed in the next release.
NVM https://github.com/huggingface/datasets/blob/d26abadce0b884db32382b92422d8a6aa997d40a/src/datasets/utils/info_utils.py#L5 | [
-0.05503574013710022,
-0.570375382900238,
-0.049042604863643646,
0.1578817367553711,
0.3562760055065155,
-0.001315489411354065,
0.1583208292722702,
0.356046199798584,
0.1492595672607422,
0.24469077587127686,
-0.12720763683319092,
0.24285480380058289,
-0.30560654401779175,
0.23566791415214539,
0.18623284995555878,
-0.07730528712272644,
0.12018708884716034,
-0.006815508008003235,
-0.1834503412246704,
-0.004905052483081818,
0.0646306574344635,
0.3446134626865387,
-0.03930874168872833,
0.1625463366508484,
-0.2528021037578583,
-0.06337335705757141,
0.05465546250343323,
0.2832421660423279,
-0.3274714946746826,
-0.4297003448009491,
0.43969830870628357,
-0.19447414577007294,
-0.0003150627017021179,
0.36574533581733704,
-0.0001097631175071001,
0.27306026220321655,
0.26921409368515015,
0.02205720543861389,
0.041014038026332855,
-0.49850142002105713,
0.05073900520801544,
-0.19502726197242737,
0.3544453978538513,
-0.06878796219825745,
-0.09512395411729813,
0.1798321157693863,
-0.05911431461572647,
0.0995078757405281,
0.5016686320304871,
0.33418890833854675,
0.29547110199928284,
0.5323150753974915,
0.29041624069213867,
-0.15466062724590302,
0.13523930311203003,
-0.16771632432937622,
-0.25040575861930847,
0.4010012149810791,
-0.04360530525445938,
0.18989622592926025,
0.12260714173316956,
0.2627636194229126,
0.20741337537765503,
-0.23946473002433777,
0.27062299847602844,
-0.1388823539018631,
0.06569836288690567,
-0.2155165672302246,
-0.267523854970932,
0.04618535935878754,
-0.15713828802108765,
-0.21949739754199982,
-0.3484641909599304,
-0.06001218035817146,
0.03637152165174484,
-0.13197846710681915,
0.35665223002433777,
-0.0033776238560676575,
0.06365451216697693,
0.14934761822223663,
0.015429772436618805,
-0.09081652760505676,
-0.000501483678817749,
-0.036441508680582047,
0.2353529930114746,
0.20688554644584656,
-0.17990310490131378,
0.09282150864601135,
0.18987791240215302,
-0.029424674808979034,
0.09412626922130585,
0.23005369305610657,
-0.1388433575630188,
-0.0011007077991962433,
-0.0740840807557106,
0.040637195110321045,
-0.06756357103586197,
0.015535014681518078,
0.010203897953033447,
0.22832262516021729,
0.09220458567142487,
0.027616586536169052,
0.023984089493751526,
0.17538447678089142,
-0.14817769825458527,
0.2482171505689621,
-0.24280224740505219,
0.04199706017971039,
0.17217206954956055,
0.5455189347267151,
0.011137068271636963,
0.12120616436004639,
-0.08107072114944458,
-0.23734994232654572,
-0.22506403923034668,
-0.06702623516321182,
0.21401891112327576,
-0.041909560561180115,
-0.07935543358325958,
0.04301328584551811,
-0.1179865300655365,
0.00869092345237732,
0.3152030110359192,
0.3541220724582672,
-0.24161647260189056,
-0.0003039110451936722,
0.25598061084747314,
-0.06416851282119751,
-0.13091224431991577,
0.3032524585723877,
-0.3098946511745453,
0.46506863832473755,
-0.29154136776924133,
-0.041948799043893814,
-0.03957849368453026,
-0.6315667629241943,
0.4697030484676361,
-0.0034328848123550415,
0.13636472821235657,
-0.24935166537761688,
-0.20580579340457916,
-0.01918553188443184,
0.07588156312704086,
0.27790403366088867,
-0.05570382997393608,
0.07670312374830246,
0.04576755687594414,
-0.013848423957824707,
-0.09177642315626144,
-0.22526900470256805,
-0.5321235656738281,
-0.33220505714416504,
-0.33084383606910706,
0.20148645341396332,
-0.16019728779792786,
0.09071168303489685,
0.01587945967912674,
-0.21021121740341187,
-0.05110751464962959,
0.010511666536331177,
0.03967709094285965,
-0.13785138726234436,
-0.05119539797306061,
-0.10996684432029724,
0.2835252285003662,
0.10481323301792145,
-0.029140576720237732,
-0.401447057723999,
0.37460002303123474,
-0.17754974961280823,
-0.15043455362319946,
0.12956830859184265,
-0.2896295487880707,
0.15535993874073029,
-0.2503799796104431,
0.28886157274246216,
0.17402364313602448,
-0.5002461671829224,
-0.4616802930831909,
-0.10986919701099396,
-0.1329672932624817,
-0.024461399763822556,
0.0036823563277721405,
0.07995472848415375,
-0.1485685110092163,
0.1744820773601532,
0.03356438875198364,
0.08234268426895142,
0.249517560005188,
-0.12715116143226624,
-0.4160052239894867,
-0.3570456802845001,
-0.37299734354019165,
0.021579429507255554,
0.28857719898223877,
-0.06638035178184509,
0.06996290385723114,
0.23414568603038788,
0.24626600742340088,
0.11734819412231445,
0.020930692553520203,
0.37738990783691406,
0.3836027681827545,
0.10779274255037308,
-0.059357672929763794,
-0.0727204978466034,
0.06376457214355469,
0.20565976202487946,
-0.13377991318702698,
0.23598618805408478,
-0.3564564287662506,
-0.08216311037540436,
-0.28276944160461426,
-0.029882539063692093,
-0.1834908127784729,
-0.21108850836753845,
0.1497318148612976,
0.0700811892747879,
0.22404955327510834,
0.24250756204128265,
-0.3975621461868286,
0.2850659489631653,
-0.08533124625682831,
0.37123316526412964,
-0.5446773767471313,
0.4186219573020935,
-0.2740083932876587,
-0.3283194601535797,
-0.0001946091651916504,
0.21069318056106567,
0.15343326330184937,
-0.207493394613266,
-0.24480295181274414,
0.2785851061344147,
-0.3914758861064911,
0.05433354154229164,
-0.16201384365558624,
0.055295296013355255,
0.1171640008687973,
-0.28529584407806396,
-0.11968932300806046,
-0.3112425208091736,
0.056425634771585464,
0.10448592156171799,
0.3978382647037506,
0.3044312000274658,
-0.03930553048849106,
-0.0021907612681388855,
0.08702505379915237,
0.014907516539096832,
-0.00881146639585495,
-0.075241819024086,
0.0023879706859588623,
-0.04725676029920578,
0.23635759949684143,
-0.12626993656158447,
0.13439756631851196,
-0.1779010146856308,
0.0383286327123642,
-0.1393502801656723,
0.6093623638153076,
0.14134404063224792,
-0.18156005442142487,
0.07726870477199554,
-0.055798787623643875,
0.06340563297271729,
0.05563647300004959,
0.09382519125938416,
0.14531740546226501,
0.004689030349254608,
-0.2993091642856598,
0.31313619017601013,
0.035093121230602264,
-0.22940970957279205,
0.20787829160690308,
0.1344732940196991,
0.17816543579101562,
0.1000850573182106,
0.0673031359910965,
0.00565970316529274,
-0.31029683351516724,
-0.1418951451778412,
-0.10886476933956146,
0.16367948055267334,
-0.25326448678970337,
0.17161747813224792,
-0.22367852926254272,
0.028183437883853912,
-0.08936825394630432,
-0.32263854146003723,
-0.17590615153312683,
-0.30464601516723633,
-0.12607696652412415,
0.35459598898887634,
0.009456276893615723,
0.21038922667503357,
0.12264702469110489,
-0.00988815724849701,
0.04937656223773956,
-0.07457797229290009,
-0.1019643247127533,
0.04140792787075043,
-0.17084921896457672,
0.035692110657691956,
0.21479099988937378,
-0.08555789291858673,
0.1414702981710434,
-0.09449638426303864,
-0.03938981145620346,
-0.14953340590000153,
-0.32621490955352783,
0.24992644786834717,
-0.17298828065395355,
0.23213952779769897,
0.4273306727409363,
0.0429992750287056,
-0.4793611168861389,
-0.32182690501213074,
0.2879447937011719,
-0.3579753637313843,
-0.25113213062286377,
-0.1841374933719635,
-0.0007009431719779968,
0.0013167932629585266,
-0.1155160591006279,
-0.1778787225484848,
-0.40733951330184937,
-0.27050429582595825,
0.32893991470336914,
0.09977357089519501,
0.10801786184310913,
0.43801894783973694,
0.08633917570114136,
0.2951852083206177,
-0.24655500054359436,
0.1448424756526947,
0.012833502143621445,
-0.7301996946334839,
0.2583271265029907,
-0.10317905992269516,
-0.45869070291519165,
0.07945861667394638,
-0.07522378116846085,
0.40010106563568115,
-0.3198997974395752,
-0.5177266001701355,
-0.2940681576728821,
-0.09623275697231293,
0.1741977483034134,
-0.02380463108420372,
0.2226293385028839,
0.1313493251800537,
-0.10479198396205902,
-0.0795704647898674,
-0.034809671342372894,
-0.09479470551013947,
0.10503959655761719,
-0.2023141235113144,
0.18519827723503113,
0.049339160323143005,
0.3795161247253418,
0.05621223896741867,
0.4962100088596344,
-0.03239118307828903,
-0.11068928241729736,
0.4720694422721863,
0.018757695332169533,
0.23900093138217926,
-0.17399291694164276,
-0.40687674283981323,
0.02702796459197998,
0.0799521878361702,
0.1437576711177826,
0.13605928421020508,
-0.03494485095143318,
0.5085555911064148,
-0.2100672721862793,
-0.2194957137107849,
-0.1969095766544342,
-0.19596034288406372,
-0.08095303177833557,
0.07370708882808685,
-0.0892721563577652,
0.045198939740657806,
-0.03759148716926575,
0.029836460947990417,
-0.1291860193014145,
0.3572050929069519,
0.4005986154079437,
-0.21864400804042816,
0.08896057307720184,
-0.25074341893196106,
-0.15885795652866364,
-0.47573143243789673,
0.08069050312042236,
-0.0065083615481853485,
0.2651136517524719,
0.082771897315979,
-0.1335873156785965,
0.13596031069755554,
-0.08928336203098297,
0.5148127675056458,
0.3903963565826416,
-0.09748934209346771,
-0.11680124700069427,
-0.4482274651527405,
-0.22266051173210144,
-0.3001860976219177,
-0.09029397368431091,
0.03416045010089874,
0.21628981828689575,
0.45723041892051697,
-0.21087303757667542,
-0.20541954040527344,
0.22273452579975128,
-0.067814402282238,
-0.11811386048793793,
0.027971453964710236,
-0.4053630232810974,
-0.5155017971992493,
-0.3042808771133423,
0.06121988967061043,
0.05099470913410187,
0.44301414489746094,
0.2094588577747345,
-0.0019773393869400024,
-0.07932552695274353,
-0.33160433173179626,
0.14301402866840363,
0.00668756291270256,
0.12313452363014221,
0.14201006293296814,
0.16311785578727722,
-0.10401047766208649,
0.37217453122138977,
0.09597477316856384,
0.5300309658050537,
-0.06700944900512695,
-0.12669429183006287,
-0.15917885303497314,
0.12597930431365967,
-0.012249283492565155,
0.2870619595050812,
-0.10018733143806458,
0.4619482159614563,
0.04807118698954582,
0.34175530076026917,
-0.043652333319187164,
0.032744843512773514,
0.17952558398246765,
0.013191796839237213,
-0.16944098472595215,
0.06649189442396164,
0.3779057562351227,
0.09160031378269196,
0.2014898806810379,
0.3530895411968231,
0.43019038438796997,
-0.25074127316474915,
0.21815259754657745,
-0.051477376371622086,
0.9168078899383545,
0.013813869096338749,
0.1679973304271698,
0.5615696310997009,
0.10657317191362381,
0.6010767221450806,
-0.0010026916861534119,
-0.040080659091472626,
-0.36792415380477905,
-0.279813289642334,
-0.00006587058305740356,
-0.13384397327899933,
0.28551438450813293,
-0.6301578879356384,
-0.034857407212257385,
0.05786864832043648,
-0.13931649923324585,
0.3769320249557495,
-0.16135121881961823,
0.0760054737329483,
-0.1622963845729828,
-0.04413430392742157,
-0.26825565099716187,
0.1522493064403534,
0.04617411643266678,
0.3651314079761505,
-0.10541678965091705,
-0.30897295475006104,
-0.1287134736776352,
-0.3912026882171631,
-0.07298734039068222,
0.1831986904144287,
-0.17049454152584076,
0.3526376187801361,
0.37705278396606445,
0.042374417185783386,
0.06414797902107239,
-0.06935913115739822,
0.3752814829349518,
0.07108770310878754,
-0.0940977931022644,
0.1433742493391037,
-0.09793403744697571,
-0.295745313167572,
-0.17065468430519104,
0.23322704434394836,
0.3303510844707489,
-0.2559635639190674,
-0.10937739908695221,
0.17946802079677582,
-0.014108266681432724,
-0.20651908218860626,
0.06783126294612885,
0.018610451370477676,
0.16855941712856293,
-0.19126279652118683,
-0.28267958760261536,
-0.14377760887145996,
-0.08814684301614761,
-0.3667019009590149,
0.13468612730503082,
0.14723749458789825,
-0.308603972196579,
-0.1302204728126526,
0.3540686368942261,
-0.22272983193397522,
-0.09467367082834244,
0.5199782252311707,
-0.04585158824920654,
-0.1004597395658493,
0.4745761752128601,
0.117484450340271,
-0.179630309343338,
-0.0929839015007019,
-0.0482218861579895,
0.5407167673110962,
-0.4157629609107971,
0.13193635642528534,
0.07154788821935654,
-0.060223862528800964,
-0.06233645975589752,
0.303808331489563,
0.35405972599983215,
0.18177251517772675,
0.06656067073345184,
-0.29197660088539124,
-0.2959316372871399,
0.23027649521827698,
0.017261750996112823,
0.14091020822525024,
-0.18091896176338196,
0.3162849545478821,
-0.1307234764099121,
-0.05347129702568054,
-0.3342663645744324,
0.23833361268043518,
-0.4087732434272766,
-0.08497793972492218,
-0.34426912665367126,
-0.054384805262088776,
0.24022269248962402,
-0.014732655137777328,
0.16567441821098328,
0.38691017031669617,
-0.36510220170021057,
-0.23490247130393982,
-0.269077867269516,
0.06326751410961151,
0.1435186117887497,
-0.1183539628982544,
-0.028379492461681366,
0.0050593093037605286,
0.07035395503044128,
0.056194007396698,
-0.004134446382522583,
0.4491237699985504,
0.14145150780677795,
0.07992766797542572,
0.20502416789531708,
0.049603138118982315,
-0.00947214663028717,
-0.07021695375442505,
-0.0065633319318294525,
0.30655062198638916,
-0.024574296548962593,
-0.05209413915872574,
-0.19509398937225342,
-0.018938317894935608,
-0.25128650665283203,
-0.01287217065691948,
-0.011155791580677032,
0.0884515792131424,
0.049557194113731384,
-0.2621614634990692,
-0.25907325744628906,
0.05336872488260269,
0.16654132306575775,
0.385515034198761,
-0.4096128046512604,
-0.049367114901542664,
0.14627806842327118,
0.20651039481163025,
-0.1589566171169281,
0.019668709486722946,
-0.10652945190668106,
-0.02506684511899948,
-0.049453169107437134,
0.07953047752380371,
0.3124969005584717,
-0.05470108240842819,
-0.13305526971817017,
0.277599960565567,
0.007821984589099884,
0.008034445345401764,
0.3043350875377655,
0.27489006519317627,
-0.13384310901165009,
0.06865876913070679,
0.23065529763698578,
-0.11873647570610046,
0.04768023639917374,
0.34556692838668823,
-0.60428786277771,
0.5652643442153931,
-0.26434969902038574,
0.02267787605524063,
0.08622576296329498,
-0.056592922657728195,
-0.07822161912918091,
0.017898857593536377,
0.011625397950410843,
-0.29178863763809204,
-0.19329480826854706,
0.7534425258636475,
-0.09977518022060394,
-0.24616111814975739,
-0.004010230302810669,
0.3180309534072876,
-0.17698293924331665,
-0.10203766077756882,
-0.029417235404253006,
-0.06690514087677002,
-0.37416690587997437,
0.09699535369873047,
0.032150749117136,
-0.1233627200126648,
0.10098427534103394,
0.20276795327663422,
-0.34889939427375793,
-0.16150638461112976,
-0.3210834860801697,
0.29249563813209534,
0.24198253452777863,
-0.21386060118675232,
0.2589525580406189,
0.33922404050827026,
-0.1921374499797821,
-0.23459333181381226,
0.15181927382946014,
0.37253883481025696,
0.18044424057006836,
0.2207133173942566,
-0.09540699422359467,
0.06680906563997269,
-0.04838065057992935,
0.1249694973230362,
0.17483875155448914,
0.1653462052345276,
0.39083918929100037,
0.03103175386786461,
0.17809271812438965,
-0.2772482633590698,
0.06747911870479584,
-0.17802098393440247,
0.33205854892730713,
-0.08214607834815979,
0.41823065280914307,
-0.318302184343338,
0.15612824261188507,
-0.22939075529575348,
0.2827470898628235,
-0.5040220618247986,
0.059672366827726364,
0.37693923711776733,
0.1721276044845581,
0.1490074098110199,
-0.2590879499912262,
0.1004202663898468,
-0.1537923663854599,
0.5293654799461365,
0.4074843227863312,
-0.048658862709999084,
-0.2254548966884613,
-0.0919400006532669,
-0.2642293870449066,
0.27231132984161377,
0.07791268825531006,
0.02284625917673111,
-0.1346227526664734,
-0.071851447224617,
-0.31069883704185486,
-0.038787733763456345,
0.11857569217681885,
-0.060859184712171555,
0.17126555740833282,
-0.27290523052215576,
-0.30125319957733154,
0.11432332545518875,
-0.10107305645942688,
-0.09064796566963196,
0.32226383686065674,
-0.06473593413829803,
0.21098068356513977,
-0.29980385303497314,
0.03323435038328171,
-0.18797419965267181,
-0.09243586659431458,
-0.17996378242969513,
-0.3288770318031311,
0.5169206261634827,
0.011884870007634163,
-0.002718329429626465,
-0.14294475317001343,
-0.2705756425857544,
-0.23423174023628235,
-0.3904566168785095,
0.03565492480993271,
0.2231830358505249,
0.09145231544971466,
0.526541531085968,
0.022411786019802094,
-0.15896572172641754,
-0.4728771448135376,
0.26143375039100647,
-0.11656424403190613,
-0.13248223066329956,
-0.1283644735813141,
0.08290019631385803,
0.09536483883857727,
0.15442794561386108,
0.385268896818161,
0.3285098373889923,
-0.04340346157550812,
0.08331557363271713,
-0.34214651584625244,
-0.4008074402809143,
0.7584791779518127,
-0.21596357226371765,
-0.0037720724940299988,
0.12111152708530426,
0.2293199747800827,
0.49718043208122253,
-0.29592177271842957,
-0.7881664037704468,
0.11429448425769806,
0.09733763337135315,
-0.007079853676259518,
-0.2689081132411957,
0.43021151423454285,
0.0543724000453949,
0.21988141536712646,
0.07891766726970673,
0.020408131182193756,
0.1710038185119629,
-0.11377453804016113,
0.3454023003578186,
-0.16966277360916138
] |
https://github.com/huggingface/datasets/issues/6563 | Ha yes I had pinned `tokenizers` to an old version so it downgraded `huggingface_hub`. Note to myself keep HuggingFace modules relatively close together chronologically release wise. | `ImportError`: cannot import name 'insecure_hashlib' from 'huggingface_hub.utils' (.../huggingface_hub/utils/__init__.py) | ### Describe the bug
Yep its not [there](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/utils/__init__.py) anymore.
```text
+ python /home/trainer/sft_train.py --model_name cognitivecomputations/dolphin-2.2.1-mistral-7b --dataset_name wasertech/OneOS --load_in_4bit --use_peft --batch_size 4 --num_train_epochs 1 --learning_rate 1.41e-5 --gradient_accumulation_steps 8 --seq_length 4096 --output_dir output --log_with wandb
Traceback (most recent call last):
File "/home/trainer/sft_train.py", line 22, in <module>
from datasets import load_dataset
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/__init__.py", line 22, in <module>
from .arrow_dataset import Dataset
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 66, in <module>
from .arrow_reader import ArrowReader
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/arrow_reader.py", line 30, in <module>
from .download.download_config import DownloadConfig
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/download/__init__.py", line 9, in <module>
from .download_manager import DownloadManager, DownloadMode
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/download/download_manager.py", line 31, in <module>
from ..utils import tqdm as hf_tqdm
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/utils/__init__.py", line 19, in <module>
from .info_utils import VerificationMode
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/utils/info_utils.py", line 5, in <module>
from huggingface_hub.utils import insecure_hashlib
ImportError: cannot import name 'insecure_hashlib' from 'huggingface_hub.utils' (/home/trainer/llm-train/lib/python3.8/site-packages/huggingface_hub/utils/__init__.py)
```
### Steps to reproduce the bug
Using `datasets==2.16.1` and `huggingface_hub== 0.17.3`, load a dataset with `load_dataset`.
### Expected behavior
The dataset should be (downloaded - if needed - and) returned.
### Environment info
```text
trainer@a311ae86939e:/mnt$ pip show datasets
Name: datasets
Version: 2.16.1
Summary: HuggingFace community-driven open-source library of datasets
Home-page: https://github.com/huggingface/datasets
Author: HuggingFace Inc.
Author-email: thomas@huggingface.co
License: Apache 2.0
Location: /home/trainer/llm-train/lib/python3.8/site-packages
Requires: packaging, pyyaml, multiprocess, pyarrow-hotfix, pandas, pyarrow, xxhash, dill, numpy, aiohttp, tqdm, fsspec, requests, filelock, huggingface-hub
Required-by: trl, lm-eval, evaluate
trainer@a311ae86939e:/mnt$ pip show huggingface_hub
Name: huggingface-hub
Version: 0.17.3
Summary: Client library to download and publish models, datasets and other repos on the huggingface.co hub
Home-page: https://github.com/huggingface/huggingface_hub
Author: Hugging Face, Inc.
Author-email: julien@huggingface.co
License: Apache
Location: /home/trainer/llm-train/lib/python3.8/site-packages
Requires: requests, pyyaml, packaging, typing-extensions, tqdm, filelock, fsspec
Required-by: transformers, tokenizers, peft, evaluate, datasets, accelerate
trainer@a311ae86939e:/mnt$ huggingface-cli env
Copy-and-paste the text below in your GitHub issue.
- huggingface_hub version: 0.17.3
- Platform: Linux-6.5.13-7-MANJARO-x86_64-with-glibc2.29
- Python version: 3.8.10
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /home/trainer/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: wasertech
- Configured git credential helpers:
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.2
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 10.2.0
- hf_transfer: N/A
- gradio: N/A
- tensorboard: N/A
- numpy: 1.24.4
- pydantic: N/A
- aiohttp: 3.9.1
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /home/trainer/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /home/trainer/.cache/huggingface/assets
- HF_TOKEN_PATH: /home/trainer/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
``` | 26 | `ImportError`: cannot import name 'insecure_hashlib' from 'huggingface_hub.utils' (.../huggingface_hub/utils/__init__.py)
### Describe the bug
Yep its not [there](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/utils/__init__.py) anymore.
```text
+ python /home/trainer/sft_train.py --model_name cognitivecomputations/dolphin-2.2.1-mistral-7b --dataset_name wasertech/OneOS --load_in_4bit --use_peft --batch_size 4 --num_train_epochs 1 --learning_rate 1.41e-5 --gradient_accumulation_steps 8 --seq_length 4096 --output_dir output --log_with wandb
Traceback (most recent call last):
File "/home/trainer/sft_train.py", line 22, in <module>
from datasets import load_dataset
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/__init__.py", line 22, in <module>
from .arrow_dataset import Dataset
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 66, in <module>
from .arrow_reader import ArrowReader
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/arrow_reader.py", line 30, in <module>
from .download.download_config import DownloadConfig
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/download/__init__.py", line 9, in <module>
from .download_manager import DownloadManager, DownloadMode
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/download/download_manager.py", line 31, in <module>
from ..utils import tqdm as hf_tqdm
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/utils/__init__.py", line 19, in <module>
from .info_utils import VerificationMode
File "/home/trainer/llm-train/lib/python3.8/site-packages/datasets/utils/info_utils.py", line 5, in <module>
from huggingface_hub.utils import insecure_hashlib
ImportError: cannot import name 'insecure_hashlib' from 'huggingface_hub.utils' (/home/trainer/llm-train/lib/python3.8/site-packages/huggingface_hub/utils/__init__.py)
```
### Steps to reproduce the bug
Using `datasets==2.16.1` and `huggingface_hub== 0.17.3`, load a dataset with `load_dataset`.
### Expected behavior
The dataset should be (downloaded - if needed - and) returned.
### Environment info
```text
trainer@a311ae86939e:/mnt$ pip show datasets
Name: datasets
Version: 2.16.1
Summary: HuggingFace community-driven open-source library of datasets
Home-page: https://github.com/huggingface/datasets
Author: HuggingFace Inc.
Author-email: thomas@huggingface.co
License: Apache 2.0
Location: /home/trainer/llm-train/lib/python3.8/site-packages
Requires: packaging, pyyaml, multiprocess, pyarrow-hotfix, pandas, pyarrow, xxhash, dill, numpy, aiohttp, tqdm, fsspec, requests, filelock, huggingface-hub
Required-by: trl, lm-eval, evaluate
trainer@a311ae86939e:/mnt$ pip show huggingface_hub
Name: huggingface-hub
Version: 0.17.3
Summary: Client library to download and publish models, datasets and other repos on the huggingface.co hub
Home-page: https://github.com/huggingface/huggingface_hub
Author: Hugging Face, Inc.
Author-email: julien@huggingface.co
License: Apache
Location: /home/trainer/llm-train/lib/python3.8/site-packages
Requires: requests, pyyaml, packaging, typing-extensions, tqdm, filelock, fsspec
Required-by: transformers, tokenizers, peft, evaluate, datasets, accelerate
trainer@a311ae86939e:/mnt$ huggingface-cli env
Copy-and-paste the text below in your GitHub issue.
- huggingface_hub version: 0.17.3
- Platform: Linux-6.5.13-7-MANJARO-x86_64-with-glibc2.29
- Python version: 3.8.10
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /home/trainer/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: wasertech
- Configured git credential helpers:
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.1.2
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: 10.2.0
- hf_transfer: N/A
- gradio: N/A
- tensorboard: N/A
- numpy: 1.24.4
- pydantic: N/A
- aiohttp: 3.9.1
- ENDPOINT: https://huggingface.co
- HUGGINGFACE_HUB_CACHE: /home/trainer/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /home/trainer/.cache/huggingface/assets
- HF_TOKEN_PATH: /home/trainer/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
Ha yes I had pinned `tokenizers` to an old version so it downgraded `huggingface_hub`. Note to myself keep HuggingFace modules relatively close together chronologically release wise. | [
-0.05503574013710022,
-0.570375382900238,
-0.049042604863643646,
0.1578817367553711,
0.3562760055065155,
-0.001315489411354065,
0.1583208292722702,
0.356046199798584,
0.1492595672607422,
0.24469077587127686,
-0.12720763683319092,
0.24285480380058289,
-0.30560654401779175,
0.23566791415214539,
0.18623284995555878,
-0.07730528712272644,
0.12018708884716034,
-0.006815508008003235,
-0.1834503412246704,
-0.004905052483081818,
0.0646306574344635,
0.3446134626865387,
-0.03930874168872833,
0.1625463366508484,
-0.2528021037578583,
-0.06337335705757141,
0.05465546250343323,
0.2832421660423279,
-0.3274714946746826,
-0.4297003448009491,
0.43969830870628357,
-0.19447414577007294,
-0.0003150627017021179,
0.36574533581733704,
-0.0001097631175071001,
0.27306026220321655,
0.26921409368515015,
0.02205720543861389,
0.041014038026332855,
-0.49850142002105713,
0.05073900520801544,
-0.19502726197242737,
0.3544453978538513,
-0.06878796219825745,
-0.09512395411729813,
0.1798321157693863,
-0.05911431461572647,
0.0995078757405281,
0.5016686320304871,
0.33418890833854675,
0.29547110199928284,
0.5323150753974915,
0.29041624069213867,
-0.15466062724590302,
0.13523930311203003,
-0.16771632432937622,
-0.25040575861930847,
0.4010012149810791,
-0.04360530525445938,
0.18989622592926025,
0.12260714173316956,
0.2627636194229126,
0.20741337537765503,
-0.23946473002433777,
0.27062299847602844,
-0.1388823539018631,
0.06569836288690567,
-0.2155165672302246,
-0.267523854970932,
0.04618535935878754,
-0.15713828802108765,
-0.21949739754199982,
-0.3484641909599304,
-0.06001218035817146,
0.03637152165174484,
-0.13197846710681915,
0.35665223002433777,
-0.0033776238560676575,
0.06365451216697693,
0.14934761822223663,
0.015429772436618805,
-0.09081652760505676,
-0.000501483678817749,
-0.036441508680582047,
0.2353529930114746,
0.20688554644584656,
-0.17990310490131378,
0.09282150864601135,
0.18987791240215302,
-0.029424674808979034,
0.09412626922130585,
0.23005369305610657,
-0.1388433575630188,
-0.0011007077991962433,
-0.0740840807557106,
0.040637195110321045,
-0.06756357103586197,
0.015535014681518078,
0.010203897953033447,
0.22832262516021729,
0.09220458567142487,
0.027616586536169052,
0.023984089493751526,
0.17538447678089142,
-0.14817769825458527,
0.2482171505689621,
-0.24280224740505219,
0.04199706017971039,
0.17217206954956055,
0.5455189347267151,
0.011137068271636963,
0.12120616436004639,
-0.08107072114944458,
-0.23734994232654572,
-0.22506403923034668,
-0.06702623516321182,
0.21401891112327576,
-0.041909560561180115,
-0.07935543358325958,
0.04301328584551811,
-0.1179865300655365,
0.00869092345237732,
0.3152030110359192,
0.3541220724582672,
-0.24161647260189056,
-0.0003039110451936722,
0.25598061084747314,
-0.06416851282119751,
-0.13091224431991577,
0.3032524585723877,
-0.3098946511745453,
0.46506863832473755,
-0.29154136776924133,
-0.041948799043893814,
-0.03957849368453026,
-0.6315667629241943,
0.4697030484676361,
-0.0034328848123550415,
0.13636472821235657,
-0.24935166537761688,
-0.20580579340457916,
-0.01918553188443184,
0.07588156312704086,
0.27790403366088867,
-0.05570382997393608,
0.07670312374830246,
0.04576755687594414,
-0.013848423957824707,
-0.09177642315626144,
-0.22526900470256805,
-0.5321235656738281,
-0.33220505714416504,
-0.33084383606910706,
0.20148645341396332,
-0.16019728779792786,
0.09071168303489685,
0.01587945967912674,
-0.21021121740341187,
-0.05110751464962959,
0.010511666536331177,
0.03967709094285965,
-0.13785138726234436,
-0.05119539797306061,
-0.10996684432029724,
0.2835252285003662,
0.10481323301792145,
-0.029140576720237732,
-0.401447057723999,
0.37460002303123474,
-0.17754974961280823,
-0.15043455362319946,
0.12956830859184265,
-0.2896295487880707,
0.15535993874073029,
-0.2503799796104431,
0.28886157274246216,
0.17402364313602448,
-0.5002461671829224,
-0.4616802930831909,
-0.10986919701099396,
-0.1329672932624817,
-0.024461399763822556,
0.0036823563277721405,
0.07995472848415375,
-0.1485685110092163,
0.1744820773601532,
0.03356438875198364,
0.08234268426895142,
0.249517560005188,
-0.12715116143226624,
-0.4160052239894867,
-0.3570456802845001,
-0.37299734354019165,
0.021579429507255554,
0.28857719898223877,
-0.06638035178184509,
0.06996290385723114,
0.23414568603038788,
0.24626600742340088,
0.11734819412231445,
0.020930692553520203,
0.37738990783691406,
0.3836027681827545,
0.10779274255037308,
-0.059357672929763794,
-0.0727204978466034,
0.06376457214355469,
0.20565976202487946,
-0.13377991318702698,
0.23598618805408478,
-0.3564564287662506,
-0.08216311037540436,
-0.28276944160461426,
-0.029882539063692093,
-0.1834908127784729,
-0.21108850836753845,
0.1497318148612976,
0.0700811892747879,
0.22404955327510834,
0.24250756204128265,
-0.3975621461868286,
0.2850659489631653,
-0.08533124625682831,
0.37123316526412964,
-0.5446773767471313,
0.4186219573020935,
-0.2740083932876587,
-0.3283194601535797,
-0.0001946091651916504,
0.21069318056106567,
0.15343326330184937,
-0.207493394613266,
-0.24480295181274414,
0.2785851061344147,
-0.3914758861064911,
0.05433354154229164,
-0.16201384365558624,
0.055295296013355255,
0.1171640008687973,
-0.28529584407806396,
-0.11968932300806046,
-0.3112425208091736,
0.056425634771585464,
0.10448592156171799,
0.3978382647037506,
0.3044312000274658,
-0.03930553048849106,
-0.0021907612681388855,
0.08702505379915237,
0.014907516539096832,
-0.00881146639585495,
-0.075241819024086,
0.0023879706859588623,
-0.04725676029920578,
0.23635759949684143,
-0.12626993656158447,
0.13439756631851196,
-0.1779010146856308,
0.0383286327123642,
-0.1393502801656723,
0.6093623638153076,
0.14134404063224792,
-0.18156005442142487,
0.07726870477199554,
-0.055798787623643875,
0.06340563297271729,
0.05563647300004959,
0.09382519125938416,
0.14531740546226501,
0.004689030349254608,
-0.2993091642856598,
0.31313619017601013,
0.035093121230602264,
-0.22940970957279205,
0.20787829160690308,
0.1344732940196991,
0.17816543579101562,
0.1000850573182106,
0.0673031359910965,
0.00565970316529274,
-0.31029683351516724,
-0.1418951451778412,
-0.10886476933956146,
0.16367948055267334,
-0.25326448678970337,
0.17161747813224792,
-0.22367852926254272,
0.028183437883853912,
-0.08936825394630432,
-0.32263854146003723,
-0.17590615153312683,
-0.30464601516723633,
-0.12607696652412415,
0.35459598898887634,
0.009456276893615723,
0.21038922667503357,
0.12264702469110489,
-0.00988815724849701,
0.04937656223773956,
-0.07457797229290009,
-0.1019643247127533,
0.04140792787075043,
-0.17084921896457672,
0.035692110657691956,
0.21479099988937378,
-0.08555789291858673,
0.1414702981710434,
-0.09449638426303864,
-0.03938981145620346,
-0.14953340590000153,
-0.32621490955352783,
0.24992644786834717,
-0.17298828065395355,
0.23213952779769897,
0.4273306727409363,
0.0429992750287056,
-0.4793611168861389,
-0.32182690501213074,
0.2879447937011719,
-0.3579753637313843,
-0.25113213062286377,
-0.1841374933719635,
-0.0007009431719779968,
0.0013167932629585266,
-0.1155160591006279,
-0.1778787225484848,
-0.40733951330184937,
-0.27050429582595825,
0.32893991470336914,
0.09977357089519501,
0.10801786184310913,
0.43801894783973694,
0.08633917570114136,
0.2951852083206177,
-0.24655500054359436,
0.1448424756526947,
0.012833502143621445,
-0.7301996946334839,
0.2583271265029907,
-0.10317905992269516,
-0.45869070291519165,
0.07945861667394638,
-0.07522378116846085,
0.40010106563568115,
-0.3198997974395752,
-0.5177266001701355,
-0.2940681576728821,
-0.09623275697231293,
0.1741977483034134,
-0.02380463108420372,
0.2226293385028839,
0.1313493251800537,
-0.10479198396205902,
-0.0795704647898674,
-0.034809671342372894,
-0.09479470551013947,
0.10503959655761719,
-0.2023141235113144,
0.18519827723503113,
0.049339160323143005,
0.3795161247253418,
0.05621223896741867,
0.4962100088596344,
-0.03239118307828903,
-0.11068928241729736,
0.4720694422721863,
0.018757695332169533,
0.23900093138217926,
-0.17399291694164276,
-0.40687674283981323,
0.02702796459197998,
0.0799521878361702,
0.1437576711177826,
0.13605928421020508,
-0.03494485095143318,
0.5085555911064148,
-0.2100672721862793,
-0.2194957137107849,
-0.1969095766544342,
-0.19596034288406372,
-0.08095303177833557,
0.07370708882808685,
-0.0892721563577652,
0.045198939740657806,
-0.03759148716926575,
0.029836460947990417,
-0.1291860193014145,
0.3572050929069519,
0.4005986154079437,
-0.21864400804042816,
0.08896057307720184,
-0.25074341893196106,
-0.15885795652866364,
-0.47573143243789673,
0.08069050312042236,
-0.0065083615481853485,
0.2651136517524719,
0.082771897315979,
-0.1335873156785965,
0.13596031069755554,
-0.08928336203098297,
0.5148127675056458,
0.3903963565826416,
-0.09748934209346771,
-0.11680124700069427,
-0.4482274651527405,
-0.22266051173210144,
-0.3001860976219177,
-0.09029397368431091,
0.03416045010089874,
0.21628981828689575,
0.45723041892051697,
-0.21087303757667542,
-0.20541954040527344,
0.22273452579975128,
-0.067814402282238,
-0.11811386048793793,
0.027971453964710236,
-0.4053630232810974,
-0.5155017971992493,
-0.3042808771133423,
0.06121988967061043,
0.05099470913410187,
0.44301414489746094,
0.2094588577747345,
-0.0019773393869400024,
-0.07932552695274353,
-0.33160433173179626,
0.14301402866840363,
0.00668756291270256,
0.12313452363014221,
0.14201006293296814,
0.16311785578727722,
-0.10401047766208649,
0.37217453122138977,
0.09597477316856384,
0.5300309658050537,
-0.06700944900512695,
-0.12669429183006287,
-0.15917885303497314,
0.12597930431365967,
-0.012249283492565155,
0.2870619595050812,
-0.10018733143806458,
0.4619482159614563,
0.04807118698954582,
0.34175530076026917,
-0.043652333319187164,
0.032744843512773514,
0.17952558398246765,
0.013191796839237213,
-0.16944098472595215,
0.06649189442396164,
0.3779057562351227,
0.09160031378269196,
0.2014898806810379,
0.3530895411968231,
0.43019038438796997,
-0.25074127316474915,
0.21815259754657745,
-0.051477376371622086,
0.9168078899383545,
0.013813869096338749,
0.1679973304271698,
0.5615696310997009,
0.10657317191362381,
0.6010767221450806,
-0.0010026916861534119,
-0.040080659091472626,
-0.36792415380477905,
-0.279813289642334,
-0.00006587058305740356,
-0.13384397327899933,
0.28551438450813293,
-0.6301578879356384,
-0.034857407212257385,
0.05786864832043648,
-0.13931649923324585,
0.3769320249557495,
-0.16135121881961823,
0.0760054737329483,
-0.1622963845729828,
-0.04413430392742157,
-0.26825565099716187,
0.1522493064403534,
0.04617411643266678,
0.3651314079761505,
-0.10541678965091705,
-0.30897295475006104,
-0.1287134736776352,
-0.3912026882171631,
-0.07298734039068222,
0.1831986904144287,
-0.17049454152584076,
0.3526376187801361,
0.37705278396606445,
0.042374417185783386,
0.06414797902107239,
-0.06935913115739822,
0.3752814829349518,
0.07108770310878754,
-0.0940977931022644,
0.1433742493391037,
-0.09793403744697571,
-0.295745313167572,
-0.17065468430519104,
0.23322704434394836,
0.3303510844707489,
-0.2559635639190674,
-0.10937739908695221,
0.17946802079677582,
-0.014108266681432724,
-0.20651908218860626,
0.06783126294612885,
0.018610451370477676,
0.16855941712856293,
-0.19126279652118683,
-0.28267958760261536,
-0.14377760887145996,
-0.08814684301614761,
-0.3667019009590149,
0.13468612730503082,
0.14723749458789825,
-0.308603972196579,
-0.1302204728126526,
0.3540686368942261,
-0.22272983193397522,
-0.09467367082834244,
0.5199782252311707,
-0.04585158824920654,
-0.1004597395658493,
0.4745761752128601,
0.117484450340271,
-0.179630309343338,
-0.0929839015007019,
-0.0482218861579895,
0.5407167673110962,
-0.4157629609107971,
0.13193635642528534,
0.07154788821935654,
-0.060223862528800964,
-0.06233645975589752,
0.303808331489563,
0.35405972599983215,
0.18177251517772675,
0.06656067073345184,
-0.29197660088539124,
-0.2959316372871399,
0.23027649521827698,
0.017261750996112823,
0.14091020822525024,
-0.18091896176338196,
0.3162849545478821,
-0.1307234764099121,
-0.05347129702568054,
-0.3342663645744324,
0.23833361268043518,
-0.4087732434272766,
-0.08497793972492218,
-0.34426912665367126,
-0.054384805262088776,
0.24022269248962402,
-0.014732655137777328,
0.16567441821098328,
0.38691017031669617,
-0.36510220170021057,
-0.23490247130393982,
-0.269077867269516,
0.06326751410961151,
0.1435186117887497,
-0.1183539628982544,
-0.028379492461681366,
0.0050593093037605286,
0.07035395503044128,
0.056194007396698,
-0.004134446382522583,
0.4491237699985504,
0.14145150780677795,
0.07992766797542572,
0.20502416789531708,
0.049603138118982315,
-0.00947214663028717,
-0.07021695375442505,
-0.0065633319318294525,
0.30655062198638916,
-0.024574296548962593,
-0.05209413915872574,
-0.19509398937225342,
-0.018938317894935608,
-0.25128650665283203,
-0.01287217065691948,
-0.011155791580677032,
0.0884515792131424,
0.049557194113731384,
-0.2621614634990692,
-0.25907325744628906,
0.05336872488260269,
0.16654132306575775,
0.385515034198761,
-0.4096128046512604,
-0.049367114901542664,
0.14627806842327118,
0.20651039481163025,
-0.1589566171169281,
0.019668709486722946,
-0.10652945190668106,
-0.02506684511899948,
-0.049453169107437134,
0.07953047752380371,
0.3124969005584717,
-0.05470108240842819,
-0.13305526971817017,
0.277599960565567,
0.007821984589099884,
0.008034445345401764,
0.3043350875377655,
0.27489006519317627,
-0.13384310901165009,
0.06865876913070679,
0.23065529763698578,
-0.11873647570610046,
0.04768023639917374,
0.34556692838668823,
-0.60428786277771,
0.5652643442153931,
-0.26434969902038574,
0.02267787605524063,
0.08622576296329498,
-0.056592922657728195,
-0.07822161912918091,
0.017898857593536377,
0.011625397950410843,
-0.29178863763809204,
-0.19329480826854706,
0.7534425258636475,
-0.09977518022060394,
-0.24616111814975739,
-0.004010230302810669,
0.3180309534072876,
-0.17698293924331665,
-0.10203766077756882,
-0.029417235404253006,
-0.06690514087677002,
-0.37416690587997437,
0.09699535369873047,
0.032150749117136,
-0.1233627200126648,
0.10098427534103394,
0.20276795327663422,
-0.34889939427375793,
-0.16150638461112976,
-0.3210834860801697,
0.29249563813209534,
0.24198253452777863,
-0.21386060118675232,
0.2589525580406189,
0.33922404050827026,
-0.1921374499797821,
-0.23459333181381226,
0.15181927382946014,
0.37253883481025696,
0.18044424057006836,
0.2207133173942566,
-0.09540699422359467,
0.06680906563997269,
-0.04838065057992935,
0.1249694973230362,
0.17483875155448914,
0.1653462052345276,
0.39083918929100037,
0.03103175386786461,
0.17809271812438965,
-0.2772482633590698,
0.06747911870479584,
-0.17802098393440247,
0.33205854892730713,
-0.08214607834815979,
0.41823065280914307,
-0.318302184343338,
0.15612824261188507,
-0.22939075529575348,
0.2827470898628235,
-0.5040220618247986,
0.059672366827726364,
0.37693923711776733,
0.1721276044845581,
0.1490074098110199,
-0.2590879499912262,
0.1004202663898468,
-0.1537923663854599,
0.5293654799461365,
0.4074843227863312,
-0.048658862709999084,
-0.2254548966884613,
-0.0919400006532669,
-0.2642293870449066,
0.27231132984161377,
0.07791268825531006,
0.02284625917673111,
-0.1346227526664734,
-0.071851447224617,
-0.31069883704185486,
-0.038787733763456345,
0.11857569217681885,
-0.060859184712171555,
0.17126555740833282,
-0.27290523052215576,
-0.30125319957733154,
0.11432332545518875,
-0.10107305645942688,
-0.09064796566963196,
0.32226383686065674,
-0.06473593413829803,
0.21098068356513977,
-0.29980385303497314,
0.03323435038328171,
-0.18797419965267181,
-0.09243586659431458,
-0.17996378242969513,
-0.3288770318031311,
0.5169206261634827,
0.011884870007634163,
-0.002718329429626465,
-0.14294475317001343,
-0.2705756425857544,
-0.23423174023628235,
-0.3904566168785095,
0.03565492480993271,
0.2231830358505249,
0.09145231544971466,
0.526541531085968,
0.022411786019802094,
-0.15896572172641754,
-0.4728771448135376,
0.26143375039100647,
-0.11656424403190613,
-0.13248223066329956,
-0.1283644735813141,
0.08290019631385803,
0.09536483883857727,
0.15442794561386108,
0.385268896818161,
0.3285098373889923,
-0.04340346157550812,
0.08331557363271713,
-0.34214651584625244,
-0.4008074402809143,
0.7584791779518127,
-0.21596357226371765,
-0.0037720724940299988,
0.12111152708530426,
0.2293199747800827,
0.49718043208122253,
-0.29592177271842957,
-0.7881664037704468,
0.11429448425769806,
0.09733763337135315,
-0.007079853676259518,
-0.2689081132411957,
0.43021151423454285,
0.0543724000453949,
0.21988141536712646,
0.07891766726970673,
0.020408131182193756,
0.1710038185119629,
-0.11377453804016113,
0.3454023003578186,
-0.16966277360916138
] |
https://github.com/huggingface/datasets/issues/6561 | In particular, I would like to have an example of how to replace the following configuration (from https://huggingface.co/docs/hub/datasets-manual-configuration#splits)
```
---
configs:
- config_name: default
data_files:
- split: train
path: "data/*.csv"
- split: test
path: "holdout/*.csv"
---
```
with the `data_dir` field. | Document YAML configuration with "data_dir" | See https://huggingface.co/datasets/uonlp/CulturaX/discussions/15#6597e83f185db94370d6bf50 for reference | 41 | Document YAML configuration with "data_dir"
See https://huggingface.co/datasets/uonlp/CulturaX/discussions/15#6597e83f185db94370d6bf50 for reference
In particular, I would like to have an example of how to replace the following configuration (from https://huggingface.co/docs/hub/datasets-manual-configuration#splits)
```
---
configs:
- config_name: default
data_files:
- split: train
path: "data/*.csv"
- split: test
path: "holdout/*.csv"
---
```
with the `data_dir` field. | [
-0.25297069549560547,
-0.1603081226348877,
0.0808432325720787,
0.018189026042819023,
0.23896105587482452,
0.40161192417144775,
0.35298261046409607,
0.054908160120248795,
0.022724732756614685,
0.16462454199790955,
0.032079875469207764,
0.03859062120318413,
0.06359618902206421,
0.4298962652683258,
0.2220606654882431,
0.11304203420877457,
0.005755413323640823,
0.06944163143634796,
-0.28166818618774414,
0.17195771634578705,
-0.02676953375339508,
0.239849254488945,
-0.026044845581054688,
-0.05713890120387077,
-0.4810565710067749,
0.0312751829624176,
-0.2794279456138611,
0.44168782234191895,
-0.08901810646057129,
-0.18763229250907898,
0.41576939821243286,
0.2949965298175812,
0.040975622832775116,
0.2636059820652008,
-0.00012194869486847892,
0.015112310647964478,
0.10147620737552643,
-0.3961111903190613,
-0.2500552833080292,
-0.17175957560539246,
-0.5098714232444763,
-0.07918880879878998,
0.03551991283893585,
-0.17750287055969238,
-0.06461841613054276,
0.18292710185050964,
-0.014481818303465843,
-0.23539406061172485,
0.020092375576496124,
0.16957084834575653,
0.08699770271778107,
-0.07173599302768707,
-0.32932692766189575,
-0.19579556584358215,
-0.04157301038503647,
0.5005322694778442,
-0.06797058880329132,
0.26813334226608276,
0.26614460349082947,
-0.14350301027297974,
-0.0612729974091053,
0.09753777086734772,
0.01711394637823105,
-0.009924945421516895,
0.31051504611968994,
0.3154563307762146,
-0.017002150416374207,
-0.06593349575996399,
0.06280346214771271,
0.2085907757282257,
0.5782788395881653,
-0.5501216650009155,
-0.045939069241285324,
-0.4163127839565277,
-0.0633881539106369,
-0.1590094268321991,
0.0855524018406868,
0.20402151346206665,
-0.08152322471141815,
0.3614334464073181,
-0.11459185183048248,
-0.5428118109703064,
-0.1092211976647377,
0.14283670485019684,
-0.15737877786159515,
0.2183896005153656,
0.13443070650100708,
-0.1479710340499878,
0.19613850116729736,
0.1172972172498703,
0.05455298721790314,
-0.0007107481360435486,
-0.060892440378665924,
-0.15528856217861176,
0.2303571105003357,
-0.1485535353422165,
-0.2873808443546295,
-0.0833611860871315,
0.227189838886261,
0.02713100239634514,
-0.0030516367405653,
0.14377620816230774,
-0.1350547969341278,
0.29794853925704956,
0.16861507296562195,
0.2307278960943222,
0.4162183403968811,
0.4276280403137207,
0.17114824056625366,
0.4241078197956085,
0.23162159323692322,
-0.23071281611919403,
0.04721925035119057,
-0.41884225606918335,
-0.2316349297761917,
-0.10693265497684479,
0.19720228016376495,
0.0710897371172905,
-0.2619386911392212,
-0.31885454058647156,
0.003835909068584442,
-0.03581269830465317,
0.33462628722190857,
0.27813923358917236,
0.1967339813709259,
-0.180939182639122,
-0.22458185255527496,
0.08793677389621735,
0.014992259442806244,
0.09722527861595154,
-0.18996810913085938,
0.3409692645072937,
-0.13026973605155945,
0.32650160789489746,
0.1314961314201355,
-0.09360093623399734,
0.49830448627471924,
0.15029074251651764,
0.2996501326560974,
0.008838489651679993,
0.04653684049844742,
0.22066569328308105,
0.0384427011013031,
0.3394763767719269,
-0.05813344568014145,
0.062176771461963654,
0.14494435489177704,
0.013527221977710724,
-0.3901437222957611,
0.025704842060804367,
-0.34121620655059814,
-0.5800713300704956,
-0.013262338005006313,
0.07562246173620224,
-0.06378095597028732,
-0.04763574153184891,
-0.2631256878376007,
0.12243151664733887,
-0.1780664324760437,
-0.23709788918495178,
0.20572924613952637,
0.1853693127632141,
0.08130231499671936,
0.054638538509607315,
0.22852042317390442,
0.5947345495223999,
-0.12425368279218674,
-0.23033463954925537,
0.024324648082256317,
0.0024976953864097595,
0.0850149542093277,
-0.040166329592466354,
-0.22681169211864471,
0.09720365703105927,
-0.19041553139686584,
0.703637421131134,
0.29431474208831787,
-0.7205708622932434,
-0.005391592159867287,
0.04982784390449524,
0.015295781195163727,
-0.2006373554468155,
0.09823161363601685,
-0.06499838083982468,
0.3917410671710968,
0.011174790561199188,
-0.1209428682923317,
0.1922517716884613,
-0.11272691935300827,
0.03449690341949463,
-0.08528812229633331,
-0.182090625166893,
-0.46763405203819275,
0.0002986043691635132,
-0.2523534595966339,
0.02638634666800499,
0.06999590992927551,
0.27614307403564453,
0.18170253932476044,
-0.1556130051612854,
0.3468243479728699,
0.2889132797718048,
0.29786765575408936,
0.11935897171497345,
0.07143250107765198,
-0.010465145111083984,
-0.44899672269821167,
0.1190386712551117,
0.2585357427597046,
-0.16622990369796753,
-0.10118480026721954,
-0.3215538263320923,
-0.38943010568618774,
-0.3655884861946106,
-0.19836510717868805,
-0.3211561441421509,
-0.04076581075787544,
0.023446179926395416,
-0.053288109600543976,
-0.07140343636274338,
-0.25209611654281616,
0.16526727378368378,
0.009675651788711548,
0.3742046654224396,
-0.11663137376308441,
0.248128280043602,
0.042714543640613556,
0.23360231518745422,
-0.1663004755973816,
0.04172767326235771,
-0.03574046492576599,
-0.3274952173233032,
0.242308109998703,
0.7822792530059814,
0.13261111080646515,
0.5109871029853821,
0.36549457907676697,
0.2349785715341568,
0.48181307315826416,
0.10115504264831543,
0.051091551780700684,
-0.15169177949428558,
-0.14264632761478424,
0.0930941179394722,
-0.5479763150215149,
0.3190452456474304,
-0.46942293643951416,
0.046267975121736526,
0.22633369266986847,
0.1797773838043213,
0.13400417566299438,
-0.1471061408519745,
-0.18720084428787231,
-0.5954815149307251,
0.03757698833942413,
-0.22069865465164185,
0.11925061047077179,
0.012427683919668198,
-0.08375893533229828,
0.16204681992530823,
0.15735918283462524,
-0.048544928431510925,
0.09330292046070099,
0.250122606754303,
-0.2721461057662964,
0.024104177951812744,
0.20479919016361237,
0.46727532148361206,
0.4115791916847229,
0.10964270681142807,
0.23927730321884155,
0.2653115689754486,
-0.08650517463684082,
-0.2779240608215332,
0.48170357942581177,
-0.008893553167581558,
0.07814764976501465,
0.3058798015117645,
0.028958968818187714,
-0.15973541140556335,
-0.2362356036901474,
-0.20370787382125854,
0.1008792445063591,
0.10915521532297134,
-0.1309622824192047,
0.12750697135925293,
-0.4569314122200012,
-0.10707145929336548,
-0.2537185549736023,
-0.3489172160625458,
-0.037317149341106415,
-0.34187379479408264,
0.2831711173057556,
0.12282654643058777,
-0.17488613724708557,
0.2078382521867752,
0.12807831168174744,
0.05908869951963425,
-0.14929130673408508,
-0.3590760827064514,
-0.1535697728395462,
0.04129180312156677,
0.08421763777732849,
-0.014912739396095276,
-0.13048021495342255,
0.28965240716934204,
0.042761512100696564,
-0.28675252199172974,
-0.08244062215089798,
-0.8189095854759216,
-0.036904625594615936,
0.32639360427856445,
0.2219398021697998,
0.3290746808052063,
0.48677441477775574,
0.2606654763221741,
0.08599346876144409,
-0.2811889052391052,
0.08481377363204956,
0.37822407484054565,
-0.09974096715450287,
-0.02808351069688797,
0.028010938316583633,
0.38434720039367676,
-0.2278980314731598,
-0.3783363401889801,
-0.13883835077285767,
-0.33395659923553467,
0.11854491382837296,
0.00990072637796402,
0.0014839693903923035,
0.1320810765028,
0.07229931652545929,
-0.032657891511917114,
-0.11875633150339127,
-0.2463333010673523,
0.032300952821969986,
-0.24845972657203674,
0.2628606855869293,
-0.3342870771884918,
0.130059614777565,
0.15215922892093658,
0.16760283708572388,
0.09053227305412292,
0.13482409715652466,
-0.22111089527606964,
-0.26152169704437256,
-0.04216206818819046,
0.11670207977294922,
-0.013424009084701538,
0.006892440840601921,
0.5189574360847473,
0.19893909990787506,
0.018088411539793015,
-0.06195884943008423,
-0.0892559215426445,
0.23635146021842957,
0.17291578650474548,
0.21643021702766418,
-0.0400468185544014,
0.038937438279390335,
0.23550185561180115,
0.4670705199241638,
-0.07965618371963501,
0.1473933756351471,
0.05290624499320984,
-0.5279660224914551,
0.23847225308418274,
-0.04167181998491287,
0.023755386471748352,
-0.1496041715145111,
-0.06437496840953827,
-0.03080645576119423,
0.3943527042865753,
0.25966644287109375,
0.26900714635849,
0.10621707141399384,
-0.2475266307592392,
-0.06386228650808334,
-0.5313288569450378,
0.08740700781345367,
-0.13406845927238464,
0.23152795433998108,
0.05045243352651596,
-0.07972423732280731,
0.1392352133989334,
-0.04696611687541008,
0.10973792523145676,
0.6075596809387207,
-0.07211308181285858,
0.1511818915605545,
-0.06947219371795654,
0.2507358491420746,
-0.4283883273601532,
0.15602000057697296,
-0.09139013290405273,
-0.315724641084671,
-0.07915621995925903,
-0.19327890872955322,
0.060176003724336624,
-0.07212433218955994,
0.661035418510437,
-0.11174089461565018,
-0.13900409638881683,
-0.07977069914340973,
-0.21026469767093658,
0.1023806780576706,
-0.05207487940788269,
-0.1930364966392517,
0.18949240446090698,
0.13316795229911804,
0.708533763885498,
-0.3380926847457886,
-0.2599657475948334,
0.10558579862117767,
-0.034674230962991714,
0.05045965313911438,
0.2321060448884964,
0.09983226656913757,
-0.4123949110507965,
-0.21314191818237305,
-0.1732572466135025,
-0.03793317452073097,
-0.0005335137248039246,
0.20567549765110016,
0.06030404567718506,
0.1776222437620163,
-0.0365959070622921,
0.17873409390449524,
0.07665155827999115,
0.2977384328842163,
-0.37830850481987,
-0.08331019431352615,
0.43870651721954346,
0.387616902589798,
0.8013381361961365,
0.03858328238129616,
-0.06608305871486664,
-0.12857824563980103,
0.06693349778652191,
-0.11496672034263611,
0.4075590968132019,
0.5270451307296753,
0.058049287647008896,
0.3059636056423187,
-0.07535161823034286,
-0.1494559347629547,
-0.20797279477119446,
0.22359171509742737,
0.346493124961853,
0.0953516960144043,
-0.18740493059158325,
-0.21222645044326782,
0.33415111899375916,
0.19140960276126862,
-0.12813733518123627,
0.39913398027420044,
0.2924734950065613,
-0.5233151912689209,
-0.1368257999420166,
0.18769846856594086,
0.818301796913147,
-0.0021991170942783356,
0.3384094834327698,
0.127936452627182,
-0.17147764563560486,
0.161000594496727,
-0.583098292350769,
0.16154271364212036,
-0.24957668781280518,
0.08608939498662949,
-0.22440218925476074,
-0.16038843989372253,
0.4025702178478241,
0.11695295572280884,
-0.420534610748291,
0.19030547142028809,
-0.3310315012931824,
0.34859800338745117,
-0.40736812353134155,
-0.14972594380378723,
-0.6283941864967346,
-0.1818772703409195,
0.07551993429660797,
-0.018748333677649498,
0.25549155473709106,
0.07845310866832733,
-0.013709008693695068,
-0.0010079406201839447,
-0.22279667854309082,
-0.06683120876550674,
-0.48408517241477966,
-0.4781372547149658,
-0.1802118867635727,
-0.059742800891399384,
0.1414651721715927,
-0.3194965124130249,
0.041712500154972076,
0.3676939606666565,
0.184881791472435,
-0.02611904963850975,
-0.29122355580329895,
0.24775223433971405,
-0.2537621855735779,
-0.05406651645898819,
-0.05576539784669876,
-0.16473135352134705,
0.017647242173552513,
0.0432383194565773,
-0.08499645441770554,
-0.13275572657585144,
-0.10174933820962906,
-0.200312539935112,
-0.2223912924528122,
-0.08720533549785614,
-0.070877805352211,
-0.5074385404586792,
-0.24234701693058014,
-0.12681502103805542,
-0.03434593975543976,
-0.37097257375717163,
-0.005133370868861675,
-0.2866237461566925,
0.04166019707918167,
-0.0495246946811676,
-0.054206036031246185,
-0.10119159519672394,
-0.2128814160823822,
0.13267582654953003,
-0.37459123134613037,
-0.12000449746847153,
0.3676696717739105,
-0.23770233988761902,
-0.05231727659702301,
-0.2173823118209839,
0.42400631308555603,
0.26061826944351196,
-0.2117622196674347,
0.15565040707588196,
0.05121629685163498,
-0.17418763041496277,
0.23056040704250336,
0.2486838698387146,
0.2423296570777893,
0.12104152143001556,
-0.3507893681526184,
-0.40898922085762024,
-0.003020554780960083,
0.40862128138542175,
-0.04356654733419418,
0.18607167899608612,
-0.34310469031333923,
0.13781417906284332,
-0.23376867175102234,
-0.20467454195022583,
-0.1896931231021881,
0.4232683479785919,
-0.11493849754333496,
0.10023252665996552,
0.28360772132873535,
0.3598446249961853,
0.3095914125442505,
-0.07220733910799026,
-0.03768123686313629,
-0.22838656604290009,
0.04618317261338234,
-0.06849997490644455,
-0.3264971673488617,
0.18512363731861115,
-0.2904362380504608,
0.07716657221317291,
0.33875131607055664,
0.12918847799301147,
-0.21077673137187958,
-0.2539485991001129,
0.1978435516357422,
0.23542872071266174,
-0.012793350964784622,
0.1273108720779419,
0.12805774807929993,
-0.2614273726940155,
-0.3810001015663147,
-0.31217554211616516,
0.19407400488853455,
0.20548570156097412,
-0.22325611114501953,
0.18509802222251892,
-0.5386332869529724,
-0.13368667662143707,
-0.0042132847011089325,
0.45355919003486633,
0.40183961391448975,
-0.12515486776828766,
0.10687237977981567,
0.34522056579589844,
0.2477446347475052,
0.11687591671943665,
0.6300196051597595,
0.17267343401908875,
-0.0008332282304763794,
0.1717100441455841,
0.1588670015335083,
0.09080864489078522,
-0.10085372626781464,
-0.31677311658859253,
0.1728321760892868,
-0.3114766776561737,
0.16447457671165466,
0.30411362648010254,
0.400104284286499,
0.09859926998615265,
-0.028067033737897873,
-0.09919100999832153,
0.3875187933444977,
-0.2633410394191742,
0.29691457748413086,
0.7590733766555786,
-0.370705246925354,
0.2513316869735718,
0.280171662569046,
0.1889207512140274,
0.568100094795227,
0.5256155133247375,
-0.061205118894577026,
0.15747787058353424,
0.032934218645095825,
-0.007102189585566521,
-0.12717439234256744,
-0.4207005202770233,
0.019478360190987587,
0.01540287584066391,
0.0498967170715332,
-0.10178396105766296,
-0.014447033405303955,
0.5567613840103149,
-0.18637748062610626,
0.23371517658233643,
0.11186963319778442,
0.21935409307479858,
0.04068576917052269,
-0.30335888266563416,
0.23431330919265747,
-0.38932108879089355,
-0.09098272025585175,
-0.05721939727663994,
-0.13273991644382477,
-0.19403427839279175,
0.34725046157836914,
-0.17895565927028656,
0.21965181827545166,
-0.08226712048053741,
0.6928899884223938,
-0.2912473678588867,
0.1927458643913269,
-0.10612236708402634,
-0.12133147567510605,
-0.12888014316558838,
-0.18439911305904388,
0.17763812839984894,
0.3350032866001129,
0.2994871437549591,
0.010445917025208473,
0.21681267023086548,
0.07599323242902756,
-0.415545254945755,
-0.08791732043027878,
0.16363003849983215,
-0.1226491704583168,
0.25393590331077576,
-0.3838382959365845,
-0.05837646499276161,
0.09141457825899124,
-0.08735033124685287,
0.07297826558351517,
0.2462700605392456,
-0.08224660903215408,
-0.1246994137763977,
0.053244732320308685,
0.2169896960258484,
-0.11128993332386017,
0.1491207480430603,
-0.07384797930717468,
-0.15820251405239105,
-0.3729400038719177,
0.38374775648117065,
0.10691430419683456,
0.21954259276390076,
0.2963602542877197,
0.01872565969824791,
0.3594815731048584,
0.24587808549404144,
-0.0901084840297699,
-0.43583086133003235,
-0.03401187062263489,
-0.2421802282333374,
-0.3909038305282593,
-0.2366829216480255,
-0.044946521520614624,
-0.3582873046398163,
-0.10796419531106949,
-0.18778352439403534,
0.06838004291057587,
-0.10767628252506256,
0.03743424639105797,
-0.030984336510300636,
0.27297264337539673,
0.0579177588224411,
-0.07111148536205292,
-0.0887710303068161,
0.09400597214698792,
0.12006042152643204,
0.08279598504304886,
-0.2518688142299652,
0.15219560265541077,
0.13621404767036438,
-0.17792430520057678,
0.11757020652294159,
0.3637777268886566,
0.28220653533935547,
-0.021486444398760796,
-0.17996065318584442,
-0.04642874747514725,
0.22076451778411865,
-0.3198099732398987,
0.03168974071741104,
-0.08407413959503174,
-0.25243324041366577,
-0.2372661530971527,
0.03816521167755127,
-0.009074577130377293,
-0.16330018639564514,
-0.335627019405365,
-0.5731877684593201,
-0.21920092403888702,
0.15925593674182892,
0.30671074986457825,
-0.09336937963962555,
-0.4195077419281006,
0.12834817171096802,
-0.13372120261192322,
-0.028187021613121033,
0.4535829424858093,
0.5473644733428955,
-0.24498295783996582,
-0.21540135145187378,
-0.23657222092151642,
-0.3919028043746948,
0.38585618138313293,
0.05000248923897743,
-0.15908917784690857,
-0.09339092671871185,
0.15691831707954407,
0.4403911530971527,
0.005593249574303627,
-0.29038718342781067,
-0.1261390596628189,
0.2395915687084198,
-0.04182828962802887,
-0.3284205198287964,
0.21559622883796692,
0.17806069552898407,
-0.23512448370456696,
-0.10627033561468124,
0.4551457464694977,
0.3536151945590973,
-0.3553655445575714,
-0.18642929196357727,
-0.2281600832939148
] |
https://github.com/huggingface/datasets/issues/6559 | Hi ! The "allenai--c4" config doesn't exist (this naming schema comes from old versions of `datasets`)
You can load it this way instead:
```python
from datasets import load_dataset
cache_dir = 'path/to/your/cache/directory'
dataset = load_dataset('allenai/c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', cache_dir=cache_dir)
``` | Latest version 2.16.1, when load dataset error occurs. ValueError: BuilderConfig 'allenai--c4' not found. Available: ['default'] | ### Describe the bug
python script is:
```
from datasets import load_dataset
cache_dir = 'path/to/your/cache/directory'
dataset = load_dataset('allenai/c4','allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', use_auth_token=False, cache_dir=cache_dir)
```
the script success when datasets version is 2.14.7.
when using 2.16.1, error occurs
`
ValueError: BuilderConfig 'allenai--c4' not found. Available: ['default']`
### Steps to reproduce the bug
1. pip install datasets==2.16.1
2. run python script:
```
from datasets import load_dataset
cache_dir = 'path/to/your/cache/directory'
dataset = load_dataset('allenai/c4','allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', use_auth_token=False, cache_dir=cache_dir)
```
### Expected behavior
the dataset should be loaded successful in the latest version.
### Environment info
datasets 2.16.1 | 39 | Latest version 2.16.1, when load dataset error occurs. ValueError: BuilderConfig 'allenai--c4' not found. Available: ['default']
### Describe the bug
python script is:
```
from datasets import load_dataset
cache_dir = 'path/to/your/cache/directory'
dataset = load_dataset('allenai/c4','allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', use_auth_token=False, cache_dir=cache_dir)
```
the script success when datasets version is 2.14.7.
when using 2.16.1, error occurs
`
ValueError: BuilderConfig 'allenai--c4' not found. Available: ['default']`
### Steps to reproduce the bug
1. pip install datasets==2.16.1
2. run python script:
```
from datasets import load_dataset
cache_dir = 'path/to/your/cache/directory'
dataset = load_dataset('allenai/c4','allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', use_auth_token=False, cache_dir=cache_dir)
```
### Expected behavior
the dataset should be loaded successful in the latest version.
### Environment info
datasets 2.16.1
Hi ! The "allenai--c4" config doesn't exist (this naming schema comes from old versions of `datasets`)
You can load it this way instead:
```python
from datasets import load_dataset
cache_dir = 'path/to/your/cache/directory'
dataset = load_dataset('allenai/c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', cache_dir=cache_dir)
``` | [
-0.5463299751281738,
0.45560142397880554,
-0.02869529463350773,
0.3143913149833679,
0.14552779495716095,
0.10748502612113953,
0.31146010756492615,
0.3529205918312073,
0.18226969242095947,
0.20120511949062347,
0.2688750624656677,
0.6102460026741028,
-0.1364494264125824,
-0.1731400191783905,
0.11724627017974854,
-0.0399254709482193,
0.00852346420288086,
0.26021966338157654,
-0.105255126953125,
0.06138451397418976,
-0.14034518599510193,
0.13015589118003845,
-0.14244931936264038,
0.1762811690568924,
-0.12548726797103882,
0.2405027151107788,
0.07741060853004456,
0.08724317699670792,
-0.0011249817907810211,
-0.9123345613479614,
0.7024981379508972,
0.053494010120630264,
0.34641826152801514,
0.133513405919075,
-0.00011950386397074908,
0.08711649477481842,
0.5989266037940979,
0.08155187964439392,
-0.13671386241912842,
-0.4299573600292206,
-0.6319840550422668,
-0.10744764655828476,
0.1479998677968979,
-0.12218619138002396,
-0.16579414904117584,
-0.3420923352241516,
0.029665717855095863,
-0.43976545333862305,
0.05908055603504181,
0.31040066480636597,
0.16669702529907227,
0.04816362261772156,
0.4501621723175049,
-0.2563706636428833,
0.055978450924158096,
-0.37893593311309814,
0.11294610053300858,
0.11427032947540283,
0.026173114776611328,
-0.07555592060089111,
0.07541374117136002,
0.05913388356566429,
-0.0504767931997776,
-0.0032686851918697357,
0.33579638600349426,
-0.18534967303276062,
0.2822677791118622,
-0.2917852997779846,
0.4068329930305481,
0.19744816422462463,
0.5064378976821899,
-0.37036722898483276,
-0.4311293959617615,
-0.05505456030368805,
0.04654870182275772,
-0.08683101087808609,
0.4102816581726074,
0.1531432569026947,
0.0782502219080925,
0.21156422793865204,
-0.0963621437549591,
-0.1367008090019226,
-0.1546357274055481,
0.31515881419181824,
-0.02877223491668701,
0.38643231987953186,
-0.08240263909101486,
0.23916077613830566,
0.14602386951446533,
-0.17738234996795654,
0.24514974653720856,
-0.41811978816986084,
-0.14675328135490417,
0.43385908007621765,
-0.3310922086238861,
0.08941137045621872,
0.019363898783922195,
0.26276451349258423,
0.16467992961406708,
0.14637541770935059,
-0.3008963167667389,
-0.10538350045681,
0.1413150578737259,
0.1201886236667633,
0.24539943039417267,
0.30404141545295715,
0.2057608664035797,
-0.04725704342126846,
0.2036987543106079,
0.2144034504890442,
0.11018628627061844,
-0.02874526008963585,
-0.2217397689819336,
-0.35698866844177246,
0.22049438953399658,
-0.0002851709723472595,
0.13993459939956665,
-0.15315380692481995,
-0.2671148180961609,
-0.026363186538219452,
-0.1602000594139099,
-0.14099951088428497,
0.17360174655914307,
0.25799113512039185,
-0.27370452880859375,
0.21689529716968536,
-0.020845428109169006,
0.27403494715690613,
-0.05874873325228691,
-0.061117835342884064,
-0.1184120923280716,
-0.1003521978855133,
0.049537450075149536,
-0.1836107075214386,
0.22194914519786835,
-0.472442626953125,
0.3638575077056885,
0.16496580839157104,
-0.11842520534992218,
-0.1542530059814453,
-0.024152055382728577,
0.13723912835121155,
-0.06323486566543579,
0.3206787407398224,
0.05899765342473984,
0.09162766486406326,
-0.09136352688074112,
-0.4600849747657776,
-0.3284451365470886,
0.32552477717399597,
-0.137989804148674,
-0.35914379358291626,
-0.039589449763298035,
0.11175232380628586,
-0.10048393905162811,
-0.010581139475107193,
-0.19972777366638184,
-0.11308293044567108,
0.24102336168289185,
0.05361931771039963,
-0.206069678068161,
-0.24130971729755402,
0.0028931275010108948,
-0.21116100251674652,
0.23699533939361572,
0.35804909467697144,
-0.3262174725532532,
-0.0931287631392479,
-0.34979620575904846,
-0.06627115607261658,
-0.08210653066635132,
-0.08196798712015152,
-0.2784924805164337,
0.2790924906730652,
-0.12494047731161118,
-0.21363207697868347,
0.315903902053833,
-0.49190303683280945,
-0.6164343357086182,
0.2512681782245636,
0.19651292264461517,
0.06529214233160019,
0.05873037502169609,
0.043293558061122894,
-0.036069970577955246,
0.03663437068462372,
0.10533973574638367,
0.10111100971698761,
-0.031061649322509766,
0.04552420973777771,
-0.035851217806339264,
-0.5205765962600708,
0.14099285006523132,
0.24434226751327515,
0.026437079533934593,
0.18484196066856384,
0.015304390341043472,
-0.26933717727661133,
0.22160251438617706,
0.05752095580101013,
0.013584043830633163,
0.03284676745533943,
0.21708646416664124,
-0.17814259231090546,
0.10168315470218658,
0.06299877911806107,
-0.4160427153110504,
0.38677293062210083,
0.21173825860023499,
-0.2167956829071045,
-0.08129771053791046,
-0.07284983992576599,
-0.07913944125175476,
0.1253761649131775,
-0.4947209656238556,
0.0027960725128650665,
-0.0131492018699646,
0.07023593783378601,
0.31306788325309753,
-0.13946345448493958,
-0.2020784318447113,
0.27807509899139404,
-0.20842966437339783,
0.05238667502999306,
-0.3886967599391937,
0.1991330087184906,
-0.07430446147918701,
0.023283258080482483,
0.04306420683860779,
0.15466497838497162,
0.0068297116085886955,
-0.12009885907173157,
-0.19490915536880493,
0.4596441984176636,
-0.004951294511556625,
0.26225894689559937,
-0.24930256605148315,
0.379500150680542,
0.03360208123922348,
-0.3588641285896301,
0.2655513882637024,
0.3278127908706665,
-0.07750425487756729,
0.09790615737438202,
0.13302236795425415,
0.2856747806072235,
0.536408543586731,
0.25958141684532166,
0.20133116841316223,
0.11275957524776459,
0.2918424904346466,
-0.11312898993492126,
0.07283956557512283,
-0.3825521171092987,
0.012249117717146873,
-0.35645946860313416,
0.6501836776733398,
-0.08579732477664948,
-0.14877215027809143,
-0.005808129906654358,
0.31130334734916687,
0.08481694757938385,
0.018531927838921547,
0.03313774988055229,
-0.1663755476474762,
0.1099851131439209,
0.13450156152248383,
0.35825279355049133,
0.3666505217552185,
0.216471865773201,
-0.4004799425601959,
0.09441238641738892,
-0.1425095498561859,
-0.00870329886674881,
0.3559110760688782,
0.007839037105441093,
0.09230190515518188,
0.009563308209180832,
0.07084684073925018,
0.002760123461484909,
-0.22191406786441803,
0.004011049866676331,
-0.30212634801864624,
0.30278563499450684,
-0.27717435359954834,
0.01815040409564972,
-0.3337356448173523,
-0.029688958078622818,
-0.3194599747657776,
-0.05945062264800072,
-0.018307017162442207,
-0.06759386509656906,
-0.22563745081424713,
0.16272307932376862,
0.004871197044849396,
0.34144216775894165,
-0.2645763158798218,
0.1159203052520752,
-0.07621884346008301,
-0.056513529270887375,
-0.16859444975852966,
-0.020760202780365944,
-0.38694533705711365,
-0.06781382858753204,
0.414737731218338,
-0.45650389790534973,
0.014379831030964851,
-0.30987846851348877,
0.0686647891998291,
-0.2732125222682953,
-0.3598116636276245,
0.08678699284791946,
0.14583277702331543,
0.5064560174942017,
0.30113425850868225,
-0.2526991367340088,
0.4480394124984741,
-0.13795256614685059,
0.1883566826581955,
-0.20262938737869263,
-0.06659717112779617,
0.08212758600711823,
-0.18850329518318176,
-0.3141675889492035,
0.03495146334171295,
-0.5985116362571716,
-0.18253788352012634,
-0.19698315858840942,
0.0038179391995072365,
0.23642930388450623,
0.18697279691696167,
0.060373175889253616,
0.26109403371810913,
-0.05894649401307106,
0.11327850818634033,
0.013130679726600647,
-0.057548873126506805,
-0.24613194167613983,
0.15521305799484253,
-0.3103761374950409,
-0.2210741490125656,
0.010855846107006073,
-0.10958770662546158,
0.5900669693946838,
-0.2313528209924698,
-0.3932517468929291,
0.553723931312561,
-0.4084431231021881,
0.4184296429157257,
-0.10930874198675156,
0.0015005972236394882,
0.20534518361091614,
0.2513319253921509,
0.08870676904916763,
-0.19383352994918823,
-0.2192765474319458,
0.18175509572029114,
-0.12788806855678558,
0.18955419957637787,
0.28221040964126587,
0.6199339628219604,
-0.15986362099647522,
0.2654420733451843,
0.27800703048706055,
-0.3997049331665039,
0.1635199785232544,
-0.296024352312088,
0.21042905747890472,
-0.29945510625839233,
-0.27341175079345703,
0.009256511926651001,
0.3314577341079712,
0.19611181318759918,
0.06286182999610901,
0.06941327452659607,
-0.4879733920097351,
-0.1097201406955719,
0.005558095872402191,
-0.15713590383529663,
-0.03157859295606613,
-0.1366044580936432,
-0.031060339882969856,
0.23350149393081665,
0.2327941209077835,
0.12789002060890198,
-0.09946583211421967,
-0.20215746760368347,
0.059748195111751556,
0.24966254830360413,
0.0959550142288208,
0.07525406777858734,
-0.25013458728790283,
-0.33727744221687317,
-0.32460343837738037,
0.21255630254745483,
0.07172854244709015,
0.32309490442276,
0.11404973268508911,
-0.03529532626271248,
-0.02307264506816864,
-0.1088344156742096,
0.4207785725593567,
-0.24222715198993683,
0.11021621525287628,
0.2631329596042633,
0.3638056218624115,
-0.5122686624526978,
-0.15421387553215027,
0.13012008368968964,
0.4722495675086975,
0.022895444184541702,
0.3400028347969055,
-0.0966564416885376,
-0.3198975920677185,
0.19625209271907806,
0.34116294980049133,
-0.11696498095989227,
-0.2889742851257324,
-0.2243371605873108,
-0.026575133204460144,
-0.2035215049982071,
-0.05082004517316818,
-0.3736855685710907,
0.21501599252223969,
-0.12259643524885178,
-0.19652900099754333,
-0.028502071276307106,
-0.1685675084590912,
-0.12871132791042328,
0.27701976895332336,
0.3493223190307617,
-0.1390121728181839,
0.3365222215652466,
0.1496501863002777,
-0.3185425400733948,
0.428390771150589,
0.3086414635181427,
0.13881704211235046,
0.044075142592191696,
0.05201643705368042,
0.07569175958633423,
0.1563243269920349,
0.006952524185180664,
-0.357501745223999,
-0.09771542251110077,
0.03930843994021416,
0.07909870892763138,
-0.18426266312599182,
-0.3556329607963562,
0.3112322688102722,
0.026728622615337372,
-0.2487354576587677,
-0.5672733187675476,
0.506644606590271,
-0.05143284797668457,
-0.054675303399562836,
0.34242376685142517,
0.06421762704849243,
-0.36916452646255493,
0.1577913910150528,
-0.054676808416843414,
0.6233932971954346,
0.2922585904598236,
-0.011355381458997726,
0.14099663496017456,
-0.20958146452903748,
0.1380777359008789,
-0.055310558527708054,
0.012052178382873535,
-0.4965886175632477,
0.3603544533252716,
0.0001211017370223999,
-0.1669188141822815,
0.23644793033599854,
0.36333128809928894,
-0.18481382727622986,
0.29509198665618896,
-0.24368885159492493,
0.2795589864253998,
0.11593719571828842,
0.3571641147136688,
-0.3675394356250763,
-0.10902448743581772,
-0.3535621464252472,
0.07756324112415314,
0.21637758612632751,
0.08242058753967285,
-0.12424860894680023,
0.10190554708242416,
0.13711656630039215,
-0.28161996603012085,
-0.2793905735015869,
0.2603493928909302,
-0.34069228172302246,
0.3706616461277008,
0.32565850019454956,
0.05112117528915405,
0.2548433542251587,
0.15136964619159698,
0.26964735984802246,
0.18159767985343933,
-0.1457245796918869,
0.2885165810585022,
0.02024923451244831,
0.1669619381427765,
0.27592602372169495,
0.10015566647052765,
0.12411189824342728,
-0.13684675097465515,
-0.2836025059223175,
-0.027159646153450012,
-0.2281113564968109,
-0.3124064803123474,
-0.07251937687397003,
-0.1515006572008133,
-0.020387930795550346,
0.01836787909269333,
-0.28237828612327576,
0.06023603677749634,
0.10073193907737732,
-0.22365766763687134,
0.13736563920974731,
0.048158712685108185,
0.0013068169355392456,
0.2778072953224182,
-0.19962206482887268,
-0.2754775285720825,
-0.03379435837268829,
0.41842198371887207,
0.011691272258758545,
0.2674396336078644,
0.36475634574890137,
-0.12944228947162628,
-0.008923381567001343,
-0.14969830214977264,
-0.10298319160938263,
0.4134671092033386,
-0.33051779866218567,
-0.21533706784248352,
-0.16607660055160522,
0.23807696998119354,
0.058992184698581696,
0.03308181092143059,
-0.024131888523697853,
0.01919614151120186,
-0.03666030243039131,
-0.3586825430393219,
-0.2598668038845062,
0.1669587790966034,
0.11067402362823486,
0.10484825074672699,
-0.09859266877174377,
0.011863615363836288,
-0.04960248991847038,
-0.08717023581266403,
-0.21732810139656067,
0.07093878835439682,
0.10522717237472534,
-0.014421453699469566,
0.07568550854921341,
0.4327647387981415,
0.2147168666124344,
-0.05652425065636635,
0.09983000159263611,
-0.30642151832580566,
-0.2665519416332245,
-0.17695927619934082,
-0.1327914595603943,
0.12921787798404694,
0.10655541718006134,
-0.16812807321548462,
0.059293441474437714,
-0.23756635189056396,
-0.19406430423259735,
-0.04834693670272827,
0.3385898172855377,
-0.07061386853456497,
-0.16396556794643402,
0.16422434151172638,
-0.05449957773089409,
0.003502827137708664,
-0.11195626854896545,
0.0861436128616333,
-0.15354594588279724,
0.033389441668987274,
0.16106021404266357,
0.2923247218132019,
-0.19053776562213898,
-0.09741685539484024,
0.2409788966178894,
0.016056574881076813,
-0.4371992349624634,
0.21859198808670044,
0.33480748534202576,
-0.40327954292297363,
0.19211915135383606,
0.33574774861335754,
0.022936761379241943,
0.25254231691360474,
-0.17859363555908203,
0.11885643005371094,
-0.011655021458864212,
0.17843198776245117,
-0.2596857249736786,
-0.1999569535255432,
0.09469839930534363,
0.19057607650756836,
-0.042811959981918335,
0.07024767994880676,
0.3682830333709717,
-0.2722034156322479,
0.4254617393016815,
0.11919766664505005,
0.5913458466529846,
-0.4476856291294098,
0.33151599764823914,
0.48426854610443115,
0.018401212990283966,
0.17318667471408844,
0.14238658547401428,
-0.018615569919347763,
0.11124449968338013,
0.5831784009933472,
-0.2099146842956543,
0.3538113236427307,
0.34176841378211975,
0.06630757451057434,
0.10848347097635269,
-0.5007622241973877,
-0.19096022844314575,
0.0991702452301979,
-0.27267393469810486,
-0.0716906413435936,
0.1405499279499054,
0.5852586627006531,
0.016382772475481033,
0.00824321061372757,
-0.19841250777244568,
-0.13248808681964874,
-0.11226322501897812,
-0.2674236595630646,
-0.39643990993499756,
-0.2307009994983673,
-0.05950541794300079,
-0.022204257547855377,
-0.0065944259986281395,
-0.07913791388273239,
0.1589357554912567,
0.09514661133289337,
-0.31298384070396423,
-0.5028505921363831,
-0.06320102512836456,
0.18607550859451294,
0.0971364676952362,
-0.1863015592098236,
0.5465003252029419,
0.13591763377189636,
-0.1986514776945114,
-0.15701334178447723,
0.37887105345726013,
0.6286959648132324,
0.29505491256713867,
0.16708999872207642,
0.04489302262663841,
0.037774741649627686,
-0.1629420518875122,
-0.06902559101581573,
0.21429088711738586,
-0.005715318024158478,
0.01137540489435196,
-0.007083192467689514,
0.14036428928375244,
-0.0031360238790512085,
0.038952261209487915,
0.08134785294532776,
0.3594915568828583,
-0.2639881670475006,
0.08951546996831894,
-0.030568765476346016,
-0.09914480149745941,
0.012350356206297874,
0.23958952724933624,
-0.27959999442100525,
0.008080963045358658,
0.5690683722496033,
0.11626124382019043,
-0.05232292041182518,
-0.27575626969337463,
0.05944009870290756,
0.062051258981227875,
0.2529090642929077,
0.07627631723880768,
0.12308283895254135,
-0.12654924392700195,
-0.43908923864364624,
-0.44980382919311523,
0.04387088119983673,
-0.0626455768942833,
0.37757405638694763,
0.06144622713327408,
0.05800043046474457,
-0.25734519958496094,
-0.13680580258369446,
0.2958293557167053,
-0.294672429561615,
0.3593588173389435,
0.010507470928132534,
-0.1503610461950302,
-0.0777180939912796,
0.17004865407943726,
0.08157654106616974,
-0.03805870562791824,
-0.43525248765945435,
0.0018540285527706146,
-0.1684902012348175,
-0.02689170464873314,
-0.12386399507522583,
0.1648191511631012,
0.2501228153705597,
-0.19233135879039764,
0.7216295599937439,
-0.051530517637729645,
0.38248372077941895,
0.0190107598900795,
-0.004916295409202576,
-0.5478551387786865,
-0.14153867959976196,
-0.28836163878440857,
0.03413405641913414,
-0.13805927336215973,
0.4046896696090698,
-0.19984707236289978,
-0.05946141481399536,
-0.4027487337589264,
-0.021302344277501106,
0.0634816437959671,
0.008824720978736877,
-0.211572527885437,
0.14578457176685333,
-0.37047117948532104,
0.2484513819217682,
-0.017952468246221542,
0.06802017241716385,
0.06952137500047684,
0.15072402358055115,
-0.22540083527565002,
-0.24281354248523712,
0.33108994364738464,
-0.37912648916244507,
-0.17609360814094543,
-0.20984168350696564,
0.1250392198562622,
0.03774610161781311,
-0.35893964767456055,
-0.17842383682727814,
0.16050280630588531,
0.42853623628616333,
-0.069597989320755,
-0.02340264990925789,
0.1370771825313568,
-0.027852416038513184,
0.3997366726398468,
-0.008088141679763794,
0.3287685215473175,
0.07584746181964874,
-0.2580204904079437,
-0.13204042613506317,
-0.44489216804504395
] |
https://github.com/huggingface/datasets/issues/6559 | > Hi ! The "allenai--c4" config doesn't exist (this naming schema comes from old versions of `datasets`)
>
> You can load it this way instead:
>
> ```python
> from datasets import load_dataset
> cache_dir = 'path/to/your/cache/directory'
> dataset = load_dataset('allenai/c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', cache_dir=cache_dir)
> ```
thanks, the command run successfully in the latest version
| Latest version 2.16.1, when load dataset error occurs. ValueError: BuilderConfig 'allenai--c4' not found. Available: ['default'] | ### Describe the bug
python script is:
```
from datasets import load_dataset
cache_dir = 'path/to/your/cache/directory'
dataset = load_dataset('allenai/c4','allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', use_auth_token=False, cache_dir=cache_dir)
```
the script success when datasets version is 2.14.7.
when using 2.16.1, error occurs
`
ValueError: BuilderConfig 'allenai--c4' not found. Available: ['default']`
### Steps to reproduce the bug
1. pip install datasets==2.16.1
2. run python script:
```
from datasets import load_dataset
cache_dir = 'path/to/your/cache/directory'
dataset = load_dataset('allenai/c4','allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', use_auth_token=False, cache_dir=cache_dir)
```
### Expected behavior
the dataset should be loaded successful in the latest version.
### Environment info
datasets 2.16.1 | 57 | Latest version 2.16.1, when load dataset error occurs. ValueError: BuilderConfig 'allenai--c4' not found. Available: ['default']
### Describe the bug
python script is:
```
from datasets import load_dataset
cache_dir = 'path/to/your/cache/directory'
dataset = load_dataset('allenai/c4','allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', use_auth_token=False, cache_dir=cache_dir)
```
the script success when datasets version is 2.14.7.
when using 2.16.1, error occurs
`
ValueError: BuilderConfig 'allenai--c4' not found. Available: ['default']`
### Steps to reproduce the bug
1. pip install datasets==2.16.1
2. run python script:
```
from datasets import load_dataset
cache_dir = 'path/to/your/cache/directory'
dataset = load_dataset('allenai/c4','allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', use_auth_token=False, cache_dir=cache_dir)
```
### Expected behavior
the dataset should be loaded successful in the latest version.
### Environment info
datasets 2.16.1
> Hi ! The "allenai--c4" config doesn't exist (this naming schema comes from old versions of `datasets`)
>
> You can load it this way instead:
>
> ```python
> from datasets import load_dataset
> cache_dir = 'path/to/your/cache/directory'
> dataset = load_dataset('allenai/c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train', cache_dir=cache_dir)
> ```
thanks, the command run successfully in the latest version
| [
-0.5519501566886902,
0.45018383860588074,
-0.026410909369587898,
0.3139788806438446,
0.1435113549232483,
0.11366935074329376,
0.30293846130371094,
0.3482833206653595,
0.18301022052764893,
0.20341356098651886,
0.2682672142982483,
0.6109302043914795,
-0.1382366269826889,
-0.18821798264980316,
0.11031605303287506,
-0.027079511433839798,
0.00929904356598854,
0.2613934278488159,
-0.0997604951262474,
0.06627332419157028,
-0.14445051550865173,
0.1323283463716507,
-0.1418667882680893,
0.17361074686050415,
-0.11985510587692261,
0.23782499134540558,
0.08115261048078537,
0.08260470628738403,
-0.0005226917564868927,
-0.9180573225021362,
0.7041401863098145,
0.05873056501150131,
0.3444885313510895,
0.12599390745162964,
-0.00011957572860410437,
0.08957242965698242,
0.6077934503555298,
0.08578485995531082,
-0.1502121388912201,
-0.42301124334335327,
-0.6331298351287842,
-0.10478124022483826,
0.14363233745098114,
-0.12254130840301514,
-0.1642652153968811,
-0.3475658595561981,
0.04361271113157272,
-0.44414830207824707,
0.04658782482147217,
0.30610477924346924,
0.16472069919109344,
0.04559721797704697,
0.45416343212127686,
-0.2587413191795349,
0.05348202586174011,
-0.37899163365364075,
0.11415136605501175,
0.1263001263141632,
0.023874621838331223,
-0.06893309950828552,
0.06785792112350464,
0.06131506338715553,
-0.05104082450270653,
0.006350472569465637,
0.33986711502075195,
-0.17827773094177246,
0.2837359309196472,
-0.2779805362224579,
0.41550835967063904,
0.1973595917224884,
0.520074725151062,
-0.37259402871131897,
-0.4310542941093445,
-0.05220850557088852,
0.04845253750681877,
-0.08953038603067398,
0.41031891107559204,
0.14551126956939697,
0.08509846031665802,
0.20898185670375824,
-0.09041363000869751,
-0.1366402804851532,
-0.14948412775993347,
0.3132553696632385,
-0.024108685553073883,
0.37382936477661133,
-0.0855988934636116,
0.2364196479320526,
0.14005787670612335,
-0.1836244761943817,
0.24355988204479218,
-0.4250960648059845,
-0.1579289734363556,
0.4292735755443573,
-0.3246186375617981,
0.09461373090744019,
0.020792676135897636,
0.2663404941558838,
0.16815194487571716,
0.1443912237882614,
-0.2931591868400574,
-0.10439254343509674,
0.13908779621124268,
0.11990801244974136,
0.2239690124988556,
0.29774007201194763,
0.20617428421974182,
-0.06110752373933792,
0.20617656409740448,
0.21776142716407776,
0.11297150701284409,
-0.027994204312562943,
-0.2217940390110016,
-0.35534995794296265,
0.23053835332393646,
-0.0010169558227062225,
0.13954055309295654,
-0.15088658034801483,
-0.26344364881515503,
-0.02005605772137642,
-0.15696728229522705,
-0.13881373405456543,
0.17414253950119019,
0.2640623152256012,
-0.2719590663909912,
0.2087956815958023,
-0.022396020591259003,
0.272776335477829,
-0.052329182624816895,
-0.0627083107829094,
-0.11834672093391418,
-0.11357675492763519,
0.05406776815652847,
-0.180753692984581,
0.2208511233329773,
-0.4702296853065491,
0.3662388026714325,
0.16158540546894073,
-0.11312706768512726,
-0.148365318775177,
-0.02427370846271515,
0.13061869144439697,
-0.065204918384552,
0.31618112325668335,
0.05138140916824341,
0.09402014315128326,
-0.09469407796859741,
-0.4602809548377991,
-0.32591021060943604,
0.32246720790863037,
-0.13331535458564758,
-0.3634772002696991,
-0.03631006181240082,
0.10967826843261719,
-0.09638842195272446,
-0.011424927040934563,
-0.1938628852367401,
-0.1147291511297226,
0.24415914714336395,
0.050469160079956055,
-0.20480108261108398,
-0.2419590801000595,
-0.0038479194045066833,
-0.21539711952209473,
0.23418837785720825,
0.3704008460044861,
-0.31735339760780334,
-0.09599921852350235,
-0.351178377866745,
-0.057769764214754105,
-0.08938141912221909,
-0.08914391696453094,
-0.2830830514431,
0.27426403760910034,
-0.12656430900096893,
-0.22069498896598816,
0.31316283345222473,
-0.4852875769138336,
-0.624545156955719,
0.25195789337158203,
0.20020726323127747,
0.06319915503263474,
0.06391032040119171,
0.045028552412986755,
-0.04490245133638382,
0.03377889096736908,
0.10574106127023697,
0.08971112966537476,
-0.028051339089870453,
0.04544001817703247,
-0.03449888527393341,
-0.5167565941810608,
0.1476096361875534,
0.2410755753517151,
0.028294259682297707,
0.18626712262630463,
0.016635235399007797,
-0.2670174837112427,
0.20949846506118774,
0.059914980083703995,
0.01482442021369934,
0.038325466215610504,
0.22493278980255127,
-0.1813044399023056,
0.10070265829563141,
0.07375207543373108,
-0.42731040716171265,
0.38679876923561096,
0.20678412914276123,
-0.22475995123386383,
-0.08490705490112305,
-0.07044502347707748,
-0.08141425251960754,
0.13069561123847961,
-0.4885164499282837,
0.011196032166481018,
-0.012092776596546173,
0.08104074001312256,
0.3168438971042633,
-0.1344054937362671,
-0.19571958482265472,
0.28748902678489685,
-0.216905415058136,
0.05114114657044411,
-0.38618004322052,
0.19484487175941467,
-0.07327418774366379,
0.021973975002765656,
0.046206146478652954,
0.1455744057893753,
0.006899102125316858,
-0.1182677373290062,
-0.1939266473054886,
0.4598175585269928,
-0.010823788121342659,
0.2591732144355774,
-0.24769318103790283,
0.38703298568725586,
0.03210878372192383,
-0.3580982983112335,
0.2698904871940613,
0.32791101932525635,
-0.07314484566450119,
0.10036446154117584,
0.13446474075317383,
0.2715386152267456,
0.5463036298751831,
0.24911090731620789,
0.19679172337055206,
0.1096336767077446,
0.29168379306793213,
-0.11136312037706375,
0.07680756598711014,
-0.3768306374549866,
0.009592313319444656,
-0.3574172556400299,
0.6624307632446289,
-0.08522024005651474,
-0.14896135032176971,
0.00022876262664794922,
0.307613343000412,
0.09118638932704926,
0.02325066737830639,
0.04143160581588745,
-0.16869591176509857,
0.10335655510425568,
0.12872958183288574,
0.3556913137435913,
0.3701636791229248,
0.21139656007289886,
-0.39145076274871826,
0.09240450710058212,
-0.1448899358510971,
-0.007552195340394974,
0.35573142766952515,
-0.0003543645143508911,
0.09462956339120865,
0.013564495369791985,
0.07556074857711792,
0.007916714996099472,
-0.21568813920021057,
0.0001748502254486084,
-0.2879287004470825,
0.3005731999874115,
-0.27312377095222473,
0.010707199573516846,
-0.3346101939678192,
-0.029822353273630142,
-0.31230318546295166,
-0.05111245438456535,
-0.016749979928135872,
-0.06938741356134415,
-0.2259323000907898,
0.16731880605220795,
0.003316722810268402,
0.339095801115036,
-0.271034300327301,
0.12226036936044693,
-0.0727095901966095,
-0.05924232304096222,
-0.17483259737491608,
-0.016995908692479134,
-0.38738471269607544,
-0.07103201001882553,
0.4107629954814911,
-0.4608473777770996,
0.010686557739973068,
-0.3167707920074463,
0.0715930312871933,
-0.28576183319091797,
-0.36084702610969543,
0.08319397270679474,
0.15757626295089722,
0.5054432153701782,
0.3007636070251465,
-0.25091755390167236,
0.4483650028705597,
-0.1372881680727005,
0.19110934436321259,
-0.20940393209457397,
-0.07101093232631683,
0.08046010136604309,
-0.1939530223608017,
-0.30855607986450195,
0.03809988498687744,
-0.5920590162277222,
-0.1799210011959076,
-0.20110149681568146,
-0.007878908887505531,
0.2321644276380539,
0.1815931797027588,
0.06654299795627594,
0.2557634711265564,
-0.06309836357831955,
0.11381533741950989,
0.021523527801036835,
-0.06364823132753372,
-0.24944141507148743,
0.15617170929908752,
-0.3127189874649048,
-0.22537651658058167,
0.007606737315654755,
-0.12098280340433121,
0.5890756249427795,
-0.22858908772468567,
-0.39834484457969666,
0.5561559200286865,
-0.41658157110214233,
0.426923930644989,
-0.11050191521644592,
-0.006840754300355911,
0.20440879464149475,
0.25531262159347534,
0.08833913505077362,
-0.1936638355255127,
-0.22597649693489075,
0.18252383172512054,
-0.12878961861133575,
0.18931515514850616,
0.2966387867927551,
0.6160655617713928,
-0.15822139382362366,
0.2563164234161377,
0.27531883120536804,
-0.4040396511554718,
0.17007340490818024,
-0.286485880613327,
0.22282348573207855,
-0.3010812997817993,
-0.2691006362438202,
0.00755218043923378,
0.33295178413391113,
0.197435662150383,
0.06182204559445381,
0.06665255129337311,
-0.4907764196395874,
-0.10106951743364334,
0.004888907074928284,
-0.15715692937374115,
-0.02625139430165291,
-0.12993836402893066,
-0.040838975459337234,
0.23406608402729034,
0.2335750311613083,
0.12086261808872223,
-0.10422128438949585,
-0.20868241786956787,
0.06312704086303711,
0.2555614411830902,
0.10501124709844589,
0.07840746641159058,
-0.24989107251167297,
-0.32723015546798706,
-0.32284674048423767,
0.21940581500530243,
0.07353642582893372,
0.3317045271396637,
0.10579308867454529,
-0.029585160315036774,
-0.030072100460529327,
-0.11245059967041016,
0.42145323753356934,
-0.2370496690273285,
0.12122882157564163,
0.2655487358570099,
0.3657114505767822,
-0.502342700958252,
-0.15073370933532715,
0.13243919610977173,
0.4700886011123657,
0.013894971460103989,
0.3309294581413269,
-0.10436971485614777,
-0.3120632767677307,
0.1884201169013977,
0.3413676619529724,
-0.120886892080307,
-0.2868638336658478,
-0.2206883430480957,
-0.02225598692893982,
-0.201719731092453,
-0.054831795394420624,
-0.37476980686187744,
0.2234741598367691,
-0.1222868263721466,
-0.1876620650291443,
-0.0317951962351799,
-0.16699841618537903,
-0.13797113299369812,
0.2747822701931,
0.35228878259658813,
-0.13257113099098206,
0.343199759721756,
0.1498991996049881,
-0.31701433658599854,
0.43085986375808716,
0.3001770079135895,
0.1432678997516632,
0.05312535539269447,
0.053825367242097855,
0.08408704400062561,
0.14762142300605774,
-0.005020745098590851,
-0.36520788073539734,
-0.09386375546455383,
0.042249951511621475,
0.07714329659938812,
-0.1852167695760727,
-0.3557753562927246,
0.303775817155838,
0.030350767076015472,
-0.2495710253715515,
-0.5597423315048218,
0.508246123790741,
-0.052510570734739304,
-0.05587754398584366,
0.3500927984714508,
0.06362807750701904,
-0.36393314599990845,
0.15633255243301392,
-0.052386388182640076,
0.6140619516372681,
0.29269951581954956,
-0.008463406004011631,
0.1371128112077713,
-0.21073701977729797,
0.1330251544713974,
-0.059373240917921066,
0.012744288891553879,
-0.49148431420326233,
0.35203224420547485,
0.0029318779706954956,
-0.16965287923812866,
0.2381497174501419,
0.3675810694694519,
-0.181204691529274,
0.2887459397315979,
-0.23288357257843018,
0.2855542302131653,
0.11637621372938156,
0.35643619298934937,
-0.37639540433883667,
-0.11234389245510101,
-0.35091087222099304,
0.07671957463026047,
0.20973382890224457,
0.08184994012117386,
-0.12998971343040466,
0.10519625246524811,
0.14136144518852234,
-0.28459975123405457,
-0.281358927488327,
0.2524782419204712,
-0.3294835090637207,
0.36745813488960266,
0.33290883898735046,
0.04618352651596069,
0.24821454286575317,
0.14934179186820984,
0.27145612239837646,
0.18383647501468658,
-0.1440826654434204,
0.2844069004058838,
0.014684214256703854,
0.1703364998102188,
0.2723933160305023,
0.1017703264951706,
0.12214058637619019,
-0.13476616144180298,
-0.2772565186023712,
-0.022066839039325714,
-0.2304866909980774,
-0.317627489566803,
-0.06313686072826385,
-0.15617676079273224,
-0.033188171684741974,
0.022378843277692795,
-0.28011777997016907,
0.061567921191453934,
0.09425060451030731,
-0.22132214903831482,
0.13477551937103271,
0.05361698567867279,
-0.004804305732250214,
0.2728205919265747,
-0.1991061419248581,
-0.2773614525794983,
-0.03681645542383194,
0.42151394486427307,
0.005151020362973213,
0.2673109173774719,
0.37058353424072266,
-0.1361452341079712,
-0.013331636786460876,
-0.1444683074951172,
-0.10213471949100494,
0.4045371115207672,
-0.3278695344924927,
-0.21196363866329193,
-0.1645442545413971,
0.23753178119659424,
0.0568719282746315,
0.022188004106283188,
-0.024193109944462776,
0.020976774394512177,
-0.032884083688259125,
-0.3622192144393921,
-0.26997846364974976,
0.16388030350208282,
0.10099370777606964,
0.10692302882671356,
-0.09742964804172516,
-0.000491805374622345,
-0.045547038316726685,
-0.08813703060150146,
-0.2152642011642456,
0.07469037175178528,
0.09682933241128922,
-0.012723768129944801,
0.07184074819087982,
0.43575525283813477,
0.21394360065460205,
-0.04901620000600815,
0.09781888872385025,
-0.3026576042175293,
-0.2701065242290497,
-0.17432621121406555,
-0.1308998465538025,
0.1311565488576889,
0.10621249675750732,
-0.16751909255981445,
0.05698173865675926,
-0.24242079257965088,
-0.19524268805980682,
-0.04799151420593262,
0.33614909648895264,
-0.07300208508968353,
-0.16852536797523499,
0.1648666113615036,
-0.05715504661202431,
0.0071349553763866425,
-0.10993218421936035,
0.08961270749568939,
-0.15250542759895325,
0.03072177991271019,
0.15446637570858002,
0.29235321283340454,
-0.19427646696567535,
-0.09435029327869415,
0.24306359887123108,
0.010358130559325218,
-0.4452979266643524,
0.2077186405658722,
0.3440236449241638,
-0.4046967625617981,
0.18569733202457428,
0.3287750482559204,
0.017044812440872192,
0.23862816393375397,
-0.17759697139263153,
0.1125413253903389,
-0.004545867443084717,
0.17344799637794495,
-0.2654453217983246,
-0.20607592165470123,
0.09644801914691925,
0.19479301571846008,
-0.03831709548830986,
0.06315162777900696,
0.37275049090385437,
-0.2772243320941925,
0.4351237714290619,
0.12035740911960602,
0.5945706367492676,
-0.4505368173122406,
0.3204607367515564,
0.4803266227245331,
0.02543461322784424,
0.18124768137931824,
0.15404970943927765,
-0.009445123374462128,
0.10974036157131195,
0.5855468511581421,
-0.20199689269065857,
0.3524765968322754,
0.34284353256225586,
0.05942105874419212,
0.10989770293235779,
-0.504202127456665,
-0.1831206977367401,
0.10713997483253479,
-0.2642323672771454,
-0.0692654699087143,
0.1401585042476654,
0.5747160315513611,
0.021916605532169342,
0.009154107421636581,
-0.20053614675998688,
-0.14087127149105072,
-0.11645159125328064,
-0.2723865509033203,
-0.39280927181243896,
-0.23070530593395233,
-0.054690249264240265,
-0.019737377762794495,
-0.0058489516377449036,
-0.08538933098316193,
0.16035957634449005,
0.08941596746444702,
-0.3141341805458069,
-0.5025696158409119,
-0.058583226054906845,
0.18672332167625427,
0.08884085714817047,
-0.18988318741321564,
0.5465736389160156,
0.1356949657201767,
-0.19687145948410034,
-0.14974701404571533,
0.3892151713371277,
0.6285328269004822,
0.292522132396698,
0.17029926180839539,
0.0482177697122097,
0.040995996445417404,
-0.16197149455547333,
-0.07502628862857819,
0.22189468145370483,
-0.0050612762570381165,
-0.005299890413880348,
-0.010372977703809738,
0.1380651742219925,
-0.0030318833887577057,
0.045389872044324875,
0.08585964143276215,
0.3667730987071991,
-0.2557389736175537,
0.07872836291790009,
-0.029079880565404892,
-0.10174167156219482,
0.02369679883122444,
0.25020724534988403,
-0.2772998809814453,
0.019909106194972992,
0.5774508118629456,
0.11286303400993347,
-0.049204882234334946,
-0.2744273245334625,
0.0591484010219574,
0.06652182340621948,
0.2551930546760559,
0.08223698288202286,
0.12039530277252197,
-0.12694761157035828,
-0.44012022018432617,
-0.4563566744327545,
0.052816860377788544,
-0.057686351239681244,
0.38233691453933716,
0.06286068260669708,
0.052960075438022614,
-0.25400736927986145,
-0.14072170853614807,
0.2976740896701813,
-0.29144734144210815,
0.3574402630329132,
0.014612967148423195,
-0.1489073932170868,
-0.08986309170722961,
0.17875167727470398,
0.08000573515892029,
-0.043525759130716324,
-0.4323691725730896,
0.0027061598375439644,
-0.16549457609653473,
-0.02483266592025757,
-0.13168790936470032,
0.1626361608505249,
0.24756982922554016,
-0.18741708993911743,
0.7235348224639893,
-0.048544757068157196,
0.3746219277381897,
0.014871329069137573,
-0.009296908974647522,
-0.5441799163818359,
-0.14400775730609894,
-0.2750770151615143,
0.02792295441031456,
-0.14214098453521729,
0.4060475826263428,
-0.20330283045768738,
-0.053549159318208694,
-0.40033334493637085,
-0.02263205498456955,
0.06325025856494904,
0.011761091649532318,
-0.21884283423423767,
0.14940975606441498,
-0.3777558505535126,
0.23618973791599274,
-0.018244553357362747,
0.06974852830171585,
0.0724557489156723,
0.1510053426027298,
-0.22476625442504883,
-0.23915860056877136,
0.3298953175544739,
-0.3869825601577759,
-0.17423224449157715,
-0.20764267444610596,
0.12291465699672699,
0.03676610812544823,
-0.36450594663619995,
-0.16935038566589355,
0.17093580961227417,
0.4329378008842468,
-0.06994916498661041,
-0.022543445229530334,
0.1299544721841812,
-0.027793873101472855,
0.40104395151138306,
-0.009383298456668854,
0.3355688750743866,
0.07287264615297318,
-0.2503129541873932,
-0.1392793357372284,
-0.4465492069721222
] |
https://github.com/huggingface/datasets/issues/6558 | You can add
```python
from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True
```
after the imports to be able to read truncated images. | OSError: image file is truncated (1 bytes not processed) #28323 | ### Describe the bug
```
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
Cell In[24], line 28
23 return example
25 # Filter the dataset
26 # filtered_dataset = dataset.filter(contains_number)
27 # Add the 'label' field in the dataset
---> 28 labeled_dataset = dataset.filter(contains_number).map(add_label)
29 # View the structure of the updated dataset
30 print(labeled_dataset)
File /usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py:975, in DatasetDict.filter(self, function, with_indices, input_columns, batched, batch_size, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, fn_kwargs, num_proc, desc)
972 if cache_file_names is None:
973 cache_file_names = {k: None for k in self}
974 return DatasetDict(
--> 975 {
976 k: dataset.filter(
977 function=function,
978 with_indices=with_indices,
979 input_columns=input_columns,
980 batched=batched,
981 batch_size=batch_size,
982 keep_in_memory=keep_in_memory,
983 load_from_cache_file=load_from_cache_file,
984 cache_file_name=cache_file_names[k],
985 writer_batch_size=writer_batch_size,
986 fn_kwargs=fn_kwargs,
987 num_proc=num_proc,
988 desc=desc,
989 )
990 for k, dataset in self.items()
991 }
992 )
File /usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py:976, in <dictcomp>(.0)
972 if cache_file_names is None:
973 cache_file_names = {k: None for k in self}
974 return DatasetDict(
975 {
--> 976 k: dataset.filter(
977 function=function,
978 with_indices=with_indices,
979 input_columns=input_columns,
980 batched=batched,
981 batch_size=batch_size,
982 keep_in_memory=keep_in_memory,
983 load_from_cache_file=load_from_cache_file,
984 cache_file_name=cache_file_names[k],
985 writer_batch_size=writer_batch_size,
986 fn_kwargs=fn_kwargs,
987 num_proc=num_proc,
988 desc=desc,
989 )
990 for k, dataset in self.items()
991 }
992 )
File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:557, in transmit_format.<locals>.wrapper(*args, **kwargs)
550 self_format = {
551 "type": self._format_type,
552 "format_kwargs": self._format_kwargs,
553 "columns": self._format_columns,
554 "output_all_columns": self._output_all_columns,
555 }
556 # apply actual function
--> 557 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
558 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
559 # re-apply format to the output
File /usr/local/lib/python3.10/dist-packages/datasets/fingerprint.py:481, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs)
477 validate_fingerprint(kwargs[fingerprint_name])
479 # Call actual function
--> 481 out = func(dataset, *args, **kwargs)
483 # Update fingerprint of in-place transforms + update in-place history of transforms
485 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails
File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:3623, in Dataset.filter(self, function, with_indices, input_columns, batched, batch_size, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
3620 if len(self) == 0:
3621 return self
-> 3623 indices = self.map(
3624 function=partial(
3625 get_indices_from_mask_function, function, batched, with_indices, input_columns, self._indices
3626 ),
3627 with_indices=True,
3628 features=Features({"indices": Value("uint64")}),
3629 batched=True,
3630 batch_size=batch_size,
3631 remove_columns=self.column_names,
3632 keep_in_memory=keep_in_memory,
3633 load_from_cache_file=load_from_cache_file,
3634 cache_file_name=cache_file_name,
3635 writer_batch_size=writer_batch_size,
3636 fn_kwargs=fn_kwargs,
3637 num_proc=num_proc,
3638 suffix_template=suffix_template,
3639 new_fingerprint=new_fingerprint,
3640 input_columns=input_columns,
3641 desc=desc or "Filter",
3642 )
3643 new_dataset = copy.deepcopy(self)
3644 new_dataset._indices = indices.data
File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:592, in transmit_tasks.<locals>.wrapper(*args, **kwargs)
590 self: "Dataset" = kwargs.pop("self")
591 # apply actual function
--> 592 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
593 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
594 for dataset in datasets:
595 # Remove task templates if a column mapping of the template is no longer valid
File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:557, in transmit_format.<locals>.wrapper(*args, **kwargs)
550 self_format = {
551 "type": self._format_type,
552 "format_kwargs": self._format_kwargs,
553 "columns": self._format_columns,
554 "output_all_columns": self._output_all_columns,
555 }
556 # apply actual function
--> 557 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
558 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
559 # re-apply format to the output
File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:3093, in Dataset.map(self, function, with_indices, with_rank, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
3087 if transformed_dataset is None:
3088 with hf_tqdm(
3089 unit=" examples",
3090 total=pbar_total,
3091 desc=desc or "Map",
3092 ) as pbar:
-> 3093 for rank, done, content in Dataset._map_single(**dataset_kwargs):
3094 if done:
3095 shards_done += 1
File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:3470, in Dataset._map_single(shard, function, with_indices, with_rank, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset)
3466 indices = list(
3467 range(*(slice(i, i + batch_size).indices(shard.num_rows)))
3468 ) # Something simpler?
3469 try:
-> 3470 batch = apply_function_on_filtered_inputs(
3471 batch,
3472 indices,
3473 check_same_num_examples=len(shard.list_indexes()) > 0,
3474 offset=offset,
3475 )
3476 except NumExamplesMismatchError:
3477 raise DatasetTransformationNotAllowedError(
3478 "Using `.map` in batched mode on a dataset with attached indexes is allowed only if it doesn't create or remove existing examples. You can first run `.drop_index() to remove your index and then re-add it."
3479 ) from None
File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:3349, in Dataset._map_single.<locals>.apply_function_on_filtered_inputs(pa_inputs, indices, check_same_num_examples, offset)
3347 if with_rank:
3348 additional_args += (rank,)
-> 3349 processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)
3350 if isinstance(processed_inputs, LazyDict):
3351 processed_inputs = {
3352 k: v for k, v in processed_inputs.data.items() if k not in processed_inputs.keys_to_format
3353 }
File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:6212, in get_indices_from_mask_function(function, batched, with_indices, input_columns, indices_mapping, *args, **fn_kwargs)
6209 if input_columns is None:
6210 # inputs only contains a batch of examples
6211 batch: dict = inputs[0]
-> 6212 num_examples = len(batch[next(iter(batch.keys()))])
6213 for i in range(num_examples):
6214 example = {key: batch[key][i] for key in batch}
File /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:272, in LazyDict.__getitem__(self, key)
270 value = self.data[key]
271 if key in self.keys_to_format:
--> 272 value = self.format(key)
273 self.data[key] = value
274 self.keys_to_format.remove(key)
File /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:375, in LazyBatch.format(self, key)
374 def format(self, key):
--> 375 return self.formatter.format_column(self.pa_table.select([key]))
File /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:442, in PythonFormatter.format_column(self, pa_table)
440 def format_column(self, pa_table: pa.Table) -> list:
441 column = self.python_arrow_extractor().extract_column(pa_table)
--> 442 column = self.python_features_decoder.decode_column(column, pa_table.column_names[0])
443 return column
File /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:218, in PythonFeaturesDecoder.decode_column(self, column, column_name)
217 def decode_column(self, column: list, column_name: str) -> list:
--> 218 return self.features.decode_column(column, column_name) if self.features else column
File /usr/local/lib/python3.10/dist-packages/datasets/features/features.py:1951, in Features.decode_column(self, column, column_name)
1938 def decode_column(self, column: list, column_name: str):
1939 """Decode column with custom feature decoding.
1940
1941 Args:
(...)
1948 `list[Any]`
1949 """
1950 return (
-> 1951 [decode_nested_example(self[column_name], value) if value is not None else None for value in column]
1952 if self._column_requires_decoding[column_name]
1953 else column
1954 )
File /usr/local/lib/python3.10/dist-packages/datasets/features/features.py:1951, in <listcomp>(.0)
1938 def decode_column(self, column: list, column_name: str):
1939 """Decode column with custom feature decoding.
1940
1941 Args:
(...)
1948 `list[Any]`
1949 """
1950 return (
-> 1951 [decode_nested_example(self[column_name], value) if value is not None else None for value in column]
1952 if self._column_requires_decoding[column_name]
1953 else column
1954 )
File /usr/local/lib/python3.10/dist-packages/datasets/features/features.py:1339, in decode_nested_example(schema, obj, token_per_repo_id)
1336 elif isinstance(schema, (Audio, Image)):
1337 # we pass the token to read and decode files from private repositories in streaming mode
1338 if obj is not None and schema.decode:
-> 1339 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1340 return obj
File /usr/local/lib/python3.10/dist-packages/datasets/features/image.py:185, in Image.decode_example(self, value, token_per_repo_id)
183 else:
184 image = PIL.Image.open(BytesIO(bytes_))
--> 185 image.load() # to avoid "Too many open files" errors
186 return image
File /usr/local/lib/python3.10/dist-packages/PIL/ImageFile.py:254, in ImageFile.load(self)
252 break
253 else:
--> 254 raise OSError(
255 "image file is truncated "
256 f"({len(b)} bytes not processed)"
257 )
259 b = b + s
260 n, err_code = decoder.decode(b)
OSError: image file is truncated (1 bytes not processed)
```
### Steps to reproduce the bug
```
from datasets import load_dataset
dataset = load_dataset("mehul7/captioned_military_aircraft")
from transformers import AutoImageProcessor
checkpoint = "microsoft/resnet-50"
image_processor = AutoImageProcessor.from_pretrained(checkpoint)
import re
from PIL import Image
import io
def contains_number(example):
try:
image = Image.open(io.BytesIO(example["image"]['bytes']))
t = image_processor(images=image, return_tensors="pt")['pixel_values']
except Exception as e:
print(f"Error processing image:{example['text']}")
return False
return bool(re.search(r'\d', example['text']))
# Define a function to add the 'label' field
def add_label(example):
lab = example['text'].split()
temp = 'NOT'
for item in lab:
if str(item[-1]).isdigit():
temp = item
break
example['label'] = temp
return example
# Filter the dataset
# filtered_dataset = dataset.filter(contains_number)
# Add the 'label' field in the dataset
labeled_dataset = dataset.filter(contains_number).map(add_label)
# View the structure of the updated dataset
print(labeled_dataset)
```
### Expected behavior
needs to form labels
same as : https://www.kaggle.com/code/jiabaowangts/dataset-air/notebook
### Environment info
Kaggle notebook P100 | 22 | OSError: image file is truncated (1 bytes not processed) #28323
### Describe the bug
```
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
Cell In[24], line 28
23 return example
25 # Filter the dataset
26 # filtered_dataset = dataset.filter(contains_number)
27 # Add the 'label' field in the dataset
---> 28 labeled_dataset = dataset.filter(contains_number).map(add_label)
29 # View the structure of the updated dataset
30 print(labeled_dataset)
File /usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py:975, in DatasetDict.filter(self, function, with_indices, input_columns, batched, batch_size, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, fn_kwargs, num_proc, desc)
972 if cache_file_names is None:
973 cache_file_names = {k: None for k in self}
974 return DatasetDict(
--> 975 {
976 k: dataset.filter(
977 function=function,
978 with_indices=with_indices,
979 input_columns=input_columns,
980 batched=batched,
981 batch_size=batch_size,
982 keep_in_memory=keep_in_memory,
983 load_from_cache_file=load_from_cache_file,
984 cache_file_name=cache_file_names[k],
985 writer_batch_size=writer_batch_size,
986 fn_kwargs=fn_kwargs,
987 num_proc=num_proc,
988 desc=desc,
989 )
990 for k, dataset in self.items()
991 }
992 )
File /usr/local/lib/python3.10/dist-packages/datasets/dataset_dict.py:976, in <dictcomp>(.0)
972 if cache_file_names is None:
973 cache_file_names = {k: None for k in self}
974 return DatasetDict(
975 {
--> 976 k: dataset.filter(
977 function=function,
978 with_indices=with_indices,
979 input_columns=input_columns,
980 batched=batched,
981 batch_size=batch_size,
982 keep_in_memory=keep_in_memory,
983 load_from_cache_file=load_from_cache_file,
984 cache_file_name=cache_file_names[k],
985 writer_batch_size=writer_batch_size,
986 fn_kwargs=fn_kwargs,
987 num_proc=num_proc,
988 desc=desc,
989 )
990 for k, dataset in self.items()
991 }
992 )
File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:557, in transmit_format.<locals>.wrapper(*args, **kwargs)
550 self_format = {
551 "type": self._format_type,
552 "format_kwargs": self._format_kwargs,
553 "columns": self._format_columns,
554 "output_all_columns": self._output_all_columns,
555 }
556 # apply actual function
--> 557 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
558 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
559 # re-apply format to the output
File /usr/local/lib/python3.10/dist-packages/datasets/fingerprint.py:481, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs)
477 validate_fingerprint(kwargs[fingerprint_name])
479 # Call actual function
--> 481 out = func(dataset, *args, **kwargs)
483 # Update fingerprint of in-place transforms + update in-place history of transforms
485 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails
File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:3623, in Dataset.filter(self, function, with_indices, input_columns, batched, batch_size, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
3620 if len(self) == 0:
3621 return self
-> 3623 indices = self.map(
3624 function=partial(
3625 get_indices_from_mask_function, function, batched, with_indices, input_columns, self._indices
3626 ),
3627 with_indices=True,
3628 features=Features({"indices": Value("uint64")}),
3629 batched=True,
3630 batch_size=batch_size,
3631 remove_columns=self.column_names,
3632 keep_in_memory=keep_in_memory,
3633 load_from_cache_file=load_from_cache_file,
3634 cache_file_name=cache_file_name,
3635 writer_batch_size=writer_batch_size,
3636 fn_kwargs=fn_kwargs,
3637 num_proc=num_proc,
3638 suffix_template=suffix_template,
3639 new_fingerprint=new_fingerprint,
3640 input_columns=input_columns,
3641 desc=desc or "Filter",
3642 )
3643 new_dataset = copy.deepcopy(self)
3644 new_dataset._indices = indices.data
File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:592, in transmit_tasks.<locals>.wrapper(*args, **kwargs)
590 self: "Dataset" = kwargs.pop("self")
591 # apply actual function
--> 592 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
593 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
594 for dataset in datasets:
595 # Remove task templates if a column mapping of the template is no longer valid
File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:557, in transmit_format.<locals>.wrapper(*args, **kwargs)
550 self_format = {
551 "type": self._format_type,
552 "format_kwargs": self._format_kwargs,
553 "columns": self._format_columns,
554 "output_all_columns": self._output_all_columns,
555 }
556 # apply actual function
--> 557 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
558 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
559 # re-apply format to the output
File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:3093, in Dataset.map(self, function, with_indices, with_rank, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
3087 if transformed_dataset is None:
3088 with hf_tqdm(
3089 unit=" examples",
3090 total=pbar_total,
3091 desc=desc or "Map",
3092 ) as pbar:
-> 3093 for rank, done, content in Dataset._map_single(**dataset_kwargs):
3094 if done:
3095 shards_done += 1
File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:3470, in Dataset._map_single(shard, function, with_indices, with_rank, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset)
3466 indices = list(
3467 range(*(slice(i, i + batch_size).indices(shard.num_rows)))
3468 ) # Something simpler?
3469 try:
-> 3470 batch = apply_function_on_filtered_inputs(
3471 batch,
3472 indices,
3473 check_same_num_examples=len(shard.list_indexes()) > 0,
3474 offset=offset,
3475 )
3476 except NumExamplesMismatchError:
3477 raise DatasetTransformationNotAllowedError(
3478 "Using `.map` in batched mode on a dataset with attached indexes is allowed only if it doesn't create or remove existing examples. You can first run `.drop_index() to remove your index and then re-add it."
3479 ) from None
File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:3349, in Dataset._map_single.<locals>.apply_function_on_filtered_inputs(pa_inputs, indices, check_same_num_examples, offset)
3347 if with_rank:
3348 additional_args += (rank,)
-> 3349 processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)
3350 if isinstance(processed_inputs, LazyDict):
3351 processed_inputs = {
3352 k: v for k, v in processed_inputs.data.items() if k not in processed_inputs.keys_to_format
3353 }
File /usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py:6212, in get_indices_from_mask_function(function, batched, with_indices, input_columns, indices_mapping, *args, **fn_kwargs)
6209 if input_columns is None:
6210 # inputs only contains a batch of examples
6211 batch: dict = inputs[0]
-> 6212 num_examples = len(batch[next(iter(batch.keys()))])
6213 for i in range(num_examples):
6214 example = {key: batch[key][i] for key in batch}
File /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:272, in LazyDict.__getitem__(self, key)
270 value = self.data[key]
271 if key in self.keys_to_format:
--> 272 value = self.format(key)
273 self.data[key] = value
274 self.keys_to_format.remove(key)
File /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:375, in LazyBatch.format(self, key)
374 def format(self, key):
--> 375 return self.formatter.format_column(self.pa_table.select([key]))
File /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:442, in PythonFormatter.format_column(self, pa_table)
440 def format_column(self, pa_table: pa.Table) -> list:
441 column = self.python_arrow_extractor().extract_column(pa_table)
--> 442 column = self.python_features_decoder.decode_column(column, pa_table.column_names[0])
443 return column
File /usr/local/lib/python3.10/dist-packages/datasets/formatting/formatting.py:218, in PythonFeaturesDecoder.decode_column(self, column, column_name)
217 def decode_column(self, column: list, column_name: str) -> list:
--> 218 return self.features.decode_column(column, column_name) if self.features else column
File /usr/local/lib/python3.10/dist-packages/datasets/features/features.py:1951, in Features.decode_column(self, column, column_name)
1938 def decode_column(self, column: list, column_name: str):
1939 """Decode column with custom feature decoding.
1940
1941 Args:
(...)
1948 `list[Any]`
1949 """
1950 return (
-> 1951 [decode_nested_example(self[column_name], value) if value is not None else None for value in column]
1952 if self._column_requires_decoding[column_name]
1953 else column
1954 )
File /usr/local/lib/python3.10/dist-packages/datasets/features/features.py:1951, in <listcomp>(.0)
1938 def decode_column(self, column: list, column_name: str):
1939 """Decode column with custom feature decoding.
1940
1941 Args:
(...)
1948 `list[Any]`
1949 """
1950 return (
-> 1951 [decode_nested_example(self[column_name], value) if value is not None else None for value in column]
1952 if self._column_requires_decoding[column_name]
1953 else column
1954 )
File /usr/local/lib/python3.10/dist-packages/datasets/features/features.py:1339, in decode_nested_example(schema, obj, token_per_repo_id)
1336 elif isinstance(schema, (Audio, Image)):
1337 # we pass the token to read and decode files from private repositories in streaming mode
1338 if obj is not None and schema.decode:
-> 1339 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1340 return obj
File /usr/local/lib/python3.10/dist-packages/datasets/features/image.py:185, in Image.decode_example(self, value, token_per_repo_id)
183 else:
184 image = PIL.Image.open(BytesIO(bytes_))
--> 185 image.load() # to avoid "Too many open files" errors
186 return image
File /usr/local/lib/python3.10/dist-packages/PIL/ImageFile.py:254, in ImageFile.load(self)
252 break
253 else:
--> 254 raise OSError(
255 "image file is truncated "
256 f"({len(b)} bytes not processed)"
257 )
259 b = b + s
260 n, err_code = decoder.decode(b)
OSError: image file is truncated (1 bytes not processed)
```
### Steps to reproduce the bug
```
from datasets import load_dataset
dataset = load_dataset("mehul7/captioned_military_aircraft")
from transformers import AutoImageProcessor
checkpoint = "microsoft/resnet-50"
image_processor = AutoImageProcessor.from_pretrained(checkpoint)
import re
from PIL import Image
import io
def contains_number(example):
try:
image = Image.open(io.BytesIO(example["image"]['bytes']))
t = image_processor(images=image, return_tensors="pt")['pixel_values']
except Exception as e:
print(f"Error processing image:{example['text']}")
return False
return bool(re.search(r'\d', example['text']))
# Define a function to add the 'label' field
def add_label(example):
lab = example['text'].split()
temp = 'NOT'
for item in lab:
if str(item[-1]).isdigit():
temp = item
break
example['label'] = temp
return example
# Filter the dataset
# filtered_dataset = dataset.filter(contains_number)
# Add the 'label' field in the dataset
labeled_dataset = dataset.filter(contains_number).map(add_label)
# View the structure of the updated dataset
print(labeled_dataset)
```
### Expected behavior
needs to form labels
same as : https://www.kaggle.com/code/jiabaowangts/dataset-air/notebook
### Environment info
Kaggle notebook P100
You can add
```python
from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True
```
after the imports to be able to read truncated images. | [
-0.3276703357696533,
-0.31357821822166443,
-0.26014402508735657,
0.10543324053287506,
0.24383752048015594,
0.03358208388090134,
0.23733654618263245,
0.46688112616539,
0.08176564425230026,
0.19741684198379517,
0.054364994168281555,
0.06374165415763855,
-0.06677894294261932,
0.07968498766422272,
-0.14242108166217804,
-0.07559946179389954,
-0.03056107461452484,
0.10723263025283813,
0.09563364088535309,
0.08584258705377579,
-0.34226322174072266,
0.2144775241613388,
-0.021758489310741425,
-0.06537450850009918,
-0.2969648838043213,
-0.2398546189069748,
-0.04726807028055191,
0.3207606077194214,
-0.4079400300979614,
-0.3186423182487488,
-0.05723927170038223,
-0.20786285400390625,
-0.06486533582210541,
0.5109490156173706,
-0.00010565900447545573,
0.002501659095287323,
0.25207218527793884,
-0.007336270064115524,
-0.31062716245651245,
0.0006803348660469055,
-0.03478269279003143,
-0.2029450237751007,
-0.11587126553058624,
-0.38340967893600464,
0.16385972499847412,
0.03224861994385719,
0.03081461228430271,
-0.2656174600124359,
0.48730504512786865,
0.2803198993206024,
0.32729262113571167,
-0.019339412450790405,
0.16403168439865112,
-0.11828169226646423,
0.23741920292377472,
0.125061497092247,
0.048233240842819214,
0.1537427306175232,
0.13988415896892548,
-0.04279523342847824,
0.01896047778427601,
0.51655513048172,
-0.15341655910015106,
0.11548151075839996,
0.04142226278781891,
-0.09921137243509293,
0.15164244174957275,
-0.4191802740097046,
0.2804467976093292,
-0.03583412989974022,
0.2558521330356598,
-0.20535434782505035,
-0.4226703345775604,
-0.17248840630054474,
0.01579492911696434,
-0.47811904549598694,
0.044236958026885986,
0.23026806116104126,
-0.17224155366420746,
-0.09228020906448364,
-0.3265790045261383,
-0.09229903668165207,
-0.22644124925136566,
-0.04146933555603027,
-0.22983971238136292,
0.16447249054908752,
-0.2013072669506073,
0.0023425593972206116,
-0.030426017940044403,
-0.08465656638145447,
0.18916082382202148,
-0.15024614334106445,
0.06387308239936829,
0.12176588177680969,
-0.11293523758649826,
-0.004482246935367584,
-0.09949719905853271,
0.015438748523592949,
0.1944054812192917,
-0.025906924158334732,
-0.19336199760437012,
-0.21354293823242188,
0.14665310084819794,
0.04983273893594742,
0.09647563099861145,
0.10599692165851593,
-0.1641516089439392,
0.37004226446151733,
0.08392736315727234,
0.22323277592658997,
-0.23591530323028564,
-0.12511838972568512,
-0.05849156156182289,
-0.23883908987045288,
0.3357524871826172,
0.008507180958986282,
0.2025056779384613,
-0.04517664387822151,
-0.2961553931236267,
0.047678545117378235,
0.1928473711013794,
0.1326744556427002,
-0.047236621379852295,
0.31067538261413574,
-0.0725555568933487,
0.020257867872714996,
0.289431095123291,
-0.02588077262043953,
-0.1119239330291748,
-0.0121920146048069,
-0.27530917525291443,
0.10287594050168991,
-0.02373606711626053,
-0.13690592348575592,
-0.1231791079044342,
-0.15463390946388245,
0.3228908181190491,
-0.1663750410079956,
0.09093637764453888,
-0.03447161614894867,
0.08446233719587326,
-0.3867914378643036,
0.13913771510124207,
0.4160088300704956,
0.053599417209625244,
-0.012290515005588531,
0.3296717703342438,
-0.04516798257827759,
0.0529162734746933,
0.27298226952552795,
-0.47614991664886475,
-0.20989400148391724,
-0.14779040217399597,
0.3251734972000122,
0.2368510216474533,
0.23546861112117767,
0.004333999007940292,
-0.14243541657924652,
0.5040591955184937,
-0.1723388433456421,
0.0684678852558136,
-0.26135364174842834,
-0.4595225155353546,
-0.24162596464157104,
0.20387503504753113,
0.28419584035873413,
-0.47134900093078613,
0.07801151275634766,
-0.24495333433151245,
-0.046041082590818405,
0.2229682058095932,
0.22905322909355164,
0.18182779848575592,
0.23627622425556183,
-0.3390667736530304,
-0.00278569757938385,
0.2602699398994446,
-0.3616566061973572,
-0.4403815269470215,
0.08856973052024841,
-0.2484312653541565,
0.058965958654880524,
-0.037167347967624664,
0.09609167277812958,
0.3326353132724762,
0.08931311964988708,
0.2911629378795624,
0.1772480309009552,
-0.2600676715373993,
0.014466546475887299,
-0.2729194164276123,
-0.03350619599223137,
-0.08269104361534119,
0.1074322909116745,
0.12327781319618225,
-0.020559050142765045,
0.05583803728222847,
-0.02487909607589245,
0.1331569254398346,
0.10144469141960144,
0.14208872616291046,
0.3177472949028015,
0.18040823936462402,
0.050205644220113754,
0.007881492376327515,
-0.32961463928222656,
-0.023280039429664612,
0.03950101137161255,
-0.016089685261249542,
-0.1431315690279007,
-0.29960814118385315,
-0.12920379638671875,
-0.27950724959373474,
0.03272169828414917,
-0.10105586051940918,
-0.3830394744873047,
0.2442319095134735,
0.06987222284078598,
0.1373884677886963,
-0.021392259746789932,
-0.04570923000574112,
0.2802632451057434,
-0.24662679433822632,
0.05916295573115349,
-0.1381392478942871,
0.020412161946296692,
-0.17950469255447388,
-0.12791433930397034,
-0.06516939401626587,
-0.050415605306625366,
0.13609996438026428,
-0.01593380980193615,
-0.28267329931259155,
0.455636590719223,
0.4287968575954437,
-0.11175677180290222,
-0.1346975564956665,
-0.18520382046699524,
0.038617976009845734,
0.006416119635105133,
0.013233166188001633,
-0.050793953239917755,
0.15097033977508545,
0.07730920612812042,
-0.26009050011634827,
0.15554744005203247,
-0.05328923091292381,
0.0422164611518383,
0.10012463480234146,
0.025912679731845856,
0.17554907500743866,
0.029703214764595032,
0.12740439176559448,
-0.34977906942367554,
0.06606702506542206,
-0.059913184493780136,
0.06825728714466095,
-0.13511306047439575,
0.06699992716312408,
0.024222929030656815,
0.5864347815513611,
0.18449340760707855,
-0.051499709486961365,
0.3128914535045624,
-0.15512722730636597,
0.03616371750831604,
-0.03149298205971718,
0.3852136731147766,
0.30429819226264954,
0.3565150797367096,
-0.1930363029241562,
-0.033303409814834595,
0.19106820225715637,
-0.024455981329083443,
0.27686449885368347,
0.12287843227386475,
0.4084964394569397,
0.21391770243644714,
0.14423036575317383,
0.12144650518894196,
-0.0852331668138504,
-0.36741939187049866,
-0.21818199753761292,
0.1203119233250618,
-0.009262733161449432,
0.06526616215705872,
-0.17728322744369507,
-0.3492875099182129,
0.040634073317050934,
0.2545294761657715,
-0.05909091606736183,
-0.21501806378364563,
0.016038309782743454,
0.16581395268440247,
-0.10617556422948837,
0.1124371886253357,
-0.07831910252571106,
0.16908423602581024,
0.4742165207862854,
-0.03660253435373306,
-0.055078305304050446,
-0.028192076832056046,
-0.06172380968928337,
0.17423459887504578,
0.06563495099544525,
-0.2427642047405243,
0.4786151647567749,
-0.19832995533943176,
-0.07191623747348785,
-0.31080716848373413,
-0.39430689811706543,
0.10324183851480484,
0.03177742660045624,
0.13084012269973755,
0.2183178961277008,
0.3448675274848938,
-0.2138926386833191,
-0.013522833585739136,
0.13530972599983215,
-0.13223865628242493,
-0.34692156314849854,
-0.08115983009338379,
0.10497739911079407,
0.04073017090559006,
-0.2542855143547058,
-0.026520926505327225,
-0.36316239833831787,
-0.3849858045578003,
-0.05579329654574394,
0.22928713262081146,
0.3030208647251129,
0.45403701066970825,
0.21647265553474426,
-0.06511224806308746,
0.13914810121059418,
0.2646561563014984,
-0.1825219690799713,
-0.41665080189704895,
0.15359386801719666,
-0.22236701846122742,
-0.2965049743652344,
-0.10278897732496262,
-0.17026691138744354,
0.19968397915363312,
0.25603407621383667,
-0.5583783984184265,
-0.4199428856372833,
-0.10683984309434891,
0.058652400970458984,
-0.2021169662475586,
-0.025955412536859512,
0.24084192514419556,
0.010041959583759308,
-0.24577932059764862,
-0.21430720388889313,
-0.0998072624206543,
-0.12962809205055237,
-0.1580115109682083,
0.16164356470108032,
-0.007841984741389751,
0.6010993719100952,
0.05922605097293854,
0.4228699803352356,
0.1752806007862091,
0.15533511340618134,
0.2811257839202881,
-0.1644040197134018,
0.2684868574142456,
-0.28178870677948,
-0.28227436542510986,
0.2034071534872055,
0.027477607131004333,
-0.18952041864395142,
-0.059405624866485596,
0.03682064265012741,
0.12762415409088135,
0.12526607513427734,
0.050479769706726074,
-0.4813010096549988,
0.10785036534070969,
-0.0700700432062149,
0.08662096410989761,
0.3050422668457031,
-0.09109050035476685,
-0.09628035873174667,
-0.25813618302345276,
0.044873032718896866,
-0.1765039712190628,
0.13624687492847443,
0.1626242995262146,
-0.11057214438915253,
-0.05551580712199211,
-0.02653413452208042,
-0.3547787368297577,
0.15771161019802094,
0.17728453874588013,
0.16132499277591705,
-0.16726580262184143,
0.008791036903858185,
-0.018931884318590164,
-0.16125786304473877,
1.0105059146881104,
-0.007302907295525074,
0.0392746776342392,
0.20941273868083954,
-0.1571943461894989,
-0.41696202754974365,
0.04651074856519699,
-0.1349925547838211,
0.2621415853500366,
0.25665396451950073,
0.5057945251464844,
0.032477766275405884,
0.0834118127822876,
0.12571118772029877,
0.19087007641792297,
-0.11800727248191833,
0.020109739154577255,
-0.18732263147830963,
-0.3266046643257141,
-0.4235762357711792,
0.09555558860301971,
0.03952702134847641,
0.24190260469913483,
0.12578865885734558,
-0.10107644647359848,
-0.02109024114906788,
-0.20891425013542175,
-0.28574052453041077,
0.061439163982868195,
0.34138724207878113,
-0.1425170600414276,
0.2212895154953003,
-0.06702087074518204,
0.06392014771699905,
0.4414661228656769,
0.4955291152000427,
-0.26898595690727234,
-0.21246124804019928,
0.19010905921459198,
-0.03351682424545288,
-0.12162600457668304,
0.19078396260738373,
-0.13515132665634155,
-0.13885939121246338,
-0.15580444037914276,
0.585155189037323,
-0.05257229134440422,
0.046520430594682693,
0.27245786786079407,
0.0349808894097805,
-0.34002190828323364,
-0.2234049141407013,
0.045836880803108215,
0.2853701412677765,
0.13160279393196106,
0.35204052925109863,
-0.14956843852996826,
-0.2293916493654251,
0.26033294200897217,
0.15740007162094116,
0.7034475803375244,
-0.06152339652180672,
0.10961663722991943,
0.13872532546520233,
-0.14858843386173248,
0.3931008577346802,
-0.14873358607292175,
0.17467468976974487,
-0.20435664057731628,
-0.48695480823516846,
0.08456785976886749,
-0.1053231805562973,
0.07913510501384735,
0.041651077568531036,
-0.23079827427864075,
0.07380515336990356,
-0.14691424369812012,
-0.11442580074071884,
-0.0658370703458786,
0.14514821767807007,
-0.10905291140079498,
-0.17175710201263428,
-0.24633654952049255,
0.3090263605117798,
-0.021442778408527374,
0.07014468312263489,
-0.07023836672306061,
0.14369677007198334,
-0.07670566439628601,
-0.25823020935058594,
-0.1515226662158966,
0.07020897418260574,
-0.28532159328460693,
0.13887274265289307,
-0.16264982521533966,
-0.13356302678585052,
-0.1745087206363678,
0.012382252141833305,
0.040976136922836304,
0.32310861349105835,
0.1411856859922409,
0.3384310305118561,
0.2495952993631363,
0.16966533660888672,
-0.004726417362689972,
-0.09345358610153198,
0.32144173979759216,
-0.19460880756378174,
0.10152383148670197,
-0.0893157571554184,
-0.022603757679462433,
-0.15531879663467407,
0.20197314023971558,
0.06201627850532532,
0.31854158639907837,
-0.27659833431243896,
-0.2182849645614624,
-0.39731428027153015,
-0.09279263019561768,
-0.30765122175216675,
0.23942556977272034,
-0.03955404460430145,
-0.10249088704586029,
0.2371062934398651,
0.06638392806053162,
-0.31575000286102295,
-0.1336694210767746,
0.3750714659690857,
0.10702769458293915,
0.1500009298324585,
0.3867917060852051,
-0.05482562631368637,
-0.16041623055934906,
-0.33490997552871704,
0.11427134275436401,
-0.13343364000320435,
-0.20943108201026917,
0.4427976608276367,
-0.012084480375051498,
0.1415005326271057,
-0.03440653160214424,
-0.16938695311546326,
0.2051607370376587,
0.18304048478603363,
-0.09064820408821106,
-0.5508065223693848,
-0.35954201221466064,
0.013778990134596825,
-0.14346566796302795,
0.30896782875061035,
0.06991755962371826,
0.1390678882598877,
-0.07599234580993652,
0.17427441477775574,
-0.43004727363586426,
0.09566270560026169,
-0.19612571597099304,
0.10035474598407745,
0.002298012375831604,
0.12106665968894958,
-0.026377001777291298,
0.014527533203363419,
0.2891744375228882,
0.3529617190361023,
-0.14358046650886536,
-0.3878024220466614,
-0.032616183161735535,
0.06976145505905151,
-0.04824475198984146,
-0.40144842863082886,
0.16762518882751465,
-0.17739711701869965,
-0.22718682885169983,
-0.04963237792253494,
0.0931997150182724,
0.05048051476478577,
-0.06221063807606697,
-0.14232365787029266,
0.04980631172657013,
0.024750346317887306,
0.3216158151626587,
0.08983153849840164,
-0.29339107871055603,
0.3339981734752655,
0.09657922387123108,
0.32382461428642273,
0.016966067254543304,
-0.08372409641742706,
-0.1746334433555603,
-0.09653373062610626,
-0.1115359291434288,
-0.2728411555290222,
0.4005500078201294,
-0.23585033416748047,
-0.005745165050029755,
0.19949020445346832,
0.3929539620876312,
0.1582820564508438,
-0.3061498701572418,
0.03783975541591644,
0.12332973629236221,
0.38225311040878296,
-0.3107975125312805,
-0.04125962406396866,
0.2481062412261963,
-0.09265024960041046,
0.045862406492233276,
0.12779268622398376,
-0.13554365932941437,
0.11627434194087982,
0.10514535009860992,
0.1703791618347168,
0.5708441734313965,
-0.19375324249267578,
0.13318870961666107,
0.3061331808567047,
0.0681600496172905,
0.12726068496704102,
0.13401959836483002,
0.1702936291694641,
0.06165582686662674,
0.6090564727783203,
0.13383124768733978,
0.3524233400821686,
-0.06362175941467285,
0.026864157989621162,
0.014339227229356766,
-0.3913177251815796,
0.2219550609588623,
0.19127818942070007,
-0.3075982332229614,
0.0720556378364563,
-0.10275518894195557,
-0.22820015251636505,
-0.10161420702934265,
-0.2564033567905426,
0.07449125498533249,
0.2825348377227783,
-0.11220438778400421,
0.19516116380691528,
-0.23018333315849304,
-0.08678733557462692,
-0.06974129378795624,
-0.05457146465778351,
0.1156056746840477,
-0.076260507106781,
0.11062245070934296,
0.03649431839585304,
-0.25618115067481995,
-0.13133975863456726,
-0.39129820466041565,
0.162239670753479,
0.1898937225341797,
-0.3981918692588806,
0.19910374283790588,
0.48946627974510193,
0.20374691486358643,
0.07230163365602493,
0.3819617033004761,
0.7158538699150085,
0.3570859134197235,
0.06919702887535095,
-0.11831807345151901,
0.04233001545071602,
-0.2594018280506134,
-0.1889129877090454,
0.13902129232883453,
0.02428588457405567,
0.06567654758691788,
0.29960256814956665,
0.33410489559173584,
-0.2617384195327759,
0.10051007568836212,
0.24410109221935272,
-0.01562475971877575,
-0.19905048608779907,
-0.09693469107151031,
-0.014049181714653969,
-0.11602070927619934,
-0.22925803065299988,
0.005891706794500351,
-0.5158436298370361,
-0.018457163125276566,
0.30405840277671814,
-0.16129270195960999,
0.21076682209968567,
0.09116712212562561,
0.1414210945367813,
-0.16394445300102234,
0.22049960494041443,
0.38501983880996704,
0.09283726662397385,
-0.23583152890205383,
-0.2540152072906494,
-0.26768508553504944,
0.13051828742027283,
-0.26451027393341064,
-0.46877652406692505,
0.04059576615691185,
0.08181848376989365,
-0.08711101114749908,
0.0009458679705858231,
0.3161553740501404,
-0.057925835251808167,
0.0018516592681407928,
0.17903020977973938,
-0.36803799867630005,
-0.19437825679779053,
0.0934540182352066,
-0.040011778473854065,
0.1091042011976242,
-0.4631350636482239,
0.15314114093780518,
-0.2287810742855072,
0.2202451378107071,
-0.12304043024778366,
0.009575717151165009,
0.11841633170843124,
0.0016780826263129711,
0.25672343373298645,
0.25511428713798523,
0.20591379702091217,
-0.3667629063129425,
-0.20397540926933289,
0.032463036477565765,
0.018313277512788773,
-0.3783436417579651,
0.15648314356803894,
0.4287199378013611,
0.616671085357666,
-0.07640505582094193,
-0.5743570923805237,
-0.17048966884613037,
0.6006554961204529,
-0.04036751762032509,
-0.08346445113420486,
0.02699591964483261,
0.22681888937950134,
0.11506308615207672,
-0.03544534742832184,
0.13591830432415009,
0.16138434410095215,
-0.0004798267036676407,
0.16751521825790405,
-0.3378472924232483,
-0.45174288749694824,
0.4365695118904114,
-0.2697305679321289,
-0.23657238483428955,
0.02509346976876259,
0.12060953676700592,
-0.11804511398077011,
0.016805948689579964,
-0.07973416149616241,
0.06566210091114044,
0.37691956758499146,
-0.05985561013221741,
-0.22208967804908752,
0.3417172431945801,
-0.10099528729915619,
0.16614702343940735,
0.038288116455078125,
0.2686009109020233,
-0.06305187940597534,
-0.2792286276817322,
0.07109329849481583,
-0.24615535140037537
] |
https://github.com/huggingface/datasets/issues/6554 | I don't think this bug is a thing ? Do you have some code that leads to this issue ? | Parquet exports are used even if revision is passed | We should not used Parquet exports if `revision` is passed.
I think this is a regression. | 20 | Parquet exports are used even if revision is passed
We should not used Parquet exports if `revision` is passed.
I think this is a regression.
I don't think this bug is a thing ? Do you have some code that leads to this issue ? | [
0.00247994065284729,
-0.33710503578186035,
-0.11629632860422134,
0.24757957458496094,
0.059504974633455276,
-0.4397578537464142,
0.18885020911693573,
0.13291427493095398,
-0.1428072452545166,
0.35665690898895264,
0.3908851742744446,
0.49041202664375305,
0.31143370270729065,
0.03026939183473587,
-0.12497840821743011,
0.06394223868846893,
0.2687302529811859,
0.12707456946372986,
-0.061901744455099106,
-0.1845642626285553,
-0.2402423471212387,
0.3131314218044281,
-0.14849182963371277,
0.11305858194828033,
0.1615367829799652,
-0.10388866811990738,
0.15126468241214752,
0.0012196004390716553,
-0.07179483026266098,
-0.15855565667152405,
-0.04706481844186783,
-0.21993574500083923,
-0.12477099150419235,
0.14083372056484222,
-0.00010431378905195743,
0.1885875165462494,
0.32538264989852905,
-0.23821225762367249,
-0.24143736064434052,
0.1719466745853424,
0.10112355649471283,
0.013780735433101654,
0.03623545169830322,
-0.2777082920074463,
-0.29319077730178833,
-0.25650641322135925,
-0.23955583572387695,
-0.28660035133361816,
0.25925585627555847,
0.3458215296268463,
0.35498902201652527,
0.08605477213859558,
-0.07789546251296997,
-0.017966900020837784,
0.18332594633102417,
-0.07343803346157074,
-0.07568186521530151,
-0.2013688087463379,
0.19456222653388977,
0.3146827518939972,
-0.10770289599895477,
0.2603708803653717,
0.3268934488296509,
0.1084655299782753,
0.03908461704850197,
0.0321369543671608,
0.5134730339050293,
0.11146454513072968,
0.10175353288650513,
-0.3079696595668793,
0.3317776322364807,
-0.0724368691444397,
-0.00529320165514946,
0.007985390722751617,
0.03549117594957352,
-0.20193737745285034,
-0.08075490593910217,
0.2424275279045105,
0.20385876297950745,
0.30539670586586,
0.13284340500831604,
-0.4071917235851288,
-0.2414136528968811,
-0.22726987302303314,
0.10150527954101562,
0.06376771628856659,
-0.11166783422231674,
0.1687994748353958,
-0.2642660140991211,
-0.24779456853866577,
0.0692894458770752,
0.029821600764989853,
-0.20537248253822327,
-0.3309779763221741,
0.2780853807926178,
-0.09068228304386139,
0.13103993237018585,
0.1359853446483612,
-0.1681678295135498,
-0.13997401297092438,
0.028018124401569366,
0.20126670598983765,
0.4450632929801941,
0.21623125672340393,
0.3482359051704407,
-0.08121135085821152,
0.18414120376110077,
0.18739134073257446,
0.08683459460735321,
-0.14919093251228333,
-0.144431933760643,
-0.05791095271706581,
0.4471454620361328,
0.05498046427965164,
-0.09754132479429245,
-0.17434567213058472,
0.3437556028366089,
-0.4006444215774536,
0.14845645427703857,
0.0369991697371006,
0.059518009424209595,
0.06954140961170197,
-0.11948555707931519,
0.2011263072490692,
-0.12703056633472443,
0.028415784239768982,
0.04252263158559799,
0.20522047579288483,
-0.1316225826740265,
-0.37323278188705444,
-0.36246243119239807,
-0.007388525642454624,
-0.3597954511642456,
-0.31539186835289,
-0.1538102775812149,
-0.2279757559299469,
0.029186084866523743,
0.41445592045783997,
0.06802777200937271,
-0.14645589888095856,
0.15938670933246613,
0.061505261808633804,
0.1875591278076172,
0.11551414430141449,
-0.03479987382888794,
-0.1598006784915924,
0.290331095457077,
-0.241240993142128,
-0.10836128890514374,
0.07114599645137787,
-0.531019389629364,
-0.02660239487886429,
-0.16246400773525238,
0.33988672494888306,
0.11562858521938324,
-0.034783124923706055,
-0.22075918316841125,
0.05356625095009804,
-0.022968456149101257,
0.06169985234737396,
-0.13616476953029633,
-0.03609819337725639,
-0.031489647924900055,
-0.17427510023117065,
-0.2630418539047241,
-0.07843703031539917,
-0.21271255612373352,
-0.08066579699516296,
0.213139608502388,
-0.24376052618026733,
0.4462297856807709,
0.1864670217037201,
-0.4033726453781128,
-0.18637420237064362,
-0.05024610459804535,
-0.3640907406806946,
0.47434139251708984,
0.13682588934898376,
0.07358749210834503,
-0.015506327152252197,
-0.3420582413673401,
-0.28809449076652527,
0.19259099662303925,
-0.5207995772361755,
0.18590039014816284,
-0.1758560985326767,
0.1164749264717102,
0.08310012519359589,
0.06312020123004913,
0.1933586150407791,
-0.45342960953712463,
0.03800160437822342,
0.18251878023147583,
-0.1492709070444107,
-0.032652247697114944,
0.17988449335098267,
0.3318059742450714,
-0.08590365946292877,
0.014352509751915932,
-0.2466759979724884,
0.0467030331492424,
0.16292235255241394,
0.39592650532722473,
0.3753141760826111,
0.29996931552886963,
0.10326831042766571,
-0.16680419445037842,
0.10714923590421677,
-0.2841087579727173,
-0.20212605595588684,
0.3099696636199951,
-0.13471092283725739,
-0.09590384364128113,
0.1231229156255722,
0.09577105194330215,
-0.02776053361594677,
0.33088362216949463,
0.3816866874694824,
-0.10500943660736084,
0.03361446410417557,
-0.09056811779737473,
-0.2089436799287796,
-0.2947334051132202,
-0.11455508321523666,
0.12339366972446442,
0.21407905220985413,
-0.20384180545806885,
-0.14259949326515198,
0.04798810929059982,
0.11141340434551239,
0.4643177390098572,
-0.14696626365184784,
0.1317480504512787,
0.17563718557357788,
0.13918519020080566,
0.28317907452583313,
0.1467544287443161,
-0.11294959485530853,
0.028546014800667763,
0.08825014531612396,
0.0038397610187530518,
-0.01710175722837448,
0.0007706843316555023,
-0.08572591841220856,
-0.13865722715854645,
0.40609222650527954,
0.39649972319602966,
0.1274341195821762,
0.036751508712768555,
-0.17496538162231445,
0.17765802145004272,
0.10540309548377991,
-0.07523679733276367,
-0.3395951986312866,
-0.24077075719833374,
0.07047099620103836,
-0.20539037883281708,
0.1528155654668808,
-0.35723283886909485,
0.15694770216941833,
0.5608733296394348,
0.19882832467556,
0.04032167047262192,
0.10056751221418381,
0.23905348777770996,
-0.21309129893779755,
0.1324034184217453,
0.13468940556049347,
0.02965814620256424,
0.25058865547180176,
0.1854363977909088,
-0.13068941235542297,
0.05257696285843849,
-0.12175748497247696,
0.249101459980011,
0.06092226505279541,
0.12894240021705627,
-0.026471223682165146,
0.07395351678133011,
-0.3952435851097107,
-0.41760993003845215,
0.39511701464653015,
0.06922245770692825,
0.07259824126958847,
-0.23431891202926636,
0.15349343419075012,
-0.5233275294303894,
0.13768288493156433,
-0.5066304206848145,
0.29016241431236267,
-0.02625628001987934,
-0.12815050780773163,
0.2060234248638153,
-0.0001258698757737875,
-0.29556703567504883,
0.1567372828722,
0.22542500495910645,
0.1939893513917923,
-0.2072199285030365,
0.05723543465137482,
-0.025922313332557678,
-0.29880690574645996,
-0.38476482033729553,
0.19920331239700317,
-0.17031753063201904,
-0.05367070436477661,
0.18978121876716614,
0.09502658993005753,
-0.037275418639183044,
-0.6440227627754211,
-0.362714946269989,
0.2028091847896576,
-0.01465553604066372,
0.06884772330522537,
0.023978883400559425,
0.06993011385202408,
-0.03408784791827202,
-0.09222462773323059,
0.16173645853996277,
-0.1894381046295166,
-0.15150007605552673,
-0.04783595725893974,
-0.21529805660247803,
0.07218633592128754,
-0.3262544870376587,
-0.47518986463546753,
0.04049881547689438,
-0.188108891248703,
0.2808273136615753,
0.18304133415222168,
0.06873007118701935,
-0.00965900905430317,
-0.07449771463871002,
-0.2157599776983261,
0.0508788600564003,
0.27236878871917725,
-0.25689470767974854,
-0.1623169183731079,
-0.08328224718570709,
-0.14162933826446533,
-0.3706414997577667,
0.08852794766426086,
0.10802878439426422,
-0.09266788512468338,
0.1630789041519165,
-0.1883167028427124,
-0.10147266834974289,
0.23264145851135254,
0.02234271913766861,
-0.03985803201794624,
0.1987408995628357,
0.3802628815174103,
0.04050946608185768,
-0.2393149435520172,
-0.23596951365470886,
-0.1725635826587677,
0.27628955245018005,
0.2229982316493988,
0.05867727845907211,
-0.0597802996635437,
0.4436545968055725,
-0.034047991037368774,
0.6153326630592346,
-0.17896392941474915,
0.05290021747350693,
0.4528711438179016,
-0.08154156059026718,
0.5144830942153931,
-0.065497487783432,
0.11098919063806534,
0.001426737755537033,
-0.01998654007911682,
-0.1654019057750702,
0.4626501202583313,
-0.22445416450500488,
-0.7357209920883179,
-0.10091372579336166,
-0.19114449620246887,
-0.19353333115577698,
-0.1896589696407318,
-0.26963362097740173,
0.26800820231437683,
0.22740218043327332,
0.18572816252708435,
-0.11497750133275986,
-0.060334865003824234,
0.2360328733921051,
0.1747196912765503,
-0.24787555634975433,
0.13693827390670776,
-0.010026175528764725,
-0.3892796039581299,
0.15297576785087585,
0.05035588890314102,
0.07386742532253265,
-0.21695713698863983,
0.12793384492397308,
-0.17895284295082092,
-0.26811856031417847,
0.27206575870513916,
-0.2161320447921753,
0.4263189733028412,
0.17530718445777893,
0.29261183738708496,
-0.03670531511306763,
-0.23928695917129517,
-0.15421278774738312,
-0.0841786190867424,
-0.2244233936071396,
0.06762215495109558,
0.30449485778808594,
0.3286117613315582,
-0.34698742628097534,
-0.006438318639993668,
-0.014050379395484924,
-0.12694096565246582,
-0.2496531456708908,
0.313040554523468,
-0.5036711692810059,
0.04526732861995697,
-0.275134414434433,
0.40166404843330383,
0.04690026491880417,
0.2110787332057953,
0.13937819004058838,
0.20292764902114868,
-0.18272802233695984,
-0.3580946922302246,
-0.3542509078979492,
0.14541679620742798,
0.4518543481826782,
-0.17123840749263763,
-0.15421807765960693,
0.03751976415514946,
0.4456365406513214,
0.3221459984779358,
0.21795986592769623,
-0.08780372142791748,
-0.10626207292079926,
0.13725262880325317,
-0.19438913464546204,
0.3685108423233032,
0.17129945755004883,
-0.10683274269104004,
0.15309205651283264,
-0.27554750442504883,
0.042922839522361755,
0.048855435103178024,
-0.3652724623680115,
0.00815349817276001,
-0.37717437744140625,
0.10102716088294983,
0.031733714044094086,
0.12144065648317337,
-0.15376216173171997,
-0.20927327871322632,
0.017179973423480988,
0.5107691287994385,
-0.2139190435409546,
0.4275699853897095,
0.33803293108940125,
0.7842774391174316,
0.1886029988527298,
-0.11286475509405136,
0.14362481236457825,
-0.6760938763618469,
-0.021314587444067,
-0.2345469743013382,
-0.043844498693943024,
-0.22699061036109924,
-0.16740702092647552,
0.15935809910297394,
-0.11238924413919449,
0.2506183683872223,
0.15003176033496857,
-0.1796574741601944,
0.21165676414966583,
0.10530774295330048,
-0.0220766793936491,
-0.0909900814294815,
0.12204301357269287,
0.15186430513858795,
0.17836016416549683,
-0.1867251992225647,
0.20093590021133423,
0.03778059780597687,
-0.2653524577617645,
-0.1766519397497177,
-0.06081392616033554,
0.11569292843341827,
-0.319397896528244,
0.06005004048347473,
0.12918683886528015,
0.137695774435997,
0.27046751976013184,
0.1623353213071823,
-0.3616711497306824,
-0.14546653628349304,
0.1700419932603836,
0.2264767587184906,
0.02779579721391201,
-0.060527361929416656,
0.2798158824443817,
0.1465807855129242,
0.09934483468532562,
-0.32585960626602173,
0.2388353943824768,
0.07205807417631149,
-0.2287805825471878,
-0.20984013378620148,
-0.08736169338226318,
-0.17522811889648438,
-0.4083133935928345,
-0.30730900168418884,
0.30574339628219604,
0.32864612340927124,
0.06400401890277863,
0.02568913623690605,
0.03976649418473244,
0.04006018489599228,
-0.2035333812236786,
0.23304741084575653,
-0.007720645517110825,
-0.16177302598953247,
-0.0035414770245552063,
0.09552005678415298,
-0.3476031720638275,
-0.24412032961845398,
0.39326170086860657,
0.18300506472587585,
0.1000165194272995,
0.1507371962070465,
-0.06019652262330055,
-0.35059458017349243,
-0.2655230760574341,
-0.19552740454673767,
-0.0018579326570034027,
-0.09553444385528564,
0.26922306418418884,
0.10275105386972427,
-0.23457375168800354,
0.25244301557540894,
0.3573811948299408,
-0.131569966673851,
0.1887468695640564,
-0.32225969433784485,
-0.08357838541269302,
0.029808908700942993,
-0.09519075602293015,
-0.2520776093006134,
0.0019387532956898212,
0.30689966678619385,
-0.14619408547878265,
0.1030382364988327,
-0.2892483174800873,
-0.4249292016029358,
0.2349071502685547,
-0.06171043962240219,
0.44627416133880615,
0.0033957529813051224,
-0.2960124909877777,
-0.17171147465705872,
0.027398452162742615,
0.21567296981811523,
-0.03332036733627319,
-0.07400093227624893,
-0.31811022758483887,
0.006876163184642792,
0.08977976441383362,
-0.049769327044487,
0.42887914180755615,
-0.2839888036251068,
-0.1104707419872284,
-0.14525645971298218,
0.16835711896419525,
0.2843424677848816,
-0.0385848730802536,
0.019833911210298538,
0.08268539607524872,
1.062978982925415,
0.08760601282119751,
-0.009874530136585236,
-0.19851899147033691,
0.08565166592597961,
0.0724281370639801,
-0.2319212406873703,
-0.13219310343265533,
-0.34837645292282104,
-0.032490409910678864,
-0.23415160179138184,
0.08192381262779236,
0.1216314360499382,
0.38147425651550293,
0.21596983075141907,
-0.11550480127334595,
-0.20369602739810944,
0.3352622389793396,
0.15269781649112701,
0.07976977527141571,
-0.04835238307714462,
-0.3469947874546051,
0.287963330745697,
0.37601813673973083,
-0.21712836623191833,
-0.23545339703559875,
0.27372705936431885,
0.12087713927030563,
-0.009107761085033417,
0.13746269047260284,
0.16403016448020935,
-0.17274215817451477,
0.4156548082828522,
0.35796964168548584,
0.13236911594867706,
-0.5104749798774719,
0.23746775090694427,
0.028688937425613403,
-0.1886051595211029,
-0.04955391213297844,
-0.008366762660443783,
0.1579636186361313,
0.04883519187569618,
0.2717724144458771,
0.3078080117702484,
0.21934723854064941,
0.4253372550010681,
-0.1250508427619934,
0.09371867030858994,
-0.005113288760185242,
0.3245601952075958,
0.17723610997200012,
0.19592922925949097,
0.14810919761657715,
0.36755824089050293,
-0.10959050059318542,
0.47144147753715515,
-0.2193637639284134,
-0.22539034485816956,
0.20406311750411987,
-0.4144987165927887,
-0.15857990086078644,
0.038139455020427704,
-0.053509607911109924,
0.043122947216033936,
0.3057286739349365,
-0.0764903873205185,
0.3893223702907562,
-0.355739951133728,
0.07244417071342468,
0.06936393678188324,
0.035008303821086884,
-0.09266087412834167,
-0.20191219449043274,
0.37610942125320435,
-0.10916779190301895,
0.26373615860939026,
-0.20209284126758575,
-0.14664360880851746,
0.03338161110877991,
0.04301172494888306,
-0.05494607239961624,
0.025362424552440643,
0.0789417177438736,
-0.28355973958969116,
0.31773626804351807,
-0.05778227746486664,
-0.16144585609436035,
0.0022137127816677094,
0.03513453155755997,
0.2733692526817322,
0.2544732391834259,
0.22265592217445374,
-0.2782799005508423,
0.1700623482465744,
0.1421632021665573,
0.002985134720802307,
-0.2562238574028015,
0.11488166451454163,
0.19599266350269318,
-0.2400149405002594,
-0.17107371985912323,
0.013555902987718582,
-0.15981826186180115,
-0.2139231115579605,
-0.2937580347061157,
0.07416915148496628,
-0.039152856916189194,
-0.18130508065223694,
0.1689630150794983,
0.15697409212589264,
0.5245457291603088,
-0.10359713435173035,
-0.39034080505371094,
-0.15903428196907043,
-0.37678858637809753,
-0.21828868985176086,
0.5397281646728516,
-0.233607217669487,
0.41983479261398315,
0.19019216299057007,
0.3194679319858551,
0.1365189552307129,
0.1723022758960724,
-0.01020791381597519,
0.26790371537208557,
-0.35619282722473145,
-0.012510936707258224,
-0.3257850408554077,
0.013735331594944,
0.3418159782886505,
-0.40552663803100586,
0.11922934651374817,
-0.04591560363769531,
0.274530291557312,
-0.029571903869509697,
0.28001824021339417,
-0.1427263766527176,
-0.3242396116256714,
-0.18005895614624023,
0.18824003636837006,
0.16508397459983826,
0.09164212644100189,
-0.10401317477226257,
-0.06490101665258408,
0.0726395845413208,
0.07975473999977112,
-0.319170206785202,
-0.1337246596813202,
0.17870527505874634,
-0.05195913463830948,
0.10320647060871124,
-0.13492166996002197,
-0.2764391303062439,
-0.09956446290016174,
0.1253771185874939,
0.21703171730041504,
0.13953103125095367,
-0.04220961779356003,
0.29685091972351074,
0.16065356135368347,
-0.19001346826553345,
-0.28032970428466797,
0.051736652851104736,
0.15328145027160645,
-0.08545757830142975,
-0.02980029582977295,
-0.3573179841041565,
0.3734433650970459,
-0.27946776151657104,
-0.5567255616188049,
0.004627399146556854,
0.31021231412887573,
0.08030542731285095,
-0.5342545509338379,
-0.21909835934638977,
-0.016147159039974213,
0.265755295753479,
-0.0870399996638298,
-0.11813035607337952,
-0.055327415466308594,
0.006036117672920227,
-0.02729254961013794,
-0.013981133699417114,
0.4172568917274475,
0.10193270444869995,
-0.022306352853775024,
0.0015317648649215698,
-0.11779111623764038
] |
https://github.com/huggingface/datasets/issues/6552 | This bug comes from the `huggingface_hub` library, see: https://github.com/huggingface/huggingface_hub/issues/1952
A fix is provided at https://github.com/huggingface/huggingface_hub/pull/1953. Feel free to install `huggingface_hub` from this PR, or wait for it to be merged and the new version of `huggingface_hub` to be released | Loading a dataset from Google Colab hangs at "Resolving data files". | ### Describe the bug
Hello,
I'm trying to load a dataset from Google Colab but the process hangs at `Resolving data files`:
![image](https://github.com/huggingface/datasets/assets/99779/7175ad85-e571-46ed-9f87-92653985777d)
It is happening when the `_get_origin_metadata` definition is invoked:
```python
def _get_origin_metadata(
data_files: List[str],
max_workers=64,
download_config: Optional[DownloadConfig] = None,
) -> Tuple[str]:
return thread_map(
partial(_get_single_origin_metadata, download_config=download_config),
data_files,
max_workers=max_workers,
tqdm_class=hf_tqdm,
desc="Resolving data files",
disable=len(data_files) <= 16,
```
The thread is then stuck at `waiter.acquire()` in the builtin `threading.py` file.
I can load the dataset just fine on my machine.
Cheers,
Thomas
### Steps to reproduce the bug
In Google Colab:
```python
!pip install datasets
from datasets import load_dataset
dataset = load_dataset("colour-science/color-checker-detection-dataset")
```
### Expected behavior
The dataset should be loaded.
### Environment info
- `datasets` version: 2.16.1
- Platform: Linux-6.1.58+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 10.0.1
- Pandas version: 1.5.3
- `fsspec` version: 2023.6.0 | 39 | Loading a dataset from Google Colab hangs at "Resolving data files".
### Describe the bug
Hello,
I'm trying to load a dataset from Google Colab but the process hangs at `Resolving data files`:
![image](https://github.com/huggingface/datasets/assets/99779/7175ad85-e571-46ed-9f87-92653985777d)
It is happening when the `_get_origin_metadata` definition is invoked:
```python
def _get_origin_metadata(
data_files: List[str],
max_workers=64,
download_config: Optional[DownloadConfig] = None,
) -> Tuple[str]:
return thread_map(
partial(_get_single_origin_metadata, download_config=download_config),
data_files,
max_workers=max_workers,
tqdm_class=hf_tqdm,
desc="Resolving data files",
disable=len(data_files) <= 16,
```
The thread is then stuck at `waiter.acquire()` in the builtin `threading.py` file.
I can load the dataset just fine on my machine.
Cheers,
Thomas
### Steps to reproduce the bug
In Google Colab:
```python
!pip install datasets
from datasets import load_dataset
dataset = load_dataset("colour-science/color-checker-detection-dataset")
```
### Expected behavior
The dataset should be loaded.
### Environment info
- `datasets` version: 2.16.1
- Platform: Linux-6.1.58+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 10.0.1
- Pandas version: 1.5.3
- `fsspec` version: 2023.6.0
This bug comes from the `huggingface_hub` library, see: https://github.com/huggingface/huggingface_hub/issues/1952
A fix is provided at https://github.com/huggingface/huggingface_hub/pull/1953. Feel free to install `huggingface_hub` from this PR, or wait for it to be merged and the new version of `huggingface_hub` to be released | [
-0.19339069724082947,
-0.11780481040477753,
0.030356813222169876,
0.40891021490097046,
0.09424534440040588,
-0.0761006623506546,
0.26371243596076965,
0.04111425578594208,
0.033734604716300964,
0.24775028228759766,
-0.11173553764820099,
0.4329826235771179,
0.03821532055735588,
-0.042721688747406006,
-0.2304295301437378,
0.012850548140704632,
-0.043758902698755264,
0.01593346893787384,
0.2468658685684204,
0.10732521116733551,
-0.38393068313598633,
0.4550448954105377,
-0.22813153266906738,
-0.1521381139755249,
-0.7041703462600708,
-0.04670524597167969,
0.15998312830924988,
0.19870100915431976,
-0.04649381712079048,
-0.13025261461734772,
0.34376853704452515,
0.23903346061706543,
-0.1411370187997818,
0.4385457932949066,
-0.0001269387430511415,
-0.05680036544799805,
0.5695585012435913,
0.2000839114189148,
-0.2923889756202698,
-0.35008659958839417,
-0.3076998293399811,
-0.007228698581457138,
0.2429504692554474,
0.11146606504917145,
-0.13000288605690002,
0.45575565099716187,
-0.038086794316768646,
-0.11919459700584412,
0.1036716178059578,
0.033509448170661926,
0.0361592099070549,
-0.0027647241950035095,
-0.06089818850159645,
-0.11561581492424011,
-0.08882689476013184,
-0.17126204073429108,
-0.08507980406284332,
0.8751480579376221,
0.3692364990711212,
-0.10913129150867462,
-0.02553173527121544,
0.2658747136592865,
-0.06310674548149109,
0.19969500601291656,
0.025223685428500175,
0.0465439073741436,
-0.07157593965530396,
-0.4535883665084839,
0.5070464015007019,
0.1770906299352646,
0.4470572769641876,
0.06093117967247963,
-0.28069204092025757,
-0.36819058656692505,
0.3246406614780426,
-0.10741941630840302,
0.4512319266796112,
0.31158602237701416,
-0.2526381015777588,
0.20236854255199432,
-0.027145324274897575,
-0.21344533562660217,
-0.019353225827217102,
-0.09370320290327072,
-0.29401230812072754,
0.19613170623779297,
-0.23776593804359436,
0.22371211647987366,
0.14673292636871338,
0.05509425699710846,
0.2878633737564087,
-0.13471925258636475,
0.17308470606803894,
0.07525916397571564,
-0.36308977007865906,
0.3386915326118469,
0.25507983565330505,
0.5801429152488708,
0.025435887277126312,
0.1246471181511879,
-0.2192072868347168,
0.12454836070537567,
-0.320833295583725,
0.20859193801879883,
0.19269755482673645,
-0.20919258892536163,
-0.0642065703868866,
-0.19800451397895813,
0.4629349112510681,
0.20081165432929993,
-0.20733493566513062,
0.08419844508171082,
-0.1995636522769928,
-0.27541065216064453,
-0.2589922547340393,
-0.019554657861590385,
0.32830846309661865,
-0.24390524625778198,
-0.05803203582763672,
0.05837935209274292,
-0.33606162667274475,
0.25695979595184326,
0.2651255428791046,
0.41272401809692383,
-0.41287684440612793,
0.18924160301685333,
-0.02977607026696205,
-0.11052305996417999,
-0.2737932801246643,
0.1234440952539444,
-0.07782028615474701,
-0.05856001377105713,
-0.060544975101947784,
0.1415451467037201,
0.23896192014217377,
-0.47080036997795105,
0.26260024309158325,
0.18944205343723297,
0.2754988968372345,
-0.22128966450691223,
-0.028566744178533554,
-0.4022781252861023,
-0.09772142767906189,
0.42685186862945557,
0.07454020529985428,
0.2664381265640259,
-0.12903116643428802,
-0.12336793541908264,
-0.1881662905216217,
0.02246040105819702,
-0.3739396929740906,
-0.07777699083089828,
-0.05595420300960541,
0.014185144565999508,
-0.33138322830200195,
0.24067404866218567,
-0.5232260227203369,
-0.06705594807863235,
0.01643291860818863,
-0.0524819940328598,
-0.015447694808244705,
-0.2781343162059784,
-0.3081851303577423,
-0.2225123792886734,
0.08788494765758514,
0.5161378979682922,
-0.098935566842556,
0.09655116498470306,
-0.13863733410835266,
-0.07929539680480957,
0.08537831902503967,
0.3047272562980652,
-0.05613379552960396,
-0.012518603354692459,
-0.4314713478088379,
0.05760771036148071,
-0.4367676079273224,
-0.1614905595779419,
-0.6511999368667603,
0.3178328275680542,
-0.3619280457496643,
0.5175087451934814,
0.02963319420814514,
-0.05488628149032593,
-0.13040924072265625,
-0.24162060022354126,
0.6349373459815979,
0.31913235783576965,
-0.0946420207619667,
0.059031471610069275,
-0.27488136291503906,
0.09077919274568558,
-0.31433260440826416,
0.19247698783874512,
-0.0515277199447155,
0.05620846524834633,
-0.09096023440361023,
-0.2670823931694031,
0.09102632105350494,
0.04561622068285942,
-0.11242419481277466,
0.28899645805358887,
0.36377817392349243,
0.012791980989277363,
0.01875130832195282,
0.029684722423553467,
-0.61436527967453,
0.4146064817905426,
0.3622590899467468,
0.1620754450559616,
-0.49896860122680664,
-0.16532427072525024,
-0.1827024519443512,
0.21495532989501953,
-0.17389844357967377,
0.20737719535827637,
-0.16961264610290527,
0.06274320185184479,
0.015106365084648132,
0.32598644495010376,
0.062217652797698975,
0.7911404371261597,
-0.09245318919420242,
0.09184704720973969,
-0.34149685502052307,
0.4204937815666199,
0.1439446359872818,
-0.10839155316352844,
0.07560256123542786,
-0.010962922126054764,
-0.044575560837984085,
-0.22565695643424988,
-0.017492767423391342,
0.11435182392597198,
0.18705317378044128,
0.2754371166229248,
0.13262292742729187,
0.29035311937332153,
0.2892889082431793,
-0.11180543154478073,
-0.10046414285898209,
-0.16792306303977966,
0.1890181452035904,
-0.11679846793413162,
0.12497668713331223,
0.38645580410957336,
-0.30304792523384094,
0.2928522527217865,
-0.06629671156406403,
-0.040567390620708466,
0.46511632204055786,
0.1410476714372635,
-0.19733381271362305,
0.04204414784908295,
0.4811251759529114,
0.25885239243507385,
0.4468638598918915,
0.21374104917049408,
-0.4356875419616699,
0.24155710637569427,
0.42090392112731934,
0.019854046404361725,
-0.1788800060749054,
0.12887850403785706,
-0.04089174419641495,
-0.08948491513729095,
0.24536627531051636,
0.08596451580524445,
0.3526385724544525,
-0.01940322294831276,
0.13499592244625092,
0.20707587897777557,
-0.08447928726673126,
-0.3266070783138275,
-0.15952305495738983,
0.21510502696037292,
0.3137548565864563,
0.18753226101398468,
-0.04192016273736954,
-0.005655327811837196,
-0.06196443736553192,
-0.32240015268325806,
0.060179293155670166,
0.2545469403266907,
-0.19919662177562714,
0.23822492361068726,
-0.4177466332912445,
-0.03618903085589409,
-0.18817082047462463,
-0.2353762686252594,
-0.3942389488220215,
-0.34660112857818604,
-0.35696130990982056,
0.5668365359306335,
0.1099240854382515,
-0.07195810973644257,
0.21813538670539856,
0.24176517128944397,
0.02845129370689392,
-0.20243629813194275,
-0.29759782552719116,
-0.36658456921577454,
0.1138562560081482,
-0.14157161116600037,
0.4109190106391907,
0.02349531650543213,
0.2731533944606781,
-0.17957201600074768,
-0.09838436543941498,
-0.09297623485326767,
-0.15978538990020752,
0.28274667263031006,
-0.14539065957069397,
0.5864458084106445,
0.14400945603847504,
0.11179406940937042,
-0.3376292586326599,
0.13663342595100403,
0.005807109177112579,
-0.03763182461261749,
0.019360356032848358,
-0.266410768032074,
-0.0651102066040039,
0.12813574075698853,
-0.04433664679527283,
0.14821885526180267,
-0.35744261741638184,
-0.19929754734039307,
0.3744983673095703,
-0.407474547624588,
-0.022028282284736633,
0.343936949968338,
-0.028433963656425476,
0.20670729875564575,
0.058357421308755875,
-0.09733954071998596,
-0.29494112730026245,
-0.439816951751709,
0.15690097212791443,
-0.18107780814170837,
-0.23921000957489014,
0.06877094507217407,
-0.2385074496269226,
0.22100980579853058,
0.11893065273761749,
-0.36975646018981934,
-0.3532240092754364,
-0.2785857617855072,
0.1763005256652832,
0.011565640568733215,
-0.11075030267238617,
-0.059886861592531204,
-0.08383296430110931,
0.15392130613327026,
-0.004396349191665649,
-0.21524706482887268,
-0.1528269499540329,
0.1505643129348755,
0.0398760586977005,
0.2775181233882904,
0.24687133729457855,
-0.16365483403205872,
0.3918459713459015,
0.12697122991085052,
0.26339972019195557,
0.06834717094898224,
0.11040360480546951,
0.2160191386938095,
-0.172716423869133,
-0.30028650164604187,
0.019095975905656815,
-0.08211283385753632,
-0.344927042722702,
0.22984124720096588,
0.08555248379707336,
0.05658816546201706,
-0.15672947466373444,
-0.21674279868602753,
-0.3735675513744354,
-0.4306051731109619,
-0.0004975106567144394,
0.108537457883358,
0.1903100311756134,
0.09964302182197571,
-0.004473835229873657,
0.032840415835380554,
-0.06356525421142578,
-0.07803180068731308,
0.46099239587783813,
0.24160370230674744,
-0.16460254788398743,
0.23608370125293732,
-0.4558071494102478,
-0.5488191843032837,
0.144300639629364,
0.3657253682613373,
0.19440209865570068,
-0.09125270694494247,
0.2668606638908386,
0.2925781309604645,
-0.2601874768733978,
0.6352667808532715,
0.07728058099746704,
0.07146795094013214,
0.08828525990247726,
-0.4169398248195648,
-0.20943352580070496,
0.10869872570037842,
0.09469935297966003,
0.18457692861557007,
0.18968188762664795,
0.23225636780261993,
-0.3019547462463379,
-0.08700920641422272,
0.10191508382558823,
0.1371701955795288,
-0.11993444710969925,
-0.09301392734050751,
-0.4032593369483948,
-0.4593259394168854,
-0.20824608206748962,
0.13137175142765045,
0.012313298881053925,
0.24383322894573212,
-0.14883452653884888,
-0.08261492848396301,
0.07922559231519699,
-0.11859337240457535,
0.08127275109291077,
0.3208712041378021,
-0.06482411175966263,
0.19135472178459167,
0.23345214128494263,
0.174928218126297,
0.03785473108291626,
0.4679396152496338,
0.7293875813484192,
0.1794099658727646,
-0.2751320004463196,
0.11641182005405426,
-0.03332165628671646,
0.175645112991333,
0.40128493309020996,
-0.20771002769470215,
-0.021623853594064713,
-0.2145477831363678,
0.08163172006607056,
-0.20944775640964508,
0.44483768939971924,
-0.06952076405286789,
0.23087963461875916,
-0.6138709783554077,
-0.1602599322795868,
0.6225003004074097,
0.26182714104652405,
-0.16142432391643524,
0.45093226432800293,
0.18889561295509338,
-0.037963733077049255,
-0.11005645990371704,
-0.02317274734377861,
0.755856990814209,
-0.17841961979866028,
-0.20006604492664337,
0.32386162877082825,
-0.2181050181388855,
0.41948413848876953,
-0.006435170769691467,
0.1720123440027237,
-0.2861831784248352,
-0.4394417405128479,
-0.004526406526565552,
-0.2047424167394638,
0.07647599279880524,
-0.03679123520851135,
0.010423541069030762,
0.08058863133192062,
0.06335559487342834,
0.07246527820825577,
0.11220159381628036,
0.2340640425682068,
-0.22986842691898346,
-0.34375178813934326,
-0.5078316330909729,
0.0260532908141613,
-0.31733620166778564,
0.37608200311660767,
-0.27050676941871643,
0.14239327609539032,
-0.252634197473526,
0.052632808685302734,
-0.217529758810997,
0.19092407822608948,
-0.07517096400260925,
0.009701352566480637,
0.06946802884340286,
-0.21830204129219055,
0.1079682856798172,
-0.3905891180038452,
-0.035193510353565216,
0.114578977227211,
-0.22681981325149536,
0.3165936768054962,
-0.1352219432592392,
-0.21610456705093384,
0.2034042477607727,
-0.1123804822564125,
0.22545744478702545,
0.06543916463851929,
0.05043928325176239,
-0.13654592633247375,
-0.05261608213186264,
-0.23689258098602295,
0.12555409967899323,
0.1980123072862625,
-0.20415282249450684,
0.2930924892425537,
-0.3103741705417633,
0.0714026540517807,
0.18472619354724884,
-0.153564915060997,
0.015814486891031265,
0.20249208807945251,
-0.08326084911823273,
0.2546249330043793,
-0.06097085028886795,
-0.3116760849952698,
-0.11461974680423737,
0.6102808713912964,
-0.1035604178905487,
-0.245884507894516,
0.34657347202301025,
0.35207629203796387,
-0.20913366973400116,
-0.07320691645145416,
-0.11660328507423401,
-0.13996845483779907,
-0.4940503239631653,
0.4364132285118103,
0.1476283073425293,
0.12242782115936279,
0.013908956199884415,
0.10217718780040741,
0.2585360109806061,
-0.3236789405345917,
0.030100017786026,
-0.6159478425979614,
-0.25105994939804077,
0.07061527669429779,
-0.2967684864997864,
0.02930578961968422,
0.1228676438331604,
0.13382424414157867,
-0.02255069464445114,
-0.09148439764976501,
-0.12248868495225906,
0.03366252779960632,
-0.5499287843704224,
-0.09774389863014221,
0.4231990575790405,
-0.031126853078603745,
0.23840761184692383,
-0.028671378269791603,
-0.05517023801803589,
0.2906668186187744,
0.06960976123809814,
-0.089566670358181,
-0.11298425495624542,
0.17739194631576538,
-0.009380053728818893,
-0.04158279299736023,
0.03459223359823227,
-0.23566530644893646,
0.03172603249549866,
-0.0630752295255661,
0.5166410803794861,
0.1959581822156906,
0.13958074152469635,
-0.280792772769928,
0.15977585315704346,
0.3067065179347992,
0.03637615591287613,
0.3845294713973999,
0.12601616978645325,
0.2706332802772522,
0.19540494680404663,
0.038309451192617416,
-0.06998072564601898,
0.12162245810031891,
0.16183102130889893,
0.027792010456323624,
0.03684328496456146,
-0.17067119479179382,
0.4266638159751892,
-0.2733386754989624,
0.20745378732681274,
0.09200435876846313,
0.21808362007141113,
0.3145008981227875,
0.05525151640176773,
-0.2966686189174652,
0.28190645575523376,
0.011759152635931969,
-0.06484115123748779,
-0.029442276805639267,
0.36315369606018066,
0.1851731389760971,
-0.13487958908081055,
0.21116721630096436,
0.1586519032716751,
0.2862701714038849,
-0.0588390976190567,
0.25614073872566223,
0.43633201718330383,
0.294546902179718,
-0.08351235836744308,
0.1174595057964325,
0.11163246631622314,
0.3661653399467468,
0.33091336488723755,
0.2357410043478012,
0.19662538170814514,
0.2311645746231079,
-0.018378138542175293,
0.14075057208538055,
-0.24366500973701477,
0.36592695116996765,
0.2381429523229599,
-0.6353718638420105,
-0.316069632768631,
0.1443914771080017,
-0.2535167634487152,
0.010496138595044613,
-0.09790312498807907,
0.2141505777835846,
-0.4794400930404663,
-0.09796737134456635,
-0.20441320538520813,
0.5043331384658813,
-0.1734079271554947,
-0.0928163155913353,
0.26771658658981323,
0.003291413187980652,
-0.10535967350006104,
0.2098260074853897,
-0.010852995328605175,
-0.04516807571053505,
0.12745489180088043,
0.19051705300807953,
-0.036880962550640106,
-0.2007717788219452,
-0.25459983944892883,
0.09346778690814972,
0.06524495780467987,
-0.09868555516004562,
0.11149755865335464,
-0.1665172427892685,
0.06729711592197418,
-0.13346250355243683,
0.005827600136399269,
0.24199679493904114,
0.16664136946201324,
-0.2412295788526535,
-0.296644389629364,
-0.03286007419228554,
0.24105264246463776,
-0.05943286046385765,
0.3287959396839142,
0.11584551632404327,
0.04713347554206848,
0.2730993628501892,
-0.041666094213724136,
-0.10984571278095245,
0.02503766119480133,
-0.0005467105656862259,
0.3110560476779938,
-0.19638025760650635,
0.16126933693885803,
-0.2976031005382538,
0.15282119810581207,
-0.17907601594924927,
0.22892330586910248,
-0.3403470814228058,
0.12981872260570526,
0.26083576679229736,
-0.21404045820236206,
-0.1765131950378418,
0.05520869046449661,
-0.025143248960375786,
-0.20956003665924072,
0.5693018436431885,
0.53130704164505,
0.5328185558319092,
-0.29522547125816345,
-0.3458600640296936,
-0.5491938591003418,
0.10142812132835388,
0.07995832711458206,
-0.005547560751438141,
-0.027462277561426163,
0.08528943359851837,
-0.15531319379806519,
0.21541018784046173,
-0.37764883041381836,
-0.003043033182621002,
0.3447684049606323,
0.06029647961258888,
-0.010061636567115784,
-0.1508512794971466,
-0.1666150838136673,
-0.5757185220718384,
-0.20464053750038147,
-0.30337679386138916,
0.06169793754816055,
-0.29224246740341187,
-0.11904394626617432,
-0.16542133688926697,
-0.2768603563308716,
-0.10279024392366409,
-0.1276375949382782,
0.4159373939037323,
0.22579683363437653,
0.2207615226507187,
0.07325441390275955,
-0.04094831645488739,
-0.19595886766910553,
-0.23986774682998657,
0.12163740396499634,
0.0804448202252388,
-0.12480435520410538,
0.3816547989845276,
0.04070720076560974,
0.31046581268310547,
-0.29529163241386414,
0.12104153633117676,
-0.04927407205104828,
0.16167953610420227,
-0.10580842941999435,
-0.05076979473233223,
-0.3514516353607178,
0.23054499924182892,
-0.12603068351745605,
0.4078757166862488,
0.10796216130256653,
0.3029501140117645,
-0.20140139758586884,
-0.1902635544538498,
0.5233443975448608,
-0.24768657982349396,
-0.3668655455112457,
0.0697583481669426,
0.2336341291666031,
-0.11664895713329315,
-0.4827856123447418,
-0.19678029417991638,
0.03073228895664215,
0.07652804255485535,
-0.08612152934074402,
-0.29760634899139404,
0.20744441449642181,
0.07260257005691528,
0.06607681512832642,
-0.1800796389579773,
-0.04958553984761238,
0.05074702575802803,
-0.09016107767820358,
0.0054726749658584595,
-0.06759849190711975
] |
https://github.com/huggingface/datasets/issues/6549 | Maybe we can add a helper message like `Maybe try again using "hf://path/without/resolve"` if the path contains `/resolve/` ?
e.g.
```
FileNotFoundError: Unable to find 'hf://datasets/HuggingFaceTB/eval_data/resolve/main/eval_data_context_and_answers.json'
It looks like you used parts of the URL of the file from the Hugging Face website, but you should remove the "/resolve/<revision>" part to have a valid `hf://` path.
Please try again using this path instead:
hf://datasets/HuggingFaceTB/eval_data/eval_data_context_and_answers.json
```
and suggest `f"hf://datasets/HuggingFaceTB/eval_data@{revision}/eval_data_context_and_answers.json"` if revision != "main"
EDIT: I think this message should also be raised from the `huggingface_hub`'s `HfFileSystem` implementation | Loading from hf hub with clearer error message | ### Feature request
Shouldn't this kinda work ?
```
Dataset.from_json("hf://datasets/HuggingFaceTB/eval_data/resolve/main/eval_data_context_and_answers.json")
```
I got an error
```
File ~/miniconda3/envs/datatrove/lib/python3.10/site-packages/datasets/data_files.py:380, in resolve_pattern(pattern, base_path, allowed_extensions, download_config)
378 if allowed_extensions is not None:
379 error_msg += f" with any supported extension {list(allowed_extensions)}"
--> 380 raise FileNotFoundError(error_msg)
381 return out
FileNotFoundError: Unable to find 'hf://datasets/HuggingFaceTB/eval_data/resolve/main/eval_data_context_and_answers.json'
(I'm logged in)
```
Fix: the correct path is
```
hf://datasets/HuggingFaceTB/eval_data/eval_data_context_and_answers.json
```
Proposal: raise a clearer error
### Motivation
Clearer error message
### Your contribution
Can open a PR | 86 | Loading from hf hub with clearer error message
### Feature request
Shouldn't this kinda work ?
```
Dataset.from_json("hf://datasets/HuggingFaceTB/eval_data/resolve/main/eval_data_context_and_answers.json")
```
I got an error
```
File ~/miniconda3/envs/datatrove/lib/python3.10/site-packages/datasets/data_files.py:380, in resolve_pattern(pattern, base_path, allowed_extensions, download_config)
378 if allowed_extensions is not None:
379 error_msg += f" with any supported extension {list(allowed_extensions)}"
--> 380 raise FileNotFoundError(error_msg)
381 return out
FileNotFoundError: Unable to find 'hf://datasets/HuggingFaceTB/eval_data/resolve/main/eval_data_context_and_answers.json'
(I'm logged in)
```
Fix: the correct path is
```
hf://datasets/HuggingFaceTB/eval_data/eval_data_context_and_answers.json
```
Proposal: raise a clearer error
### Motivation
Clearer error message
### Your contribution
Can open a PR
Maybe we can add a helper message like `Maybe try again using "hf://path/without/resolve"` if the path contains `/resolve/` ?
e.g.
```
FileNotFoundError: Unable to find 'hf://datasets/HuggingFaceTB/eval_data/resolve/main/eval_data_context_and_answers.json'
It looks like you used parts of the URL of the file from the Hugging Face website, but you should remove the "/resolve/<revision>" part to have a valid `hf://` path.
Please try again using this path instead:
hf://datasets/HuggingFaceTB/eval_data/eval_data_context_and_answers.json
```
and suggest `f"hf://datasets/HuggingFaceTB/eval_data@{revision}/eval_data_context_and_answers.json"` if revision != "main"
EDIT: I think this message should also be raised from the `huggingface_hub`'s `HfFileSystem` implementation | [
0.2066141963005066,
-0.25089403986930847,
0.036134351044893265,
0.32898765802383423,
0.2908268868923187,
-0.08821091055870056,
0.07552556693553925,
0.5636864900588989,
0.05773176997900009,
0.033721961081027985,
-0.17770984768867493,
0.16017961502075195,
0.1350436508655548,
0.17397338151931763,
-0.09642903506755829,
-0.12948133051395416,
-0.13553878664970398,
0.16222324967384338,
0.17621992528438568,
-0.1518477201461792,
-0.20246322453022003,
0.19416673481464386,
-0.011352278292179108,
0.24014639854431152,
-0.37350958585739136,
0.021543631330132484,
-0.022986963391304016,
0.6334507465362549,
-0.0630318745970726,
-0.517019510269165,
0.18978486955165863,
-0.013353485614061356,
0.32982802391052246,
0.2631840407848358,
-0.00011403964890632778,
0.04455725848674774,
0.459983229637146,
0.009953714907169342,
-0.3632204532623291,
-0.26605483889579773,
-0.22306597232818604,
-0.2671535015106201,
0.16376963257789612,
-0.1137295737862587,
-0.12874649465084076,
-0.1476796567440033,
-0.0301969051361084,
0.1252811849117279,
0.5932833552360535,
0.2104497253894806,
0.15682728588581085,
0.442264199256897,
-0.022849224507808685,
-0.24203082919120789,
0.22624173760414124,
0.4215611219406128,
0.05190734565258026,
0.2504330277442932,
-0.03618302568793297,
-0.20886151492595673,
-0.06717287003993988,
0.16453410685062408,
-0.09254904091358185,
0.04108535498380661,
0.5331271886825562,
-0.10700301826000214,
0.037280719727277756,
-0.20592160522937775,
0.009019944816827774,
0.302013099193573,
0.3755563795566559,
0.01847037672996521,
-0.20179659128189087,
-0.3970929980278015,
-0.18323859572410583,
0.23885376751422882,
0.26630187034606934,
-0.013336455449461937,
-0.1577957570552826,
0.10538338124752045,
0.26722609996795654,
-0.42450660467147827,
-0.11689602583646774,
0.20956715941429138,
-0.17073841392993927,
0.2111472338438034,
-0.08622206747531891,
0.024348553270101547,
0.12893015146255493,
-0.17671671509742737,
-0.0482323132455349,
-0.03618809953331947,
-0.07627394050359726,
0.23460374772548676,
-0.3003852367401123,
-0.11627379804849625,
0.26177871227264404,
-0.11505906283855438,
0.25135934352874756,
0.1334916353225708,
-0.059863947331905365,
0.049490440636873245,
-0.31800758838653564,
-0.043884001672267914,
0.20211967825889587,
0.24623669683933258,
0.21482059359550476,
-0.04748708754777908,
0.23072397708892822,
0.3871362507343292,
0.1808134913444519,
0.00463505182415247,
-0.1904579997062683,
-0.19329825043678284,
-0.6110118627548218,
-0.002024739980697632,
0.11260974407196045,
-0.2815755307674408,
-0.3192577362060547,
0.10294413566589355,
-0.10731219500303268,
-0.2037772834300995,
0.17938551306724548,
0.6842281222343445,
0.0014536939561367035,
0.282239705324173,
0.012568451464176178,
0.025711946189403534,
-0.19236549735069275,
-0.05198189616203308,
-0.19238202273845673,
0.10480640828609467,
-0.24438664317131042,
0.14795438945293427,
0.16788366436958313,
-0.19018030166625977,
0.1798090934753418,
-0.1721704751253128,
0.1917814314365387,
-0.07762478291988373,
-0.17801403999328613,
-0.0887879952788353,
0.15558072924613953,
0.09339703619480133,
-0.12277141213417053,
0.19513148069381714,
0.4587559103965759,
-0.12949252128601074,
-0.16335174441337585,
-0.03564867749810219,
-0.37892067432403564,
-0.42030879855155945,
-0.23619835078716278,
0.138254314661026,
-0.19553163647651672,
0.09736032783985138,
-0.14679040014743805,
-0.1779344379901886,
-0.3598129451274872,
0.07357807457447052,
0.016191840171813965,
0.19575154781341553,
0.1283450722694397,
-0.265047550201416,
0.33446621894836426,
0.5727850794792175,
-0.10760656744241714,
-0.2285817563533783,
-0.13073453307151794,
-0.1754510998725891,
-0.1743897646665573,
0.318279504776001,
-0.2588188350200653,
0.3275199830532074,
-0.5621041059494019,
0.33024710416793823,
0.017058048397302628,
-0.6066382527351379,
-0.2349262535572052,
0.6144328713417053,
-0.4163050055503845,
0.17195770144462585,
0.13689377903938293,
-0.13406333327293396,
-0.11299510300159454,
-0.1579338014125824,
0.18486016988754272,
0.07265119254589081,
0.41431957483291626,
-0.031305212527513504,
-0.33004847168922424,
-0.18280604481697083,
-0.133100688457489,
0.295198917388916,
-0.029214588925242424,
0.12107519805431366,
0.20721028745174408,
-0.039162635803222656,
0.4826478362083435,
-0.07413531839847565,
-0.09988230466842651,
0.3372790515422821,
0.3783990144729614,
0.244778573513031,
-0.014615006744861603,
0.10865519940853119,
-0.3382781744003296,
0.15850937366485596,
-0.2081359624862671,
0.10828752815723419,
-0.2679327428340912,
-0.19713462889194489,
-0.44106525182724,
-0.13522207736968994,
-0.24932333827018738,
-0.19345971941947937,
0.08984872698783875,
0.09944033622741699,
-0.10140302777290344,
-0.11331354081630707,
-0.2486794888973236,
0.707537829875946,
-0.13571880757808685,
0.1645197868347168,
-0.35224178433418274,
0.606278121471405,
-0.06186981499195099,
0.14151765406131744,
0.0204327329993248,
0.163821280002594,
0.36464381217956543,
-0.05559350550174713,
-0.019801953807473183,
0.2930327355861664,
-0.03306252136826515,
0.16046921908855438,
0.15380457043647766,
-0.10961593687534332,
0.152887761592865,
-0.3028021454811096,
0.09705185145139694,
-0.0007383972406387329,
-0.027775507420301437,
0.2595195770263672,
0.009867865592241287,
0.26089999079704285,
-0.07916126400232315,
0.25150519609451294,
0.248921737074852,
-0.17266055941581726,
0.14039377868175507,
-0.07969274371862411,
-0.07272495329380035,
-0.4263419210910797,
0.31983324885368347,
0.51454097032547,
-0.006882756948471069,
-0.017344817519187927,
0.07724784314632416,
0.06638814508914948,
0.5439707636833191,
-0.07628057897090912,
0.01297443825751543,
0.3445917069911957,
-0.13031375408172607,
0.11949774622917175,
0.22980797290802002,
0.1844991147518158,
0.2055988311767578,
0.2575280964374542,
-0.2565537095069885,
0.23447977006435394,
-0.030084149911999702,
-0.07659518718719482,
0.15086433291435242,
-0.029457174241542816,
0.20644305646419525,
0.25486668944358826,
-0.15448340773582458,
0.0066485218703746796,
-0.2955394387245178,
-0.4814037084579468,
-0.193430095911026,
0.09775190055370331,
-0.4482054114341736,
-0.3507227301597595,
-0.35715538263320923,
-0.14724476635456085,
0.12511330842971802,
-0.10959100723266602,
-0.5096405744552612,
-0.27322977781295776,
0.015343807637691498,
0.08704336732625961,
-0.1431116908788681,
-0.009708913043141365,
-0.02285923808813095,
0.28443068265914917,
-0.24618056416511536,
-0.19488221406936646,
-0.3163052201271057,
-0.10446189343929291,
-0.15167632699012756,
-0.005024947226047516,
0.08978605270385742,
0.12782903015613556,
0.010798379778862,
-0.530318021774292,
0.04063796252012253,
-0.4123404920101166,
-0.2918678820133209,
0.28555434942245483,
-0.1266050636768341,
0.3037024736404419,
0.30761414766311646,
0.3299410939216614,
-0.15289625525474548,
-0.16888222098350525,
0.3408185541629791,
0.037387169897556305,
-0.24226458370685577,
-0.026245929300785065,
0.07000355422496796,
0.17405441403388977,
-0.004754364490509033,
-0.18761207163333893,
-0.1473904848098755,
-0.5593529343605042,
0.31353816390037537,
-0.07015538215637207,
0.28087007999420166,
0.22379657626152039,
-0.1090126484632492,
0.20244944095611572,
-0.34871748089790344,
0.07868354022502899,
-0.2896488904953003,
-0.2159341275691986,
0.24163039028644562,
-0.24878710508346558,
-0.16645942628383636,
0.08324538171291351,
-0.03094310313463211,
0.15974712371826172,
-0.41081464290618896,
-0.5225210189819336,
-0.43782031536102295,
-0.12065733969211578,
0.3757627010345459,
-0.31552767753601074,
0.17004422843456268,
0.21818530559539795,
-0.06413782387971878,
-0.06059823930263519,
-0.005516648292541504,
-0.2751883566379547,
0.0034866146743297577,
0.23763549327850342,
0.22489744424819946,
-0.09168755263090134,
0.22281834483146667,
0.06272026896476746,
0.24972736835479736,
0.17164212465286255,
0.20723287761211395,
0.6130858659744263,
0.14620879292488098,
0.380118727684021,
-0.09634946286678314,
-0.2267838418483734,
-0.11880407482385635,
0.022405259311199188,
0.0355786457657814,
0.14631059765815735,
0.24365952610969543,
0.4467414319515228,
-0.24362263083457947,
-0.527906596660614,
-0.35905200242996216,
-0.3234812021255493,
-0.06423186510801315,
0.11215269565582275,
0.04589361324906349,
-0.06197416037321091,
0.11932787299156189,
-0.1946650743484497,
0.05509461462497711,
0.3543142080307007,
0.5524305105209351,
0.3355589509010315,
-0.06371300667524338,
-0.22537851333618164,
-0.41331028938293457,
-0.18758724629878998,
0.40964892506599426,
0.10035348683595657,
0.12092185765504837,
-0.25862637162208557,
-0.10539872199296951,
0.044068343937397,
-0.22020284831523895,
0.994071900844574,
-0.032416172325611115,
0.18842391669750214,
0.031987980008125305,
-0.03342938795685768,
-0.3527272045612335,
0.15017753839492798,
0.16564452648162842,
-0.04070069640874863,
-0.32981252670288086,
0.5646959543228149,
-0.4103497266769409,
-0.5373265743255615,
0.000145692378282547,
-0.08584985136985779,
-0.0008361786603927612,
-0.18709875643253326,
-0.22693714499473572,
-0.3641725182533264,
-0.546733558177948,
-0.20632469654083252,
0.07789402455091476,
0.10046358406543732,
-0.02510569989681244,
-0.03284763917326927,
0.28533026576042175,
-0.07252959907054901,
0.06377939134836197,
0.19127488136291504,
0.41108331084251404,
0.06859806925058365,
-0.10910743474960327,
0.3169892430305481,
0.3288344144821167,
0.3479641079902649,
0.6631423234939575,
0.03101789578795433,
-0.13617172837257385,
0.10091979056596756,
0.11394612491130829,
0.088530033826828,
0.5355656743049622,
0.08991552144289017,
0.23339158296585083,
0.19145971536636353,
0.4146587550640106,
-0.4278704822063446,
0.10786613821983337,
0.2576243579387665,
-0.19957305490970612,
-0.21360161900520325,
-0.05039886757731438,
0.4777824580669403,
-0.04340672492980957,
-0.04067827761173248,
0.12363871186971664,
0.669151782989502,
-0.12919864058494568,
0.24421623349189758,
-0.0153401680290699,
1.0900003910064697,
0.06746774166822433,
0.3101046681404114,
0.34869521856307983,
-0.14420728385448456,
0.4346948564052582,
-0.43330132961273193,
0.15131720900535583,
-0.264888197183609,
-0.17715434730052948,
-0.12329818308353424,
-0.18146207928657532,
0.051140494644641876,
0.14716969430446625,
-0.025932542979717255,
0.0993121862411499,
-0.09457777440547943,
0.377863347530365,
0.006770189851522446,
0.44400352239608765,
-0.4133583605289459,
-0.15584762394428253,
-0.651343822479248,
0.10559810698032379,
-0.08985041826963425,
0.3169582784175873,
-0.13814310729503632,
-0.14218670129776,
-0.18547075986862183,
-0.3692720830440521,
-0.037825413048267365,
0.1821170300245285,
0.06844013929367065,
-0.020750422030687332,
0.18895170092582703,
0.11773256957530975,
0.10249093174934387,
-0.18955528736114502,
0.20898061990737915,
0.12970861792564392,
-0.1873287558555603,
0.1516948789358139,
-0.05760796740651131,
-0.025673799216747284,
-0.05405260622501373,
-0.02263600379228592,
0.2044667899608612,
-0.11592915654182434,
-0.56685471534729,
0.14999541640281677,
-0.2052503079175949,
-0.3117794394493103,
-0.19727560877799988,
0.0813906341791153,
-0.2201247662305832,
-0.0787690132856369,
-0.015981417149305344,
0.20792683959007263,
-0.14416015148162842,
-0.11824784427881241,
0.10940449684858322,
0.05059824511408806,
-0.17889225482940674,
-0.23547998070716858,
0.3509202003479004,
-0.31265488266944885,
-0.04686063528060913,
0.42121726274490356,
-0.176515594124794,
-0.11071648448705673,
0.4182492196559906,
0.18230071663856506,
-0.19679641723632812,
-0.33396124839782715,
0.19008809328079224,
0.33535152673721313,
-0.33243846893310547,
0.05872581526637077,
0.15037035942077637,
-0.2256959080696106,
-0.1883566975593567,
0.144553080201149,
0.3583604097366333,
-0.06873731315135956,
-0.06475585699081421,
-0.5050719380378723,
-0.3106171786785126,
0.5835089087486267,
-0.48149070143699646,
0.02005133591592312,
0.1757650375366211,
0.23126594722270966,
-0.17650198936462402,
-0.18817688524723053,
-0.3364153504371643,
0.16430923342704773,
-0.13057343661785126,
-0.12701810896396637,
-0.21838054060935974,
-0.08497592806816101,
0.3681676387786865,
-0.1310950219631195,
0.10874510556459427,
0.24181659519672394,
-0.32744866609573364,
-0.1550309956073761,
-0.07313796132802963,
0.20616045594215393,
0.07827896624803543,
-0.12048596888780594,
-0.07240631431341171,
-0.16208311915397644,
0.15772877633571625,
-0.025783874094486237,
0.30444037914276123,
0.19988083839416504,
0.09819366037845612,
0.054994624108076096,
0.03163502365350723,
-0.2636242210865021,
-0.2427596002817154,
0.09856139868497849,
0.20702533423900604,
0.475267231464386,
0.01836216077208519,
-0.08600080013275146,
-0.5346882939338684,
0.12966793775558472,
-0.04356618598103523,
0.31981009244918823,
0.16104954481124878,
0.18750181794166565,
0.16489633917808533,
-0.13172373175621033,
-0.22337014973163605,
-0.3796042203903198,
0.23168152570724487,
0.1467997133731842,
-0.24031579494476318,
-0.0158001147210598,
0.33460697531700134,
0.15681856870651245,
-0.1441623568534851,
-0.04843327775597572,
0.17105844616889954,
-0.28065726161003113,
0.16837182641029358,
0.1620335876941681,
0.16976086795330048,
0.13682147860527039,
0.22161605954170227,
0.17000862956047058,
0.47805482149124146,
0.09806333482265472,
0.054273806512355804,
0.5369964241981506,
-0.22478529810905457,
0.02069341205060482,
0.31515824794769287,
0.023186393082141876,
0.2878071367740631,
0.19984742999076843,
-0.12406037747859955,
0.049402207136154175,
-0.17918622493743896,
0.4634875953197479,
0.0940602719783783,
-0.4963024854660034,
-0.018726063892245293,
0.2080591320991516,
0.15462559461593628,
-0.08286631107330322,
-0.25310635566711426,
0.034537769854068756,
-0.11679204553365707,
-0.12286531925201416,
-0.16081847250461578,
0.11461007595062256,
-0.10830223560333252,
0.07965867966413498,
-0.21229733526706696,
-0.2952439785003662,
-0.38201791048049927,
-0.17698067426681519,
-0.05923838913440704,
-0.45178619027137756,
-0.15102872252464294,
0.0303427092730999,
-0.03886331617832184,
-0.1545947790145874,
0.18910473585128784,
0.14952367544174194,
0.3447432816028595,
-0.10036180913448334,
0.3246620297431946,
0.08828435838222504,
0.09157176315784454,
0.1947198510169983,
0.12001696974039078,
0.3526243269443512,
0.3079725205898285,
-0.13431453704833984,
-0.1963474154472351,
0.02705647423863411,
-0.04463549703359604,
0.07942000031471252,
0.02067546173930168,
-0.05180938169360161,
-0.08834706246852875,
0.19354037940502167,
0.22610917687416077,
-0.22496512532234192,
0.06804731488227844,
-0.17503663897514343,
0.31557732820510864,
-0.06211918964982033,
0.5107344388961792,
-0.08552797883749008,
0.19244390726089478,
0.08258722722530365,
-0.1572793424129486,
-0.5494800806045532,
0.022800467908382416,
0.353951096534729,
-0.1160048395395279,
0.15660922229290009,
-0.05619174987077713,
0.09668529033660889,
-0.12373608350753784,
0.2865673303604126,
0.43208611011505127,
0.15731462836265564,
-0.2097426801919937,
-0.08339184522628784,
-0.42609894275665283,
0.027979858219623566,
-0.05410093814134598,
-0.255169540643692,
0.28977978229522705,
-0.10300381481647491,
0.11044836044311523,
-0.0727270245552063,
0.37227657437324524,
-0.10459518432617188,
0.15780454874038696,
-0.143904909491539,
-0.12264951318502426,
0.03590227663516998,
0.10278576612472534,
0.2586720883846283,
0.05196534842252731,
-0.2401839643716812,
0.1558055579662323,
0.4292565584182739,
-0.06312155723571777,
-0.01067366823554039,
0.0889509916305542,
0.029477648437023163,
-0.42285680770874023,
0.4284883439540863,
0.08442699164152145,
-0.006323918700218201,
-0.25189584493637085,
-0.41307374835014343,
-0.15525062382221222,
-0.23514527082443237,
-0.10075749456882477,
0.12447954714298248,
-0.00016645807772874832,
0.562614917755127,
0.02568824589252472,
-0.0937042236328125,
-0.4162372648715973,
0.0410638302564621,
-0.07265526056289673,
0.19562050700187683,
-0.3371579051017761,
0.15109091997146606,
-0.08553396910429001,
-0.10766246914863586,
-0.04613887891173363,
0.17805710434913635,
0.03131692484021187,
0.22935518622398376,
-0.19764328002929688,
-0.1033753901720047,
0.8141106367111206,
-0.09824956953525543,
-0.24989798665046692,
0.28521156311035156,
0.3185369670391083,
-0.1324956715106964,
-0.2449130266904831,
-0.34330838918685913,
0.04844839870929718,
0.2937372624874115,
0.3664351999759674,
-0.17089402675628662,
0.07071150094270706,
-0.28482624888420105,
-0.239505797624588,
0.01717226952314377,
-0.13904976844787598,
0.0709979459643364,
-0.2669731080532074,
0.040502019226551056,
-0.19217076897621155
] |
https://github.com/huggingface/datasets/issues/6548 | It looks like a transient DNS issue. It should work fine now if you try again.
There is no parameter in load_dataset to skip failed downloads. In your case it would have skipped every single subsequent download until the DNS issue was resolved anyway. | Skip if a dataset has issues | ### Describe the bug
Hello everyone,
I'm using **load_datasets** from **huggingface** to download the datasets and I'm facing an issue, the download starts but it reaches some state and then fails with the following error:
Couldn't reach https://huggingface.co/datasets/wikimedia/wikipedia/resolve/4cb9b0d719291f1a10f96f67d609c5d442980dc9/20231101.ext/train-00000-of-00001.parquet
Failed to resolve \'huggingface.co\' ([Errno -3] Temporary failure in name resolution)"))')))
![image](https://github.com/huggingface/datasets/assets/143214684/8847d9cb-529e-4eda-9c76-282713dfa3af)
so I was wondering is there a parameter to be passed to load_dataset() to skip files that can't be downloaded??
### Steps to reproduce the bug
Parameter to be passed to load_dataset() of huggingface to skip files that can't be downloaded??
### Expected behavior
load_dataset() finishes without error
### Environment info
None | 44 | Skip if a dataset has issues
### Describe the bug
Hello everyone,
I'm using **load_datasets** from **huggingface** to download the datasets and I'm facing an issue, the download starts but it reaches some state and then fails with the following error:
Couldn't reach https://huggingface.co/datasets/wikimedia/wikipedia/resolve/4cb9b0d719291f1a10f96f67d609c5d442980dc9/20231101.ext/train-00000-of-00001.parquet
Failed to resolve \'huggingface.co\' ([Errno -3] Temporary failure in name resolution)"))')))
![image](https://github.com/huggingface/datasets/assets/143214684/8847d9cb-529e-4eda-9c76-282713dfa3af)
so I was wondering is there a parameter to be passed to load_dataset() to skip files that can't be downloaded??
### Steps to reproduce the bug
Parameter to be passed to load_dataset() of huggingface to skip files that can't be downloaded??
### Expected behavior
load_dataset() finishes without error
### Environment info
None
It looks like a transient DNS issue. It should work fine now if you try again.
There is no parameter in load_dataset to skip failed downloads. In your case it would have skipped every single subsequent download until the DNS issue was resolved anyway. | [
-0.13599760830402374,
-0.5338322520256042,
0.022321894764900208,
0.3548619747161865,
0.3999386727809906,
0.1268061101436615,
-0.14067818224430084,
0.225484237074852,
0.08940277248620987,
0.32972007989883423,
0.442242830991745,
0.13631854951381683,
0.05722906067967415,
-0.06314912438392639,
0.03930748626589775,
-0.35949647426605225,
-0.05967642366886139,
-0.19714488089084625,
0.17616939544677734,
0.03355784714221954,
-0.3888697326183319,
0.08049460500478745,
-0.23562383651733398,
-0.18730926513671875,
0.0008560679852962494,
0.11168979108333588,
-0.23938870429992676,
0.23613949120044708,
0.14922228455543518,
-0.17057573795318604,
0.36317363381385803,
0.1948644071817398,
0.12913919985294342,
0.2552095353603363,
-0.00013071585271973163,
0.18803846836090088,
0.5161857008934021,
-0.20932897925376892,
-0.1226147785782814,
-0.2190382480621338,
-0.3479500412940979,
0.09258870780467987,
-0.2288116216659546,
-0.2540718615055084,
0.06860395520925522,
0.07047605514526367,
0.11428539454936981,
-0.308820903301239,
0.407626748085022,
0.08516910672187805,
0.04670583829283714,
0.36667129397392273,
-0.23207882046699524,
0.013091795146465302,
0.1679815948009491,
0.16639408469200134,
-0.0009215399622917175,
0.4665100872516632,
0.23230165243148804,
0.16957229375839233,
0.05598188564181328,
0.3295704424381256,
-0.15340261161327362,
0.004159174859523773,
0.38363614678382874,
-0.05659857392311096,
0.18635840713977814,
-0.14482097327709198,
0.12522999942302704,
0.3089565932750702,
0.30512532591819763,
-0.006822480820119381,
-0.48777711391448975,
-0.5642255544662476,
0.15530745685100555,
-0.3822777569293976,
0.4286803603172302,
-0.21324241161346436,
-0.216594398021698,
0.24223145842552185,
-0.20910987257957458,
-0.32276231050491333,
-0.3328797221183777,
0.1378929316997528,
0.034058280289173126,
-0.15766014158725739,
-0.151523157954216,
0.13574744760990143,
0.3485889136791229,
0.16923357546329498,
-0.28992778062820435,
-0.223719522356987,
0.21337196230888367,
0.20982004702091217,
-0.2627715766429901,
-0.224584698677063,
-0.14719250798225403,
0.4523785710334778,
0.3002511262893677,
0.18119114637374878,
0.03522449731826782,
-0.0010751774534583092,
0.2841556668281555,
0.15064479410648346,
0.16810593008995056,
-0.2814391553401947,
0.23809503018856049,
0.2336827516555786,
0.32985973358154297,
0.4465157687664032,
0.07367025315761566,
-0.016056831926107407,
-0.050981562584638596,
-0.13576269149780273,
-0.11820779740810394,
0.022766005247831345,
0.4430803656578064,
-0.3404483199119568,
-0.25736743211746216,
0.09192968159914017,
-0.07618828862905502,
-0.05705008655786514,
0.10436435788869858,
0.462199866771698,
-0.19110244512557983,
0.09834431111812592,
-0.27070003747940063,
0.17144255340099335,
-0.004411522299051285,
-0.01063598319888115,
-0.02497091144323349,
-0.24305695295333862,
-0.11217878758907318,
0.3188759684562683,
0.31847429275512695,
-0.2868279218673706,
0.26937466859817505,
-0.22356797754764557,
-0.07565829157829285,
0.04316737502813339,
0.14664585888385773,
0.023503262549638748,
-0.17842358350753784,
0.29882535338401794,
-0.10329900681972504,
0.1522650271654129,
0.06566160172224045,
0.17680415511131287,
-0.021795444190502167,
0.32322192192077637,
-0.18056821823120117,
-0.3190133571624756,
0.24041102826595306,
-0.022402886301279068,
-0.1630743443965912,
0.10675914585590363,
-0.29496461153030396,
0.21599876880645752,
0.06456486135721207,
-0.15229302644729614,
0.01956484466791153,
0.19805899262428284,
-0.3644202947616577,
-0.10513322055339813,
0.32564371824264526,
0.7947787046432495,
-0.22364377975463867,
-0.4865487515926361,
-0.1998109519481659,
-0.35397619009017944,
0.11536917090415955,
0.0821266621351242,
0.07704810798168182,
-0.23974309861660004,
-0.3225586414337158,
0.12388773262500763,
0.16631245613098145,
-0.3255876302719116,
-0.2592347264289856,
0.07184674590826035,
-0.27715617418289185,
0.1426992416381836,
0.3149312138557434,
0.04715478792786598,
0.08428748697042465,
-0.1813109666109085,
0.07418873906135559,
0.30596065521240234,
-0.31875553727149963,
-0.1605817824602127,
-0.23724165558815002,
0.002627074718475342,
0.08772502839565277,
0.308701753616333,
-0.10411951690912247,
0.11158190667629242,
-0.09087406098842621,
0.09210003912448883,
0.08171993494033813,
0.1920166015625,
0.03826446831226349,
0.32826533913612366,
0.12326093018054962,
0.1183289885520935,
0.042208652943372726,
-0.042229972779750824,
-0.569062352180481,
0.1648687869310379,
0.06828300654888153,
-0.3809735178947449,
-0.10858853161334991,
-0.2694726586341858,
-0.3008396625518799,
-0.21373914182186127,
-0.04640699923038483,
0.12166765332221985,
-0.1050986498594284,
0.25743746757507324,
0.15243065357208252,
0.049111686646938324,
-0.36597687005996704,
0.18008998036384583,
-0.5320639610290527,
0.3189275860786438,
-0.39809420704841614,
0.2833954989910126,
0.10832593590021133,
0.0031769759953022003,
-0.012829452753067017,
-0.12219797074794769,
0.38316673040390015,
-0.21649423241615295,
0.09124139696359634,
0.4023689925670624,
0.08864472806453705,
0.28186801075935364,
0.13490377366542816,
-0.007875204086303711,
0.206863135099411,
-0.23444244265556335,
-0.1287577748298645,
-0.05375254154205322,
0.004346519708633423,
-0.03192634880542755,
-0.2551819086074829,
0.18869340419769287,
-0.15839609503746033,
0.521683931350708,
0.1928533911705017,
-0.15315887331962585,
0.22592991590499878,
-0.2517027258872986,
-0.15669524669647217,
-0.46954721212387085,
0.4904666841030121,
-0.1734975427389145,
0.4586026668548584,
0.04554733633995056,
-0.7019231915473938,
-0.31676632165908813,
0.17705366015434265,
-0.04351046681404114,
-0.1669086217880249,
0.284512460231781,
0.24766570329666138,
0.10054352879524231,
0.23179730772972107,
0.2334340512752533,
0.23405545949935913,
0.16211076080799103,
0.030777843669056892,
-0.03345285356044769,
-0.07840129733085632,
-0.1542884260416031,
0.20219998061656952,
0.21832622587680817,
-0.11533252894878387,
0.26785415410995483,
-0.20845134556293488,
0.0762370377779007,
-0.28916171193122864,
-0.31357425451278687,
0.21368630230426788,
-0.14222002029418945,
-0.3833642899990082,
-0.0003880336880683899,
-0.1673121154308319,
-0.462539941072464,
-0.2376047670841217,
0.2157483547925949,
-0.45751163363456726,
-0.35140764713287354,
0.17735181748867035,
0.25579753518104553,
-0.3945818543434143,
0.14080563187599182,
-0.21743127703666687,
0.22831884026527405,
-0.12313443422317505,
-0.42224594950675964,
-0.42445456981658936,
0.018864471465349197,
-0.11991577595472336,
-0.0292772576212883,
0.1545930951833725,
0.022518735378980637,
0.4877883195877075,
-0.35122254490852356,
-0.2350654900074005,
-0.1820126324892044,
-0.1100020483136177,
0.23104794323444366,
-0.10930100083351135,
0.32899367809295654,
0.27926379442214966,
0.5468595027923584,
-0.08984535187482834,
0.21479152143001556,
0.3120924234390259,
0.10656866431236267,
0.005962744355201721,
0.055848196148872375,
0.42579326033592224,
0.38430774211883545,
-0.05230971425771713,
0.06512772291898727,
-0.20270003378391266,
-0.3712857663631439,
-0.1919204592704773,
-0.21815316379070282,
-0.06319558620452881,
0.31008481979370117,
0.03517995402216911,
0.311402291059494,
-0.34209418296813965,
-0.03884369134902954,
0.05748997628688812,
-0.5333996415138245,
0.20493261516094208,
0.006050381809473038,
0.12937942147254944,
-0.012394659221172333,
0.1766456812620163,
0.23478931188583374,
0.4292151927947998,
-0.6461700201034546,
-0.26695823669433594,
0.0464455783367157,
-0.014322109520435333,
-0.21961399912834167,
-0.16299645602703094,
0.1792023628950119,
-0.06908649951219559,
-0.002909999340772629,
-0.28575465083122253,
-0.03887201100587845,
-0.06323039531707764,
0.05541189759969711,
0.42440569400787354,
0.2332252711057663,
0.3306565582752228,
-0.10206125676631927,
0.8793209791183472,
0.06607676297426224,
0.21030251681804657,
0.755622148513794,
0.1744430512189865,
0.42903953790664673,
0.24983346462249756,
-0.06173352152109146,
-0.05022953078150749,
0.10247816890478134,
-0.18026584386825562,
0.05386913940310478,
0.09719283878803253,
0.12983620166778564,
-0.3572049140930176,
-0.39708247780799866,
-0.06951776146888733,
-0.35661688446998596,
-0.1077490970492363,
-0.08163632452487946,
0.2781595289707184,
-0.021016448736190796,
0.05904334783554077,
-0.014689493924379349,
-0.052863024175167084,
0.1334751695394516,
0.43245425820350647,
0.4688012897968292,
-0.0057495832443237305,
-0.10786085575819016,
-0.1025104746222496,
-0.3196767270565033,
0.21539638936519623,
0.04759005457162857,
0.2049199938774109,
-0.2530861496925354,
0.18040719628334045,
0.015499137341976166,
0.08549676090478897,
1.0250426530838013,
-0.15663480758666992,
0.29142701625823975,
-0.07615489512681961,
0.04831607639789581,
-0.3543443977832794,
0.1701333373785019,
0.0011678263545036316,
0.11142723262310028,
-0.029651403427124023,
0.5095672607421875,
-0.4772759675979614,
-0.06006467342376709,
-0.016122784465551376,
0.33338651061058044,
-0.029116392135620117,
-0.2688389718532562,
-0.20319263637065887,
-0.19191329181194305,
-0.5081585645675659,
0.24953675270080566,
0.22194170951843262,
0.058106813579797745,
-0.10736154764890671,
-0.27188122272491455,
0.028308676555752754,
0.03148159384727478,
-0.03277087211608887,
0.1465686559677124,
0.18522757291793823,
-0.14563016593456268,
0.177030548453331,
0.2133989930152893,
0.05175787955522537,
0.2991345226764679,
0.7830030918121338,
-0.1582178771495819,
-0.5208861231803894,
-0.004135709255933762,
-0.17354390025138855,
0.41673871874809265,
0.4459969401359558,
-0.049436379224061966,
0.14604885876178741,
0.24182233214378357,
0.25455620884895325,
-0.07355441153049469,
0.18627263605594635,
0.2455972582101822,
-0.07332609593868256,
-0.5862745046615601,
-0.13496987521648407,
0.2912936210632324,
0.23255467414855957,
-0.015063025057315826,
0.47344526648521423,
0.3002605736255646,
-0.24608737230300903,
-0.0113375224173069,
-0.18426528573036194,
0.9984018802642822,
-0.004243003204464912,
-0.0343170166015625,
-0.12089642137289047,
0.12452095746994019,
0.736275315284729,
0.21387192606925964,
-0.003752760589122772,
0.01917196810245514,
-0.32525527477264404,
-0.08011186122894287,
-0.10666677355766296,
0.2852623164653778,
0.3719387352466583,
-0.26236212253570557,
0.47236010432243347,
0.014964759349822998,
0.19042187929153442,
-0.002458028495311737,
-0.09729128330945969,
-0.32680070400238037,
-0.14450150728225708,
-0.5647062659263611,
-0.07232961803674698,
-0.12424419075250626,
0.2185213714838028,
-0.024059120565652847,
0.0014312118291854858,
0.2780326008796692,
-0.4316778779029846,
-0.1897445023059845,
-0.13967087864875793,
-0.25134530663490295,
-0.4467102885246277,
-0.14070867002010345,
-0.057308390736579895,
-0.02085988223552704,
-0.009041452780365944,
-0.06990988552570343,
0.06882812082767487,
-0.34921690821647644,
0.15876275300979614,
-0.330404669046402,
-0.015568617731332779,
-0.3042442500591278,
-0.021026968955993652,
0.32167428731918335,
0.027680300176143646,
-0.14585018157958984,
0.22855247557163239,
-0.3426485061645508,
-0.06761021912097931,
0.004043400287628174,
-0.20673680305480957,
0.15393680334091187,
0.006647933274507523,
-0.09472385048866272,
-0.4214704632759094,
0.008336290717124939,
-0.4034998118877411,
-0.013965273275971413,
-0.22131672501564026,
0.15384410321712494,
-0.04576268792152405,
0.014965806156396866,
-0.08079594373703003,
-0.02240995317697525,
0.473882794380188,
-0.4279872477054596,
-0.2172355353832245,
0.20158106088638306,
-0.06568575650453568,
-0.12482806295156479,
-0.024342279881238937,
-0.2391549050807953,
-0.23367495834827423,
-0.6391172409057617,
0.29296597838401794,
0.2824545204639435,
0.26262304186820984,
-0.07474597543478012,
-0.04589739814400673,
0.06043969467282295,
-0.1768031120300293,
-0.0427313894033432,
-0.48322930932044983,
-0.25650379061698914,
0.24951009452342987,
0.1961173415184021,
0.4635145962238312,
0.09757551550865173,
0.07457605004310608,
0.07931851595640182,
-0.31601300835609436,
-0.11426335573196411,
-0.10222293436527252,
-0.4322338402271271,
0.1248522698879242,
0.3452491760253906,
0.6230449676513672,
0.004577405750751495,
-0.02510768733918667,
-0.10204777121543884,
0.36470872163772583,
0.04852135479450226,
-0.0019887425005435944,
-0.08468581736087799,
0.2720828950405121,
0.098066546022892,
-0.005148299038410187,
0.14736589789390564,
-0.30658549070358276,
0.10200251638889313,
-0.13263267278671265,
0.12312082946300507,
0.1287708878517151,
0.16070494055747986,
-0.05081566795706749,
0.3724896013736725,
0.352692186832428,
-0.09074018150568008,
0.25693532824516296,
0.13986794650554657,
0.31956684589385986,
-0.03999383747577667,
0.10133296251296997,
-0.06293205171823502,
0.05888987332582474,
-0.0674515962600708,
-0.25467586517333984,
0.28801849484443665,
-0.1651734560728073,
0.010243361815810204,
0.04946982488036156,
-0.19414541125297546,
0.2485978752374649,
0.12825821340084076,
0.5434519648551941,
-0.16381140053272247,
0.13917624950408936,
0.19095449149608612,
0.09902297705411911,
-0.2505277991294861,
0.07569894939661026,
0.45890775322914124,
0.057493340224027634,
-0.08930426836013794,
0.1102987751364708,
-0.07081344723701477,
-0.11660461127758026,
0.2103414535522461,
0.07075662910938263,
0.5132803916931152,
0.15782268345355988,
0.3262617886066437,
0.49758180975914,
-0.07332496345043182,
0.09427893906831741,
0.013146908953785896,
0.11361542344093323,
0.4699503481388092,
0.18781563639640808,
-0.14208242297172546,
0.25648319721221924,
-0.3810079097747803,
0.35390204191207886,
-0.1754218339920044,
-0.556179940700531,
0.08213792741298676,
0.47820138931274414,
-0.15802396833896637,
0.2712125778198242,
0.01959572359919548,
0.18891745805740356,
0.06704781949520111,
-0.0841679573059082,
-0.08171529322862625,
0.15682676434516907,
0.11188915371894836,
-0.10841303318738937,
-0.39756298065185547,
-0.09762527048587799,
-0.2457050234079361,
0.13530367612838745,
0.12715059518814087,
-0.11506423354148865,
0.5346969962120056,
-0.013571467250585556,
0.02044239081442356,
-0.5181418657302856,
-0.10084637254476547,
0.10032503306865692,
0.07768957316875458,
-0.2354731261730194,
0.15681470930576324,
0.4380321204662323,
-0.1081121414899826,
0.45603981614112854,
-0.08089731633663177,
0.1055462509393692,
-0.21121230721473694,
0.10443779826164246,
-0.13545778393745422,
0.0008948594331741333,
0.06548527628183365,
-0.1664372980594635,
0.4467664361000061,
-0.14778898656368256,
-0.05381980538368225,
0.41642606258392334,
-0.04988659918308258,
-0.03346399590373039,
0.14235740900039673,
0.08572185039520264,
0.2085704803466797,
-0.5653312802314758,
0.23434098064899445,
-0.10924757272005081,
0.16531044244766235,
-0.21736833453178406,
-0.057736098766326904,
-0.48840272426605225,
0.07674006372690201,
0.0599825344979763,
-0.28627732396125793,
-0.18892551958560944,
0.08419255912303925,
-0.0357820987701416,
-0.27107176184654236,
0.42070165276527405,
0.5567449927330017,
-0.022723685950040817,
-0.4922252297401428,
-0.23864765465259552,
-0.5442265272140503,
0.16939130425453186,
0.12062669545412064,
0.19708892703056335,
0.25308921933174133,
-0.12604260444641113,
-0.07275119423866272,
0.13572683930397034,
-0.04458177834749222,
0.08737529814243317,
0.17161890864372253,
0.14917081594467163,
-0.1388232409954071,
-0.5373269319534302,
-0.2241121232509613,
0.02248300053179264,
0.17166760563850403,
-0.3708750605583191,
0.2019549012184143,
-0.11147566139698029,
-0.3114679753780365,
-0.2323261797428131,
-0.13459664583206177,
0.17932350933551788,
0.053108371794223785,
0.30433398485183716,
-0.042551107704639435,
0.38388481736183167,
-0.12106991559267044,
-0.19070543348789215,
-0.13431808352470398,
-0.13437864184379578,
-0.10160572826862335,
-0.16820429265499115,
0.005783267319202423,
0.26340052485466003,
-0.276313841342926,
0.013382242992520332,
-0.3055776357650757,
-0.015065323561429977,
0.06886090338230133,
0.42068976163864136,
-0.09238284081220627,
-0.08504904806613922,
-0.07273280620574951,
0.04131515696644783,
-0.09059799462556839,
-0.10620000958442688,
-0.033648569136857986,
0.14612045884132385,
-0.22752788662910461,
-0.3555670380592346,
0.769553005695343,
-0.19666670262813568,
-0.02447708696126938,
-0.10506200790405273,
0.12154291570186615,
-0.03541012853384018,
-0.16623152792453766,
-0.6988605260848999,
-0.07227442413568497,
0.4063704013824463,
0.11869239807128906,
-0.038602277636528015,
0.17694243788719177,
-0.13513943552970886,
-0.00538354367017746,
-0.027689028531312943,
0.2619539499282837,
0.12525194883346558,
0.0512067973613739,
0.365994930267334,
-0.1882321536540985
] |
https://github.com/huggingface/datasets/issues/6542 | Hi ! We now recommend using the `wikimedia/wikipedia` dataset, can you try loading this one instead ?
```python
wiki_dataset = load_dataset("wikimedia/wikipedia", "20231101.en")
``` | Datasets : wikipedia 20220301.en error | ### Describe the bug
When I used load_dataset to download this data set, the following error occurred. The main problem was that the target data did not exist.
### Steps to reproduce the bug
1.I tried downloading directly.
```python
wiki_dataset = load_dataset("wikipedia", "20220301.en")
```
An exception occurred
```
MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner')`
```
2.I modified the code as prompted.
```python
wiki_dataset = load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner')
```
An exception occurred:
```
FileNotFoundError: Couldn't find file at https://dumps.wikimedia.org/enwiki/20220301/dumpstatus.json
```
### Expected behavior
I searched in the parent directory of the corresponding URL, but there was no corresponding "20220301" directory.
I really need this data set and hope to provide a download method.
### Environment info
python 3.8
datasets 2.16.0
apache-beam 2.52.0
dill 0.3.7
| 23 | Datasets : wikipedia 20220301.en error
### Describe the bug
When I used load_dataset to download this data set, the following error occurred. The main problem was that the target data did not exist.
### Steps to reproduce the bug
1.I tried downloading directly.
```python
wiki_dataset = load_dataset("wikipedia", "20220301.en")
```
An exception occurred
```
MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner')`
```
2.I modified the code as prompted.
```python
wiki_dataset = load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner')
```
An exception occurred:
```
FileNotFoundError: Couldn't find file at https://dumps.wikimedia.org/enwiki/20220301/dumpstatus.json
```
### Expected behavior
I searched in the parent directory of the corresponding URL, but there was no corresponding "20220301" directory.
I really need this data set and hope to provide a download method.
### Environment info
python 3.8
datasets 2.16.0
apache-beam 2.52.0
dill 0.3.7
Hi ! We now recommend using the `wikimedia/wikipedia` dataset, can you try loading this one instead ?
```python
wiki_dataset = load_dataset("wikimedia/wikipedia", "20231101.en")
``` | [
-0.018569722771644592,
0.21296685934066772,
-0.01566591113805771,
0.33132097125053406,
0.11043636500835419,
0.19831033051013947,
0.29937219619750977,
0.35208413004875183,
0.21328392624855042,
0.07991998642683029,
0.12571120262145996,
0.11823579668998718,
0.016085289418697357,
-0.0669093132019043,
0.17962804436683655,
-0.3809634745121002,
0.1903625726699829,
0.06059825047850609,
-0.3449368476867676,
-0.14026443660259247,
-0.2636334300041199,
0.13525380194187164,
-0.2836342453956604,
-0.13687297701835632,
-0.15099278092384338,
0.11331405490636826,
-0.17973701655864716,
0.11413267254829407,
0.04535636305809021,
-0.27457255125045776,
0.3563685715198517,
-0.10902425646781921,
0.16314810514450073,
0.2051067352294922,
-0.00011289287795079872,
0.007938705384731293,
0.5474300384521484,
-0.13894760608673096,
-0.48444774746894836,
-0.2166106253862381,
-0.2664106488227844,
-0.4025326073169708,
0.0653078705072403,
-0.4694620668888092,
0.03518377244472504,
-0.2908114194869995,
0.16099661588668823,
-0.2501417100429535,
0.3333071768283844,
0.2199501395225525,
0.19560369849205017,
0.22032147645950317,
0.3240942060947418,
-0.15135511755943298,
0.614432692527771,
0.0028795935213565826,
-0.12466263025999069,
-0.0773172378540039,
-0.0878976583480835,
-0.01482962816953659,
0.01190090924501419,
0.2536671459674835,
-0.1244000717997551,
0.04806831479072571,
0.35124731063842773,
-0.11317287385463715,
-0.23195919394493103,
-0.5011332035064697,
0.2623489499092102,
0.2554831802845001,
0.8237800598144531,
-0.21913477778434753,
-0.2692028880119324,
-0.17698125541210175,
-0.0060930512845516205,
0.218487948179245,
0.3973808288574219,
0.2873639166355133,
-0.256330281496048,
-0.006076369900256395,
-0.02448517084121704,
-0.26058804988861084,
-0.16654108464717865,
0.34701675176620483,
-0.05174213647842407,
0.31784504652023315,
0.03240696340799332,
0.1476956605911255,
-0.20711062848567963,
0.028095468878746033,
0.07205523550510406,
-0.38837730884552,
0.24865369498729706,
0.3239334225654602,
-0.34042128920555115,
-0.007900647819042206,
-0.0898478776216507,
0.11984789371490479,
0.16795410215854645,
0.01448291540145874,
-0.03065955638885498,
0.01214635744690895,
0.03139848634600639,
-0.07254248857498169,
0.22300127148628235,
-0.0514310784637928,
-0.11503396928310394,
-0.09019776433706284,
0.1429091989994049,
0.11954003572463989,
0.006249755620956421,
0.06373628973960876,
0.026430893689393997,
-0.14375634491443634,
-0.09030371904373169,
0.11346901208162308,
0.2412434071302414,
-0.010171055793762207,
-0.1449999213218689,
0.23606212437152863,
-0.5672488212585449,
-0.08964245021343231,
-0.2966330051422119,
0.3063594698905945,
-0.09879378974437714,
0.3342333734035492,
0.2874964773654938,
0.111814484000206,
-0.2013210952281952,
-0.429897278547287,
-0.12228557467460632,
0.30391576886177063,
-0.08989029377698898,
0.18241819739341736,
0.32142162322998047,
0.032296475023031235,
0.37993913888931274,
0.06808999180793762,
-0.1377718448638916,
-0.05962177366018295,
0.33460545539855957,
-0.026606779545545578,
-0.08834277093410492,
0.3527240455150604,
0.2508360743522644,
0.45849084854125977,
0.0059651704505085945,
0.05264700949192047,
-0.01952965557575226,
0.15995705127716064,
-0.23853245377540588,
-0.10630019009113312,
-0.1088714674115181,
0.1424906998872757,
-0.26449835300445557,
0.16507695615291595,
-0.27665117383003235,
0.11121760308742523,
-0.035837799310684204,
-0.10383956134319305,
0.03233993425965309,
-0.07342471182346344,
-0.2184939682483673,
-0.34168797731399536,
0.44452375173568726,
0.6806347966194153,
-0.14129936695098877,
0.06868977844715118,
-0.1538432538509369,
0.14885351061820984,
0.022300727665424347,
-0.29871854186058044,
-0.12535294890403748,
0.5239827036857605,
-0.2382473647594452,
-0.053015224635601044,
0.3165203034877777,
-0.30891501903533936,
-0.3167470693588257,
0.0992419421672821,
-0.012096323072910309,
0.1660783886909485,
0.1397363245487213,
-0.0017468929290771484,
0.205414280295372,
-0.06993788480758667,
-0.03525308892130852,
0.31727877259254456,
0.09772699326276779,
0.12102378159761429,
-0.25569018721580505,
-0.25305116176605225,
-0.07577237486839294,
0.14484082162380219,
0.267188161611557,
-0.048146747052669525,
0.20735757052898407,
0.553414523601532,
0.27007630467414856,
-0.11486818641424179,
0.2593562602996826,
0.5467313528060913,
-0.32270750403404236,
0.08141167461872101,
0.22629766166210175,
-0.1512448489665985,
-0.4049016833305359,
0.20364725589752197,
-0.11642632633447647,
0.12157580256462097,
0.02394878678023815,
-0.029348168522119522,
-0.5178927183151245,
0.014426350593566895,
-0.29039856791496277,
-0.26622921228408813,
0.18154862523078918,
0.05376753211021423,
0.2009480595588684,
0.35296571254730225,
0.013525113463401794,
0.22080270946025848,
-0.24150040745735168,
0.030430074781179428,
-0.4703517258167267,
0.49977147579193115,
-0.0697626993060112,
-0.002002473920583725,
0.1622542440891266,
0.11453063786029816,
0.29374706745147705,
-0.01737435907125473,
-0.07251045852899551,
0.22813154757022858,
0.11742343008518219,
0.23197244107723236,
0.03978249803185463,
0.17142346501350403,
0.3116137683391571,
-0.48768383264541626,
0.18129615485668182,
0.515896201133728,
0.25014591217041016,
-0.05000005662441254,
-0.03679649159312248,
0.0388968288898468,
-0.09912262856960297,
0.15402154624462128,
-0.031900905072689056,
0.12437227368354797,
0.23009535670280457,
-0.007128000259399414,
-0.060295481234788895,
-0.09160897135734558,
0.18110668659210205,
0.23772910237312317,
0.0658475011587143,
-0.08423396199941635,
0.031011924147605896,
-0.06881116330623627,
0.27832239866256714,
-0.023398522287607193,
0.06406627595424652,
0.07167941331863403,
-0.5045633316040039,
-0.1164470985531807,
0.2502250075340271,
0.24101018905639648,
0.29738861322402954,
0.13609835505485535,
0.08965817093849182,
-0.008539124391973019,
0.10884450376033783,
-0.13967156410217285,
0.22893047332763672,
0.18231821060180664,
0.4946744441986084,
0.15090176463127136,
0.08386432379484177,
0.17866668105125427,
-0.10795211791992188,
-0.038888659328222275,
-0.019931111484766006,
0.18229158222675323,
-0.3191291391849518,
-0.10731855034828186,
-0.18838422000408173,
-0.09146919846534729,
-0.3253691792488098,
0.16662201285362244,
-0.1418086439371109,
-0.45340245962142944,
-0.014210419729351997,
0.18896104395389557,
-0.22324568033218384,
0.09023430943489075,
-0.054465726017951965,
-0.09718336164951324,
0.14131540060043335,
-0.02460501715540886,
-0.3673097491264343,
-0.19483408331871033,
-0.24400252103805542,
-0.024367786943912506,
0.10004986822605133,
0.19580242037773132,
0.27626872062683105,
-0.05049753189086914,
-0.055241040885448456,
-0.6208246946334839,
-0.2185600996017456,
0.20061486959457397,
0.12866146862506866,
0.1608772873878479,
0.1150018721818924,
0.4420570731163025,
-0.006679460406303406,
-0.16230414807796478,
0.14589950442314148,
0.01225762814283371,
-0.14291009306907654,
0.011428117752075195,
0.004597991704940796,
0.22045350074768066,
0.06179414689540863,
-0.4225062131881714,
-0.3032686114311218,
-0.3555681109428406,
-0.21532727777957916,
0.15920649468898773,
-0.0184645913541317,
-0.09659196436405182,
0.20655210316181183,
0.052995000034570694,
0.23128578066825867,
0.09633063524961472,
-0.14797070622444153,
-0.04748496040701866,
0.48003047704696655,
-0.2592318058013916,
-0.6178398132324219,
0.1918584704399109,
-0.3179738521575928,
0.039237845689058304,
0.38388893008232117,
-0.5105974078178406,
-0.007364336401224136,
0.05818929523229599,
-0.027664095163345337,
-0.0762614756822586,
0.0966615378856659,
0.3957224190235138,
-0.05271284282207489,
0.09240206331014633,
-0.22670680284500122,
0.09527373313903809,
-0.06658956408500671,
-0.3960660994052887,
0.3779778480529785,
0.2974438965320587,
0.18306279182434082,
-0.04238726943731308,
0.9808483123779297,
0.24108292162418365,
0.12091521918773651,
0.391028493642807,
0.05674316734075546,
0.16350890696048737,
-0.22032606601715088,
-0.2648508846759796,
-0.005587272346019745,
-0.08411703258752823,
0.01682182401418686,
0.3457852602005005,
-0.033927761018276215,
-0.17266015708446503,
-0.39051544666290283,
-0.12216471135616302,
-0.49500685930252075,
-0.3486511707305908,
0.03470636159181595,
-0.13713562488555908,
0.39951732754707336,
0.09980148822069168,
0.31824663281440735,
-0.029221463948488235,
-0.23624661564826965,
0.2627309262752533,
0.0011908821761608124,
0.15486985445022583,
0.046154581010341644,
0.13768060505390167,
0.02320084720849991,
-0.4359614849090576,
0.2115616798400879,
0.036765243858098984,
0.31111621856689453,
0.085711769759655,
0.042274199426174164,
0.04010409116744995,
0.017927829176187515,
0.5444362759590149,
-0.40480491518974304,
0.16142137348651886,
-0.0782971903681755,
0.15524303913116455,
-0.49265995621681213,
-0.027531679719686508,
-0.10655108839273453,
0.03309336304664612,
0.10354504734277725,
0.2202749252319336,
-0.4446220397949219,
0.03037818893790245,
0.2487069070339203,
0.40135425329208374,
-0.23655274510383606,
-0.17316806316375732,
-0.1427396535873413,
-0.33967703580856323,
-0.44106727838516235,
-0.2925233542919159,
-0.07984106242656708,
0.25116783380508423,
0.00158734992146492,
0.018062233924865723,
-0.005058955401182175,
0.09391392767429352,
-0.0607844777405262,
-0.1145206019282341,
0.22951006889343262,
0.14487811923027039,
0.15349344909191132,
0.16705968976020813,
0.11081678420305252,
-0.012559660710394382,
0.2894412875175476,
0.22610053420066833,
-0.3291700482368469,
0.030191689729690552,
-0.1030578464269638,
-0.03288388252258301,
0.24730151891708374,
-0.06281895190477371,
-0.25772252678871155,
-0.010155875235795975,
-0.20279835164546967,
-0.22132563591003418,
-0.006991885602474213,
0.15598922967910767,
-0.2100210040807724,
-0.22150781750679016,
-0.48110729455947876,
0.6695035696029663,
0.04339846223592758,
0.011291638016700745,
0.5136597752571106,
0.14752012491226196,
-0.28582122921943665,
0.4375310242176056,
0.30298250913619995,
0.8923989534378052,
-0.05718844011425972,
0.08609048277139664,
0.19716903567314148,
-0.012192219495773315,
0.6510748267173767,
-0.4116291403770447,
0.024787459522485733,
-0.3324829041957855,
0.028077151626348495,
-0.10410493612289429,
-0.0026051849126815796,
0.18044598400592804,
0.14542156457901,
0.005933903157711029,
0.3482414782047272,
0.197660893201828,
0.377275675535202,
0.044019319117069244,
0.2709459066390991,
-0.07940522581338882,
-0.2284509837627411,
-0.2781901955604553,
0.11087914556264877,
-0.15332427620887756,
0.4288862943649292,
-0.14929667115211487,
-0.002193346619606018,
-0.17751586437225342,
-0.2522006928920746,
-0.4586377739906311,
0.08784686028957367,
-0.35451173782348633,
0.21909675002098083,
-0.3085485100746155,
-0.5777170062065125,
0.10309501737356186,
0.4337296187877655,
0.09516596794128418,
0.08186852931976318,
-0.3419418931007385,
0.29524314403533936,
-0.42860183119773865,
-0.22485163807868958,
0.0059621259570121765,
0.03561563044786453,
0.28552016615867615,
-0.1389719843864441,
-0.12337712198495865,
0.2671686112880707,
-0.3019205331802368,
-0.18593284487724304,
-0.0015753358602523804,
-0.0440417043864727,
0.34083086252212524,
-0.03607091307640076,
-0.2351905107498169,
-0.04761528968811035,
-0.05151621997356415,
-0.18832853436470032,
0.15057937800884247,
-0.18076077103614807,
-0.022094838321208954,
-0.22968797385692596,
-0.0272083580493927,
-0.09199456870555878,
-0.010170058347284794,
0.47541823983192444,
0.01005656085908413,
-0.05139153078198433,
0.6058942675590515,
0.29158830642700195,
-0.1404298096895218,
-0.13402371108531952,
0.2429693341255188,
-0.18458311259746552,
-0.3388012647628784,
-0.10560266673564911,
-0.15291810035705566,
0.28047338128089905,
-0.26638472080230713,
0.19368430972099304,
0.132856547832489,
-0.2552063465118408,
0.11375272274017334,
-0.49719738960266113,
-0.026069022715091705,
0.29426485300064087,
-0.11780530959367752,
0.004770667292177677,
0.10198460519313812,
-0.17128156125545502,
0.245701864361763,
-0.23336492478847504,
-0.25739774107933044,
-0.07009516656398773,
-0.12769968807697296,
0.03787017613649368,
0.42515069246292114,
0.10222885012626648,
-0.13936761021614075,
0.006215039640665054,
0.08497358113527298,
-0.07708558440208435,
0.01711825281381607,
-0.16800659894943237,
-0.06363347917795181,
0.17036449909210205,
0.035029660910367966,
-0.010189704596996307,
-0.01732531562447548,
-0.344684898853302,
-0.08283722400665283,
-0.21172437071800232,
-0.037416744977235794,
0.05086494982242584,
-0.07710187137126923,
0.15876257419586182,
0.25679463148117065,
0.23731450736522675,
-0.5665854215621948,
0.1506771594285965,
-0.049571409821510315,
0.4211878180503845,
0.033924296498298645,
0.2024884670972824,
0.39974135160446167,
-0.05426239222288132,
-0.5235655903816223,
0.03337087482213974,
-0.197454035282135,
-0.006356770172715187,
0.43014341592788696,
-0.12533509731292725,
-0.02684350311756134,
0.38636869192123413,
0.11685498058795929,
0.10387444496154785,
-0.36624234914779663,
0.03715124726295471,
0.08667484670877457,
0.1707952916622162,
-0.33442553877830505,
0.10533685237169266,
0.4116196036338806,
-0.03458213806152344,
-0.14685465395450592,
0.1043148934841156,
0.1882183849811554,
-0.3454976975917816,
-0.0888456404209137,
0.2536002993583679,
0.2072925716638565,
-0.20865082740783691,
0.28181225061416626,
0.21709123253822327,
0.21802367269992828,
0.22775138914585114,
-0.06247863173484802,
-0.04391723871231079,
0.1493563950061798,
0.5230836272239685,
-0.04936087131500244,
0.42100903391838074,
0.29123571515083313,
0.06133448705077171,
-0.09875611960887909,
-0.35691940784454346,
0.1501484513282776,
0.1495550125837326,
-0.10301585495471954,
0.11525538563728333,
-0.028290782123804092,
0.13191016018390656,
0.17040009796619415,
0.15598146617412567,
-0.4203309714794159,
0.17085732519626617,
-0.030422333627939224,
0.1606513261795044,
-0.3559405505657196,
-0.36849328875541687,
-0.010458387434482574,
0.14010131359100342,
0.2118874043226242,
-0.3806062936782837,
0.3819614052772522,
0.1692344695329666,
-0.25253209471702576,
-0.35561323165893555,
0.48774734139442444,
-0.013498423621058464,
0.11571799218654633,
-0.28344276547431946,
-0.02355397865176201,
0.1617969423532486,
-0.08298442512750626,
0.05772346630692482,
0.1679462194442749,
0.23520176112651825,
0.24944962561130524,
-0.3187532424926758,
-0.14360558986663818,
0.08959148824214935,
-0.08835963159799576,
-0.05121283233165741,
0.30124613642692566,
0.07046835124492645,
0.013852296397089958,
0.3778868019580841,
0.12924429774284363,
-0.1739896535873413,
-0.39780309796333313,
0.4318195581436157,
0.08641427010297775,
-0.3341112434864044,
0.018904998898506165,
-0.35900887846946716,
-0.13545000553131104,
-0.09455403685569763,
-0.0035706274211406708,
-0.3516187369823456,
0.03176693990826607,
0.20678502321243286,
0.20891119539737701,
-0.02043098211288452,
-0.21686279773712158,
0.055347006767988205,
-0.23855620622634888,
0.3275951147079468,
0.3754828870296478,
0.11564663797616959,
-0.3960963785648346,
-0.37416142225265503,
-0.6565244793891907,
0.06389202177524567,
-0.14236567914485931,
-0.23654574155807495,
0.08274132013320923,
0.2850216031074524,
-0.02519349753856659,
0.32583099603652954,
-0.035131245851516724,
-0.05584282800555229,
0.14218728244304657,
0.3513117730617523,
-0.31143102049827576,
-0.396225243806839,
-0.05046672746539116,
0.10811223834753036,
-0.24449469149112701,
-0.4461306929588318,
0.15432046353816986,
-0.15525653958320618,
0.026454702019691467,
-0.16452141106128693,
-0.40391847491264343,
0.2776864469051361,
-0.03432191163301468,
0.42579835653305054,
-0.061310842633247375,
0.41949987411499023,
-0.08557019382715225,
-0.0969378799200058,
-0.20961993932724,
0.007711481302976608,
0.09599898010492325,
0.3093425929546356,
-0.2308284342288971,
0.3002045154571533,
-0.058957427740097046,
-0.0072785671800374985,
-0.21652957797050476,
0.3149679899215698,
-0.07620446383953094,
0.19871872663497925,
-0.4596458673477173,
0.05530562996864319,
-0.31901758909225464,
0.2400059998035431,
0.06564491987228394,
0.16460952162742615,
-0.19116976857185364,
0.1470513641834259,
-0.18997803330421448,
-0.38352036476135254,
0.24125592410564423,
-0.8094833493232727,
-0.27994489669799805,
-0.02833513729274273,
0.16247057914733887,
-0.18902792036533356,
0.20192234218120575,
-0.44219809770584106,
0.11148415505886078,
0.42436838150024414,
0.05701357498764992,
-0.003764323890209198,
-0.08618085086345673,
-0.1790948510169983,
0.03976908326148987,
0.04105546325445175,
0.030369652435183525,
-0.054055698215961456,
-0.13875946402549744,
-0.11627554893493652,
-0.3062851130962372
] |
https://github.com/huggingface/datasets/issues/6542 | This bug has been fixed in `2.16.1` thanks to https://github.com/huggingface/datasets/pull/6544, feel free to update `datasets` and re-run your code :)
```
pip install -U datasets
``` | Datasets : wikipedia 20220301.en error | ### Describe the bug
When I used load_dataset to download this data set, the following error occurred. The main problem was that the target data did not exist.
### Steps to reproduce the bug
1.I tried downloading directly.
```python
wiki_dataset = load_dataset("wikipedia", "20220301.en")
```
An exception occurred
```
MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner')`
```
2.I modified the code as prompted.
```python
wiki_dataset = load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner')
```
An exception occurred:
```
FileNotFoundError: Couldn't find file at https://dumps.wikimedia.org/enwiki/20220301/dumpstatus.json
```
### Expected behavior
I searched in the parent directory of the corresponding URL, but there was no corresponding "20220301" directory.
I really need this data set and hope to provide a download method.
### Environment info
python 3.8
datasets 2.16.0
apache-beam 2.52.0
dill 0.3.7
| 26 | Datasets : wikipedia 20220301.en error
### Describe the bug
When I used load_dataset to download this data set, the following error occurred. The main problem was that the target data did not exist.
### Steps to reproduce the bug
1.I tried downloading directly.
```python
wiki_dataset = load_dataset("wikipedia", "20220301.en")
```
An exception occurred
```
MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, Spark, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner')`
```
2.I modified the code as prompted.
```python
wiki_dataset = load_dataset('wikipedia', '20220301.en', beam_runner='DirectRunner')
```
An exception occurred:
```
FileNotFoundError: Couldn't find file at https://dumps.wikimedia.org/enwiki/20220301/dumpstatus.json
```
### Expected behavior
I searched in the parent directory of the corresponding URL, but there was no corresponding "20220301" directory.
I really need this data set and hope to provide a download method.
### Environment info
python 3.8
datasets 2.16.0
apache-beam 2.52.0
dill 0.3.7
This bug has been fixed in `2.16.1` thanks to https://github.com/huggingface/datasets/pull/6544, feel free to update `datasets` and re-run your code :)
```
pip install -U datasets
``` | [
-0.08289985358715057,
0.20689281821250916,
-0.015040706843137741,
0.33663633465766907,
0.11554808169603348,
0.1788325011730194,
0.28936833143234253,
0.349710077047348,
0.2294771373271942,
0.09866957366466522,
0.10366464406251907,
0.15296542644500732,
0.018877964466810226,
-0.0077821314334869385,
0.21722984313964844,
-0.35296061635017395,
0.17039456963539124,
0.0926557183265686,
-0.4099957346916199,
-0.13444110751152039,
-0.23266172409057617,
0.15910674631595612,
-0.25821274518966675,
-0.1614537537097931,
-0.15106773376464844,
0.14117766916751862,
-0.12969154119491577,
0.065244659781456,
0.018359240144491196,
-0.28537750244140625,
0.34540408849716187,
-0.117414191365242,
0.16693764925003052,
0.20532384514808655,
-0.00011340281344018877,
-0.01094566285610199,
0.513029158115387,
-0.14020965993404388,
-0.48873236775398254,
-0.21948355436325073,
-0.25768959522247314,
-0.45381224155426025,
0.0689295083284378,
-0.453350305557251,
-0.007031351327896118,
-0.2460276037454605,
0.159283846616745,
-0.24175259470939636,
0.3287718892097473,
0.21301770210266113,
0.19065020978450775,
0.24499255418777466,
0.36235904693603516,
-0.16368673741817474,
0.6252614259719849,
-0.015556450933218002,
-0.14858099818229675,
-0.11793215572834015,
-0.0900186076760292,
-0.015000928193330765,
0.04635532200336456,
0.30121511220932007,
-0.1406712532043457,
0.05268717557191849,
0.3349881172180176,
-0.11789022386074066,
-0.21729633212089539,
-0.5057092308998108,
0.2462024986743927,
0.28825393319129944,
0.8185455203056335,
-0.23594731092453003,
-0.2737976312637329,
-0.18303707242012024,
-0.011805538088083267,
0.20474974811077118,
0.38673028349876404,
0.28949394822120667,
-0.24581453204154968,
-0.0058279880322515965,
-0.0012555941939353943,
-0.25829824805259705,
-0.14299122989177704,
0.31733134388923645,
-0.03651602566242218,
0.31674081087112427,
-0.016565971076488495,
0.13810867071151733,
-0.16338327527046204,
0.00977286510169506,
0.0712847039103508,
-0.3745579719543457,
0.27682891488075256,
0.35245028138160706,
-0.3477252125740051,
0.009809695184230804,
-0.08771025389432907,
0.10358172655105591,
0.17437270283699036,
0.04372352734208107,
-0.04442217946052551,
-0.0017970362678170204,
0.012736938893795013,
-0.031148921698331833,
0.204015851020813,
-0.052967749536037445,
-0.10782961547374725,
-0.09776034951210022,
0.13922150433063507,
0.12437034398317337,
0.07006041705608368,
0.060687243938446045,
0.024249467998743057,
-0.13571849465370178,
-0.12442751973867416,
0.10339334607124329,
0.2178662270307541,
-0.012383095920085907,
-0.16239488124847412,
0.2446558028459549,
-0.5270615220069885,
-0.06719496101140976,
-0.28179222345352173,
0.27684104442596436,
-0.0967765599489212,
0.34170061349868774,
0.30835115909576416,
0.06969041377305984,
-0.22313091158866882,
-0.4322260022163391,
-0.1272241324186325,
0.29302242398262024,
-0.08384554833173752,
0.16471858322620392,
0.33582040667533875,
0.004918742924928665,
0.37054920196533203,
0.06076602265238762,
-0.12024976313114166,
-0.03568948060274124,
0.31864070892333984,
-0.022809848189353943,
-0.09242372959852219,
0.4191908538341522,
0.2677876353263855,
0.44134804606437683,
0.006564592011272907,
0.0504782572388649,
-0.03508441895246506,
0.14267875254154205,
-0.24855546653270721,
-0.10459455847740173,
-0.12270484119653702,
0.1348714977502823,
-0.2928610146045685,
0.16319185495376587,
-0.32635101675987244,
0.09286478161811829,
-0.04049732908606529,
-0.12714549899101257,
0.047590095549821854,
-0.0874422937631607,
-0.21387803554534912,
-0.329872727394104,
0.4857712984085083,
0.6723974943161011,
-0.17234182357788086,
0.055185481905937195,
-0.16139525175094604,
0.1127023696899414,
0.01645144820213318,
-0.31210193037986755,
-0.10691314190626144,
0.4882379174232483,
-0.242509663105011,
-0.0447174534201622,
0.3177259564399719,
-0.3201032876968384,
-0.34034305810928345,
0.09264924377202988,
-0.025409944355487823,
0.11776646226644516,
0.13414664566516876,
0.020444974303245544,
0.2145421952009201,
-0.06332548707723618,
-0.04164082929491997,
0.31098517775535583,
0.10115738958120346,
0.12399323284626007,
-0.24376849830150604,
-0.2587814927101135,
-0.09398902952671051,
0.14024178683757782,
0.2462139129638672,
-0.0674203485250473,
0.1786346137523651,
0.5487947463989258,
0.2580486238002777,
-0.07519467920064926,
0.2770947813987732,
0.5514249205589294,
-0.26289087533950806,
0.09306112676858902,
0.24631154537200928,
-0.18754152953624725,
-0.4023221731185913,
0.19969576597213745,
-0.07735373824834824,
0.094572514295578,
-0.002068381756544113,
-0.04920292645692825,
-0.5101162195205688,
0.02352074533700943,
-0.27518701553344727,
-0.26363953948020935,
0.16882219910621643,
0.03482170030474663,
0.20912039279937744,
0.3480636477470398,
0.003992535173892975,
0.24046635627746582,
-0.234780952334404,
0.025514990091323853,
-0.49039125442504883,
0.49416595697402954,
-0.06995343416929245,
-0.00511673279106617,
0.14172153174877167,
0.1418410688638687,
0.2543233036994934,
-0.04458632692694664,
-0.07178066670894623,
0.2564160227775574,
0.12230179458856583,
0.20568257570266724,
0.026097657158970833,
0.2086847722530365,
0.28960251808166504,
-0.5254965424537659,
0.1936807781457901,
0.4866684377193451,
0.24398043751716614,
-0.026189953088760376,
-0.036372166126966476,
0.012769989669322968,
-0.1222330704331398,
0.16228991746902466,
-0.051619935780763626,
0.1628306806087494,
0.23442992568016052,
-0.000015020370483398438,
-0.07971633225679398,
-0.09767124056816101,
0.18057894706726074,
0.18196254968643188,
0.0857832282781601,
-0.07792753726243973,
0.04970578849315643,
-0.042254675179719925,
0.2983010709285736,
-0.020006638020277023,
0.07214731723070145,
0.06146141141653061,
-0.5011178255081177,
-0.08783881366252899,
0.2519582509994507,
0.23306988179683685,
0.30668777227401733,
0.1384013146162033,
0.07266289740800858,
-0.00614679791033268,
0.13065853714942932,
-0.11904112249612808,
0.20924577116966248,
0.17127111554145813,
0.4576647877693176,
0.15036144852638245,
0.08441794663667679,
0.1951064169406891,
-0.11037436127662659,
0.009025685489177704,
-0.03604830056428909,
0.1921745389699936,
-0.3113008737564087,
-0.07789990305900574,
-0.19886167347431183,
-0.09690070152282715,
-0.33955320715904236,
0.19571256637573242,
-0.1372987926006317,
-0.4199637472629547,
-0.024002034217119217,
0.1980014592409134,
-0.19624413549900055,
0.14008250832557678,
-0.03512038290500641,
-0.10692852735519409,
0.13293413817882538,
-0.06032025068998337,
-0.3587314486503601,
-0.17998579144477844,
-0.2407216876745224,
-0.03256944194436073,
0.059529222548007965,
0.1688050925731659,
0.29837557673454285,
-0.04741809517145157,
-0.03567381948232651,
-0.6596204042434692,
-0.239475816488266,
0.20549242198467255,
0.09418123960494995,
0.15315420925617218,
0.17207416892051697,
0.41694626212120056,
0.00818680226802826,
-0.12490756809711456,
0.1493770182132721,
-0.026168420910835266,
-0.12970387935638428,
0.011733278632164001,
-0.01580769754946232,
0.2282891571521759,
0.03130941838026047,
-0.4302954375743866,
-0.3241561949253082,
-0.35736578702926636,
-0.18811620771884918,
0.1463579684495926,
-0.0064656659960746765,
-0.11961755901575089,
0.21669089794158936,
0.06109859421849251,
0.218049556016922,
0.0833553820848465,
-0.15026281774044037,
-0.02512253075838089,
0.4600125551223755,
-0.2728186547756195,
-0.6205325722694397,
0.20156864821910858,
-0.3158631920814514,
0.06699518859386444,
0.3700891137123108,
-0.5012602806091309,
-0.031764328479766846,
0.03499037027359009,
-0.02378746122121811,
-0.07789614796638489,
0.1443367898464203,
0.43289127945899963,
-0.05948645621538162,
0.09794973582029343,
-0.2393902987241745,
0.08409130573272705,
-0.0772743821144104,
-0.426138311624527,
0.37574708461761475,
0.2955003082752228,
0.1853305548429489,
-0.005849815905094147,
0.9465256929397583,
0.26578623056411743,
0.12477797269821167,
0.36083847284317017,
0.031009631231427193,
0.18928542733192444,
-0.24389947950839996,
-0.28102925419807434,
-0.00028286129236221313,
-0.039061516523361206,
0.02662019431591034,
0.31269484758377075,
-0.0220468882471323,
-0.14569179713726044,
-0.36667999625205994,
-0.09888505190610886,
-0.48371371626853943,
-0.3262767791748047,
0.02587548829615116,
-0.12405258417129517,
0.4208996891975403,
0.11797565221786499,
0.3216968774795532,
-0.03182544931769371,
-0.26399511098861694,
0.24164706468582153,
0.009042400866746902,
0.14237737655639648,
0.07844148576259613,
0.174750417470932,
-0.0028795935213565826,
-0.43025174736976624,
0.20333923399448395,
0.02078266814351082,
0.27949073910713196,
0.06506878137588501,
0.05230479687452316,
0.07132640480995178,
0.019368767738342285,
0.5198450684547424,
-0.43329787254333496,
0.15359406173229218,
-0.08051463961601257,
0.1635349541902542,
-0.5018743872642517,
-0.028864163905382156,
-0.10097400099039078,
0.008147042244672775,
0.1230081096291542,
0.22173020243644714,
-0.4779353737831116,
-0.012305628508329391,
0.3226926922798157,
0.40953657031059265,
-0.2143271267414093,
-0.1475781500339508,
-0.15852169692516327,
-0.35270294547080994,
-0.44656094908714294,
-0.27366799116134644,
-0.06845645606517792,
0.24139054119586945,
0.023852378129959106,
0.04168754816055298,
-0.00912870280444622,
0.10326233506202698,
-0.06307436525821686,
-0.11984521150588989,
0.23507770895957947,
0.15058791637420654,
0.15371212363243103,
0.19401559233665466,
0.05324451997876167,
-0.019215065985918045,
0.3061155080795288,
0.15930089354515076,
-0.3237646222114563,
0.04083457961678505,
-0.0991591215133667,
-0.0039170607924461365,
0.2277994006872177,
-0.11257591843605042,
-0.26613694429397583,
0.005787894129753113,
-0.18710969388484955,
-0.2354476898908615,
0.005797721445560455,
0.17996728420257568,
-0.19208326935768127,
-0.20422068238258362,
-0.5197493433952332,
0.689499020576477,
0.08178286254405975,
0.009242117404937744,
0.49458158016204834,
0.1767173409461975,
-0.24529501795768738,
0.41276976466178894,
0.26976335048675537,
0.8645780086517334,
-0.05931515991687775,
0.09003791213035583,
0.20005321502685547,
0.023522570729255676,
0.6788662672042847,
-0.428003191947937,
-0.0011565051972866058,
-0.32724350690841675,
0.042904842644929886,
-0.12143117189407349,
0.006488330662250519,
0.16691970825195312,
0.12007160484790802,
0.012555688619613647,
0.3641815781593323,
0.18648816645145416,
0.4299897253513336,
0.035345375537872314,
0.2756193280220032,
-0.08967564254999161,
-0.27063071727752686,
-0.26430436968803406,
0.11920001357793808,
-0.1618737131357193,
0.46239548921585083,
-0.13789857923984528,
0.010794088244438171,
-0.15029481053352356,
-0.2740464210510254,
-0.483691930770874,
0.09280627965927124,
-0.37613216042518616,
0.24551182985305786,
-0.28231000900268555,
-0.5893147587776184,
0.09548478573560715,
0.41412171721458435,
0.0882982462644577,
0.13045227527618408,
-0.32532671093940735,
0.2680308222770691,
-0.39495110511779785,
-0.2294534593820572,
0.019693437963724136,
0.03471864014863968,
0.26475492119789124,
-0.1290961652994156,
-0.11828811466693878,
0.2434040755033493,
-0.27056556940078735,
-0.1732780635356903,
0.07750357687473297,
-0.024725567549467087,
0.3564826250076294,
-0.030567368492484093,
-0.19580724835395813,
-0.04531443119049072,
-0.010347284376621246,
-0.17267973721027374,
0.14859353005886078,
-0.16173061728477478,
-0.04587447643280029,
-0.20752373337745667,
-0.05068293586373329,
-0.10295815765857697,
-0.0005390914157032967,
0.46069028973579407,
-0.006708668079227209,
-0.060444630682468414,
0.5905200242996216,
0.291015625,
-0.14054538309574127,
-0.15619969367980957,
0.23506900668144226,
-0.18638312816619873,
-0.36392951011657715,
-0.0955030769109726,
-0.11704616993665695,
0.2345811277627945,
-0.24539606273174286,
0.21294230222702026,
0.11848849058151245,
-0.2985597252845764,
0.08266736567020416,
-0.48584240674972534,
-0.01716398075222969,
0.26600396633148193,
-0.10568366944789886,
-0.0019213310442864895,
0.11444792151451111,
-0.1607837975025177,
0.205468088388443,
-0.26108571887016296,
-0.2542439103126526,
-0.03385838121175766,
-0.12645003199577332,
0.04462430626153946,
0.45443612337112427,
0.10751070082187653,
-0.09272274374961853,
0.005097940564155579,
0.08181526511907578,
-0.057133082300424576,
-0.021825283765792847,
-0.17384187877178192,
-0.09327942132949829,
0.17198003828525543,
0.021776322275400162,
-0.006694380193948746,
-0.008010312914848328,
-0.35414767265319824,
-0.12728473544120789,
-0.22667960822582245,
-0.004634276032447815,
0.026829928159713745,
-0.05507519841194153,
0.18323609232902527,
0.22403718531131744,
0.2401917725801468,
-0.5050418972969055,
0.1643078476190567,
-0.05438116192817688,
0.4190565347671509,
0.025088302791118622,
0.21531632542610168,
0.39520174264907837,
-0.061874620616436005,
-0.5092476010322571,
0.03799905627965927,
-0.17328305542469025,
-0.039862602949142456,
0.42987096309661865,
-0.1470181941986084,
-0.00382918119430542,
0.3773423731327057,
0.13990284502506256,
0.0831916332244873,
-0.34155574440956116,
0.01994561403989792,
0.07045181840658188,
0.16447898745536804,
-0.3443927466869354,
0.11655272543430328,
0.4127361476421356,
0.03269554674625397,
-0.131616473197937,
0.12508824467658997,
0.23634397983551025,
-0.32168543338775635,
-0.0668511837720871,
0.26705464720726013,
0.24480833113193512,
-0.25473901629447937,
0.2715740501880646,
0.22919680178165436,
0.24280418455600739,
0.26442787051200867,
-0.07873696833848953,
-0.039925988763570786,
0.13757938146591187,
0.5122400522232056,
-0.07425770908594131,
0.389813095331192,
0.28792983293533325,
0.04732735827565193,
-0.08641423285007477,
-0.377344012260437,
0.1560211479663849,
0.12837329506874084,
-0.09260186553001404,
0.09354610741138458,
-0.05037643387913704,
0.20632155239582062,
0.12661920487880707,
0.1693757027387619,
-0.42418813705444336,
0.18939213454723358,
-0.03245988488197327,
0.16181954741477966,
-0.321454793214798,
-0.32889124751091003,
-0.004109703004360199,
0.13375209271907806,
0.22711516916751862,
-0.3611266314983368,
0.43329882621765137,
0.17500703036785126,
-0.22094270586967468,
-0.39854246377944946,
0.4563733637332916,
0.024986162781715393,
0.11400001496076584,
-0.26601216197013855,
-0.0016020648181438446,
0.15110403299331665,
-0.07484142482280731,
0.008084692060947418,
0.2161405235528946,
0.27209043502807617,
0.2231326848268509,
-0.2945263981819153,
-0.12722574174404144,
0.03823305666446686,
-0.07420296967029572,
-0.07004401832818985,
0.28571170568466187,
0.04565330594778061,
0.02744198963046074,
0.35821762681007385,
0.12818971276283264,
-0.1813438981771469,
-0.4286745488643646,
0.38398870825767517,
0.09785723686218262,
-0.3138349652290344,
0.04621519148349762,
-0.38295769691467285,
-0.11157234013080597,
-0.1452925205230713,
0.0005905777215957642,
-0.3480801284313202,
0.04515409469604492,
0.259199857711792,
0.25767582654953003,
-0.025033671408891678,
-0.23011226952075958,
0.05497176945209503,
-0.2527860403060913,
0.33211660385131836,
0.3640846014022827,
0.14522354304790497,
-0.38995876908302307,
-0.3511403203010559,
-0.6921958327293396,
0.054494768381118774,
-0.1848009079694748,
-0.23179957270622253,
0.08281935751438141,
0.3110507130622864,
-0.028099678456783295,
0.3337598741054535,
-0.04065442085266113,
-0.07736138999462128,
0.16070857644081116,
0.3248260021209717,
-0.28731781244277954,
-0.40428662300109863,
-0.06382826715707779,
0.0864182561635971,
-0.21143224835395813,
-0.4531659483909607,
0.10476581752300262,
-0.16493676602840424,
0.013729721307754517,
-0.16079503297805786,
-0.38983795046806335,
0.2652856707572937,
-0.0673760175704956,
0.4324270486831665,
-0.05387566611170769,
0.39243340492248535,
-0.05821075290441513,
-0.0875108540058136,
-0.21979081630706787,
0.014988254755735397,
0.053239937871694565,
0.30488771200180054,
-0.240267813205719,
0.28778988122940063,
-0.09056515991687775,
-0.05319783091545105,
-0.25383496284484863,
0.3182835876941681,
-0.054711274802684784,
0.18437254428863525,
-0.4721200466156006,
0.0743207186460495,
-0.3485749661922455,
0.2747611105442047,
0.05097873881459236,
0.15108753740787506,
-0.18647851049900055,
0.15775755047798157,
-0.18692144751548767,
-0.41533854603767395,
0.2618967592716217,
-0.8150479793548584,
-0.273074209690094,
-0.048382241278886795,
0.1757446527481079,
-0.1388830840587616,
0.15567085146903992,
-0.4628479778766632,
0.12014931440353394,
0.416566401720047,
0.045001477003097534,
-0.01812569797039032,
-0.06733665615320206,
-0.176459401845932,
0.05898655205965042,
0.02759893238544464,
0.07306680828332901,
-0.05998404324054718,
-0.14582648873329163,
-0.07875838875770569,
-0.3059701919555664
] |
https://github.com/huggingface/datasets/issues/6541 | This is a problem with your environment. You should be able to fix it by upgrading `numpy` based on [this](https://github.com/numpy/numpy/issues/23570) issue. | Dataset not loading successfully. | ### Describe the bug
When I run down the below code shows this error: AttributeError: module 'numpy' has no attribute '_no_nep50_warning'
I also added this issue in transformers library please check out: [link](https://github.com/huggingface/transformers/issues/28099)
### Steps to reproduce the bug
## Reproduction
Hi, please check this line of code, when I run Show attribute error.
```
from datasets import load_dataset
from transformers import WhisperProcessor, WhisperForConditionalGeneration
# Select an audio file and read it:
ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
audio_sample = ds[0]["audio"]
waveform = audio_sample["array"]
sampling_rate = audio_sample["sampling_rate"]
# Load the Whisper model in Hugging Face format:
processor = WhisperProcessor.from_pretrained("openai/whisper-tiny.en")
model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny.en")
# Use the model and processor to transcribe the audio:
input_features = processor(
waveform, sampling_rate=sampling_rate, return_tensors="pt"
).input_features
# Generate token ids
predicted_ids = model.generate(input_features)
# Decode token ids to text
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)
transcription[0]
```
**Attribute Error**
```
AttributeError Traceback (most recent call last)
Cell In[9], line 6
4 # Select an audio file and read it:
5 ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
----> 6 audio_sample = ds[0]["audio"]
7 waveform = audio_sample["array"]
8 sampling_rate = audio_sample["sampling_rate"]
File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2795, in Dataset.__getitem__(self, key)
2793 def __getitem__(self, key): # noqa: F811
2794 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools)."""
-> 2795 return self._getitem(key)
File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2780, in Dataset._getitem(self, key, **kwargs)
2778 formatter = get_formatter(format_type, features=self._info.features, **format_kwargs)
2779 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None)
-> 2780 formatted_output = format_table(
2781 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns
2782 )
2783 return formatted_output
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:629, in format_table(table, key, formatter, format_columns, output_all_columns)
627 python_formatter = PythonFormatter(features=formatter.features)
628 if format_columns is None:
--> 629 return formatter(pa_table, query_type=query_type)
630 elif query_type == "column":
631 if key in format_columns:
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:396, in Formatter.__call__(self, pa_table, query_type)
394 def __call__(self, pa_table: pa.Table, query_type: str) -> Union[RowFormat, ColumnFormat, BatchFormat]:
395 if query_type == "row":
--> 396 return self.format_row(pa_table)
397 elif query_type == "column":
398 return self.format_column(pa_table)
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:437, in PythonFormatter.format_row(self, pa_table)
435 return LazyRow(pa_table, self)
436 row = self.python_arrow_extractor().extract_row(pa_table)
--> 437 row = self.python_features_decoder.decode_row(row)
438 return row
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:215, in PythonFeaturesDecoder.decode_row(self, row)
214 def decode_row(self, row: dict) -> dict:
--> 215 return self.features.decode_example(row) if self.features else row
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1917, in Features.decode_example(self, example, token_per_repo_id)
1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1904 """Decode example with custom feature decoding.
1905
1906 Args:
(...)
1914 `dict[str, Any]`
1915 """
-> 1917 return {
1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1919 if self._column_requires_decoding[column_name]
1920 else value
1921 for column_name, (feature, value) in zip_dict(
1922 {key: value for key, value in self.items() if key in example}, example
1923 )
1924 }
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1918, in <dictcomp>(.0)
1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1904 """Decode example with custom feature decoding.
1905
1906 Args:
(...)
1914 `dict[str, Any]`
1915 """
1917 return {
-> 1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1919 if self._column_requires_decoding[column_name]
1920 else value
1921 for column_name, (feature, value) in zip_dict(
1922 {key: value for key, value in self.items() if key in example}, example
1923 )
1924 }
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1339, in decode_nested_example(schema, obj, token_per_repo_id)
1336 elif isinstance(schema, (Audio, Image)):
1337 # we pass the token to read and decode files from private repositories in streaming mode
1338 if obj is not None and schema.decode:
-> 1339 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1340 return obj
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/audio.py:191, in Audio.decode_example(self, value, token_per_repo_id)
189 array = array.T
190 if self.mono:
--> 191 array = librosa.to_mono(array)
192 if self.sampling_rate and self.sampling_rate != sampling_rate:
193 array = librosa.resample(array, orig_sr=sampling_rate, target_sr=self.sampling_rate)
File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:78, in attach.<locals>.__getattr__(name)
76 submod_path = f"{package_name}.{attr_to_modules[name]}"
77 submod = importlib.import_module(submod_path)
---> 78 attr = getattr(submod, name)
80 # If the attribute lives in a file (module) with the same
81 # name as the attribute, ensure that the attribute and *not*
82 # the module is accessible on the package.
83 if name == attr_to_modules[name]:
File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:77, in attach.<locals>.__getattr__(name)
75 elif name in attr_to_modules:
76 submod_path = f"{package_name}.{attr_to_modules[name]}"
---> 77 submod = importlib.import_module(submod_path)
78 attr = getattr(submod, name)
80 # If the attribute lives in a file (module) with the same
81 # name as the attribute, ensure that the attribute and *not*
82 # the module is accessible on the package.
File /usr/lib/python3.8/importlib/__init__.py:127, in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
File <frozen importlib._bootstrap>:1014, in _gcd_import(name, package, level)
File <frozen importlib._bootstrap>:991, in _find_and_load(name, import_)
File <frozen importlib._bootstrap>:975, in _find_and_load_unlocked(name, import_)
File <frozen importlib._bootstrap>:671, in _load_unlocked(spec)
File <frozen importlib._bootstrap_external>:848, in exec_module(self, module)
File <frozen importlib._bootstrap>:219, in _call_with_frames_removed(f, *args, **kwds)
File /opt/pytorch/lib/python3.8/site-packages/librosa/core/audio.py:13
11 import audioread
12 import numpy as np
---> 13 import scipy.signal
14 import soxr
15 import lazy_loader as lazy
File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/__init__.py:323
314 from ._spline import ( # noqa: F401
315 cspline2d,
316 qspline2d,
(...)
319 symiirorder2,
320 )
322 from ._bsplines import *
--> 323 from ._filter_design import *
324 from ._fir_filter_design import *
325 from ._ltisys import *
File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/_filter_design.py:16
13 from numpy.polynomial.polynomial import polyval as npp_polyval
14 from numpy.polynomial.polynomial import polyvalfromroots
---> 16 from scipy import special, optimize, fft as sp_fft
17 from scipy.special import comb
18 from scipy._lib._util import float_factorial
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/__init__.py:405
1 """
2 =====================================================
3 Optimization and root finding (:mod:`scipy.optimize`)
(...)
401
402 """
404 from ._optimize import *
--> 405 from ._minimize import *
406 from ._root import *
407 from ._root_scalar import *
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_minimize.py:26
24 from ._trustregion_krylov import _minimize_trust_krylov
25 from ._trustregion_exact import _minimize_trustregion_exact
---> 26 from ._trustregion_constr import _minimize_trustregion_constr
28 # constrained minimization
29 from ._lbfgsb_py import _minimize_lbfgsb
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/__init__.py:4
1 """This module contains the equality constrained SQP solver."""
----> 4 from .minimize_trustregion_constr import _minimize_trustregion_constr
6 __all__ = ['_minimize_trustregion_constr']
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py:5
3 from scipy.sparse.linalg import LinearOperator
4 from .._differentiable_functions import VectorFunction
----> 5 from .._constraints import (
6 NonlinearConstraint, LinearConstraint, PreparedConstraint, strict_bounds)
7 from .._hessian_update_strategy import BFGS
8 from .._optimize import OptimizeResult
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_constraints.py:8
6 from ._optimize import OptimizeWarning
7 from warnings import warn, catch_warnings, simplefilter
----> 8 from numpy.testing import suppress_warnings
9 from scipy.sparse import issparse
12 def _arr_to_scalar(x):
13 # If x is a numpy array, return x.item(). This will
14 # fail if the array has more than one element.
File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/__init__.py:11
8 from unittest import TestCase
10 from . import _private
---> 11 from ._private.utils import *
12 from ._private.utils import (_assert_valid_refcount, _gen_alignment_data)
13 from ._private import extbuild, decorators as dec
File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/_private/utils.py:480
476 pprint.pprint(desired, msg)
477 raise AssertionError(msg.getvalue())
--> 480 @np._no_nep50_warning()
481 def assert_almost_equal(actual,desired,decimal=7,err_msg='',verbose=True):
482 """
483 Raises an AssertionError if two items are not equal up to desired
484 precision.
(...)
548
549 """
550 __tracebackhide__ = True # Hide traceback for py.test
File /opt/pytorch/lib/python3.8/site-packages/numpy/__init__.py:313, in __getattr__(attr)
305 raise AttributeError(__former_attrs__[attr])
307 # Importing Tester requires importing all of UnitTest which is not a
308 # cheap import Since it is mainly used in test suits, we lazy import it
309 # here to save on the order of 10 ms of import time for most users
310 #
311 # The previous way Tester was imported also had a side effect of adding
312 # the full `numpy.testing` namespace
--> 313 if attr == 'testing':
314 import numpy.testing as testing
315 return testing
AttributeError: module 'numpy' has no attribute '_no_nep50_warning'
```
### Expected behavior
``` ' Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel.' ```
Also, make sure this script is provided for your official website so please update:
[script](https://huggingface.co/docs/transformers/model_doc/whisper)
### Environment info
**System Info**
* transformers -> 4.36.1
* datasets -> 2.15.0
* huggingface_hub -> 0.19.4
* python -> 3.8.10
* accelerate -> 0.25.0
* pytorch -> 2.0.1+cpu
* Using GPU in Script -> No
| 21 | Dataset not loading successfully.
### Describe the bug
When I run down the below code shows this error: AttributeError: module 'numpy' has no attribute '_no_nep50_warning'
I also added this issue in transformers library please check out: [link](https://github.com/huggingface/transformers/issues/28099)
### Steps to reproduce the bug
## Reproduction
Hi, please check this line of code, when I run Show attribute error.
```
from datasets import load_dataset
from transformers import WhisperProcessor, WhisperForConditionalGeneration
# Select an audio file and read it:
ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
audio_sample = ds[0]["audio"]
waveform = audio_sample["array"]
sampling_rate = audio_sample["sampling_rate"]
# Load the Whisper model in Hugging Face format:
processor = WhisperProcessor.from_pretrained("openai/whisper-tiny.en")
model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny.en")
# Use the model and processor to transcribe the audio:
input_features = processor(
waveform, sampling_rate=sampling_rate, return_tensors="pt"
).input_features
# Generate token ids
predicted_ids = model.generate(input_features)
# Decode token ids to text
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)
transcription[0]
```
**Attribute Error**
```
AttributeError Traceback (most recent call last)
Cell In[9], line 6
4 # Select an audio file and read it:
5 ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
----> 6 audio_sample = ds[0]["audio"]
7 waveform = audio_sample["array"]
8 sampling_rate = audio_sample["sampling_rate"]
File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2795, in Dataset.__getitem__(self, key)
2793 def __getitem__(self, key): # noqa: F811
2794 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools)."""
-> 2795 return self._getitem(key)
File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2780, in Dataset._getitem(self, key, **kwargs)
2778 formatter = get_formatter(format_type, features=self._info.features, **format_kwargs)
2779 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None)
-> 2780 formatted_output = format_table(
2781 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns
2782 )
2783 return formatted_output
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:629, in format_table(table, key, formatter, format_columns, output_all_columns)
627 python_formatter = PythonFormatter(features=formatter.features)
628 if format_columns is None:
--> 629 return formatter(pa_table, query_type=query_type)
630 elif query_type == "column":
631 if key in format_columns:
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:396, in Formatter.__call__(self, pa_table, query_type)
394 def __call__(self, pa_table: pa.Table, query_type: str) -> Union[RowFormat, ColumnFormat, BatchFormat]:
395 if query_type == "row":
--> 396 return self.format_row(pa_table)
397 elif query_type == "column":
398 return self.format_column(pa_table)
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:437, in PythonFormatter.format_row(self, pa_table)
435 return LazyRow(pa_table, self)
436 row = self.python_arrow_extractor().extract_row(pa_table)
--> 437 row = self.python_features_decoder.decode_row(row)
438 return row
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:215, in PythonFeaturesDecoder.decode_row(self, row)
214 def decode_row(self, row: dict) -> dict:
--> 215 return self.features.decode_example(row) if self.features else row
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1917, in Features.decode_example(self, example, token_per_repo_id)
1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1904 """Decode example with custom feature decoding.
1905
1906 Args:
(...)
1914 `dict[str, Any]`
1915 """
-> 1917 return {
1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1919 if self._column_requires_decoding[column_name]
1920 else value
1921 for column_name, (feature, value) in zip_dict(
1922 {key: value for key, value in self.items() if key in example}, example
1923 )
1924 }
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1918, in <dictcomp>(.0)
1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1904 """Decode example with custom feature decoding.
1905
1906 Args:
(...)
1914 `dict[str, Any]`
1915 """
1917 return {
-> 1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1919 if self._column_requires_decoding[column_name]
1920 else value
1921 for column_name, (feature, value) in zip_dict(
1922 {key: value for key, value in self.items() if key in example}, example
1923 )
1924 }
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1339, in decode_nested_example(schema, obj, token_per_repo_id)
1336 elif isinstance(schema, (Audio, Image)):
1337 # we pass the token to read and decode files from private repositories in streaming mode
1338 if obj is not None and schema.decode:
-> 1339 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1340 return obj
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/audio.py:191, in Audio.decode_example(self, value, token_per_repo_id)
189 array = array.T
190 if self.mono:
--> 191 array = librosa.to_mono(array)
192 if self.sampling_rate and self.sampling_rate != sampling_rate:
193 array = librosa.resample(array, orig_sr=sampling_rate, target_sr=self.sampling_rate)
File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:78, in attach.<locals>.__getattr__(name)
76 submod_path = f"{package_name}.{attr_to_modules[name]}"
77 submod = importlib.import_module(submod_path)
---> 78 attr = getattr(submod, name)
80 # If the attribute lives in a file (module) with the same
81 # name as the attribute, ensure that the attribute and *not*
82 # the module is accessible on the package.
83 if name == attr_to_modules[name]:
File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:77, in attach.<locals>.__getattr__(name)
75 elif name in attr_to_modules:
76 submod_path = f"{package_name}.{attr_to_modules[name]}"
---> 77 submod = importlib.import_module(submod_path)
78 attr = getattr(submod, name)
80 # If the attribute lives in a file (module) with the same
81 # name as the attribute, ensure that the attribute and *not*
82 # the module is accessible on the package.
File /usr/lib/python3.8/importlib/__init__.py:127, in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
File <frozen importlib._bootstrap>:1014, in _gcd_import(name, package, level)
File <frozen importlib._bootstrap>:991, in _find_and_load(name, import_)
File <frozen importlib._bootstrap>:975, in _find_and_load_unlocked(name, import_)
File <frozen importlib._bootstrap>:671, in _load_unlocked(spec)
File <frozen importlib._bootstrap_external>:848, in exec_module(self, module)
File <frozen importlib._bootstrap>:219, in _call_with_frames_removed(f, *args, **kwds)
File /opt/pytorch/lib/python3.8/site-packages/librosa/core/audio.py:13
11 import audioread
12 import numpy as np
---> 13 import scipy.signal
14 import soxr
15 import lazy_loader as lazy
File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/__init__.py:323
314 from ._spline import ( # noqa: F401
315 cspline2d,
316 qspline2d,
(...)
319 symiirorder2,
320 )
322 from ._bsplines import *
--> 323 from ._filter_design import *
324 from ._fir_filter_design import *
325 from ._ltisys import *
File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/_filter_design.py:16
13 from numpy.polynomial.polynomial import polyval as npp_polyval
14 from numpy.polynomial.polynomial import polyvalfromroots
---> 16 from scipy import special, optimize, fft as sp_fft
17 from scipy.special import comb
18 from scipy._lib._util import float_factorial
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/__init__.py:405
1 """
2 =====================================================
3 Optimization and root finding (:mod:`scipy.optimize`)
(...)
401
402 """
404 from ._optimize import *
--> 405 from ._minimize import *
406 from ._root import *
407 from ._root_scalar import *
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_minimize.py:26
24 from ._trustregion_krylov import _minimize_trust_krylov
25 from ._trustregion_exact import _minimize_trustregion_exact
---> 26 from ._trustregion_constr import _minimize_trustregion_constr
28 # constrained minimization
29 from ._lbfgsb_py import _minimize_lbfgsb
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/__init__.py:4
1 """This module contains the equality constrained SQP solver."""
----> 4 from .minimize_trustregion_constr import _minimize_trustregion_constr
6 __all__ = ['_minimize_trustregion_constr']
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py:5
3 from scipy.sparse.linalg import LinearOperator
4 from .._differentiable_functions import VectorFunction
----> 5 from .._constraints import (
6 NonlinearConstraint, LinearConstraint, PreparedConstraint, strict_bounds)
7 from .._hessian_update_strategy import BFGS
8 from .._optimize import OptimizeResult
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_constraints.py:8
6 from ._optimize import OptimizeWarning
7 from warnings import warn, catch_warnings, simplefilter
----> 8 from numpy.testing import suppress_warnings
9 from scipy.sparse import issparse
12 def _arr_to_scalar(x):
13 # If x is a numpy array, return x.item(). This will
14 # fail if the array has more than one element.
File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/__init__.py:11
8 from unittest import TestCase
10 from . import _private
---> 11 from ._private.utils import *
12 from ._private.utils import (_assert_valid_refcount, _gen_alignment_data)
13 from ._private import extbuild, decorators as dec
File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/_private/utils.py:480
476 pprint.pprint(desired, msg)
477 raise AssertionError(msg.getvalue())
--> 480 @np._no_nep50_warning()
481 def assert_almost_equal(actual,desired,decimal=7,err_msg='',verbose=True):
482 """
483 Raises an AssertionError if two items are not equal up to desired
484 precision.
(...)
548
549 """
550 __tracebackhide__ = True # Hide traceback for py.test
File /opt/pytorch/lib/python3.8/site-packages/numpy/__init__.py:313, in __getattr__(attr)
305 raise AttributeError(__former_attrs__[attr])
307 # Importing Tester requires importing all of UnitTest which is not a
308 # cheap import Since it is mainly used in test suits, we lazy import it
309 # here to save on the order of 10 ms of import time for most users
310 #
311 # The previous way Tester was imported also had a side effect of adding
312 # the full `numpy.testing` namespace
--> 313 if attr == 'testing':
314 import numpy.testing as testing
315 return testing
AttributeError: module 'numpy' has no attribute '_no_nep50_warning'
```
### Expected behavior
``` ' Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel.' ```
Also, make sure this script is provided for your official website so please update:
[script](https://huggingface.co/docs/transformers/model_doc/whisper)
### Environment info
**System Info**
* transformers -> 4.36.1
* datasets -> 2.15.0
* huggingface_hub -> 0.19.4
* python -> 3.8.10
* accelerate -> 0.25.0
* pytorch -> 2.0.1+cpu
* Using GPU in Script -> No
This is a problem with your environment. You should be able to fix it by upgrading `numpy` based on [this](https://github.com/numpy/numpy/issues/23570) issue. | [
-0.23438847064971924,
-0.3350293040275574,
0.06285360455513,
0.4334274232387543,
0.47662264108657837,
-0.10106334835290909,
0.43459445238113403,
0.1095186322927475,
0.12539657950401306,
0.29031631350517273,
-0.3058722913265228,
0.24882371723651886,
-0.28929731249809265,
-0.003888435661792755,
0.19231298565864563,
-0.00970418006181717,
0.023877408355474472,
0.1954306811094284,
-0.008142072707414627,
-0.2456541210412979,
-0.19157202541828156,
0.2406691461801529,
-0.3996373414993286,
0.17748725414276123,
-0.4194883704185486,
-0.06738832592964172,
0.32403692603111267,
0.19395002722740173,
-0.11070574820041656,
-0.4173997938632965,
0.26217547059059143,
-0.3125990629196167,
0.31800946593284607,
0.38047879934310913,
-0.00012031303776893765,
0.24640056490898132,
0.5512852668762207,
-0.16475312411785126,
-0.27835655212402344,
-0.06924595683813095,
0.06830485165119171,
0.09302637726068497,
-0.013693444430828094,
0.11106741428375244,
-0.24708274006843567,
0.14441943168640137,
-0.223147451877594,
-0.18724775314331055,
0.4866816997528076,
0.35635513067245483,
0.1301165670156479,
0.6396480798721313,
0.2268131822347641,
0.1363770216703415,
0.0383913479745388,
0.2183842658996582,
-0.12043151259422302,
0.07736687362194061,
0.09992638230323792,
-0.06356549263000488,
0.13282811641693115,
0.3650335371494293,
-0.0467258095741272,
0.024706650525331497,
0.4404199719429016,
0.14971937239170074,
0.4273488223552704,
-0.5112829208374023,
-0.17965850234031677,
0.30830225348472595,
0.08672980964183807,
-0.043184321373701096,
-0.27332258224487305,
-0.1498146951198578,
-0.07396408915519714,
-0.40205052495002747,
0.021755918860435486,
-0.0023497939109802246,
-0.24494512379169464,
-0.009265070781111717,
-0.22350917756557465,
0.08385099470615387,
0.023974329233169556,
0.16503936052322388,
0.08004113286733627,
0.4140673279762268,
-0.059069473296403885,
0.04963722452521324,
0.014258742332458496,
-0.18153116106987,
0.04586434364318848,
0.031510476022958755,
-0.0617445632815361,
0.3646732270717621,
-0.5112243890762329,
-0.12562009692192078,
-0.013085346668958664,
-0.4228315055370331,
0.15278436243534088,
0.0072188060730695724,
-0.047394901514053345,
-0.05398900434374809,
-0.06132505461573601,
0.12581108510494232,
0.23736988008022308,
0.21051964163780212,
0.014636666513979435,
0.07325403392314911,
0.06319271773099899,
0.22507192194461823,
0.42682376503944397,
-0.0009608007967472076,
-0.18732085824012756,
0.05594851076602936,
0.06060396134853363,
0.03604084998369217,
0.27881669998168945,
-0.3956502676010132,
-0.3895747661590576,
-0.05840259790420532,
-0.20384523272514343,
-0.1641702950000763,
0.227483332157135,
0.4749464690685272,
0.016802389174699783,
0.14616085588932037,
0.14014677703380585,
0.1375402957201004,
-0.3047604560852051,
-0.2154458612203598,
-0.21104447543621063,
-0.008113371208310127,
-0.25698214769363403,
0.04984024912118912,
0.08899353444576263,
0.18582533299922943,
0.2721630930900574,
-0.13882772624492645,
0.2616540193557739,
-0.1627454161643982,
0.0642547607421875,
-0.08848525583744049,
-0.0733458548784256,
0.39676132798194885,
-0.26772406697273254,
-0.001783125102519989,
-0.049112968146800995,
-0.343792587518692,
-0.009709909558296204,
0.03477415442466736,
-0.15961623191833496,
-0.2823835611343384,
0.13646717369556427,
0.11167246103286743,
-0.06788109242916107,
0.02287977561354637,
-0.2750296890735626,
-0.08533795922994614,
0.3868095278739929,
-0.2365071326494217,
0.07500800490379333,
-0.34221094846725464,
-0.3093253970146179,
0.09200392663478851,
0.5923802256584167,
0.6410744786262512,
0.024744302034378052,
-0.47498196363449097,
0.11923126876354218,
-0.23080772161483765,
0.0884590670466423,
0.4773505926132202,
-0.05087815597653389,
-0.17750771343708038,
-0.30502405762672424,
0.032312363386154175,
0.40190839767456055,
-0.37713199853897095,
-0.43298548460006714,
0.12376904487609863,
-0.21873190999031067,
0.08808090537786484,
-0.038376521319150925,
0.03327339515089989,
-0.20531544089317322,
-0.2246682345867157,
0.2675780653953552,
0.28766801953315735,
0.2032138854265213,
0.01156480610370636,
-0.31235745549201965,
-0.27188199758529663,
0.24664165079593658,
0.3167061507701874,
-0.09085433930158615,
0.1907789409160614,
-0.04962250217795372,
0.23350301384925842,
0.29265400767326355,
0.022221092134714127,
-0.08754837512969971,
0.10630612075328827,
0.3155529797077179,
-0.1481197327375412,
0.012397423386573792,
-0.12289904057979584,
-0.32122477889060974,
0.21331050992012024,
-0.5302758812904358,
0.376913845539093,
-0.2067185491323471,
0.15795838832855225,
-0.15098129212856293,
0.05238422006368637,
-0.41019928455352783,
-0.4750290811061859,
-0.02169140800833702,
0.12363652884960175,
0.14209885895252228,
0.08310987055301666,
-0.3491266369819641,
0.393544465303421,
-0.15688279271125793,
0.11253547668457031,
-0.8096958994865417,
0.2473006397485733,
-0.12919184565544128,
-0.20173430442810059,
0.04673115909099579,
0.4648350477218628,
0.2675110995769501,
-0.11771568655967712,
-0.21095851063728333,
0.4545469880104065,
-0.15180370211601257,
-0.17924973368644714,
-0.605415403842926,
-0.022297076880931854,
0.3142143189907074,
-0.6065157055854797,
0.08222101628780365,
0.21276307106018066,
0.06554026156663895,
0.00020594894886016846,
0.09006845951080322,
0.1399945318698883,
0.16810807585716248,
0.29616081714630127,
0.01527385413646698,
0.05019184947013855,
0.020707808434963226,
0.06244085729122162,
-0.03719508275389671,
0.03684091567993164,
0.31734076142311096,
-0.20135915279388428,
0.3078652620315552,
0.0024839267134666443,
0.013944543898105621,
-0.45237496495246887,
0.27101826667785645,
-0.15823569893836975,
0.10791562497615814,
0.1816784143447876,
-0.5091333389282227,
-0.09420144557952881,
-0.09494785219430923,
0.11264970898628235,
0.47480282187461853,
0.012556210160255432,
-0.3459683358669281,
0.015682952478528023,
-0.04347474128007889,
-0.05923403427004814,
0.1162559986114502,
0.022990141063928604,
0.08372291922569275,
0.2572965919971466,
-0.015503177419304848,
0.11156711727380753,
-0.3163834810256958,
-0.3513840436935425,
0.06960979849100113,
0.2853474020957947,
-0.5560730695724487,
0.025600753724575043,
0.10112182796001434,
0.12388370931148529,
-0.271146684885025,
0.1344144642353058,
-0.33135977387428284,
0.09181001782417297,
-0.16644364595413208,
-0.07090675830841064,
0.11827223002910614,
0.2603888213634491,
-0.015279598534107208,
-0.09322190284729004,
0.1403355598449707,
0.05110928416252136,
-0.2837863862514496,
0.00029972195625305176,
-0.18637193739414215,
-0.08641587197780609,
0.008324511349201202,
0.05184938758611679,
-0.13148300349712372,
-0.027279019355773926,
-0.19809803366661072,
0.27917027473449707,
-0.15177857875823975,
0.19030910730361938,
0.07031220197677612,
0.43732398748397827,
-0.07560048997402191,
0.16602793335914612,
0.18435215950012207,
-0.3553646206855774,
0.38580042123794556,
-0.08324278146028519,
-0.13658660650253296,
0.2658621668815613,
0.06897669285535812,
-0.21784016489982605,
-0.15502889454364777,
-0.4603607654571533,
-0.47779715061187744,
-0.3952280282974243,
-0.06605656445026398,
-0.14174827933311462,
0.013023539446294308,
0.5893926620483398,
0.0720871239900589,
0.15606854856014252,
-0.2587343156337738,
0.09598670154809952,
-0.08461734652519226,
-0.005393259227275848,
0.4703007638454437,
-0.11862393468618393,
-0.31081414222717285,
-0.22867807745933533,
-0.05252555012702942,
-0.11115801334381104,
-0.08368206769227982,
-0.4437512755393982,
-0.045817166566848755,
-0.20678146183490753,
-0.3540295660495758,
-0.00692384596914053,
-0.07336892932653427,
0.1547655165195465,
0.030188988894224167,
0.08519512414932251,
0.08802534639835358,
-0.32666176557540894,
-0.03349164128303528,
0.10230565071105957,
0.32599711418151855,
0.00920194387435913,
0.30960899591445923,
-0.12060078233480453,
0.514532208442688,
0.2852513790130615,
-0.30804598331451416,
0.1585943102836609,
-0.08860373497009277,
0.0181196890771389,
-0.03097759559750557,
-0.2465682327747345,
0.01237281784415245,
0.1069074496626854,
0.09079393744468689,
0.0010282956063747406,
-0.019290437921881676,
0.1211046427488327,
-0.21845762431621552,
-0.08240153640508652,
0.15962104499340057,
-0.1415736824274063,
-0.10656966269016266,
0.1059209555387497,
0.23035970330238342,
-0.037473615258932114,
0.4143996834754944,
0.46003714203834534,
-0.0064618587493896484,
0.2905214726924896,
0.4800134599208832,
0.23437103629112244,
0.05661682412028313,
-0.5030889511108398,
0.17936669290065765,
-0.20834198594093323,
0.10003672540187836,
-0.013848714530467987,
0.6592628955841064,
-0.1274966597557068,
-0.05621493607759476,
0.062355972826480865,
-0.09539917856454849,
0.6158280968666077,
0.07904256880283356,
0.3033108711242676,
0.10466638207435608,
0.09046533703804016,
-0.2795730233192444,
-0.01665419340133667,
0.029052212834358215,
-0.2822458744049072,
-0.07655146718025208,
0.30315786600112915,
-0.07367771118879318,
-0.09732403606176376,
0.173629030585289,
0.21752743422985077,
-0.2057144045829773,
-0.025413960218429565,
-0.3672518730163574,
-0.18750041723251343,
-0.4026106595993042,
0.09445858746767044,
-0.1729569435119629,
0.17452549934387207,
0.10217098146677017,
0.05096086114645004,
0.04170230031013489,
-0.0956650823354721,
0.18876540660858154,
0.10543790459632874,
0.42972898483276367,
0.020343221724033356,
0.3289579749107361,
0.3190152049064636,
0.05976932868361473,
0.1852148175239563,
0.4724421501159668,
-0.10557128489017487,
-0.381122887134552,
-0.008652869611978531,
0.1460508406162262,
0.28388893604278564,
0.16257113218307495,
0.08690189570188522,
0.022015094757080078,
0.5249762535095215,
0.056620776653289795,
-0.1900882124900818,
-0.01875464990735054,
0.2666785418987274,
-0.06843945384025574,
-0.19796985387802124,
-0.3377669155597687,
0.6889947056770325,
-0.07912106066942215,
0.018481716513633728,
-0.03299522399902344,
0.02867813967168331,
-0.04892800375819206,
0.42892786860466003,
-0.06670668721199036,
0.8465297222137451,
0.12801241874694824,
0.04809335619211197,
0.292508065700531,
-0.01889624446630478,
0.18394702672958374,
-0.5831100344657898,
0.023514769971370697,
-0.2247413992881775,
-0.10064969211816788,
0.03163313865661621,
-0.2603111267089844,
-0.025947730988264084,
0.05966128036379814,
-0.08726150542497635,
0.2274342179298401,
0.019875138998031616,
-0.23103545606136322,
0.012518946081399918,
0.28219953179359436,
0.04079967737197876,
-0.1655595600605011,
0.05670956149697304,
0.002442196011543274,
-0.16477352380752563,
0.5717599987983704,
0.08949702978134155,
-0.10123953223228455,
0.07259216159582138,
-0.2510277330875397,
-0.11653071641921997,
0.42953795194625854,
-0.26523274183273315,
0.01611807942390442,
0.372793972492218,
-0.4153828024864197,
0.5313196182250977,
0.1662169098854065,
0.10273671895265579,
0.24748657643795013,
-0.20787103474140167,
0.22246377170085907,
0.2385983169078827,
0.16500934958457947,
-0.15036532282829285,
0.1241111308336258,
0.14620251953601837,
0.023713164031505585,
-0.2011260986328125,
0.05538652837276459,
-0.14513984322547913,
-0.05845634639263153,
0.029195979237556458,
0.01538211852312088,
0.1878442019224167,
-0.2644806206226349,
0.03315471485257149,
0.04978085309267044,
0.07010554522275925,
-0.13557326793670654,
0.11675053834915161,
0.3559403419494629,
-0.5042514801025391,
-0.15054044127464294,
0.2411980926990509,
-0.21919387578964233,
-0.015418671071529388,
0.36208802461624146,
-0.13452304899692535,
-0.18639400601387024,
0.65464186668396,
0.2729581594467163,
0.000716380774974823,
-0.18624746799468994,
-0.12670855224132538,
0.2749946117401123,
-0.7631402015686035,
0.11795595288276672,
0.17511551082134247,
-0.008846327662467957,
-0.1904214322566986,
0.408599853515625,
0.08841343224048615,
-0.24154682457447052,
-0.20024198293685913,
-0.4221113622188568,
-0.44687947630882263,
0.23943272233009338,
-0.12776026129722595,
0.20296995341777802,
-0.1667061448097229,
0.11591699719429016,
-0.022529244422912598,
0.17383846640586853,
-0.2450716644525528,
-0.0036325976252555847,
-0.14312440156936646,
0.11530323326587677,
0.3670766353607178,
-0.20225031673908234,
0.2619225084781647,
-0.12938623130321503,
0.03155681490898132,
0.229607954621315,
-0.2939411401748657,
-0.058213040232658386,
-0.17710623145103455,
0.16879545152187347,
0.016726456582546234,
-0.24855346977710724,
-0.135422483086586,
0.07637326419353485,
0.1470710188150406,
-0.1148725301027298,
0.06079468876123428,
0.0313212126493454,
-0.07040159404277802,
0.3685798943042755,
-0.09430791437625885,
-0.022474508732557297,
-0.4142129719257355,
0.1483006626367569,
-0.2709144949913025,
-0.028539098799228668,
0.16189178824424744,
-0.06540849804878235,
-0.009075634181499481,
0.028744280338287354,
-0.3944200277328491,
-0.030334431678056717,
-0.0575127899646759,
0.007855912670493126,
0.2673736810684204,
-0.38128897547721863,
-0.002588406205177307,
-0.06762928515672684,
0.027869991958141327,
0.15179578959941864,
-0.2128884196281433,
-0.004329249262809753,
0.15913456678390503,
0.10453785210847855,
-0.2384478896856308,
-0.031194966286420822,
-0.048500292003154755,
-0.014932161197066307,
0.05984652042388916,
0.2293986827135086,
0.08185882866382599,
0.0572822242975235,
-0.07614749670028687,
0.2177858054637909,
0.2604515254497528,
-0.24676792323589325,
0.197440505027771,
0.6288747191429138,
-0.019402630627155304,
0.12409251928329468,
0.0371185764670372,
-0.16018836200237274,
0.012889914214611053,
0.4978620409965515,
-0.2939940392971039,
0.1566222757101059,
-0.2650279402732849,
0.16399046778678894,
-0.13910403847694397,
-0.3206348419189453,
-0.10984019190073013,
0.07114854454994202,
-0.012643635272979736,
0.2669651210308075,
0.06503018736839294,
0.6184885501861572,
-0.10790932178497314,
0.08988609910011292,
0.06561628729104996,
0.08666795492172241,
-0.13524353504180908,
-0.023759745061397552,
-0.021891899406909943,
0.02565060555934906,
-0.4565442204475403,
0.05569462478160858,
-0.0020932587794959545,
-0.11058877408504486,
0.1262666881084442,
0.13307756185531616,
-0.29181230068206787,
0.025856241583824158,
-0.201679989695549,
0.5281713604927063,
0.06677761673927307,
-0.26957565546035767,
0.28798413276672363,
0.5224602818489075,
-0.2448056936264038,
0.19125646352767944,
0.23667798936367035,
0.5199190974235535,
0.29884377121925354,
-0.16683170199394226,
0.3531171977519989,
0.1617753803730011,
-0.12275498360395432,
0.09071768820285797,
0.2359623908996582,
0.21585772931575775,
0.05745707079768181,
0.05667419359087944,
0.027252119034528732,
-0.18102847039699554,
-0.10651610791683197,
-0.07788018137216568,
0.1526496708393097,
-0.35207289457321167,
0.9680817127227783,
-0.38225677609443665,
-0.18960201740264893,
-0.39002734422683716,
-0.15260431170463562,
-0.4545285701751709,
0.21092146635055542,
0.3689022362232208,
0.025646883994340897,
0.002511013299226761,
-0.04637742415070534,
0.00834556296467781,
-0.1366787701845169,
0.43441110849380493,
0.32892897725105286,
0.29182878136634827,
-0.3403297960758209,
0.23670567572116852,
-0.7051169872283936,
0.005213860422372818,
0.13191227614879608,
0.011282458901405334,
-0.011979013681411743,
-0.1158788800239563,
0.0036321431398391724,
0.1650361716747284,
-0.15560908615589142,
-0.12223204970359802,
0.014230743050575256,
0.18568947911262512,
-0.18004140257835388,
-0.1035049557685852,
-0.22117307782173157,
0.3196866810321808,
0.10709435492753983,
-0.37455424666404724,
0.03756717965006828,
0.01821257919073105,
-0.09612435102462769,
-0.06613046675920486,
-0.05517692118883133,
-0.16753290593624115,
-0.10706232488155365,
0.37737351655960083,
0.13638871908187866,
0.6575392484664917,
-0.10647173225879669,
-0.2366025447845459,
0.003033870831131935,
-0.10943001508712769,
-0.034953147172927856,
-0.10203030705451965,
0.34084922075271606,
0.7112773060798645,
-0.10585632175207138,
-0.2927047312259674,
-0.5408525466918945,
0.19859746098518372,
-0.10063380748033524,
-0.2316669225692749,
-0.42080366611480713,
0.26502421498298645,
-0.174640491604805,
-0.005563918501138687,
0.26633453369140625,
-0.0146778654307127,
0.08799204230308533,
-0.10520458221435547,
-0.3692778944969177,
-0.32441556453704834,
0.5938013195991516,
-0.22752749919891357,
-0.09664379060268402,
-0.22398437559604645,
0.26378703117370605,
0.005955837666988373,
-0.2528497278690338,
-0.7120816707611084,
0.1737963855266571,
0.25653520226478577,
0.07226689159870148,
-0.3041287660598755,
0.12370435893535614,
0.23579668998718262,
-0.1790582239627838,
-0.09826084971427917,
0.5251138210296631,
0.15298649668693542,
-0.11921736598014832,
0.2508082687854767,
-0.1958537995815277
] |
https://github.com/huggingface/datasets/issues/6541 | Then, this shouldn't throw an error on your machine:
```python
import numpy
numpy._no_nep50_warning
```
If it does, run `python -m pip install numpy` to ensure the correct `pip` is used for the package installation. | Dataset not loading successfully. | ### Describe the bug
When I run down the below code shows this error: AttributeError: module 'numpy' has no attribute '_no_nep50_warning'
I also added this issue in transformers library please check out: [link](https://github.com/huggingface/transformers/issues/28099)
### Steps to reproduce the bug
## Reproduction
Hi, please check this line of code, when I run Show attribute error.
```
from datasets import load_dataset
from transformers import WhisperProcessor, WhisperForConditionalGeneration
# Select an audio file and read it:
ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
audio_sample = ds[0]["audio"]
waveform = audio_sample["array"]
sampling_rate = audio_sample["sampling_rate"]
# Load the Whisper model in Hugging Face format:
processor = WhisperProcessor.from_pretrained("openai/whisper-tiny.en")
model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny.en")
# Use the model and processor to transcribe the audio:
input_features = processor(
waveform, sampling_rate=sampling_rate, return_tensors="pt"
).input_features
# Generate token ids
predicted_ids = model.generate(input_features)
# Decode token ids to text
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)
transcription[0]
```
**Attribute Error**
```
AttributeError Traceback (most recent call last)
Cell In[9], line 6
4 # Select an audio file and read it:
5 ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
----> 6 audio_sample = ds[0]["audio"]
7 waveform = audio_sample["array"]
8 sampling_rate = audio_sample["sampling_rate"]
File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2795, in Dataset.__getitem__(self, key)
2793 def __getitem__(self, key): # noqa: F811
2794 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools)."""
-> 2795 return self._getitem(key)
File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2780, in Dataset._getitem(self, key, **kwargs)
2778 formatter = get_formatter(format_type, features=self._info.features, **format_kwargs)
2779 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None)
-> 2780 formatted_output = format_table(
2781 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns
2782 )
2783 return formatted_output
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:629, in format_table(table, key, formatter, format_columns, output_all_columns)
627 python_formatter = PythonFormatter(features=formatter.features)
628 if format_columns is None:
--> 629 return formatter(pa_table, query_type=query_type)
630 elif query_type == "column":
631 if key in format_columns:
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:396, in Formatter.__call__(self, pa_table, query_type)
394 def __call__(self, pa_table: pa.Table, query_type: str) -> Union[RowFormat, ColumnFormat, BatchFormat]:
395 if query_type == "row":
--> 396 return self.format_row(pa_table)
397 elif query_type == "column":
398 return self.format_column(pa_table)
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:437, in PythonFormatter.format_row(self, pa_table)
435 return LazyRow(pa_table, self)
436 row = self.python_arrow_extractor().extract_row(pa_table)
--> 437 row = self.python_features_decoder.decode_row(row)
438 return row
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:215, in PythonFeaturesDecoder.decode_row(self, row)
214 def decode_row(self, row: dict) -> dict:
--> 215 return self.features.decode_example(row) if self.features else row
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1917, in Features.decode_example(self, example, token_per_repo_id)
1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1904 """Decode example with custom feature decoding.
1905
1906 Args:
(...)
1914 `dict[str, Any]`
1915 """
-> 1917 return {
1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1919 if self._column_requires_decoding[column_name]
1920 else value
1921 for column_name, (feature, value) in zip_dict(
1922 {key: value for key, value in self.items() if key in example}, example
1923 )
1924 }
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1918, in <dictcomp>(.0)
1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1904 """Decode example with custom feature decoding.
1905
1906 Args:
(...)
1914 `dict[str, Any]`
1915 """
1917 return {
-> 1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1919 if self._column_requires_decoding[column_name]
1920 else value
1921 for column_name, (feature, value) in zip_dict(
1922 {key: value for key, value in self.items() if key in example}, example
1923 )
1924 }
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1339, in decode_nested_example(schema, obj, token_per_repo_id)
1336 elif isinstance(schema, (Audio, Image)):
1337 # we pass the token to read and decode files from private repositories in streaming mode
1338 if obj is not None and schema.decode:
-> 1339 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1340 return obj
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/audio.py:191, in Audio.decode_example(self, value, token_per_repo_id)
189 array = array.T
190 if self.mono:
--> 191 array = librosa.to_mono(array)
192 if self.sampling_rate and self.sampling_rate != sampling_rate:
193 array = librosa.resample(array, orig_sr=sampling_rate, target_sr=self.sampling_rate)
File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:78, in attach.<locals>.__getattr__(name)
76 submod_path = f"{package_name}.{attr_to_modules[name]}"
77 submod = importlib.import_module(submod_path)
---> 78 attr = getattr(submod, name)
80 # If the attribute lives in a file (module) with the same
81 # name as the attribute, ensure that the attribute and *not*
82 # the module is accessible on the package.
83 if name == attr_to_modules[name]:
File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:77, in attach.<locals>.__getattr__(name)
75 elif name in attr_to_modules:
76 submod_path = f"{package_name}.{attr_to_modules[name]}"
---> 77 submod = importlib.import_module(submod_path)
78 attr = getattr(submod, name)
80 # If the attribute lives in a file (module) with the same
81 # name as the attribute, ensure that the attribute and *not*
82 # the module is accessible on the package.
File /usr/lib/python3.8/importlib/__init__.py:127, in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
File <frozen importlib._bootstrap>:1014, in _gcd_import(name, package, level)
File <frozen importlib._bootstrap>:991, in _find_and_load(name, import_)
File <frozen importlib._bootstrap>:975, in _find_and_load_unlocked(name, import_)
File <frozen importlib._bootstrap>:671, in _load_unlocked(spec)
File <frozen importlib._bootstrap_external>:848, in exec_module(self, module)
File <frozen importlib._bootstrap>:219, in _call_with_frames_removed(f, *args, **kwds)
File /opt/pytorch/lib/python3.8/site-packages/librosa/core/audio.py:13
11 import audioread
12 import numpy as np
---> 13 import scipy.signal
14 import soxr
15 import lazy_loader as lazy
File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/__init__.py:323
314 from ._spline import ( # noqa: F401
315 cspline2d,
316 qspline2d,
(...)
319 symiirorder2,
320 )
322 from ._bsplines import *
--> 323 from ._filter_design import *
324 from ._fir_filter_design import *
325 from ._ltisys import *
File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/_filter_design.py:16
13 from numpy.polynomial.polynomial import polyval as npp_polyval
14 from numpy.polynomial.polynomial import polyvalfromroots
---> 16 from scipy import special, optimize, fft as sp_fft
17 from scipy.special import comb
18 from scipy._lib._util import float_factorial
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/__init__.py:405
1 """
2 =====================================================
3 Optimization and root finding (:mod:`scipy.optimize`)
(...)
401
402 """
404 from ._optimize import *
--> 405 from ._minimize import *
406 from ._root import *
407 from ._root_scalar import *
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_minimize.py:26
24 from ._trustregion_krylov import _minimize_trust_krylov
25 from ._trustregion_exact import _minimize_trustregion_exact
---> 26 from ._trustregion_constr import _minimize_trustregion_constr
28 # constrained minimization
29 from ._lbfgsb_py import _minimize_lbfgsb
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/__init__.py:4
1 """This module contains the equality constrained SQP solver."""
----> 4 from .minimize_trustregion_constr import _minimize_trustregion_constr
6 __all__ = ['_minimize_trustregion_constr']
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py:5
3 from scipy.sparse.linalg import LinearOperator
4 from .._differentiable_functions import VectorFunction
----> 5 from .._constraints import (
6 NonlinearConstraint, LinearConstraint, PreparedConstraint, strict_bounds)
7 from .._hessian_update_strategy import BFGS
8 from .._optimize import OptimizeResult
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_constraints.py:8
6 from ._optimize import OptimizeWarning
7 from warnings import warn, catch_warnings, simplefilter
----> 8 from numpy.testing import suppress_warnings
9 from scipy.sparse import issparse
12 def _arr_to_scalar(x):
13 # If x is a numpy array, return x.item(). This will
14 # fail if the array has more than one element.
File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/__init__.py:11
8 from unittest import TestCase
10 from . import _private
---> 11 from ._private.utils import *
12 from ._private.utils import (_assert_valid_refcount, _gen_alignment_data)
13 from ._private import extbuild, decorators as dec
File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/_private/utils.py:480
476 pprint.pprint(desired, msg)
477 raise AssertionError(msg.getvalue())
--> 480 @np._no_nep50_warning()
481 def assert_almost_equal(actual,desired,decimal=7,err_msg='',verbose=True):
482 """
483 Raises an AssertionError if two items are not equal up to desired
484 precision.
(...)
548
549 """
550 __tracebackhide__ = True # Hide traceback for py.test
File /opt/pytorch/lib/python3.8/site-packages/numpy/__init__.py:313, in __getattr__(attr)
305 raise AttributeError(__former_attrs__[attr])
307 # Importing Tester requires importing all of UnitTest which is not a
308 # cheap import Since it is mainly used in test suits, we lazy import it
309 # here to save on the order of 10 ms of import time for most users
310 #
311 # The previous way Tester was imported also had a side effect of adding
312 # the full `numpy.testing` namespace
--> 313 if attr == 'testing':
314 import numpy.testing as testing
315 return testing
AttributeError: module 'numpy' has no attribute '_no_nep50_warning'
```
### Expected behavior
``` ' Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel.' ```
Also, make sure this script is provided for your official website so please update:
[script](https://huggingface.co/docs/transformers/model_doc/whisper)
### Environment info
**System Info**
* transformers -> 4.36.1
* datasets -> 2.15.0
* huggingface_hub -> 0.19.4
* python -> 3.8.10
* accelerate -> 0.25.0
* pytorch -> 2.0.1+cpu
* Using GPU in Script -> No
| 34 | Dataset not loading successfully.
### Describe the bug
When I run down the below code shows this error: AttributeError: module 'numpy' has no attribute '_no_nep50_warning'
I also added this issue in transformers library please check out: [link](https://github.com/huggingface/transformers/issues/28099)
### Steps to reproduce the bug
## Reproduction
Hi, please check this line of code, when I run Show attribute error.
```
from datasets import load_dataset
from transformers import WhisperProcessor, WhisperForConditionalGeneration
# Select an audio file and read it:
ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
audio_sample = ds[0]["audio"]
waveform = audio_sample["array"]
sampling_rate = audio_sample["sampling_rate"]
# Load the Whisper model in Hugging Face format:
processor = WhisperProcessor.from_pretrained("openai/whisper-tiny.en")
model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny.en")
# Use the model and processor to transcribe the audio:
input_features = processor(
waveform, sampling_rate=sampling_rate, return_tensors="pt"
).input_features
# Generate token ids
predicted_ids = model.generate(input_features)
# Decode token ids to text
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)
transcription[0]
```
**Attribute Error**
```
AttributeError Traceback (most recent call last)
Cell In[9], line 6
4 # Select an audio file and read it:
5 ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
----> 6 audio_sample = ds[0]["audio"]
7 waveform = audio_sample["array"]
8 sampling_rate = audio_sample["sampling_rate"]
File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2795, in Dataset.__getitem__(self, key)
2793 def __getitem__(self, key): # noqa: F811
2794 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools)."""
-> 2795 return self._getitem(key)
File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2780, in Dataset._getitem(self, key, **kwargs)
2778 formatter = get_formatter(format_type, features=self._info.features, **format_kwargs)
2779 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None)
-> 2780 formatted_output = format_table(
2781 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns
2782 )
2783 return formatted_output
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:629, in format_table(table, key, formatter, format_columns, output_all_columns)
627 python_formatter = PythonFormatter(features=formatter.features)
628 if format_columns is None:
--> 629 return formatter(pa_table, query_type=query_type)
630 elif query_type == "column":
631 if key in format_columns:
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:396, in Formatter.__call__(self, pa_table, query_type)
394 def __call__(self, pa_table: pa.Table, query_type: str) -> Union[RowFormat, ColumnFormat, BatchFormat]:
395 if query_type == "row":
--> 396 return self.format_row(pa_table)
397 elif query_type == "column":
398 return self.format_column(pa_table)
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:437, in PythonFormatter.format_row(self, pa_table)
435 return LazyRow(pa_table, self)
436 row = self.python_arrow_extractor().extract_row(pa_table)
--> 437 row = self.python_features_decoder.decode_row(row)
438 return row
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:215, in PythonFeaturesDecoder.decode_row(self, row)
214 def decode_row(self, row: dict) -> dict:
--> 215 return self.features.decode_example(row) if self.features else row
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1917, in Features.decode_example(self, example, token_per_repo_id)
1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1904 """Decode example with custom feature decoding.
1905
1906 Args:
(...)
1914 `dict[str, Any]`
1915 """
-> 1917 return {
1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1919 if self._column_requires_decoding[column_name]
1920 else value
1921 for column_name, (feature, value) in zip_dict(
1922 {key: value for key, value in self.items() if key in example}, example
1923 )
1924 }
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1918, in <dictcomp>(.0)
1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1904 """Decode example with custom feature decoding.
1905
1906 Args:
(...)
1914 `dict[str, Any]`
1915 """
1917 return {
-> 1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1919 if self._column_requires_decoding[column_name]
1920 else value
1921 for column_name, (feature, value) in zip_dict(
1922 {key: value for key, value in self.items() if key in example}, example
1923 )
1924 }
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1339, in decode_nested_example(schema, obj, token_per_repo_id)
1336 elif isinstance(schema, (Audio, Image)):
1337 # we pass the token to read and decode files from private repositories in streaming mode
1338 if obj is not None and schema.decode:
-> 1339 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1340 return obj
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/audio.py:191, in Audio.decode_example(self, value, token_per_repo_id)
189 array = array.T
190 if self.mono:
--> 191 array = librosa.to_mono(array)
192 if self.sampling_rate and self.sampling_rate != sampling_rate:
193 array = librosa.resample(array, orig_sr=sampling_rate, target_sr=self.sampling_rate)
File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:78, in attach.<locals>.__getattr__(name)
76 submod_path = f"{package_name}.{attr_to_modules[name]}"
77 submod = importlib.import_module(submod_path)
---> 78 attr = getattr(submod, name)
80 # If the attribute lives in a file (module) with the same
81 # name as the attribute, ensure that the attribute and *not*
82 # the module is accessible on the package.
83 if name == attr_to_modules[name]:
File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:77, in attach.<locals>.__getattr__(name)
75 elif name in attr_to_modules:
76 submod_path = f"{package_name}.{attr_to_modules[name]}"
---> 77 submod = importlib.import_module(submod_path)
78 attr = getattr(submod, name)
80 # If the attribute lives in a file (module) with the same
81 # name as the attribute, ensure that the attribute and *not*
82 # the module is accessible on the package.
File /usr/lib/python3.8/importlib/__init__.py:127, in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
File <frozen importlib._bootstrap>:1014, in _gcd_import(name, package, level)
File <frozen importlib._bootstrap>:991, in _find_and_load(name, import_)
File <frozen importlib._bootstrap>:975, in _find_and_load_unlocked(name, import_)
File <frozen importlib._bootstrap>:671, in _load_unlocked(spec)
File <frozen importlib._bootstrap_external>:848, in exec_module(self, module)
File <frozen importlib._bootstrap>:219, in _call_with_frames_removed(f, *args, **kwds)
File /opt/pytorch/lib/python3.8/site-packages/librosa/core/audio.py:13
11 import audioread
12 import numpy as np
---> 13 import scipy.signal
14 import soxr
15 import lazy_loader as lazy
File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/__init__.py:323
314 from ._spline import ( # noqa: F401
315 cspline2d,
316 qspline2d,
(...)
319 symiirorder2,
320 )
322 from ._bsplines import *
--> 323 from ._filter_design import *
324 from ._fir_filter_design import *
325 from ._ltisys import *
File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/_filter_design.py:16
13 from numpy.polynomial.polynomial import polyval as npp_polyval
14 from numpy.polynomial.polynomial import polyvalfromroots
---> 16 from scipy import special, optimize, fft as sp_fft
17 from scipy.special import comb
18 from scipy._lib._util import float_factorial
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/__init__.py:405
1 """
2 =====================================================
3 Optimization and root finding (:mod:`scipy.optimize`)
(...)
401
402 """
404 from ._optimize import *
--> 405 from ._minimize import *
406 from ._root import *
407 from ._root_scalar import *
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_minimize.py:26
24 from ._trustregion_krylov import _minimize_trust_krylov
25 from ._trustregion_exact import _minimize_trustregion_exact
---> 26 from ._trustregion_constr import _minimize_trustregion_constr
28 # constrained minimization
29 from ._lbfgsb_py import _minimize_lbfgsb
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/__init__.py:4
1 """This module contains the equality constrained SQP solver."""
----> 4 from .minimize_trustregion_constr import _minimize_trustregion_constr
6 __all__ = ['_minimize_trustregion_constr']
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py:5
3 from scipy.sparse.linalg import LinearOperator
4 from .._differentiable_functions import VectorFunction
----> 5 from .._constraints import (
6 NonlinearConstraint, LinearConstraint, PreparedConstraint, strict_bounds)
7 from .._hessian_update_strategy import BFGS
8 from .._optimize import OptimizeResult
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_constraints.py:8
6 from ._optimize import OptimizeWarning
7 from warnings import warn, catch_warnings, simplefilter
----> 8 from numpy.testing import suppress_warnings
9 from scipy.sparse import issparse
12 def _arr_to_scalar(x):
13 # If x is a numpy array, return x.item(). This will
14 # fail if the array has more than one element.
File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/__init__.py:11
8 from unittest import TestCase
10 from . import _private
---> 11 from ._private.utils import *
12 from ._private.utils import (_assert_valid_refcount, _gen_alignment_data)
13 from ._private import extbuild, decorators as dec
File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/_private/utils.py:480
476 pprint.pprint(desired, msg)
477 raise AssertionError(msg.getvalue())
--> 480 @np._no_nep50_warning()
481 def assert_almost_equal(actual,desired,decimal=7,err_msg='',verbose=True):
482 """
483 Raises an AssertionError if two items are not equal up to desired
484 precision.
(...)
548
549 """
550 __tracebackhide__ = True # Hide traceback for py.test
File /opt/pytorch/lib/python3.8/site-packages/numpy/__init__.py:313, in __getattr__(attr)
305 raise AttributeError(__former_attrs__[attr])
307 # Importing Tester requires importing all of UnitTest which is not a
308 # cheap import Since it is mainly used in test suits, we lazy import it
309 # here to save on the order of 10 ms of import time for most users
310 #
311 # The previous way Tester was imported also had a side effect of adding
312 # the full `numpy.testing` namespace
--> 313 if attr == 'testing':
314 import numpy.testing as testing
315 return testing
AttributeError: module 'numpy' has no attribute '_no_nep50_warning'
```
### Expected behavior
``` ' Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel.' ```
Also, make sure this script is provided for your official website so please update:
[script](https://huggingface.co/docs/transformers/model_doc/whisper)
### Environment info
**System Info**
* transformers -> 4.36.1
* datasets -> 2.15.0
* huggingface_hub -> 0.19.4
* python -> 3.8.10
* accelerate -> 0.25.0
* pytorch -> 2.0.1+cpu
* Using GPU in Script -> No
Then, this shouldn't throw an error on your machine:
```python
import numpy
numpy._no_nep50_warning
```
If it does, run `python -m pip install numpy` to ensure the correct `pip` is used for the package installation. | [
-0.23438847064971924,
-0.3350293040275574,
0.06285360455513,
0.4334274232387543,
0.47662264108657837,
-0.10106334835290909,
0.43459445238113403,
0.1095186322927475,
0.12539657950401306,
0.29031631350517273,
-0.3058722913265228,
0.24882371723651886,
-0.28929731249809265,
-0.003888435661792755,
0.19231298565864563,
-0.00970418006181717,
0.023877408355474472,
0.1954306811094284,
-0.008142072707414627,
-0.2456541210412979,
-0.19157202541828156,
0.2406691461801529,
-0.3996373414993286,
0.17748725414276123,
-0.4194883704185486,
-0.06738832592964172,
0.32403692603111267,
0.19395002722740173,
-0.11070574820041656,
-0.4173997938632965,
0.26217547059059143,
-0.3125990629196167,
0.31800946593284607,
0.38047879934310913,
-0.00012031303776893765,
0.24640056490898132,
0.5512852668762207,
-0.16475312411785126,
-0.27835655212402344,
-0.06924595683813095,
0.06830485165119171,
0.09302637726068497,
-0.013693444430828094,
0.11106741428375244,
-0.24708274006843567,
0.14441943168640137,
-0.223147451877594,
-0.18724775314331055,
0.4866816997528076,
0.35635513067245483,
0.1301165670156479,
0.6396480798721313,
0.2268131822347641,
0.1363770216703415,
0.0383913479745388,
0.2183842658996582,
-0.12043151259422302,
0.07736687362194061,
0.09992638230323792,
-0.06356549263000488,
0.13282811641693115,
0.3650335371494293,
-0.0467258095741272,
0.024706650525331497,
0.4404199719429016,
0.14971937239170074,
0.4273488223552704,
-0.5112829208374023,
-0.17965850234031677,
0.30830225348472595,
0.08672980964183807,
-0.043184321373701096,
-0.27332258224487305,
-0.1498146951198578,
-0.07396408915519714,
-0.40205052495002747,
0.021755918860435486,
-0.0023497939109802246,
-0.24494512379169464,
-0.009265070781111717,
-0.22350917756557465,
0.08385099470615387,
0.023974329233169556,
0.16503936052322388,
0.08004113286733627,
0.4140673279762268,
-0.059069473296403885,
0.04963722452521324,
0.014258742332458496,
-0.18153116106987,
0.04586434364318848,
0.031510476022958755,
-0.0617445632815361,
0.3646732270717621,
-0.5112243890762329,
-0.12562009692192078,
-0.013085346668958664,
-0.4228315055370331,
0.15278436243534088,
0.0072188060730695724,
-0.047394901514053345,
-0.05398900434374809,
-0.06132505461573601,
0.12581108510494232,
0.23736988008022308,
0.21051964163780212,
0.014636666513979435,
0.07325403392314911,
0.06319271773099899,
0.22507192194461823,
0.42682376503944397,
-0.0009608007967472076,
-0.18732085824012756,
0.05594851076602936,
0.06060396134853363,
0.03604084998369217,
0.27881669998168945,
-0.3956502676010132,
-0.3895747661590576,
-0.05840259790420532,
-0.20384523272514343,
-0.1641702950000763,
0.227483332157135,
0.4749464690685272,
0.016802389174699783,
0.14616085588932037,
0.14014677703380585,
0.1375402957201004,
-0.3047604560852051,
-0.2154458612203598,
-0.21104447543621063,
-0.008113371208310127,
-0.25698214769363403,
0.04984024912118912,
0.08899353444576263,
0.18582533299922943,
0.2721630930900574,
-0.13882772624492645,
0.2616540193557739,
-0.1627454161643982,
0.0642547607421875,
-0.08848525583744049,
-0.0733458548784256,
0.39676132798194885,
-0.26772406697273254,
-0.001783125102519989,
-0.049112968146800995,
-0.343792587518692,
-0.009709909558296204,
0.03477415442466736,
-0.15961623191833496,
-0.2823835611343384,
0.13646717369556427,
0.11167246103286743,
-0.06788109242916107,
0.02287977561354637,
-0.2750296890735626,
-0.08533795922994614,
0.3868095278739929,
-0.2365071326494217,
0.07500800490379333,
-0.34221094846725464,
-0.3093253970146179,
0.09200392663478851,
0.5923802256584167,
0.6410744786262512,
0.024744302034378052,
-0.47498196363449097,
0.11923126876354218,
-0.23080772161483765,
0.0884590670466423,
0.4773505926132202,
-0.05087815597653389,
-0.17750771343708038,
-0.30502405762672424,
0.032312363386154175,
0.40190839767456055,
-0.37713199853897095,
-0.43298548460006714,
0.12376904487609863,
-0.21873190999031067,
0.08808090537786484,
-0.038376521319150925,
0.03327339515089989,
-0.20531544089317322,
-0.2246682345867157,
0.2675780653953552,
0.28766801953315735,
0.2032138854265213,
0.01156480610370636,
-0.31235745549201965,
-0.27188199758529663,
0.24664165079593658,
0.3167061507701874,
-0.09085433930158615,
0.1907789409160614,
-0.04962250217795372,
0.23350301384925842,
0.29265400767326355,
0.022221092134714127,
-0.08754837512969971,
0.10630612075328827,
0.3155529797077179,
-0.1481197327375412,
0.012397423386573792,
-0.12289904057979584,
-0.32122477889060974,
0.21331050992012024,
-0.5302758812904358,
0.376913845539093,
-0.2067185491323471,
0.15795838832855225,
-0.15098129212856293,
0.05238422006368637,
-0.41019928455352783,
-0.4750290811061859,
-0.02169140800833702,
0.12363652884960175,
0.14209885895252228,
0.08310987055301666,
-0.3491266369819641,
0.393544465303421,
-0.15688279271125793,
0.11253547668457031,
-0.8096958994865417,
0.2473006397485733,
-0.12919184565544128,
-0.20173430442810059,
0.04673115909099579,
0.4648350477218628,
0.2675110995769501,
-0.11771568655967712,
-0.21095851063728333,
0.4545469880104065,
-0.15180370211601257,
-0.17924973368644714,
-0.605415403842926,
-0.022297076880931854,
0.3142143189907074,
-0.6065157055854797,
0.08222101628780365,
0.21276307106018066,
0.06554026156663895,
0.00020594894886016846,
0.09006845951080322,
0.1399945318698883,
0.16810807585716248,
0.29616081714630127,
0.01527385413646698,
0.05019184947013855,
0.020707808434963226,
0.06244085729122162,
-0.03719508275389671,
0.03684091567993164,
0.31734076142311096,
-0.20135915279388428,
0.3078652620315552,
0.0024839267134666443,
0.013944543898105621,
-0.45237496495246887,
0.27101826667785645,
-0.15823569893836975,
0.10791562497615814,
0.1816784143447876,
-0.5091333389282227,
-0.09420144557952881,
-0.09494785219430923,
0.11264970898628235,
0.47480282187461853,
0.012556210160255432,
-0.3459683358669281,
0.015682952478528023,
-0.04347474128007889,
-0.05923403427004814,
0.1162559986114502,
0.022990141063928604,
0.08372291922569275,
0.2572965919971466,
-0.015503177419304848,
0.11156711727380753,
-0.3163834810256958,
-0.3513840436935425,
0.06960979849100113,
0.2853474020957947,
-0.5560730695724487,
0.025600753724575043,
0.10112182796001434,
0.12388370931148529,
-0.271146684885025,
0.1344144642353058,
-0.33135977387428284,
0.09181001782417297,
-0.16644364595413208,
-0.07090675830841064,
0.11827223002910614,
0.2603888213634491,
-0.015279598534107208,
-0.09322190284729004,
0.1403355598449707,
0.05110928416252136,
-0.2837863862514496,
0.00029972195625305176,
-0.18637193739414215,
-0.08641587197780609,
0.008324511349201202,
0.05184938758611679,
-0.13148300349712372,
-0.027279019355773926,
-0.19809803366661072,
0.27917027473449707,
-0.15177857875823975,
0.19030910730361938,
0.07031220197677612,
0.43732398748397827,
-0.07560048997402191,
0.16602793335914612,
0.18435215950012207,
-0.3553646206855774,
0.38580042123794556,
-0.08324278146028519,
-0.13658660650253296,
0.2658621668815613,
0.06897669285535812,
-0.21784016489982605,
-0.15502889454364777,
-0.4603607654571533,
-0.47779715061187744,
-0.3952280282974243,
-0.06605656445026398,
-0.14174827933311462,
0.013023539446294308,
0.5893926620483398,
0.0720871239900589,
0.15606854856014252,
-0.2587343156337738,
0.09598670154809952,
-0.08461734652519226,
-0.005393259227275848,
0.4703007638454437,
-0.11862393468618393,
-0.31081414222717285,
-0.22867807745933533,
-0.05252555012702942,
-0.11115801334381104,
-0.08368206769227982,
-0.4437512755393982,
-0.045817166566848755,
-0.20678146183490753,
-0.3540295660495758,
-0.00692384596914053,
-0.07336892932653427,
0.1547655165195465,
0.030188988894224167,
0.08519512414932251,
0.08802534639835358,
-0.32666176557540894,
-0.03349164128303528,
0.10230565071105957,
0.32599711418151855,
0.00920194387435913,
0.30960899591445923,
-0.12060078233480453,
0.514532208442688,
0.2852513790130615,
-0.30804598331451416,
0.1585943102836609,
-0.08860373497009277,
0.0181196890771389,
-0.03097759559750557,
-0.2465682327747345,
0.01237281784415245,
0.1069074496626854,
0.09079393744468689,
0.0010282956063747406,
-0.019290437921881676,
0.1211046427488327,
-0.21845762431621552,
-0.08240153640508652,
0.15962104499340057,
-0.1415736824274063,
-0.10656966269016266,
0.1059209555387497,
0.23035970330238342,
-0.037473615258932114,
0.4143996834754944,
0.46003714203834534,
-0.0064618587493896484,
0.2905214726924896,
0.4800134599208832,
0.23437103629112244,
0.05661682412028313,
-0.5030889511108398,
0.17936669290065765,
-0.20834198594093323,
0.10003672540187836,
-0.013848714530467987,
0.6592628955841064,
-0.1274966597557068,
-0.05621493607759476,
0.062355972826480865,
-0.09539917856454849,
0.6158280968666077,
0.07904256880283356,
0.3033108711242676,
0.10466638207435608,
0.09046533703804016,
-0.2795730233192444,
-0.01665419340133667,
0.029052212834358215,
-0.2822458744049072,
-0.07655146718025208,
0.30315786600112915,
-0.07367771118879318,
-0.09732403606176376,
0.173629030585289,
0.21752743422985077,
-0.2057144045829773,
-0.025413960218429565,
-0.3672518730163574,
-0.18750041723251343,
-0.4026106595993042,
0.09445858746767044,
-0.1729569435119629,
0.17452549934387207,
0.10217098146677017,
0.05096086114645004,
0.04170230031013489,
-0.0956650823354721,
0.18876540660858154,
0.10543790459632874,
0.42972898483276367,
0.020343221724033356,
0.3289579749107361,
0.3190152049064636,
0.05976932868361473,
0.1852148175239563,
0.4724421501159668,
-0.10557128489017487,
-0.381122887134552,
-0.008652869611978531,
0.1460508406162262,
0.28388893604278564,
0.16257113218307495,
0.08690189570188522,
0.022015094757080078,
0.5249762535095215,
0.056620776653289795,
-0.1900882124900818,
-0.01875464990735054,
0.2666785418987274,
-0.06843945384025574,
-0.19796985387802124,
-0.3377669155597687,
0.6889947056770325,
-0.07912106066942215,
0.018481716513633728,
-0.03299522399902344,
0.02867813967168331,
-0.04892800375819206,
0.42892786860466003,
-0.06670668721199036,
0.8465297222137451,
0.12801241874694824,
0.04809335619211197,
0.292508065700531,
-0.01889624446630478,
0.18394702672958374,
-0.5831100344657898,
0.023514769971370697,
-0.2247413992881775,
-0.10064969211816788,
0.03163313865661621,
-0.2603111267089844,
-0.025947730988264084,
0.05966128036379814,
-0.08726150542497635,
0.2274342179298401,
0.019875138998031616,
-0.23103545606136322,
0.012518946081399918,
0.28219953179359436,
0.04079967737197876,
-0.1655595600605011,
0.05670956149697304,
0.002442196011543274,
-0.16477352380752563,
0.5717599987983704,
0.08949702978134155,
-0.10123953223228455,
0.07259216159582138,
-0.2510277330875397,
-0.11653071641921997,
0.42953795194625854,
-0.26523274183273315,
0.01611807942390442,
0.372793972492218,
-0.4153828024864197,
0.5313196182250977,
0.1662169098854065,
0.10273671895265579,
0.24748657643795013,
-0.20787103474140167,
0.22246377170085907,
0.2385983169078827,
0.16500934958457947,
-0.15036532282829285,
0.1241111308336258,
0.14620251953601837,
0.023713164031505585,
-0.2011260986328125,
0.05538652837276459,
-0.14513984322547913,
-0.05845634639263153,
0.029195979237556458,
0.01538211852312088,
0.1878442019224167,
-0.2644806206226349,
0.03315471485257149,
0.04978085309267044,
0.07010554522275925,
-0.13557326793670654,
0.11675053834915161,
0.3559403419494629,
-0.5042514801025391,
-0.15054044127464294,
0.2411980926990509,
-0.21919387578964233,
-0.015418671071529388,
0.36208802461624146,
-0.13452304899692535,
-0.18639400601387024,
0.65464186668396,
0.2729581594467163,
0.000716380774974823,
-0.18624746799468994,
-0.12670855224132538,
0.2749946117401123,
-0.7631402015686035,
0.11795595288276672,
0.17511551082134247,
-0.008846327662467957,
-0.1904214322566986,
0.408599853515625,
0.08841343224048615,
-0.24154682457447052,
-0.20024198293685913,
-0.4221113622188568,
-0.44687947630882263,
0.23943272233009338,
-0.12776026129722595,
0.20296995341777802,
-0.1667061448097229,
0.11591699719429016,
-0.022529244422912598,
0.17383846640586853,
-0.2450716644525528,
-0.0036325976252555847,
-0.14312440156936646,
0.11530323326587677,
0.3670766353607178,
-0.20225031673908234,
0.2619225084781647,
-0.12938623130321503,
0.03155681490898132,
0.229607954621315,
-0.2939411401748657,
-0.058213040232658386,
-0.17710623145103455,
0.16879545152187347,
0.016726456582546234,
-0.24855346977710724,
-0.135422483086586,
0.07637326419353485,
0.1470710188150406,
-0.1148725301027298,
0.06079468876123428,
0.0313212126493454,
-0.07040159404277802,
0.3685798943042755,
-0.09430791437625885,
-0.022474508732557297,
-0.4142129719257355,
0.1483006626367569,
-0.2709144949913025,
-0.028539098799228668,
0.16189178824424744,
-0.06540849804878235,
-0.009075634181499481,
0.028744280338287354,
-0.3944200277328491,
-0.030334431678056717,
-0.0575127899646759,
0.007855912670493126,
0.2673736810684204,
-0.38128897547721863,
-0.002588406205177307,
-0.06762928515672684,
0.027869991958141327,
0.15179578959941864,
-0.2128884196281433,
-0.004329249262809753,
0.15913456678390503,
0.10453785210847855,
-0.2384478896856308,
-0.031194966286420822,
-0.048500292003154755,
-0.014932161197066307,
0.05984652042388916,
0.2293986827135086,
0.08185882866382599,
0.0572822242975235,
-0.07614749670028687,
0.2177858054637909,
0.2604515254497528,
-0.24676792323589325,
0.197440505027771,
0.6288747191429138,
-0.019402630627155304,
0.12409251928329468,
0.0371185764670372,
-0.16018836200237274,
0.012889914214611053,
0.4978620409965515,
-0.2939940392971039,
0.1566222757101059,
-0.2650279402732849,
0.16399046778678894,
-0.13910403847694397,
-0.3206348419189453,
-0.10984019190073013,
0.07114854454994202,
-0.012643635272979736,
0.2669651210308075,
0.06503018736839294,
0.6184885501861572,
-0.10790932178497314,
0.08988609910011292,
0.06561628729104996,
0.08666795492172241,
-0.13524353504180908,
-0.023759745061397552,
-0.021891899406909943,
0.02565060555934906,
-0.4565442204475403,
0.05569462478160858,
-0.0020932587794959545,
-0.11058877408504486,
0.1262666881084442,
0.13307756185531616,
-0.29181230068206787,
0.025856241583824158,
-0.201679989695549,
0.5281713604927063,
0.06677761673927307,
-0.26957565546035767,
0.28798413276672363,
0.5224602818489075,
-0.2448056936264038,
0.19125646352767944,
0.23667798936367035,
0.5199190974235535,
0.29884377121925354,
-0.16683170199394226,
0.3531171977519989,
0.1617753803730011,
-0.12275498360395432,
0.09071768820285797,
0.2359623908996582,
0.21585772931575775,
0.05745707079768181,
0.05667419359087944,
0.027252119034528732,
-0.18102847039699554,
-0.10651610791683197,
-0.07788018137216568,
0.1526496708393097,
-0.35207289457321167,
0.9680817127227783,
-0.38225677609443665,
-0.18960201740264893,
-0.39002734422683716,
-0.15260431170463562,
-0.4545285701751709,
0.21092146635055542,
0.3689022362232208,
0.025646883994340897,
0.002511013299226761,
-0.04637742415070534,
0.00834556296467781,
-0.1366787701845169,
0.43441110849380493,
0.32892897725105286,
0.29182878136634827,
-0.3403297960758209,
0.23670567572116852,
-0.7051169872283936,
0.005213860422372818,
0.13191227614879608,
0.011282458901405334,
-0.011979013681411743,
-0.1158788800239563,
0.0036321431398391724,
0.1650361716747284,
-0.15560908615589142,
-0.12223204970359802,
0.014230743050575256,
0.18568947911262512,
-0.18004140257835388,
-0.1035049557685852,
-0.22117307782173157,
0.3196866810321808,
0.10709435492753983,
-0.37455424666404724,
0.03756717965006828,
0.01821257919073105,
-0.09612435102462769,
-0.06613046675920486,
-0.05517692118883133,
-0.16753290593624115,
-0.10706232488155365,
0.37737351655960083,
0.13638871908187866,
0.6575392484664917,
-0.10647173225879669,
-0.2366025447845459,
0.003033870831131935,
-0.10943001508712769,
-0.034953147172927856,
-0.10203030705451965,
0.34084922075271606,
0.7112773060798645,
-0.10585632175207138,
-0.2927047312259674,
-0.5408525466918945,
0.19859746098518372,
-0.10063380748033524,
-0.2316669225692749,
-0.42080366611480713,
0.26502421498298645,
-0.174640491604805,
-0.005563918501138687,
0.26633453369140625,
-0.0146778654307127,
0.08799204230308533,
-0.10520458221435547,
-0.3692778944969177,
-0.32441556453704834,
0.5938013195991516,
-0.22752749919891357,
-0.09664379060268402,
-0.22398437559604645,
0.26378703117370605,
0.005955837666988373,
-0.2528497278690338,
-0.7120816707611084,
0.1737963855266571,
0.25653520226478577,
0.07226689159870148,
-0.3041287660598755,
0.12370435893535614,
0.23579668998718262,
-0.1790582239627838,
-0.09826084971427917,
0.5251138210296631,
0.15298649668693542,
-0.11921736598014832,
0.2508082687854767,
-0.1958537995815277
] |
https://github.com/huggingface/datasets/issues/6541 | Your suggestion to run `python -m pip install numpy` proved to be successful, and my issue has been resolved. I am grateful for your assistance, @mariosasko | Dataset not loading successfully. | ### Describe the bug
When I run down the below code shows this error: AttributeError: module 'numpy' has no attribute '_no_nep50_warning'
I also added this issue in transformers library please check out: [link](https://github.com/huggingface/transformers/issues/28099)
### Steps to reproduce the bug
## Reproduction
Hi, please check this line of code, when I run Show attribute error.
```
from datasets import load_dataset
from transformers import WhisperProcessor, WhisperForConditionalGeneration
# Select an audio file and read it:
ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
audio_sample = ds[0]["audio"]
waveform = audio_sample["array"]
sampling_rate = audio_sample["sampling_rate"]
# Load the Whisper model in Hugging Face format:
processor = WhisperProcessor.from_pretrained("openai/whisper-tiny.en")
model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny.en")
# Use the model and processor to transcribe the audio:
input_features = processor(
waveform, sampling_rate=sampling_rate, return_tensors="pt"
).input_features
# Generate token ids
predicted_ids = model.generate(input_features)
# Decode token ids to text
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)
transcription[0]
```
**Attribute Error**
```
AttributeError Traceback (most recent call last)
Cell In[9], line 6
4 # Select an audio file and read it:
5 ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
----> 6 audio_sample = ds[0]["audio"]
7 waveform = audio_sample["array"]
8 sampling_rate = audio_sample["sampling_rate"]
File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2795, in Dataset.__getitem__(self, key)
2793 def __getitem__(self, key): # noqa: F811
2794 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools)."""
-> 2795 return self._getitem(key)
File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2780, in Dataset._getitem(self, key, **kwargs)
2778 formatter = get_formatter(format_type, features=self._info.features, **format_kwargs)
2779 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None)
-> 2780 formatted_output = format_table(
2781 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns
2782 )
2783 return formatted_output
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:629, in format_table(table, key, formatter, format_columns, output_all_columns)
627 python_formatter = PythonFormatter(features=formatter.features)
628 if format_columns is None:
--> 629 return formatter(pa_table, query_type=query_type)
630 elif query_type == "column":
631 if key in format_columns:
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:396, in Formatter.__call__(self, pa_table, query_type)
394 def __call__(self, pa_table: pa.Table, query_type: str) -> Union[RowFormat, ColumnFormat, BatchFormat]:
395 if query_type == "row":
--> 396 return self.format_row(pa_table)
397 elif query_type == "column":
398 return self.format_column(pa_table)
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:437, in PythonFormatter.format_row(self, pa_table)
435 return LazyRow(pa_table, self)
436 row = self.python_arrow_extractor().extract_row(pa_table)
--> 437 row = self.python_features_decoder.decode_row(row)
438 return row
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:215, in PythonFeaturesDecoder.decode_row(self, row)
214 def decode_row(self, row: dict) -> dict:
--> 215 return self.features.decode_example(row) if self.features else row
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1917, in Features.decode_example(self, example, token_per_repo_id)
1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1904 """Decode example with custom feature decoding.
1905
1906 Args:
(...)
1914 `dict[str, Any]`
1915 """
-> 1917 return {
1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1919 if self._column_requires_decoding[column_name]
1920 else value
1921 for column_name, (feature, value) in zip_dict(
1922 {key: value for key, value in self.items() if key in example}, example
1923 )
1924 }
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1918, in <dictcomp>(.0)
1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1904 """Decode example with custom feature decoding.
1905
1906 Args:
(...)
1914 `dict[str, Any]`
1915 """
1917 return {
-> 1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1919 if self._column_requires_decoding[column_name]
1920 else value
1921 for column_name, (feature, value) in zip_dict(
1922 {key: value for key, value in self.items() if key in example}, example
1923 )
1924 }
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1339, in decode_nested_example(schema, obj, token_per_repo_id)
1336 elif isinstance(schema, (Audio, Image)):
1337 # we pass the token to read and decode files from private repositories in streaming mode
1338 if obj is not None and schema.decode:
-> 1339 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1340 return obj
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/audio.py:191, in Audio.decode_example(self, value, token_per_repo_id)
189 array = array.T
190 if self.mono:
--> 191 array = librosa.to_mono(array)
192 if self.sampling_rate and self.sampling_rate != sampling_rate:
193 array = librosa.resample(array, orig_sr=sampling_rate, target_sr=self.sampling_rate)
File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:78, in attach.<locals>.__getattr__(name)
76 submod_path = f"{package_name}.{attr_to_modules[name]}"
77 submod = importlib.import_module(submod_path)
---> 78 attr = getattr(submod, name)
80 # If the attribute lives in a file (module) with the same
81 # name as the attribute, ensure that the attribute and *not*
82 # the module is accessible on the package.
83 if name == attr_to_modules[name]:
File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:77, in attach.<locals>.__getattr__(name)
75 elif name in attr_to_modules:
76 submod_path = f"{package_name}.{attr_to_modules[name]}"
---> 77 submod = importlib.import_module(submod_path)
78 attr = getattr(submod, name)
80 # If the attribute lives in a file (module) with the same
81 # name as the attribute, ensure that the attribute and *not*
82 # the module is accessible on the package.
File /usr/lib/python3.8/importlib/__init__.py:127, in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
File <frozen importlib._bootstrap>:1014, in _gcd_import(name, package, level)
File <frozen importlib._bootstrap>:991, in _find_and_load(name, import_)
File <frozen importlib._bootstrap>:975, in _find_and_load_unlocked(name, import_)
File <frozen importlib._bootstrap>:671, in _load_unlocked(spec)
File <frozen importlib._bootstrap_external>:848, in exec_module(self, module)
File <frozen importlib._bootstrap>:219, in _call_with_frames_removed(f, *args, **kwds)
File /opt/pytorch/lib/python3.8/site-packages/librosa/core/audio.py:13
11 import audioread
12 import numpy as np
---> 13 import scipy.signal
14 import soxr
15 import lazy_loader as lazy
File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/__init__.py:323
314 from ._spline import ( # noqa: F401
315 cspline2d,
316 qspline2d,
(...)
319 symiirorder2,
320 )
322 from ._bsplines import *
--> 323 from ._filter_design import *
324 from ._fir_filter_design import *
325 from ._ltisys import *
File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/_filter_design.py:16
13 from numpy.polynomial.polynomial import polyval as npp_polyval
14 from numpy.polynomial.polynomial import polyvalfromroots
---> 16 from scipy import special, optimize, fft as sp_fft
17 from scipy.special import comb
18 from scipy._lib._util import float_factorial
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/__init__.py:405
1 """
2 =====================================================
3 Optimization and root finding (:mod:`scipy.optimize`)
(...)
401
402 """
404 from ._optimize import *
--> 405 from ._minimize import *
406 from ._root import *
407 from ._root_scalar import *
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_minimize.py:26
24 from ._trustregion_krylov import _minimize_trust_krylov
25 from ._trustregion_exact import _minimize_trustregion_exact
---> 26 from ._trustregion_constr import _minimize_trustregion_constr
28 # constrained minimization
29 from ._lbfgsb_py import _minimize_lbfgsb
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/__init__.py:4
1 """This module contains the equality constrained SQP solver."""
----> 4 from .minimize_trustregion_constr import _minimize_trustregion_constr
6 __all__ = ['_minimize_trustregion_constr']
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py:5
3 from scipy.sparse.linalg import LinearOperator
4 from .._differentiable_functions import VectorFunction
----> 5 from .._constraints import (
6 NonlinearConstraint, LinearConstraint, PreparedConstraint, strict_bounds)
7 from .._hessian_update_strategy import BFGS
8 from .._optimize import OptimizeResult
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_constraints.py:8
6 from ._optimize import OptimizeWarning
7 from warnings import warn, catch_warnings, simplefilter
----> 8 from numpy.testing import suppress_warnings
9 from scipy.sparse import issparse
12 def _arr_to_scalar(x):
13 # If x is a numpy array, return x.item(). This will
14 # fail if the array has more than one element.
File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/__init__.py:11
8 from unittest import TestCase
10 from . import _private
---> 11 from ._private.utils import *
12 from ._private.utils import (_assert_valid_refcount, _gen_alignment_data)
13 from ._private import extbuild, decorators as dec
File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/_private/utils.py:480
476 pprint.pprint(desired, msg)
477 raise AssertionError(msg.getvalue())
--> 480 @np._no_nep50_warning()
481 def assert_almost_equal(actual,desired,decimal=7,err_msg='',verbose=True):
482 """
483 Raises an AssertionError if two items are not equal up to desired
484 precision.
(...)
548
549 """
550 __tracebackhide__ = True # Hide traceback for py.test
File /opt/pytorch/lib/python3.8/site-packages/numpy/__init__.py:313, in __getattr__(attr)
305 raise AttributeError(__former_attrs__[attr])
307 # Importing Tester requires importing all of UnitTest which is not a
308 # cheap import Since it is mainly used in test suits, we lazy import it
309 # here to save on the order of 10 ms of import time for most users
310 #
311 # The previous way Tester was imported also had a side effect of adding
312 # the full `numpy.testing` namespace
--> 313 if attr == 'testing':
314 import numpy.testing as testing
315 return testing
AttributeError: module 'numpy' has no attribute '_no_nep50_warning'
```
### Expected behavior
``` ' Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel.' ```
Also, make sure this script is provided for your official website so please update:
[script](https://huggingface.co/docs/transformers/model_doc/whisper)
### Environment info
**System Info**
* transformers -> 4.36.1
* datasets -> 2.15.0
* huggingface_hub -> 0.19.4
* python -> 3.8.10
* accelerate -> 0.25.0
* pytorch -> 2.0.1+cpu
* Using GPU in Script -> No
| 26 | Dataset not loading successfully.
### Describe the bug
When I run down the below code shows this error: AttributeError: module 'numpy' has no attribute '_no_nep50_warning'
I also added this issue in transformers library please check out: [link](https://github.com/huggingface/transformers/issues/28099)
### Steps to reproduce the bug
## Reproduction
Hi, please check this line of code, when I run Show attribute error.
```
from datasets import load_dataset
from transformers import WhisperProcessor, WhisperForConditionalGeneration
# Select an audio file and read it:
ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
audio_sample = ds[0]["audio"]
waveform = audio_sample["array"]
sampling_rate = audio_sample["sampling_rate"]
# Load the Whisper model in Hugging Face format:
processor = WhisperProcessor.from_pretrained("openai/whisper-tiny.en")
model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny.en")
# Use the model and processor to transcribe the audio:
input_features = processor(
waveform, sampling_rate=sampling_rate, return_tensors="pt"
).input_features
# Generate token ids
predicted_ids = model.generate(input_features)
# Decode token ids to text
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)
transcription[0]
```
**Attribute Error**
```
AttributeError Traceback (most recent call last)
Cell In[9], line 6
4 # Select an audio file and read it:
5 ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
----> 6 audio_sample = ds[0]["audio"]
7 waveform = audio_sample["array"]
8 sampling_rate = audio_sample["sampling_rate"]
File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2795, in Dataset.__getitem__(self, key)
2793 def __getitem__(self, key): # noqa: F811
2794 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools)."""
-> 2795 return self._getitem(key)
File /opt/pytorch/lib/python3.8/site-packages/datasets/arrow_dataset.py:2780, in Dataset._getitem(self, key, **kwargs)
2778 formatter = get_formatter(format_type, features=self._info.features, **format_kwargs)
2779 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None)
-> 2780 formatted_output = format_table(
2781 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns
2782 )
2783 return formatted_output
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:629, in format_table(table, key, formatter, format_columns, output_all_columns)
627 python_formatter = PythonFormatter(features=formatter.features)
628 if format_columns is None:
--> 629 return formatter(pa_table, query_type=query_type)
630 elif query_type == "column":
631 if key in format_columns:
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:396, in Formatter.__call__(self, pa_table, query_type)
394 def __call__(self, pa_table: pa.Table, query_type: str) -> Union[RowFormat, ColumnFormat, BatchFormat]:
395 if query_type == "row":
--> 396 return self.format_row(pa_table)
397 elif query_type == "column":
398 return self.format_column(pa_table)
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:437, in PythonFormatter.format_row(self, pa_table)
435 return LazyRow(pa_table, self)
436 row = self.python_arrow_extractor().extract_row(pa_table)
--> 437 row = self.python_features_decoder.decode_row(row)
438 return row
File /opt/pytorch/lib/python3.8/site-packages/datasets/formatting/formatting.py:215, in PythonFeaturesDecoder.decode_row(self, row)
214 def decode_row(self, row: dict) -> dict:
--> 215 return self.features.decode_example(row) if self.features else row
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1917, in Features.decode_example(self, example, token_per_repo_id)
1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1904 """Decode example with custom feature decoding.
1905
1906 Args:
(...)
1914 `dict[str, Any]`
1915 """
-> 1917 return {
1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1919 if self._column_requires_decoding[column_name]
1920 else value
1921 for column_name, (feature, value) in zip_dict(
1922 {key: value for key, value in self.items() if key in example}, example
1923 )
1924 }
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1918, in <dictcomp>(.0)
1903 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1904 """Decode example with custom feature decoding.
1905
1906 Args:
(...)
1914 `dict[str, Any]`
1915 """
1917 return {
-> 1918 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1919 if self._column_requires_decoding[column_name]
1920 else value
1921 for column_name, (feature, value) in zip_dict(
1922 {key: value for key, value in self.items() if key in example}, example
1923 )
1924 }
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/features.py:1339, in decode_nested_example(schema, obj, token_per_repo_id)
1336 elif isinstance(schema, (Audio, Image)):
1337 # we pass the token to read and decode files from private repositories in streaming mode
1338 if obj is not None and schema.decode:
-> 1339 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
1340 return obj
File /opt/pytorch/lib/python3.8/site-packages/datasets/features/audio.py:191, in Audio.decode_example(self, value, token_per_repo_id)
189 array = array.T
190 if self.mono:
--> 191 array = librosa.to_mono(array)
192 if self.sampling_rate and self.sampling_rate != sampling_rate:
193 array = librosa.resample(array, orig_sr=sampling_rate, target_sr=self.sampling_rate)
File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:78, in attach.<locals>.__getattr__(name)
76 submod_path = f"{package_name}.{attr_to_modules[name]}"
77 submod = importlib.import_module(submod_path)
---> 78 attr = getattr(submod, name)
80 # If the attribute lives in a file (module) with the same
81 # name as the attribute, ensure that the attribute and *not*
82 # the module is accessible on the package.
83 if name == attr_to_modules[name]:
File /opt/pytorch/lib/python3.8/site-packages/lazy_loader/__init__.py:77, in attach.<locals>.__getattr__(name)
75 elif name in attr_to_modules:
76 submod_path = f"{package_name}.{attr_to_modules[name]}"
---> 77 submod = importlib.import_module(submod_path)
78 attr = getattr(submod, name)
80 # If the attribute lives in a file (module) with the same
81 # name as the attribute, ensure that the attribute and *not*
82 # the module is accessible on the package.
File /usr/lib/python3.8/importlib/__init__.py:127, in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
File <frozen importlib._bootstrap>:1014, in _gcd_import(name, package, level)
File <frozen importlib._bootstrap>:991, in _find_and_load(name, import_)
File <frozen importlib._bootstrap>:975, in _find_and_load_unlocked(name, import_)
File <frozen importlib._bootstrap>:671, in _load_unlocked(spec)
File <frozen importlib._bootstrap_external>:848, in exec_module(self, module)
File <frozen importlib._bootstrap>:219, in _call_with_frames_removed(f, *args, **kwds)
File /opt/pytorch/lib/python3.8/site-packages/librosa/core/audio.py:13
11 import audioread
12 import numpy as np
---> 13 import scipy.signal
14 import soxr
15 import lazy_loader as lazy
File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/__init__.py:323
314 from ._spline import ( # noqa: F401
315 cspline2d,
316 qspline2d,
(...)
319 symiirorder2,
320 )
322 from ._bsplines import *
--> 323 from ._filter_design import *
324 from ._fir_filter_design import *
325 from ._ltisys import *
File /opt/pytorch/lib/python3.8/site-packages/scipy/signal/_filter_design.py:16
13 from numpy.polynomial.polynomial import polyval as npp_polyval
14 from numpy.polynomial.polynomial import polyvalfromroots
---> 16 from scipy import special, optimize, fft as sp_fft
17 from scipy.special import comb
18 from scipy._lib._util import float_factorial
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/__init__.py:405
1 """
2 =====================================================
3 Optimization and root finding (:mod:`scipy.optimize`)
(...)
401
402 """
404 from ._optimize import *
--> 405 from ._minimize import *
406 from ._root import *
407 from ._root_scalar import *
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_minimize.py:26
24 from ._trustregion_krylov import _minimize_trust_krylov
25 from ._trustregion_exact import _minimize_trustregion_exact
---> 26 from ._trustregion_constr import _minimize_trustregion_constr
28 # constrained minimization
29 from ._lbfgsb_py import _minimize_lbfgsb
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/__init__.py:4
1 """This module contains the equality constrained SQP solver."""
----> 4 from .minimize_trustregion_constr import _minimize_trustregion_constr
6 __all__ = ['_minimize_trustregion_constr']
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py:5
3 from scipy.sparse.linalg import LinearOperator
4 from .._differentiable_functions import VectorFunction
----> 5 from .._constraints import (
6 NonlinearConstraint, LinearConstraint, PreparedConstraint, strict_bounds)
7 from .._hessian_update_strategy import BFGS
8 from .._optimize import OptimizeResult
File /opt/pytorch/lib/python3.8/site-packages/scipy/optimize/_constraints.py:8
6 from ._optimize import OptimizeWarning
7 from warnings import warn, catch_warnings, simplefilter
----> 8 from numpy.testing import suppress_warnings
9 from scipy.sparse import issparse
12 def _arr_to_scalar(x):
13 # If x is a numpy array, return x.item(). This will
14 # fail if the array has more than one element.
File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/__init__.py:11
8 from unittest import TestCase
10 from . import _private
---> 11 from ._private.utils import *
12 from ._private.utils import (_assert_valid_refcount, _gen_alignment_data)
13 from ._private import extbuild, decorators as dec
File /opt/pytorch/lib/python3.8/site-packages/numpy/testing/_private/utils.py:480
476 pprint.pprint(desired, msg)
477 raise AssertionError(msg.getvalue())
--> 480 @np._no_nep50_warning()
481 def assert_almost_equal(actual,desired,decimal=7,err_msg='',verbose=True):
482 """
483 Raises an AssertionError if two items are not equal up to desired
484 precision.
(...)
548
549 """
550 __tracebackhide__ = True # Hide traceback for py.test
File /opt/pytorch/lib/python3.8/site-packages/numpy/__init__.py:313, in __getattr__(attr)
305 raise AttributeError(__former_attrs__[attr])
307 # Importing Tester requires importing all of UnitTest which is not a
308 # cheap import Since it is mainly used in test suits, we lazy import it
309 # here to save on the order of 10 ms of import time for most users
310 #
311 # The previous way Tester was imported also had a side effect of adding
312 # the full `numpy.testing` namespace
--> 313 if attr == 'testing':
314 import numpy.testing as testing
315 return testing
AttributeError: module 'numpy' has no attribute '_no_nep50_warning'
```
### Expected behavior
``` ' Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel.' ```
Also, make sure this script is provided for your official website so please update:
[script](https://huggingface.co/docs/transformers/model_doc/whisper)
### Environment info
**System Info**
* transformers -> 4.36.1
* datasets -> 2.15.0
* huggingface_hub -> 0.19.4
* python -> 3.8.10
* accelerate -> 0.25.0
* pytorch -> 2.0.1+cpu
* Using GPU in Script -> No
Your suggestion to run `python -m pip install numpy` proved to be successful, and my issue has been resolved. I am grateful for your assistance, @mariosasko | [
-0.23438847064971924,
-0.3350293040275574,
0.06285360455513,
0.4334274232387543,
0.47662264108657837,
-0.10106334835290909,
0.43459445238113403,
0.1095186322927475,
0.12539657950401306,
0.29031631350517273,
-0.3058722913265228,
0.24882371723651886,
-0.28929731249809265,
-0.003888435661792755,
0.19231298565864563,
-0.00970418006181717,
0.023877408355474472,
0.1954306811094284,
-0.008142072707414627,
-0.2456541210412979,
-0.19157202541828156,
0.2406691461801529,
-0.3996373414993286,
0.17748725414276123,
-0.4194883704185486,
-0.06738832592964172,
0.32403692603111267,
0.19395002722740173,
-0.11070574820041656,
-0.4173997938632965,
0.26217547059059143,
-0.3125990629196167,
0.31800946593284607,
0.38047879934310913,
-0.00012031303776893765,
0.24640056490898132,
0.5512852668762207,
-0.16475312411785126,
-0.27835655212402344,
-0.06924595683813095,
0.06830485165119171,
0.09302637726068497,
-0.013693444430828094,
0.11106741428375244,
-0.24708274006843567,
0.14441943168640137,
-0.223147451877594,
-0.18724775314331055,
0.4866816997528076,
0.35635513067245483,
0.1301165670156479,
0.6396480798721313,
0.2268131822347641,
0.1363770216703415,
0.0383913479745388,
0.2183842658996582,
-0.12043151259422302,
0.07736687362194061,
0.09992638230323792,
-0.06356549263000488,
0.13282811641693115,
0.3650335371494293,
-0.0467258095741272,
0.024706650525331497,
0.4404199719429016,
0.14971937239170074,
0.4273488223552704,
-0.5112829208374023,
-0.17965850234031677,
0.30830225348472595,
0.08672980964183807,
-0.043184321373701096,
-0.27332258224487305,
-0.1498146951198578,
-0.07396408915519714,
-0.40205052495002747,
0.021755918860435486,
-0.0023497939109802246,
-0.24494512379169464,
-0.009265070781111717,
-0.22350917756557465,
0.08385099470615387,
0.023974329233169556,
0.16503936052322388,
0.08004113286733627,
0.4140673279762268,
-0.059069473296403885,
0.04963722452521324,
0.014258742332458496,
-0.18153116106987,
0.04586434364318848,
0.031510476022958755,
-0.0617445632815361,
0.3646732270717621,
-0.5112243890762329,
-0.12562009692192078,
-0.013085346668958664,
-0.4228315055370331,
0.15278436243534088,
0.0072188060730695724,
-0.047394901514053345,
-0.05398900434374809,
-0.06132505461573601,
0.12581108510494232,
0.23736988008022308,
0.21051964163780212,
0.014636666513979435,
0.07325403392314911,
0.06319271773099899,
0.22507192194461823,
0.42682376503944397,
-0.0009608007967472076,
-0.18732085824012756,
0.05594851076602936,
0.06060396134853363,
0.03604084998369217,
0.27881669998168945,
-0.3956502676010132,
-0.3895747661590576,
-0.05840259790420532,
-0.20384523272514343,
-0.1641702950000763,
0.227483332157135,
0.4749464690685272,
0.016802389174699783,
0.14616085588932037,
0.14014677703380585,
0.1375402957201004,
-0.3047604560852051,
-0.2154458612203598,
-0.21104447543621063,
-0.008113371208310127,
-0.25698214769363403,
0.04984024912118912,
0.08899353444576263,
0.18582533299922943,
0.2721630930900574,
-0.13882772624492645,
0.2616540193557739,
-0.1627454161643982,
0.0642547607421875,
-0.08848525583744049,
-0.0733458548784256,
0.39676132798194885,
-0.26772406697273254,
-0.001783125102519989,
-0.049112968146800995,
-0.343792587518692,
-0.009709909558296204,
0.03477415442466736,
-0.15961623191833496,
-0.2823835611343384,
0.13646717369556427,
0.11167246103286743,
-0.06788109242916107,
0.02287977561354637,
-0.2750296890735626,
-0.08533795922994614,
0.3868095278739929,
-0.2365071326494217,
0.07500800490379333,
-0.34221094846725464,
-0.3093253970146179,
0.09200392663478851,
0.5923802256584167,
0.6410744786262512,
0.024744302034378052,
-0.47498196363449097,
0.11923126876354218,
-0.23080772161483765,
0.0884590670466423,
0.4773505926132202,
-0.05087815597653389,
-0.17750771343708038,
-0.30502405762672424,
0.032312363386154175,
0.40190839767456055,
-0.37713199853897095,
-0.43298548460006714,
0.12376904487609863,
-0.21873190999031067,
0.08808090537786484,
-0.038376521319150925,
0.03327339515089989,
-0.20531544089317322,
-0.2246682345867157,
0.2675780653953552,
0.28766801953315735,
0.2032138854265213,
0.01156480610370636,
-0.31235745549201965,
-0.27188199758529663,
0.24664165079593658,
0.3167061507701874,
-0.09085433930158615,
0.1907789409160614,
-0.04962250217795372,
0.23350301384925842,
0.29265400767326355,
0.022221092134714127,
-0.08754837512969971,
0.10630612075328827,
0.3155529797077179,
-0.1481197327375412,
0.012397423386573792,
-0.12289904057979584,
-0.32122477889060974,
0.21331050992012024,
-0.5302758812904358,
0.376913845539093,
-0.2067185491323471,
0.15795838832855225,
-0.15098129212856293,
0.05238422006368637,
-0.41019928455352783,
-0.4750290811061859,
-0.02169140800833702,
0.12363652884960175,
0.14209885895252228,
0.08310987055301666,
-0.3491266369819641,
0.393544465303421,
-0.15688279271125793,
0.11253547668457031,
-0.8096958994865417,
0.2473006397485733,
-0.12919184565544128,
-0.20173430442810059,
0.04673115909099579,
0.4648350477218628,
0.2675110995769501,
-0.11771568655967712,
-0.21095851063728333,
0.4545469880104065,
-0.15180370211601257,
-0.17924973368644714,
-0.605415403842926,
-0.022297076880931854,
0.3142143189907074,
-0.6065157055854797,
0.08222101628780365,
0.21276307106018066,
0.06554026156663895,
0.00020594894886016846,
0.09006845951080322,
0.1399945318698883,
0.16810807585716248,
0.29616081714630127,
0.01527385413646698,
0.05019184947013855,
0.020707808434963226,
0.06244085729122162,
-0.03719508275389671,
0.03684091567993164,
0.31734076142311096,
-0.20135915279388428,
0.3078652620315552,
0.0024839267134666443,
0.013944543898105621,
-0.45237496495246887,
0.27101826667785645,
-0.15823569893836975,
0.10791562497615814,
0.1816784143447876,
-0.5091333389282227,
-0.09420144557952881,
-0.09494785219430923,
0.11264970898628235,
0.47480282187461853,
0.012556210160255432,
-0.3459683358669281,
0.015682952478528023,
-0.04347474128007889,
-0.05923403427004814,
0.1162559986114502,
0.022990141063928604,
0.08372291922569275,
0.2572965919971466,
-0.015503177419304848,
0.11156711727380753,
-0.3163834810256958,
-0.3513840436935425,
0.06960979849100113,
0.2853474020957947,
-0.5560730695724487,
0.025600753724575043,
0.10112182796001434,
0.12388370931148529,
-0.271146684885025,
0.1344144642353058,
-0.33135977387428284,
0.09181001782417297,
-0.16644364595413208,
-0.07090675830841064,
0.11827223002910614,
0.2603888213634491,
-0.015279598534107208,
-0.09322190284729004,
0.1403355598449707,
0.05110928416252136,
-0.2837863862514496,
0.00029972195625305176,
-0.18637193739414215,
-0.08641587197780609,
0.008324511349201202,
0.05184938758611679,
-0.13148300349712372,
-0.027279019355773926,
-0.19809803366661072,
0.27917027473449707,
-0.15177857875823975,
0.19030910730361938,
0.07031220197677612,
0.43732398748397827,
-0.07560048997402191,
0.16602793335914612,
0.18435215950012207,
-0.3553646206855774,
0.38580042123794556,
-0.08324278146028519,
-0.13658660650253296,
0.2658621668815613,
0.06897669285535812,
-0.21784016489982605,
-0.15502889454364777,
-0.4603607654571533,
-0.47779715061187744,
-0.3952280282974243,
-0.06605656445026398,
-0.14174827933311462,
0.013023539446294308,
0.5893926620483398,
0.0720871239900589,
0.15606854856014252,
-0.2587343156337738,
0.09598670154809952,
-0.08461734652519226,
-0.005393259227275848,
0.4703007638454437,
-0.11862393468618393,
-0.31081414222717285,
-0.22867807745933533,
-0.05252555012702942,
-0.11115801334381104,
-0.08368206769227982,
-0.4437512755393982,
-0.045817166566848755,
-0.20678146183490753,
-0.3540295660495758,
-0.00692384596914053,
-0.07336892932653427,
0.1547655165195465,
0.030188988894224167,
0.08519512414932251,
0.08802534639835358,
-0.32666176557540894,
-0.03349164128303528,
0.10230565071105957,
0.32599711418151855,
0.00920194387435913,
0.30960899591445923,
-0.12060078233480453,
0.514532208442688,
0.2852513790130615,
-0.30804598331451416,
0.1585943102836609,
-0.08860373497009277,
0.0181196890771389,
-0.03097759559750557,
-0.2465682327747345,
0.01237281784415245,
0.1069074496626854,
0.09079393744468689,
0.0010282956063747406,
-0.019290437921881676,
0.1211046427488327,
-0.21845762431621552,
-0.08240153640508652,
0.15962104499340057,
-0.1415736824274063,
-0.10656966269016266,
0.1059209555387497,
0.23035970330238342,
-0.037473615258932114,
0.4143996834754944,
0.46003714203834534,
-0.0064618587493896484,
0.2905214726924896,
0.4800134599208832,
0.23437103629112244,
0.05661682412028313,
-0.5030889511108398,
0.17936669290065765,
-0.20834198594093323,
0.10003672540187836,
-0.013848714530467987,
0.6592628955841064,
-0.1274966597557068,
-0.05621493607759476,
0.062355972826480865,
-0.09539917856454849,
0.6158280968666077,
0.07904256880283356,
0.3033108711242676,
0.10466638207435608,
0.09046533703804016,
-0.2795730233192444,
-0.01665419340133667,
0.029052212834358215,
-0.2822458744049072,
-0.07655146718025208,
0.30315786600112915,
-0.07367771118879318,
-0.09732403606176376,
0.173629030585289,
0.21752743422985077,
-0.2057144045829773,
-0.025413960218429565,
-0.3672518730163574,
-0.18750041723251343,
-0.4026106595993042,
0.09445858746767044,
-0.1729569435119629,
0.17452549934387207,
0.10217098146677017,
0.05096086114645004,
0.04170230031013489,
-0.0956650823354721,
0.18876540660858154,
0.10543790459632874,
0.42972898483276367,
0.020343221724033356,
0.3289579749107361,
0.3190152049064636,
0.05976932868361473,
0.1852148175239563,
0.4724421501159668,
-0.10557128489017487,
-0.381122887134552,
-0.008652869611978531,
0.1460508406162262,
0.28388893604278564,
0.16257113218307495,
0.08690189570188522,
0.022015094757080078,
0.5249762535095215,
0.056620776653289795,
-0.1900882124900818,
-0.01875464990735054,
0.2666785418987274,
-0.06843945384025574,
-0.19796985387802124,
-0.3377669155597687,
0.6889947056770325,
-0.07912106066942215,
0.018481716513633728,
-0.03299522399902344,
0.02867813967168331,
-0.04892800375819206,
0.42892786860466003,
-0.06670668721199036,
0.8465297222137451,
0.12801241874694824,
0.04809335619211197,
0.292508065700531,
-0.01889624446630478,
0.18394702672958374,
-0.5831100344657898,
0.023514769971370697,
-0.2247413992881775,
-0.10064969211816788,
0.03163313865661621,
-0.2603111267089844,
-0.025947730988264084,
0.05966128036379814,
-0.08726150542497635,
0.2274342179298401,
0.019875138998031616,
-0.23103545606136322,
0.012518946081399918,
0.28219953179359436,
0.04079967737197876,
-0.1655595600605011,
0.05670956149697304,
0.002442196011543274,
-0.16477352380752563,
0.5717599987983704,
0.08949702978134155,
-0.10123953223228455,
0.07259216159582138,
-0.2510277330875397,
-0.11653071641921997,
0.42953795194625854,
-0.26523274183273315,
0.01611807942390442,
0.372793972492218,
-0.4153828024864197,
0.5313196182250977,
0.1662169098854065,
0.10273671895265579,
0.24748657643795013,
-0.20787103474140167,
0.22246377170085907,
0.2385983169078827,
0.16500934958457947,
-0.15036532282829285,
0.1241111308336258,
0.14620251953601837,
0.023713164031505585,
-0.2011260986328125,
0.05538652837276459,
-0.14513984322547913,
-0.05845634639263153,
0.029195979237556458,
0.01538211852312088,
0.1878442019224167,
-0.2644806206226349,
0.03315471485257149,
0.04978085309267044,
0.07010554522275925,
-0.13557326793670654,
0.11675053834915161,
0.3559403419494629,
-0.5042514801025391,
-0.15054044127464294,
0.2411980926990509,
-0.21919387578964233,
-0.015418671071529388,
0.36208802461624146,
-0.13452304899692535,
-0.18639400601387024,
0.65464186668396,
0.2729581594467163,
0.000716380774974823,
-0.18624746799468994,
-0.12670855224132538,
0.2749946117401123,
-0.7631402015686035,
0.11795595288276672,
0.17511551082134247,
-0.008846327662467957,
-0.1904214322566986,
0.408599853515625,
0.08841343224048615,
-0.24154682457447052,
-0.20024198293685913,
-0.4221113622188568,
-0.44687947630882263,
0.23943272233009338,
-0.12776026129722595,
0.20296995341777802,
-0.1667061448097229,
0.11591699719429016,
-0.022529244422912598,
0.17383846640586853,
-0.2450716644525528,
-0.0036325976252555847,
-0.14312440156936646,
0.11530323326587677,
0.3670766353607178,
-0.20225031673908234,
0.2619225084781647,
-0.12938623130321503,
0.03155681490898132,
0.229607954621315,
-0.2939411401748657,
-0.058213040232658386,
-0.17710623145103455,
0.16879545152187347,
0.016726456582546234,
-0.24855346977710724,
-0.135422483086586,
0.07637326419353485,
0.1470710188150406,
-0.1148725301027298,
0.06079468876123428,
0.0313212126493454,
-0.07040159404277802,
0.3685798943042755,
-0.09430791437625885,
-0.022474508732557297,
-0.4142129719257355,
0.1483006626367569,
-0.2709144949913025,
-0.028539098799228668,
0.16189178824424744,
-0.06540849804878235,
-0.009075634181499481,
0.028744280338287354,
-0.3944200277328491,
-0.030334431678056717,
-0.0575127899646759,
0.007855912670493126,
0.2673736810684204,
-0.38128897547721863,
-0.002588406205177307,
-0.06762928515672684,
0.027869991958141327,
0.15179578959941864,
-0.2128884196281433,
-0.004329249262809753,
0.15913456678390503,
0.10453785210847855,
-0.2384478896856308,
-0.031194966286420822,
-0.048500292003154755,
-0.014932161197066307,
0.05984652042388916,
0.2293986827135086,
0.08185882866382599,
0.0572822242975235,
-0.07614749670028687,
0.2177858054637909,
0.2604515254497528,
-0.24676792323589325,
0.197440505027771,
0.6288747191429138,
-0.019402630627155304,
0.12409251928329468,
0.0371185764670372,
-0.16018836200237274,
0.012889914214611053,
0.4978620409965515,
-0.2939940392971039,
0.1566222757101059,
-0.2650279402732849,
0.16399046778678894,
-0.13910403847694397,
-0.3206348419189453,
-0.10984019190073013,
0.07114854454994202,
-0.012643635272979736,
0.2669651210308075,
0.06503018736839294,
0.6184885501861572,
-0.10790932178497314,
0.08988609910011292,
0.06561628729104996,
0.08666795492172241,
-0.13524353504180908,
-0.023759745061397552,
-0.021891899406909943,
0.02565060555934906,
-0.4565442204475403,
0.05569462478160858,
-0.0020932587794959545,
-0.11058877408504486,
0.1262666881084442,
0.13307756185531616,
-0.29181230068206787,
0.025856241583824158,
-0.201679989695549,
0.5281713604927063,
0.06677761673927307,
-0.26957565546035767,
0.28798413276672363,
0.5224602818489075,
-0.2448056936264038,
0.19125646352767944,
0.23667798936367035,
0.5199190974235535,
0.29884377121925354,
-0.16683170199394226,
0.3531171977519989,
0.1617753803730011,
-0.12275498360395432,
0.09071768820285797,
0.2359623908996582,
0.21585772931575775,
0.05745707079768181,
0.05667419359087944,
0.027252119034528732,
-0.18102847039699554,
-0.10651610791683197,
-0.07788018137216568,
0.1526496708393097,
-0.35207289457321167,
0.9680817127227783,
-0.38225677609443665,
-0.18960201740264893,
-0.39002734422683716,
-0.15260431170463562,
-0.4545285701751709,
0.21092146635055542,
0.3689022362232208,
0.025646883994340897,
0.002511013299226761,
-0.04637742415070534,
0.00834556296467781,
-0.1366787701845169,
0.43441110849380493,
0.32892897725105286,
0.29182878136634827,
-0.3403297960758209,
0.23670567572116852,
-0.7051169872283936,
0.005213860422372818,
0.13191227614879608,
0.011282458901405334,
-0.011979013681411743,
-0.1158788800239563,
0.0036321431398391724,
0.1650361716747284,
-0.15560908615589142,
-0.12223204970359802,
0.014230743050575256,
0.18568947911262512,
-0.18004140257835388,
-0.1035049557685852,
-0.22117307782173157,
0.3196866810321808,
0.10709435492753983,
-0.37455424666404724,
0.03756717965006828,
0.01821257919073105,
-0.09612435102462769,
-0.06613046675920486,
-0.05517692118883133,
-0.16753290593624115,
-0.10706232488155365,
0.37737351655960083,
0.13638871908187866,
0.6575392484664917,
-0.10647173225879669,
-0.2366025447845459,
0.003033870831131935,
-0.10943001508712769,
-0.034953147172927856,
-0.10203030705451965,
0.34084922075271606,
0.7112773060798645,
-0.10585632175207138,
-0.2927047312259674,
-0.5408525466918945,
0.19859746098518372,
-0.10063380748033524,
-0.2316669225692749,
-0.42080366611480713,
0.26502421498298645,
-0.174640491604805,
-0.005563918501138687,
0.26633453369140625,
-0.0146778654307127,
0.08799204230308533,
-0.10520458221435547,
-0.3692778944969177,
-0.32441556453704834,
0.5938013195991516,
-0.22752749919891357,
-0.09664379060268402,
-0.22398437559604645,
0.26378703117370605,
0.005955837666988373,
-0.2528497278690338,
-0.7120816707611084,
0.1737963855266571,
0.25653520226478577,
0.07226689159870148,
-0.3041287660598755,
0.12370435893535614,
0.23579668998718262,
-0.1790582239627838,
-0.09826084971427917,
0.5251138210296631,
0.15298649668693542,
-0.11921736598014832,
0.2508082687854767,
-0.1958537995815277
] |
https://github.com/huggingface/datasets/issues/6540 | Concatenating datasets doesn't create any indices mapping - so flattening indices is not needed (unless you shuffle the dataset).
Can you share the snippet of code you are using to merge your datasets and save them to disk ? | Extreme inefficiency for `save_to_disk` when merging datasets | ### Describe the bug
Hi, I tried to merge in total 22M sequences of data, where each sequence is of maximum length 2000. I found that merging these datasets and then `save_to_disk` is extremely slow because of flattening the indices. Wondering if you have any suggestions or guidance on this. Thank you very much!
### Steps to reproduce the bug
The source data is too big to demonstrate
### Expected behavior
The source data is too big to demonstrate
### Environment info
python 3.9.0
datasets 2.7.0
pytorch 2.0.0
tokenizers 0.13.1
transformers 4.31.0 | 39 | Extreme inefficiency for `save_to_disk` when merging datasets
### Describe the bug
Hi, I tried to merge in total 22M sequences of data, where each sequence is of maximum length 2000. I found that merging these datasets and then `save_to_disk` is extremely slow because of flattening the indices. Wondering if you have any suggestions or guidance on this. Thank you very much!
### Steps to reproduce the bug
The source data is too big to demonstrate
### Expected behavior
The source data is too big to demonstrate
### Environment info
python 3.9.0
datasets 2.7.0
pytorch 2.0.0
tokenizers 0.13.1
transformers 4.31.0
Concatenating datasets doesn't create any indices mapping - so flattening indices is not needed (unless you shuffle the dataset).
Can you share the snippet of code you are using to merge your datasets and save them to disk ? | [
-0.1920756697654724,
-0.4081778824329376,
0.06094733253121376,
0.3518158197402954,
-0.021621473133563995,
0.42556124925613403,
-0.05339167267084122,
0.3826778531074524,
-0.1905861794948578,
-0.006987802684307098,
0.09002067148685455,
0.11778099834918976,
-0.2164076864719391,
0.04947652667760849,
-0.31331348419189453,
-0.1622568666934967,
0.4296491742134094,
0.11909069865942001,
0.11522878706455231,
0.022264890372753143,
-0.3323032557964325,
0.15576115250587463,
-0.3964582085609436,
-0.40271666646003723,
-0.44285058975219727,
0.05982186645269394,
-0.2016303837299347,
0.18364347517490387,
-0.017043784260749817,
0.030218496918678284,
0.1930147111415863,
0.09120360016822815,
-0.1034754142165184,
0.5656591653823853,
-0.00011553463991731405,
-0.115281842648983,
0.18476103246212006,
-0.02005724236369133,
-0.24853666126728058,
0.262037992477417,
-0.20272701978683472,
-0.4714053273200989,
-0.3759622275829315,
-0.1255057007074356,
0.2354520857334137,
-0.03746017813682556,
-0.2769928574562073,
-0.45763206481933594,
0.19820034503936768,
-0.04993050545454025,
0.1406535804271698,
0.2126067578792572,
-0.09400732815265656,
-0.09229844808578491,
-0.08973664045333862,
0.18037720024585724,
0.007359437644481659,
0.0730237364768982,
0.2985275983810425,
-0.23428648710250854,
0.2560414969921112,
0.21133242547512054,
-0.12334994971752167,
-0.46017879247665405,
0.22110697627067566,
-0.26085829734802246,
0.11070363223552704,
-0.4506990611553192,
-0.14369891583919525,
0.12869945168495178,
0.16502085328102112,
-0.15904822945594788,
-0.4522138237953186,
-0.3050287663936615,
-0.050687070935964584,
-0.3292565643787384,
0.015179532580077648,
0.03157307207584381,
-0.01861495152115822,
-0.04238150268793106,
-0.4454129636287689,
-0.17066383361816406,
-0.06964732706546783,
-0.00046727433800697327,
0.019477590918540955,
-0.06556685268878937,
0.10192541778087616,
-0.09692547470331192,
0.43643122911453247,
-0.2141212522983551,
-0.025119598954916,
-0.43752896785736084,
0.1743277907371521,
-0.0874943882226944,
-0.5734639167785645,
-0.1996423751115799,
-0.13763241469860077,
-0.4927363991737366,
0.15513619780540466,
0.02976401150226593,
-0.02734432741999626,
-0.024705257266759872,
0.33330386877059937,
0.044560857117176056,
0.16033805906772614,
0.4719747006893158,
-0.11654669791460037,
0.0035344697535037994,
0.12624605000019073,
-0.17707259953022003,
0.11749453842639923,
0.2257770150899887,
0.14273016154766083,
-0.13225869834423065,
0.3317014276981354,
-0.42894214391708374,
0.024781204760074615,
-0.15553978085517883,
-0.330575555562973,
0.10399448871612549,
-0.19529467821121216,
0.08565391600131989,
0.03708431497216225,
-0.06924693286418915,
-0.14008964598178864,
0.26958778500556946,
-0.0021096915006637573,
0.09701476246118546,
-0.049858346581459045,
0.3404237627983093,
-0.08649900555610657,
-0.1956566721200943,
-0.012915164232254028,
0.11982639878988266,
0.19768647849559784,
-0.29192298650741577,
-0.3213883638381958,
0.3010779619216919,
0.30909937620162964,
0.14571897685527802,
0.0559503436088562,
-0.2108222246170044,
0.2465057373046875,
0.07459724694490433,
-0.06656545400619507,
0.12959790229797363,
-0.01884249784052372,
0.11437053978443146,
-0.18275198340415955,
0.10153984278440475,
-0.39461255073547363,
-0.3167591094970703,
-0.31626102328300476,
0.176346555352211,
-0.0852973461151123,
0.12886476516723633,
-0.21679341793060303,
0.13977375626564026,
0.26887452602386475,
0.027748465538024902,
-0.2265700399875641,
-0.1490248143672943,
0.01036302000284195,
-0.2857733964920044,
0.24844032526016235,
0.0912269726395607,
-0.1285037398338318,
0.2672329246997833,
-0.0014748983085155487,
0.3395611047744751,
0.3152671158313751,
0.7406291365623474,
0.058924950659275055,
-0.01611221581697464,
-0.12926046550273895,
-0.04663367569446564,
0.24108737707138062,
0.02781631052494049,
-0.37222880125045776,
0.31078046560287476,
-0.19318172335624695,
0.17047694325447083,
0.11821161210536957,
0.23205837607383728,
0.39858439564704895,
-0.19505658745765686,
0.5943066477775574,
0.4986433982849121,
0.04074972867965698,
-0.06044904142618179,
-0.525513768196106,
-0.18988698720932007,
0.1151256263256073,
0.11472338438034058,
-0.2528046667575836,
0.054059017449617386,
-0.22828133404254913,
-0.104825958609581,
0.183376744389534,
-0.2659839987754822,
0.045543454587459564,
0.6996655464172363,
0.07594416290521622,
-0.43405529856681824,
0.08612310886383057,
0.03224056959152222,
-0.38049551844596863,
0.23094439506530762,
0.14877986907958984,
-0.19473743438720703,
0.17924192547798157,
-0.2173481583595276,
-0.05431143194437027,
-0.023137997835874557,
-0.10354006290435791,
0.46893492341041565,
0.08212366700172424,
-0.15946389734745026,
0.2308778464794159,
0.06034199893474579,
0.0040961578488349915,
0.17775790393352509,
0.067534439265728,
-0.08659842610359192,
-0.27817749977111816,
0.3129965662956238,
-0.060980916023254395,
-0.10186547040939331,
0.06719885766506195,
0.22107245028018951,
0.1396179348230362,
-0.1695285588502884,
0.025489557534456253,
0.08728617429733276,
-0.24662679433822632,
0.01873534545302391,
0.1083286851644516,
0.31615525484085083,
0.28189191222190857,
-0.21290723979473114,
0.07385589927434921,
0.41730087995529175,
0.007079996168613434,
-0.23293067514896393,
-0.32724422216415405,
-0.0016294270753860474,
-0.0748262107372284,
0.3510741889476776,
0.10598576068878174,
-0.019362762570381165,
-0.04709237068891525,
-0.048099566251039505,
0.020916424691677094,
-0.06572678685188293,
0.36237508058547974,
-0.17426307499408722,
0.006384067237377167,
0.06791382282972336,
-0.23141369223594666,
0.27398189902305603,
0.2810528874397278,
-0.14458659291267395,
-0.06382154673337936,
0.34090739488601685,
-0.21883618831634521,
-0.11469084024429321,
-0.1328870803117752,
0.06312455236911774,
0.25420451164245605,
0.2410101294517517,
0.18097983300685883,
-0.1576366424560547,
0.0414649061858654,
-0.2021203190088272,
0.22056670486927032,
0.29305189847946167,
0.10424508154392242,
0.2521151006221771,
0.20538733899593353,
0.25347426533699036,
-0.0032190456986427307,
-0.11191056668758392,
0.10927808284759521,
0.1283532977104187,
-0.02515566349029541,
0.14226046204566956,
-0.020626213401556015,
-0.3043614625930786,
-0.17018771171569824,
-0.29186803102493286,
-0.2724173665046692,
-0.5113238096237183,
-0.15473321080207825,
0.378106027841568,
-0.10244940221309662,
0.021745488047599792,
0.1747618168592453,
0.2667984664440155,
0.29148438572883606,
-0.3290540874004364,
-0.15267038345336914,
0.20173776149749756,
-0.04323132708668709,
-0.0038604550063610077,
0.2868076264858246,
-0.09034092724323273,
0.3133257031440735,
0.012332402169704437,
0.3657362461090088,
-0.28018414974212646,
-0.1757318377494812,
-0.09222358465194702,
-0.10381099581718445,
-0.1087908148765564,
-0.2441251277923584,
0.050784509629011154,
-0.14224430918693542,
-0.19485805928707123,
-0.07621552050113678,
0.1320248544216156,
0.10549899190664291,
0.2885780930519104,
-0.004222016781568527,
-0.253438264131546,
-0.09464572370052338,
-0.025656774640083313,
-0.2859611511230469,
-0.3565896153450012,
0.14842280745506287,
-0.408788800239563,
0.11505025625228882,
-0.004741627722978592,
0.0828315019607544,
-0.12388653308153152,
0.06388634443283081,
-0.10262322425842285,
-0.006815258413553238,
-0.25126737356185913,
0.5066184401512146,
0.021149855107069016,
-0.2578393518924713,
-0.27491694688796997,
-0.01637347787618637,
-0.3693337142467499,
0.12766745686531067,
-0.19560228288173676,
0.02553042396903038,
-0.49096670746803284,
-0.07277363538742065,
-0.26313650608062744,
0.20640969276428223,
0.09802493453025818,
0.05971163138747215,
-0.029453080147504807,
0.1547534465789795,
-0.1324761062860489,
-0.05442272126674652,
0.42073768377304077,
0.3911021947860718,
-0.20232857763767242,
0.04662591964006424,
0.2726181745529175,
0.3625607490539551,
0.5381177067756653,
0.22521467506885529,
0.1503431499004364,
0.4082920253276825,
0.2554786205291748,
-0.05778300762176514,
-0.44185397028923035,
-0.2662181556224823,
-0.2025684118270874,
-0.11582022160291672,
-0.11812340468168259,
0.05167067423462868,
-0.025302503257989883,
0.1841977834701538,
-0.14517803490161896,
0.39422452449798584,
-0.23530754446983337,
0.2584209144115448,
-0.08023916929960251,
0.11366705596446991,
0.026763111352920532,
-0.09562504291534424,
-0.14855772256851196,
-0.06034670025110245,
0.1173967570066452,
0.0758521556854248,
0.29961806535720825,
-0.14155428111553192,
0.16374032199382782,
-0.2662825882434845,
-0.5657339096069336,
0.18755760788917542,
0.12586610019207,
0.38585543632507324,
0.05854274332523346,
-0.1969081461429596,
-0.08881185948848724,
0.11368530988693237,
0.5741657018661499,
0.20310825109481812,
-0.3099671006202698,
0.602442741394043,
-0.0847211554646492,
-0.5069740414619446,
-0.03908819332718849,
0.07564766705036163,
0.06191668659448624,
0.4696235954761505,
0.7388142347335815,
-0.16104383766651154,
-0.15472102165222168,
0.1249309703707695,
0.6891990303993225,
-0.12478303909301758,
-0.2612003684043884,
-0.10914509743452072,
-0.07711949199438095,
-0.3846132457256317,
-0.0006026849150657654,
0.06011045724153519,
0.35500678420066833,
-0.19970262050628662,
-0.037155866622924805,
-0.09218794107437134,
-0.08365380018949509,
0.32691097259521484,
-0.16647562384605408,
0.42485231161117554,
-0.1288042962551117,
0.39037996530532837,
-0.12069853395223618,
0.16528445482254028,
0.24212542176246643,
0.20358172059059143,
0.010781174525618553,
-0.1549338698387146,
0.02461763098835945,
0.16221842169761658,
0.2826595902442932,
0.17958104610443115,
0.1076357364654541,
0.017077786847949028,
-0.2718266248703003,
0.34232595562934875,
-0.26490503549575806,
-0.14534540474414825,
0.053440697491168976,
0.03873097524046898,
-0.7461585402488708,
0.1795743703842163,
0.3003953993320465,
0.2739969491958618,
0.06734004616737366,
0.29207801818847656,
0.06629720330238342,
0.0884709358215332,
0.336751788854599,
-0.03379738703370094,
0.9147109985351562,
-0.05946126952767372,
0.37494000792503357,
0.058999620378017426,
0.015480749309062958,
0.0013956911861896515,
0.11097638309001923,
0.3248731791973114,
-0.20525652170181274,
-0.42276883125305176,
0.13372333347797394,
-0.20779335498809814,
-0.18368758261203766,
-0.17838704586029053,
-0.37787386775016785,
0.3094419836997986,
-0.4006720185279846,
-0.0711369663476944,
-0.2399766743183136,
0.2623211145401001,
-0.129916250705719,
-0.4228089451789856,
-0.21668052673339844,
0.08241905272006989,
0.3649846315383911,
-0.012083880603313446,
-0.06258691102266312,
-0.39908289909362793,
-0.10817737877368927,
0.19506019353866577,
0.013961628079414368,
0.0771370381116867,
0.08741146326065063,
0.5024871230125427,
-0.4850977659225464,
-0.5278401970863342,
0.16722607612609863,
-0.08011522889137268,
0.20438681542873383,
0.09053409099578857,
-0.14725305140018463,
-0.2745181620121002,
-0.06959356367588043,
0.0024008341133594513,
-0.030463140457868576,
-0.41885876655578613,
0.3342212438583374,
0.0059733763337135315,
0.12941932678222656,
-0.19384801387786865,
0.1124119833111763,
-0.26167261600494385,
-0.10811907798051834,
0.049226175993680954,
0.007359635084867477,
-0.00958918035030365,
-0.3482533395290375,
0.2017822265625,
-0.22606639564037323,
-0.23884613811969757,
0.09461507201194763,
0.3659411370754242,
-0.049139317125082016,
0.6307942271232605,
-0.32043585181236267,
-0.02706640213727951,
-0.11659453809261322,
0.46641817688941956,
0.22422780096530914,
-0.18359839916229248,
0.33410757780075073,
-0.024978674948215485,
-0.15629148483276367,
-0.14299431443214417,
0.33597323298454285,
0.04444821551442146,
-0.1294645369052887,
0.5073040127754211,
-0.40717974305152893,
0.11123073101043701,
0.0165863037109375,
0.1414761245250702,
0.11996297538280487,
-0.08127912133932114,
-0.284351646900177,
-0.13350364565849304,
-0.4786713123321533,
0.05450979620218277,
0.3682101368904114,
0.1685577929019928,
-0.18844664096832275,
-0.2799460291862488,
-0.12660835683345795,
0.019430505111813545,
-0.252996563911438,
0.017518237233161926,
-0.10230082273483276,
-0.1649935096502304,
0.1169702485203743,
-0.17395862936973572,
0.24100416898727417,
-0.3271961212158203,
-0.045486126095056534,
-0.003005705773830414,
0.1942857801914215,
-0.20802626013755798,
0.09193752706050873,
0.07694737613201141,
0.1034931093454361,
-0.2517048120498657,
0.10701103508472443,
-0.1905508041381836,
-0.1244368627667427,
-0.1957801729440689,
-0.05696965754032135,
0.04565682262182236,
-0.040941957384347916,
-0.17919869720935822,
-0.03417733311653137,
-0.32977530360221863,
0.02413153648376465,
0.17538489401340485,
0.27200761437416077,
0.21173587441444397,
-0.1536535769701004,
0.16737912595272064,
-0.005129996687173843,
-0.24456970393657684,
-0.42992550134658813,
-0.0021825917065143585,
0.005027756094932556,
-0.032692551612854004,
0.3652297258377075,
-0.38648882508277893,
-0.17445248365402222,
0.3887237012386322,
0.2683844566345215,
0.2666948437690735,
-0.21922536194324493,
-0.014077767729759216,
0.011586770415306091,
0.1792658269405365,
-0.01547781378030777,
-0.5164063572883606,
0.2487175166606903,
-0.04443949833512306,
-0.16287140548229218,
-0.00843001902103424,
0.09872408956289291,
0.01562821865081787,
-0.3411543369293213,
0.14379557967185974,
0.08814243227243423,
0.07092062383890152,
0.0673142671585083,
0.3922005295753479,
0.32242444157600403,
0.06306137144565582,
0.024317117407917976,
0.11869516223669052,
0.3045267164707184,
0.05930845066905022,
0.027599001303315163,
0.4286482036113739,
0.3677626848220825,
-0.11356295645236969,
0.049221742898225784,
-0.017183393239974976,
0.11135372519493103,
-0.008282102644443512,
0.010983575135469437,
0.3887810707092285,
0.14396998286247253,
0.05029413104057312,
-0.4714117646217346,
-0.3990812599658966,
-0.17641258239746094,
0.35480964183807373,
-0.23979254066944122,
0.23243510723114014,
0.5409412384033203,
0.015056535601615906,
0.4788416028022766,
-0.016844160854816437,
-0.11555910110473633,
0.012418903410434723,
0.09482485055923462,
0.048185236752033234,
0.19628463685512543,
0.22855965793132782,
0.0394926518201828,
0.44896626472473145,
0.42519432306289673,
-0.1094624474644661,
-0.29227906465530396,
0.3648231029510498,
-0.11559590697288513,
-0.2280430644750595,
0.43473321199417114,
0.5624822974205017,
0.07303335517644882,
-0.011510433629155159,
0.15293246507644653,
0.13599050045013428,
-0.0790746808052063,
0.23558953404426575,
0.2296103686094284,
-0.04670626297593117,
-0.3115822374820709,
0.2685093879699707,
0.006585404276847839,
-0.19705131649971008,
-0.1578333079814911,
-0.10024920105934143,
0.13013513386249542,
-0.22617127001285553,
0.10813108086585999,
-0.03820919990539551,
-0.5094066262245178,
-0.053667087107896805,
0.07049404084682465,
-0.05778155475854874,
-0.1789260357618332,
0.669717013835907,
0.07424561679363251,
-0.08037284016609192,
-0.0015504062175750732,
0.10678666830062866,
-0.05994563549757004,
0.5222408771514893,
0.3142641484737396,
-0.12943360209465027,
-0.3050030767917633,
0.018711894750595093,
-0.46518638730049133,
-0.07060978561639786,
0.04317236691713333,
0.4461848735809326,
0.351015567779541,
0.30349934101104736,
-0.04353957623243332,
0.13295559585094452,
0.010314270853996277,
-0.06133301928639412,
-0.19108846783638,
0.10472636669874191,
-0.309224009513855,
-0.023831453174352646,
0.09735500812530518,
-0.22876746952533722,
0.05191909521818161,
-0.44488245248794556,
0.560973584651947,
0.02479466050863266,
0.03321794420480728,
-0.10905309021472931,
0.39465802907943726,
-0.11510632932186127,
0.22202789783477783,
0.0034513939172029495,
0.27714547514915466,
0.06764118373394012,
0.0033165961503982544,
-0.30936896800994873,
0.28384676575660706,
0.1660628467798233,
-0.019436176866292953,
-0.020072724670171738,
0.11045901477336884,
0.3423426151275635,
-0.288457453250885,
-0.1393527090549469,
0.005306713283061981,
0.10831257700920105,
0.019911035895347595,
-0.3135712444782257,
-0.2864515781402588,
0.10124947130680084,
-0.006635710597038269,
0.39711523056030273,
0.3710636794567108,
0.4914657175540924,
-0.018007051199674606,
0.16376489400863647,
-0.26885005831718445,
-0.28664302825927734,
0.2588770389556885,
0.0019259490072727203,
-0.31476402282714844,
-0.2528131902217865,
0.1958070695400238,
0.33865609765052795,
0.12825137376785278,
-0.11692806333303452,
-0.14642590284347534,
0.16266003251075745,
-0.17302122712135315,
-0.03271299600601196,
0.5350594520568848,
-0.1982840597629547,
0.03073771297931671,
0.02932155132293701,
0.3915885090827942,
0.06096603721380234,
-0.2894328534603119,
0.17219382524490356,
-0.06300406903028488
] |
https://github.com/huggingface/datasets/issues/6538 | Hi ! Are you sure you have `datasets` 2.16 ? I just checked and on 2.16 I can run `from datasets.arrow_writer import SchemaInferenceError` without error | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) | ### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0 | 25 | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0
Hi ! Are you sure you have `datasets` 2.16 ? I just checked and on 2.16 I can run `from datasets.arrow_writer import SchemaInferenceError` without error | [
-0.256902813911438,
-0.06662493944168091,
-0.05580161139369011,
0.6121095418930054,
0.2748967707157135,
0.06340034306049347,
0.24404215812683105,
0.24720130860805511,
-0.019955575466156006,
0.11987867951393127,
-0.13812042772769928,
0.38939008116722107,
-0.1408829241991043,
0.1007615476846695,
-0.32404372096061707,
-0.32616546750068665,
0.039162781089544296,
0.21027472615242004,
-0.25826671719551086,
-0.02511308342218399,
-0.13907425105571747,
0.1340944766998291,
-0.172745019197464,
0.24685204029083252,
-0.4250190258026123,
-0.26558586955070496,
0.2469814419746399,
0.030495258048176765,
-0.44358178973197937,
-0.39700847864151,
0.24750655889511108,
-0.2310401201248169,
0.37677842378616333,
0.6055502891540527,
-0.00011488998279673979,
0.1920846551656723,
0.3230991065502167,
-0.10012710094451904,
-0.18276391923427582,
-0.26851069927215576,
-0.1036250963807106,
0.03106759488582611,
0.21665579080581665,
-0.10153007507324219,
0.21615839004516602,
0.0005410797894001007,
-0.27494823932647705,
-0.2035241276025772,
0.25661763548851013,
0.526404619216919,
0.2563377916812897,
0.2645606994628906,
0.43410056829452515,
-0.1192169189453125,
-0.061466049402952194,
-0.0923306941986084,
-0.2444404661655426,
0.15163978934288025,
-0.12952443957328796,
0.04484943300485611,
0.005928002297878265,
0.3358690142631531,
-0.028897468000650406,
0.15836332738399506,
0.32255351543426514,
-0.16028258204460144,
0.11113902181386948,
-0.4410451352596283,
0.0145353302359581,
0.052129387855529785,
0.7370848655700684,
-0.3695690631866455,
-0.4370410442352295,
0.15414728224277496,
0.14453935623168945,
0.04207813739776611,
0.180410698056221,
0.10252576321363449,
-0.23504295945167542,
0.13352859020233154,
0.2321055829524994,
-0.11182139813899994,
-0.37119418382644653,
-0.15580841898918152,
-0.20775461196899414,
0.28189292550086975,
-0.07928560674190521,
0.05331495404243469,
0.08881202340126038,
-0.17495179176330566,
0.8017526268959045,
0.001824287697672844,
-0.24544386565685272,
0.19523701071739197,
-0.4660859704017639,
-0.11735111474990845,
-0.020867645740509033,
0.0144905811175704,
-0.321607768535614,
0.08730154484510422,
0.1457754224538803,
-0.08641445636749268,
0.09756240248680115,
0.2448480725288391,
0.08345026522874832,
0.09961158782243729,
0.10073757916688919,
0.5698217749595642,
0.07114965468645096,
-0.03231749311089516,
0.05505339801311493,
-0.09617455303668976,
-0.24876058101654053,
-0.40744882822036743,
-0.024745170027017593,
-0.18364641070365906,
0.246136873960495,
-0.1124357208609581,
-0.3068576753139496,
0.14300671219825745,
-0.1927705705165863,
-0.04361412301659584,
-0.021950362250208855,
0.40578997135162354,
-0.0212737824767828,
0.28545406460762024,
0.31094586849212646,
0.15615573525428772,
0.12214254587888718,
0.12312217801809311,
-0.20654675364494324,
0.33852919936180115,
-0.14966563880443573,
-0.12863649427890778,
-0.12041734158992767,
-0.06161477416753769,
0.2588486075401306,
-0.11313822865486145,
-0.08800972998142242,
-0.1768268346786499,
-0.014624115079641342,
-0.33047088980674744,
0.020192649215459824,
0.19396111369132996,
-0.0659535825252533,
0.04192115366458893,
0.24863044917583466,
-0.2537769675254822,
-0.1377231925725937,
-0.059625353664159775,
-0.3462243378162384,
-0.16181938350200653,
-0.4648602306842804,
0.196210116147995,
0.05868682265281677,
-0.1515142023563385,
-0.08748701214790344,
-0.45019403100013733,
0.18756400048732758,
0.05569201707839966,
-0.005037479102611542,
-0.19469645619392395,
0.10776174813508987,
-0.014502028003334999,
-0.03426451236009598,
0.3410903215408325,
-0.3945315480232239,
-0.0010110437870025635,
0.3809555768966675,
-0.1595524251461029,
-0.02658456563949585,
0.12249168008565903,
-0.09577785432338715,
0.39026060700416565,
-0.09571227431297302,
-0.15573160350322723,
0.567808210849762,
-0.5921734571456909,
-0.26608705520629883,
0.05019427090883255,
-0.04213886708021164,
-0.1447429656982422,
0.3695034384727478,
-0.06576819717884064,
-0.039474405348300934,
0.07813966274261475,
0.08266063779592514,
0.144344300031662,
0.025286955758929253,
0.036696262657642365,
-0.06944005191326141,
-0.1120612770318985,
0.07201431691646576,
0.14142988622188568,
0.14674213528633118,
0.03374359384179115,
0.0999671220779419,
0.06819626688957214,
0.32104992866516113,
-0.055073726922273636,
-0.04141709953546524,
0.6366989016532898,
0.1728818714618683,
0.2089121788740158,
0.046118222177028656,
-0.25871551036834717,
-0.09337187558412552,
0.09669534862041473,
-0.09548264741897583,
0.20620690286159515,
-0.5495560765266418,
0.039022721350193024,
-0.28502604365348816,
0.35468095541000366,
-0.3013054132461548,
-0.17267537117004395,
0.14956888556480408,
0.11204648017883301,
0.15216058492660522,
0.08011548221111298,
-0.052536491304636,
0.4499247670173645,
-0.268441379070282,
0.3102836608886719,
-0.393457293510437,
0.3476170003414154,
-0.3230850398540497,
-0.3127036988735199,
0.04742034524679184,
0.17949096858501434,
0.024485832080245018,
-0.04163544625043869,
-0.30319371819496155,
0.16406658291816711,
0.0453663095831871,
0.20532071590423584,
-0.31083378195762634,
-0.03053329885005951,
-0.0025202278047800064,
-0.27089670300483704,
0.02911042608320713,
-0.11259222775697708,
0.31119304895401,
0.10925492644309998,
0.05677122250199318,
-0.041405417025089264,
-0.08253021538257599,
0.3201824128627777,
0.1547757238149643,
0.22164899110794067,
0.2683151960372925,
0.04771827161312103,
0.1253909170627594,
-0.23968012630939484,
0.017539357766509056,
0.18916183710098267,
0.21758733689785004,
0.12453307956457138,
-0.02025003731250763,
-0.3259884715080261,
0.3841291666030884,
0.1633160412311554,
-0.023884344846010208,
-0.06235859915614128,
-0.2212226390838623,
0.2503383159637451,
0.3229474723339081,
0.3707652986049652,
0.35874050855636597,
0.09806711226701736,
-0.2662656605243683,
0.11245916038751602,
0.07017193734645844,
-0.0723481997847557,
0.2630462050437927,
0.1803167313337326,
0.37655019760131836,
0.25856801867485046,
0.01693122833967209,
0.12798240780830383,
-0.13936102390289307,
-0.4716644883155823,
-0.10985515266656876,
0.37011659145355225,
-0.29064542055130005,
-0.001737736165523529,
-0.12793463468551636,
-0.05703889578580856,
-0.3960559070110321,
-0.026670046150684357,
-0.15691319108009338,
-0.264887273311615,
-0.4273056983947754,
0.3287535309791565,
-0.05488137900829315,
0.29113078117370605,
-0.19480302929878235,
-0.24224235117435455,
0.19393393397331238,
-0.12218492478132248,
-0.1903228759765625,
-0.36165642738342285,
0.08080045878887177,
0.03458442538976669,
0.18995380401611328,
0.1496807038784027,
0.3307649493217468,
-0.107923224568367,
0.29579442739486694,
-0.3171854615211487,
-0.23514088988304138,
0.14393962919712067,
-0.0386446937918663,
-0.034761302173137665,
0.3126859962940216,
0.1878063678741455,
0.25660091638565063,
-0.5176385641098022,
0.09446390718221664,
-0.14445345103740692,
-0.189145028591156,
0.08693961799144745,
-0.052748166024684906,
-0.18511644005775452,
0.12090454995632172,
-0.2517589330673218,
-0.48113560676574707,
-0.5694224238395691,
0.13440638780593872,
0.24150867760181427,
0.08420412242412567,
0.26392337679862976,
0.1586868315935135,
0.31294816732406616,
0.08068373054265976,
0.4144498109817505,
0.23354190587997437,
-0.07358457148075104,
0.30034497380256653,
-0.15435391664505005,
-0.2662021815776825,
0.05075201392173767,
-0.09570382535457611,
0.4410252571105957,
-0.027559194713830948,
-0.35064196586608887,
-0.13104456663131714,
-0.24551378190517426,
0.16854546964168549,
-0.1461605727672577,
0.2192200869321823,
0.37877804040908813,
0.414222776889801,
0.004855979233980179,
-0.10502402484416962,
0.09298646450042725,
-0.03882167488336563,
-0.27470752596855164,
-0.06299746781587601,
-0.016450056806206703,
0.4377359449863434,
-0.19663459062576294,
0.2570459842681885,
0.23741205036640167,
-0.16500329971313477,
0.23736384510993958,
0.08955816179513931,
0.28659358620643616,
-0.16709105670452118,
-0.27347826957702637,
-0.17229416966438293,
-0.180995911359787,
0.10606499016284943,
-0.047507673501968384,
-0.24346637725830078,
-0.01947050914168358,
-0.12351600080728531,
-0.06241896376013756,
-0.04349275678396225,
-0.027372416108846664,
-0.07372915744781494,
-0.42088621854782104,
0.23319081962108612,
-0.08653128147125244,
-0.06325040012598038,
-0.17037665843963623,
0.036015868186950684,
0.18266384303569794,
0.04490106925368309,
-0.1402004361152649,
-0.07022362947463989,
-0.2805652320384979,
-0.027860542759299278,
-0.29643091559410095,
0.09792312979698181,
0.13958683609962463,
0.3668658137321472,
0.11172240972518921,
-0.05322970822453499,
0.06627233326435089,
0.006396360695362091,
0.2152082473039627,
-0.18715506792068481,
-0.23747441172599792,
0.14924632012844086,
-0.068037249147892,
-0.44537559151649475,
-0.03558829426765442,
-0.1686117947101593,
0.0898018404841423,
0.15014395117759705,
0.1917921006679535,
-0.06652428209781647,
-0.17009872198104858,
0.4521212577819824,
0.06473669409751892,
-0.11619039624929428,
-0.030791480094194412,
-0.15608495473861694,
-0.3060137629508972,
-0.3745065927505493,
-0.07876864075660706,
0.2592592239379883,
0.46490445733070374,
0.2863294184207916,
0.19665184617042542,
-0.2955895662307739,
-0.12551334500312805,
-0.048651427030563354,
0.02841978147625923,
0.1900259554386139,
-0.046729035675525665,
0.09548941254615784,
0.08056318014860153,
0.3972302973270416,
0.5442346930503845,
0.6393277645111084,
-0.3564460575580597,
-0.5447501540184021,
-0.05768277868628502,
-0.1703615039587021,
0.3061317503452301,
0.04232814535498619,
-0.09967024624347687,
0.19207651913166046,
-0.4968562126159668,
0.014718657359480858,
-0.08922390639781952,
-0.04809786006808281,
0.06301027536392212,
0.1677154004573822,
-0.18332231044769287,
-0.24146577715873718,
0.36401161551475525,
0.25125014781951904,
0.05983549356460571,
0.4667035639286041,
0.23924025893211365,
-0.38408684730529785,
0.4785679280757904,
0.1116812527179718,
0.7710726857185364,
0.2474597692489624,
0.10733545571565628,
0.2562350630760193,
-0.4400929808616638,
0.27828890085220337,
-0.009791374206542969,
-0.013260417617857456,
-0.4400268495082855,
-0.233763188123703,
-0.01054733619093895,
-0.23394107818603516,
0.3223817050457001,
-0.13457442820072174,
-0.1893027424812317,
0.057696398347616196,
-0.23671028017997742,
-0.11946331709623337,
0.12738797068595886,
0.15037280321121216,
-0.09924160689115524,
-0.18415561318397522,
-0.15610376000404358,
0.0969632938504219,
0.16927587985992432,
0.1097305566072464,
-0.11566148698329926,
-0.039514943957328796,
-0.1755986213684082,
-0.32159623503685,
-0.21222439408302307,
0.19046536087989807,
-0.3982684314250946,
0.4196784496307373,
0.15749415755271912,
-0.20017899572849274,
0.23643603920936584,
0.45393550395965576,
0.18932729959487915,
-0.10550291836261749,
-0.11277548223733902,
0.14423617720603943,
0.11200116574764252,
-0.16209116578102112,
0.07247572392225266,
0.2463332712650299,
0.3890644907951355,
-0.07430321723222733,
0.03419813513755798,
0.38855165243148804,
-0.18327166140079498,
-0.4002794027328491,
0.1420225203037262,
0.06763996928930283,
0.043245892971754074,
-0.23007208108901978,
-0.20149093866348267,
-0.17483940720558167,
-0.05476310849189758,
-0.17514777183532715,
0.147023543715477,
0.03132973611354828,
-0.3554784655570984,
0.1370883584022522,
-0.17109976708889008,
-0.3439685106277466,
0.01698918268084526,
0.38314497470855713,
0.1898702085018158,
0.04016689211130142,
0.6141799688339233,
0.07355962693691254,
-0.25458812713623047,
-0.21388505399227142,
0.1335947960615158,
0.19124937057495117,
-0.62235027551651,
0.1904217004776001,
-0.021416522562503815,
-0.2732062041759491,
-0.029417753219604492,
0.3728379011154175,
0.24950259923934937,
0.07783541083335876,
-0.17882214486598969,
-0.24607907235622406,
-0.428485631942749,
0.11749082803726196,
0.04444221034646034,
0.2214086949825287,
-0.37719854712486267,
0.2194172739982605,
-0.17110860347747803,
0.103178009390831,
-0.2955057919025421,
-0.026355629786849022,
-0.5316578149795532,
0.14548428356647491,
0.2224799394607544,
-0.015324385836720467,
-0.1502855271100998,
-0.02151089906692505,
0.14002758264541626,
0.2930784523487091,
-0.09902186691761017,
-0.1772584617137909,
-0.1596524566411972,
0.09779373556375504,
0.19002340734004974,
-0.1416580080986023,
0.00005961954593658447,
-0.01402941346168518,
-0.07470054924488068,
-0.019229821860790253,
-0.08337271213531494,
0.26569053530693054,
-0.0025573670864105225,
0.16257129609584808,
0.1595553457736969,
-0.033375516533851624,
-0.26804155111312866,
0.24136541783809662,
-0.1609545648097992,
0.2795288860797882,
-0.20764602720737457,
0.2113102674484253,
-0.09595108777284622,
0.09591668844223022,
-0.05292639881372452,
0.09137202799320221,
-0.17035174369812012,
-0.05258016288280487,
0.29036810994148254,
-0.34288138151168823,
-0.015550516545772552,
0.18389125168323517,
0.22407057881355286,
0.22856120765209198,
-0.3436901271343231,
0.012690983712673187,
0.14790883660316467,
0.23818010091781616,
-0.28956544399261475,
-0.16199693083763123,
-0.11132695525884628,
-0.2829515039920807,
0.039406076073646545,
0.15308913588523865,
-0.06062738597393036,
-0.12041755020618439,
0.2808241844177246,
0.26463666558265686,
0.20148871839046478,
-0.11933860182762146,
0.401050865650177,
0.3233991861343384,
-0.13719576597213745,
-0.04563349485397339,
0.5149922370910645,
0.24320140480995178,
0.2674027383327484,
0.3243061304092407,
-0.1201210469007492,
0.19134610891342163,
-0.3938050866127014,
-0.0865255668759346,
0.13271696865558624,
-0.15006910264492035,
0.07412679493427277,
-0.3074265122413635,
-0.01670687273144722,
-0.19194567203521729,
-0.12525498867034912,
-0.05134852975606918,
-0.052303194999694824,
-0.06941889971494675,
0.00046334415674209595,
0.07868194580078125,
-0.2117467075586319,
-0.026525575667619705,
0.027291610836982727,
-0.14084982872009277,
-0.10010220855474472,
-0.0014868825674057007,
0.15193066000938416,
-0.03160551190376282,
0.14198365807533264,
0.07675089687108994,
-0.25749874114990234,
-0.26734089851379395,
0.03476652875542641,
0.165971577167511,
0.03169573098421097,
-0.40021413564682007,
0.1568090170621872,
-0.03142855688929558,
-0.04700645059347153,
-0.2851216495037079,
0.43323761224746704,
0.5774037837982178,
0.4171214997768402,
0.10439202189445496,
-0.04928453639149666,
-0.07951289415359497,
-0.1513766497373581,
0.1302853524684906,
0.3273222744464874,
-0.07780224084854126,
0.22529923915863037,
0.3888447880744934,
0.15440931916236877,
-0.24088755249977112,
-0.07401212304830551,
0.07731480896472931,
0.22244518995285034,
-0.26429280638694763,
0.5152069330215454,
-0.02425434999167919,
-0.33644479513168335,
0.01254897192120552,
0.1521034836769104,
-0.4033680260181427,
0.19476701319217682,
0.4406997561454773,
-0.18382270634174347,
0.018053457140922546,
-0.33213943243026733,
0.06533817946910858,
0.03727605193853378,
0.6124904751777649,
0.48521313071250916,
0.33517056703567505,
-0.15982908010482788,
-0.16731733083724976,
-0.3128805160522461,
0.18699117004871368,
-0.11246559023857117,
0.03628339618444443,
0.013686876744031906,
0.06751812994480133,
0.04187149927020073,
0.15657424926757812,
0.18706804513931274,
0.2210918366909027,
-0.2763952314853668,
0.02608480118215084,
-0.38806039094924927,
-0.2455812245607376,
0.10810841619968414,
-0.03884698078036308,
0.08636362105607986,
-0.5342223644256592,
0.09064959734678268,
-0.0824476107954979,
0.16404196619987488,
-0.28465989232063293,
-0.0542563758790493,
0.20082250237464905,
-0.1979013979434967,
0.45428916811943054,
-0.05478053539991379,
0.4595044255256653,
0.020230047404766083,
-0.1561621129512787,
-0.13956424593925476,
-0.5568035840988159,
-0.28128939867019653,
0.1751372516155243,
0.32846924662590027,
0.4226182997226715,
-0.18614041805267334,
-0.38109081983566284,
-0.3425794243812561,
0.13387203216552734,
-0.20194575190544128,
0.10682004690170288,
-0.16240717470645905,
0.17728838324546814,
-0.04089207947254181,
0.11511212587356567,
0.19150277972221375,
-0.09540397673845291,
-0.02851509302854538,
0.19460955262184143,
-0.2638320326805115,
-0.3892172873020172,
0.41564828157424927,
-0.18457314372062683,
-0.3162107765674591,
0.15280799567699432,
0.1361370086669922,
-0.0953700989484787,
-0.08400661498308182,
-0.5766762495040894,
0.23468558490276337,
0.32386383414268494,
-0.09576019644737244,
-0.12282361835241318,
0.23794598877429962,
0.33038240671157837,
0.11651982367038727,
-0.04669814556837082,
0.3443213403224945,
-0.12160798907279968,
-0.01021159440279007,
0.05064907670021057,
-0.11506733298301697
] |
https://github.com/huggingface/datasets/issues/6538 | I have the same issue - using with datasets version 2.16.1. Also this is on a kaggle notebook - other people with the same issue also seem to be having it on kaggle? | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) | ### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0 | 33 | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0
I have the same issue - using with datasets version 2.16.1. Also this is on a kaggle notebook - other people with the same issue also seem to be having it on kaggle? | [
-0.256902813911438,
-0.06662493944168091,
-0.05580161139369011,
0.6121095418930054,
0.2748967707157135,
0.06340034306049347,
0.24404215812683105,
0.24720130860805511,
-0.019955575466156006,
0.11987867951393127,
-0.13812042772769928,
0.38939008116722107,
-0.1408829241991043,
0.1007615476846695,
-0.32404372096061707,
-0.32616546750068665,
0.039162781089544296,
0.21027472615242004,
-0.25826671719551086,
-0.02511308342218399,
-0.13907425105571747,
0.1340944766998291,
-0.172745019197464,
0.24685204029083252,
-0.4250190258026123,
-0.26558586955070496,
0.2469814419746399,
0.030495258048176765,
-0.44358178973197937,
-0.39700847864151,
0.24750655889511108,
-0.2310401201248169,
0.37677842378616333,
0.6055502891540527,
-0.00011488998279673979,
0.1920846551656723,
0.3230991065502167,
-0.10012710094451904,
-0.18276391923427582,
-0.26851069927215576,
-0.1036250963807106,
0.03106759488582611,
0.21665579080581665,
-0.10153007507324219,
0.21615839004516602,
0.0005410797894001007,
-0.27494823932647705,
-0.2035241276025772,
0.25661763548851013,
0.526404619216919,
0.2563377916812897,
0.2645606994628906,
0.43410056829452515,
-0.1192169189453125,
-0.061466049402952194,
-0.0923306941986084,
-0.2444404661655426,
0.15163978934288025,
-0.12952443957328796,
0.04484943300485611,
0.005928002297878265,
0.3358690142631531,
-0.028897468000650406,
0.15836332738399506,
0.32255351543426514,
-0.16028258204460144,
0.11113902181386948,
-0.4410451352596283,
0.0145353302359581,
0.052129387855529785,
0.7370848655700684,
-0.3695690631866455,
-0.4370410442352295,
0.15414728224277496,
0.14453935623168945,
0.04207813739776611,
0.180410698056221,
0.10252576321363449,
-0.23504295945167542,
0.13352859020233154,
0.2321055829524994,
-0.11182139813899994,
-0.37119418382644653,
-0.15580841898918152,
-0.20775461196899414,
0.28189292550086975,
-0.07928560674190521,
0.05331495404243469,
0.08881202340126038,
-0.17495179176330566,
0.8017526268959045,
0.001824287697672844,
-0.24544386565685272,
0.19523701071739197,
-0.4660859704017639,
-0.11735111474990845,
-0.020867645740509033,
0.0144905811175704,
-0.321607768535614,
0.08730154484510422,
0.1457754224538803,
-0.08641445636749268,
0.09756240248680115,
0.2448480725288391,
0.08345026522874832,
0.09961158782243729,
0.10073757916688919,
0.5698217749595642,
0.07114965468645096,
-0.03231749311089516,
0.05505339801311493,
-0.09617455303668976,
-0.24876058101654053,
-0.40744882822036743,
-0.024745170027017593,
-0.18364641070365906,
0.246136873960495,
-0.1124357208609581,
-0.3068576753139496,
0.14300671219825745,
-0.1927705705165863,
-0.04361412301659584,
-0.021950362250208855,
0.40578997135162354,
-0.0212737824767828,
0.28545406460762024,
0.31094586849212646,
0.15615573525428772,
0.12214254587888718,
0.12312217801809311,
-0.20654675364494324,
0.33852919936180115,
-0.14966563880443573,
-0.12863649427890778,
-0.12041734158992767,
-0.06161477416753769,
0.2588486075401306,
-0.11313822865486145,
-0.08800972998142242,
-0.1768268346786499,
-0.014624115079641342,
-0.33047088980674744,
0.020192649215459824,
0.19396111369132996,
-0.0659535825252533,
0.04192115366458893,
0.24863044917583466,
-0.2537769675254822,
-0.1377231925725937,
-0.059625353664159775,
-0.3462243378162384,
-0.16181938350200653,
-0.4648602306842804,
0.196210116147995,
0.05868682265281677,
-0.1515142023563385,
-0.08748701214790344,
-0.45019403100013733,
0.18756400048732758,
0.05569201707839966,
-0.005037479102611542,
-0.19469645619392395,
0.10776174813508987,
-0.014502028003334999,
-0.03426451236009598,
0.3410903215408325,
-0.3945315480232239,
-0.0010110437870025635,
0.3809555768966675,
-0.1595524251461029,
-0.02658456563949585,
0.12249168008565903,
-0.09577785432338715,
0.39026060700416565,
-0.09571227431297302,
-0.15573160350322723,
0.567808210849762,
-0.5921734571456909,
-0.26608705520629883,
0.05019427090883255,
-0.04213886708021164,
-0.1447429656982422,
0.3695034384727478,
-0.06576819717884064,
-0.039474405348300934,
0.07813966274261475,
0.08266063779592514,
0.144344300031662,
0.025286955758929253,
0.036696262657642365,
-0.06944005191326141,
-0.1120612770318985,
0.07201431691646576,
0.14142988622188568,
0.14674213528633118,
0.03374359384179115,
0.0999671220779419,
0.06819626688957214,
0.32104992866516113,
-0.055073726922273636,
-0.04141709953546524,
0.6366989016532898,
0.1728818714618683,
0.2089121788740158,
0.046118222177028656,
-0.25871551036834717,
-0.09337187558412552,
0.09669534862041473,
-0.09548264741897583,
0.20620690286159515,
-0.5495560765266418,
0.039022721350193024,
-0.28502604365348816,
0.35468095541000366,
-0.3013054132461548,
-0.17267537117004395,
0.14956888556480408,
0.11204648017883301,
0.15216058492660522,
0.08011548221111298,
-0.052536491304636,
0.4499247670173645,
-0.268441379070282,
0.3102836608886719,
-0.393457293510437,
0.3476170003414154,
-0.3230850398540497,
-0.3127036988735199,
0.04742034524679184,
0.17949096858501434,
0.024485832080245018,
-0.04163544625043869,
-0.30319371819496155,
0.16406658291816711,
0.0453663095831871,
0.20532071590423584,
-0.31083378195762634,
-0.03053329885005951,
-0.0025202278047800064,
-0.27089670300483704,
0.02911042608320713,
-0.11259222775697708,
0.31119304895401,
0.10925492644309998,
0.05677122250199318,
-0.041405417025089264,
-0.08253021538257599,
0.3201824128627777,
0.1547757238149643,
0.22164899110794067,
0.2683151960372925,
0.04771827161312103,
0.1253909170627594,
-0.23968012630939484,
0.017539357766509056,
0.18916183710098267,
0.21758733689785004,
0.12453307956457138,
-0.02025003731250763,
-0.3259884715080261,
0.3841291666030884,
0.1633160412311554,
-0.023884344846010208,
-0.06235859915614128,
-0.2212226390838623,
0.2503383159637451,
0.3229474723339081,
0.3707652986049652,
0.35874050855636597,
0.09806711226701736,
-0.2662656605243683,
0.11245916038751602,
0.07017193734645844,
-0.0723481997847557,
0.2630462050437927,
0.1803167313337326,
0.37655019760131836,
0.25856801867485046,
0.01693122833967209,
0.12798240780830383,
-0.13936102390289307,
-0.4716644883155823,
-0.10985515266656876,
0.37011659145355225,
-0.29064542055130005,
-0.001737736165523529,
-0.12793463468551636,
-0.05703889578580856,
-0.3960559070110321,
-0.026670046150684357,
-0.15691319108009338,
-0.264887273311615,
-0.4273056983947754,
0.3287535309791565,
-0.05488137900829315,
0.29113078117370605,
-0.19480302929878235,
-0.24224235117435455,
0.19393393397331238,
-0.12218492478132248,
-0.1903228759765625,
-0.36165642738342285,
0.08080045878887177,
0.03458442538976669,
0.18995380401611328,
0.1496807038784027,
0.3307649493217468,
-0.107923224568367,
0.29579442739486694,
-0.3171854615211487,
-0.23514088988304138,
0.14393962919712067,
-0.0386446937918663,
-0.034761302173137665,
0.3126859962940216,
0.1878063678741455,
0.25660091638565063,
-0.5176385641098022,
0.09446390718221664,
-0.14445345103740692,
-0.189145028591156,
0.08693961799144745,
-0.052748166024684906,
-0.18511644005775452,
0.12090454995632172,
-0.2517589330673218,
-0.48113560676574707,
-0.5694224238395691,
0.13440638780593872,
0.24150867760181427,
0.08420412242412567,
0.26392337679862976,
0.1586868315935135,
0.31294816732406616,
0.08068373054265976,
0.4144498109817505,
0.23354190587997437,
-0.07358457148075104,
0.30034497380256653,
-0.15435391664505005,
-0.2662021815776825,
0.05075201392173767,
-0.09570382535457611,
0.4410252571105957,
-0.027559194713830948,
-0.35064196586608887,
-0.13104456663131714,
-0.24551378190517426,
0.16854546964168549,
-0.1461605727672577,
0.2192200869321823,
0.37877804040908813,
0.414222776889801,
0.004855979233980179,
-0.10502402484416962,
0.09298646450042725,
-0.03882167488336563,
-0.27470752596855164,
-0.06299746781587601,
-0.016450056806206703,
0.4377359449863434,
-0.19663459062576294,
0.2570459842681885,
0.23741205036640167,
-0.16500329971313477,
0.23736384510993958,
0.08955816179513931,
0.28659358620643616,
-0.16709105670452118,
-0.27347826957702637,
-0.17229416966438293,
-0.180995911359787,
0.10606499016284943,
-0.047507673501968384,
-0.24346637725830078,
-0.01947050914168358,
-0.12351600080728531,
-0.06241896376013756,
-0.04349275678396225,
-0.027372416108846664,
-0.07372915744781494,
-0.42088621854782104,
0.23319081962108612,
-0.08653128147125244,
-0.06325040012598038,
-0.17037665843963623,
0.036015868186950684,
0.18266384303569794,
0.04490106925368309,
-0.1402004361152649,
-0.07022362947463989,
-0.2805652320384979,
-0.027860542759299278,
-0.29643091559410095,
0.09792312979698181,
0.13958683609962463,
0.3668658137321472,
0.11172240972518921,
-0.05322970822453499,
0.06627233326435089,
0.006396360695362091,
0.2152082473039627,
-0.18715506792068481,
-0.23747441172599792,
0.14924632012844086,
-0.068037249147892,
-0.44537559151649475,
-0.03558829426765442,
-0.1686117947101593,
0.0898018404841423,
0.15014395117759705,
0.1917921006679535,
-0.06652428209781647,
-0.17009872198104858,
0.4521212577819824,
0.06473669409751892,
-0.11619039624929428,
-0.030791480094194412,
-0.15608495473861694,
-0.3060137629508972,
-0.3745065927505493,
-0.07876864075660706,
0.2592592239379883,
0.46490445733070374,
0.2863294184207916,
0.19665184617042542,
-0.2955895662307739,
-0.12551334500312805,
-0.048651427030563354,
0.02841978147625923,
0.1900259554386139,
-0.046729035675525665,
0.09548941254615784,
0.08056318014860153,
0.3972302973270416,
0.5442346930503845,
0.6393277645111084,
-0.3564460575580597,
-0.5447501540184021,
-0.05768277868628502,
-0.1703615039587021,
0.3061317503452301,
0.04232814535498619,
-0.09967024624347687,
0.19207651913166046,
-0.4968562126159668,
0.014718657359480858,
-0.08922390639781952,
-0.04809786006808281,
0.06301027536392212,
0.1677154004573822,
-0.18332231044769287,
-0.24146577715873718,
0.36401161551475525,
0.25125014781951904,
0.05983549356460571,
0.4667035639286041,
0.23924025893211365,
-0.38408684730529785,
0.4785679280757904,
0.1116812527179718,
0.7710726857185364,
0.2474597692489624,
0.10733545571565628,
0.2562350630760193,
-0.4400929808616638,
0.27828890085220337,
-0.009791374206542969,
-0.013260417617857456,
-0.4400268495082855,
-0.233763188123703,
-0.01054733619093895,
-0.23394107818603516,
0.3223817050457001,
-0.13457442820072174,
-0.1893027424812317,
0.057696398347616196,
-0.23671028017997742,
-0.11946331709623337,
0.12738797068595886,
0.15037280321121216,
-0.09924160689115524,
-0.18415561318397522,
-0.15610376000404358,
0.0969632938504219,
0.16927587985992432,
0.1097305566072464,
-0.11566148698329926,
-0.039514943957328796,
-0.1755986213684082,
-0.32159623503685,
-0.21222439408302307,
0.19046536087989807,
-0.3982684314250946,
0.4196784496307373,
0.15749415755271912,
-0.20017899572849274,
0.23643603920936584,
0.45393550395965576,
0.18932729959487915,
-0.10550291836261749,
-0.11277548223733902,
0.14423617720603943,
0.11200116574764252,
-0.16209116578102112,
0.07247572392225266,
0.2463332712650299,
0.3890644907951355,
-0.07430321723222733,
0.03419813513755798,
0.38855165243148804,
-0.18327166140079498,
-0.4002794027328491,
0.1420225203037262,
0.06763996928930283,
0.043245892971754074,
-0.23007208108901978,
-0.20149093866348267,
-0.17483940720558167,
-0.05476310849189758,
-0.17514777183532715,
0.147023543715477,
0.03132973611354828,
-0.3554784655570984,
0.1370883584022522,
-0.17109976708889008,
-0.3439685106277466,
0.01698918268084526,
0.38314497470855713,
0.1898702085018158,
0.04016689211130142,
0.6141799688339233,
0.07355962693691254,
-0.25458812713623047,
-0.21388505399227142,
0.1335947960615158,
0.19124937057495117,
-0.62235027551651,
0.1904217004776001,
-0.021416522562503815,
-0.2732062041759491,
-0.029417753219604492,
0.3728379011154175,
0.24950259923934937,
0.07783541083335876,
-0.17882214486598969,
-0.24607907235622406,
-0.428485631942749,
0.11749082803726196,
0.04444221034646034,
0.2214086949825287,
-0.37719854712486267,
0.2194172739982605,
-0.17110860347747803,
0.103178009390831,
-0.2955057919025421,
-0.026355629786849022,
-0.5316578149795532,
0.14548428356647491,
0.2224799394607544,
-0.015324385836720467,
-0.1502855271100998,
-0.02151089906692505,
0.14002758264541626,
0.2930784523487091,
-0.09902186691761017,
-0.1772584617137909,
-0.1596524566411972,
0.09779373556375504,
0.19002340734004974,
-0.1416580080986023,
0.00005961954593658447,
-0.01402941346168518,
-0.07470054924488068,
-0.019229821860790253,
-0.08337271213531494,
0.26569053530693054,
-0.0025573670864105225,
0.16257129609584808,
0.1595553457736969,
-0.033375516533851624,
-0.26804155111312866,
0.24136541783809662,
-0.1609545648097992,
0.2795288860797882,
-0.20764602720737457,
0.2113102674484253,
-0.09595108777284622,
0.09591668844223022,
-0.05292639881372452,
0.09137202799320221,
-0.17035174369812012,
-0.05258016288280487,
0.29036810994148254,
-0.34288138151168823,
-0.015550516545772552,
0.18389125168323517,
0.22407057881355286,
0.22856120765209198,
-0.3436901271343231,
0.012690983712673187,
0.14790883660316467,
0.23818010091781616,
-0.28956544399261475,
-0.16199693083763123,
-0.11132695525884628,
-0.2829515039920807,
0.039406076073646545,
0.15308913588523865,
-0.06062738597393036,
-0.12041755020618439,
0.2808241844177246,
0.26463666558265686,
0.20148871839046478,
-0.11933860182762146,
0.401050865650177,
0.3233991861343384,
-0.13719576597213745,
-0.04563349485397339,
0.5149922370910645,
0.24320140480995178,
0.2674027383327484,
0.3243061304092407,
-0.1201210469007492,
0.19134610891342163,
-0.3938050866127014,
-0.0865255668759346,
0.13271696865558624,
-0.15006910264492035,
0.07412679493427277,
-0.3074265122413635,
-0.01670687273144722,
-0.19194567203521729,
-0.12525498867034912,
-0.05134852975606918,
-0.052303194999694824,
-0.06941889971494675,
0.00046334415674209595,
0.07868194580078125,
-0.2117467075586319,
-0.026525575667619705,
0.027291610836982727,
-0.14084982872009277,
-0.10010220855474472,
-0.0014868825674057007,
0.15193066000938416,
-0.03160551190376282,
0.14198365807533264,
0.07675089687108994,
-0.25749874114990234,
-0.26734089851379395,
0.03476652875542641,
0.165971577167511,
0.03169573098421097,
-0.40021413564682007,
0.1568090170621872,
-0.03142855688929558,
-0.04700645059347153,
-0.2851216495037079,
0.43323761224746704,
0.5774037837982178,
0.4171214997768402,
0.10439202189445496,
-0.04928453639149666,
-0.07951289415359497,
-0.1513766497373581,
0.1302853524684906,
0.3273222744464874,
-0.07780224084854126,
0.22529923915863037,
0.3888447880744934,
0.15440931916236877,
-0.24088755249977112,
-0.07401212304830551,
0.07731480896472931,
0.22244518995285034,
-0.26429280638694763,
0.5152069330215454,
-0.02425434999167919,
-0.33644479513168335,
0.01254897192120552,
0.1521034836769104,
-0.4033680260181427,
0.19476701319217682,
0.4406997561454773,
-0.18382270634174347,
0.018053457140922546,
-0.33213943243026733,
0.06533817946910858,
0.03727605193853378,
0.6124904751777649,
0.48521313071250916,
0.33517056703567505,
-0.15982908010482788,
-0.16731733083724976,
-0.3128805160522461,
0.18699117004871368,
-0.11246559023857117,
0.03628339618444443,
0.013686876744031906,
0.06751812994480133,
0.04187149927020073,
0.15657424926757812,
0.18706804513931274,
0.2210918366909027,
-0.2763952314853668,
0.02608480118215084,
-0.38806039094924927,
-0.2455812245607376,
0.10810841619968414,
-0.03884698078036308,
0.08636362105607986,
-0.5342223644256592,
0.09064959734678268,
-0.0824476107954979,
0.16404196619987488,
-0.28465989232063293,
-0.0542563758790493,
0.20082250237464905,
-0.1979013979434967,
0.45428916811943054,
-0.05478053539991379,
0.4595044255256653,
0.020230047404766083,
-0.1561621129512787,
-0.13956424593925476,
-0.5568035840988159,
-0.28128939867019653,
0.1751372516155243,
0.32846924662590027,
0.4226182997226715,
-0.18614041805267334,
-0.38109081983566284,
-0.3425794243812561,
0.13387203216552734,
-0.20194575190544128,
0.10682004690170288,
-0.16240717470645905,
0.17728838324546814,
-0.04089207947254181,
0.11511212587356567,
0.19150277972221375,
-0.09540397673845291,
-0.02851509302854538,
0.19460955262184143,
-0.2638320326805115,
-0.3892172873020172,
0.41564828157424927,
-0.18457314372062683,
-0.3162107765674591,
0.15280799567699432,
0.1361370086669922,
-0.0953700989484787,
-0.08400661498308182,
-0.5766762495040894,
0.23468558490276337,
0.32386383414268494,
-0.09576019644737244,
-0.12282361835241318,
0.23794598877429962,
0.33038240671157837,
0.11651982367038727,
-0.04669814556837082,
0.3443213403224945,
-0.12160798907279968,
-0.01021159440279007,
0.05064907670021057,
-0.11506733298301697
] |
https://github.com/huggingface/datasets/issues/6538 | > Hi ! Are you sure you have `datasets` 2.16 ? I just checked and on 2.16 I can run `from datasets.arrow_writer import SchemaInferenceError` without error
Yes, I am sure
```
!pip show datasets
Name: datasets
Version: 2.16.1
Summary: HuggingFace community-driven open-source library of datasets
Home-page: https://github.com/huggingface/datasets
Author: HuggingFace Inc.
Author-email: thomas@huggingface.co
License: Apache 2.0
Location: /opt/conda/lib/python3.10/site-packages
Requires: aiohttp, dill, filelock, fsspec, huggingface-hub, multiprocess, numpy, packaging, pandas, pyarrow, pyarrow-hotfix, pyyaml, requests, tqdm, xxhash
Required-by: trl
``` | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) | ### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0 | 76 | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0
> Hi ! Are you sure you have `datasets` 2.16 ? I just checked and on 2.16 I can run `from datasets.arrow_writer import SchemaInferenceError` without error
Yes, I am sure
```
!pip show datasets
Name: datasets
Version: 2.16.1
Summary: HuggingFace community-driven open-source library of datasets
Home-page: https://github.com/huggingface/datasets
Author: HuggingFace Inc.
Author-email: thomas@huggingface.co
License: Apache 2.0
Location: /opt/conda/lib/python3.10/site-packages
Requires: aiohttp, dill, filelock, fsspec, huggingface-hub, multiprocess, numpy, packaging, pandas, pyarrow, pyarrow-hotfix, pyyaml, requests, tqdm, xxhash
Required-by: trl
``` | [
-0.256902813911438,
-0.06662493944168091,
-0.05580161139369011,
0.6121095418930054,
0.2748967707157135,
0.06340034306049347,
0.24404215812683105,
0.24720130860805511,
-0.019955575466156006,
0.11987867951393127,
-0.13812042772769928,
0.38939008116722107,
-0.1408829241991043,
0.1007615476846695,
-0.32404372096061707,
-0.32616546750068665,
0.039162781089544296,
0.21027472615242004,
-0.25826671719551086,
-0.02511308342218399,
-0.13907425105571747,
0.1340944766998291,
-0.172745019197464,
0.24685204029083252,
-0.4250190258026123,
-0.26558586955070496,
0.2469814419746399,
0.030495258048176765,
-0.44358178973197937,
-0.39700847864151,
0.24750655889511108,
-0.2310401201248169,
0.37677842378616333,
0.6055502891540527,
-0.00011488998279673979,
0.1920846551656723,
0.3230991065502167,
-0.10012710094451904,
-0.18276391923427582,
-0.26851069927215576,
-0.1036250963807106,
0.03106759488582611,
0.21665579080581665,
-0.10153007507324219,
0.21615839004516602,
0.0005410797894001007,
-0.27494823932647705,
-0.2035241276025772,
0.25661763548851013,
0.526404619216919,
0.2563377916812897,
0.2645606994628906,
0.43410056829452515,
-0.1192169189453125,
-0.061466049402952194,
-0.0923306941986084,
-0.2444404661655426,
0.15163978934288025,
-0.12952443957328796,
0.04484943300485611,
0.005928002297878265,
0.3358690142631531,
-0.028897468000650406,
0.15836332738399506,
0.32255351543426514,
-0.16028258204460144,
0.11113902181386948,
-0.4410451352596283,
0.0145353302359581,
0.052129387855529785,
0.7370848655700684,
-0.3695690631866455,
-0.4370410442352295,
0.15414728224277496,
0.14453935623168945,
0.04207813739776611,
0.180410698056221,
0.10252576321363449,
-0.23504295945167542,
0.13352859020233154,
0.2321055829524994,
-0.11182139813899994,
-0.37119418382644653,
-0.15580841898918152,
-0.20775461196899414,
0.28189292550086975,
-0.07928560674190521,
0.05331495404243469,
0.08881202340126038,
-0.17495179176330566,
0.8017526268959045,
0.001824287697672844,
-0.24544386565685272,
0.19523701071739197,
-0.4660859704017639,
-0.11735111474990845,
-0.020867645740509033,
0.0144905811175704,
-0.321607768535614,
0.08730154484510422,
0.1457754224538803,
-0.08641445636749268,
0.09756240248680115,
0.2448480725288391,
0.08345026522874832,
0.09961158782243729,
0.10073757916688919,
0.5698217749595642,
0.07114965468645096,
-0.03231749311089516,
0.05505339801311493,
-0.09617455303668976,
-0.24876058101654053,
-0.40744882822036743,
-0.024745170027017593,
-0.18364641070365906,
0.246136873960495,
-0.1124357208609581,
-0.3068576753139496,
0.14300671219825745,
-0.1927705705165863,
-0.04361412301659584,
-0.021950362250208855,
0.40578997135162354,
-0.0212737824767828,
0.28545406460762024,
0.31094586849212646,
0.15615573525428772,
0.12214254587888718,
0.12312217801809311,
-0.20654675364494324,
0.33852919936180115,
-0.14966563880443573,
-0.12863649427890778,
-0.12041734158992767,
-0.06161477416753769,
0.2588486075401306,
-0.11313822865486145,
-0.08800972998142242,
-0.1768268346786499,
-0.014624115079641342,
-0.33047088980674744,
0.020192649215459824,
0.19396111369132996,
-0.0659535825252533,
0.04192115366458893,
0.24863044917583466,
-0.2537769675254822,
-0.1377231925725937,
-0.059625353664159775,
-0.3462243378162384,
-0.16181938350200653,
-0.4648602306842804,
0.196210116147995,
0.05868682265281677,
-0.1515142023563385,
-0.08748701214790344,
-0.45019403100013733,
0.18756400048732758,
0.05569201707839966,
-0.005037479102611542,
-0.19469645619392395,
0.10776174813508987,
-0.014502028003334999,
-0.03426451236009598,
0.3410903215408325,
-0.3945315480232239,
-0.0010110437870025635,
0.3809555768966675,
-0.1595524251461029,
-0.02658456563949585,
0.12249168008565903,
-0.09577785432338715,
0.39026060700416565,
-0.09571227431297302,
-0.15573160350322723,
0.567808210849762,
-0.5921734571456909,
-0.26608705520629883,
0.05019427090883255,
-0.04213886708021164,
-0.1447429656982422,
0.3695034384727478,
-0.06576819717884064,
-0.039474405348300934,
0.07813966274261475,
0.08266063779592514,
0.144344300031662,
0.025286955758929253,
0.036696262657642365,
-0.06944005191326141,
-0.1120612770318985,
0.07201431691646576,
0.14142988622188568,
0.14674213528633118,
0.03374359384179115,
0.0999671220779419,
0.06819626688957214,
0.32104992866516113,
-0.055073726922273636,
-0.04141709953546524,
0.6366989016532898,
0.1728818714618683,
0.2089121788740158,
0.046118222177028656,
-0.25871551036834717,
-0.09337187558412552,
0.09669534862041473,
-0.09548264741897583,
0.20620690286159515,
-0.5495560765266418,
0.039022721350193024,
-0.28502604365348816,
0.35468095541000366,
-0.3013054132461548,
-0.17267537117004395,
0.14956888556480408,
0.11204648017883301,
0.15216058492660522,
0.08011548221111298,
-0.052536491304636,
0.4499247670173645,
-0.268441379070282,
0.3102836608886719,
-0.393457293510437,
0.3476170003414154,
-0.3230850398540497,
-0.3127036988735199,
0.04742034524679184,
0.17949096858501434,
0.024485832080245018,
-0.04163544625043869,
-0.30319371819496155,
0.16406658291816711,
0.0453663095831871,
0.20532071590423584,
-0.31083378195762634,
-0.03053329885005951,
-0.0025202278047800064,
-0.27089670300483704,
0.02911042608320713,
-0.11259222775697708,
0.31119304895401,
0.10925492644309998,
0.05677122250199318,
-0.041405417025089264,
-0.08253021538257599,
0.3201824128627777,
0.1547757238149643,
0.22164899110794067,
0.2683151960372925,
0.04771827161312103,
0.1253909170627594,
-0.23968012630939484,
0.017539357766509056,
0.18916183710098267,
0.21758733689785004,
0.12453307956457138,
-0.02025003731250763,
-0.3259884715080261,
0.3841291666030884,
0.1633160412311554,
-0.023884344846010208,
-0.06235859915614128,
-0.2212226390838623,
0.2503383159637451,
0.3229474723339081,
0.3707652986049652,
0.35874050855636597,
0.09806711226701736,
-0.2662656605243683,
0.11245916038751602,
0.07017193734645844,
-0.0723481997847557,
0.2630462050437927,
0.1803167313337326,
0.37655019760131836,
0.25856801867485046,
0.01693122833967209,
0.12798240780830383,
-0.13936102390289307,
-0.4716644883155823,
-0.10985515266656876,
0.37011659145355225,
-0.29064542055130005,
-0.001737736165523529,
-0.12793463468551636,
-0.05703889578580856,
-0.3960559070110321,
-0.026670046150684357,
-0.15691319108009338,
-0.264887273311615,
-0.4273056983947754,
0.3287535309791565,
-0.05488137900829315,
0.29113078117370605,
-0.19480302929878235,
-0.24224235117435455,
0.19393393397331238,
-0.12218492478132248,
-0.1903228759765625,
-0.36165642738342285,
0.08080045878887177,
0.03458442538976669,
0.18995380401611328,
0.1496807038784027,
0.3307649493217468,
-0.107923224568367,
0.29579442739486694,
-0.3171854615211487,
-0.23514088988304138,
0.14393962919712067,
-0.0386446937918663,
-0.034761302173137665,
0.3126859962940216,
0.1878063678741455,
0.25660091638565063,
-0.5176385641098022,
0.09446390718221664,
-0.14445345103740692,
-0.189145028591156,
0.08693961799144745,
-0.052748166024684906,
-0.18511644005775452,
0.12090454995632172,
-0.2517589330673218,
-0.48113560676574707,
-0.5694224238395691,
0.13440638780593872,
0.24150867760181427,
0.08420412242412567,
0.26392337679862976,
0.1586868315935135,
0.31294816732406616,
0.08068373054265976,
0.4144498109817505,
0.23354190587997437,
-0.07358457148075104,
0.30034497380256653,
-0.15435391664505005,
-0.2662021815776825,
0.05075201392173767,
-0.09570382535457611,
0.4410252571105957,
-0.027559194713830948,
-0.35064196586608887,
-0.13104456663131714,
-0.24551378190517426,
0.16854546964168549,
-0.1461605727672577,
0.2192200869321823,
0.37877804040908813,
0.414222776889801,
0.004855979233980179,
-0.10502402484416962,
0.09298646450042725,
-0.03882167488336563,
-0.27470752596855164,
-0.06299746781587601,
-0.016450056806206703,
0.4377359449863434,
-0.19663459062576294,
0.2570459842681885,
0.23741205036640167,
-0.16500329971313477,
0.23736384510993958,
0.08955816179513931,
0.28659358620643616,
-0.16709105670452118,
-0.27347826957702637,
-0.17229416966438293,
-0.180995911359787,
0.10606499016284943,
-0.047507673501968384,
-0.24346637725830078,
-0.01947050914168358,
-0.12351600080728531,
-0.06241896376013756,
-0.04349275678396225,
-0.027372416108846664,
-0.07372915744781494,
-0.42088621854782104,
0.23319081962108612,
-0.08653128147125244,
-0.06325040012598038,
-0.17037665843963623,
0.036015868186950684,
0.18266384303569794,
0.04490106925368309,
-0.1402004361152649,
-0.07022362947463989,
-0.2805652320384979,
-0.027860542759299278,
-0.29643091559410095,
0.09792312979698181,
0.13958683609962463,
0.3668658137321472,
0.11172240972518921,
-0.05322970822453499,
0.06627233326435089,
0.006396360695362091,
0.2152082473039627,
-0.18715506792068481,
-0.23747441172599792,
0.14924632012844086,
-0.068037249147892,
-0.44537559151649475,
-0.03558829426765442,
-0.1686117947101593,
0.0898018404841423,
0.15014395117759705,
0.1917921006679535,
-0.06652428209781647,
-0.17009872198104858,
0.4521212577819824,
0.06473669409751892,
-0.11619039624929428,
-0.030791480094194412,
-0.15608495473861694,
-0.3060137629508972,
-0.3745065927505493,
-0.07876864075660706,
0.2592592239379883,
0.46490445733070374,
0.2863294184207916,
0.19665184617042542,
-0.2955895662307739,
-0.12551334500312805,
-0.048651427030563354,
0.02841978147625923,
0.1900259554386139,
-0.046729035675525665,
0.09548941254615784,
0.08056318014860153,
0.3972302973270416,
0.5442346930503845,
0.6393277645111084,
-0.3564460575580597,
-0.5447501540184021,
-0.05768277868628502,
-0.1703615039587021,
0.3061317503452301,
0.04232814535498619,
-0.09967024624347687,
0.19207651913166046,
-0.4968562126159668,
0.014718657359480858,
-0.08922390639781952,
-0.04809786006808281,
0.06301027536392212,
0.1677154004573822,
-0.18332231044769287,
-0.24146577715873718,
0.36401161551475525,
0.25125014781951904,
0.05983549356460571,
0.4667035639286041,
0.23924025893211365,
-0.38408684730529785,
0.4785679280757904,
0.1116812527179718,
0.7710726857185364,
0.2474597692489624,
0.10733545571565628,
0.2562350630760193,
-0.4400929808616638,
0.27828890085220337,
-0.009791374206542969,
-0.013260417617857456,
-0.4400268495082855,
-0.233763188123703,
-0.01054733619093895,
-0.23394107818603516,
0.3223817050457001,
-0.13457442820072174,
-0.1893027424812317,
0.057696398347616196,
-0.23671028017997742,
-0.11946331709623337,
0.12738797068595886,
0.15037280321121216,
-0.09924160689115524,
-0.18415561318397522,
-0.15610376000404358,
0.0969632938504219,
0.16927587985992432,
0.1097305566072464,
-0.11566148698329926,
-0.039514943957328796,
-0.1755986213684082,
-0.32159623503685,
-0.21222439408302307,
0.19046536087989807,
-0.3982684314250946,
0.4196784496307373,
0.15749415755271912,
-0.20017899572849274,
0.23643603920936584,
0.45393550395965576,
0.18932729959487915,
-0.10550291836261749,
-0.11277548223733902,
0.14423617720603943,
0.11200116574764252,
-0.16209116578102112,
0.07247572392225266,
0.2463332712650299,
0.3890644907951355,
-0.07430321723222733,
0.03419813513755798,
0.38855165243148804,
-0.18327166140079498,
-0.4002794027328491,
0.1420225203037262,
0.06763996928930283,
0.043245892971754074,
-0.23007208108901978,
-0.20149093866348267,
-0.17483940720558167,
-0.05476310849189758,
-0.17514777183532715,
0.147023543715477,
0.03132973611354828,
-0.3554784655570984,
0.1370883584022522,
-0.17109976708889008,
-0.3439685106277466,
0.01698918268084526,
0.38314497470855713,
0.1898702085018158,
0.04016689211130142,
0.6141799688339233,
0.07355962693691254,
-0.25458812713623047,
-0.21388505399227142,
0.1335947960615158,
0.19124937057495117,
-0.62235027551651,
0.1904217004776001,
-0.021416522562503815,
-0.2732062041759491,
-0.029417753219604492,
0.3728379011154175,
0.24950259923934937,
0.07783541083335876,
-0.17882214486598969,
-0.24607907235622406,
-0.428485631942749,
0.11749082803726196,
0.04444221034646034,
0.2214086949825287,
-0.37719854712486267,
0.2194172739982605,
-0.17110860347747803,
0.103178009390831,
-0.2955057919025421,
-0.026355629786849022,
-0.5316578149795532,
0.14548428356647491,
0.2224799394607544,
-0.015324385836720467,
-0.1502855271100998,
-0.02151089906692505,
0.14002758264541626,
0.2930784523487091,
-0.09902186691761017,
-0.1772584617137909,
-0.1596524566411972,
0.09779373556375504,
0.19002340734004974,
-0.1416580080986023,
0.00005961954593658447,
-0.01402941346168518,
-0.07470054924488068,
-0.019229821860790253,
-0.08337271213531494,
0.26569053530693054,
-0.0025573670864105225,
0.16257129609584808,
0.1595553457736969,
-0.033375516533851624,
-0.26804155111312866,
0.24136541783809662,
-0.1609545648097992,
0.2795288860797882,
-0.20764602720737457,
0.2113102674484253,
-0.09595108777284622,
0.09591668844223022,
-0.05292639881372452,
0.09137202799320221,
-0.17035174369812012,
-0.05258016288280487,
0.29036810994148254,
-0.34288138151168823,
-0.015550516545772552,
0.18389125168323517,
0.22407057881355286,
0.22856120765209198,
-0.3436901271343231,
0.012690983712673187,
0.14790883660316467,
0.23818010091781616,
-0.28956544399261475,
-0.16199693083763123,
-0.11132695525884628,
-0.2829515039920807,
0.039406076073646545,
0.15308913588523865,
-0.06062738597393036,
-0.12041755020618439,
0.2808241844177246,
0.26463666558265686,
0.20148871839046478,
-0.11933860182762146,
0.401050865650177,
0.3233991861343384,
-0.13719576597213745,
-0.04563349485397339,
0.5149922370910645,
0.24320140480995178,
0.2674027383327484,
0.3243061304092407,
-0.1201210469007492,
0.19134610891342163,
-0.3938050866127014,
-0.0865255668759346,
0.13271696865558624,
-0.15006910264492035,
0.07412679493427277,
-0.3074265122413635,
-0.01670687273144722,
-0.19194567203521729,
-0.12525498867034912,
-0.05134852975606918,
-0.052303194999694824,
-0.06941889971494675,
0.00046334415674209595,
0.07868194580078125,
-0.2117467075586319,
-0.026525575667619705,
0.027291610836982727,
-0.14084982872009277,
-0.10010220855474472,
-0.0014868825674057007,
0.15193066000938416,
-0.03160551190376282,
0.14198365807533264,
0.07675089687108994,
-0.25749874114990234,
-0.26734089851379395,
0.03476652875542641,
0.165971577167511,
0.03169573098421097,
-0.40021413564682007,
0.1568090170621872,
-0.03142855688929558,
-0.04700645059347153,
-0.2851216495037079,
0.43323761224746704,
0.5774037837982178,
0.4171214997768402,
0.10439202189445496,
-0.04928453639149666,
-0.07951289415359497,
-0.1513766497373581,
0.1302853524684906,
0.3273222744464874,
-0.07780224084854126,
0.22529923915863037,
0.3888447880744934,
0.15440931916236877,
-0.24088755249977112,
-0.07401212304830551,
0.07731480896472931,
0.22244518995285034,
-0.26429280638694763,
0.5152069330215454,
-0.02425434999167919,
-0.33644479513168335,
0.01254897192120552,
0.1521034836769104,
-0.4033680260181427,
0.19476701319217682,
0.4406997561454773,
-0.18382270634174347,
0.018053457140922546,
-0.33213943243026733,
0.06533817946910858,
0.03727605193853378,
0.6124904751777649,
0.48521313071250916,
0.33517056703567505,
-0.15982908010482788,
-0.16731733083724976,
-0.3128805160522461,
0.18699117004871368,
-0.11246559023857117,
0.03628339618444443,
0.013686876744031906,
0.06751812994480133,
0.04187149927020073,
0.15657424926757812,
0.18706804513931274,
0.2210918366909027,
-0.2763952314853668,
0.02608480118215084,
-0.38806039094924927,
-0.2455812245607376,
0.10810841619968414,
-0.03884698078036308,
0.08636362105607986,
-0.5342223644256592,
0.09064959734678268,
-0.0824476107954979,
0.16404196619987488,
-0.28465989232063293,
-0.0542563758790493,
0.20082250237464905,
-0.1979013979434967,
0.45428916811943054,
-0.05478053539991379,
0.4595044255256653,
0.020230047404766083,
-0.1561621129512787,
-0.13956424593925476,
-0.5568035840988159,
-0.28128939867019653,
0.1751372516155243,
0.32846924662590027,
0.4226182997226715,
-0.18614041805267334,
-0.38109081983566284,
-0.3425794243812561,
0.13387203216552734,
-0.20194575190544128,
0.10682004690170288,
-0.16240717470645905,
0.17728838324546814,
-0.04089207947254181,
0.11511212587356567,
0.19150277972221375,
-0.09540397673845291,
-0.02851509302854538,
0.19460955262184143,
-0.2638320326805115,
-0.3892172873020172,
0.41564828157424927,
-0.18457314372062683,
-0.3162107765674591,
0.15280799567699432,
0.1361370086669922,
-0.0953700989484787,
-0.08400661498308182,
-0.5766762495040894,
0.23468558490276337,
0.32386383414268494,
-0.09576019644737244,
-0.12282361835241318,
0.23794598877429962,
0.33038240671157837,
0.11651982367038727,
-0.04669814556837082,
0.3443213403224945,
-0.12160798907279968,
-0.01021159440279007,
0.05064907670021057,
-0.11506733298301697
] |
https://github.com/huggingface/datasets/issues/6538 | > I have the same issue - using with datasets version 2.16.1. Also this is on a kaggle notebook - other people with the same issue also seem to be having it on kaggle?
Don't know about other people. But I am having this issue whose solution I can't find anywhere. And this issue still persists. | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) | ### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0 | 56 | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0
> I have the same issue - using with datasets version 2.16.1. Also this is on a kaggle notebook - other people with the same issue also seem to be having it on kaggle?
Don't know about other people. But I am having this issue whose solution I can't find anywhere. And this issue still persists. | [
-0.256902813911438,
-0.06662493944168091,
-0.05580161139369011,
0.6121095418930054,
0.2748967707157135,
0.06340034306049347,
0.24404215812683105,
0.24720130860805511,
-0.019955575466156006,
0.11987867951393127,
-0.13812042772769928,
0.38939008116722107,
-0.1408829241991043,
0.1007615476846695,
-0.32404372096061707,
-0.32616546750068665,
0.039162781089544296,
0.21027472615242004,
-0.25826671719551086,
-0.02511308342218399,
-0.13907425105571747,
0.1340944766998291,
-0.172745019197464,
0.24685204029083252,
-0.4250190258026123,
-0.26558586955070496,
0.2469814419746399,
0.030495258048176765,
-0.44358178973197937,
-0.39700847864151,
0.24750655889511108,
-0.2310401201248169,
0.37677842378616333,
0.6055502891540527,
-0.00011488998279673979,
0.1920846551656723,
0.3230991065502167,
-0.10012710094451904,
-0.18276391923427582,
-0.26851069927215576,
-0.1036250963807106,
0.03106759488582611,
0.21665579080581665,
-0.10153007507324219,
0.21615839004516602,
0.0005410797894001007,
-0.27494823932647705,
-0.2035241276025772,
0.25661763548851013,
0.526404619216919,
0.2563377916812897,
0.2645606994628906,
0.43410056829452515,
-0.1192169189453125,
-0.061466049402952194,
-0.0923306941986084,
-0.2444404661655426,
0.15163978934288025,
-0.12952443957328796,
0.04484943300485611,
0.005928002297878265,
0.3358690142631531,
-0.028897468000650406,
0.15836332738399506,
0.32255351543426514,
-0.16028258204460144,
0.11113902181386948,
-0.4410451352596283,
0.0145353302359581,
0.052129387855529785,
0.7370848655700684,
-0.3695690631866455,
-0.4370410442352295,
0.15414728224277496,
0.14453935623168945,
0.04207813739776611,
0.180410698056221,
0.10252576321363449,
-0.23504295945167542,
0.13352859020233154,
0.2321055829524994,
-0.11182139813899994,
-0.37119418382644653,
-0.15580841898918152,
-0.20775461196899414,
0.28189292550086975,
-0.07928560674190521,
0.05331495404243469,
0.08881202340126038,
-0.17495179176330566,
0.8017526268959045,
0.001824287697672844,
-0.24544386565685272,
0.19523701071739197,
-0.4660859704017639,
-0.11735111474990845,
-0.020867645740509033,
0.0144905811175704,
-0.321607768535614,
0.08730154484510422,
0.1457754224538803,
-0.08641445636749268,
0.09756240248680115,
0.2448480725288391,
0.08345026522874832,
0.09961158782243729,
0.10073757916688919,
0.5698217749595642,
0.07114965468645096,
-0.03231749311089516,
0.05505339801311493,
-0.09617455303668976,
-0.24876058101654053,
-0.40744882822036743,
-0.024745170027017593,
-0.18364641070365906,
0.246136873960495,
-0.1124357208609581,
-0.3068576753139496,
0.14300671219825745,
-0.1927705705165863,
-0.04361412301659584,
-0.021950362250208855,
0.40578997135162354,
-0.0212737824767828,
0.28545406460762024,
0.31094586849212646,
0.15615573525428772,
0.12214254587888718,
0.12312217801809311,
-0.20654675364494324,
0.33852919936180115,
-0.14966563880443573,
-0.12863649427890778,
-0.12041734158992767,
-0.06161477416753769,
0.2588486075401306,
-0.11313822865486145,
-0.08800972998142242,
-0.1768268346786499,
-0.014624115079641342,
-0.33047088980674744,
0.020192649215459824,
0.19396111369132996,
-0.0659535825252533,
0.04192115366458893,
0.24863044917583466,
-0.2537769675254822,
-0.1377231925725937,
-0.059625353664159775,
-0.3462243378162384,
-0.16181938350200653,
-0.4648602306842804,
0.196210116147995,
0.05868682265281677,
-0.1515142023563385,
-0.08748701214790344,
-0.45019403100013733,
0.18756400048732758,
0.05569201707839966,
-0.005037479102611542,
-0.19469645619392395,
0.10776174813508987,
-0.014502028003334999,
-0.03426451236009598,
0.3410903215408325,
-0.3945315480232239,
-0.0010110437870025635,
0.3809555768966675,
-0.1595524251461029,
-0.02658456563949585,
0.12249168008565903,
-0.09577785432338715,
0.39026060700416565,
-0.09571227431297302,
-0.15573160350322723,
0.567808210849762,
-0.5921734571456909,
-0.26608705520629883,
0.05019427090883255,
-0.04213886708021164,
-0.1447429656982422,
0.3695034384727478,
-0.06576819717884064,
-0.039474405348300934,
0.07813966274261475,
0.08266063779592514,
0.144344300031662,
0.025286955758929253,
0.036696262657642365,
-0.06944005191326141,
-0.1120612770318985,
0.07201431691646576,
0.14142988622188568,
0.14674213528633118,
0.03374359384179115,
0.0999671220779419,
0.06819626688957214,
0.32104992866516113,
-0.055073726922273636,
-0.04141709953546524,
0.6366989016532898,
0.1728818714618683,
0.2089121788740158,
0.046118222177028656,
-0.25871551036834717,
-0.09337187558412552,
0.09669534862041473,
-0.09548264741897583,
0.20620690286159515,
-0.5495560765266418,
0.039022721350193024,
-0.28502604365348816,
0.35468095541000366,
-0.3013054132461548,
-0.17267537117004395,
0.14956888556480408,
0.11204648017883301,
0.15216058492660522,
0.08011548221111298,
-0.052536491304636,
0.4499247670173645,
-0.268441379070282,
0.3102836608886719,
-0.393457293510437,
0.3476170003414154,
-0.3230850398540497,
-0.3127036988735199,
0.04742034524679184,
0.17949096858501434,
0.024485832080245018,
-0.04163544625043869,
-0.30319371819496155,
0.16406658291816711,
0.0453663095831871,
0.20532071590423584,
-0.31083378195762634,
-0.03053329885005951,
-0.0025202278047800064,
-0.27089670300483704,
0.02911042608320713,
-0.11259222775697708,
0.31119304895401,
0.10925492644309998,
0.05677122250199318,
-0.041405417025089264,
-0.08253021538257599,
0.3201824128627777,
0.1547757238149643,
0.22164899110794067,
0.2683151960372925,
0.04771827161312103,
0.1253909170627594,
-0.23968012630939484,
0.017539357766509056,
0.18916183710098267,
0.21758733689785004,
0.12453307956457138,
-0.02025003731250763,
-0.3259884715080261,
0.3841291666030884,
0.1633160412311554,
-0.023884344846010208,
-0.06235859915614128,
-0.2212226390838623,
0.2503383159637451,
0.3229474723339081,
0.3707652986049652,
0.35874050855636597,
0.09806711226701736,
-0.2662656605243683,
0.11245916038751602,
0.07017193734645844,
-0.0723481997847557,
0.2630462050437927,
0.1803167313337326,
0.37655019760131836,
0.25856801867485046,
0.01693122833967209,
0.12798240780830383,
-0.13936102390289307,
-0.4716644883155823,
-0.10985515266656876,
0.37011659145355225,
-0.29064542055130005,
-0.001737736165523529,
-0.12793463468551636,
-0.05703889578580856,
-0.3960559070110321,
-0.026670046150684357,
-0.15691319108009338,
-0.264887273311615,
-0.4273056983947754,
0.3287535309791565,
-0.05488137900829315,
0.29113078117370605,
-0.19480302929878235,
-0.24224235117435455,
0.19393393397331238,
-0.12218492478132248,
-0.1903228759765625,
-0.36165642738342285,
0.08080045878887177,
0.03458442538976669,
0.18995380401611328,
0.1496807038784027,
0.3307649493217468,
-0.107923224568367,
0.29579442739486694,
-0.3171854615211487,
-0.23514088988304138,
0.14393962919712067,
-0.0386446937918663,
-0.034761302173137665,
0.3126859962940216,
0.1878063678741455,
0.25660091638565063,
-0.5176385641098022,
0.09446390718221664,
-0.14445345103740692,
-0.189145028591156,
0.08693961799144745,
-0.052748166024684906,
-0.18511644005775452,
0.12090454995632172,
-0.2517589330673218,
-0.48113560676574707,
-0.5694224238395691,
0.13440638780593872,
0.24150867760181427,
0.08420412242412567,
0.26392337679862976,
0.1586868315935135,
0.31294816732406616,
0.08068373054265976,
0.4144498109817505,
0.23354190587997437,
-0.07358457148075104,
0.30034497380256653,
-0.15435391664505005,
-0.2662021815776825,
0.05075201392173767,
-0.09570382535457611,
0.4410252571105957,
-0.027559194713830948,
-0.35064196586608887,
-0.13104456663131714,
-0.24551378190517426,
0.16854546964168549,
-0.1461605727672577,
0.2192200869321823,
0.37877804040908813,
0.414222776889801,
0.004855979233980179,
-0.10502402484416962,
0.09298646450042725,
-0.03882167488336563,
-0.27470752596855164,
-0.06299746781587601,
-0.016450056806206703,
0.4377359449863434,
-0.19663459062576294,
0.2570459842681885,
0.23741205036640167,
-0.16500329971313477,
0.23736384510993958,
0.08955816179513931,
0.28659358620643616,
-0.16709105670452118,
-0.27347826957702637,
-0.17229416966438293,
-0.180995911359787,
0.10606499016284943,
-0.047507673501968384,
-0.24346637725830078,
-0.01947050914168358,
-0.12351600080728531,
-0.06241896376013756,
-0.04349275678396225,
-0.027372416108846664,
-0.07372915744781494,
-0.42088621854782104,
0.23319081962108612,
-0.08653128147125244,
-0.06325040012598038,
-0.17037665843963623,
0.036015868186950684,
0.18266384303569794,
0.04490106925368309,
-0.1402004361152649,
-0.07022362947463989,
-0.2805652320384979,
-0.027860542759299278,
-0.29643091559410095,
0.09792312979698181,
0.13958683609962463,
0.3668658137321472,
0.11172240972518921,
-0.05322970822453499,
0.06627233326435089,
0.006396360695362091,
0.2152082473039627,
-0.18715506792068481,
-0.23747441172599792,
0.14924632012844086,
-0.068037249147892,
-0.44537559151649475,
-0.03558829426765442,
-0.1686117947101593,
0.0898018404841423,
0.15014395117759705,
0.1917921006679535,
-0.06652428209781647,
-0.17009872198104858,
0.4521212577819824,
0.06473669409751892,
-0.11619039624929428,
-0.030791480094194412,
-0.15608495473861694,
-0.3060137629508972,
-0.3745065927505493,
-0.07876864075660706,
0.2592592239379883,
0.46490445733070374,
0.2863294184207916,
0.19665184617042542,
-0.2955895662307739,
-0.12551334500312805,
-0.048651427030563354,
0.02841978147625923,
0.1900259554386139,
-0.046729035675525665,
0.09548941254615784,
0.08056318014860153,
0.3972302973270416,
0.5442346930503845,
0.6393277645111084,
-0.3564460575580597,
-0.5447501540184021,
-0.05768277868628502,
-0.1703615039587021,
0.3061317503452301,
0.04232814535498619,
-0.09967024624347687,
0.19207651913166046,
-0.4968562126159668,
0.014718657359480858,
-0.08922390639781952,
-0.04809786006808281,
0.06301027536392212,
0.1677154004573822,
-0.18332231044769287,
-0.24146577715873718,
0.36401161551475525,
0.25125014781951904,
0.05983549356460571,
0.4667035639286041,
0.23924025893211365,
-0.38408684730529785,
0.4785679280757904,
0.1116812527179718,
0.7710726857185364,
0.2474597692489624,
0.10733545571565628,
0.2562350630760193,
-0.4400929808616638,
0.27828890085220337,
-0.009791374206542969,
-0.013260417617857456,
-0.4400268495082855,
-0.233763188123703,
-0.01054733619093895,
-0.23394107818603516,
0.3223817050457001,
-0.13457442820072174,
-0.1893027424812317,
0.057696398347616196,
-0.23671028017997742,
-0.11946331709623337,
0.12738797068595886,
0.15037280321121216,
-0.09924160689115524,
-0.18415561318397522,
-0.15610376000404358,
0.0969632938504219,
0.16927587985992432,
0.1097305566072464,
-0.11566148698329926,
-0.039514943957328796,
-0.1755986213684082,
-0.32159623503685,
-0.21222439408302307,
0.19046536087989807,
-0.3982684314250946,
0.4196784496307373,
0.15749415755271912,
-0.20017899572849274,
0.23643603920936584,
0.45393550395965576,
0.18932729959487915,
-0.10550291836261749,
-0.11277548223733902,
0.14423617720603943,
0.11200116574764252,
-0.16209116578102112,
0.07247572392225266,
0.2463332712650299,
0.3890644907951355,
-0.07430321723222733,
0.03419813513755798,
0.38855165243148804,
-0.18327166140079498,
-0.4002794027328491,
0.1420225203037262,
0.06763996928930283,
0.043245892971754074,
-0.23007208108901978,
-0.20149093866348267,
-0.17483940720558167,
-0.05476310849189758,
-0.17514777183532715,
0.147023543715477,
0.03132973611354828,
-0.3554784655570984,
0.1370883584022522,
-0.17109976708889008,
-0.3439685106277466,
0.01698918268084526,
0.38314497470855713,
0.1898702085018158,
0.04016689211130142,
0.6141799688339233,
0.07355962693691254,
-0.25458812713623047,
-0.21388505399227142,
0.1335947960615158,
0.19124937057495117,
-0.62235027551651,
0.1904217004776001,
-0.021416522562503815,
-0.2732062041759491,
-0.029417753219604492,
0.3728379011154175,
0.24950259923934937,
0.07783541083335876,
-0.17882214486598969,
-0.24607907235622406,
-0.428485631942749,
0.11749082803726196,
0.04444221034646034,
0.2214086949825287,
-0.37719854712486267,
0.2194172739982605,
-0.17110860347747803,
0.103178009390831,
-0.2955057919025421,
-0.026355629786849022,
-0.5316578149795532,
0.14548428356647491,
0.2224799394607544,
-0.015324385836720467,
-0.1502855271100998,
-0.02151089906692505,
0.14002758264541626,
0.2930784523487091,
-0.09902186691761017,
-0.1772584617137909,
-0.1596524566411972,
0.09779373556375504,
0.19002340734004974,
-0.1416580080986023,
0.00005961954593658447,
-0.01402941346168518,
-0.07470054924488068,
-0.019229821860790253,
-0.08337271213531494,
0.26569053530693054,
-0.0025573670864105225,
0.16257129609584808,
0.1595553457736969,
-0.033375516533851624,
-0.26804155111312866,
0.24136541783809662,
-0.1609545648097992,
0.2795288860797882,
-0.20764602720737457,
0.2113102674484253,
-0.09595108777284622,
0.09591668844223022,
-0.05292639881372452,
0.09137202799320221,
-0.17035174369812012,
-0.05258016288280487,
0.29036810994148254,
-0.34288138151168823,
-0.015550516545772552,
0.18389125168323517,
0.22407057881355286,
0.22856120765209198,
-0.3436901271343231,
0.012690983712673187,
0.14790883660316467,
0.23818010091781616,
-0.28956544399261475,
-0.16199693083763123,
-0.11132695525884628,
-0.2829515039920807,
0.039406076073646545,
0.15308913588523865,
-0.06062738597393036,
-0.12041755020618439,
0.2808241844177246,
0.26463666558265686,
0.20148871839046478,
-0.11933860182762146,
0.401050865650177,
0.3233991861343384,
-0.13719576597213745,
-0.04563349485397339,
0.5149922370910645,
0.24320140480995178,
0.2674027383327484,
0.3243061304092407,
-0.1201210469007492,
0.19134610891342163,
-0.3938050866127014,
-0.0865255668759346,
0.13271696865558624,
-0.15006910264492035,
0.07412679493427277,
-0.3074265122413635,
-0.01670687273144722,
-0.19194567203521729,
-0.12525498867034912,
-0.05134852975606918,
-0.052303194999694824,
-0.06941889971494675,
0.00046334415674209595,
0.07868194580078125,
-0.2117467075586319,
-0.026525575667619705,
0.027291610836982727,
-0.14084982872009277,
-0.10010220855474472,
-0.0014868825674057007,
0.15193066000938416,
-0.03160551190376282,
0.14198365807533264,
0.07675089687108994,
-0.25749874114990234,
-0.26734089851379395,
0.03476652875542641,
0.165971577167511,
0.03169573098421097,
-0.40021413564682007,
0.1568090170621872,
-0.03142855688929558,
-0.04700645059347153,
-0.2851216495037079,
0.43323761224746704,
0.5774037837982178,
0.4171214997768402,
0.10439202189445496,
-0.04928453639149666,
-0.07951289415359497,
-0.1513766497373581,
0.1302853524684906,
0.3273222744464874,
-0.07780224084854126,
0.22529923915863037,
0.3888447880744934,
0.15440931916236877,
-0.24088755249977112,
-0.07401212304830551,
0.07731480896472931,
0.22244518995285034,
-0.26429280638694763,
0.5152069330215454,
-0.02425434999167919,
-0.33644479513168335,
0.01254897192120552,
0.1521034836769104,
-0.4033680260181427,
0.19476701319217682,
0.4406997561454773,
-0.18382270634174347,
0.018053457140922546,
-0.33213943243026733,
0.06533817946910858,
0.03727605193853378,
0.6124904751777649,
0.48521313071250916,
0.33517056703567505,
-0.15982908010482788,
-0.16731733083724976,
-0.3128805160522461,
0.18699117004871368,
-0.11246559023857117,
0.03628339618444443,
0.013686876744031906,
0.06751812994480133,
0.04187149927020073,
0.15657424926757812,
0.18706804513931274,
0.2210918366909027,
-0.2763952314853668,
0.02608480118215084,
-0.38806039094924927,
-0.2455812245607376,
0.10810841619968414,
-0.03884698078036308,
0.08636362105607986,
-0.5342223644256592,
0.09064959734678268,
-0.0824476107954979,
0.16404196619987488,
-0.28465989232063293,
-0.0542563758790493,
0.20082250237464905,
-0.1979013979434967,
0.45428916811943054,
-0.05478053539991379,
0.4595044255256653,
0.020230047404766083,
-0.1561621129512787,
-0.13956424593925476,
-0.5568035840988159,
-0.28128939867019653,
0.1751372516155243,
0.32846924662590027,
0.4226182997226715,
-0.18614041805267334,
-0.38109081983566284,
-0.3425794243812561,
0.13387203216552734,
-0.20194575190544128,
0.10682004690170288,
-0.16240717470645905,
0.17728838324546814,
-0.04089207947254181,
0.11511212587356567,
0.19150277972221375,
-0.09540397673845291,
-0.02851509302854538,
0.19460955262184143,
-0.2638320326805115,
-0.3892172873020172,
0.41564828157424927,
-0.18457314372062683,
-0.3162107765674591,
0.15280799567699432,
0.1361370086669922,
-0.0953700989484787,
-0.08400661498308182,
-0.5766762495040894,
0.23468558490276337,
0.32386383414268494,
-0.09576019644737244,
-0.12282361835241318,
0.23794598877429962,
0.33038240671157837,
0.11651982367038727,
-0.04669814556837082,
0.3443213403224945,
-0.12160798907279968,
-0.01021159440279007,
0.05064907670021057,
-0.11506733298301697
] |
https://github.com/huggingface/datasets/issues/6538 | > I have the same issue now and didn't have this problem around 2 weeks ago.
Same here | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) | ### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0 | 18 | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0
> I have the same issue now and didn't have this problem around 2 weeks ago.
Same here | [
-0.256902813911438,
-0.06662493944168091,
-0.05580161139369011,
0.6121095418930054,
0.2748967707157135,
0.06340034306049347,
0.24404215812683105,
0.24720130860805511,
-0.019955575466156006,
0.11987867951393127,
-0.13812042772769928,
0.38939008116722107,
-0.1408829241991043,
0.1007615476846695,
-0.32404372096061707,
-0.32616546750068665,
0.039162781089544296,
0.21027472615242004,
-0.25826671719551086,
-0.02511308342218399,
-0.13907425105571747,
0.1340944766998291,
-0.172745019197464,
0.24685204029083252,
-0.4250190258026123,
-0.26558586955070496,
0.2469814419746399,
0.030495258048176765,
-0.44358178973197937,
-0.39700847864151,
0.24750655889511108,
-0.2310401201248169,
0.37677842378616333,
0.6055502891540527,
-0.00011488998279673979,
0.1920846551656723,
0.3230991065502167,
-0.10012710094451904,
-0.18276391923427582,
-0.26851069927215576,
-0.1036250963807106,
0.03106759488582611,
0.21665579080581665,
-0.10153007507324219,
0.21615839004516602,
0.0005410797894001007,
-0.27494823932647705,
-0.2035241276025772,
0.25661763548851013,
0.526404619216919,
0.2563377916812897,
0.2645606994628906,
0.43410056829452515,
-0.1192169189453125,
-0.061466049402952194,
-0.0923306941986084,
-0.2444404661655426,
0.15163978934288025,
-0.12952443957328796,
0.04484943300485611,
0.005928002297878265,
0.3358690142631531,
-0.028897468000650406,
0.15836332738399506,
0.32255351543426514,
-0.16028258204460144,
0.11113902181386948,
-0.4410451352596283,
0.0145353302359581,
0.052129387855529785,
0.7370848655700684,
-0.3695690631866455,
-0.4370410442352295,
0.15414728224277496,
0.14453935623168945,
0.04207813739776611,
0.180410698056221,
0.10252576321363449,
-0.23504295945167542,
0.13352859020233154,
0.2321055829524994,
-0.11182139813899994,
-0.37119418382644653,
-0.15580841898918152,
-0.20775461196899414,
0.28189292550086975,
-0.07928560674190521,
0.05331495404243469,
0.08881202340126038,
-0.17495179176330566,
0.8017526268959045,
0.001824287697672844,
-0.24544386565685272,
0.19523701071739197,
-0.4660859704017639,
-0.11735111474990845,
-0.020867645740509033,
0.0144905811175704,
-0.321607768535614,
0.08730154484510422,
0.1457754224538803,
-0.08641445636749268,
0.09756240248680115,
0.2448480725288391,
0.08345026522874832,
0.09961158782243729,
0.10073757916688919,
0.5698217749595642,
0.07114965468645096,
-0.03231749311089516,
0.05505339801311493,
-0.09617455303668976,
-0.24876058101654053,
-0.40744882822036743,
-0.024745170027017593,
-0.18364641070365906,
0.246136873960495,
-0.1124357208609581,
-0.3068576753139496,
0.14300671219825745,
-0.1927705705165863,
-0.04361412301659584,
-0.021950362250208855,
0.40578997135162354,
-0.0212737824767828,
0.28545406460762024,
0.31094586849212646,
0.15615573525428772,
0.12214254587888718,
0.12312217801809311,
-0.20654675364494324,
0.33852919936180115,
-0.14966563880443573,
-0.12863649427890778,
-0.12041734158992767,
-0.06161477416753769,
0.2588486075401306,
-0.11313822865486145,
-0.08800972998142242,
-0.1768268346786499,
-0.014624115079641342,
-0.33047088980674744,
0.020192649215459824,
0.19396111369132996,
-0.0659535825252533,
0.04192115366458893,
0.24863044917583466,
-0.2537769675254822,
-0.1377231925725937,
-0.059625353664159775,
-0.3462243378162384,
-0.16181938350200653,
-0.4648602306842804,
0.196210116147995,
0.05868682265281677,
-0.1515142023563385,
-0.08748701214790344,
-0.45019403100013733,
0.18756400048732758,
0.05569201707839966,
-0.005037479102611542,
-0.19469645619392395,
0.10776174813508987,
-0.014502028003334999,
-0.03426451236009598,
0.3410903215408325,
-0.3945315480232239,
-0.0010110437870025635,
0.3809555768966675,
-0.1595524251461029,
-0.02658456563949585,
0.12249168008565903,
-0.09577785432338715,
0.39026060700416565,
-0.09571227431297302,
-0.15573160350322723,
0.567808210849762,
-0.5921734571456909,
-0.26608705520629883,
0.05019427090883255,
-0.04213886708021164,
-0.1447429656982422,
0.3695034384727478,
-0.06576819717884064,
-0.039474405348300934,
0.07813966274261475,
0.08266063779592514,
0.144344300031662,
0.025286955758929253,
0.036696262657642365,
-0.06944005191326141,
-0.1120612770318985,
0.07201431691646576,
0.14142988622188568,
0.14674213528633118,
0.03374359384179115,
0.0999671220779419,
0.06819626688957214,
0.32104992866516113,
-0.055073726922273636,
-0.04141709953546524,
0.6366989016532898,
0.1728818714618683,
0.2089121788740158,
0.046118222177028656,
-0.25871551036834717,
-0.09337187558412552,
0.09669534862041473,
-0.09548264741897583,
0.20620690286159515,
-0.5495560765266418,
0.039022721350193024,
-0.28502604365348816,
0.35468095541000366,
-0.3013054132461548,
-0.17267537117004395,
0.14956888556480408,
0.11204648017883301,
0.15216058492660522,
0.08011548221111298,
-0.052536491304636,
0.4499247670173645,
-0.268441379070282,
0.3102836608886719,
-0.393457293510437,
0.3476170003414154,
-0.3230850398540497,
-0.3127036988735199,
0.04742034524679184,
0.17949096858501434,
0.024485832080245018,
-0.04163544625043869,
-0.30319371819496155,
0.16406658291816711,
0.0453663095831871,
0.20532071590423584,
-0.31083378195762634,
-0.03053329885005951,
-0.0025202278047800064,
-0.27089670300483704,
0.02911042608320713,
-0.11259222775697708,
0.31119304895401,
0.10925492644309998,
0.05677122250199318,
-0.041405417025089264,
-0.08253021538257599,
0.3201824128627777,
0.1547757238149643,
0.22164899110794067,
0.2683151960372925,
0.04771827161312103,
0.1253909170627594,
-0.23968012630939484,
0.017539357766509056,
0.18916183710098267,
0.21758733689785004,
0.12453307956457138,
-0.02025003731250763,
-0.3259884715080261,
0.3841291666030884,
0.1633160412311554,
-0.023884344846010208,
-0.06235859915614128,
-0.2212226390838623,
0.2503383159637451,
0.3229474723339081,
0.3707652986049652,
0.35874050855636597,
0.09806711226701736,
-0.2662656605243683,
0.11245916038751602,
0.07017193734645844,
-0.0723481997847557,
0.2630462050437927,
0.1803167313337326,
0.37655019760131836,
0.25856801867485046,
0.01693122833967209,
0.12798240780830383,
-0.13936102390289307,
-0.4716644883155823,
-0.10985515266656876,
0.37011659145355225,
-0.29064542055130005,
-0.001737736165523529,
-0.12793463468551636,
-0.05703889578580856,
-0.3960559070110321,
-0.026670046150684357,
-0.15691319108009338,
-0.264887273311615,
-0.4273056983947754,
0.3287535309791565,
-0.05488137900829315,
0.29113078117370605,
-0.19480302929878235,
-0.24224235117435455,
0.19393393397331238,
-0.12218492478132248,
-0.1903228759765625,
-0.36165642738342285,
0.08080045878887177,
0.03458442538976669,
0.18995380401611328,
0.1496807038784027,
0.3307649493217468,
-0.107923224568367,
0.29579442739486694,
-0.3171854615211487,
-0.23514088988304138,
0.14393962919712067,
-0.0386446937918663,
-0.034761302173137665,
0.3126859962940216,
0.1878063678741455,
0.25660091638565063,
-0.5176385641098022,
0.09446390718221664,
-0.14445345103740692,
-0.189145028591156,
0.08693961799144745,
-0.052748166024684906,
-0.18511644005775452,
0.12090454995632172,
-0.2517589330673218,
-0.48113560676574707,
-0.5694224238395691,
0.13440638780593872,
0.24150867760181427,
0.08420412242412567,
0.26392337679862976,
0.1586868315935135,
0.31294816732406616,
0.08068373054265976,
0.4144498109817505,
0.23354190587997437,
-0.07358457148075104,
0.30034497380256653,
-0.15435391664505005,
-0.2662021815776825,
0.05075201392173767,
-0.09570382535457611,
0.4410252571105957,
-0.027559194713830948,
-0.35064196586608887,
-0.13104456663131714,
-0.24551378190517426,
0.16854546964168549,
-0.1461605727672577,
0.2192200869321823,
0.37877804040908813,
0.414222776889801,
0.004855979233980179,
-0.10502402484416962,
0.09298646450042725,
-0.03882167488336563,
-0.27470752596855164,
-0.06299746781587601,
-0.016450056806206703,
0.4377359449863434,
-0.19663459062576294,
0.2570459842681885,
0.23741205036640167,
-0.16500329971313477,
0.23736384510993958,
0.08955816179513931,
0.28659358620643616,
-0.16709105670452118,
-0.27347826957702637,
-0.17229416966438293,
-0.180995911359787,
0.10606499016284943,
-0.047507673501968384,
-0.24346637725830078,
-0.01947050914168358,
-0.12351600080728531,
-0.06241896376013756,
-0.04349275678396225,
-0.027372416108846664,
-0.07372915744781494,
-0.42088621854782104,
0.23319081962108612,
-0.08653128147125244,
-0.06325040012598038,
-0.17037665843963623,
0.036015868186950684,
0.18266384303569794,
0.04490106925368309,
-0.1402004361152649,
-0.07022362947463989,
-0.2805652320384979,
-0.027860542759299278,
-0.29643091559410095,
0.09792312979698181,
0.13958683609962463,
0.3668658137321472,
0.11172240972518921,
-0.05322970822453499,
0.06627233326435089,
0.006396360695362091,
0.2152082473039627,
-0.18715506792068481,
-0.23747441172599792,
0.14924632012844086,
-0.068037249147892,
-0.44537559151649475,
-0.03558829426765442,
-0.1686117947101593,
0.0898018404841423,
0.15014395117759705,
0.1917921006679535,
-0.06652428209781647,
-0.17009872198104858,
0.4521212577819824,
0.06473669409751892,
-0.11619039624929428,
-0.030791480094194412,
-0.15608495473861694,
-0.3060137629508972,
-0.3745065927505493,
-0.07876864075660706,
0.2592592239379883,
0.46490445733070374,
0.2863294184207916,
0.19665184617042542,
-0.2955895662307739,
-0.12551334500312805,
-0.048651427030563354,
0.02841978147625923,
0.1900259554386139,
-0.046729035675525665,
0.09548941254615784,
0.08056318014860153,
0.3972302973270416,
0.5442346930503845,
0.6393277645111084,
-0.3564460575580597,
-0.5447501540184021,
-0.05768277868628502,
-0.1703615039587021,
0.3061317503452301,
0.04232814535498619,
-0.09967024624347687,
0.19207651913166046,
-0.4968562126159668,
0.014718657359480858,
-0.08922390639781952,
-0.04809786006808281,
0.06301027536392212,
0.1677154004573822,
-0.18332231044769287,
-0.24146577715873718,
0.36401161551475525,
0.25125014781951904,
0.05983549356460571,
0.4667035639286041,
0.23924025893211365,
-0.38408684730529785,
0.4785679280757904,
0.1116812527179718,
0.7710726857185364,
0.2474597692489624,
0.10733545571565628,
0.2562350630760193,
-0.4400929808616638,
0.27828890085220337,
-0.009791374206542969,
-0.013260417617857456,
-0.4400268495082855,
-0.233763188123703,
-0.01054733619093895,
-0.23394107818603516,
0.3223817050457001,
-0.13457442820072174,
-0.1893027424812317,
0.057696398347616196,
-0.23671028017997742,
-0.11946331709623337,
0.12738797068595886,
0.15037280321121216,
-0.09924160689115524,
-0.18415561318397522,
-0.15610376000404358,
0.0969632938504219,
0.16927587985992432,
0.1097305566072464,
-0.11566148698329926,
-0.039514943957328796,
-0.1755986213684082,
-0.32159623503685,
-0.21222439408302307,
0.19046536087989807,
-0.3982684314250946,
0.4196784496307373,
0.15749415755271912,
-0.20017899572849274,
0.23643603920936584,
0.45393550395965576,
0.18932729959487915,
-0.10550291836261749,
-0.11277548223733902,
0.14423617720603943,
0.11200116574764252,
-0.16209116578102112,
0.07247572392225266,
0.2463332712650299,
0.3890644907951355,
-0.07430321723222733,
0.03419813513755798,
0.38855165243148804,
-0.18327166140079498,
-0.4002794027328491,
0.1420225203037262,
0.06763996928930283,
0.043245892971754074,
-0.23007208108901978,
-0.20149093866348267,
-0.17483940720558167,
-0.05476310849189758,
-0.17514777183532715,
0.147023543715477,
0.03132973611354828,
-0.3554784655570984,
0.1370883584022522,
-0.17109976708889008,
-0.3439685106277466,
0.01698918268084526,
0.38314497470855713,
0.1898702085018158,
0.04016689211130142,
0.6141799688339233,
0.07355962693691254,
-0.25458812713623047,
-0.21388505399227142,
0.1335947960615158,
0.19124937057495117,
-0.62235027551651,
0.1904217004776001,
-0.021416522562503815,
-0.2732062041759491,
-0.029417753219604492,
0.3728379011154175,
0.24950259923934937,
0.07783541083335876,
-0.17882214486598969,
-0.24607907235622406,
-0.428485631942749,
0.11749082803726196,
0.04444221034646034,
0.2214086949825287,
-0.37719854712486267,
0.2194172739982605,
-0.17110860347747803,
0.103178009390831,
-0.2955057919025421,
-0.026355629786849022,
-0.5316578149795532,
0.14548428356647491,
0.2224799394607544,
-0.015324385836720467,
-0.1502855271100998,
-0.02151089906692505,
0.14002758264541626,
0.2930784523487091,
-0.09902186691761017,
-0.1772584617137909,
-0.1596524566411972,
0.09779373556375504,
0.19002340734004974,
-0.1416580080986023,
0.00005961954593658447,
-0.01402941346168518,
-0.07470054924488068,
-0.019229821860790253,
-0.08337271213531494,
0.26569053530693054,
-0.0025573670864105225,
0.16257129609584808,
0.1595553457736969,
-0.033375516533851624,
-0.26804155111312866,
0.24136541783809662,
-0.1609545648097992,
0.2795288860797882,
-0.20764602720737457,
0.2113102674484253,
-0.09595108777284622,
0.09591668844223022,
-0.05292639881372452,
0.09137202799320221,
-0.17035174369812012,
-0.05258016288280487,
0.29036810994148254,
-0.34288138151168823,
-0.015550516545772552,
0.18389125168323517,
0.22407057881355286,
0.22856120765209198,
-0.3436901271343231,
0.012690983712673187,
0.14790883660316467,
0.23818010091781616,
-0.28956544399261475,
-0.16199693083763123,
-0.11132695525884628,
-0.2829515039920807,
0.039406076073646545,
0.15308913588523865,
-0.06062738597393036,
-0.12041755020618439,
0.2808241844177246,
0.26463666558265686,
0.20148871839046478,
-0.11933860182762146,
0.401050865650177,
0.3233991861343384,
-0.13719576597213745,
-0.04563349485397339,
0.5149922370910645,
0.24320140480995178,
0.2674027383327484,
0.3243061304092407,
-0.1201210469007492,
0.19134610891342163,
-0.3938050866127014,
-0.0865255668759346,
0.13271696865558624,
-0.15006910264492035,
0.07412679493427277,
-0.3074265122413635,
-0.01670687273144722,
-0.19194567203521729,
-0.12525498867034912,
-0.05134852975606918,
-0.052303194999694824,
-0.06941889971494675,
0.00046334415674209595,
0.07868194580078125,
-0.2117467075586319,
-0.026525575667619705,
0.027291610836982727,
-0.14084982872009277,
-0.10010220855474472,
-0.0014868825674057007,
0.15193066000938416,
-0.03160551190376282,
0.14198365807533264,
0.07675089687108994,
-0.25749874114990234,
-0.26734089851379395,
0.03476652875542641,
0.165971577167511,
0.03169573098421097,
-0.40021413564682007,
0.1568090170621872,
-0.03142855688929558,
-0.04700645059347153,
-0.2851216495037079,
0.43323761224746704,
0.5774037837982178,
0.4171214997768402,
0.10439202189445496,
-0.04928453639149666,
-0.07951289415359497,
-0.1513766497373581,
0.1302853524684906,
0.3273222744464874,
-0.07780224084854126,
0.22529923915863037,
0.3888447880744934,
0.15440931916236877,
-0.24088755249977112,
-0.07401212304830551,
0.07731480896472931,
0.22244518995285034,
-0.26429280638694763,
0.5152069330215454,
-0.02425434999167919,
-0.33644479513168335,
0.01254897192120552,
0.1521034836769104,
-0.4033680260181427,
0.19476701319217682,
0.4406997561454773,
-0.18382270634174347,
0.018053457140922546,
-0.33213943243026733,
0.06533817946910858,
0.03727605193853378,
0.6124904751777649,
0.48521313071250916,
0.33517056703567505,
-0.15982908010482788,
-0.16731733083724976,
-0.3128805160522461,
0.18699117004871368,
-0.11246559023857117,
0.03628339618444443,
0.013686876744031906,
0.06751812994480133,
0.04187149927020073,
0.15657424926757812,
0.18706804513931274,
0.2210918366909027,
-0.2763952314853668,
0.02608480118215084,
-0.38806039094924927,
-0.2455812245607376,
0.10810841619968414,
-0.03884698078036308,
0.08636362105607986,
-0.5342223644256592,
0.09064959734678268,
-0.0824476107954979,
0.16404196619987488,
-0.28465989232063293,
-0.0542563758790493,
0.20082250237464905,
-0.1979013979434967,
0.45428916811943054,
-0.05478053539991379,
0.4595044255256653,
0.020230047404766083,
-0.1561621129512787,
-0.13956424593925476,
-0.5568035840988159,
-0.28128939867019653,
0.1751372516155243,
0.32846924662590027,
0.4226182997226715,
-0.18614041805267334,
-0.38109081983566284,
-0.3425794243812561,
0.13387203216552734,
-0.20194575190544128,
0.10682004690170288,
-0.16240717470645905,
0.17728838324546814,
-0.04089207947254181,
0.11511212587356567,
0.19150277972221375,
-0.09540397673845291,
-0.02851509302854538,
0.19460955262184143,
-0.2638320326805115,
-0.3892172873020172,
0.41564828157424927,
-0.18457314372062683,
-0.3162107765674591,
0.15280799567699432,
0.1361370086669922,
-0.0953700989484787,
-0.08400661498308182,
-0.5766762495040894,
0.23468558490276337,
0.32386383414268494,
-0.09576019644737244,
-0.12282361835241318,
0.23794598877429962,
0.33038240671157837,
0.11651982367038727,
-0.04669814556837082,
0.3443213403224945,
-0.12160798907279968,
-0.01021159440279007,
0.05064907670021057,
-0.11506733298301697
] |
https://github.com/huggingface/datasets/issues/6538 | I was having the same issue but the datasets version was 2.6.1, after I updated it to latest(2.16), error is gone while importing.
| ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) | ### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0 | 23 | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0
I was having the same issue but the datasets version was 2.6.1, after I updated it to latest(2.16), error is gone while importing.
| [
-0.256902813911438,
-0.06662493944168091,
-0.05580161139369011,
0.6121095418930054,
0.2748967707157135,
0.06340034306049347,
0.24404215812683105,
0.24720130860805511,
-0.019955575466156006,
0.11987867951393127,
-0.13812042772769928,
0.38939008116722107,
-0.1408829241991043,
0.1007615476846695,
-0.32404372096061707,
-0.32616546750068665,
0.039162781089544296,
0.21027472615242004,
-0.25826671719551086,
-0.02511308342218399,
-0.13907425105571747,
0.1340944766998291,
-0.172745019197464,
0.24685204029083252,
-0.4250190258026123,
-0.26558586955070496,
0.2469814419746399,
0.030495258048176765,
-0.44358178973197937,
-0.39700847864151,
0.24750655889511108,
-0.2310401201248169,
0.37677842378616333,
0.6055502891540527,
-0.00011488998279673979,
0.1920846551656723,
0.3230991065502167,
-0.10012710094451904,
-0.18276391923427582,
-0.26851069927215576,
-0.1036250963807106,
0.03106759488582611,
0.21665579080581665,
-0.10153007507324219,
0.21615839004516602,
0.0005410797894001007,
-0.27494823932647705,
-0.2035241276025772,
0.25661763548851013,
0.526404619216919,
0.2563377916812897,
0.2645606994628906,
0.43410056829452515,
-0.1192169189453125,
-0.061466049402952194,
-0.0923306941986084,
-0.2444404661655426,
0.15163978934288025,
-0.12952443957328796,
0.04484943300485611,
0.005928002297878265,
0.3358690142631531,
-0.028897468000650406,
0.15836332738399506,
0.32255351543426514,
-0.16028258204460144,
0.11113902181386948,
-0.4410451352596283,
0.0145353302359581,
0.052129387855529785,
0.7370848655700684,
-0.3695690631866455,
-0.4370410442352295,
0.15414728224277496,
0.14453935623168945,
0.04207813739776611,
0.180410698056221,
0.10252576321363449,
-0.23504295945167542,
0.13352859020233154,
0.2321055829524994,
-0.11182139813899994,
-0.37119418382644653,
-0.15580841898918152,
-0.20775461196899414,
0.28189292550086975,
-0.07928560674190521,
0.05331495404243469,
0.08881202340126038,
-0.17495179176330566,
0.8017526268959045,
0.001824287697672844,
-0.24544386565685272,
0.19523701071739197,
-0.4660859704017639,
-0.11735111474990845,
-0.020867645740509033,
0.0144905811175704,
-0.321607768535614,
0.08730154484510422,
0.1457754224538803,
-0.08641445636749268,
0.09756240248680115,
0.2448480725288391,
0.08345026522874832,
0.09961158782243729,
0.10073757916688919,
0.5698217749595642,
0.07114965468645096,
-0.03231749311089516,
0.05505339801311493,
-0.09617455303668976,
-0.24876058101654053,
-0.40744882822036743,
-0.024745170027017593,
-0.18364641070365906,
0.246136873960495,
-0.1124357208609581,
-0.3068576753139496,
0.14300671219825745,
-0.1927705705165863,
-0.04361412301659584,
-0.021950362250208855,
0.40578997135162354,
-0.0212737824767828,
0.28545406460762024,
0.31094586849212646,
0.15615573525428772,
0.12214254587888718,
0.12312217801809311,
-0.20654675364494324,
0.33852919936180115,
-0.14966563880443573,
-0.12863649427890778,
-0.12041734158992767,
-0.06161477416753769,
0.2588486075401306,
-0.11313822865486145,
-0.08800972998142242,
-0.1768268346786499,
-0.014624115079641342,
-0.33047088980674744,
0.020192649215459824,
0.19396111369132996,
-0.0659535825252533,
0.04192115366458893,
0.24863044917583466,
-0.2537769675254822,
-0.1377231925725937,
-0.059625353664159775,
-0.3462243378162384,
-0.16181938350200653,
-0.4648602306842804,
0.196210116147995,
0.05868682265281677,
-0.1515142023563385,
-0.08748701214790344,
-0.45019403100013733,
0.18756400048732758,
0.05569201707839966,
-0.005037479102611542,
-0.19469645619392395,
0.10776174813508987,
-0.014502028003334999,
-0.03426451236009598,
0.3410903215408325,
-0.3945315480232239,
-0.0010110437870025635,
0.3809555768966675,
-0.1595524251461029,
-0.02658456563949585,
0.12249168008565903,
-0.09577785432338715,
0.39026060700416565,
-0.09571227431297302,
-0.15573160350322723,
0.567808210849762,
-0.5921734571456909,
-0.26608705520629883,
0.05019427090883255,
-0.04213886708021164,
-0.1447429656982422,
0.3695034384727478,
-0.06576819717884064,
-0.039474405348300934,
0.07813966274261475,
0.08266063779592514,
0.144344300031662,
0.025286955758929253,
0.036696262657642365,
-0.06944005191326141,
-0.1120612770318985,
0.07201431691646576,
0.14142988622188568,
0.14674213528633118,
0.03374359384179115,
0.0999671220779419,
0.06819626688957214,
0.32104992866516113,
-0.055073726922273636,
-0.04141709953546524,
0.6366989016532898,
0.1728818714618683,
0.2089121788740158,
0.046118222177028656,
-0.25871551036834717,
-0.09337187558412552,
0.09669534862041473,
-0.09548264741897583,
0.20620690286159515,
-0.5495560765266418,
0.039022721350193024,
-0.28502604365348816,
0.35468095541000366,
-0.3013054132461548,
-0.17267537117004395,
0.14956888556480408,
0.11204648017883301,
0.15216058492660522,
0.08011548221111298,
-0.052536491304636,
0.4499247670173645,
-0.268441379070282,
0.3102836608886719,
-0.393457293510437,
0.3476170003414154,
-0.3230850398540497,
-0.3127036988735199,
0.04742034524679184,
0.17949096858501434,
0.024485832080245018,
-0.04163544625043869,
-0.30319371819496155,
0.16406658291816711,
0.0453663095831871,
0.20532071590423584,
-0.31083378195762634,
-0.03053329885005951,
-0.0025202278047800064,
-0.27089670300483704,
0.02911042608320713,
-0.11259222775697708,
0.31119304895401,
0.10925492644309998,
0.05677122250199318,
-0.041405417025089264,
-0.08253021538257599,
0.3201824128627777,
0.1547757238149643,
0.22164899110794067,
0.2683151960372925,
0.04771827161312103,
0.1253909170627594,
-0.23968012630939484,
0.017539357766509056,
0.18916183710098267,
0.21758733689785004,
0.12453307956457138,
-0.02025003731250763,
-0.3259884715080261,
0.3841291666030884,
0.1633160412311554,
-0.023884344846010208,
-0.06235859915614128,
-0.2212226390838623,
0.2503383159637451,
0.3229474723339081,
0.3707652986049652,
0.35874050855636597,
0.09806711226701736,
-0.2662656605243683,
0.11245916038751602,
0.07017193734645844,
-0.0723481997847557,
0.2630462050437927,
0.1803167313337326,
0.37655019760131836,
0.25856801867485046,
0.01693122833967209,
0.12798240780830383,
-0.13936102390289307,
-0.4716644883155823,
-0.10985515266656876,
0.37011659145355225,
-0.29064542055130005,
-0.001737736165523529,
-0.12793463468551636,
-0.05703889578580856,
-0.3960559070110321,
-0.026670046150684357,
-0.15691319108009338,
-0.264887273311615,
-0.4273056983947754,
0.3287535309791565,
-0.05488137900829315,
0.29113078117370605,
-0.19480302929878235,
-0.24224235117435455,
0.19393393397331238,
-0.12218492478132248,
-0.1903228759765625,
-0.36165642738342285,
0.08080045878887177,
0.03458442538976669,
0.18995380401611328,
0.1496807038784027,
0.3307649493217468,
-0.107923224568367,
0.29579442739486694,
-0.3171854615211487,
-0.23514088988304138,
0.14393962919712067,
-0.0386446937918663,
-0.034761302173137665,
0.3126859962940216,
0.1878063678741455,
0.25660091638565063,
-0.5176385641098022,
0.09446390718221664,
-0.14445345103740692,
-0.189145028591156,
0.08693961799144745,
-0.052748166024684906,
-0.18511644005775452,
0.12090454995632172,
-0.2517589330673218,
-0.48113560676574707,
-0.5694224238395691,
0.13440638780593872,
0.24150867760181427,
0.08420412242412567,
0.26392337679862976,
0.1586868315935135,
0.31294816732406616,
0.08068373054265976,
0.4144498109817505,
0.23354190587997437,
-0.07358457148075104,
0.30034497380256653,
-0.15435391664505005,
-0.2662021815776825,
0.05075201392173767,
-0.09570382535457611,
0.4410252571105957,
-0.027559194713830948,
-0.35064196586608887,
-0.13104456663131714,
-0.24551378190517426,
0.16854546964168549,
-0.1461605727672577,
0.2192200869321823,
0.37877804040908813,
0.414222776889801,
0.004855979233980179,
-0.10502402484416962,
0.09298646450042725,
-0.03882167488336563,
-0.27470752596855164,
-0.06299746781587601,
-0.016450056806206703,
0.4377359449863434,
-0.19663459062576294,
0.2570459842681885,
0.23741205036640167,
-0.16500329971313477,
0.23736384510993958,
0.08955816179513931,
0.28659358620643616,
-0.16709105670452118,
-0.27347826957702637,
-0.17229416966438293,
-0.180995911359787,
0.10606499016284943,
-0.047507673501968384,
-0.24346637725830078,
-0.01947050914168358,
-0.12351600080728531,
-0.06241896376013756,
-0.04349275678396225,
-0.027372416108846664,
-0.07372915744781494,
-0.42088621854782104,
0.23319081962108612,
-0.08653128147125244,
-0.06325040012598038,
-0.17037665843963623,
0.036015868186950684,
0.18266384303569794,
0.04490106925368309,
-0.1402004361152649,
-0.07022362947463989,
-0.2805652320384979,
-0.027860542759299278,
-0.29643091559410095,
0.09792312979698181,
0.13958683609962463,
0.3668658137321472,
0.11172240972518921,
-0.05322970822453499,
0.06627233326435089,
0.006396360695362091,
0.2152082473039627,
-0.18715506792068481,
-0.23747441172599792,
0.14924632012844086,
-0.068037249147892,
-0.44537559151649475,
-0.03558829426765442,
-0.1686117947101593,
0.0898018404841423,
0.15014395117759705,
0.1917921006679535,
-0.06652428209781647,
-0.17009872198104858,
0.4521212577819824,
0.06473669409751892,
-0.11619039624929428,
-0.030791480094194412,
-0.15608495473861694,
-0.3060137629508972,
-0.3745065927505493,
-0.07876864075660706,
0.2592592239379883,
0.46490445733070374,
0.2863294184207916,
0.19665184617042542,
-0.2955895662307739,
-0.12551334500312805,
-0.048651427030563354,
0.02841978147625923,
0.1900259554386139,
-0.046729035675525665,
0.09548941254615784,
0.08056318014860153,
0.3972302973270416,
0.5442346930503845,
0.6393277645111084,
-0.3564460575580597,
-0.5447501540184021,
-0.05768277868628502,
-0.1703615039587021,
0.3061317503452301,
0.04232814535498619,
-0.09967024624347687,
0.19207651913166046,
-0.4968562126159668,
0.014718657359480858,
-0.08922390639781952,
-0.04809786006808281,
0.06301027536392212,
0.1677154004573822,
-0.18332231044769287,
-0.24146577715873718,
0.36401161551475525,
0.25125014781951904,
0.05983549356460571,
0.4667035639286041,
0.23924025893211365,
-0.38408684730529785,
0.4785679280757904,
0.1116812527179718,
0.7710726857185364,
0.2474597692489624,
0.10733545571565628,
0.2562350630760193,
-0.4400929808616638,
0.27828890085220337,
-0.009791374206542969,
-0.013260417617857456,
-0.4400268495082855,
-0.233763188123703,
-0.01054733619093895,
-0.23394107818603516,
0.3223817050457001,
-0.13457442820072174,
-0.1893027424812317,
0.057696398347616196,
-0.23671028017997742,
-0.11946331709623337,
0.12738797068595886,
0.15037280321121216,
-0.09924160689115524,
-0.18415561318397522,
-0.15610376000404358,
0.0969632938504219,
0.16927587985992432,
0.1097305566072464,
-0.11566148698329926,
-0.039514943957328796,
-0.1755986213684082,
-0.32159623503685,
-0.21222439408302307,
0.19046536087989807,
-0.3982684314250946,
0.4196784496307373,
0.15749415755271912,
-0.20017899572849274,
0.23643603920936584,
0.45393550395965576,
0.18932729959487915,
-0.10550291836261749,
-0.11277548223733902,
0.14423617720603943,
0.11200116574764252,
-0.16209116578102112,
0.07247572392225266,
0.2463332712650299,
0.3890644907951355,
-0.07430321723222733,
0.03419813513755798,
0.38855165243148804,
-0.18327166140079498,
-0.4002794027328491,
0.1420225203037262,
0.06763996928930283,
0.043245892971754074,
-0.23007208108901978,
-0.20149093866348267,
-0.17483940720558167,
-0.05476310849189758,
-0.17514777183532715,
0.147023543715477,
0.03132973611354828,
-0.3554784655570984,
0.1370883584022522,
-0.17109976708889008,
-0.3439685106277466,
0.01698918268084526,
0.38314497470855713,
0.1898702085018158,
0.04016689211130142,
0.6141799688339233,
0.07355962693691254,
-0.25458812713623047,
-0.21388505399227142,
0.1335947960615158,
0.19124937057495117,
-0.62235027551651,
0.1904217004776001,
-0.021416522562503815,
-0.2732062041759491,
-0.029417753219604492,
0.3728379011154175,
0.24950259923934937,
0.07783541083335876,
-0.17882214486598969,
-0.24607907235622406,
-0.428485631942749,
0.11749082803726196,
0.04444221034646034,
0.2214086949825287,
-0.37719854712486267,
0.2194172739982605,
-0.17110860347747803,
0.103178009390831,
-0.2955057919025421,
-0.026355629786849022,
-0.5316578149795532,
0.14548428356647491,
0.2224799394607544,
-0.015324385836720467,
-0.1502855271100998,
-0.02151089906692505,
0.14002758264541626,
0.2930784523487091,
-0.09902186691761017,
-0.1772584617137909,
-0.1596524566411972,
0.09779373556375504,
0.19002340734004974,
-0.1416580080986023,
0.00005961954593658447,
-0.01402941346168518,
-0.07470054924488068,
-0.019229821860790253,
-0.08337271213531494,
0.26569053530693054,
-0.0025573670864105225,
0.16257129609584808,
0.1595553457736969,
-0.033375516533851624,
-0.26804155111312866,
0.24136541783809662,
-0.1609545648097992,
0.2795288860797882,
-0.20764602720737457,
0.2113102674484253,
-0.09595108777284622,
0.09591668844223022,
-0.05292639881372452,
0.09137202799320221,
-0.17035174369812012,
-0.05258016288280487,
0.29036810994148254,
-0.34288138151168823,
-0.015550516545772552,
0.18389125168323517,
0.22407057881355286,
0.22856120765209198,
-0.3436901271343231,
0.012690983712673187,
0.14790883660316467,
0.23818010091781616,
-0.28956544399261475,
-0.16199693083763123,
-0.11132695525884628,
-0.2829515039920807,
0.039406076073646545,
0.15308913588523865,
-0.06062738597393036,
-0.12041755020618439,
0.2808241844177246,
0.26463666558265686,
0.20148871839046478,
-0.11933860182762146,
0.401050865650177,
0.3233991861343384,
-0.13719576597213745,
-0.04563349485397339,
0.5149922370910645,
0.24320140480995178,
0.2674027383327484,
0.3243061304092407,
-0.1201210469007492,
0.19134610891342163,
-0.3938050866127014,
-0.0865255668759346,
0.13271696865558624,
-0.15006910264492035,
0.07412679493427277,
-0.3074265122413635,
-0.01670687273144722,
-0.19194567203521729,
-0.12525498867034912,
-0.05134852975606918,
-0.052303194999694824,
-0.06941889971494675,
0.00046334415674209595,
0.07868194580078125,
-0.2117467075586319,
-0.026525575667619705,
0.027291610836982727,
-0.14084982872009277,
-0.10010220855474472,
-0.0014868825674057007,
0.15193066000938416,
-0.03160551190376282,
0.14198365807533264,
0.07675089687108994,
-0.25749874114990234,
-0.26734089851379395,
0.03476652875542641,
0.165971577167511,
0.03169573098421097,
-0.40021413564682007,
0.1568090170621872,
-0.03142855688929558,
-0.04700645059347153,
-0.2851216495037079,
0.43323761224746704,
0.5774037837982178,
0.4171214997768402,
0.10439202189445496,
-0.04928453639149666,
-0.07951289415359497,
-0.1513766497373581,
0.1302853524684906,
0.3273222744464874,
-0.07780224084854126,
0.22529923915863037,
0.3888447880744934,
0.15440931916236877,
-0.24088755249977112,
-0.07401212304830551,
0.07731480896472931,
0.22244518995285034,
-0.26429280638694763,
0.5152069330215454,
-0.02425434999167919,
-0.33644479513168335,
0.01254897192120552,
0.1521034836769104,
-0.4033680260181427,
0.19476701319217682,
0.4406997561454773,
-0.18382270634174347,
0.018053457140922546,
-0.33213943243026733,
0.06533817946910858,
0.03727605193853378,
0.6124904751777649,
0.48521313071250916,
0.33517056703567505,
-0.15982908010482788,
-0.16731733083724976,
-0.3128805160522461,
0.18699117004871368,
-0.11246559023857117,
0.03628339618444443,
0.013686876744031906,
0.06751812994480133,
0.04187149927020073,
0.15657424926757812,
0.18706804513931274,
0.2210918366909027,
-0.2763952314853668,
0.02608480118215084,
-0.38806039094924927,
-0.2455812245607376,
0.10810841619968414,
-0.03884698078036308,
0.08636362105607986,
-0.5342223644256592,
0.09064959734678268,
-0.0824476107954979,
0.16404196619987488,
-0.28465989232063293,
-0.0542563758790493,
0.20082250237464905,
-0.1979013979434967,
0.45428916811943054,
-0.05478053539991379,
0.4595044255256653,
0.020230047404766083,
-0.1561621129512787,
-0.13956424593925476,
-0.5568035840988159,
-0.28128939867019653,
0.1751372516155243,
0.32846924662590027,
0.4226182997226715,
-0.18614041805267334,
-0.38109081983566284,
-0.3425794243812561,
0.13387203216552734,
-0.20194575190544128,
0.10682004690170288,
-0.16240717470645905,
0.17728838324546814,
-0.04089207947254181,
0.11511212587356567,
0.19150277972221375,
-0.09540397673845291,
-0.02851509302854538,
0.19460955262184143,
-0.2638320326805115,
-0.3892172873020172,
0.41564828157424927,
-0.18457314372062683,
-0.3162107765674591,
0.15280799567699432,
0.1361370086669922,
-0.0953700989484787,
-0.08400661498308182,
-0.5766762495040894,
0.23468558490276337,
0.32386383414268494,
-0.09576019644737244,
-0.12282361835241318,
0.23794598877429962,
0.33038240671157837,
0.11651982367038727,
-0.04669814556837082,
0.3443213403224945,
-0.12160798907279968,
-0.01021159440279007,
0.05064907670021057,
-0.11506733298301697
] |
https://github.com/huggingface/datasets/issues/6538 | > I was having the same issue but the datasets version was 2.6.1, after I updated it to latest(2.16), error is gone while importing.
I also have datasets version 2.16, but the error is still there. | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) | ### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0 | 36 | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0
> I was having the same issue but the datasets version was 2.6.1, after I updated it to latest(2.16), error is gone while importing.
I also have datasets version 2.16, but the error is still there. | [
-0.256902813911438,
-0.06662493944168091,
-0.05580161139369011,
0.6121095418930054,
0.2748967707157135,
0.06340034306049347,
0.24404215812683105,
0.24720130860805511,
-0.019955575466156006,
0.11987867951393127,
-0.13812042772769928,
0.38939008116722107,
-0.1408829241991043,
0.1007615476846695,
-0.32404372096061707,
-0.32616546750068665,
0.039162781089544296,
0.21027472615242004,
-0.25826671719551086,
-0.02511308342218399,
-0.13907425105571747,
0.1340944766998291,
-0.172745019197464,
0.24685204029083252,
-0.4250190258026123,
-0.26558586955070496,
0.2469814419746399,
0.030495258048176765,
-0.44358178973197937,
-0.39700847864151,
0.24750655889511108,
-0.2310401201248169,
0.37677842378616333,
0.6055502891540527,
-0.00011488998279673979,
0.1920846551656723,
0.3230991065502167,
-0.10012710094451904,
-0.18276391923427582,
-0.26851069927215576,
-0.1036250963807106,
0.03106759488582611,
0.21665579080581665,
-0.10153007507324219,
0.21615839004516602,
0.0005410797894001007,
-0.27494823932647705,
-0.2035241276025772,
0.25661763548851013,
0.526404619216919,
0.2563377916812897,
0.2645606994628906,
0.43410056829452515,
-0.1192169189453125,
-0.061466049402952194,
-0.0923306941986084,
-0.2444404661655426,
0.15163978934288025,
-0.12952443957328796,
0.04484943300485611,
0.005928002297878265,
0.3358690142631531,
-0.028897468000650406,
0.15836332738399506,
0.32255351543426514,
-0.16028258204460144,
0.11113902181386948,
-0.4410451352596283,
0.0145353302359581,
0.052129387855529785,
0.7370848655700684,
-0.3695690631866455,
-0.4370410442352295,
0.15414728224277496,
0.14453935623168945,
0.04207813739776611,
0.180410698056221,
0.10252576321363449,
-0.23504295945167542,
0.13352859020233154,
0.2321055829524994,
-0.11182139813899994,
-0.37119418382644653,
-0.15580841898918152,
-0.20775461196899414,
0.28189292550086975,
-0.07928560674190521,
0.05331495404243469,
0.08881202340126038,
-0.17495179176330566,
0.8017526268959045,
0.001824287697672844,
-0.24544386565685272,
0.19523701071739197,
-0.4660859704017639,
-0.11735111474990845,
-0.020867645740509033,
0.0144905811175704,
-0.321607768535614,
0.08730154484510422,
0.1457754224538803,
-0.08641445636749268,
0.09756240248680115,
0.2448480725288391,
0.08345026522874832,
0.09961158782243729,
0.10073757916688919,
0.5698217749595642,
0.07114965468645096,
-0.03231749311089516,
0.05505339801311493,
-0.09617455303668976,
-0.24876058101654053,
-0.40744882822036743,
-0.024745170027017593,
-0.18364641070365906,
0.246136873960495,
-0.1124357208609581,
-0.3068576753139496,
0.14300671219825745,
-0.1927705705165863,
-0.04361412301659584,
-0.021950362250208855,
0.40578997135162354,
-0.0212737824767828,
0.28545406460762024,
0.31094586849212646,
0.15615573525428772,
0.12214254587888718,
0.12312217801809311,
-0.20654675364494324,
0.33852919936180115,
-0.14966563880443573,
-0.12863649427890778,
-0.12041734158992767,
-0.06161477416753769,
0.2588486075401306,
-0.11313822865486145,
-0.08800972998142242,
-0.1768268346786499,
-0.014624115079641342,
-0.33047088980674744,
0.020192649215459824,
0.19396111369132996,
-0.0659535825252533,
0.04192115366458893,
0.24863044917583466,
-0.2537769675254822,
-0.1377231925725937,
-0.059625353664159775,
-0.3462243378162384,
-0.16181938350200653,
-0.4648602306842804,
0.196210116147995,
0.05868682265281677,
-0.1515142023563385,
-0.08748701214790344,
-0.45019403100013733,
0.18756400048732758,
0.05569201707839966,
-0.005037479102611542,
-0.19469645619392395,
0.10776174813508987,
-0.014502028003334999,
-0.03426451236009598,
0.3410903215408325,
-0.3945315480232239,
-0.0010110437870025635,
0.3809555768966675,
-0.1595524251461029,
-0.02658456563949585,
0.12249168008565903,
-0.09577785432338715,
0.39026060700416565,
-0.09571227431297302,
-0.15573160350322723,
0.567808210849762,
-0.5921734571456909,
-0.26608705520629883,
0.05019427090883255,
-0.04213886708021164,
-0.1447429656982422,
0.3695034384727478,
-0.06576819717884064,
-0.039474405348300934,
0.07813966274261475,
0.08266063779592514,
0.144344300031662,
0.025286955758929253,
0.036696262657642365,
-0.06944005191326141,
-0.1120612770318985,
0.07201431691646576,
0.14142988622188568,
0.14674213528633118,
0.03374359384179115,
0.0999671220779419,
0.06819626688957214,
0.32104992866516113,
-0.055073726922273636,
-0.04141709953546524,
0.6366989016532898,
0.1728818714618683,
0.2089121788740158,
0.046118222177028656,
-0.25871551036834717,
-0.09337187558412552,
0.09669534862041473,
-0.09548264741897583,
0.20620690286159515,
-0.5495560765266418,
0.039022721350193024,
-0.28502604365348816,
0.35468095541000366,
-0.3013054132461548,
-0.17267537117004395,
0.14956888556480408,
0.11204648017883301,
0.15216058492660522,
0.08011548221111298,
-0.052536491304636,
0.4499247670173645,
-0.268441379070282,
0.3102836608886719,
-0.393457293510437,
0.3476170003414154,
-0.3230850398540497,
-0.3127036988735199,
0.04742034524679184,
0.17949096858501434,
0.024485832080245018,
-0.04163544625043869,
-0.30319371819496155,
0.16406658291816711,
0.0453663095831871,
0.20532071590423584,
-0.31083378195762634,
-0.03053329885005951,
-0.0025202278047800064,
-0.27089670300483704,
0.02911042608320713,
-0.11259222775697708,
0.31119304895401,
0.10925492644309998,
0.05677122250199318,
-0.041405417025089264,
-0.08253021538257599,
0.3201824128627777,
0.1547757238149643,
0.22164899110794067,
0.2683151960372925,
0.04771827161312103,
0.1253909170627594,
-0.23968012630939484,
0.017539357766509056,
0.18916183710098267,
0.21758733689785004,
0.12453307956457138,
-0.02025003731250763,
-0.3259884715080261,
0.3841291666030884,
0.1633160412311554,
-0.023884344846010208,
-0.06235859915614128,
-0.2212226390838623,
0.2503383159637451,
0.3229474723339081,
0.3707652986049652,
0.35874050855636597,
0.09806711226701736,
-0.2662656605243683,
0.11245916038751602,
0.07017193734645844,
-0.0723481997847557,
0.2630462050437927,
0.1803167313337326,
0.37655019760131836,
0.25856801867485046,
0.01693122833967209,
0.12798240780830383,
-0.13936102390289307,
-0.4716644883155823,
-0.10985515266656876,
0.37011659145355225,
-0.29064542055130005,
-0.001737736165523529,
-0.12793463468551636,
-0.05703889578580856,
-0.3960559070110321,
-0.026670046150684357,
-0.15691319108009338,
-0.264887273311615,
-0.4273056983947754,
0.3287535309791565,
-0.05488137900829315,
0.29113078117370605,
-0.19480302929878235,
-0.24224235117435455,
0.19393393397331238,
-0.12218492478132248,
-0.1903228759765625,
-0.36165642738342285,
0.08080045878887177,
0.03458442538976669,
0.18995380401611328,
0.1496807038784027,
0.3307649493217468,
-0.107923224568367,
0.29579442739486694,
-0.3171854615211487,
-0.23514088988304138,
0.14393962919712067,
-0.0386446937918663,
-0.034761302173137665,
0.3126859962940216,
0.1878063678741455,
0.25660091638565063,
-0.5176385641098022,
0.09446390718221664,
-0.14445345103740692,
-0.189145028591156,
0.08693961799144745,
-0.052748166024684906,
-0.18511644005775452,
0.12090454995632172,
-0.2517589330673218,
-0.48113560676574707,
-0.5694224238395691,
0.13440638780593872,
0.24150867760181427,
0.08420412242412567,
0.26392337679862976,
0.1586868315935135,
0.31294816732406616,
0.08068373054265976,
0.4144498109817505,
0.23354190587997437,
-0.07358457148075104,
0.30034497380256653,
-0.15435391664505005,
-0.2662021815776825,
0.05075201392173767,
-0.09570382535457611,
0.4410252571105957,
-0.027559194713830948,
-0.35064196586608887,
-0.13104456663131714,
-0.24551378190517426,
0.16854546964168549,
-0.1461605727672577,
0.2192200869321823,
0.37877804040908813,
0.414222776889801,
0.004855979233980179,
-0.10502402484416962,
0.09298646450042725,
-0.03882167488336563,
-0.27470752596855164,
-0.06299746781587601,
-0.016450056806206703,
0.4377359449863434,
-0.19663459062576294,
0.2570459842681885,
0.23741205036640167,
-0.16500329971313477,
0.23736384510993958,
0.08955816179513931,
0.28659358620643616,
-0.16709105670452118,
-0.27347826957702637,
-0.17229416966438293,
-0.180995911359787,
0.10606499016284943,
-0.047507673501968384,
-0.24346637725830078,
-0.01947050914168358,
-0.12351600080728531,
-0.06241896376013756,
-0.04349275678396225,
-0.027372416108846664,
-0.07372915744781494,
-0.42088621854782104,
0.23319081962108612,
-0.08653128147125244,
-0.06325040012598038,
-0.17037665843963623,
0.036015868186950684,
0.18266384303569794,
0.04490106925368309,
-0.1402004361152649,
-0.07022362947463989,
-0.2805652320384979,
-0.027860542759299278,
-0.29643091559410095,
0.09792312979698181,
0.13958683609962463,
0.3668658137321472,
0.11172240972518921,
-0.05322970822453499,
0.06627233326435089,
0.006396360695362091,
0.2152082473039627,
-0.18715506792068481,
-0.23747441172599792,
0.14924632012844086,
-0.068037249147892,
-0.44537559151649475,
-0.03558829426765442,
-0.1686117947101593,
0.0898018404841423,
0.15014395117759705,
0.1917921006679535,
-0.06652428209781647,
-0.17009872198104858,
0.4521212577819824,
0.06473669409751892,
-0.11619039624929428,
-0.030791480094194412,
-0.15608495473861694,
-0.3060137629508972,
-0.3745065927505493,
-0.07876864075660706,
0.2592592239379883,
0.46490445733070374,
0.2863294184207916,
0.19665184617042542,
-0.2955895662307739,
-0.12551334500312805,
-0.048651427030563354,
0.02841978147625923,
0.1900259554386139,
-0.046729035675525665,
0.09548941254615784,
0.08056318014860153,
0.3972302973270416,
0.5442346930503845,
0.6393277645111084,
-0.3564460575580597,
-0.5447501540184021,
-0.05768277868628502,
-0.1703615039587021,
0.3061317503452301,
0.04232814535498619,
-0.09967024624347687,
0.19207651913166046,
-0.4968562126159668,
0.014718657359480858,
-0.08922390639781952,
-0.04809786006808281,
0.06301027536392212,
0.1677154004573822,
-0.18332231044769287,
-0.24146577715873718,
0.36401161551475525,
0.25125014781951904,
0.05983549356460571,
0.4667035639286041,
0.23924025893211365,
-0.38408684730529785,
0.4785679280757904,
0.1116812527179718,
0.7710726857185364,
0.2474597692489624,
0.10733545571565628,
0.2562350630760193,
-0.4400929808616638,
0.27828890085220337,
-0.009791374206542969,
-0.013260417617857456,
-0.4400268495082855,
-0.233763188123703,
-0.01054733619093895,
-0.23394107818603516,
0.3223817050457001,
-0.13457442820072174,
-0.1893027424812317,
0.057696398347616196,
-0.23671028017997742,
-0.11946331709623337,
0.12738797068595886,
0.15037280321121216,
-0.09924160689115524,
-0.18415561318397522,
-0.15610376000404358,
0.0969632938504219,
0.16927587985992432,
0.1097305566072464,
-0.11566148698329926,
-0.039514943957328796,
-0.1755986213684082,
-0.32159623503685,
-0.21222439408302307,
0.19046536087989807,
-0.3982684314250946,
0.4196784496307373,
0.15749415755271912,
-0.20017899572849274,
0.23643603920936584,
0.45393550395965576,
0.18932729959487915,
-0.10550291836261749,
-0.11277548223733902,
0.14423617720603943,
0.11200116574764252,
-0.16209116578102112,
0.07247572392225266,
0.2463332712650299,
0.3890644907951355,
-0.07430321723222733,
0.03419813513755798,
0.38855165243148804,
-0.18327166140079498,
-0.4002794027328491,
0.1420225203037262,
0.06763996928930283,
0.043245892971754074,
-0.23007208108901978,
-0.20149093866348267,
-0.17483940720558167,
-0.05476310849189758,
-0.17514777183532715,
0.147023543715477,
0.03132973611354828,
-0.3554784655570984,
0.1370883584022522,
-0.17109976708889008,
-0.3439685106277466,
0.01698918268084526,
0.38314497470855713,
0.1898702085018158,
0.04016689211130142,
0.6141799688339233,
0.07355962693691254,
-0.25458812713623047,
-0.21388505399227142,
0.1335947960615158,
0.19124937057495117,
-0.62235027551651,
0.1904217004776001,
-0.021416522562503815,
-0.2732062041759491,
-0.029417753219604492,
0.3728379011154175,
0.24950259923934937,
0.07783541083335876,
-0.17882214486598969,
-0.24607907235622406,
-0.428485631942749,
0.11749082803726196,
0.04444221034646034,
0.2214086949825287,
-0.37719854712486267,
0.2194172739982605,
-0.17110860347747803,
0.103178009390831,
-0.2955057919025421,
-0.026355629786849022,
-0.5316578149795532,
0.14548428356647491,
0.2224799394607544,
-0.015324385836720467,
-0.1502855271100998,
-0.02151089906692505,
0.14002758264541626,
0.2930784523487091,
-0.09902186691761017,
-0.1772584617137909,
-0.1596524566411972,
0.09779373556375504,
0.19002340734004974,
-0.1416580080986023,
0.00005961954593658447,
-0.01402941346168518,
-0.07470054924488068,
-0.019229821860790253,
-0.08337271213531494,
0.26569053530693054,
-0.0025573670864105225,
0.16257129609584808,
0.1595553457736969,
-0.033375516533851624,
-0.26804155111312866,
0.24136541783809662,
-0.1609545648097992,
0.2795288860797882,
-0.20764602720737457,
0.2113102674484253,
-0.09595108777284622,
0.09591668844223022,
-0.05292639881372452,
0.09137202799320221,
-0.17035174369812012,
-0.05258016288280487,
0.29036810994148254,
-0.34288138151168823,
-0.015550516545772552,
0.18389125168323517,
0.22407057881355286,
0.22856120765209198,
-0.3436901271343231,
0.012690983712673187,
0.14790883660316467,
0.23818010091781616,
-0.28956544399261475,
-0.16199693083763123,
-0.11132695525884628,
-0.2829515039920807,
0.039406076073646545,
0.15308913588523865,
-0.06062738597393036,
-0.12041755020618439,
0.2808241844177246,
0.26463666558265686,
0.20148871839046478,
-0.11933860182762146,
0.401050865650177,
0.3233991861343384,
-0.13719576597213745,
-0.04563349485397339,
0.5149922370910645,
0.24320140480995178,
0.2674027383327484,
0.3243061304092407,
-0.1201210469007492,
0.19134610891342163,
-0.3938050866127014,
-0.0865255668759346,
0.13271696865558624,
-0.15006910264492035,
0.07412679493427277,
-0.3074265122413635,
-0.01670687273144722,
-0.19194567203521729,
-0.12525498867034912,
-0.05134852975606918,
-0.052303194999694824,
-0.06941889971494675,
0.00046334415674209595,
0.07868194580078125,
-0.2117467075586319,
-0.026525575667619705,
0.027291610836982727,
-0.14084982872009277,
-0.10010220855474472,
-0.0014868825674057007,
0.15193066000938416,
-0.03160551190376282,
0.14198365807533264,
0.07675089687108994,
-0.25749874114990234,
-0.26734089851379395,
0.03476652875542641,
0.165971577167511,
0.03169573098421097,
-0.40021413564682007,
0.1568090170621872,
-0.03142855688929558,
-0.04700645059347153,
-0.2851216495037079,
0.43323761224746704,
0.5774037837982178,
0.4171214997768402,
0.10439202189445496,
-0.04928453639149666,
-0.07951289415359497,
-0.1513766497373581,
0.1302853524684906,
0.3273222744464874,
-0.07780224084854126,
0.22529923915863037,
0.3888447880744934,
0.15440931916236877,
-0.24088755249977112,
-0.07401212304830551,
0.07731480896472931,
0.22244518995285034,
-0.26429280638694763,
0.5152069330215454,
-0.02425434999167919,
-0.33644479513168335,
0.01254897192120552,
0.1521034836769104,
-0.4033680260181427,
0.19476701319217682,
0.4406997561454773,
-0.18382270634174347,
0.018053457140922546,
-0.33213943243026733,
0.06533817946910858,
0.03727605193853378,
0.6124904751777649,
0.48521313071250916,
0.33517056703567505,
-0.15982908010482788,
-0.16731733083724976,
-0.3128805160522461,
0.18699117004871368,
-0.11246559023857117,
0.03628339618444443,
0.013686876744031906,
0.06751812994480133,
0.04187149927020073,
0.15657424926757812,
0.18706804513931274,
0.2210918366909027,
-0.2763952314853668,
0.02608480118215084,
-0.38806039094924927,
-0.2455812245607376,
0.10810841619968414,
-0.03884698078036308,
0.08636362105607986,
-0.5342223644256592,
0.09064959734678268,
-0.0824476107954979,
0.16404196619987488,
-0.28465989232063293,
-0.0542563758790493,
0.20082250237464905,
-0.1979013979434967,
0.45428916811943054,
-0.05478053539991379,
0.4595044255256653,
0.020230047404766083,
-0.1561621129512787,
-0.13956424593925476,
-0.5568035840988159,
-0.28128939867019653,
0.1751372516155243,
0.32846924662590027,
0.4226182997226715,
-0.18614041805267334,
-0.38109081983566284,
-0.3425794243812561,
0.13387203216552734,
-0.20194575190544128,
0.10682004690170288,
-0.16240717470645905,
0.17728838324546814,
-0.04089207947254181,
0.11511212587356567,
0.19150277972221375,
-0.09540397673845291,
-0.02851509302854538,
0.19460955262184143,
-0.2638320326805115,
-0.3892172873020172,
0.41564828157424927,
-0.18457314372062683,
-0.3162107765674591,
0.15280799567699432,
0.1361370086669922,
-0.0953700989484787,
-0.08400661498308182,
-0.5766762495040894,
0.23468558490276337,
0.32386383414268494,
-0.09576019644737244,
-0.12282361835241318,
0.23794598877429962,
0.33038240671157837,
0.11651982367038727,
-0.04669814556837082,
0.3443213403224945,
-0.12160798907279968,
-0.01021159440279007,
0.05064907670021057,
-0.11506733298301697
] |
https://github.com/huggingface/datasets/issues/6538 | > > Can you try re-installing `datasets` ?
>
> I tried re-installing. Still getting the same error.
In kaggle I used:
- `%pip install -U datasets`
and then restarted runtime and then everything works fine. | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) | ### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0 | 36 | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0
> > Can you try re-installing `datasets` ?
>
> I tried re-installing. Still getting the same error.
In kaggle I used:
- `%pip install -U datasets`
and then restarted runtime and then everything works fine. | [
-0.256902813911438,
-0.06662493944168091,
-0.05580161139369011,
0.6121095418930054,
0.2748967707157135,
0.06340034306049347,
0.24404215812683105,
0.24720130860805511,
-0.019955575466156006,
0.11987867951393127,
-0.13812042772769928,
0.38939008116722107,
-0.1408829241991043,
0.1007615476846695,
-0.32404372096061707,
-0.32616546750068665,
0.039162781089544296,
0.21027472615242004,
-0.25826671719551086,
-0.02511308342218399,
-0.13907425105571747,
0.1340944766998291,
-0.172745019197464,
0.24685204029083252,
-0.4250190258026123,
-0.26558586955070496,
0.2469814419746399,
0.030495258048176765,
-0.44358178973197937,
-0.39700847864151,
0.24750655889511108,
-0.2310401201248169,
0.37677842378616333,
0.6055502891540527,
-0.00011488998279673979,
0.1920846551656723,
0.3230991065502167,
-0.10012710094451904,
-0.18276391923427582,
-0.26851069927215576,
-0.1036250963807106,
0.03106759488582611,
0.21665579080581665,
-0.10153007507324219,
0.21615839004516602,
0.0005410797894001007,
-0.27494823932647705,
-0.2035241276025772,
0.25661763548851013,
0.526404619216919,
0.2563377916812897,
0.2645606994628906,
0.43410056829452515,
-0.1192169189453125,
-0.061466049402952194,
-0.0923306941986084,
-0.2444404661655426,
0.15163978934288025,
-0.12952443957328796,
0.04484943300485611,
0.005928002297878265,
0.3358690142631531,
-0.028897468000650406,
0.15836332738399506,
0.32255351543426514,
-0.16028258204460144,
0.11113902181386948,
-0.4410451352596283,
0.0145353302359581,
0.052129387855529785,
0.7370848655700684,
-0.3695690631866455,
-0.4370410442352295,
0.15414728224277496,
0.14453935623168945,
0.04207813739776611,
0.180410698056221,
0.10252576321363449,
-0.23504295945167542,
0.13352859020233154,
0.2321055829524994,
-0.11182139813899994,
-0.37119418382644653,
-0.15580841898918152,
-0.20775461196899414,
0.28189292550086975,
-0.07928560674190521,
0.05331495404243469,
0.08881202340126038,
-0.17495179176330566,
0.8017526268959045,
0.001824287697672844,
-0.24544386565685272,
0.19523701071739197,
-0.4660859704017639,
-0.11735111474990845,
-0.020867645740509033,
0.0144905811175704,
-0.321607768535614,
0.08730154484510422,
0.1457754224538803,
-0.08641445636749268,
0.09756240248680115,
0.2448480725288391,
0.08345026522874832,
0.09961158782243729,
0.10073757916688919,
0.5698217749595642,
0.07114965468645096,
-0.03231749311089516,
0.05505339801311493,
-0.09617455303668976,
-0.24876058101654053,
-0.40744882822036743,
-0.024745170027017593,
-0.18364641070365906,
0.246136873960495,
-0.1124357208609581,
-0.3068576753139496,
0.14300671219825745,
-0.1927705705165863,
-0.04361412301659584,
-0.021950362250208855,
0.40578997135162354,
-0.0212737824767828,
0.28545406460762024,
0.31094586849212646,
0.15615573525428772,
0.12214254587888718,
0.12312217801809311,
-0.20654675364494324,
0.33852919936180115,
-0.14966563880443573,
-0.12863649427890778,
-0.12041734158992767,
-0.06161477416753769,
0.2588486075401306,
-0.11313822865486145,
-0.08800972998142242,
-0.1768268346786499,
-0.014624115079641342,
-0.33047088980674744,
0.020192649215459824,
0.19396111369132996,
-0.0659535825252533,
0.04192115366458893,
0.24863044917583466,
-0.2537769675254822,
-0.1377231925725937,
-0.059625353664159775,
-0.3462243378162384,
-0.16181938350200653,
-0.4648602306842804,
0.196210116147995,
0.05868682265281677,
-0.1515142023563385,
-0.08748701214790344,
-0.45019403100013733,
0.18756400048732758,
0.05569201707839966,
-0.005037479102611542,
-0.19469645619392395,
0.10776174813508987,
-0.014502028003334999,
-0.03426451236009598,
0.3410903215408325,
-0.3945315480232239,
-0.0010110437870025635,
0.3809555768966675,
-0.1595524251461029,
-0.02658456563949585,
0.12249168008565903,
-0.09577785432338715,
0.39026060700416565,
-0.09571227431297302,
-0.15573160350322723,
0.567808210849762,
-0.5921734571456909,
-0.26608705520629883,
0.05019427090883255,
-0.04213886708021164,
-0.1447429656982422,
0.3695034384727478,
-0.06576819717884064,
-0.039474405348300934,
0.07813966274261475,
0.08266063779592514,
0.144344300031662,
0.025286955758929253,
0.036696262657642365,
-0.06944005191326141,
-0.1120612770318985,
0.07201431691646576,
0.14142988622188568,
0.14674213528633118,
0.03374359384179115,
0.0999671220779419,
0.06819626688957214,
0.32104992866516113,
-0.055073726922273636,
-0.04141709953546524,
0.6366989016532898,
0.1728818714618683,
0.2089121788740158,
0.046118222177028656,
-0.25871551036834717,
-0.09337187558412552,
0.09669534862041473,
-0.09548264741897583,
0.20620690286159515,
-0.5495560765266418,
0.039022721350193024,
-0.28502604365348816,
0.35468095541000366,
-0.3013054132461548,
-0.17267537117004395,
0.14956888556480408,
0.11204648017883301,
0.15216058492660522,
0.08011548221111298,
-0.052536491304636,
0.4499247670173645,
-0.268441379070282,
0.3102836608886719,
-0.393457293510437,
0.3476170003414154,
-0.3230850398540497,
-0.3127036988735199,
0.04742034524679184,
0.17949096858501434,
0.024485832080245018,
-0.04163544625043869,
-0.30319371819496155,
0.16406658291816711,
0.0453663095831871,
0.20532071590423584,
-0.31083378195762634,
-0.03053329885005951,
-0.0025202278047800064,
-0.27089670300483704,
0.02911042608320713,
-0.11259222775697708,
0.31119304895401,
0.10925492644309998,
0.05677122250199318,
-0.041405417025089264,
-0.08253021538257599,
0.3201824128627777,
0.1547757238149643,
0.22164899110794067,
0.2683151960372925,
0.04771827161312103,
0.1253909170627594,
-0.23968012630939484,
0.017539357766509056,
0.18916183710098267,
0.21758733689785004,
0.12453307956457138,
-0.02025003731250763,
-0.3259884715080261,
0.3841291666030884,
0.1633160412311554,
-0.023884344846010208,
-0.06235859915614128,
-0.2212226390838623,
0.2503383159637451,
0.3229474723339081,
0.3707652986049652,
0.35874050855636597,
0.09806711226701736,
-0.2662656605243683,
0.11245916038751602,
0.07017193734645844,
-0.0723481997847557,
0.2630462050437927,
0.1803167313337326,
0.37655019760131836,
0.25856801867485046,
0.01693122833967209,
0.12798240780830383,
-0.13936102390289307,
-0.4716644883155823,
-0.10985515266656876,
0.37011659145355225,
-0.29064542055130005,
-0.001737736165523529,
-0.12793463468551636,
-0.05703889578580856,
-0.3960559070110321,
-0.026670046150684357,
-0.15691319108009338,
-0.264887273311615,
-0.4273056983947754,
0.3287535309791565,
-0.05488137900829315,
0.29113078117370605,
-0.19480302929878235,
-0.24224235117435455,
0.19393393397331238,
-0.12218492478132248,
-0.1903228759765625,
-0.36165642738342285,
0.08080045878887177,
0.03458442538976669,
0.18995380401611328,
0.1496807038784027,
0.3307649493217468,
-0.107923224568367,
0.29579442739486694,
-0.3171854615211487,
-0.23514088988304138,
0.14393962919712067,
-0.0386446937918663,
-0.034761302173137665,
0.3126859962940216,
0.1878063678741455,
0.25660091638565063,
-0.5176385641098022,
0.09446390718221664,
-0.14445345103740692,
-0.189145028591156,
0.08693961799144745,
-0.052748166024684906,
-0.18511644005775452,
0.12090454995632172,
-0.2517589330673218,
-0.48113560676574707,
-0.5694224238395691,
0.13440638780593872,
0.24150867760181427,
0.08420412242412567,
0.26392337679862976,
0.1586868315935135,
0.31294816732406616,
0.08068373054265976,
0.4144498109817505,
0.23354190587997437,
-0.07358457148075104,
0.30034497380256653,
-0.15435391664505005,
-0.2662021815776825,
0.05075201392173767,
-0.09570382535457611,
0.4410252571105957,
-0.027559194713830948,
-0.35064196586608887,
-0.13104456663131714,
-0.24551378190517426,
0.16854546964168549,
-0.1461605727672577,
0.2192200869321823,
0.37877804040908813,
0.414222776889801,
0.004855979233980179,
-0.10502402484416962,
0.09298646450042725,
-0.03882167488336563,
-0.27470752596855164,
-0.06299746781587601,
-0.016450056806206703,
0.4377359449863434,
-0.19663459062576294,
0.2570459842681885,
0.23741205036640167,
-0.16500329971313477,
0.23736384510993958,
0.08955816179513931,
0.28659358620643616,
-0.16709105670452118,
-0.27347826957702637,
-0.17229416966438293,
-0.180995911359787,
0.10606499016284943,
-0.047507673501968384,
-0.24346637725830078,
-0.01947050914168358,
-0.12351600080728531,
-0.06241896376013756,
-0.04349275678396225,
-0.027372416108846664,
-0.07372915744781494,
-0.42088621854782104,
0.23319081962108612,
-0.08653128147125244,
-0.06325040012598038,
-0.17037665843963623,
0.036015868186950684,
0.18266384303569794,
0.04490106925368309,
-0.1402004361152649,
-0.07022362947463989,
-0.2805652320384979,
-0.027860542759299278,
-0.29643091559410095,
0.09792312979698181,
0.13958683609962463,
0.3668658137321472,
0.11172240972518921,
-0.05322970822453499,
0.06627233326435089,
0.006396360695362091,
0.2152082473039627,
-0.18715506792068481,
-0.23747441172599792,
0.14924632012844086,
-0.068037249147892,
-0.44537559151649475,
-0.03558829426765442,
-0.1686117947101593,
0.0898018404841423,
0.15014395117759705,
0.1917921006679535,
-0.06652428209781647,
-0.17009872198104858,
0.4521212577819824,
0.06473669409751892,
-0.11619039624929428,
-0.030791480094194412,
-0.15608495473861694,
-0.3060137629508972,
-0.3745065927505493,
-0.07876864075660706,
0.2592592239379883,
0.46490445733070374,
0.2863294184207916,
0.19665184617042542,
-0.2955895662307739,
-0.12551334500312805,
-0.048651427030563354,
0.02841978147625923,
0.1900259554386139,
-0.046729035675525665,
0.09548941254615784,
0.08056318014860153,
0.3972302973270416,
0.5442346930503845,
0.6393277645111084,
-0.3564460575580597,
-0.5447501540184021,
-0.05768277868628502,
-0.1703615039587021,
0.3061317503452301,
0.04232814535498619,
-0.09967024624347687,
0.19207651913166046,
-0.4968562126159668,
0.014718657359480858,
-0.08922390639781952,
-0.04809786006808281,
0.06301027536392212,
0.1677154004573822,
-0.18332231044769287,
-0.24146577715873718,
0.36401161551475525,
0.25125014781951904,
0.05983549356460571,
0.4667035639286041,
0.23924025893211365,
-0.38408684730529785,
0.4785679280757904,
0.1116812527179718,
0.7710726857185364,
0.2474597692489624,
0.10733545571565628,
0.2562350630760193,
-0.4400929808616638,
0.27828890085220337,
-0.009791374206542969,
-0.013260417617857456,
-0.4400268495082855,
-0.233763188123703,
-0.01054733619093895,
-0.23394107818603516,
0.3223817050457001,
-0.13457442820072174,
-0.1893027424812317,
0.057696398347616196,
-0.23671028017997742,
-0.11946331709623337,
0.12738797068595886,
0.15037280321121216,
-0.09924160689115524,
-0.18415561318397522,
-0.15610376000404358,
0.0969632938504219,
0.16927587985992432,
0.1097305566072464,
-0.11566148698329926,
-0.039514943957328796,
-0.1755986213684082,
-0.32159623503685,
-0.21222439408302307,
0.19046536087989807,
-0.3982684314250946,
0.4196784496307373,
0.15749415755271912,
-0.20017899572849274,
0.23643603920936584,
0.45393550395965576,
0.18932729959487915,
-0.10550291836261749,
-0.11277548223733902,
0.14423617720603943,
0.11200116574764252,
-0.16209116578102112,
0.07247572392225266,
0.2463332712650299,
0.3890644907951355,
-0.07430321723222733,
0.03419813513755798,
0.38855165243148804,
-0.18327166140079498,
-0.4002794027328491,
0.1420225203037262,
0.06763996928930283,
0.043245892971754074,
-0.23007208108901978,
-0.20149093866348267,
-0.17483940720558167,
-0.05476310849189758,
-0.17514777183532715,
0.147023543715477,
0.03132973611354828,
-0.3554784655570984,
0.1370883584022522,
-0.17109976708889008,
-0.3439685106277466,
0.01698918268084526,
0.38314497470855713,
0.1898702085018158,
0.04016689211130142,
0.6141799688339233,
0.07355962693691254,
-0.25458812713623047,
-0.21388505399227142,
0.1335947960615158,
0.19124937057495117,
-0.62235027551651,
0.1904217004776001,
-0.021416522562503815,
-0.2732062041759491,
-0.029417753219604492,
0.3728379011154175,
0.24950259923934937,
0.07783541083335876,
-0.17882214486598969,
-0.24607907235622406,
-0.428485631942749,
0.11749082803726196,
0.04444221034646034,
0.2214086949825287,
-0.37719854712486267,
0.2194172739982605,
-0.17110860347747803,
0.103178009390831,
-0.2955057919025421,
-0.026355629786849022,
-0.5316578149795532,
0.14548428356647491,
0.2224799394607544,
-0.015324385836720467,
-0.1502855271100998,
-0.02151089906692505,
0.14002758264541626,
0.2930784523487091,
-0.09902186691761017,
-0.1772584617137909,
-0.1596524566411972,
0.09779373556375504,
0.19002340734004974,
-0.1416580080986023,
0.00005961954593658447,
-0.01402941346168518,
-0.07470054924488068,
-0.019229821860790253,
-0.08337271213531494,
0.26569053530693054,
-0.0025573670864105225,
0.16257129609584808,
0.1595553457736969,
-0.033375516533851624,
-0.26804155111312866,
0.24136541783809662,
-0.1609545648097992,
0.2795288860797882,
-0.20764602720737457,
0.2113102674484253,
-0.09595108777284622,
0.09591668844223022,
-0.05292639881372452,
0.09137202799320221,
-0.17035174369812012,
-0.05258016288280487,
0.29036810994148254,
-0.34288138151168823,
-0.015550516545772552,
0.18389125168323517,
0.22407057881355286,
0.22856120765209198,
-0.3436901271343231,
0.012690983712673187,
0.14790883660316467,
0.23818010091781616,
-0.28956544399261475,
-0.16199693083763123,
-0.11132695525884628,
-0.2829515039920807,
0.039406076073646545,
0.15308913588523865,
-0.06062738597393036,
-0.12041755020618439,
0.2808241844177246,
0.26463666558265686,
0.20148871839046478,
-0.11933860182762146,
0.401050865650177,
0.3233991861343384,
-0.13719576597213745,
-0.04563349485397339,
0.5149922370910645,
0.24320140480995178,
0.2674027383327484,
0.3243061304092407,
-0.1201210469007492,
0.19134610891342163,
-0.3938050866127014,
-0.0865255668759346,
0.13271696865558624,
-0.15006910264492035,
0.07412679493427277,
-0.3074265122413635,
-0.01670687273144722,
-0.19194567203521729,
-0.12525498867034912,
-0.05134852975606918,
-0.052303194999694824,
-0.06941889971494675,
0.00046334415674209595,
0.07868194580078125,
-0.2117467075586319,
-0.026525575667619705,
0.027291610836982727,
-0.14084982872009277,
-0.10010220855474472,
-0.0014868825674057007,
0.15193066000938416,
-0.03160551190376282,
0.14198365807533264,
0.07675089687108994,
-0.25749874114990234,
-0.26734089851379395,
0.03476652875542641,
0.165971577167511,
0.03169573098421097,
-0.40021413564682007,
0.1568090170621872,
-0.03142855688929558,
-0.04700645059347153,
-0.2851216495037079,
0.43323761224746704,
0.5774037837982178,
0.4171214997768402,
0.10439202189445496,
-0.04928453639149666,
-0.07951289415359497,
-0.1513766497373581,
0.1302853524684906,
0.3273222744464874,
-0.07780224084854126,
0.22529923915863037,
0.3888447880744934,
0.15440931916236877,
-0.24088755249977112,
-0.07401212304830551,
0.07731480896472931,
0.22244518995285034,
-0.26429280638694763,
0.5152069330215454,
-0.02425434999167919,
-0.33644479513168335,
0.01254897192120552,
0.1521034836769104,
-0.4033680260181427,
0.19476701319217682,
0.4406997561454773,
-0.18382270634174347,
0.018053457140922546,
-0.33213943243026733,
0.06533817946910858,
0.03727605193853378,
0.6124904751777649,
0.48521313071250916,
0.33517056703567505,
-0.15982908010482788,
-0.16731733083724976,
-0.3128805160522461,
0.18699117004871368,
-0.11246559023857117,
0.03628339618444443,
0.013686876744031906,
0.06751812994480133,
0.04187149927020073,
0.15657424926757812,
0.18706804513931274,
0.2210918366909027,
-0.2763952314853668,
0.02608480118215084,
-0.38806039094924927,
-0.2455812245607376,
0.10810841619968414,
-0.03884698078036308,
0.08636362105607986,
-0.5342223644256592,
0.09064959734678268,
-0.0824476107954979,
0.16404196619987488,
-0.28465989232063293,
-0.0542563758790493,
0.20082250237464905,
-0.1979013979434967,
0.45428916811943054,
-0.05478053539991379,
0.4595044255256653,
0.020230047404766083,
-0.1561621129512787,
-0.13956424593925476,
-0.5568035840988159,
-0.28128939867019653,
0.1751372516155243,
0.32846924662590027,
0.4226182997226715,
-0.18614041805267334,
-0.38109081983566284,
-0.3425794243812561,
0.13387203216552734,
-0.20194575190544128,
0.10682004690170288,
-0.16240717470645905,
0.17728838324546814,
-0.04089207947254181,
0.11511212587356567,
0.19150277972221375,
-0.09540397673845291,
-0.02851509302854538,
0.19460955262184143,
-0.2638320326805115,
-0.3892172873020172,
0.41564828157424927,
-0.18457314372062683,
-0.3162107765674591,
0.15280799567699432,
0.1361370086669922,
-0.0953700989484787,
-0.08400661498308182,
-0.5766762495040894,
0.23468558490276337,
0.32386383414268494,
-0.09576019644737244,
-0.12282361835241318,
0.23794598877429962,
0.33038240671157837,
0.11651982367038727,
-0.04669814556837082,
0.3443213403224945,
-0.12160798907279968,
-0.01021159440279007,
0.05064907670021057,
-0.11506733298301697
] |
https://github.com/huggingface/datasets/issues/6538 | > > > Can you try re-installing `datasets` ?
> >
> >
> > I tried re-installing. Still getting the same error.
>
> In kaggle I used:
>
> * `%pip install -U datasets`
> and then restarted runtime and then everything works fine.
Yes, this is working. When I restart the runtime after installing packages, it's working perfectly. Thank you so much. But why do we need to restart runtime every time after installing packages? | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) | ### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0 | 78 | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0
> > > Can you try re-installing `datasets` ?
> >
> >
> > I tried re-installing. Still getting the same error.
>
> In kaggle I used:
>
> * `%pip install -U datasets`
> and then restarted runtime and then everything works fine.
Yes, this is working. When I restart the runtime after installing packages, it's working perfectly. Thank you so much. But why do we need to restart runtime every time after installing packages? | [
-0.256902813911438,
-0.06662493944168091,
-0.05580161139369011,
0.6121095418930054,
0.2748967707157135,
0.06340034306049347,
0.24404215812683105,
0.24720130860805511,
-0.019955575466156006,
0.11987867951393127,
-0.13812042772769928,
0.38939008116722107,
-0.1408829241991043,
0.1007615476846695,
-0.32404372096061707,
-0.32616546750068665,
0.039162781089544296,
0.21027472615242004,
-0.25826671719551086,
-0.02511308342218399,
-0.13907425105571747,
0.1340944766998291,
-0.172745019197464,
0.24685204029083252,
-0.4250190258026123,
-0.26558586955070496,
0.2469814419746399,
0.030495258048176765,
-0.44358178973197937,
-0.39700847864151,
0.24750655889511108,
-0.2310401201248169,
0.37677842378616333,
0.6055502891540527,
-0.00011488998279673979,
0.1920846551656723,
0.3230991065502167,
-0.10012710094451904,
-0.18276391923427582,
-0.26851069927215576,
-0.1036250963807106,
0.03106759488582611,
0.21665579080581665,
-0.10153007507324219,
0.21615839004516602,
0.0005410797894001007,
-0.27494823932647705,
-0.2035241276025772,
0.25661763548851013,
0.526404619216919,
0.2563377916812897,
0.2645606994628906,
0.43410056829452515,
-0.1192169189453125,
-0.061466049402952194,
-0.0923306941986084,
-0.2444404661655426,
0.15163978934288025,
-0.12952443957328796,
0.04484943300485611,
0.005928002297878265,
0.3358690142631531,
-0.028897468000650406,
0.15836332738399506,
0.32255351543426514,
-0.16028258204460144,
0.11113902181386948,
-0.4410451352596283,
0.0145353302359581,
0.052129387855529785,
0.7370848655700684,
-0.3695690631866455,
-0.4370410442352295,
0.15414728224277496,
0.14453935623168945,
0.04207813739776611,
0.180410698056221,
0.10252576321363449,
-0.23504295945167542,
0.13352859020233154,
0.2321055829524994,
-0.11182139813899994,
-0.37119418382644653,
-0.15580841898918152,
-0.20775461196899414,
0.28189292550086975,
-0.07928560674190521,
0.05331495404243469,
0.08881202340126038,
-0.17495179176330566,
0.8017526268959045,
0.001824287697672844,
-0.24544386565685272,
0.19523701071739197,
-0.4660859704017639,
-0.11735111474990845,
-0.020867645740509033,
0.0144905811175704,
-0.321607768535614,
0.08730154484510422,
0.1457754224538803,
-0.08641445636749268,
0.09756240248680115,
0.2448480725288391,
0.08345026522874832,
0.09961158782243729,
0.10073757916688919,
0.5698217749595642,
0.07114965468645096,
-0.03231749311089516,
0.05505339801311493,
-0.09617455303668976,
-0.24876058101654053,
-0.40744882822036743,
-0.024745170027017593,
-0.18364641070365906,
0.246136873960495,
-0.1124357208609581,
-0.3068576753139496,
0.14300671219825745,
-0.1927705705165863,
-0.04361412301659584,
-0.021950362250208855,
0.40578997135162354,
-0.0212737824767828,
0.28545406460762024,
0.31094586849212646,
0.15615573525428772,
0.12214254587888718,
0.12312217801809311,
-0.20654675364494324,
0.33852919936180115,
-0.14966563880443573,
-0.12863649427890778,
-0.12041734158992767,
-0.06161477416753769,
0.2588486075401306,
-0.11313822865486145,
-0.08800972998142242,
-0.1768268346786499,
-0.014624115079641342,
-0.33047088980674744,
0.020192649215459824,
0.19396111369132996,
-0.0659535825252533,
0.04192115366458893,
0.24863044917583466,
-0.2537769675254822,
-0.1377231925725937,
-0.059625353664159775,
-0.3462243378162384,
-0.16181938350200653,
-0.4648602306842804,
0.196210116147995,
0.05868682265281677,
-0.1515142023563385,
-0.08748701214790344,
-0.45019403100013733,
0.18756400048732758,
0.05569201707839966,
-0.005037479102611542,
-0.19469645619392395,
0.10776174813508987,
-0.014502028003334999,
-0.03426451236009598,
0.3410903215408325,
-0.3945315480232239,
-0.0010110437870025635,
0.3809555768966675,
-0.1595524251461029,
-0.02658456563949585,
0.12249168008565903,
-0.09577785432338715,
0.39026060700416565,
-0.09571227431297302,
-0.15573160350322723,
0.567808210849762,
-0.5921734571456909,
-0.26608705520629883,
0.05019427090883255,
-0.04213886708021164,
-0.1447429656982422,
0.3695034384727478,
-0.06576819717884064,
-0.039474405348300934,
0.07813966274261475,
0.08266063779592514,
0.144344300031662,
0.025286955758929253,
0.036696262657642365,
-0.06944005191326141,
-0.1120612770318985,
0.07201431691646576,
0.14142988622188568,
0.14674213528633118,
0.03374359384179115,
0.0999671220779419,
0.06819626688957214,
0.32104992866516113,
-0.055073726922273636,
-0.04141709953546524,
0.6366989016532898,
0.1728818714618683,
0.2089121788740158,
0.046118222177028656,
-0.25871551036834717,
-0.09337187558412552,
0.09669534862041473,
-0.09548264741897583,
0.20620690286159515,
-0.5495560765266418,
0.039022721350193024,
-0.28502604365348816,
0.35468095541000366,
-0.3013054132461548,
-0.17267537117004395,
0.14956888556480408,
0.11204648017883301,
0.15216058492660522,
0.08011548221111298,
-0.052536491304636,
0.4499247670173645,
-0.268441379070282,
0.3102836608886719,
-0.393457293510437,
0.3476170003414154,
-0.3230850398540497,
-0.3127036988735199,
0.04742034524679184,
0.17949096858501434,
0.024485832080245018,
-0.04163544625043869,
-0.30319371819496155,
0.16406658291816711,
0.0453663095831871,
0.20532071590423584,
-0.31083378195762634,
-0.03053329885005951,
-0.0025202278047800064,
-0.27089670300483704,
0.02911042608320713,
-0.11259222775697708,
0.31119304895401,
0.10925492644309998,
0.05677122250199318,
-0.041405417025089264,
-0.08253021538257599,
0.3201824128627777,
0.1547757238149643,
0.22164899110794067,
0.2683151960372925,
0.04771827161312103,
0.1253909170627594,
-0.23968012630939484,
0.017539357766509056,
0.18916183710098267,
0.21758733689785004,
0.12453307956457138,
-0.02025003731250763,
-0.3259884715080261,
0.3841291666030884,
0.1633160412311554,
-0.023884344846010208,
-0.06235859915614128,
-0.2212226390838623,
0.2503383159637451,
0.3229474723339081,
0.3707652986049652,
0.35874050855636597,
0.09806711226701736,
-0.2662656605243683,
0.11245916038751602,
0.07017193734645844,
-0.0723481997847557,
0.2630462050437927,
0.1803167313337326,
0.37655019760131836,
0.25856801867485046,
0.01693122833967209,
0.12798240780830383,
-0.13936102390289307,
-0.4716644883155823,
-0.10985515266656876,
0.37011659145355225,
-0.29064542055130005,
-0.001737736165523529,
-0.12793463468551636,
-0.05703889578580856,
-0.3960559070110321,
-0.026670046150684357,
-0.15691319108009338,
-0.264887273311615,
-0.4273056983947754,
0.3287535309791565,
-0.05488137900829315,
0.29113078117370605,
-0.19480302929878235,
-0.24224235117435455,
0.19393393397331238,
-0.12218492478132248,
-0.1903228759765625,
-0.36165642738342285,
0.08080045878887177,
0.03458442538976669,
0.18995380401611328,
0.1496807038784027,
0.3307649493217468,
-0.107923224568367,
0.29579442739486694,
-0.3171854615211487,
-0.23514088988304138,
0.14393962919712067,
-0.0386446937918663,
-0.034761302173137665,
0.3126859962940216,
0.1878063678741455,
0.25660091638565063,
-0.5176385641098022,
0.09446390718221664,
-0.14445345103740692,
-0.189145028591156,
0.08693961799144745,
-0.052748166024684906,
-0.18511644005775452,
0.12090454995632172,
-0.2517589330673218,
-0.48113560676574707,
-0.5694224238395691,
0.13440638780593872,
0.24150867760181427,
0.08420412242412567,
0.26392337679862976,
0.1586868315935135,
0.31294816732406616,
0.08068373054265976,
0.4144498109817505,
0.23354190587997437,
-0.07358457148075104,
0.30034497380256653,
-0.15435391664505005,
-0.2662021815776825,
0.05075201392173767,
-0.09570382535457611,
0.4410252571105957,
-0.027559194713830948,
-0.35064196586608887,
-0.13104456663131714,
-0.24551378190517426,
0.16854546964168549,
-0.1461605727672577,
0.2192200869321823,
0.37877804040908813,
0.414222776889801,
0.004855979233980179,
-0.10502402484416962,
0.09298646450042725,
-0.03882167488336563,
-0.27470752596855164,
-0.06299746781587601,
-0.016450056806206703,
0.4377359449863434,
-0.19663459062576294,
0.2570459842681885,
0.23741205036640167,
-0.16500329971313477,
0.23736384510993958,
0.08955816179513931,
0.28659358620643616,
-0.16709105670452118,
-0.27347826957702637,
-0.17229416966438293,
-0.180995911359787,
0.10606499016284943,
-0.047507673501968384,
-0.24346637725830078,
-0.01947050914168358,
-0.12351600080728531,
-0.06241896376013756,
-0.04349275678396225,
-0.027372416108846664,
-0.07372915744781494,
-0.42088621854782104,
0.23319081962108612,
-0.08653128147125244,
-0.06325040012598038,
-0.17037665843963623,
0.036015868186950684,
0.18266384303569794,
0.04490106925368309,
-0.1402004361152649,
-0.07022362947463989,
-0.2805652320384979,
-0.027860542759299278,
-0.29643091559410095,
0.09792312979698181,
0.13958683609962463,
0.3668658137321472,
0.11172240972518921,
-0.05322970822453499,
0.06627233326435089,
0.006396360695362091,
0.2152082473039627,
-0.18715506792068481,
-0.23747441172599792,
0.14924632012844086,
-0.068037249147892,
-0.44537559151649475,
-0.03558829426765442,
-0.1686117947101593,
0.0898018404841423,
0.15014395117759705,
0.1917921006679535,
-0.06652428209781647,
-0.17009872198104858,
0.4521212577819824,
0.06473669409751892,
-0.11619039624929428,
-0.030791480094194412,
-0.15608495473861694,
-0.3060137629508972,
-0.3745065927505493,
-0.07876864075660706,
0.2592592239379883,
0.46490445733070374,
0.2863294184207916,
0.19665184617042542,
-0.2955895662307739,
-0.12551334500312805,
-0.048651427030563354,
0.02841978147625923,
0.1900259554386139,
-0.046729035675525665,
0.09548941254615784,
0.08056318014860153,
0.3972302973270416,
0.5442346930503845,
0.6393277645111084,
-0.3564460575580597,
-0.5447501540184021,
-0.05768277868628502,
-0.1703615039587021,
0.3061317503452301,
0.04232814535498619,
-0.09967024624347687,
0.19207651913166046,
-0.4968562126159668,
0.014718657359480858,
-0.08922390639781952,
-0.04809786006808281,
0.06301027536392212,
0.1677154004573822,
-0.18332231044769287,
-0.24146577715873718,
0.36401161551475525,
0.25125014781951904,
0.05983549356460571,
0.4667035639286041,
0.23924025893211365,
-0.38408684730529785,
0.4785679280757904,
0.1116812527179718,
0.7710726857185364,
0.2474597692489624,
0.10733545571565628,
0.2562350630760193,
-0.4400929808616638,
0.27828890085220337,
-0.009791374206542969,
-0.013260417617857456,
-0.4400268495082855,
-0.233763188123703,
-0.01054733619093895,
-0.23394107818603516,
0.3223817050457001,
-0.13457442820072174,
-0.1893027424812317,
0.057696398347616196,
-0.23671028017997742,
-0.11946331709623337,
0.12738797068595886,
0.15037280321121216,
-0.09924160689115524,
-0.18415561318397522,
-0.15610376000404358,
0.0969632938504219,
0.16927587985992432,
0.1097305566072464,
-0.11566148698329926,
-0.039514943957328796,
-0.1755986213684082,
-0.32159623503685,
-0.21222439408302307,
0.19046536087989807,
-0.3982684314250946,
0.4196784496307373,
0.15749415755271912,
-0.20017899572849274,
0.23643603920936584,
0.45393550395965576,
0.18932729959487915,
-0.10550291836261749,
-0.11277548223733902,
0.14423617720603943,
0.11200116574764252,
-0.16209116578102112,
0.07247572392225266,
0.2463332712650299,
0.3890644907951355,
-0.07430321723222733,
0.03419813513755798,
0.38855165243148804,
-0.18327166140079498,
-0.4002794027328491,
0.1420225203037262,
0.06763996928930283,
0.043245892971754074,
-0.23007208108901978,
-0.20149093866348267,
-0.17483940720558167,
-0.05476310849189758,
-0.17514777183532715,
0.147023543715477,
0.03132973611354828,
-0.3554784655570984,
0.1370883584022522,
-0.17109976708889008,
-0.3439685106277466,
0.01698918268084526,
0.38314497470855713,
0.1898702085018158,
0.04016689211130142,
0.6141799688339233,
0.07355962693691254,
-0.25458812713623047,
-0.21388505399227142,
0.1335947960615158,
0.19124937057495117,
-0.62235027551651,
0.1904217004776001,
-0.021416522562503815,
-0.2732062041759491,
-0.029417753219604492,
0.3728379011154175,
0.24950259923934937,
0.07783541083335876,
-0.17882214486598969,
-0.24607907235622406,
-0.428485631942749,
0.11749082803726196,
0.04444221034646034,
0.2214086949825287,
-0.37719854712486267,
0.2194172739982605,
-0.17110860347747803,
0.103178009390831,
-0.2955057919025421,
-0.026355629786849022,
-0.5316578149795532,
0.14548428356647491,
0.2224799394607544,
-0.015324385836720467,
-0.1502855271100998,
-0.02151089906692505,
0.14002758264541626,
0.2930784523487091,
-0.09902186691761017,
-0.1772584617137909,
-0.1596524566411972,
0.09779373556375504,
0.19002340734004974,
-0.1416580080986023,
0.00005961954593658447,
-0.01402941346168518,
-0.07470054924488068,
-0.019229821860790253,
-0.08337271213531494,
0.26569053530693054,
-0.0025573670864105225,
0.16257129609584808,
0.1595553457736969,
-0.033375516533851624,
-0.26804155111312866,
0.24136541783809662,
-0.1609545648097992,
0.2795288860797882,
-0.20764602720737457,
0.2113102674484253,
-0.09595108777284622,
0.09591668844223022,
-0.05292639881372452,
0.09137202799320221,
-0.17035174369812012,
-0.05258016288280487,
0.29036810994148254,
-0.34288138151168823,
-0.015550516545772552,
0.18389125168323517,
0.22407057881355286,
0.22856120765209198,
-0.3436901271343231,
0.012690983712673187,
0.14790883660316467,
0.23818010091781616,
-0.28956544399261475,
-0.16199693083763123,
-0.11132695525884628,
-0.2829515039920807,
0.039406076073646545,
0.15308913588523865,
-0.06062738597393036,
-0.12041755020618439,
0.2808241844177246,
0.26463666558265686,
0.20148871839046478,
-0.11933860182762146,
0.401050865650177,
0.3233991861343384,
-0.13719576597213745,
-0.04563349485397339,
0.5149922370910645,
0.24320140480995178,
0.2674027383327484,
0.3243061304092407,
-0.1201210469007492,
0.19134610891342163,
-0.3938050866127014,
-0.0865255668759346,
0.13271696865558624,
-0.15006910264492035,
0.07412679493427277,
-0.3074265122413635,
-0.01670687273144722,
-0.19194567203521729,
-0.12525498867034912,
-0.05134852975606918,
-0.052303194999694824,
-0.06941889971494675,
0.00046334415674209595,
0.07868194580078125,
-0.2117467075586319,
-0.026525575667619705,
0.027291610836982727,
-0.14084982872009277,
-0.10010220855474472,
-0.0014868825674057007,
0.15193066000938416,
-0.03160551190376282,
0.14198365807533264,
0.07675089687108994,
-0.25749874114990234,
-0.26734089851379395,
0.03476652875542641,
0.165971577167511,
0.03169573098421097,
-0.40021413564682007,
0.1568090170621872,
-0.03142855688929558,
-0.04700645059347153,
-0.2851216495037079,
0.43323761224746704,
0.5774037837982178,
0.4171214997768402,
0.10439202189445496,
-0.04928453639149666,
-0.07951289415359497,
-0.1513766497373581,
0.1302853524684906,
0.3273222744464874,
-0.07780224084854126,
0.22529923915863037,
0.3888447880744934,
0.15440931916236877,
-0.24088755249977112,
-0.07401212304830551,
0.07731480896472931,
0.22244518995285034,
-0.26429280638694763,
0.5152069330215454,
-0.02425434999167919,
-0.33644479513168335,
0.01254897192120552,
0.1521034836769104,
-0.4033680260181427,
0.19476701319217682,
0.4406997561454773,
-0.18382270634174347,
0.018053457140922546,
-0.33213943243026733,
0.06533817946910858,
0.03727605193853378,
0.6124904751777649,
0.48521313071250916,
0.33517056703567505,
-0.15982908010482788,
-0.16731733083724976,
-0.3128805160522461,
0.18699117004871368,
-0.11246559023857117,
0.03628339618444443,
0.013686876744031906,
0.06751812994480133,
0.04187149927020073,
0.15657424926757812,
0.18706804513931274,
0.2210918366909027,
-0.2763952314853668,
0.02608480118215084,
-0.38806039094924927,
-0.2455812245607376,
0.10810841619968414,
-0.03884698078036308,
0.08636362105607986,
-0.5342223644256592,
0.09064959734678268,
-0.0824476107954979,
0.16404196619987488,
-0.28465989232063293,
-0.0542563758790493,
0.20082250237464905,
-0.1979013979434967,
0.45428916811943054,
-0.05478053539991379,
0.4595044255256653,
0.020230047404766083,
-0.1561621129512787,
-0.13956424593925476,
-0.5568035840988159,
-0.28128939867019653,
0.1751372516155243,
0.32846924662590027,
0.4226182997226715,
-0.18614041805267334,
-0.38109081983566284,
-0.3425794243812561,
0.13387203216552734,
-0.20194575190544128,
0.10682004690170288,
-0.16240717470645905,
0.17728838324546814,
-0.04089207947254181,
0.11511212587356567,
0.19150277972221375,
-0.09540397673845291,
-0.02851509302854538,
0.19460955262184143,
-0.2638320326805115,
-0.3892172873020172,
0.41564828157424927,
-0.18457314372062683,
-0.3162107765674591,
0.15280799567699432,
0.1361370086669922,
-0.0953700989484787,
-0.08400661498308182,
-0.5766762495040894,
0.23468558490276337,
0.32386383414268494,
-0.09576019644737244,
-0.12282361835241318,
0.23794598877429962,
0.33038240671157837,
0.11651982367038727,
-0.04669814556837082,
0.3443213403224945,
-0.12160798907279968,
-0.01021159440279007,
0.05064907670021057,
-0.11506733298301697
] |
https://github.com/huggingface/datasets/issues/6538 | > > > > Can you try re-installing `datasets` ?
> > >
> > >
> > > I tried re-installing. Still getting the same error.
> >
> >
> > In kaggle I used:
> >
> > * `%pip install -U datasets`
> > and then restarted runtime and then everything works fine.
>
> Yes, this is working. When I restart the runtime after installing packages, it's working perfectly. Thank you so much. But why do we need to restart runtime every time after installing packages?
For some packages it is required.
https://stackoverflow.com/questions/57831187/need-to-restart-runtime-before-import-an-installed-package-in-colab
| ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) | ### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0 | 98 | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0
> > > > Can you try re-installing `datasets` ?
> > >
> > >
> > > I tried re-installing. Still getting the same error.
> >
> >
> > In kaggle I used:
> >
> > * `%pip install -U datasets`
> > and then restarted runtime and then everything works fine.
>
> Yes, this is working. When I restart the runtime after installing packages, it's working perfectly. Thank you so much. But why do we need to restart runtime every time after installing packages?
For some packages it is required.
https://stackoverflow.com/questions/57831187/need-to-restart-runtime-before-import-an-installed-package-in-colab
| [
-0.256902813911438,
-0.06662493944168091,
-0.05580161139369011,
0.6121095418930054,
0.2748967707157135,
0.06340034306049347,
0.24404215812683105,
0.24720130860805511,
-0.019955575466156006,
0.11987867951393127,
-0.13812042772769928,
0.38939008116722107,
-0.1408829241991043,
0.1007615476846695,
-0.32404372096061707,
-0.32616546750068665,
0.039162781089544296,
0.21027472615242004,
-0.25826671719551086,
-0.02511308342218399,
-0.13907425105571747,
0.1340944766998291,
-0.172745019197464,
0.24685204029083252,
-0.4250190258026123,
-0.26558586955070496,
0.2469814419746399,
0.030495258048176765,
-0.44358178973197937,
-0.39700847864151,
0.24750655889511108,
-0.2310401201248169,
0.37677842378616333,
0.6055502891540527,
-0.00011488998279673979,
0.1920846551656723,
0.3230991065502167,
-0.10012710094451904,
-0.18276391923427582,
-0.26851069927215576,
-0.1036250963807106,
0.03106759488582611,
0.21665579080581665,
-0.10153007507324219,
0.21615839004516602,
0.0005410797894001007,
-0.27494823932647705,
-0.2035241276025772,
0.25661763548851013,
0.526404619216919,
0.2563377916812897,
0.2645606994628906,
0.43410056829452515,
-0.1192169189453125,
-0.061466049402952194,
-0.0923306941986084,
-0.2444404661655426,
0.15163978934288025,
-0.12952443957328796,
0.04484943300485611,
0.005928002297878265,
0.3358690142631531,
-0.028897468000650406,
0.15836332738399506,
0.32255351543426514,
-0.16028258204460144,
0.11113902181386948,
-0.4410451352596283,
0.0145353302359581,
0.052129387855529785,
0.7370848655700684,
-0.3695690631866455,
-0.4370410442352295,
0.15414728224277496,
0.14453935623168945,
0.04207813739776611,
0.180410698056221,
0.10252576321363449,
-0.23504295945167542,
0.13352859020233154,
0.2321055829524994,
-0.11182139813899994,
-0.37119418382644653,
-0.15580841898918152,
-0.20775461196899414,
0.28189292550086975,
-0.07928560674190521,
0.05331495404243469,
0.08881202340126038,
-0.17495179176330566,
0.8017526268959045,
0.001824287697672844,
-0.24544386565685272,
0.19523701071739197,
-0.4660859704017639,
-0.11735111474990845,
-0.020867645740509033,
0.0144905811175704,
-0.321607768535614,
0.08730154484510422,
0.1457754224538803,
-0.08641445636749268,
0.09756240248680115,
0.2448480725288391,
0.08345026522874832,
0.09961158782243729,
0.10073757916688919,
0.5698217749595642,
0.07114965468645096,
-0.03231749311089516,
0.05505339801311493,
-0.09617455303668976,
-0.24876058101654053,
-0.40744882822036743,
-0.024745170027017593,
-0.18364641070365906,
0.246136873960495,
-0.1124357208609581,
-0.3068576753139496,
0.14300671219825745,
-0.1927705705165863,
-0.04361412301659584,
-0.021950362250208855,
0.40578997135162354,
-0.0212737824767828,
0.28545406460762024,
0.31094586849212646,
0.15615573525428772,
0.12214254587888718,
0.12312217801809311,
-0.20654675364494324,
0.33852919936180115,
-0.14966563880443573,
-0.12863649427890778,
-0.12041734158992767,
-0.06161477416753769,
0.2588486075401306,
-0.11313822865486145,
-0.08800972998142242,
-0.1768268346786499,
-0.014624115079641342,
-0.33047088980674744,
0.020192649215459824,
0.19396111369132996,
-0.0659535825252533,
0.04192115366458893,
0.24863044917583466,
-0.2537769675254822,
-0.1377231925725937,
-0.059625353664159775,
-0.3462243378162384,
-0.16181938350200653,
-0.4648602306842804,
0.196210116147995,
0.05868682265281677,
-0.1515142023563385,
-0.08748701214790344,
-0.45019403100013733,
0.18756400048732758,
0.05569201707839966,
-0.005037479102611542,
-0.19469645619392395,
0.10776174813508987,
-0.014502028003334999,
-0.03426451236009598,
0.3410903215408325,
-0.3945315480232239,
-0.0010110437870025635,
0.3809555768966675,
-0.1595524251461029,
-0.02658456563949585,
0.12249168008565903,
-0.09577785432338715,
0.39026060700416565,
-0.09571227431297302,
-0.15573160350322723,
0.567808210849762,
-0.5921734571456909,
-0.26608705520629883,
0.05019427090883255,
-0.04213886708021164,
-0.1447429656982422,
0.3695034384727478,
-0.06576819717884064,
-0.039474405348300934,
0.07813966274261475,
0.08266063779592514,
0.144344300031662,
0.025286955758929253,
0.036696262657642365,
-0.06944005191326141,
-0.1120612770318985,
0.07201431691646576,
0.14142988622188568,
0.14674213528633118,
0.03374359384179115,
0.0999671220779419,
0.06819626688957214,
0.32104992866516113,
-0.055073726922273636,
-0.04141709953546524,
0.6366989016532898,
0.1728818714618683,
0.2089121788740158,
0.046118222177028656,
-0.25871551036834717,
-0.09337187558412552,
0.09669534862041473,
-0.09548264741897583,
0.20620690286159515,
-0.5495560765266418,
0.039022721350193024,
-0.28502604365348816,
0.35468095541000366,
-0.3013054132461548,
-0.17267537117004395,
0.14956888556480408,
0.11204648017883301,
0.15216058492660522,
0.08011548221111298,
-0.052536491304636,
0.4499247670173645,
-0.268441379070282,
0.3102836608886719,
-0.393457293510437,
0.3476170003414154,
-0.3230850398540497,
-0.3127036988735199,
0.04742034524679184,
0.17949096858501434,
0.024485832080245018,
-0.04163544625043869,
-0.30319371819496155,
0.16406658291816711,
0.0453663095831871,
0.20532071590423584,
-0.31083378195762634,
-0.03053329885005951,
-0.0025202278047800064,
-0.27089670300483704,
0.02911042608320713,
-0.11259222775697708,
0.31119304895401,
0.10925492644309998,
0.05677122250199318,
-0.041405417025089264,
-0.08253021538257599,
0.3201824128627777,
0.1547757238149643,
0.22164899110794067,
0.2683151960372925,
0.04771827161312103,
0.1253909170627594,
-0.23968012630939484,
0.017539357766509056,
0.18916183710098267,
0.21758733689785004,
0.12453307956457138,
-0.02025003731250763,
-0.3259884715080261,
0.3841291666030884,
0.1633160412311554,
-0.023884344846010208,
-0.06235859915614128,
-0.2212226390838623,
0.2503383159637451,
0.3229474723339081,
0.3707652986049652,
0.35874050855636597,
0.09806711226701736,
-0.2662656605243683,
0.11245916038751602,
0.07017193734645844,
-0.0723481997847557,
0.2630462050437927,
0.1803167313337326,
0.37655019760131836,
0.25856801867485046,
0.01693122833967209,
0.12798240780830383,
-0.13936102390289307,
-0.4716644883155823,
-0.10985515266656876,
0.37011659145355225,
-0.29064542055130005,
-0.001737736165523529,
-0.12793463468551636,
-0.05703889578580856,
-0.3960559070110321,
-0.026670046150684357,
-0.15691319108009338,
-0.264887273311615,
-0.4273056983947754,
0.3287535309791565,
-0.05488137900829315,
0.29113078117370605,
-0.19480302929878235,
-0.24224235117435455,
0.19393393397331238,
-0.12218492478132248,
-0.1903228759765625,
-0.36165642738342285,
0.08080045878887177,
0.03458442538976669,
0.18995380401611328,
0.1496807038784027,
0.3307649493217468,
-0.107923224568367,
0.29579442739486694,
-0.3171854615211487,
-0.23514088988304138,
0.14393962919712067,
-0.0386446937918663,
-0.034761302173137665,
0.3126859962940216,
0.1878063678741455,
0.25660091638565063,
-0.5176385641098022,
0.09446390718221664,
-0.14445345103740692,
-0.189145028591156,
0.08693961799144745,
-0.052748166024684906,
-0.18511644005775452,
0.12090454995632172,
-0.2517589330673218,
-0.48113560676574707,
-0.5694224238395691,
0.13440638780593872,
0.24150867760181427,
0.08420412242412567,
0.26392337679862976,
0.1586868315935135,
0.31294816732406616,
0.08068373054265976,
0.4144498109817505,
0.23354190587997437,
-0.07358457148075104,
0.30034497380256653,
-0.15435391664505005,
-0.2662021815776825,
0.05075201392173767,
-0.09570382535457611,
0.4410252571105957,
-0.027559194713830948,
-0.35064196586608887,
-0.13104456663131714,
-0.24551378190517426,
0.16854546964168549,
-0.1461605727672577,
0.2192200869321823,
0.37877804040908813,
0.414222776889801,
0.004855979233980179,
-0.10502402484416962,
0.09298646450042725,
-0.03882167488336563,
-0.27470752596855164,
-0.06299746781587601,
-0.016450056806206703,
0.4377359449863434,
-0.19663459062576294,
0.2570459842681885,
0.23741205036640167,
-0.16500329971313477,
0.23736384510993958,
0.08955816179513931,
0.28659358620643616,
-0.16709105670452118,
-0.27347826957702637,
-0.17229416966438293,
-0.180995911359787,
0.10606499016284943,
-0.047507673501968384,
-0.24346637725830078,
-0.01947050914168358,
-0.12351600080728531,
-0.06241896376013756,
-0.04349275678396225,
-0.027372416108846664,
-0.07372915744781494,
-0.42088621854782104,
0.23319081962108612,
-0.08653128147125244,
-0.06325040012598038,
-0.17037665843963623,
0.036015868186950684,
0.18266384303569794,
0.04490106925368309,
-0.1402004361152649,
-0.07022362947463989,
-0.2805652320384979,
-0.027860542759299278,
-0.29643091559410095,
0.09792312979698181,
0.13958683609962463,
0.3668658137321472,
0.11172240972518921,
-0.05322970822453499,
0.06627233326435089,
0.006396360695362091,
0.2152082473039627,
-0.18715506792068481,
-0.23747441172599792,
0.14924632012844086,
-0.068037249147892,
-0.44537559151649475,
-0.03558829426765442,
-0.1686117947101593,
0.0898018404841423,
0.15014395117759705,
0.1917921006679535,
-0.06652428209781647,
-0.17009872198104858,
0.4521212577819824,
0.06473669409751892,
-0.11619039624929428,
-0.030791480094194412,
-0.15608495473861694,
-0.3060137629508972,
-0.3745065927505493,
-0.07876864075660706,
0.2592592239379883,
0.46490445733070374,
0.2863294184207916,
0.19665184617042542,
-0.2955895662307739,
-0.12551334500312805,
-0.048651427030563354,
0.02841978147625923,
0.1900259554386139,
-0.046729035675525665,
0.09548941254615784,
0.08056318014860153,
0.3972302973270416,
0.5442346930503845,
0.6393277645111084,
-0.3564460575580597,
-0.5447501540184021,
-0.05768277868628502,
-0.1703615039587021,
0.3061317503452301,
0.04232814535498619,
-0.09967024624347687,
0.19207651913166046,
-0.4968562126159668,
0.014718657359480858,
-0.08922390639781952,
-0.04809786006808281,
0.06301027536392212,
0.1677154004573822,
-0.18332231044769287,
-0.24146577715873718,
0.36401161551475525,
0.25125014781951904,
0.05983549356460571,
0.4667035639286041,
0.23924025893211365,
-0.38408684730529785,
0.4785679280757904,
0.1116812527179718,
0.7710726857185364,
0.2474597692489624,
0.10733545571565628,
0.2562350630760193,
-0.4400929808616638,
0.27828890085220337,
-0.009791374206542969,
-0.013260417617857456,
-0.4400268495082855,
-0.233763188123703,
-0.01054733619093895,
-0.23394107818603516,
0.3223817050457001,
-0.13457442820072174,
-0.1893027424812317,
0.057696398347616196,
-0.23671028017997742,
-0.11946331709623337,
0.12738797068595886,
0.15037280321121216,
-0.09924160689115524,
-0.18415561318397522,
-0.15610376000404358,
0.0969632938504219,
0.16927587985992432,
0.1097305566072464,
-0.11566148698329926,
-0.039514943957328796,
-0.1755986213684082,
-0.32159623503685,
-0.21222439408302307,
0.19046536087989807,
-0.3982684314250946,
0.4196784496307373,
0.15749415755271912,
-0.20017899572849274,
0.23643603920936584,
0.45393550395965576,
0.18932729959487915,
-0.10550291836261749,
-0.11277548223733902,
0.14423617720603943,
0.11200116574764252,
-0.16209116578102112,
0.07247572392225266,
0.2463332712650299,
0.3890644907951355,
-0.07430321723222733,
0.03419813513755798,
0.38855165243148804,
-0.18327166140079498,
-0.4002794027328491,
0.1420225203037262,
0.06763996928930283,
0.043245892971754074,
-0.23007208108901978,
-0.20149093866348267,
-0.17483940720558167,
-0.05476310849189758,
-0.17514777183532715,
0.147023543715477,
0.03132973611354828,
-0.3554784655570984,
0.1370883584022522,
-0.17109976708889008,
-0.3439685106277466,
0.01698918268084526,
0.38314497470855713,
0.1898702085018158,
0.04016689211130142,
0.6141799688339233,
0.07355962693691254,
-0.25458812713623047,
-0.21388505399227142,
0.1335947960615158,
0.19124937057495117,
-0.62235027551651,
0.1904217004776001,
-0.021416522562503815,
-0.2732062041759491,
-0.029417753219604492,
0.3728379011154175,
0.24950259923934937,
0.07783541083335876,
-0.17882214486598969,
-0.24607907235622406,
-0.428485631942749,
0.11749082803726196,
0.04444221034646034,
0.2214086949825287,
-0.37719854712486267,
0.2194172739982605,
-0.17110860347747803,
0.103178009390831,
-0.2955057919025421,
-0.026355629786849022,
-0.5316578149795532,
0.14548428356647491,
0.2224799394607544,
-0.015324385836720467,
-0.1502855271100998,
-0.02151089906692505,
0.14002758264541626,
0.2930784523487091,
-0.09902186691761017,
-0.1772584617137909,
-0.1596524566411972,
0.09779373556375504,
0.19002340734004974,
-0.1416580080986023,
0.00005961954593658447,
-0.01402941346168518,
-0.07470054924488068,
-0.019229821860790253,
-0.08337271213531494,
0.26569053530693054,
-0.0025573670864105225,
0.16257129609584808,
0.1595553457736969,
-0.033375516533851624,
-0.26804155111312866,
0.24136541783809662,
-0.1609545648097992,
0.2795288860797882,
-0.20764602720737457,
0.2113102674484253,
-0.09595108777284622,
0.09591668844223022,
-0.05292639881372452,
0.09137202799320221,
-0.17035174369812012,
-0.05258016288280487,
0.29036810994148254,
-0.34288138151168823,
-0.015550516545772552,
0.18389125168323517,
0.22407057881355286,
0.22856120765209198,
-0.3436901271343231,
0.012690983712673187,
0.14790883660316467,
0.23818010091781616,
-0.28956544399261475,
-0.16199693083763123,
-0.11132695525884628,
-0.2829515039920807,
0.039406076073646545,
0.15308913588523865,
-0.06062738597393036,
-0.12041755020618439,
0.2808241844177246,
0.26463666558265686,
0.20148871839046478,
-0.11933860182762146,
0.401050865650177,
0.3233991861343384,
-0.13719576597213745,
-0.04563349485397339,
0.5149922370910645,
0.24320140480995178,
0.2674027383327484,
0.3243061304092407,
-0.1201210469007492,
0.19134610891342163,
-0.3938050866127014,
-0.0865255668759346,
0.13271696865558624,
-0.15006910264492035,
0.07412679493427277,
-0.3074265122413635,
-0.01670687273144722,
-0.19194567203521729,
-0.12525498867034912,
-0.05134852975606918,
-0.052303194999694824,
-0.06941889971494675,
0.00046334415674209595,
0.07868194580078125,
-0.2117467075586319,
-0.026525575667619705,
0.027291610836982727,
-0.14084982872009277,
-0.10010220855474472,
-0.0014868825674057007,
0.15193066000938416,
-0.03160551190376282,
0.14198365807533264,
0.07675089687108994,
-0.25749874114990234,
-0.26734089851379395,
0.03476652875542641,
0.165971577167511,
0.03169573098421097,
-0.40021413564682007,
0.1568090170621872,
-0.03142855688929558,
-0.04700645059347153,
-0.2851216495037079,
0.43323761224746704,
0.5774037837982178,
0.4171214997768402,
0.10439202189445496,
-0.04928453639149666,
-0.07951289415359497,
-0.1513766497373581,
0.1302853524684906,
0.3273222744464874,
-0.07780224084854126,
0.22529923915863037,
0.3888447880744934,
0.15440931916236877,
-0.24088755249977112,
-0.07401212304830551,
0.07731480896472931,
0.22244518995285034,
-0.26429280638694763,
0.5152069330215454,
-0.02425434999167919,
-0.33644479513168335,
0.01254897192120552,
0.1521034836769104,
-0.4033680260181427,
0.19476701319217682,
0.4406997561454773,
-0.18382270634174347,
0.018053457140922546,
-0.33213943243026733,
0.06533817946910858,
0.03727605193853378,
0.6124904751777649,
0.48521313071250916,
0.33517056703567505,
-0.15982908010482788,
-0.16731733083724976,
-0.3128805160522461,
0.18699117004871368,
-0.11246559023857117,
0.03628339618444443,
0.013686876744031906,
0.06751812994480133,
0.04187149927020073,
0.15657424926757812,
0.18706804513931274,
0.2210918366909027,
-0.2763952314853668,
0.02608480118215084,
-0.38806039094924927,
-0.2455812245607376,
0.10810841619968414,
-0.03884698078036308,
0.08636362105607986,
-0.5342223644256592,
0.09064959734678268,
-0.0824476107954979,
0.16404196619987488,
-0.28465989232063293,
-0.0542563758790493,
0.20082250237464905,
-0.1979013979434967,
0.45428916811943054,
-0.05478053539991379,
0.4595044255256653,
0.020230047404766083,
-0.1561621129512787,
-0.13956424593925476,
-0.5568035840988159,
-0.28128939867019653,
0.1751372516155243,
0.32846924662590027,
0.4226182997226715,
-0.18614041805267334,
-0.38109081983566284,
-0.3425794243812561,
0.13387203216552734,
-0.20194575190544128,
0.10682004690170288,
-0.16240717470645905,
0.17728838324546814,
-0.04089207947254181,
0.11511212587356567,
0.19150277972221375,
-0.09540397673845291,
-0.02851509302854538,
0.19460955262184143,
-0.2638320326805115,
-0.3892172873020172,
0.41564828157424927,
-0.18457314372062683,
-0.3162107765674591,
0.15280799567699432,
0.1361370086669922,
-0.0953700989484787,
-0.08400661498308182,
-0.5766762495040894,
0.23468558490276337,
0.32386383414268494,
-0.09576019644737244,
-0.12282361835241318,
0.23794598877429962,
0.33038240671157837,
0.11651982367038727,
-0.04669814556837082,
0.3443213403224945,
-0.12160798907279968,
-0.01021159440279007,
0.05064907670021057,
-0.11506733298301697
] |
https://github.com/huggingface/datasets/issues/6538 | > > > > > Can you try re-installing `datasets` ?
> > > >
> > > >
> > > > I tried re-installing. Still getting the same error.
> > >
> > >
> > > In kaggle I used:
> > >
> > > * `%pip install -U datasets`
> > > and then restarted runtime and then everything works fine.
> >
> >
> > Yes, this is working. When I restart the runtime after installing packages, it's working perfectly. Thank you so much. But why do we need to restart runtime every time after installing packages?
> > For some packages it is required.
> > https://stackoverflow.com/questions/57831187/need-to-restart-runtime-before-import-an-installed-package-in-colab
Thank you for your assistance. I dedicated the past 2-3 weeks to resolving this issue. Interestingly, it runs flawlessly in Colab without requiring a runtime restart. However, the problem persisted exclusively in Kaggle. I appreciate your help once again. Thank you. | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) | ### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0 | 157 | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0
> > > > > Can you try re-installing `datasets` ?
> > > >
> > > >
> > > > I tried re-installing. Still getting the same error.
> > >
> > >
> > > In kaggle I used:
> > >
> > > * `%pip install -U datasets`
> > > and then restarted runtime and then everything works fine.
> >
> >
> > Yes, this is working. When I restart the runtime after installing packages, it's working perfectly. Thank you so much. But why do we need to restart runtime every time after installing packages?
> > For some packages it is required.
> > https://stackoverflow.com/questions/57831187/need-to-restart-runtime-before-import-an-installed-package-in-colab
Thank you for your assistance. I dedicated the past 2-3 weeks to resolving this issue. Interestingly, it runs flawlessly in Colab without requiring a runtime restart. However, the problem persisted exclusively in Kaggle. I appreciate your help once again. Thank you. | [
-0.256902813911438,
-0.06662493944168091,
-0.05580161139369011,
0.6121095418930054,
0.2748967707157135,
0.06340034306049347,
0.24404215812683105,
0.24720130860805511,
-0.019955575466156006,
0.11987867951393127,
-0.13812042772769928,
0.38939008116722107,
-0.1408829241991043,
0.1007615476846695,
-0.32404372096061707,
-0.32616546750068665,
0.039162781089544296,
0.21027472615242004,
-0.25826671719551086,
-0.02511308342218399,
-0.13907425105571747,
0.1340944766998291,
-0.172745019197464,
0.24685204029083252,
-0.4250190258026123,
-0.26558586955070496,
0.2469814419746399,
0.030495258048176765,
-0.44358178973197937,
-0.39700847864151,
0.24750655889511108,
-0.2310401201248169,
0.37677842378616333,
0.6055502891540527,
-0.00011488998279673979,
0.1920846551656723,
0.3230991065502167,
-0.10012710094451904,
-0.18276391923427582,
-0.26851069927215576,
-0.1036250963807106,
0.03106759488582611,
0.21665579080581665,
-0.10153007507324219,
0.21615839004516602,
0.0005410797894001007,
-0.27494823932647705,
-0.2035241276025772,
0.25661763548851013,
0.526404619216919,
0.2563377916812897,
0.2645606994628906,
0.43410056829452515,
-0.1192169189453125,
-0.061466049402952194,
-0.0923306941986084,
-0.2444404661655426,
0.15163978934288025,
-0.12952443957328796,
0.04484943300485611,
0.005928002297878265,
0.3358690142631531,
-0.028897468000650406,
0.15836332738399506,
0.32255351543426514,
-0.16028258204460144,
0.11113902181386948,
-0.4410451352596283,
0.0145353302359581,
0.052129387855529785,
0.7370848655700684,
-0.3695690631866455,
-0.4370410442352295,
0.15414728224277496,
0.14453935623168945,
0.04207813739776611,
0.180410698056221,
0.10252576321363449,
-0.23504295945167542,
0.13352859020233154,
0.2321055829524994,
-0.11182139813899994,
-0.37119418382644653,
-0.15580841898918152,
-0.20775461196899414,
0.28189292550086975,
-0.07928560674190521,
0.05331495404243469,
0.08881202340126038,
-0.17495179176330566,
0.8017526268959045,
0.001824287697672844,
-0.24544386565685272,
0.19523701071739197,
-0.4660859704017639,
-0.11735111474990845,
-0.020867645740509033,
0.0144905811175704,
-0.321607768535614,
0.08730154484510422,
0.1457754224538803,
-0.08641445636749268,
0.09756240248680115,
0.2448480725288391,
0.08345026522874832,
0.09961158782243729,
0.10073757916688919,
0.5698217749595642,
0.07114965468645096,
-0.03231749311089516,
0.05505339801311493,
-0.09617455303668976,
-0.24876058101654053,
-0.40744882822036743,
-0.024745170027017593,
-0.18364641070365906,
0.246136873960495,
-0.1124357208609581,
-0.3068576753139496,
0.14300671219825745,
-0.1927705705165863,
-0.04361412301659584,
-0.021950362250208855,
0.40578997135162354,
-0.0212737824767828,
0.28545406460762024,
0.31094586849212646,
0.15615573525428772,
0.12214254587888718,
0.12312217801809311,
-0.20654675364494324,
0.33852919936180115,
-0.14966563880443573,
-0.12863649427890778,
-0.12041734158992767,
-0.06161477416753769,
0.2588486075401306,
-0.11313822865486145,
-0.08800972998142242,
-0.1768268346786499,
-0.014624115079641342,
-0.33047088980674744,
0.020192649215459824,
0.19396111369132996,
-0.0659535825252533,
0.04192115366458893,
0.24863044917583466,
-0.2537769675254822,
-0.1377231925725937,
-0.059625353664159775,
-0.3462243378162384,
-0.16181938350200653,
-0.4648602306842804,
0.196210116147995,
0.05868682265281677,
-0.1515142023563385,
-0.08748701214790344,
-0.45019403100013733,
0.18756400048732758,
0.05569201707839966,
-0.005037479102611542,
-0.19469645619392395,
0.10776174813508987,
-0.014502028003334999,
-0.03426451236009598,
0.3410903215408325,
-0.3945315480232239,
-0.0010110437870025635,
0.3809555768966675,
-0.1595524251461029,
-0.02658456563949585,
0.12249168008565903,
-0.09577785432338715,
0.39026060700416565,
-0.09571227431297302,
-0.15573160350322723,
0.567808210849762,
-0.5921734571456909,
-0.26608705520629883,
0.05019427090883255,
-0.04213886708021164,
-0.1447429656982422,
0.3695034384727478,
-0.06576819717884064,
-0.039474405348300934,
0.07813966274261475,
0.08266063779592514,
0.144344300031662,
0.025286955758929253,
0.036696262657642365,
-0.06944005191326141,
-0.1120612770318985,
0.07201431691646576,
0.14142988622188568,
0.14674213528633118,
0.03374359384179115,
0.0999671220779419,
0.06819626688957214,
0.32104992866516113,
-0.055073726922273636,
-0.04141709953546524,
0.6366989016532898,
0.1728818714618683,
0.2089121788740158,
0.046118222177028656,
-0.25871551036834717,
-0.09337187558412552,
0.09669534862041473,
-0.09548264741897583,
0.20620690286159515,
-0.5495560765266418,
0.039022721350193024,
-0.28502604365348816,
0.35468095541000366,
-0.3013054132461548,
-0.17267537117004395,
0.14956888556480408,
0.11204648017883301,
0.15216058492660522,
0.08011548221111298,
-0.052536491304636,
0.4499247670173645,
-0.268441379070282,
0.3102836608886719,
-0.393457293510437,
0.3476170003414154,
-0.3230850398540497,
-0.3127036988735199,
0.04742034524679184,
0.17949096858501434,
0.024485832080245018,
-0.04163544625043869,
-0.30319371819496155,
0.16406658291816711,
0.0453663095831871,
0.20532071590423584,
-0.31083378195762634,
-0.03053329885005951,
-0.0025202278047800064,
-0.27089670300483704,
0.02911042608320713,
-0.11259222775697708,
0.31119304895401,
0.10925492644309998,
0.05677122250199318,
-0.041405417025089264,
-0.08253021538257599,
0.3201824128627777,
0.1547757238149643,
0.22164899110794067,
0.2683151960372925,
0.04771827161312103,
0.1253909170627594,
-0.23968012630939484,
0.017539357766509056,
0.18916183710098267,
0.21758733689785004,
0.12453307956457138,
-0.02025003731250763,
-0.3259884715080261,
0.3841291666030884,
0.1633160412311554,
-0.023884344846010208,
-0.06235859915614128,
-0.2212226390838623,
0.2503383159637451,
0.3229474723339081,
0.3707652986049652,
0.35874050855636597,
0.09806711226701736,
-0.2662656605243683,
0.11245916038751602,
0.07017193734645844,
-0.0723481997847557,
0.2630462050437927,
0.1803167313337326,
0.37655019760131836,
0.25856801867485046,
0.01693122833967209,
0.12798240780830383,
-0.13936102390289307,
-0.4716644883155823,
-0.10985515266656876,
0.37011659145355225,
-0.29064542055130005,
-0.001737736165523529,
-0.12793463468551636,
-0.05703889578580856,
-0.3960559070110321,
-0.026670046150684357,
-0.15691319108009338,
-0.264887273311615,
-0.4273056983947754,
0.3287535309791565,
-0.05488137900829315,
0.29113078117370605,
-0.19480302929878235,
-0.24224235117435455,
0.19393393397331238,
-0.12218492478132248,
-0.1903228759765625,
-0.36165642738342285,
0.08080045878887177,
0.03458442538976669,
0.18995380401611328,
0.1496807038784027,
0.3307649493217468,
-0.107923224568367,
0.29579442739486694,
-0.3171854615211487,
-0.23514088988304138,
0.14393962919712067,
-0.0386446937918663,
-0.034761302173137665,
0.3126859962940216,
0.1878063678741455,
0.25660091638565063,
-0.5176385641098022,
0.09446390718221664,
-0.14445345103740692,
-0.189145028591156,
0.08693961799144745,
-0.052748166024684906,
-0.18511644005775452,
0.12090454995632172,
-0.2517589330673218,
-0.48113560676574707,
-0.5694224238395691,
0.13440638780593872,
0.24150867760181427,
0.08420412242412567,
0.26392337679862976,
0.1586868315935135,
0.31294816732406616,
0.08068373054265976,
0.4144498109817505,
0.23354190587997437,
-0.07358457148075104,
0.30034497380256653,
-0.15435391664505005,
-0.2662021815776825,
0.05075201392173767,
-0.09570382535457611,
0.4410252571105957,
-0.027559194713830948,
-0.35064196586608887,
-0.13104456663131714,
-0.24551378190517426,
0.16854546964168549,
-0.1461605727672577,
0.2192200869321823,
0.37877804040908813,
0.414222776889801,
0.004855979233980179,
-0.10502402484416962,
0.09298646450042725,
-0.03882167488336563,
-0.27470752596855164,
-0.06299746781587601,
-0.016450056806206703,
0.4377359449863434,
-0.19663459062576294,
0.2570459842681885,
0.23741205036640167,
-0.16500329971313477,
0.23736384510993958,
0.08955816179513931,
0.28659358620643616,
-0.16709105670452118,
-0.27347826957702637,
-0.17229416966438293,
-0.180995911359787,
0.10606499016284943,
-0.047507673501968384,
-0.24346637725830078,
-0.01947050914168358,
-0.12351600080728531,
-0.06241896376013756,
-0.04349275678396225,
-0.027372416108846664,
-0.07372915744781494,
-0.42088621854782104,
0.23319081962108612,
-0.08653128147125244,
-0.06325040012598038,
-0.17037665843963623,
0.036015868186950684,
0.18266384303569794,
0.04490106925368309,
-0.1402004361152649,
-0.07022362947463989,
-0.2805652320384979,
-0.027860542759299278,
-0.29643091559410095,
0.09792312979698181,
0.13958683609962463,
0.3668658137321472,
0.11172240972518921,
-0.05322970822453499,
0.06627233326435089,
0.006396360695362091,
0.2152082473039627,
-0.18715506792068481,
-0.23747441172599792,
0.14924632012844086,
-0.068037249147892,
-0.44537559151649475,
-0.03558829426765442,
-0.1686117947101593,
0.0898018404841423,
0.15014395117759705,
0.1917921006679535,
-0.06652428209781647,
-0.17009872198104858,
0.4521212577819824,
0.06473669409751892,
-0.11619039624929428,
-0.030791480094194412,
-0.15608495473861694,
-0.3060137629508972,
-0.3745065927505493,
-0.07876864075660706,
0.2592592239379883,
0.46490445733070374,
0.2863294184207916,
0.19665184617042542,
-0.2955895662307739,
-0.12551334500312805,
-0.048651427030563354,
0.02841978147625923,
0.1900259554386139,
-0.046729035675525665,
0.09548941254615784,
0.08056318014860153,
0.3972302973270416,
0.5442346930503845,
0.6393277645111084,
-0.3564460575580597,
-0.5447501540184021,
-0.05768277868628502,
-0.1703615039587021,
0.3061317503452301,
0.04232814535498619,
-0.09967024624347687,
0.19207651913166046,
-0.4968562126159668,
0.014718657359480858,
-0.08922390639781952,
-0.04809786006808281,
0.06301027536392212,
0.1677154004573822,
-0.18332231044769287,
-0.24146577715873718,
0.36401161551475525,
0.25125014781951904,
0.05983549356460571,
0.4667035639286041,
0.23924025893211365,
-0.38408684730529785,
0.4785679280757904,
0.1116812527179718,
0.7710726857185364,
0.2474597692489624,
0.10733545571565628,
0.2562350630760193,
-0.4400929808616638,
0.27828890085220337,
-0.009791374206542969,
-0.013260417617857456,
-0.4400268495082855,
-0.233763188123703,
-0.01054733619093895,
-0.23394107818603516,
0.3223817050457001,
-0.13457442820072174,
-0.1893027424812317,
0.057696398347616196,
-0.23671028017997742,
-0.11946331709623337,
0.12738797068595886,
0.15037280321121216,
-0.09924160689115524,
-0.18415561318397522,
-0.15610376000404358,
0.0969632938504219,
0.16927587985992432,
0.1097305566072464,
-0.11566148698329926,
-0.039514943957328796,
-0.1755986213684082,
-0.32159623503685,
-0.21222439408302307,
0.19046536087989807,
-0.3982684314250946,
0.4196784496307373,
0.15749415755271912,
-0.20017899572849274,
0.23643603920936584,
0.45393550395965576,
0.18932729959487915,
-0.10550291836261749,
-0.11277548223733902,
0.14423617720603943,
0.11200116574764252,
-0.16209116578102112,
0.07247572392225266,
0.2463332712650299,
0.3890644907951355,
-0.07430321723222733,
0.03419813513755798,
0.38855165243148804,
-0.18327166140079498,
-0.4002794027328491,
0.1420225203037262,
0.06763996928930283,
0.043245892971754074,
-0.23007208108901978,
-0.20149093866348267,
-0.17483940720558167,
-0.05476310849189758,
-0.17514777183532715,
0.147023543715477,
0.03132973611354828,
-0.3554784655570984,
0.1370883584022522,
-0.17109976708889008,
-0.3439685106277466,
0.01698918268084526,
0.38314497470855713,
0.1898702085018158,
0.04016689211130142,
0.6141799688339233,
0.07355962693691254,
-0.25458812713623047,
-0.21388505399227142,
0.1335947960615158,
0.19124937057495117,
-0.62235027551651,
0.1904217004776001,
-0.021416522562503815,
-0.2732062041759491,
-0.029417753219604492,
0.3728379011154175,
0.24950259923934937,
0.07783541083335876,
-0.17882214486598969,
-0.24607907235622406,
-0.428485631942749,
0.11749082803726196,
0.04444221034646034,
0.2214086949825287,
-0.37719854712486267,
0.2194172739982605,
-0.17110860347747803,
0.103178009390831,
-0.2955057919025421,
-0.026355629786849022,
-0.5316578149795532,
0.14548428356647491,
0.2224799394607544,
-0.015324385836720467,
-0.1502855271100998,
-0.02151089906692505,
0.14002758264541626,
0.2930784523487091,
-0.09902186691761017,
-0.1772584617137909,
-0.1596524566411972,
0.09779373556375504,
0.19002340734004974,
-0.1416580080986023,
0.00005961954593658447,
-0.01402941346168518,
-0.07470054924488068,
-0.019229821860790253,
-0.08337271213531494,
0.26569053530693054,
-0.0025573670864105225,
0.16257129609584808,
0.1595553457736969,
-0.033375516533851624,
-0.26804155111312866,
0.24136541783809662,
-0.1609545648097992,
0.2795288860797882,
-0.20764602720737457,
0.2113102674484253,
-0.09595108777284622,
0.09591668844223022,
-0.05292639881372452,
0.09137202799320221,
-0.17035174369812012,
-0.05258016288280487,
0.29036810994148254,
-0.34288138151168823,
-0.015550516545772552,
0.18389125168323517,
0.22407057881355286,
0.22856120765209198,
-0.3436901271343231,
0.012690983712673187,
0.14790883660316467,
0.23818010091781616,
-0.28956544399261475,
-0.16199693083763123,
-0.11132695525884628,
-0.2829515039920807,
0.039406076073646545,
0.15308913588523865,
-0.06062738597393036,
-0.12041755020618439,
0.2808241844177246,
0.26463666558265686,
0.20148871839046478,
-0.11933860182762146,
0.401050865650177,
0.3233991861343384,
-0.13719576597213745,
-0.04563349485397339,
0.5149922370910645,
0.24320140480995178,
0.2674027383327484,
0.3243061304092407,
-0.1201210469007492,
0.19134610891342163,
-0.3938050866127014,
-0.0865255668759346,
0.13271696865558624,
-0.15006910264492035,
0.07412679493427277,
-0.3074265122413635,
-0.01670687273144722,
-0.19194567203521729,
-0.12525498867034912,
-0.05134852975606918,
-0.052303194999694824,
-0.06941889971494675,
0.00046334415674209595,
0.07868194580078125,
-0.2117467075586319,
-0.026525575667619705,
0.027291610836982727,
-0.14084982872009277,
-0.10010220855474472,
-0.0014868825674057007,
0.15193066000938416,
-0.03160551190376282,
0.14198365807533264,
0.07675089687108994,
-0.25749874114990234,
-0.26734089851379395,
0.03476652875542641,
0.165971577167511,
0.03169573098421097,
-0.40021413564682007,
0.1568090170621872,
-0.03142855688929558,
-0.04700645059347153,
-0.2851216495037079,
0.43323761224746704,
0.5774037837982178,
0.4171214997768402,
0.10439202189445496,
-0.04928453639149666,
-0.07951289415359497,
-0.1513766497373581,
0.1302853524684906,
0.3273222744464874,
-0.07780224084854126,
0.22529923915863037,
0.3888447880744934,
0.15440931916236877,
-0.24088755249977112,
-0.07401212304830551,
0.07731480896472931,
0.22244518995285034,
-0.26429280638694763,
0.5152069330215454,
-0.02425434999167919,
-0.33644479513168335,
0.01254897192120552,
0.1521034836769104,
-0.4033680260181427,
0.19476701319217682,
0.4406997561454773,
-0.18382270634174347,
0.018053457140922546,
-0.33213943243026733,
0.06533817946910858,
0.03727605193853378,
0.6124904751777649,
0.48521313071250916,
0.33517056703567505,
-0.15982908010482788,
-0.16731733083724976,
-0.3128805160522461,
0.18699117004871368,
-0.11246559023857117,
0.03628339618444443,
0.013686876744031906,
0.06751812994480133,
0.04187149927020073,
0.15657424926757812,
0.18706804513931274,
0.2210918366909027,
-0.2763952314853668,
0.02608480118215084,
-0.38806039094924927,
-0.2455812245607376,
0.10810841619968414,
-0.03884698078036308,
0.08636362105607986,
-0.5342223644256592,
0.09064959734678268,
-0.0824476107954979,
0.16404196619987488,
-0.28465989232063293,
-0.0542563758790493,
0.20082250237464905,
-0.1979013979434967,
0.45428916811943054,
-0.05478053539991379,
0.4595044255256653,
0.020230047404766083,
-0.1561621129512787,
-0.13956424593925476,
-0.5568035840988159,
-0.28128939867019653,
0.1751372516155243,
0.32846924662590027,
0.4226182997226715,
-0.18614041805267334,
-0.38109081983566284,
-0.3425794243812561,
0.13387203216552734,
-0.20194575190544128,
0.10682004690170288,
-0.16240717470645905,
0.17728838324546814,
-0.04089207947254181,
0.11511212587356567,
0.19150277972221375,
-0.09540397673845291,
-0.02851509302854538,
0.19460955262184143,
-0.2638320326805115,
-0.3892172873020172,
0.41564828157424927,
-0.18457314372062683,
-0.3162107765674591,
0.15280799567699432,
0.1361370086669922,
-0.0953700989484787,
-0.08400661498308182,
-0.5766762495040894,
0.23468558490276337,
0.32386383414268494,
-0.09576019644737244,
-0.12282361835241318,
0.23794598877429962,
0.33038240671157837,
0.11651982367038727,
-0.04669814556837082,
0.3443213403224945,
-0.12160798907279968,
-0.01021159440279007,
0.05064907670021057,
-0.11506733298301697
] |
https://github.com/huggingface/datasets/issues/6538 | Closing this issue as it is not related to the datasets library; rather, it's linked to platform-related issues. | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py) | ### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0 | 18 | ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py)
### Describe the bug
While importing from packages getting the error
Code:
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
Error:
````
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 14
4 from transformers import (
5 AutoModelForCausalLM,
6 AutoTokenizer,
(...)
11 logging
12 )
13 from peft import LoraConfig, PeftModel
---> 14 from trl import SFTTrainer
15 from huggingface_hub import login
16 import pandas as pd
File /opt/conda/lib/python3.10/site-packages/trl/__init__.py:21
8 from .import_utils import (
9 is_diffusers_available,
10 is_npu_available,
(...)
13 is_xpu_available,
14 )
15 from .models import (
16 AutoModelForCausalLMWithValueHead,
17 AutoModelForSeq2SeqLMWithValueHead,
18 PreTrainedModelWrapper,
19 create_reference_model,
20 )
---> 21 from .trainer import (
22 DataCollatorForCompletionOnlyLM,
23 DPOTrainer,
24 IterativeSFTTrainer,
25 PPOConfig,
26 PPOTrainer,
27 RewardConfig,
28 RewardTrainer,
29 SFTTrainer,
30 )
33 if is_diffusers_available():
34 from .models import (
35 DDPOPipelineOutput,
36 DDPOSchedulerOutput,
37 DDPOStableDiffusionPipeline,
38 DefaultDDPOStableDiffusionPipeline,
39 )
File /opt/conda/lib/python3.10/site-packages/trl/trainer/__init__.py:44
42 from .ppo_trainer import PPOTrainer
43 from .reward_trainer import RewardTrainer, compute_accuracy
---> 44 from .sft_trainer import SFTTrainer
45 from .training_configs import RewardConfig
File /opt/conda/lib/python3.10/site-packages/trl/trainer/sft_trainer.py:23
21 import torch.nn as nn
22 from datasets import Dataset
---> 23 from datasets.arrow_writer import SchemaInferenceError
24 from datasets.builder import DatasetGenerationError
25 from transformers import (
26 AutoModelForCausalLM,
27 AutoTokenizer,
(...)
33 TrainingArguments,
34 )
ImportError: cannot import name 'SchemaInferenceError' from 'datasets.arrow_writer' (/opt/conda/lib/python3.10/site-packages/datasets/arrow_writer.py
````
transformers version: 4.36.2
python version: 3.10.12
datasets version: 2.16.1
### Steps to reproduce the bug
1. Install packages
```
!pip install -U datasets trl accelerate peft bitsandbytes transformers trl huggingface_hub
```
2. import packages
```
import os
import torch
from datasets import load_dataset, Dataset
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
HfArgumentParser,
TrainingArguments,
pipeline,
logging
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
from huggingface_hub import login
import pandas as pd
```
### Expected behavior
No error while importing
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.15.133+-x86_64-with-glibc2.35
- Python version: 3.10.12
- `huggingface_hub` version: 0.20.1
- PyArrow version: 11.0.0
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0
Closing this issue as it is not related to the datasets library; rather, it's linked to platform-related issues. | [
-0.256902813911438,
-0.06662493944168091,
-0.05580161139369011,
0.6121095418930054,
0.2748967707157135,
0.06340034306049347,
0.24404215812683105,
0.24720130860805511,
-0.019955575466156006,
0.11987867951393127,
-0.13812042772769928,
0.38939008116722107,
-0.1408829241991043,
0.1007615476846695,
-0.32404372096061707,
-0.32616546750068665,
0.039162781089544296,
0.21027472615242004,
-0.25826671719551086,
-0.02511308342218399,
-0.13907425105571747,
0.1340944766998291,
-0.172745019197464,
0.24685204029083252,
-0.4250190258026123,
-0.26558586955070496,
0.2469814419746399,
0.030495258048176765,
-0.44358178973197937,
-0.39700847864151,
0.24750655889511108,
-0.2310401201248169,
0.37677842378616333,
0.6055502891540527,
-0.00011488998279673979,
0.1920846551656723,
0.3230991065502167,
-0.10012710094451904,
-0.18276391923427582,
-0.26851069927215576,
-0.1036250963807106,
0.03106759488582611,
0.21665579080581665,
-0.10153007507324219,
0.21615839004516602,
0.0005410797894001007,
-0.27494823932647705,
-0.2035241276025772,
0.25661763548851013,
0.526404619216919,
0.2563377916812897,
0.2645606994628906,
0.43410056829452515,
-0.1192169189453125,
-0.061466049402952194,
-0.0923306941986084,
-0.2444404661655426,
0.15163978934288025,
-0.12952443957328796,
0.04484943300485611,
0.005928002297878265,
0.3358690142631531,
-0.028897468000650406,
0.15836332738399506,
0.32255351543426514,
-0.16028258204460144,
0.11113902181386948,
-0.4410451352596283,
0.0145353302359581,
0.052129387855529785,
0.7370848655700684,
-0.3695690631866455,
-0.4370410442352295,
0.15414728224277496,
0.14453935623168945,
0.04207813739776611,
0.180410698056221,
0.10252576321363449,
-0.23504295945167542,
0.13352859020233154,
0.2321055829524994,
-0.11182139813899994,
-0.37119418382644653,
-0.15580841898918152,
-0.20775461196899414,
0.28189292550086975,
-0.07928560674190521,
0.05331495404243469,
0.08881202340126038,
-0.17495179176330566,
0.8017526268959045,
0.001824287697672844,
-0.24544386565685272,
0.19523701071739197,
-0.4660859704017639,
-0.11735111474990845,
-0.020867645740509033,
0.0144905811175704,
-0.321607768535614,
0.08730154484510422,
0.1457754224538803,
-0.08641445636749268,
0.09756240248680115,
0.2448480725288391,
0.08345026522874832,
0.09961158782243729,
0.10073757916688919,
0.5698217749595642,
0.07114965468645096,
-0.03231749311089516,
0.05505339801311493,
-0.09617455303668976,
-0.24876058101654053,
-0.40744882822036743,
-0.024745170027017593,
-0.18364641070365906,
0.246136873960495,
-0.1124357208609581,
-0.3068576753139496,
0.14300671219825745,
-0.1927705705165863,
-0.04361412301659584,
-0.021950362250208855,
0.40578997135162354,
-0.0212737824767828,
0.28545406460762024,
0.31094586849212646,
0.15615573525428772,
0.12214254587888718,
0.12312217801809311,
-0.20654675364494324,
0.33852919936180115,
-0.14966563880443573,
-0.12863649427890778,
-0.12041734158992767,
-0.06161477416753769,
0.2588486075401306,
-0.11313822865486145,
-0.08800972998142242,
-0.1768268346786499,
-0.014624115079641342,
-0.33047088980674744,
0.020192649215459824,
0.19396111369132996,
-0.0659535825252533,
0.04192115366458893,
0.24863044917583466,
-0.2537769675254822,
-0.1377231925725937,
-0.059625353664159775,
-0.3462243378162384,
-0.16181938350200653,
-0.4648602306842804,
0.196210116147995,
0.05868682265281677,
-0.1515142023563385,
-0.08748701214790344,
-0.45019403100013733,
0.18756400048732758,
0.05569201707839966,
-0.005037479102611542,
-0.19469645619392395,
0.10776174813508987,
-0.014502028003334999,
-0.03426451236009598,
0.3410903215408325,
-0.3945315480232239,
-0.0010110437870025635,
0.3809555768966675,
-0.1595524251461029,
-0.02658456563949585,
0.12249168008565903,
-0.09577785432338715,
0.39026060700416565,
-0.09571227431297302,
-0.15573160350322723,
0.567808210849762,
-0.5921734571456909,
-0.26608705520629883,
0.05019427090883255,
-0.04213886708021164,
-0.1447429656982422,
0.3695034384727478,
-0.06576819717884064,
-0.039474405348300934,
0.07813966274261475,
0.08266063779592514,
0.144344300031662,
0.025286955758929253,
0.036696262657642365,
-0.06944005191326141,
-0.1120612770318985,
0.07201431691646576,
0.14142988622188568,
0.14674213528633118,
0.03374359384179115,
0.0999671220779419,
0.06819626688957214,
0.32104992866516113,
-0.055073726922273636,
-0.04141709953546524,
0.6366989016532898,
0.1728818714618683,
0.2089121788740158,
0.046118222177028656,
-0.25871551036834717,
-0.09337187558412552,
0.09669534862041473,
-0.09548264741897583,
0.20620690286159515,
-0.5495560765266418,
0.039022721350193024,
-0.28502604365348816,
0.35468095541000366,
-0.3013054132461548,
-0.17267537117004395,
0.14956888556480408,
0.11204648017883301,
0.15216058492660522,
0.08011548221111298,
-0.052536491304636,
0.4499247670173645,
-0.268441379070282,
0.3102836608886719,
-0.393457293510437,
0.3476170003414154,
-0.3230850398540497,
-0.3127036988735199,
0.04742034524679184,
0.17949096858501434,
0.024485832080245018,
-0.04163544625043869,
-0.30319371819496155,
0.16406658291816711,
0.0453663095831871,
0.20532071590423584,
-0.31083378195762634,
-0.03053329885005951,
-0.0025202278047800064,
-0.27089670300483704,
0.02911042608320713,
-0.11259222775697708,
0.31119304895401,
0.10925492644309998,
0.05677122250199318,
-0.041405417025089264,
-0.08253021538257599,
0.3201824128627777,
0.1547757238149643,
0.22164899110794067,
0.2683151960372925,
0.04771827161312103,
0.1253909170627594,
-0.23968012630939484,
0.017539357766509056,
0.18916183710098267,
0.21758733689785004,
0.12453307956457138,
-0.02025003731250763,
-0.3259884715080261,
0.3841291666030884,
0.1633160412311554,
-0.023884344846010208,
-0.06235859915614128,
-0.2212226390838623,
0.2503383159637451,
0.3229474723339081,
0.3707652986049652,
0.35874050855636597,
0.09806711226701736,
-0.2662656605243683,
0.11245916038751602,
0.07017193734645844,
-0.0723481997847557,
0.2630462050437927,
0.1803167313337326,
0.37655019760131836,
0.25856801867485046,
0.01693122833967209,
0.12798240780830383,
-0.13936102390289307,
-0.4716644883155823,
-0.10985515266656876,
0.37011659145355225,
-0.29064542055130005,
-0.001737736165523529,
-0.12793463468551636,
-0.05703889578580856,
-0.3960559070110321,
-0.026670046150684357,
-0.15691319108009338,
-0.264887273311615,
-0.4273056983947754,
0.3287535309791565,
-0.05488137900829315,
0.29113078117370605,
-0.19480302929878235,
-0.24224235117435455,
0.19393393397331238,
-0.12218492478132248,
-0.1903228759765625,
-0.36165642738342285,
0.08080045878887177,
0.03458442538976669,
0.18995380401611328,
0.1496807038784027,
0.3307649493217468,
-0.107923224568367,
0.29579442739486694,
-0.3171854615211487,
-0.23514088988304138,
0.14393962919712067,
-0.0386446937918663,
-0.034761302173137665,
0.3126859962940216,
0.1878063678741455,
0.25660091638565063,
-0.5176385641098022,
0.09446390718221664,
-0.14445345103740692,
-0.189145028591156,
0.08693961799144745,
-0.052748166024684906,
-0.18511644005775452,
0.12090454995632172,
-0.2517589330673218,
-0.48113560676574707,
-0.5694224238395691,
0.13440638780593872,
0.24150867760181427,
0.08420412242412567,
0.26392337679862976,
0.1586868315935135,
0.31294816732406616,
0.08068373054265976,
0.4144498109817505,
0.23354190587997437,
-0.07358457148075104,
0.30034497380256653,
-0.15435391664505005,
-0.2662021815776825,
0.05075201392173767,
-0.09570382535457611,
0.4410252571105957,
-0.027559194713830948,
-0.35064196586608887,
-0.13104456663131714,
-0.24551378190517426,
0.16854546964168549,
-0.1461605727672577,
0.2192200869321823,
0.37877804040908813,
0.414222776889801,
0.004855979233980179,
-0.10502402484416962,
0.09298646450042725,
-0.03882167488336563,
-0.27470752596855164,
-0.06299746781587601,
-0.016450056806206703,
0.4377359449863434,
-0.19663459062576294,
0.2570459842681885,
0.23741205036640167,
-0.16500329971313477,
0.23736384510993958,
0.08955816179513931,
0.28659358620643616,
-0.16709105670452118,
-0.27347826957702637,
-0.17229416966438293,
-0.180995911359787,
0.10606499016284943,
-0.047507673501968384,
-0.24346637725830078,
-0.01947050914168358,
-0.12351600080728531,
-0.06241896376013756,
-0.04349275678396225,
-0.027372416108846664,
-0.07372915744781494,
-0.42088621854782104,
0.23319081962108612,
-0.08653128147125244,
-0.06325040012598038,
-0.17037665843963623,
0.036015868186950684,
0.18266384303569794,
0.04490106925368309,
-0.1402004361152649,
-0.07022362947463989,
-0.2805652320384979,
-0.027860542759299278,
-0.29643091559410095,
0.09792312979698181,
0.13958683609962463,
0.3668658137321472,
0.11172240972518921,
-0.05322970822453499,
0.06627233326435089,
0.006396360695362091,
0.2152082473039627,
-0.18715506792068481,
-0.23747441172599792,
0.14924632012844086,
-0.068037249147892,
-0.44537559151649475,
-0.03558829426765442,
-0.1686117947101593,
0.0898018404841423,
0.15014395117759705,
0.1917921006679535,
-0.06652428209781647,
-0.17009872198104858,
0.4521212577819824,
0.06473669409751892,
-0.11619039624929428,
-0.030791480094194412,
-0.15608495473861694,
-0.3060137629508972,
-0.3745065927505493,
-0.07876864075660706,
0.2592592239379883,
0.46490445733070374,
0.2863294184207916,
0.19665184617042542,
-0.2955895662307739,
-0.12551334500312805,
-0.048651427030563354,
0.02841978147625923,
0.1900259554386139,
-0.046729035675525665,
0.09548941254615784,
0.08056318014860153,
0.3972302973270416,
0.5442346930503845,
0.6393277645111084,
-0.3564460575580597,
-0.5447501540184021,
-0.05768277868628502,
-0.1703615039587021,
0.3061317503452301,
0.04232814535498619,
-0.09967024624347687,
0.19207651913166046,
-0.4968562126159668,
0.014718657359480858,
-0.08922390639781952,
-0.04809786006808281,
0.06301027536392212,
0.1677154004573822,
-0.18332231044769287,
-0.24146577715873718,
0.36401161551475525,
0.25125014781951904,
0.05983549356460571,
0.4667035639286041,
0.23924025893211365,
-0.38408684730529785,
0.4785679280757904,
0.1116812527179718,
0.7710726857185364,
0.2474597692489624,
0.10733545571565628,
0.2562350630760193,
-0.4400929808616638,
0.27828890085220337,
-0.009791374206542969,
-0.013260417617857456,
-0.4400268495082855,
-0.233763188123703,
-0.01054733619093895,
-0.23394107818603516,
0.3223817050457001,
-0.13457442820072174,
-0.1893027424812317,
0.057696398347616196,
-0.23671028017997742,
-0.11946331709623337,
0.12738797068595886,
0.15037280321121216,
-0.09924160689115524,
-0.18415561318397522,
-0.15610376000404358,
0.0969632938504219,
0.16927587985992432,
0.1097305566072464,
-0.11566148698329926,
-0.039514943957328796,
-0.1755986213684082,
-0.32159623503685,
-0.21222439408302307,
0.19046536087989807,
-0.3982684314250946,
0.4196784496307373,
0.15749415755271912,
-0.20017899572849274,
0.23643603920936584,
0.45393550395965576,
0.18932729959487915,
-0.10550291836261749,
-0.11277548223733902,
0.14423617720603943,
0.11200116574764252,
-0.16209116578102112,
0.07247572392225266,
0.2463332712650299,
0.3890644907951355,
-0.07430321723222733,
0.03419813513755798,
0.38855165243148804,
-0.18327166140079498,
-0.4002794027328491,
0.1420225203037262,
0.06763996928930283,
0.043245892971754074,
-0.23007208108901978,
-0.20149093866348267,
-0.17483940720558167,
-0.05476310849189758,
-0.17514777183532715,
0.147023543715477,
0.03132973611354828,
-0.3554784655570984,
0.1370883584022522,
-0.17109976708889008,
-0.3439685106277466,
0.01698918268084526,
0.38314497470855713,
0.1898702085018158,
0.04016689211130142,
0.6141799688339233,
0.07355962693691254,
-0.25458812713623047,
-0.21388505399227142,
0.1335947960615158,
0.19124937057495117,
-0.62235027551651,
0.1904217004776001,
-0.021416522562503815,
-0.2732062041759491,
-0.029417753219604492,
0.3728379011154175,
0.24950259923934937,
0.07783541083335876,
-0.17882214486598969,
-0.24607907235622406,
-0.428485631942749,
0.11749082803726196,
0.04444221034646034,
0.2214086949825287,
-0.37719854712486267,
0.2194172739982605,
-0.17110860347747803,
0.103178009390831,
-0.2955057919025421,
-0.026355629786849022,
-0.5316578149795532,
0.14548428356647491,
0.2224799394607544,
-0.015324385836720467,
-0.1502855271100998,
-0.02151089906692505,
0.14002758264541626,
0.2930784523487091,
-0.09902186691761017,
-0.1772584617137909,
-0.1596524566411972,
0.09779373556375504,
0.19002340734004974,
-0.1416580080986023,
0.00005961954593658447,
-0.01402941346168518,
-0.07470054924488068,
-0.019229821860790253,
-0.08337271213531494,
0.26569053530693054,
-0.0025573670864105225,
0.16257129609584808,
0.1595553457736969,
-0.033375516533851624,
-0.26804155111312866,
0.24136541783809662,
-0.1609545648097992,
0.2795288860797882,
-0.20764602720737457,
0.2113102674484253,
-0.09595108777284622,
0.09591668844223022,
-0.05292639881372452,
0.09137202799320221,
-0.17035174369812012,
-0.05258016288280487,
0.29036810994148254,
-0.34288138151168823,
-0.015550516545772552,
0.18389125168323517,
0.22407057881355286,
0.22856120765209198,
-0.3436901271343231,
0.012690983712673187,
0.14790883660316467,
0.23818010091781616,
-0.28956544399261475,
-0.16199693083763123,
-0.11132695525884628,
-0.2829515039920807,
0.039406076073646545,
0.15308913588523865,
-0.06062738597393036,
-0.12041755020618439,
0.2808241844177246,
0.26463666558265686,
0.20148871839046478,
-0.11933860182762146,
0.401050865650177,
0.3233991861343384,
-0.13719576597213745,
-0.04563349485397339,
0.5149922370910645,
0.24320140480995178,
0.2674027383327484,
0.3243061304092407,
-0.1201210469007492,
0.19134610891342163,
-0.3938050866127014,
-0.0865255668759346,
0.13271696865558624,
-0.15006910264492035,
0.07412679493427277,
-0.3074265122413635,
-0.01670687273144722,
-0.19194567203521729,
-0.12525498867034912,
-0.05134852975606918,
-0.052303194999694824,
-0.06941889971494675,
0.00046334415674209595,
0.07868194580078125,
-0.2117467075586319,
-0.026525575667619705,
0.027291610836982727,
-0.14084982872009277,
-0.10010220855474472,
-0.0014868825674057007,
0.15193066000938416,
-0.03160551190376282,
0.14198365807533264,
0.07675089687108994,
-0.25749874114990234,
-0.26734089851379395,
0.03476652875542641,
0.165971577167511,
0.03169573098421097,
-0.40021413564682007,
0.1568090170621872,
-0.03142855688929558,
-0.04700645059347153,
-0.2851216495037079,
0.43323761224746704,
0.5774037837982178,
0.4171214997768402,
0.10439202189445496,
-0.04928453639149666,
-0.07951289415359497,
-0.1513766497373581,
0.1302853524684906,
0.3273222744464874,
-0.07780224084854126,
0.22529923915863037,
0.3888447880744934,
0.15440931916236877,
-0.24088755249977112,
-0.07401212304830551,
0.07731480896472931,
0.22244518995285034,
-0.26429280638694763,
0.5152069330215454,
-0.02425434999167919,
-0.33644479513168335,
0.01254897192120552,
0.1521034836769104,
-0.4033680260181427,
0.19476701319217682,
0.4406997561454773,
-0.18382270634174347,
0.018053457140922546,
-0.33213943243026733,
0.06533817946910858,
0.03727605193853378,
0.6124904751777649,
0.48521313071250916,
0.33517056703567505,
-0.15982908010482788,
-0.16731733083724976,
-0.3128805160522461,
0.18699117004871368,
-0.11246559023857117,
0.03628339618444443,
0.013686876744031906,
0.06751812994480133,
0.04187149927020073,
0.15657424926757812,
0.18706804513931274,
0.2210918366909027,
-0.2763952314853668,
0.02608480118215084,
-0.38806039094924927,
-0.2455812245607376,
0.10810841619968414,
-0.03884698078036308,
0.08636362105607986,
-0.5342223644256592,
0.09064959734678268,
-0.0824476107954979,
0.16404196619987488,
-0.28465989232063293,
-0.0542563758790493,
0.20082250237464905,
-0.1979013979434967,
0.45428916811943054,
-0.05478053539991379,
0.4595044255256653,
0.020230047404766083,
-0.1561621129512787,
-0.13956424593925476,
-0.5568035840988159,
-0.28128939867019653,
0.1751372516155243,
0.32846924662590027,
0.4226182997226715,
-0.18614041805267334,
-0.38109081983566284,
-0.3425794243812561,
0.13387203216552734,
-0.20194575190544128,
0.10682004690170288,
-0.16240717470645905,
0.17728838324546814,
-0.04089207947254181,
0.11511212587356567,
0.19150277972221375,
-0.09540397673845291,
-0.02851509302854538,
0.19460955262184143,
-0.2638320326805115,
-0.3892172873020172,
0.41564828157424927,
-0.18457314372062683,
-0.3162107765674591,
0.15280799567699432,
0.1361370086669922,
-0.0953700989484787,
-0.08400661498308182,
-0.5766762495040894,
0.23468558490276337,
0.32386383414268494,
-0.09576019644737244,
-0.12282361835241318,
0.23794598877429962,
0.33038240671157837,
0.11651982367038727,
-0.04669814556837082,
0.3443213403224945,
-0.12160798907279968,
-0.01021159440279007,
0.05064907670021057,
-0.11506733298301697
] |
https://github.com/huggingface/datasets/issues/6537 | Conceptually, we can use xarray to load the netCDF file, then xarray -> pandas -> pyarrow. | Adding support for netCDF (*.nc) files | ### Feature request
netCDF (*.nc) is a file format for storing multidimensional scientific data, which is used by packages like `xarray` (labelled multi-dimensional arrays in Python). It would be nice to have native support for netCDF in `datasets`.
### Motivation
When uploading *.nc files onto Huggingface Hub through the `datasets` API, I would like to be able to preview the dataset without converting it to another format.
### Your contribution
I can submit a PR, provided I have the time. | 16 | Adding support for netCDF (*.nc) files
### Feature request
netCDF (*.nc) is a file format for storing multidimensional scientific data, which is used by packages like `xarray` (labelled multi-dimensional arrays in Python). It would be nice to have native support for netCDF in `datasets`.
### Motivation
When uploading *.nc files onto Huggingface Hub through the `datasets` API, I would like to be able to preview the dataset without converting it to another format.
### Your contribution
I can submit a PR, provided I have the time.
Conceptually, we can use xarray to load the netCDF file, then xarray -> pandas -> pyarrow. | [
-0.38227832317352295,
-0.14507780969142914,
-0.011451058089733124,
0.0008691772818565369,
-0.07568608224391937,
0.011976070702075958,
-0.2338274121284485,
0.40313783288002014,
-0.12558530271053314,
0.2797532379627228,
-0.4577072858810425,
0.04672252759337425,
-0.45220503211021423,
0.5326216220855713,
0.2755897343158722,
-0.003233242779970169,
0.27366405725479126,
0.39307600259780884,
0.029494931921362877,
0.292113721370697,
-0.2114965319633484,
0.057187072932720184,
-0.3259257674217224,
0.04001375287771225,
-0.41868361830711365,
-0.07334333658218384,
-0.2697604298591614,
0.1164521723985672,
-0.3124965727329254,
-0.5245506763458252,
0.3869742155075073,
0.601868212223053,
0.42347490787506104,
0.4160570502281189,
-0.0001273650850635022,
-0.08668389916419983,
0.20638923346996307,
-0.003786906599998474,
-0.2020246386528015,
-0.001156821846961975,
0.18574967980384827,
-0.19651851058006287,
0.2378147691488266,
-0.15236739814281464,
-0.30033767223358154,
-0.39744558930397034,
0.12841400504112244,
0.08319637924432755,
0.15361280739307404,
0.022421270608901978,
0.03430705890059471,
0.4950100779533386,
-0.05478724092245102,
-0.051135823130607605,
-0.30070215463638306,
0.547809362411499,
-0.38871002197265625,
0.5127074718475342,
0.43898913264274597,
-0.01470232754945755,
-0.07540634274482727,
0.09133520722389221,
-0.12100579589605331,
-0.23094472289085388,
0.527809202671051,
0.07864528894424438,
-0.015418268740177155,
-0.22246918082237244,
-0.19811995327472687,
0.29658007621765137,
0.4732947051525116,
-0.33544066548347473,
-0.4552273154258728,
-0.3139253854751587,
-0.002849999815225601,
-0.19338104128837585,
-0.11160683631896973,
0.20980706810951233,
-0.14039328694343567,
0.41716188192367554,
-0.2859150171279907,
-0.2624325752258301,
-0.4137352406978607,
0.28333142399787903,
-0.10568363964557648,
0.3065950870513916,
-0.12256321310997009,
-0.07108448445796967,
0.32730185985565186,
-0.06378927081823349,
0.22771432995796204,
-0.3597298860549927,
0.13584637641906738,
0.08905954658985138,
-0.3067235052585602,
-0.3186976909637451,
-0.0659189224243164,
0.2370159775018692,
0.22151528298854828,
-0.04482953995466232,
0.13066983222961426,
0.20510950684547424,
-0.6024091243743896,
0.08569405972957611,
0.08943650126457214,
-0.11058585345745087,
0.20541544258594513,
0.353291779756546,
0.3890238404273987,
0.07381763309240341,
0.4344847798347473,
-0.011641034856438637,
-0.22462236881256104,
0.26375672221183777,
-0.38565483689308167,
-0.18421974778175354,
0.11610683798789978,
-0.2161988466978073,
0.11743051558732986,
-0.1361539363861084,
0.5848822593688965,
0.23802992701530457,
0.22841092944145203,
0.30863428115844727,
0.0606040395796299,
0.14596505463123322,
-0.1474880427122116,
0.4648444950580597,
0.12369465082883835,
-0.30701619386672974,
-0.0075958408415317535,
-0.13021895289421082,
-0.15082773566246033,
0.06442152708768845,
0.27967777848243713,
-0.030102524906396866,
-0.1700417399406433,
-0.20393158495426178,
0.44769027829170227,
0.26456335186958313,
-0.2293245494365692,
0.03948032110929489,
0.15995600819587708,
0.12519973516464233,
-0.389764666557312,
0.1730998456478119,
0.010900674387812614,
0.11403842270374298,
-0.28797435760498047,
0.13485585153102875,
-0.12682190537452698,
-0.04984559118747711,
-0.4765504002571106,
-0.10184077173471451,
-0.10692863166332245,
0.04049159958958626,
-0.3245880603790283,
0.15466216206550598,
-0.4413628578186035,
-0.4729834198951721,
-0.034927837550640106,
-0.1630769968032837,
-0.4697898030281067,
-0.3831550180912018,
0.08955400437116623,
0.13813434541225433,
-0.07713387161493301,
-0.025487594306468964,
0.0003892630338668823,
-0.13334499299526215,
0.0756302997469902,
0.23344378173351288,
-0.17559263110160828,
0.028937572613358498,
-0.38741832971572876,
0.34767699241638184,
0.36627262830734253,
-0.5261173844337463,
-0.14335602521896362,
0.18518762290477753,
0.06442378461360931,
0.13362939655780792,
-0.06529748439788818,
0.37935975193977356,
0.18850144743919373,
-0.2541430592536926,
-0.07049055397510529,
0.27382752299308777,
0.08588328212499619,
-0.01886175200343132,
-0.0398474745452404,
-0.40949955582618713,
0.026345759630203247,
0.34511232376098633,
-0.01107677724212408,
0.16184981167316437,
0.2653658390045166,
-0.4876956045627594,
0.3819650113582611,
-0.41757771372795105,
0.11683102697134018,
0.04461739957332611,
-0.12179968506097794,
-0.007217850536108017,
-0.09616191685199738,
-0.3817785978317261,
-0.7617040276527405,
0.39789241552352905,
-0.029171690344810486,
-0.04255767539143562,
-0.2771168053150177,
-0.44178301095962524,
-0.06290299445390701,
-0.03454035893082619,
-0.08247756212949753,
-0.05765218287706375,
-0.048555638641119,
0.011755922809243202,
0.2814815640449524,
0.33854299783706665,
-0.24517202377319336,
0.3960847854614258,
0.04057217389345169,
0.21874794363975525,
-0.10814876854419708,
0.4403987526893616,
0.13699734210968018,
0.005269154906272888,
0.25705599784851074,
0.28883591294288635,
-0.06273768842220306,
-0.10063868761062622,
0.044771309942007065,
0.3194524049758911,
-0.5240402221679688,
0.08271230012178421,
0.09661364555358887,
0.549335241317749,
0.2536076307296753,
-0.3437272310256958,
0.3368060290813446,
-0.002491539344191551,
-0.05453060567378998,
-0.18579335510730743,
-0.12013477832078934,
0.39835235476493835,
-0.1655621975660324,
-0.15464326739311218,
-0.16803288459777832,
-0.020696505904197693,
0.011175066232681274,
0.1744290292263031,
-0.02098022773861885,
0.014467179775238037,
0.13628384470939636,
0.10797842592000961,
0.2088918536901474,
-0.23328763246536255,
-0.35493379831314087,
0.006377797573804855,
0.190494105219841,
-0.19664481282234192,
0.13667148351669312,
0.21212026476860046,
-0.2853003740310669,
0.24454984068870544,
0.2515673041343689,
-0.043467581272125244,
0.28644245862960815,
0.1237640231847763,
0.15738993883132935,
0.17393368482589722,
-0.20892462134361267,
0.015589527785778046,
0.03262251242995262,
-0.070370614528656,
0.07196642458438873,
0.042669396847486496,
-0.050753675401210785,
-0.013494228944182396,
-0.2796580195426941,
-0.23665228486061096,
-0.13521817326545715,
-0.11413443088531494,
-0.11190813779830933,
0.11468462646007538,
-0.29173606634140015,
-0.5802806615829468,
-0.016151607036590576,
0.03253009170293808,
-0.1309473067522049,
-0.03940821811556816,
-0.013239980675280094,
0.33000418543815613,
-0.03216664493083954,
0.010184507817029953,
-0.27629631757736206,
0.4414972960948944,
0.006800785660743713,
-0.23265379667282104,
-0.2314380258321762,
0.08271706104278564,
-0.10102885961532593,
-0.04034824296832085,
0.37185853719711304,
0.030754853039979935,
0.4362048804759979,
0.09520386904478073,
0.45605042576789856,
-0.2979300022125244,
-0.13703790307044983,
0.04189281165599823,
0.05224969983100891,
0.13986678421497345,
0.010608281940221786,
-0.014036111533641815,
-0.2880593538284302,
0.0260285846889019,
-0.04694254696369171,
-0.3861045837402344,
0.005502812564373016,
-0.030703630298376083,
0.015230432152748108,
-0.1066163033246994,
-0.3408431112766266,
0.24928241968154907,
-0.4922514855861664,
-0.41850078105926514,
0.2641351521015167,
-0.28671059012413025,
0.08080295473337173,
0.22620567679405212,
-0.17447242140769958,
0.04988731071352959,
-0.3042740523815155,
-0.26745694875717163,
0.07006684690713882,
-0.2425781637430191,
0.49878033995628357,
-0.2536594867706299,
-0.45243531465530396,
-0.051209788769483566,
-0.2537972331047058,
0.04171588271856308,
0.0539562962949276,
-0.0011581778526306152,
-0.04957642778754234,
-0.15641699731349945,
0.33859774470329285,
0.13680048286914825,
0.03623388707637787,
0.283267617225647,
-0.22131192684173584,
0.08586017042398453,
-0.06089824438095093,
0.0013955533504486084,
-0.22896645963191986,
0.14272010326385498,
-0.09574644267559052,
0.262057363986969,
-0.41250094771385193,
0.029061198234558105,
-0.03285011276602745,
0.1350170224905014,
-0.057021256536245346,
0.261482834815979,
-0.02966020628809929,
0.5106897354125977,
0.07323294878005981,
-0.07710933685302734,
-0.04826498031616211,
0.002514474093914032,
0.07046787440776825,
0.4443601667881012,
0.2363290786743164,
-0.08413635194301605,
-0.14522245526313782,
-0.2648331820964813,
-0.25584328174591064,
-0.09319403022527695,
0.11112657189369202,
0.15046140551567078,
0.33965355157852173,
0.030241280794143677,
-0.03674915432929993,
0.019953131675720215,
-0.4636106491088867,
-0.05094180256128311,
0.48787641525268555,
0.03209339454770088,
0.0036061927676200867,
-0.36486688256263733,
-0.0795544683933258,
-0.5242965221405029,
0.24556373059749603,
0.3184219300746918,
0.16345104575157166,
0.08093835413455963,
0.4108021855354309,
0.05545077472925186,
0.25411760807037354,
0.7427007555961609,
-0.3180773854255676,
-0.26068001985549927,
0.20103606581687927,
0.11480748653411865,
-0.3110896050930023,
0.09436030685901642,
-0.2073383629322052,
0.10414065420627594,
-0.1191134825348854,
0.16193807125091553,
0.05834127962589264,
-0.2828848361968994,
-0.03137793764472008,
0.337777316570282,
-0.04666654020547867,
-0.1453561931848526,
-0.01561892032623291,
0.087387815117836,
-0.3132098913192749,
-0.1409597545862198,
0.08004214614629745,
-0.14057762920856476,
-0.2086208462715149,
-0.169260174036026,
-0.010393425822257996,
0.07354311645030975,
0.24047718942165375,
0.15983812510967255,
0.3369799852371216,
0.19357579946517944,
-0.013180822134017944,
0.4147031307220459,
0.0907852053642273,
0.05244194716215134,
0.35124120116233826,
0.2946326732635498,
-0.140794575214386,
-0.05271533504128456,
0.042690929025411606,
0.2727016806602478,
0.4158894717693329,
0.05966271087527275,
0.03199749439954758,
-0.018141813576221466,
0.08554363250732422,
-0.4714910686016083,
0.287221759557724,
0.19699299335479736,
-0.07516972720623016,
-0.6755346059799194,
-0.05470309033989906,
0.7160319089889526,
0.13597744703292847,
-0.12605206668376923,
0.33444225788116455,
0.521881103515625,
-0.06984644383192062,
-0.0829639658331871,
-0.08387390524148941,
1.0673645734786987,
-0.3907724618911743,
0.33145904541015625,
0.37980324029922485,
-0.37552332878112793,
0.7052420377731323,
-0.1607135832309723,
0.005405113101005554,
-0.3218681216239929,
-0.04845593124628067,
-0.20686694979667664,
-0.08305830508470535,
0.30020850896835327,
0.09416447579860687,
-0.264278382062912,
0.2863345146179199,
0.41279906034469604,
0.24261125922203064,
0.04618712514638901,
0.18808740377426147,
0.10159031301736832,
-0.40351951122283936,
-0.056543342769145966,
0.004280313849449158,
-0.12818993628025055,
-0.0695679634809494,
-0.1930055022239685,
-0.2709812819957733,
-0.1982416808605194,
0.07098426669836044,
-0.10136383771896362,
-0.04032435640692711,
0.18986624479293823,
0.13876274228096008,
0.17078347504138947,
-0.1023498922586441,
0.24416352808475494,
0.34488046169281006,
0.32797905802726746,
-0.029491731896996498,
-0.5312148332595825,
-0.10680229961872101,
-0.42352747917175293,
0.020618028938770294,
-0.14118541777133942,
-0.16700534522533417,
0.3463533818721771,
0.06407241523265839,
-0.143644779920578,
0.08723566681146622,
0.17386801540851593,
-0.2615678310394287,
-0.09695902466773987,
0.14357709884643555,
0.21221064031124115,
-0.20254746079444885,
-0.13716115057468414,
-0.11607345193624496,
-0.07987706363201141,
0.07737146317958832,
-0.011582908220589161,
0.3229316174983978,
0.18547289073467255,
0.10004675388336182,
0.2079380750656128,
0.08376842737197876,
-0.07192922383546829,
0.09995684027671814,
0.07063136249780655,
-0.5591412782669067,
-0.002496795728802681,
-0.021969705820083618,
-0.30210718512535095,
-0.044825632125139236,
0.03902888298034668,
0.014670435339212418,
-0.263094425201416,
0.022581923753023148,
0.10385964810848236,
0.09767250716686249,
-0.03432489559054375,
0.3049634099006653,
0.13384519517421722,
-0.37735697627067566,
-0.04165850579738617,
-0.14291103184223175,
-0.1798183023929596,
0.28475576639175415,
-0.3696363866329193,
0.3974875807762146,
0.1814011186361313,
0.22005194425582886,
-0.058375388383865356,
-0.16260196268558502,
-0.14984382688999176,
0.06595230847597122,
0.17955565452575684,
0.04114736244082451,
0.4207991659641266,
0.2577224671840668,
0.15178623795509338,
-0.31589630246162415,
-0.11760637164115906,
0.2075568437576294,
-0.35684481263160706,
-0.0152493417263031,
-0.1171891838312149,
0.25519225001335144,
0.09261485189199448,
-0.12378230690956116,
0.06520187109708786,
-0.17854022979736328,
-0.029188552871346474,
-0.2336515635251999,
0.054559946060180664,
-0.05344133824110031,
-0.03728398680686951,
0.27771323919296265,
0.006130141206085682,
0.15068835020065308,
-0.0885244831442833,
0.36292707920074463,
0.14867661893367767,
0.5398856401443481,
-0.09939056634902954,
0.08885129541158676,
-0.3611093759536743,
-0.1868903934955597,
-0.07670395821332932,
0.19676265120506287,
0.1282527893781662,
-0.19393745064735413,
0.41433852910995483,
-0.0385449081659317,
0.07432922720909119,
0.05288062244653702,
0.5771950483322144,
0.014015767723321915,
-0.27342116832733154,
-0.10671654343605042,
0.46893125772476196,
-0.042994752526283264,
-0.097289077937603,
-0.2545398771762848,
0.3870380222797394,
0.004122722893953323,
0.0729455053806305,
0.29767221212387085,
0.40770360827445984,
-0.0870504081249237,
0.014176813885569572,
-0.11730904877185822,
-0.040032804012298584,
0.20019327104091644,
0.10289818793535233,
0.5648682117462158,
0.2992905378341675,
-0.01705995947122574,
0.18766087293624878,
0.18203487992286682,
0.17202405631542206,
0.8800264596939087,
-0.1204063892364502,
0.22729918360710144,
0.06117107719182968,
0.2949402630329132,
0.11798866093158722,
-0.28458118438720703,
0.18711449205875397,
0.0225253626704216,
0.05491449683904648,
0.19218705594539642,
-0.04972778633236885,
0.05295431613922119,
-0.25166055560112,
-0.17955923080444336,
-0.18326672911643982,
0.20255953073501587,
-0.07197828590869904,
0.22696933150291443,
0.19946488738059998,
-0.0709996372461319,
0.05947031080722809,
-0.0035858452320098877,
-0.3177821636199951,
-0.06291872262954712,
0.058407653123140335,
0.12968403100967407,
0.19169612228870392,
-0.05634364113211632,
0.37672653794288635,
0.37591055035591125,
0.32219305634498596,
-0.16588334739208221,
-0.05896206945180893,
0.25835317373275757,
0.030196022242307663,
0.13709652423858643,
0.2717864513397217,
0.3533667325973511,
0.042158521711826324,
0.12303309142589569,
0.15127548575401306,
-0.3505844175815582,
-0.044207990169525146,
0.22205498814582825,
-0.14934107661247253,
0.15393497049808502,
0.2893006503582001,
0.27554428577423096,
-0.03483371436595917,
0.028162378817796707,
-0.12779340147972107,
-0.011499527841806412,
0.22124163806438446,
-0.33632737398147583,
-0.010660376399755478,
-0.06619036197662354,
-0.1995442658662796,
0.001872495748102665,
-0.2291446030139923,
-0.2826399803161621,
-0.08811618387699127,
0.07945559918880463,
-0.05456581339240074,
0.03884623572230339,
-0.03318401798605919,
-0.043622441589832306,
0.10611222684383392,
0.4048263430595398,
0.37880897521972656,
0.37874215841293335,
-0.030582895502448082,
-0.5744822025299072,
-0.6202839612960815,
-0.025803308933973312,
-0.05337100848555565,
-0.46931612491607666,
0.16732503473758698,
-0.15931472182273865,
0.02107056975364685,
0.23061399161815643,
-0.10627920925617218,
-0.14315927028656006,
0.2964802384376526,
0.03254880756139755,
-0.18489384651184082,
-0.0822557806968689,
0.05506996437907219,
0.02417737804353237,
-0.06998597830533981,
-0.3976593017578125,
0.26958972215652466,
-0.1764747053384781,
-0.2585141658782959,
-0.0020480453968048096,
0.550544261932373,
-0.3453001379966736,
0.00468659121543169,
0.4293422996997833,
0.128809854388237,
0.4887149930000305,
-0.08739025145769119,
-0.11472125351428986,
-0.0755586177110672,
0.2011319398880005,
0.006234351545572281,
0.1364903748035431,
0.02356869727373123,
0.7903156280517578,
-0.5040958523750305,
-0.19568447768688202,
-0.0645895004272461,
-0.09373034536838531,
0.07006660103797913,
0.08871743083000183,
-0.2361987680196762,
0.15525701642036438,
-0.38059473037719727,
0.11456865817308426,
0.27009814977645874,
0.422492116689682,
-0.004481146112084389,
-0.01972080022096634,
0.05994445085525513,
-0.3683074414730072,
0.36092910170555115,
-0.0054200999438762665,
-0.24560284614562988,
0.017395786941051483,
-0.09887237846851349,
0.08322380483150482,
-0.047411542385816574,
-0.5633252263069153,
0.07255226373672485,
0.17514270544052124,
0.20456455647945404,
0.20337453484535217,
0.3862307369709015,
-0.10196878015995026,
-0.34382545948028564,
-0.1261177510023117,
0.3504897952079773,
0.1090792864561081,
-0.22123506665229797,
0.02231433242559433,
-0.4573744237422943
] |
https://github.com/huggingface/datasets/issues/6537 | I'd still need to verify that such a conversion would be lossless, especially for multi-dimensional data. | Adding support for netCDF (*.nc) files | ### Feature request
netCDF (*.nc) is a file format for storing multidimensional scientific data, which is used by packages like `xarray` (labelled multi-dimensional arrays in Python). It would be nice to have native support for netCDF in `datasets`.
### Motivation
When uploading *.nc files onto Huggingface Hub through the `datasets` API, I would like to be able to preview the dataset without converting it to another format.
### Your contribution
I can submit a PR, provided I have the time. | 16 | Adding support for netCDF (*.nc) files
### Feature request
netCDF (*.nc) is a file format for storing multidimensional scientific data, which is used by packages like `xarray` (labelled multi-dimensional arrays in Python). It would be nice to have native support for netCDF in `datasets`.
### Motivation
When uploading *.nc files onto Huggingface Hub through the `datasets` API, I would like to be able to preview the dataset without converting it to another format.
### Your contribution
I can submit a PR, provided I have the time.
I'd still need to verify that such a conversion would be lossless, especially for multi-dimensional data. | [
-0.42485103011131287,
-0.14924445748329163,
-0.01656416431069374,
-0.053587038069963455,
-0.08428335934877396,
0.03142045438289642,
-0.2771828770637512,
0.3843265771865845,
-0.10386538505554199,
0.3364311754703522,
-0.42337337136268616,
0.005743648856878281,
-0.5121448636054993,
0.5744471549987793,
0.14821812510490417,
0.0499265119433403,
0.2813507616519928,
0.3571123480796814,
-0.01885155215859413,
0.3076561689376831,
-0.2359468638896942,
0.07878246903419495,
-0.2811770439147949,
-0.041303880512714386,
-0.34364378452301025,
-0.009351888671517372,
-0.20587071776390076,
0.10002081096172333,
-0.3840886056423187,
-0.41994500160217285,
0.28440430760383606,
0.5439450740814209,
0.4076131284236908,
0.39217162132263184,
-0.0001278799318242818,
-0.0600462406873703,
0.15663595497608185,
-0.02741209790110588,
-0.2585575580596924,
-0.009328410029411316,
0.14551836252212524,
-0.19716331362724304,
0.17874351143836975,
-0.10965092480182648,
-0.31430986523628235,
-0.310985803604126,
0.0813208818435669,
-0.10096028447151184,
0.16550837457180023,
0.0660298615694046,
0.03424067795276642,
0.46305418014526367,
-0.10078732669353485,
-0.04489520564675331,
-0.32667550444602966,
0.6654295325279236,
-0.4296945333480835,
0.3722633719444275,
0.36830729246139526,
0.0979362204670906,
0.0015143640339374542,
0.1703747808933258,
-0.11758776009082794,
-0.29355111718177795,
0.5001623630523682,
-0.018103208392858505,
-0.030435781925916672,
-0.19705399870872498,
-0.13078820705413818,
0.2927396297454834,
0.4646398723125458,
-0.22659896314144135,
-0.47479310631752014,
-0.26689204573631287,
-0.01766851171851158,
-0.178370863199234,
-0.14463937282562256,
0.19964435696601868,
-0.11728940904140472,
0.4139459431171417,
-0.37299975752830505,
-0.28045812249183655,
-0.39341413974761963,
0.2120412290096283,
-0.10995114594697952,
0.24152952432632446,
-0.19224269688129425,
-0.0970962792634964,
0.3462867736816406,
-0.08684507012367249,
0.16311560571193695,
-0.34676802158355713,
0.12779900431632996,
0.02330230548977852,
-0.21604076027870178,
-0.3818393051624298,
-0.11850662529468536,
0.24187451601028442,
0.18497592210769653,
-0.048574481159448624,
0.1493345946073532,
0.23524321615695953,
-0.6851212382316589,
0.0535372793674469,
0.05527522787451744,
-0.16731078922748566,
0.25852862000465393,
0.39163661003112793,
0.37018075585365295,
0.11482768505811691,
0.4965980052947998,
0.008547157049179077,
-0.15896722674369812,
0.3127400279045105,
-0.4711463451385498,
-0.13842132687568665,
0.15466146171092987,
-0.2743200659751892,
0.09444423764944077,
-0.13155917823314667,
0.5818797945976257,
0.3108184039592743,
0.22713406383991241,
0.2643219828605652,
0.10241135954856873,
0.14752966165542603,
-0.061681754887104034,
0.4734329581260681,
0.1387256383895874,
-0.4190402030944824,
0.011334188282489777,
-0.1286371350288391,
-0.17866086959838867,
0.08172141015529633,
0.2766685485839844,
0.05771356448531151,
-0.198420450091362,
-0.2044668346643448,
0.36584943532943726,
0.27128034830093384,
-0.20746147632598877,
0.07557947933673859,
0.25591638684272766,
0.07968440651893616,
-0.41310617327690125,
0.20788022875785828,
0.09349241107702255,
0.05626737326383591,
-0.2793603539466858,
0.1338406503200531,
-0.10693210363388062,
0.02235925942659378,
-0.46237754821777344,
-0.10815173387527466,
-0.0969754308462143,
0.05000104382634163,
-0.3250252306461334,
0.19975197315216064,
-0.43408292531967163,
-0.48558497428894043,
-0.015609323978424072,
-0.16259008646011353,
-0.5609179139137268,
-0.3474086821079254,
0.0873238742351532,
0.23199230432510376,
-0.1058908998966217,
-0.021265394985675812,
-0.048880867660045624,
-0.15716899931430817,
0.1261185258626938,
0.22482933104038239,
-0.1271572709083557,
-0.06881851702928543,
-0.4194261133670807,
0.2734336853027344,
0.35899919271469116,
-0.525756299495697,
-0.054491009563207626,
0.2138383984565735,
0.036686643958091736,
0.1207430511713028,
-0.15652626752853394,
0.34671324491500854,
0.19034473598003387,
-0.3161524832248688,
-0.07329577952623367,
0.1633058786392212,
0.09407547861337662,
0.008536353707313538,
-0.03980451822280884,
-0.44615837931632996,
0.07567636668682098,
0.28346872329711914,
-0.04593433439731598,
0.23258280754089355,
0.24902796745300293,
-0.4319912791252136,
0.29770708084106445,
-0.4198724329471588,
0.1855718493461609,
0.03770679235458374,
-0.16138742864131927,
-0.08436723798513412,
-0.16083626449108124,
-0.39972785115242004,
-0.7091004848480225,
0.3197046220302582,
0.04085559397935867,
-0.07173256576061249,
-0.20265598595142365,
-0.452253520488739,
-0.04084388539195061,
-0.09253298491239548,
-0.024316318333148956,
-0.0491558201611042,
-0.027408529072999954,
0.01727314665913582,
0.21508799493312836,
0.2654232978820801,
-0.19573581218719482,
0.33606213331222534,
-0.009333327412605286,
0.1770603209733963,
-0.09990952908992767,
0.32738226652145386,
0.19428718090057373,
0.07369519770145416,
0.25544118881225586,
0.28120094537734985,
-0.01382676512002945,
-0.08937714993953705,
0.006996218115091324,
0.25399428606033325,
-0.49810484051704407,
0.11067776381969452,
0.13428598642349243,
0.5915389060974121,
0.22789068520069122,
-0.2963769733905792,
0.3915844261646271,
-0.013721772469580173,
-0.06040645390748978,
-0.1952691376209259,
-0.2127513289451599,
0.36714014410972595,
-0.16562876105308533,
-0.10414362698793411,
-0.17059293389320374,
0.03919924050569534,
-0.01627977564930916,
0.1620410680770874,
-0.07626672834157944,
-0.04571455717086792,
0.1016797423362732,
0.10344094038009644,
0.12381134927272797,
-0.24298305809497833,
-0.30838704109191895,
0.05981966480612755,
0.16700318455696106,
-0.21794122457504272,
0.1086844876408577,
0.23445142805576324,
-0.3161119520664215,
0.22345426678657532,
0.24248841404914856,
0.04515288770198822,
0.35850054025650024,
0.11721812188625336,
0.2604351341724396,
0.20233148336410522,
-0.10630983114242554,
0.012772850692272186,
0.0667264387011528,
-0.10307228565216064,
0.048916131258010864,
0.049537137150764465,
-0.09909879416227341,
-0.015265229158103466,
-0.2411528080701828,
-0.19172470271587372,
-0.17256948351860046,
-0.14506612718105316,
-0.10848540812730789,
0.06709457188844681,
-0.393722802400589,
-0.5434687733650208,
-0.06391946971416473,
0.12141543626785278,
-0.09839475154876709,
-0.0922895073890686,
0.013244697824120522,
0.3591485023498535,
-0.0854681059718132,
-0.0637255385518074,
-0.3088620603084564,
0.5402219295501709,
-0.05628234148025513,
-0.19463245570659637,
-0.2007988542318344,
0.13916805386543274,
-0.08353757858276367,
-0.03757977485656738,
0.40122726559638977,
0.06285816431045532,
0.45022258162498474,
0.07027571648359299,
0.4513745605945587,
-0.34790483117103577,
-0.07473970949649811,
0.017794854938983917,
0.0918986052274704,
0.08763767033815384,
0.013412438333034515,
-0.015081971883773804,
-0.27163365483283997,
0.07988601922988892,
-0.11486184597015381,
-0.3440764248371124,
-0.005605868995189667,
-0.043090008199214935,
-0.0006827898323535919,
-0.11101973056793213,
-0.36365705728530884,
0.2796823978424072,
-0.45667386054992676,
-0.41642701625823975,
0.2554829716682434,
-0.3172496557235718,
0.038477614521980286,
0.22048959136009216,
-0.20025032758712769,
0.05933099985122681,
-0.25582224130630493,
-0.26592960953712463,
0.03031652793288231,
-0.2385898232460022,
0.45044130086898804,
-0.2818264365196228,
-0.4530049264431,
-0.004352264106273651,
-0.15762314200401306,
0.03071819618344307,
0.1020062118768692,
0.013619400560855865,
-0.006952058523893356,
-0.12812352180480957,
0.1965918093919754,
0.08038172125816345,
-0.025054331868886948,
0.34463340044021606,
-0.21938954293727875,
0.0896616131067276,
-0.06235305219888687,
0.010725125670433044,
-0.2268776148557663,
0.07695800065994263,
-0.05450578033924103,
0.21103565394878387,
-0.40708985924720764,
0.06332097947597504,
-0.036580462008714676,
0.2899054288864136,
-0.05738525092601776,
0.19613605737686157,
-0.0008775964379310608,
0.5420299768447876,
0.022087641060352325,
-0.0631696805357933,
0.006881587207317352,
-0.0016020610928535461,
0.018263258039951324,
0.3987933397293091,
0.24379679560661316,
-0.07833607494831085,
-0.10251746326684952,
-0.20635366439819336,
-0.2612484395503998,
-0.13157324492931366,
0.11880146712064743,
0.10997948795557022,
0.3398832082748413,
0.03651838004589081,
-0.023509129881858826,
0.02060166746377945,
-0.46115416288375854,
-0.020307909697294235,
0.601026713848114,
0.046217117458581924,
0.018196988850831985,
-0.4226073622703552,
-0.06588731706142426,
-0.4824017882347107,
0.260398268699646,
0.27684351801872253,
0.19042515754699707,
0.0010368600487709045,
0.3368169963359833,
-0.035572901368141174,
0.3106241226196289,
0.6787523627281189,
-0.3900866210460663,
-0.2703239917755127,
0.23690608143806458,
0.17349469661712646,
-0.2921854853630066,
0.10284356772899628,
-0.2253958284854889,
0.15483298897743225,
-0.1200898140668869,
0.24143613874912262,
0.10390333831310272,
-0.3048771917819977,
-0.012464972212910652,
0.35732385516166687,
0.005257144570350647,
-0.060299795120954514,
0.04819729924201965,
0.13822954893112183,
-0.2942294180393219,
-0.1600276231765747,
0.11186981946229935,
-0.21026387810707092,
-0.26819902658462524,
-0.20827224850654602,
-0.023907218128442764,
0.12368753552436829,
0.27699965238571167,
0.11433142423629761,
0.30918604135513306,
0.2531222701072693,
-0.04044175520539284,
0.4029960334300995,
0.13509373366832733,
0.00002505071461200714,
0.3241168260574341,
0.33902010321617126,
-0.0814824104309082,
0.03538241609930992,
0.0801088884472847,
0.28381288051605225,
0.47557011246681213,
0.0619366355240345,
-0.0359475277364254,
-0.034624673426151276,
0.12617792189121246,
-0.5604618191719055,
0.334989458322525,
0.11949694156646729,
-0.08215872198343277,
-0.7018893361091614,
-0.027997460216283798,
0.6932517886161804,
0.15363164246082306,
-0.1081029400229454,
0.3280479311943054,
0.5627962946891785,
-0.08596792817115784,
-0.06548923999071121,
-0.06705926358699799,
1.0609478950500488,
-0.3299599289894104,
0.29882729053497314,
0.27940160036087036,
-0.3594512641429901,
0.6771502494812012,
-0.14433526992797852,
-0.02416372299194336,
-0.22895482182502747,
-0.05093066394329071,
-0.20918802917003632,
-0.0627257376909256,
0.325955331325531,
0.09165310859680176,
-0.25674623250961304,
0.2600797712802887,
0.40102988481521606,
0.20406311750411987,
0.0013136044144630432,
0.13923171162605286,
0.07139372080564499,
-0.4274037778377533,
0.04654282331466675,
0.0337597131729126,
-0.13498474657535553,
-0.038131408393383026,
-0.11214928328990936,
-0.24252109229564667,
-0.19611728191375732,
0.10430923104286194,
-0.13312511146068573,
-0.040568821132183075,
0.18227291107177734,
0.11310862004756927,
0.12045653909444809,
-0.027463003993034363,
0.3731576204299927,
0.30066993832588196,
0.39909589290618896,
0.07678715884685516,
-0.5406417846679688,
-0.18699617683887482,
-0.42905116081237793,
0.031713370233774185,
-0.13119639456272125,
-0.2032773196697235,
0.272219717502594,
0.08304518461227417,
-0.04965672641992569,
0.02328428067266941,
0.17919614911079407,
-0.17267544567584991,
-0.06760276854038239,
0.045356765389442444,
0.23087461292743683,
-0.26494231820106506,
-0.15119533240795135,
-0.004050862044095993,
-0.07940150797367096,
0.11994956433773041,
-0.01921256259083748,
0.3105281889438629,
0.18513314425945282,
0.10343334823846817,
0.24637159705162048,
0.08006948232650757,
-0.025858469307422638,
0.12983830273151398,
0.025114666670560837,
-0.633167028427124,
-0.027651948854327202,
-0.11639455705881119,
-0.29283609986305237,
-0.07638588547706604,
0.1691652238368988,
0.009342312812805176,
-0.20959165692329407,
0.04910756275057793,
0.04559384658932686,
0.11610966920852661,
-0.00534520298242569,
0.31159791350364685,
0.09787057340145111,
-0.34085962176322937,
-0.05577734112739563,
-0.10236017405986786,
-0.17584069073200226,
0.24439691007137299,
-0.4354489743709564,
0.44714105129241943,
0.07678267359733582,
0.20531237125396729,
-0.14275097846984863,
-0.1982097625732422,
-0.14250943064689636,
0.09286915510892868,
0.2378610074520111,
0.008389579132199287,
0.46695685386657715,
0.2183641940355301,
0.09708517789840698,
-0.36309361457824707,
-0.14572900533676147,
0.26287737488746643,
-0.3898599147796631,
0.0008461140096187592,
-0.11452119052410126,
0.2721877694129944,
0.0911298543214798,
-0.11230089515447617,
0.1033640056848526,
-0.1483927220106125,
-0.045064978301525116,
-0.21685239672660828,
0.024681836366653442,
-0.031235717236995697,
-0.04535298049449921,
0.2538365423679352,
-0.10248911380767822,
0.18696340918540955,
-0.02860468253493309,
0.3332904577255249,
0.23968933522701263,
0.5707106590270996,
-0.15723413228988647,
0.12153980135917664,
-0.2884973883628845,
-0.1857835054397583,
-0.11381737887859344,
0.24106504023075104,
0.1173921674489975,
-0.13096237182617188,
0.3923185467720032,
0.026364024728536606,
0.12202563881874084,
0.10306209325790405,
0.4809408187866211,
-0.015777401626110077,
-0.275393009185791,
-0.12276884913444519,
0.4555722177028656,
-0.04853223264217377,
-0.02660530060529709,
-0.21976713836193085,
0.40183645486831665,
-0.007060587406158447,
0.08379347622394562,
0.2544843256473541,
0.34708231687545776,
-0.05390878766775131,
0.062008798122406006,
-0.17623314261436462,
-0.12755495309829712,
0.10809223353862762,
0.18703219294548035,
0.5087069869041443,
0.25658124685287476,
-0.02084100991487503,
0.10930663347244263,
0.11857862770557404,
0.17640605568885803,
0.8755055069923401,
-0.04359498247504234,
0.2794738709926605,
0.11656755208969116,
0.3511914908885956,
0.08971238136291504,
-0.30329465866088867,
0.20504289865493774,
0.024542830884456635,
0.004918485879898071,
0.29394692182540894,
-0.040213752537965775,
-0.042374685406684875,
-0.3990401327610016,
-0.22012506425380707,
-0.16284415125846863,
0.18460258841514587,
-0.09222980588674545,
0.1906224936246872,
0.2004510462284088,
-0.0561760738492012,
-0.012120090425014496,
0.004615277051925659,
-0.352306604385376,
0.004314333200454712,
0.03052513115108013,
0.1273982673883438,
0.2253219187259674,
0.061799876391887665,
0.291058212518692,
0.37491369247436523,
0.4069015085697174,
-0.18895947933197021,
-0.1430056095123291,
0.27850547432899475,
0.10775163769721985,
0.14556726813316345,
0.2567078471183777,
0.29768040776252747,
0.029716916382312775,
0.19821614027023315,
0.20595236122608185,
-0.2977675497531891,
-0.07395057380199432,
0.25935259461402893,
-0.10424458980560303,
0.2050209939479828,
0.23109352588653564,
0.26051634550094604,
-0.04060131311416626,
0.06936527788639069,
-0.08464647829532623,
-0.08486999571323395,
0.2135259062051773,
-0.34438180923461914,
0.03630144149065018,
-0.067599818110466,
-0.11153259873390198,
-0.07558495551347733,
-0.26890793442726135,
-0.2096182107925415,
-0.1604093611240387,
0.05163269117474556,
-0.07747405022382736,
0.06494836509227753,
-0.011653352528810501,
-0.03409460186958313,
0.1467922180891037,
0.3085142970085144,
0.31397661566734314,
0.20378847420215607,
-0.026080671697854996,
-0.5878452062606812,
-0.5225650072097778,
-0.10689672827720642,
0.030001714825630188,
-0.3688540458679199,
0.10330916941165924,
-0.14170697331428528,
0.06708528101444244,
0.3019886314868927,
-0.10701967775821686,
-0.16588304936885834,
0.3375166058540344,
0.044124238193035126,
-0.07098308205604553,
-0.10844692587852478,
0.16262748837471008,
0.01841612346470356,
-0.049259625375270844,
-0.418745756149292,
0.2692844271659851,
-0.018612004816532135,
-0.26596295833587646,
0.0049054790288209915,
0.555426836013794,
-0.3805592656135559,
-0.04369853064417839,
0.3369377553462982,
0.19339831173419952,
0.40603646636009216,
-0.09871946275234222,
-0.19748550653457642,
-0.06369506567716599,
0.2805178165435791,
-0.004516385495662689,
0.10210561752319336,
0.022909868508577347,
0.8177698254585266,
-0.4686494469642639,
-0.10856197774410248,
-0.059425532817840576,
-0.19456574320793152,
0.08147399127483368,
0.10725076496601105,
-0.33163273334503174,
0.18789106607437134,
-0.39250025153160095,
0.12298138439655304,
0.2971165180206299,
0.4118063151836395,
0.021621547639369965,
0.0037878751754760742,
0.03425852954387665,
-0.3195870518684387,
0.3615332245826721,
0.08831670880317688,
-0.2114233523607254,
0.06610934436321259,
-0.0821685642004013,
0.060938213020563126,
-0.07824411243200302,
-0.5897845029830933,
-0.012507006525993347,
0.15902173519134521,
0.1412440985441208,
0.3222862780094147,
0.4254262447357178,
-0.14022649824619293,
-0.38791322708129883,
-0.15325182676315308,
0.4777987599372864,
0.1425771713256836,
-0.24467897415161133,
0.07185578346252441,
-0.4522177577018738
] |
https://github.com/huggingface/datasets/issues/6638 | Looks like it works with latest datasets repository
```
- `datasets` version: 2.16.2.dev0
- Platform: Linux-5.15.0-92-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- `huggingface_hub` version: 0.20.3
- PyArrow version: 15.0.0
- Pandas version: 2.0.1
- `fsspec` version: 2023.10.0
```
Could you explain which is the minimum version that fixes this?
Edit: Looks like that's 2.16.0, will close out issue | Cannot download wmt16 dataset | ### Describe the bug
As of this morning (PST) 2/1/2024, seeing the wmt16 dataset is missing from opus , could you suggest an alternative?
```
Downloading data files: 0%| | 0/4 [00:00<?, ?it/s]Traceback (most recent call last):
File "test.py", line 2, in <module>
raw_datasets = load_dataset("wmt16","ro-en",split="train")
File "/usr/local/lib/python3.8/dist-packages/datasets/load.py", line 2153, in load_dataset
builder_instance.download_and_prepare(
File "/usr/local/lib/python3.8/dist-packages/datasets/builder.py", line 954, in download_and_prepare
self._download_and_prepare(
File "/usr/local/lib/python3.8/dist-packages/datasets/builder.py", line 1717, in _download_and_prepare
super()._download_and_prepare(
File "/usr/local/lib/python3.8/dist-packages/datasets/builder.py", line 1027, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/root/.cache/huggingface/modules/datasets_modules/datasets/wmt16/746749a11d25c02058042da7502d973ff410e73457f3d305fc1177dc0e8c4227/wmt_utils.py", line 754, in _split_generators
downloaded_files = dl_manager.download_and_extract(urls_to_download)
File "/usr/local/lib/python3.8/dist-packages/datasets/download/download_manager.py", line 565, in download_and_extract
return self.extract(self.download(url_or_urls))
File "/usr/local/lib/python3.8/dist-packages/datasets/download/download_manager.py", line 428, in download
downloaded_path_or_paths = map_nested(
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 464, in map_nested
mapped = [
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 465, in <listcomp>
_single_map_nested((function, obj, types, None, True, None))
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 384, in _single_map_nested
mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar]
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 384, in <listcomp>
mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar]
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 367, in _single_map_nested
return function(data_struct)
File "/usr/local/lib/python3.8/dist-packages/datasets/download/download_manager.py", line 454, in _download
return cached_path(url_or_filename, download_config=download_config)
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/file_utils.py", line 182, in cached_path
output_path = get_from_cache(
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/file_utils.py", line 596, in get_from_cache
raise FileNotFoundError(f"Couldn't find file at {url}")
FileNotFoundError: Couldn't find file at https://opus.nlpl.eu/download.php?f=SETIMES/v2/tmx/en-ro.tmx.gz
```
### Steps to reproduce the bug
```
from datasets import load_dataset
raw_datasets = load_dataset("wmt16","ro-en",split="train")
```
### Expected behavior
Expect the dataset to be downloaded/ at least a clean exit with error explaining dataset is missing and a suggestion for next steps
### Environment info
- `datasets` version: 2.14.7
- Platform: Linux-5.15.0-92-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.17.3
- PyArrow version: 15.0.0
- Pandas version: 2.0.1
| 57 | Cannot download wmt16 dataset
### Describe the bug
As of this morning (PST) 2/1/2024, seeing the wmt16 dataset is missing from opus , could you suggest an alternative?
```
Downloading data files: 0%| | 0/4 [00:00<?, ?it/s]Traceback (most recent call last):
File "test.py", line 2, in <module>
raw_datasets = load_dataset("wmt16","ro-en",split="train")
File "/usr/local/lib/python3.8/dist-packages/datasets/load.py", line 2153, in load_dataset
builder_instance.download_and_prepare(
File "/usr/local/lib/python3.8/dist-packages/datasets/builder.py", line 954, in download_and_prepare
self._download_and_prepare(
File "/usr/local/lib/python3.8/dist-packages/datasets/builder.py", line 1717, in _download_and_prepare
super()._download_and_prepare(
File "/usr/local/lib/python3.8/dist-packages/datasets/builder.py", line 1027, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/root/.cache/huggingface/modules/datasets_modules/datasets/wmt16/746749a11d25c02058042da7502d973ff410e73457f3d305fc1177dc0e8c4227/wmt_utils.py", line 754, in _split_generators
downloaded_files = dl_manager.download_and_extract(urls_to_download)
File "/usr/local/lib/python3.8/dist-packages/datasets/download/download_manager.py", line 565, in download_and_extract
return self.extract(self.download(url_or_urls))
File "/usr/local/lib/python3.8/dist-packages/datasets/download/download_manager.py", line 428, in download
downloaded_path_or_paths = map_nested(
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 464, in map_nested
mapped = [
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 465, in <listcomp>
_single_map_nested((function, obj, types, None, True, None))
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 384, in _single_map_nested
mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar]
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 384, in <listcomp>
mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar]
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 367, in _single_map_nested
return function(data_struct)
File "/usr/local/lib/python3.8/dist-packages/datasets/download/download_manager.py", line 454, in _download
return cached_path(url_or_filename, download_config=download_config)
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/file_utils.py", line 182, in cached_path
output_path = get_from_cache(
File "/usr/local/lib/python3.8/dist-packages/datasets/utils/file_utils.py", line 596, in get_from_cache
raise FileNotFoundError(f"Couldn't find file at {url}")
FileNotFoundError: Couldn't find file at https://opus.nlpl.eu/download.php?f=SETIMES/v2/tmx/en-ro.tmx.gz
```
### Steps to reproduce the bug
```
from datasets import load_dataset
raw_datasets = load_dataset("wmt16","ro-en",split="train")
```
### Expected behavior
Expect the dataset to be downloaded/ at least a clean exit with error explaining dataset is missing and a suggestion for next steps
### Environment info
- `datasets` version: 2.14.7
- Platform: Linux-5.15.0-92-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.17.3
- PyArrow version: 15.0.0
- Pandas version: 2.0.1
Looks like it works with latest datasets repository
```
- `datasets` version: 2.16.2.dev0
- Platform: Linux-5.15.0-92-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- `huggingface_hub` version: 0.20.3
- PyArrow version: 15.0.0
- Pandas version: 2.0.1
- `fsspec` version: 2023.10.0
```
Could you explain which is the minimum version that fixes this?
Edit: Looks like that's 2.16.0, will close out issue | [
-0.36052435636520386,
0.317926287651062,
-0.002050556242465973,
0.38708245754241943,
0.4038749039173126,
0.11385878920555115,
0.2532888948917389,
0.20784994959831238,
-0.027222130447626114,
0.21313440799713135,
0.026451997458934784,
0.03987692669034004,
-0.3029175102710724,
0.040763065218925476,
0.31888723373413086,
-0.1025252416729927,
-0.04760010167956352,
0.14544767141342163,
-0.681085467338562,
-0.021854877471923828,
-0.39371827244758606,
0.04465974122285843,
-0.19849680364131927,
-0.12580342590808868,
0.09383539855480194,
0.10055328905582428,
-0.16295811533927917,
0.15399499237537384,
-0.38727134466171265,
-0.36015573143959045,
0.27366510033607483,
-0.02034168690443039,
0.015924938023090363,
0.3857197165489197,
-0.0001130660020862706,
0.08519972860813141,
0.14452162384986877,
-0.10201624780893326,
-0.19559814035892487,
-0.3037537932395935,
-0.3311106562614441,
-0.1036369726061821,
-0.15824337303638458,
0.06927962601184845,
-0.24550971388816833,
-0.055901795625686646,
-0.18517820537090302,
-0.5401483774185181,
-0.016727354377508163,
0.42170268297195435,
0.23550038039684296,
0.484872430562973,
0.35655486583709717,
-0.2649945914745331,
0.2638974189758301,
0.08156862109899521,
-0.12339821457862854,
-0.1918424814939499,
0.27871453762054443,
-0.10150211304426193,
0.2279515117406845,
0.18325337767601013,
0.017423465847969055,
0.1436951756477356,
0.20806071162223816,
0.04344392195343971,
0.2050970494747162,
-0.28204482793807983,
0.2262723296880722,
0.29122257232666016,
0.4240016043186188,
0.09453783929347992,
-0.26550546288490295,
0.10446406900882721,
0.04568328335881233,
-0.8138516545295715,
0.16890345513820648,
0.3360201120376587,
0.045869600027799606,
0.160896435379982,
-0.09935765713453293,
0.12913590669631958,
-0.010949559509754181,
0.19396920502185822,
-0.08163818717002869,
0.29255780577659607,
0.04062768816947937,
0.05127301067113876,
0.14542195200920105,
-0.09675976634025574,
0.04531024023890495,
-0.08745452016592026,
0.035761479288339615,
0.3617963194847107,
-0.2636680006980896,
0.17469875514507294,
0.04791216552257538,
0.17806598544120789,
0.13792447745800018,
0.12443238496780396,
-0.2301606684923172,
-0.14308272302150726,
0.15823215246200562,
-0.24341677129268646,
0.37003225088119507,
-0.1312004178762436,
-0.400727242231369,
-0.20608839392662048,
0.2326180785894394,
0.3219103515148163,
0.23010516166687012,
-0.06361816823482513,
0.1047496497631073,
-0.2295609563589096,
0.04944990575313568,
-0.022846248000860214,
0.28195181488990784,
-0.05631207302212715,
-0.28039097785949707,
0.025094978511333466,
0.1288427859544754,
-0.14529109001159668,
0.018505088984966278,
0.18536239862442017,
-0.09285268187522888,
0.33846819400787354,
0.21600337326526642,
0.07964572310447693,
-0.20634523034095764,
-0.21399661898612976,
-0.227199524641037,
-0.13588941097259521,
-0.046290650963783264,
0.0036794431507587433,
0.3561675548553467,
-0.07296943664550781,
0.22682107985019684,
0.12110622227191925,
-0.14704562723636627,
-0.12097116559743881,
-0.09337835758924484,
-0.11293669044971466,
0.09954296052455902,
0.4110374450683594,
0.08147472888231277,
0.15208283066749573,
-0.050447236746549606,
0.14584259688854218,
-0.032392971217632294,
0.18502628803253174,
0.07762625068426132,
-0.3643757402896881,
-0.16982623934745789,
0.2770959436893463,
-0.14592251181602478,
0.02576773799955845,
0.11087282001972198,
-0.17097881436347961,
-0.2616032361984253,
0.12307314574718475,
-0.12111534923315048,
-0.14929582178592682,
-0.16370312869548798,
-0.10787604749202728,
0.45133689045906067,
0.4419046640396118,
0.0882568433880806,
-0.03239230066537857,
-0.6517634391784668,
-0.1498183012008667,
0.20000171661376953,
0.1622234284877777,
-0.2046852707862854,
0.02917708456516266,
-0.27312731742858887,
-0.12635564804077148,
0.37148454785346985,
-0.3860093951225281,
-0.5101290941238403,
-0.12777788937091827,
-0.21607929468154907,
0.0599537268280983,
-0.038483619689941406,
0.15600261092185974,
0.42113348841667175,
-0.05334126949310303,
0.33788198232650757,
0.1812024712562561,
-0.23486663401126862,
0.008521392941474915,
-0.14132314920425415,
-0.40417033433914185,
0.44959738850593567,
0.17204917967319489,
0.3796803951263428,
-0.09577739238739014,
0.014443082734942436,
0.05205095186829567,
0.4336634576320648,
0.23383212089538574,
0.1211891770362854,
-0.015320208854973316,
0.4003097414970398,
-0.06476525962352753,
-0.0482119657099247,
-0.06610175967216492,
-0.2763664722442627,
0.25427353382110596,
0.2915329933166504,
0.10316836833953857,
0.08507335186004639,
0.04363948851823807,
-0.17034514248371124,
0.047847338020801544,
-0.2892531752586365,
-0.3850303888320923,
0.11659523844718933,
-0.037858206778764725,
0.15110984444618225,
-0.06575346738100052,
-0.10380002856254578,
-0.3095017373561859,
-0.003438226878643036,
0.14934326708316803,
0.14895384013652802,
0.0438448041677475,
-0.11421184986829758,
0.012902714312076569,
0.212632954120636,
0.2532339096069336,
0.19013485312461853,
0.006144281476736069,
-0.09847218543291092,
0.18976247310638428,
0.12817595899105072,
0.30328336358070374,
-0.14390650391578674,
0.4107021987438202,
0.37855470180511475,
-0.5947980284690857,
0.09422146528959274,
0.11947578191757202,
0.15728560090065002,
-0.13131307065486908,
0.06479185074567795,
0.028962645679712296,
-0.18153975903987885,
0.0471712164580822,
0.15391767024993896,
0.2556743025779724,
0.32432880997657776,
-0.17625758051872253,
0.06807416677474976,
-0.01112145185470581,
0.32015782594680786,
0.001012967899441719,
0.25607725977897644,
0.04175519198179245,
-0.1714586317539215,
0.11697812378406525,
0.45377275347709656,
0.1449935883283615,
0.048586953431367874,
-0.13649502396583557,
-0.41772934794425964,
0.017252303659915924,
-0.17096488177776337,
0.09157201647758484,
0.6213274002075195,
0.17812103033065796,
0.08388590812683105,
0.028731243684887886,
0.22802215814590454,
-0.16103661060333252,
0.49282488226890564,
0.19856144487857819,
0.21067366003990173,
0.16732674837112427,
-0.0006827898323535919,
0.09504730999469757,
-0.13925334811210632,
0.33682429790496826,
-0.0108681321144104,
0.12647850811481476,
-0.07401365786790848,
-0.28268468379974365,
-0.3848985731601715,
0.09621943533420563,
-0.41386744379997253,
-0.5886368751525879,
-0.24780847132205963,
-0.20807000994682312,
-0.05177464336156845,
0.1690845489501953,
-0.1629844754934311,
0.09249505400657654,
-0.3313494324684143,
0.0354093462228775,
-0.07200625538825989,
0.06952768564224243,
0.04312581568956375,
0.0037755072116851807,
-0.13464048504829407,
0.06626476347446442,
0.23552942276000977,
-0.39568692445755005,
0.4484192728996277,
-0.1507643759250641,
0.051978811621665955,
-0.43171533942222595,
-0.20725281536579132,
0.21228492259979248,
0.2740793824195862,
0.30607539415359497,
0.24500878155231476,
0.14426690340042114,
0.48971378803253174,
-0.12678158283233643,
0.1766439974308014,
-0.3439158797264099,
0.04378797113895416,
-0.1002589762210846,
-0.19042833149433136,
0.042275022715330124,
-0.16191957890987396,
-0.5782846808433533,
-0.5531324148178101,
-0.30773472785949707,
-0.038355935364961624,
-0.02829645574092865,
-0.009400328621268272,
0.0894286036491394,
-0.148014634847641,
-0.05477452278137207,
0.3384121358394623,
-0.07681933045387268,
-0.36061644554138184,
-0.24838939309120178,
0.28311216831207275,
-0.2172355353832245,
-0.5080080032348633,
0.26720815896987915,
-0.08912443369626999,
0.3436751961708069,
0.13344410061836243,
-0.5720171332359314,
0.43301481008529663,
0.011155424639582634,
0.10506868362426758,
0.03589901700615883,
-0.07896053791046143,
0.33992642164230347,
-0.049576058983802795,
-0.03564808517694473,
-0.28697866201400757,
-0.21784263849258423,
-0.14639563858509064,
-0.007904430851340294,
0.49254581332206726,
-0.08607163280248642,
0.2768721282482147,
0.11648814380168915,
0.7780134081840515,
0.03807223588228226,
-0.1931980699300766,
0.1653410643339157,
-0.24980218708515167,
0.2553129196166992,
0.1219145655632019,
-0.36560913920402527,
0.16422569751739502,
0.029239267110824585,
0.1096314936876297,
0.29481279850006104,
-0.05719093978404999,
-0.08297140896320343,
-0.15030112862586975,
0.19410251080989838,
-0.3572814464569092,
-0.4683474898338318,
0.036911241710186005,
0.15571057796478271,
0.3734396994113922,
0.3533400893211365,
0.331561416387558,
0.06629091501235962,
-0.2881094217300415,
0.08159129321575165,
0.3436906039714813,
0.1712893694639206,
0.0770689994096756,
0.21058228611946106,
-0.030316421762108803,
-0.4444749057292938,
-0.04847370833158493,
-0.2085513323545456,
0.6952723860740662,
-0.06273025274276733,
-0.12352544814348221,
-0.1420067995786667,
0.005674149841070175,
0.537901759147644,
0.0867379829287529,
0.3406134247779846,
0.08308537304401398,
-0.08257171511650085,
-0.2757599651813507,
-0.2109440267086029,
-0.04342319071292877,
0.09999813139438629,
0.20812253654003143,
0.452755331993103,
-0.06034759432077408,
-0.23581549525260925,
0.47391316294670105,
0.16521205008029938,
-0.20506073534488678,
-0.020012158900499344,
-0.022933103144168854,
-0.33845970034599304,
-0.1528332531452179,
-0.0044874101877212524,
-0.1307780146598816,
0.27874764800071716,
-0.36341750621795654,
-0.03844665363430977,
0.08077071607112885,
-0.02705782651901245,
0.030399663373827934,
-0.144413024187088,
0.26408883929252625,
0.0890652984380722,
0.5655502676963806,
0.5011258125305176,
0.01182773057371378,
0.508297324180603,
0.43557918071746826,
-0.040138840675354004,
-0.23070625960826874,
0.06227971985936165,
-0.22289803624153137,
0.07919081300497055,
0.16722798347473145,
-0.03727051615715027,
0.07904645800590515,
0.3591538071632385,
-0.0577760748565197,
-0.6436673998832703,
-0.12749384343624115,
0.28138116002082825,
-0.08190998435020447,
-0.1553291380405426,
-0.1166425570845604,
0.0808902382850647,
0.0199669748544693,
0.0410199910402298,
0.3474075198173523,
-0.11876808106899261,
-0.17826226353645325,
-0.21849828958511353,
0.10563429445028305,
0.5729706287384033,
-0.026557892560958862,
0.018177561461925507,
-0.052091460675001144,
-0.31103116273880005,
0.21284133195877075,
0.1945478320121765,
0.09727941453456879,
-0.23407474160194397,
-0.1695728749036789,
-0.09488128125667572,
-0.18864880502223969,
0.025974251329898834,
0.0414356105029583,
-0.1443951576948166,
0.3288700580596924,
-0.05526939779520035,
0.5448484420776367,
0.09806280583143234,
-0.08349676430225372,
-0.14776156842708588,
-0.26685646176338196,
-0.28395140171051025,
0.13666626811027527,
-0.07351422309875488,
0.49000805616378784,
-0.266923725605011,
-0.11597450822591782,
0.10133473575115204,
-0.241456538438797,
-0.3830203115940094,
0.05076775699853897,
-0.7256552577018738,
0.07651980221271515,
-0.052903153002262115,
-0.038887158036231995,
0.09882457554340363,
0.03645174577832222,
-0.17865419387817383,
0.26721543073654175,
-0.30016040802001953,
0.27889949083328247,
-0.2279781997203827,
0.06538908183574677,
0.032425407320261,
0.3202238976955414,
0.10617600381374359,
-0.08352074772119522,
-0.1955881416797638,
-0.09261757135391235,
-0.12532487511634827,
-0.20072267949581146,
0.21147286891937256,
-0.11623896658420563,
0.31142741441726685,
0.20567254722118378,
-0.04505879804491997,
0.11859385669231415,
0.017674557864665985,
-0.294194757938385,
0.16874101758003235,
0.12739770114421844,
-0.09488394856452942,
0.3187659680843353,
0.07281996309757233,
-0.046811364591121674,
-0.06456238776445389,
0.39273884892463684,
-0.1651582568883896,
-0.036189004778862,
0.320424884557724,
0.34339088201522827,
-0.059234313666820526,
-0.3559420108795166,
0.025882430374622345,
-0.25705423951148987,
-0.09844903647899628,
0.08616027235984802,
-0.01751309260725975,
0.3950469493865967,
0.0682646781206131,
-0.136641263961792,
0.22155843675136566,
-0.38310733437538147,
-0.14845623075962067,
-0.5851325988769531,
-0.11352889239788055,
0.014731116592884064,
-0.036689531058073044,
0.03943762555718422,
-0.1223355308175087,
0.28017276525497437,
-0.031005047261714935,
-0.07552001625299454,
-0.31703001260757446,
0.2484564185142517,
-0.037944160401821136,
-0.021646149456501007,
0.3473944067955017,
-0.038095228374004364,
0.1913871020078659,
-0.12828560173511505,
0.08000761270523071,
-0.07252217829227448,
-0.30955779552459717,
-0.15939441323280334,
-0.28724026679992676,
0.14272207021713257,
-0.11383754760026932,
-0.3669804632663727,
0.18980658054351807,
-0.2682432532310486,
-0.17426136136054993,
0.13683532178401947,
0.06277816742658615,
0.0325561985373497,
-0.14726628363132477,
0.0414363257586956,
0.1274479329586029,
0.027276838198304176,
-0.2698461413383484,
0.18622362613677979,
-0.05823451280593872,
0.3914121687412262,
0.08282317221164703,
0.17690612375736237,
0.2801856994628906,
-0.18184828758239746,
-0.02527957409620285,
-0.21177387237548828,
-0.12113615870475769,
-0.01884823478758335,
0.4527779221534729,
-0.06837256252765656,
-0.006337597966194153,
0.46826857328414917,
0.13654622435569763,
0.18379011750221252,
-0.057814404368400574,
0.25063586235046387,
-0.10570621490478516,
0.2739763855934143,
-0.3630700409412384,
-0.14659619331359863,
-0.18300189077854156,
0.27004873752593994,
0.009349629282951355,
-0.05254227668046951,
0.22998085618019104,
-0.17594175040721893,
-0.17185935378074646,
0.24356907606124878,
0.41248467564582825,
-0.24650278687477112,
0.30622345209121704,
0.4636017382144928,
-0.17864735424518585,
0.17346854507923126,
-0.12051404267549515,
-0.2235334813594818,
-0.0150814950466156,
0.5325531959533691,
-0.28548258543014526,
0.30240386724472046,
0.2380632758140564,
-0.0947258248925209,
0.11155258119106293,
-0.2780929505825043,
-0.14543834328651428,
0.16129262745380402,
-0.14945101737976074,
0.2031397819519043,
0.08046239614486694,
0.29135578870773315,
-0.23676443099975586,
0.11971129477024078,
-0.09510527551174164,
0.2228306084871292,
-0.0438835546374321,
0.1192011907696724,
-0.1368272602558136,
-0.33010250329971313,
-0.17682723701000214,
0.16876119375228882,
0.10811750590801239,
-0.005369942635297775,
0.24525777995586395,
0.30208808183670044,
-0.20671223104000092,
-0.40553492307662964,
-0.3392612636089325,
0.2949604094028473,
-0.04116279259324074,
-0.31704720854759216,
-0.028049584478139877,
0.4528757631778717,
-0.05290853604674339,
0.31937742233276367,
0.4425782561302185,
0.21958811581134796,
0.1460931897163391,
-0.1434238851070404,
0.011185556650161743,
0.15677529573440552,
-0.11890611052513123,
-0.304232656955719,
0.1213318407535553,
0.0572688989341259,
-0.1279427409172058,
0.07817009091377258,
0.15360961854457855,
-0.12414270639419556,
-0.16661985218524933,
0.08166816085577011,
-0.05184332653880119,
-0.2465672492980957,
0.19029158353805542,
0.012636596336960793,
-0.07693181931972504,
-0.256583034992218,
0.2185429036617279,
0.09194208681583405,
-0.09174740314483643,
0.5764175057411194,
-0.004267897456884384,
0.25605499744415283,
-0.14251317083835602,
0.068544402718544,
0.08807793259620667,
0.35946157574653625,
0.1567237377166748,
0.002019362524151802,
-0.2514655292034149,
-0.37280961871147156,
-0.7758952975273132,
-0.09439551830291748,
0.11068403720855713,
0.2136768102645874,
0.1856192797422409,
0.08264632523059845,
0.08397354930639267,
0.12231191992759705,
0.42334872484207153,
-0.06338699162006378,
0.3240467309951782,
-0.06094535067677498,
-0.40068361163139343,
-0.2425767332315445,
0.06915760040283203,
0.07099275290966034,
0.053303658962249756,
-0.3861621022224426,
0.18144232034683228,
-0.19469872117042542,
0.053651534020900726,
-0.42677363753318787,
0.10464473068714142,
-0.11190256476402283,
0.19696661829948425,
0.3448432385921478,
0.22462688386440277,
0.28886160254478455,
-0.10796292126178741,
-0.13690753281116486,
-0.24022871255874634,
-0.07545136660337448,
-0.13072092831134796,
-0.02078089863061905,
-0.071778804063797,
0.017377108335494995,
0.06367309391498566,
-0.5198937654495239,
-0.3963315188884735,
0.0451851524412632,
-0.0016635879874229431,
0.19802206754684448,
-0.5658490061759949,
0.3297119438648224,
-0.23240765929222107,
0.07845732569694519,
0.057564347982406616,
0.14609257876873016,
-0.13916876912117004,
-0.10186471045017242,
-0.14781564474105835,
-0.26046714186668396,
0.3043631911277771,
-0.2848113477230072,
-0.06687533855438232,
-0.5626125931739807,
0.14843294024467468,
-0.19020769000053406,
0.01544412411749363,
-0.335675448179245,
0.08486308157444,
0.2441290020942688,
-0.09692934155464172,
-0.22004255652427673,
0.21125668287277222,
-0.1466057300567627,
-0.01342058926820755,
0.15410436689853668,
0.46332186460494995,
0.10206621885299683,
-0.24516652524471283,
-0.12079721689224243,
-0.19758552312850952
] |
https://github.com/huggingface/datasets/issues/6624 | Hi, this dataset has been disabled by the authors, so unfortunately it's no longer possible to download it. | How to download the laion-coco dataset | The laion coco dataset is not available now. How to download it
https://huggingface.co/datasets/laion/laion-coco | 18 | How to download the laion-coco dataset
The laion coco dataset is not available now. How to download it
https://huggingface.co/datasets/laion/laion-coco
Hi, this dataset has been disabled by the authors, so unfortunately it's no longer possible to download it. | [
-0.15687450766563416,
-0.23160290718078613,
-0.20348447561264038,
0.2225615680217743,
-0.014091560617089272,
-0.005569621920585632,
0.1532430648803711,
0.07347936183214188,
-0.3041417598724365,
0.11177970468997955,
-0.3511919379234314,
0.1720883846282959,
0.03486033156514168,
0.37087300419807434,
0.06044836714863777,
-0.1595807671546936,
-0.13234062492847443,
-0.05253537371754646,
0.14318905770778656,
-0.17197003960609436,
-0.026270393282175064,
0.25338324904441833,
-0.058486972004175186,
-0.05342555791139603,
0.18231168389320374,
-0.1428816169500351,
-0.33576905727386475,
0.02891378663480282,
-0.3386974036693573,
-0.31054407358169556,
0.5495043396949768,
0.2182805836200714,
0.32229405641555786,
-0.03667532652616501,
-0.0000932125622057356,
-0.026982568204402924,
0.31394314765930176,
-0.09625187516212463,
0.1038481742143631,
-0.22185254096984863,
-0.4870290756225586,
-0.21821656823158264,
-0.09716705977916718,
-0.16300322115421295,
-0.003260403871536255,
0.18102732300758362,
0.0538439005613327,
-0.14801561832427979,
0.33395665884017944,
0.13310323655605316,
0.38284575939178467,
0.2748640775680542,
0.17201487720012665,
-0.22167356312274933,
0.17835509777069092,
0.012524273246526718,
-0.23609769344329834,
0.13506227731704712,
0.2767125964164734,
0.013647176325321198,
0.06437777727842331,
0.17624381184577942,
0.15020586550235748,
-0.2877812087535858,
-0.12902742624282837,
-0.027867933735251427,
0.0617622546851635,
-0.4359237551689148,
0.15072041749954224,
0.5334852337837219,
0.5680654644966125,
0.20327922701835632,
-0.16639328002929688,
0.10983921587467194,
0.030090872198343277,
-0.3939836919307709,
-0.05485551431775093,
0.49280887842178345,
0.027657251805067062,
0.2033359706401825,
-0.15457278490066528,
-0.1631777286529541,
-0.20080798864364624,
0.09048429131507874,
-0.07753688097000122,
0.11750780791044235,
-0.20870088040828705,
-0.09450899064540863,
0.019739573821425438,
-0.05554508417844772,
0.15310901403427124,
0.22084572911262512,
-0.1776551902294159,
-0.04765487462282181,
-0.09828510880470276,
-0.09394078701734543,
-0.0441359207034111,
0.42182889580726624,
0.2996205687522888,
0.09979921579360962,
0.34184980392456055,
-0.11558917909860611,
-0.2664100229740143,
-0.026869554072618484,
0.14688405394554138,
0.11175146698951721,
0.16333261132240295,
-0.047029510140419006,
0.19597628712654114,
0.36639678478240967,
0.15900525450706482,
-0.1050625741481781,
-0.04760279506444931,
0.2706533968448639,
-0.3811447024345398,
-0.0208311527967453,
-0.05041810870170593,
-0.42154616117477417,
-0.33822908997535706,
-0.11242543160915375,
0.08581556379795074,
0.033439382910728455,
0.052665114402770996,
0.2720377445220947,
-0.102695032954216,
0.07731027901172638,
-0.07735377550125122,
0.13746985793113708,
0.1855856478214264,
-0.18847957253456116,
-0.30035972595214844,
0.04696236178278923,
-0.08117634057998657,
-0.046592842787504196,
0.2791740298271179,
-0.3209453821182251,
0.41417214274406433,
-0.07596952468156815,
0.12121206521987915,
0.2687426507472992,
-0.15521389245986938,
-0.027999792248010635,
-0.1346912682056427,
0.17363595962524414,
0.0006307587027549744,
-0.13038313388824463,
0.13546329736709595,
-0.11338049918413162,
-0.1310008019208908,
-0.07227777689695358,
-0.23871256411075592,
-0.1970406472682953,
-0.11818603426218033,
0.2586930990219116,
-0.26164722442626953,
-0.24542787671089172,
-0.04862331226468086,
0.23783312737941742,
-0.20519354939460754,
0.161880761384964,
-0.012451417744159698,
-0.11796589195728302,
-0.08728339523077011,
-0.22149226069450378,
0.1685953587293625,
0.1519203782081604,
-0.1654866486787796,
-0.05847717449069023,
-0.30033159255981445,
-0.16768783330917358,
0.20192168653011322,
0.10067648440599442,
-0.15839727222919464,
-0.17008161544799805,
-0.33540692925453186,
-0.06625397503376007,
0.07545598596334457,
-0.31694212555885315,
-0.4344373047351837,
-0.06534099578857422,
0.08215659856796265,
-0.1012595146894455,
0.007294096052646637,
0.09524331986904144,
-0.027224861085414886,
-0.12457671761512756,
-0.002909887582063675,
0.16868017613887787,
0.0771801546216011,
-0.26437056064605713,
-0.016614675521850586,
-0.29327312111854553,
0.4095262885093689,
0.12250398099422455,
0.04077473282814026,
0.1712186187505722,
0.12401191890239716,
0.2817156910896301,
0.40853351354599,
0.12457583099603653,
-0.013186225667595863,
0.22511550784111023,
0.33419209718704224,
0.08154977858066559,
0.0510907843708992,
0.13709837198257446,
-0.198804572224617,
0.13347488641738892,
0.19419734179973602,
0.19385138154029846,
-0.07386013865470886,
-0.23064802587032318,
-0.18678757548332214,
0.05656750500202179,
0.10246934741735458,
-0.13950088620185852,
0.3226067125797272,
-0.09245029836893082,
0.3811361789703369,
0.0828937441110611,
-0.04852103814482689,
0.4812946319580078,
-0.0755355954170227,
0.027042385190725327,
-0.2005452662706375,
0.24368645250797272,
-0.0495762899518013,
0.20453792810440063,
0.49730098247528076,
0.08329710364341736,
0.07769346237182617,
0.0007731840014457703,
0.08660620450973511,
0.10627201199531555,
-0.09203316271305084,
0.11527568101882935,
0.118752121925354,
-0.06925816833972931,
0.26847973465919495,
-0.46755069494247437,
0.03528682142496109,
0.016221582889556885,
-0.11035238206386566,
0.26780545711517334,
-0.2557731866836548,
0.2051742523908615,
-0.013685938902199268,
-0.12920643389225006,
0.24315808713436127,
0.21094341576099396,
0.34760627150535583,
-0.11730483919382095,
-0.14922720193862915,
-0.1913599967956543,
0.37951967120170593,
0.032955605536699295,
0.32334017753601074,
-0.17438097298145294,
-0.4678892493247986,
0.3608666658401489,
0.12651106715202332,
-0.13533291220664978,
-0.03173878788948059,
0.03948666527867317,
-0.16290885210037231,
0.018069609999656677,
0.3102705776691437,
0.10872717201709747,
0.01732771098613739,
0.3184717893600464,
0.18856148421764374,
-0.26252415776252747,
-0.2050977498292923,
-0.38675376772880554,
0.15637141466140747,
-0.0065836794674396515,
0.1176200807094574,
-0.20473138988018036,
0.4125067889690399,
-0.05817439779639244,
-0.660692036151886,
-0.16870996356010437,
-0.20111185312271118,
0.13063502311706543,
0.17251187562942505,
-0.16396889090538025,
-0.4131260812282562,
-0.11829802393913269,
0.28062665462493896,
-0.15652990341186523,
-0.24326682090759277,
-0.4202251732349396,
0.16668950021266937,
-0.05708573758602142,
0.2664520740509033,
-0.17494729161262512,
-0.6327065825462341,
0.3446277379989624,
-0.11445263028144836,
0.24555732309818268,
-0.33224934339523315,
-0.09942455589771271,
-0.29042285680770874,
0.3674173951148987,
-0.10424847900867462,
-0.1793196052312851,
0.2122320681810379,
-0.1342441737651825,
0.10599824786186218,
-0.14777661859989166,
-0.47224798798561096,
0.16698342561721802,
-0.1992427557706833,
0.04450278729200363,
0.07842689752578735,
0.20357993245124817,
-0.10594567656517029,
-0.08475633710622787,
0.10747427493333817,
-0.33415818214416504,
-0.22068357467651367,
-0.08381931483745575,
-0.024899665266275406,
-0.11644086241722107,
-0.3023720979690552,
-0.25689250230789185,
-0.3988383412361145,
-0.12664979696273804,
0.3955882489681244,
0.16853083670139313,
-0.07986585795879364,
0.1720578819513321,
-0.2342132329940796,
0.018316902220249176,
0.02696358412504196,
-0.08336731791496277,
-0.35628727078437805,
-0.48496213555336,
0.3665924668312073,
-0.37186872959136963,
-0.4627988040447235,
0.05524639040231705,
0.0895812064409256,
0.31556302309036255,
-0.08437713980674744,
-0.5092445015907288,
-0.00605083629488945,
-0.16782045364379883,
0.30681830644607544,
0.10823015868663788,
-0.20279589295387268,
0.12048979103565216,
0.059480637311935425,
-0.15830852091312408,
-0.21920642256736755,
0.13290739059448242,
-0.0010388046503067017,
0.10623624920845032,
0.353161484003067,
-0.18118548393249512,
0.05776483565568924,
0.3392638564109802,
0.15703298151493073,
0.07965037226676941,
-0.026759073138237,
0.4130978286266327,
-0.1214686706662178,
0.4155830144882202,
0.13634178042411804,
-0.14848867058753967,
0.16374099254608154,
-0.0701206773519516,
0.1244482696056366,
0.07054039090871811,
0.20618563890457153,
-0.29425546526908875,
-0.29688704013824463,
0.03805997967720032,
-0.15496709942817688,
-0.1378684639930725,
-0.3878674805164337,
0.6003235578536987,
0.2615259885787964,
0.1908310353755951,
-0.05371428281068802,
-0.054753996431827545,
-0.39702853560447693,
0.23123547434806824,
0.2556089162826538,
0.13550430536270142,
-0.012854712083935738,
-0.45491093397140503,
-0.17726017534732819,
-0.8023486733436584,
0.2160910964012146,
-0.13573619723320007,
0.03605491295456886,
-0.16181950271129608,
-0.007432952523231506,
-0.0969468504190445,
-0.0651036947965622,
0.4015886187553406,
-0.11845771223306656,
0.2968618869781494,
0.08548636734485626,
-0.06145349517464638,
-0.28907692432403564,
0.029335133731365204,
-0.33569827675819397,
0.03953779488801956,
0.3135862350463867,
0.4411716163158417,
-0.10331442952156067,
-0.004532720893621445,
0.062222376465797424,
0.07363580167293549,
-0.17703936994075775,
0.009894847869873047,
0.04949253797531128,
-0.28877151012420654,
-0.024466857314109802,
-0.10761827975511551,
-0.1120278462767601,
0.2908495366573334,
-0.23982754349708557,
-0.09669677913188934,
0.05825427174568176,
-0.000735938549041748,
0.08998933434486389,
0.19552768766880035,
-0.027128631249070168,
0.39240774512290955,
0.13417145609855652,
0.09284773468971252,
0.09858967363834381,
0.08915683627128601,
0.3634926974773407,
0.13337333500385284,
-0.2325505167245865,
-0.052244871854782104,
-0.10082642734050751,
0.13034850358963013,
0.18913668394088745,
-0.11983288824558258,
-0.12400969862937927,
-0.13492949306964874,
0.02369607239961624,
0.04725450277328491,
0.045849669724702835,
0.08839872479438782,
-0.19373390078544617,
-0.28889551758766174,
-0.10596586763858795,
0.2967252731323242,
0.06844553351402283,
0.07414200901985168,
0.0017079641111195087,
-0.11294624209403992,
-0.14659914374351501,
-0.053627125918865204,
0.09904923290014267,
0.7766706943511963,
-0.06686695665121078,
0.05097713693976402,
0.2302929013967514,
0.15251263976097107,
0.5579816102981567,
-0.12885326147079468,
0.21712400019168854,
0.0077590495347976685,
-0.43838778138160706,
-0.07383349537849426,
0.09852467477321625,
-0.02565247192978859,
0.03018607571721077,
-0.05882611498236656,
0.2380700409412384,
-0.05764703452587128,
0.07424985617399216,
-0.0324258878827095,
0.09915342926979065,
-0.07244497537612915,
-0.08503660559654236,
-0.21115712821483612,
0.3691771626472473,
0.14398586750030518,
0.29312533140182495,
-0.03795558959245682,
-0.11035922169685364,
-0.22234350442886353,
-0.05418713018298149,
-0.23816990852355957,
0.2839227318763733,
-0.08745826780796051,
0.24990171194076538,
-0.18558645248413086,
-0.09796259552240372,
-0.04919955134391785,
0.3401137888431549,
0.40545520186424255,
0.2386852353811264,
-0.35951393842697144,
0.2467879354953766,
-0.12016839534044266,
-0.4936966001987457,
0.0671314001083374,
0.23224148154258728,
-0.16891829669475555,
-0.26537442207336426,
-0.0949503481388092,
0.05447643995285034,
0.15915247797966003,
0.07088667899370193,
-0.13657666742801666,
-0.1471758484840393,
-0.07345905900001526,
0.053723499178886414,
0.20119109749794006,
0.221663236618042,
0.10369361937046051,
-0.15562155842781067,
0.27164655923843384,
0.20877228677272797,
0.059481095522642136,
-0.2226160764694214,
0.18116351962089539,
-0.10397904366254807,
-0.22318372130393982,
0.27438509464263916,
0.10678578168153763,
0.1514163613319397,
0.14980098605155945,
0.08537181466817856,
0.035240113735198975,
-0.264177143573761,
0.006038181483745575,
-0.15090049803256989,
-0.2150089293718338,
-0.017117859795689583,
-0.13396137952804565,
0.2159978300333023,
-0.12066733837127686,
0.4302305281162262,
0.07882826030254364,
-0.11126096546649933,
0.15460923314094543,
-0.4053763747215271,
-0.2391005903482437,
0.2700425982475281,
-0.20511111617088318,
0.10150030255317688,
-0.09515120834112167,
0.0672832578420639,
0.20334509015083313,
0.03891104459762573,
-0.47123417258262634,
-0.01694726198911667,
-0.17287681996822357,
-0.19376567006111145,
0.2992827594280243,
0.022345714271068573,
0.2877039313316345,
-0.09475082159042358,
0.26288309693336487,
0.052686069160699844,
-0.1539992392063141,
-0.3256533741950989,
-0.08072581887245178,
0.012752771377563477,
0.1733858287334442,
0.056254900991916656,
0.0035361051559448242,
-0.13174182176589966,
-0.20954112708568573,
0.11410121619701385,
-0.10149963200092316,
0.04564213752746582,
0.20708367228507996,
0.05743368715047836,
-0.05501923710107803,
0.06847625970840454,
0.028635337948799133,
0.19533903896808624,
0.33884313702583313,
0.2168169617652893,
0.16797301173210144,
0.18215787410736084,
0.09362512826919556,
-0.034654177725315094,
0.306715726852417,
-0.10441838204860687,
-0.26171571016311646,
0.06753164529800415,
0.2798410654067993,
0.06890755891799927,
0.03763963282108307,
-0.01141345128417015,
0.09636452794075012,
-0.029762856662273407,
0.12914706766605377,
0.35980215668678284,
0.08750754594802856,
0.3100531995296478,
-0.47532209753990173,
-0.23672881722450256,
0.12255635857582092,
0.15189895033836365,
-0.049161992967128754,
0.2514217793941498,
0.22029903531074524,
-0.017325110733509064,
0.16476306319236755,
-0.13505451381206512,
0.5191757082939148,
-0.027538320049643517,
0.1664898693561554,
0.2251565158367157,
-0.1361297369003296,
0.046081990003585815,
0.23502855002880096,
0.004768013022840023,
0.23717498779296875,
0.140306755900383,
0.20365101099014282,
-0.034218572080135345,
0.28725671768188477,
0.21707597374916077,
0.3708851933479309,
-0.10904471576213837,
-0.26081207394599915,
0.07392021268606186,
-0.021033570170402527,
0.23460066318511963,
-0.0018411390483379364,
0.08577077090740204,
-0.06733561307191849,
-0.05838874727487564,
-0.3515784442424774,
0.33687272667884827,
0.019778823480010033,
-0.22592398524284363,
-0.15359972417354584,
-0.2364211082458496,
-0.22967620193958282,
0.1547272503376007,
0.10229087620973587,
-0.36245647072792053,
0.2183464914560318,
0.007728248834609985,
0.009116102010011673,
-0.14434979856014252,
-0.23814764618873596,
0.48364460468292236,
0.13227300345897675,
-0.12226594984531403,
0.12679094076156616,
-0.0402698777616024,
-0.20351697504520416,
0.10351915657520294,
0.24845130741596222,
0.050059545785188675,
-0.24018633365631104,
0.20259785652160645,
0.00718998908996582,
0.0745437741279602,
-0.2592480778694153,
-0.13190309703350067,
0.22991108894348145,
0.39236244559288025,
0.04802317172288895,
0.29389914870262146,
0.29248830676078796,
-0.20978206396102905,
0.0978928804397583,
0.03028181381523609,
0.2548646032810211,
-0.1333400011062622,
-0.00914277508854866,
-0.004980900790542364,
-0.13508035242557526,
-0.08546395599842072,
-0.08916810154914856,
-0.3414038121700287,
0.21731768548488617,
-0.04645419120788574,
-0.03395267575979233,
0.09335625916719437,
-0.11549031734466553,
0.18351863324642181,
-0.14800837635993958,
0.26010215282440186,
0.4892317056655884,
-0.08944222331047058,
0.05857408791780472,
-0.6094845533370972,
-0.41800493001937866,
0.01447698101401329,
-0.1829916536808014,
-0.13300928473472595,
-0.07280509173870087,
0.07216663658618927,
0.2422393560409546,
0.28405681252479553,
0.00780988484621048,
0.08722425997257233,
0.12835639715194702,
-0.014774831011891365,
-0.25689437985420227,
0.002415392082184553,
0.24349664151668549,
0.16879603266716003,
-0.14597102999687195,
0.04134267568588257,
0.16709232330322266,
-0.11496052145957947,
0.18395984172821045,
0.046328261494636536,
-0.09194129705429077,
-0.2813456058502197,
-0.22277165949344635,
0.6259546279907227,
0.10156749188899994,
-0.012621186673641205,
-0.18413889408111572,
-0.2473951280117035,
-0.18968182802200317,
-0.3732616603374481,
0.05168456584215164,
0.23292966187000275,
0.06607568264007568,
0.04630768299102783,
-0.20332905650138855,
0.03557569161057472,
0.007576841861009598,
0.31934189796447754,
0.20627108216285706,
0.05201311036944389,
-0.1563493013381958,
0.13168326020240784,
-0.18178662657737732,
-0.18289315700531006,
0.04596850275993347,
0.2691040635108948,
-0.23441565036773682,
-0.3153870105743408,
0.07056167721748352,
-0.2960246503353119,
0.24583424627780914,
-0.6862848997116089,
-0.18998919427394867,
-0.0055399686098098755,
-0.030638106167316437,
0.37103360891342163,
-0.05261297523975372,
0.005458042025566101,
0.2557203769683838,
0.247173011302948,
-0.06171877682209015,
-0.19959470629692078,
0.0682690292596817,
-0.04233193397521973,
-0.07502470910549164,
-0.1373392939567566,
0.3212102949619293,
0.19977745413780212,
-0.41600558161735535,
0.024148546159267426,
-0.030944112688302994
] |
https://github.com/huggingface/datasets/issues/6623 | @mariosasko, @lhoestq, @albertvillanova
hey guys! can anyone help? or can you guys suggest who can help with this? | streaming datasets doesn't work properly with multi-node | ### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave. | 18 | streaming datasets doesn't work properly with multi-node
### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave.
@mariosasko, @lhoestq, @albertvillanova
hey guys! can anyone help? or can you guys suggest who can help with this? | [
-0.5885023474693298,
-0.2717367708683014,
-0.022129017859697342,
0.05329866707324982,
-0.05288459733128548,
-0.24468931555747986,
0.28833165764808655,
-0.16213496029376984,
-0.05456581711769104,
0.17409411072731018,
0.13106313347816467,
0.20888292789459229,
-0.21015878021717072,
0.1710551381111145,
-0.05287248641252518,
-0.2316754013299942,
0.07644330710172653,
0.01057659462094307,
0.04034364968538284,
-0.2694319486618042,
-0.07909917831420898,
-0.16820268332958221,
-0.22020316123962402,
-0.4776022434234619,
-0.23010557889938354,
-0.34483352303504944,
-0.1880214959383011,
0.17915897071361542,
0.04292941093444824,
-0.0007918775081634521,
-0.024187937378883362,
0.21599668264389038,
0.22667305171489716,
0.26554247736930847,
-0.00011949403415201232,
-0.17549662292003632,
0.14307358860969543,
-0.033987656235694885,
-0.2797178626060486,
-0.10833810269832611,
-0.4525478482246399,
0.12000128626823425,
-0.0856480672955513,
-0.15769720077514648,
-0.005377188324928284,
0.0469653457403183,
0.16009725630283356,
-0.5938501954078674,
0.4552592635154724,
-0.03413572907447815,
0.08512648195028305,
0.01408693939447403,
-0.2336328625679016,
0.11152130365371704,
-0.18026015162467957,
0.3543376922607422,
0.005941025912761688,
-0.023008089512586594,
0.3836512565612793,
-0.10668213665485382,
-0.2726716697216034,
0.3208426833152771,
-0.17977496981620789,
0.3480873107910156,
-0.009544376283884048,
-0.1916971206665039,
-0.13937494158744812,
-0.3502672016620636,
-0.16309091448783875,
0.19770018756389618,
0.24191229045391083,
-0.12461245805025101,
-0.39788925647735596,
-0.521531343460083,
-0.14842446148395538,
-0.3500770926475525,
-0.23801052570343018,
0.18176981806755066,
-0.2481730580329895,
-0.0703870952129364,
-0.4510071277618408,
-0.23377658426761627,
-0.039797209203243256,
0.11789821088314056,
0.15419495105743408,
0.7694438695907593,
0.16675050556659698,
0.23403680324554443,
-0.1394328773021698,
0.29044508934020996,
0.3079175055027008,
-0.2309572994709015,
0.09334338456392288,
-0.13752999901771545,
-0.4325198531150818,
0.018086589872837067,
0.05734461918473244,
0.04305759817361832,
0.16307535767555237,
0.47958433628082275,
0.30966776609420776,
0.039084240794181824,
0.2876565754413605,
0.16717436909675598,
0.39613404870033264,
-0.18216004967689514,
-0.07782210409641266,
0.13634347915649414,
0.2166709154844284,
-0.017559371888637543,
0.08888927102088928,
0.020971247926354408,
0.21538354456424713,
0.23815034329891205,
-0.24705252051353455,
0.18153789639472961,
0.21558597683906555,
0.06319627165794373,
-0.057585135102272034,
-0.33602985739707947,
-0.03557462990283966,
-0.1887940913438797,
0.13759249448776245,
0.04293625056743622,
0.03659946843981743,
0.24672368168830872,
-0.4028873145580292,
0.15768982470035553,
-0.16016718745231628,
-0.5503530502319336,
-0.21842163801193237,
-0.3020685017108917,
-0.15051349997520447,
0.36816567182540894,
0.14705823361873627,
-0.0330776646733284,
0.2690260112285614,
-0.02857164293527603,
0.10693713277578354,
0.1553390473127365,
-0.07142554968595505,
-0.27262142300605774,
0.024798860773444176,
0.23033371567726135,
0.18815961480140686,
0.09010680019855499,
0.036062948405742645,
0.08091837167739868,
-0.07104326784610748,
0.17591574788093567,
-0.01980457827448845,
-0.33053672313690186,
0.19016502797603607,
0.08777797967195511,
-0.019701950252056122,
-0.013415093533694744,
-0.5710844993591309,
0.4722989499568939,
0.330960214138031,
-0.22632598876953125,
0.00015896186232566833,
-0.056308429688215256,
-0.37576544284820557,
-0.22712896764278412,
0.32718145847320557,
0.4236840605735779,
-0.08281472325325012,
-0.11036442220211029,
-0.07954616844654083,
0.10516591370105743,
0.559253990650177,
0.4052501320838928,
-0.17483340203762054,
-0.07906554639339447,
0.020856671035289764,
0.15972900390625,
0.16132764518260956,
-0.2096678912639618,
-0.25260594487190247,
0.4820108711719513,
-0.24641740322113037,
0.2487398236989975,
0.35342103242874146,
0.1166631281375885,
0.617304801940918,
-0.17541232705116272,
-0.07058148086071014,
0.6404229402542114,
-0.4585624933242798,
0.08418096601963043,
-0.38688284158706665,
-0.005343355238437653,
-0.10611443221569061,
0.25615841150283813,
0.16894984245300293,
0.12541131675243378,
0.24003133177757263,
0.2963806092739105,
0.3235984146595001,
0.08058828860521317,
0.35313987731933594,
-0.06989148259162903,
0.2761307954788208,
-0.2106955647468567,
0.049497976899147034,
-0.11211924254894257,
-0.6091260313987732,
0.28869563341140747,
0.07801954448223114,
-0.27191469073295593,
0.0680549144744873,
-0.23662494122982025,
0.44753289222717285,
-0.15206006169319153,
-0.0822150856256485,
-0.23689866065979004,
-0.03141500800848007,
0.26023662090301514,
0.2944309711456299,
-0.10916776955127716,
-0.3123038113117218,
0.2191813886165619,
-0.42277610301971436,
-0.02126145362854004,
-0.26497286558151245,
0.5215786099433899,
0.21814259886741638,
-0.21846994757652283,
-0.0010435879230499268,
0.045710932463407516,
0.14224129915237427,
-0.15118201076984406,
0.015415862202644348,
0.33918988704681396,
0.2921460270881653,
0.18274448812007904,
-0.08908434212207794,
0.1525992751121521,
0.40113458037376404,
-0.08527597039937973,
0.06607906520366669,
0.24203136563301086,
0.003439906984567642,
-0.3257346451282501,
-0.27416977286338806,
0.18110360205173492,
-0.15961357951164246,
0.3226219117641449,
0.12815937399864197,
0.05069836974143982,
0.2503218650817871,
-0.04333620145916939,
-0.1160278394818306,
0.07843576371669769,
0.10563630610704422,
-0.3318949341773987,
0.23888325691223145,
-0.10024002194404602,
-0.5517885088920593,
0.38689136505126953,
-0.007618499919772148,
0.06681092083454132,
-0.025056421756744385,
-0.183919757604599,
-0.0696144700050354,
-0.13988539576530457,
0.47877833247184753,
0.5028660297393799,
0.47347626090049744,
0.17877982556819916,
0.3006388545036316,
-0.029582621529698372,
0.09126587957143784,
-0.3178114593029022,
-0.0831855833530426,
0.04881472885608673,
0.23611204326152802,
0.2955628037452698,
-0.11971695721149445,
-0.04904571920633316,
-0.1970173865556717,
-0.23455947637557983,
0.3719569742679596,
0.05490919202566147,
-0.1710328459739685,
0.06568951159715652,
-0.31892722845077515,
-0.4927380681037903,
-0.22923643887043,
-0.045837175101041794,
-0.05014248937368393,
-0.17293314635753632,
0.06627776473760605,
0.7270770072937012,
-0.06778944283723831,
0.28438833355903625,
0.47979599237442017,
0.4485873579978943,
-0.21059271693229675,
0.1654486060142517,
-0.14575327932834625,
-0.18223978579044342,
0.0032022353261709213,
0.0369364470243454,
0.22898724675178528,
0.09430357813835144,
0.33727672696113586,
0.28389203548431396,
-0.16278596222400665,
-0.2981051802635193,
0.10762080550193787,
-0.09899180382490158,
0.00272422656416893,
-0.0963461697101593,
-0.17546817660331726,
-0.25050976872444153,
-0.03215603902935982,
0.003959033638238907,
-0.07086239755153656,
-0.24277536571025848,
-0.02813585475087166,
-0.013979624956846237,
-0.05706073343753815,
-0.2292422503232956,
-0.10658164322376251,
-0.008825637400150299,
-0.4428950250148773,
-0.33722180128097534,
0.03422681242227554,
-0.023857880383729935,
0.21627111732959747,
-0.106937475502491,
0.09920388460159302,
-0.317745178937912,
0.13228967785835266,
-0.2115560919046402,
0.004646945744752884,
-0.2248537242412567,
0.10413463413715363,
-0.20951318740844727,
-0.3363834023475647,
-0.18087321519851685,
0.016225799918174744,
-0.032758019864559174,
0.7001858353614807,
-0.3680460453033447,
-0.022672176361083984,
0.22942234575748444,
-0.28300631046295166,
0.13002845644950867,
-0.01745235174894333,
0.1841202676296234,
-0.21101859211921692,
0.0608733668923378,
-0.09832748770713806,
0.30754420161247253,
0.09404551982879639,
0.11913974583148956,
0.3478055000305176,
0.24098807573318481,
0.2969389855861664,
0.18660897016525269,
0.9571035504341125,
0.4824317395687103,
-0.04224644973874092,
0.14983172714710236,
0.19642145931720734,
-0.056599751114845276,
0.012742290273308754,
-0.0643312931060791,
0.3703346848487854,
-0.0830574780702591,
-0.045186202973127365,
0.12593674659729004,
-0.21250998973846436,
-0.34287744760513306,
-0.2323751598596573,
0.0019959434866905212,
0.11636404693126678,
-0.08302852511405945,
0.09244918823242188,
-0.2529964745044708,
0.17085915803909302,
0.15478980541229248,
0.08479215204715729,
0.20761753618717194,
-0.03211395442485809,
-0.4283945858478546,
0.06317974627017975,
0.27598223090171814,
0.016005147248506546,
-0.16827118396759033,
0.08855253458023071,
-0.33251258730888367,
0.20825934410095215,
0.11089914292097092,
0.41010433435440063,
-0.09692040830850601,
0.0012383460998535156,
0.20487654209136963,
0.16055065393447876,
0.2482411116361618,
-0.4635753929615021,
-0.15831811726093292,
-0.19165050983428955,
-0.3073832094669342,
0.14557787775993347,
-0.06610328704118729,
-0.13106635212898254,
0.39359205961227417,
-0.03613927215337753,
0.06572027504444122,
-0.19327493011951447,
0.00100698322057724,
-0.2515191435813904,
-0.15094858407974243,
-0.19483473896980286,
0.015966925770044327,
-0.22142896056175232,
-0.05043540522456169,
-0.26836690306663513,
0.20394307374954224,
0.11528261750936508,
-0.03895575553178787,
-0.2019885629415512,
-0.12639975547790527,
-0.17505629360675812,
0.09587056189775467,
-0.061167456209659576,
0.06695056706666946,
0.04935375973582268,
0.040436554700136185,
0.21243011951446533,
0.20874544978141785,
0.3953591585159302,
0.5721637606620789,
0.3576987087726593,
-0.10423833131790161,
-0.20544858276844025,
0.21369221806526184,
-0.012208551168441772,
0.35178130865097046,
0.4592912197113037,
0.059458423405885696,
0.12396785616874695,
0.199274480342865,
0.22486010193824768,
-0.3814557194709778,
-0.3206067383289337,
-0.04009976610541344,
-0.01633504405617714,
-0.3836514949798584,
-0.6445526480674744,
0.19172415137290955,
-0.08655966073274612,
-0.09299278259277344,
0.46199873089790344,
-0.20214125514030457,
-0.18130603432655334,
0.3067103624343872,
0.11880967020988464,
0.7116556763648987,
0.2004757821559906,
-0.1280091106891632,
-0.08082973957061768,
0.14721162617206573,
0.6211409568786621,
-0.12598812580108643,
0.30969175696372986,
-0.09895922243595123,
-0.34365129470825195,
-0.09388183802366257,
0.02876719832420349,
0.218648761510849,
0.3569571375846863,
-0.09297424554824829,
0.3380039632320404,
0.2797406017780304,
0.05031014606356621,
0.024454642087221146,
0.38943755626678467,
0.2260688841342926,
-0.29189732670783997,
0.05191393569111824,
0.040939681231975555,
-0.26360800862312317,
0.1095682680606842,
-0.029113762080669403,
0.06142812594771385,
0.30432945489883423,
-0.017380662262439728,
-0.3451733887195587,
-0.001589260995388031,
-0.2504502534866333,
0.1799796223640442,
-0.2980843186378479,
-0.3518190383911133,
-0.014309242367744446,
0.22457793354988098,
-0.051153820008039474,
-0.4006478190422058,
-0.060093075037002563,
0.1267896294593811,
0.09874902665615082,
0.1411825716495514,
-0.23552784323692322,
-0.2179218977689743,
0.28058183193206787,
-0.06922587007284164,
-0.07415220141410828,
0.032699450850486755,
0.1559431254863739,
-0.4639070928096771,
-0.21319936215877533,
-0.03263254463672638,
0.19737188518047333,
0.26600706577301025,
0.28038570284843445,
0.13937042653560638,
-0.07972268015146255,
-0.2499895989894867,
-0.001124952919781208,
-0.0405939482152462,
-0.15223562717437744,
0.531467080116272,
-0.15184012055397034,
0.0904516875743866,
-0.20528092980384827,
0.3922710418701172,
0.1825878918170929,
0.1486111581325531,
-0.02756732702255249,
0.11244922876358032,
-0.1182924211025238,
-0.11030668020248413,
-0.09317553043365479,
-0.06052488088607788,
-0.11856216937303543,
0.008454520255327225,
-0.29406440258026123,
0.19962066411972046,
0.27630722522735596,
-0.016298582777380943,
0.07249584794044495,
0.3035910129547119,
-0.25033047795295715,
-0.457568883895874,
0.10085532814264297,
0.08082135021686554,
-0.07574636489152908,
-0.10017263889312744,
0.08798982203006744,
-0.11817143857479095,
0.15497618913650513,
0.6689578890800476,
-0.2593654990196228,
-0.22264665365219116,
0.009598851203918457,
0.2004629671573639,
0.08540656417608261,
0.1396985650062561,
-0.08338335156440735,
-0.07921189069747925,
-0.12510380148887634,
0.07765056192874908,
0.024542182683944702,
-0.1204695850610733,
-0.0428435355424881,
0.19635778665542603,
0.21678051352500916,
-0.09578903019428253,
-0.23582208156585693,
-0.324596643447876,
-0.3343942165374756,
-0.10725420713424683,
0.20262300968170166,
0.012907840311527252,
-0.0461440235376358,
-0.08299568295478821,
0.6750946640968323,
0.08769296854734421,
-0.3021237552165985,
0.24845552444458008,
-0.0822640061378479,
-0.050996020436286926,
-0.17750069499015808,
0.19915303587913513,
0.3842018246650696,
-0.12150600552558899,
-0.17338357865810394,
-0.23282815515995026,
0.37631648778915405,
-0.08606995642185211,
0.4022093415260315,
-0.08369158208370209,
0.15544922649860382,
-0.16203370690345764,
0.5856527090072632,
0.23155951499938965,
-0.04679866507649422,
-0.20633524656295776,
0.28424015641212463,
0.10000159591436386,
-0.20904818177223206,
-0.20226672291755676,
0.051618073135614395,
0.33272844552993774,
0.1875542551279068,
0.4447084665298462,
0.39823317527770996,
-0.12155617773532867,
-0.2642560303211212,
0.09424786269664764,
0.5052286386489868,
-0.19930879771709442,
0.20498985052108765,
0.0005274559371173382,
0.13664285838603973,
0.19577041268348694,
-0.1093682050704956,
0.22564071416854858,
0.03534727543592453,
0.304769366979599,
-0.3092609941959381,
0.7399809956550598,
0.1800457090139389,
-0.04088064283132553,
0.26147162914276123,
-0.4083422124385834,
-0.027955103665590286,
0.0511932373046875,
-0.27629613876342773,
0.21890032291412354,
-0.11413562297821045,
0.05269940197467804,
-0.2647417187690735,
-0.22853687405586243,
-0.014623750001192093,
0.2962864339351654,
-0.002693724352866411,
0.031127575784921646,
-0.5655739307403564,
-0.008411988615989685,
-0.20485199987888336,
0.0021113306283950806,
0.028320545330643654,
-0.03827006742358208,
0.5511711835861206,
0.07702211290597916,
-0.041578423231840134,
-0.21449188888072968,
-0.06528092920780182,
0.05460263416171074,
0.14385336637496948,
-0.28721684217453003,
0.2275797724723816,
0.3027360439300537,
-0.13196931779384613,
0.07006557285785675,
0.1666833758354187,
0.07416398823261261,
0.26832813024520874,
-0.053863245993852615,
0.2339264303445816,
0.3050244450569153,
-0.06516563147306442,
-0.09334377199411392,
0.40177035331726074,
0.03326905518770218,
-0.15578347444534302,
0.2595016062259674,
-0.00023682788014411926,
0.017757251858711243,
0.2346586138010025,
0.2817247807979584,
-0.06593585014343262,
0.025959346443414688,
0.459255188703537,
-0.06756645441055298,
0.14546972513198853,
0.13626807928085327,
0.005246706306934357,
-0.37799328565597534,
-0.01038924977183342,
0.350979745388031,
-0.45905059576034546,
0.05125473812222481,
-0.022730836644768715,
0.004870064556598663,
-0.1468215137720108,
0.5160329937934875,
0.16500578820705414,
0.03988877683877945,
-0.2612239420413971,
-0.29604411125183105,
-0.5132619738578796,
0.08484984189271927,
-0.4117299020290375,
-0.16564467549324036,
-0.02849666215479374,
0.43281829357147217,
0.07081688940525055,
0.19639864563941956,
-0.3687134385108948,
0.08428403735160828,
-0.1745309680700302,
0.5773721933364868,
-0.2791088819503784,
-0.08937016129493713,
-0.5378432273864746,
0.15635201334953308,
0.09824883192777634,
-0.3539040684700012,
0.45212867856025696,
0.26110634207725525,
-0.1391412615776062,
0.07427337765693665,
0.005071297287940979,
0.26286131143569946,
0.005235630087554455,
-0.3676958382129669,
0.09250601381063461,
0.33780398964881897,
0.0506775826215744,
0.09396832436323166,
-0.0835827887058258,
0.12262168526649475,
-0.4526345729827881,
0.19286896288394928,
0.09724687039852142,
0.3620455265045166,
-0.19569164514541626,
-0.15890656411647797,
-0.29978421330451965,
0.35243454575538635,
0.03415100276470184,
-0.20737066864967346,
-0.27364835143089294,
0.08183158934116364,
-0.1954088807106018,
0.2924795150756836,
0.3380967974662781,
0.14995163679122925,
-0.23145905137062073,
-0.12317950278520584,
-0.31143924593925476,
-0.1804192215204239,
0.3792820870876312,
-0.47693243622779846,
0.045383088290691376,
-0.4637560248374939,
0.23137111961841583,
0.2531643509864807,
0.1970571130514145,
-0.25030016899108887,
-0.3180619478225708,
0.22695736587047577,
-0.32072004675865173,
0.057510972023010254,
0.07607784122228622,
0.12044914066791534,
-0.2699720561504364,
-0.1574166715145111,
-0.40562427043914795,
0.032632339745759964,
-0.5015792846679688,
0.22198708355426788,
-0.30460089445114136
] |
https://github.com/huggingface/datasets/issues/6623 | Hi !
1. When the dataset is running of of examples, the last batches received by the GPU can be incomplete or empty/missing. We haven't implemented yet a way to ignore the last batch. It might require the datasets to provide the number of examples per shard though, so that we can know when to stop.
2. Samplers are not compatible with IterableDatasets in pytorch
3. if `dataset.n_shards % world_size != 0` then all the nodes will read/stream the full dataset in order (possibly reading/streaming the same data multiple times), BUT will only yield one example out of `world_size` so that each example goes to one exactly one GPU.
4. no, sharding should be down up-front and can take some time depending on the dataset size and format | streaming datasets doesn't work properly with multi-node | ### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave. | 128 | streaming datasets doesn't work properly with multi-node
### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave.
Hi !
1. When the dataset is running of of examples, the last batches received by the GPU can be incomplete or empty/missing. We haven't implemented yet a way to ignore the last batch. It might require the datasets to provide the number of examples per shard though, so that we can know when to stop.
2. Samplers are not compatible with IterableDatasets in pytorch
3. if `dataset.n_shards % world_size != 0` then all the nodes will read/stream the full dataset in order (possibly reading/streaming the same data multiple times), BUT will only yield one example out of `world_size` so that each example goes to one exactly one GPU.
4. no, sharding should be down up-front and can take some time depending on the dataset size and format | [
-0.5885023474693298,
-0.2717367708683014,
-0.022129017859697342,
0.05329866707324982,
-0.05288459733128548,
-0.24468931555747986,
0.28833165764808655,
-0.16213496029376984,
-0.05456581711769104,
0.17409411072731018,
0.13106313347816467,
0.20888292789459229,
-0.21015878021717072,
0.1710551381111145,
-0.05287248641252518,
-0.2316754013299942,
0.07644330710172653,
0.01057659462094307,
0.04034364968538284,
-0.2694319486618042,
-0.07909917831420898,
-0.16820268332958221,
-0.22020316123962402,
-0.4776022434234619,
-0.23010557889938354,
-0.34483352303504944,
-0.1880214959383011,
0.17915897071361542,
0.04292941093444824,
-0.0007918775081634521,
-0.024187937378883362,
0.21599668264389038,
0.22667305171489716,
0.26554247736930847,
-0.00011949403415201232,
-0.17549662292003632,
0.14307358860969543,
-0.033987656235694885,
-0.2797178626060486,
-0.10833810269832611,
-0.4525478482246399,
0.12000128626823425,
-0.0856480672955513,
-0.15769720077514648,
-0.005377188324928284,
0.0469653457403183,
0.16009725630283356,
-0.5938501954078674,
0.4552592635154724,
-0.03413572907447815,
0.08512648195028305,
0.01408693939447403,
-0.2336328625679016,
0.11152130365371704,
-0.18026015162467957,
0.3543376922607422,
0.005941025912761688,
-0.023008089512586594,
0.3836512565612793,
-0.10668213665485382,
-0.2726716697216034,
0.3208426833152771,
-0.17977496981620789,
0.3480873107910156,
-0.009544376283884048,
-0.1916971206665039,
-0.13937494158744812,
-0.3502672016620636,
-0.16309091448783875,
0.19770018756389618,
0.24191229045391083,
-0.12461245805025101,
-0.39788925647735596,
-0.521531343460083,
-0.14842446148395538,
-0.3500770926475525,
-0.23801052570343018,
0.18176981806755066,
-0.2481730580329895,
-0.0703870952129364,
-0.4510071277618408,
-0.23377658426761627,
-0.039797209203243256,
0.11789821088314056,
0.15419495105743408,
0.7694438695907593,
0.16675050556659698,
0.23403680324554443,
-0.1394328773021698,
0.29044508934020996,
0.3079175055027008,
-0.2309572994709015,
0.09334338456392288,
-0.13752999901771545,
-0.4325198531150818,
0.018086589872837067,
0.05734461918473244,
0.04305759817361832,
0.16307535767555237,
0.47958433628082275,
0.30966776609420776,
0.039084240794181824,
0.2876565754413605,
0.16717436909675598,
0.39613404870033264,
-0.18216004967689514,
-0.07782210409641266,
0.13634347915649414,
0.2166709154844284,
-0.017559371888637543,
0.08888927102088928,
0.020971247926354408,
0.21538354456424713,
0.23815034329891205,
-0.24705252051353455,
0.18153789639472961,
0.21558597683906555,
0.06319627165794373,
-0.057585135102272034,
-0.33602985739707947,
-0.03557462990283966,
-0.1887940913438797,
0.13759249448776245,
0.04293625056743622,
0.03659946843981743,
0.24672368168830872,
-0.4028873145580292,
0.15768982470035553,
-0.16016718745231628,
-0.5503530502319336,
-0.21842163801193237,
-0.3020685017108917,
-0.15051349997520447,
0.36816567182540894,
0.14705823361873627,
-0.0330776646733284,
0.2690260112285614,
-0.02857164293527603,
0.10693713277578354,
0.1553390473127365,
-0.07142554968595505,
-0.27262142300605774,
0.024798860773444176,
0.23033371567726135,
0.18815961480140686,
0.09010680019855499,
0.036062948405742645,
0.08091837167739868,
-0.07104326784610748,
0.17591574788093567,
-0.01980457827448845,
-0.33053672313690186,
0.19016502797603607,
0.08777797967195511,
-0.019701950252056122,
-0.013415093533694744,
-0.5710844993591309,
0.4722989499568939,
0.330960214138031,
-0.22632598876953125,
0.00015896186232566833,
-0.056308429688215256,
-0.37576544284820557,
-0.22712896764278412,
0.32718145847320557,
0.4236840605735779,
-0.08281472325325012,
-0.11036442220211029,
-0.07954616844654083,
0.10516591370105743,
0.559253990650177,
0.4052501320838928,
-0.17483340203762054,
-0.07906554639339447,
0.020856671035289764,
0.15972900390625,
0.16132764518260956,
-0.2096678912639618,
-0.25260594487190247,
0.4820108711719513,
-0.24641740322113037,
0.2487398236989975,
0.35342103242874146,
0.1166631281375885,
0.617304801940918,
-0.17541232705116272,
-0.07058148086071014,
0.6404229402542114,
-0.4585624933242798,
0.08418096601963043,
-0.38688284158706665,
-0.005343355238437653,
-0.10611443221569061,
0.25615841150283813,
0.16894984245300293,
0.12541131675243378,
0.24003133177757263,
0.2963806092739105,
0.3235984146595001,
0.08058828860521317,
0.35313987731933594,
-0.06989148259162903,
0.2761307954788208,
-0.2106955647468567,
0.049497976899147034,
-0.11211924254894257,
-0.6091260313987732,
0.28869563341140747,
0.07801954448223114,
-0.27191469073295593,
0.0680549144744873,
-0.23662494122982025,
0.44753289222717285,
-0.15206006169319153,
-0.0822150856256485,
-0.23689866065979004,
-0.03141500800848007,
0.26023662090301514,
0.2944309711456299,
-0.10916776955127716,
-0.3123038113117218,
0.2191813886165619,
-0.42277610301971436,
-0.02126145362854004,
-0.26497286558151245,
0.5215786099433899,
0.21814259886741638,
-0.21846994757652283,
-0.0010435879230499268,
0.045710932463407516,
0.14224129915237427,
-0.15118201076984406,
0.015415862202644348,
0.33918988704681396,
0.2921460270881653,
0.18274448812007904,
-0.08908434212207794,
0.1525992751121521,
0.40113458037376404,
-0.08527597039937973,
0.06607906520366669,
0.24203136563301086,
0.003439906984567642,
-0.3257346451282501,
-0.27416977286338806,
0.18110360205173492,
-0.15961357951164246,
0.3226219117641449,
0.12815937399864197,
0.05069836974143982,
0.2503218650817871,
-0.04333620145916939,
-0.1160278394818306,
0.07843576371669769,
0.10563630610704422,
-0.3318949341773987,
0.23888325691223145,
-0.10024002194404602,
-0.5517885088920593,
0.38689136505126953,
-0.007618499919772148,
0.06681092083454132,
-0.025056421756744385,
-0.183919757604599,
-0.0696144700050354,
-0.13988539576530457,
0.47877833247184753,
0.5028660297393799,
0.47347626090049744,
0.17877982556819916,
0.3006388545036316,
-0.029582621529698372,
0.09126587957143784,
-0.3178114593029022,
-0.0831855833530426,
0.04881472885608673,
0.23611204326152802,
0.2955628037452698,
-0.11971695721149445,
-0.04904571920633316,
-0.1970173865556717,
-0.23455947637557983,
0.3719569742679596,
0.05490919202566147,
-0.1710328459739685,
0.06568951159715652,
-0.31892722845077515,
-0.4927380681037903,
-0.22923643887043,
-0.045837175101041794,
-0.05014248937368393,
-0.17293314635753632,
0.06627776473760605,
0.7270770072937012,
-0.06778944283723831,
0.28438833355903625,
0.47979599237442017,
0.4485873579978943,
-0.21059271693229675,
0.1654486060142517,
-0.14575327932834625,
-0.18223978579044342,
0.0032022353261709213,
0.0369364470243454,
0.22898724675178528,
0.09430357813835144,
0.33727672696113586,
0.28389203548431396,
-0.16278596222400665,
-0.2981051802635193,
0.10762080550193787,
-0.09899180382490158,
0.00272422656416893,
-0.0963461697101593,
-0.17546817660331726,
-0.25050976872444153,
-0.03215603902935982,
0.003959033638238907,
-0.07086239755153656,
-0.24277536571025848,
-0.02813585475087166,
-0.013979624956846237,
-0.05706073343753815,
-0.2292422503232956,
-0.10658164322376251,
-0.008825637400150299,
-0.4428950250148773,
-0.33722180128097534,
0.03422681242227554,
-0.023857880383729935,
0.21627111732959747,
-0.106937475502491,
0.09920388460159302,
-0.317745178937912,
0.13228967785835266,
-0.2115560919046402,
0.004646945744752884,
-0.2248537242412567,
0.10413463413715363,
-0.20951318740844727,
-0.3363834023475647,
-0.18087321519851685,
0.016225799918174744,
-0.032758019864559174,
0.7001858353614807,
-0.3680460453033447,
-0.022672176361083984,
0.22942234575748444,
-0.28300631046295166,
0.13002845644950867,
-0.01745235174894333,
0.1841202676296234,
-0.21101859211921692,
0.0608733668923378,
-0.09832748770713806,
0.30754420161247253,
0.09404551982879639,
0.11913974583148956,
0.3478055000305176,
0.24098807573318481,
0.2969389855861664,
0.18660897016525269,
0.9571035504341125,
0.4824317395687103,
-0.04224644973874092,
0.14983172714710236,
0.19642145931720734,
-0.056599751114845276,
0.012742290273308754,
-0.0643312931060791,
0.3703346848487854,
-0.0830574780702591,
-0.045186202973127365,
0.12593674659729004,
-0.21250998973846436,
-0.34287744760513306,
-0.2323751598596573,
0.0019959434866905212,
0.11636404693126678,
-0.08302852511405945,
0.09244918823242188,
-0.2529964745044708,
0.17085915803909302,
0.15478980541229248,
0.08479215204715729,
0.20761753618717194,
-0.03211395442485809,
-0.4283945858478546,
0.06317974627017975,
0.27598223090171814,
0.016005147248506546,
-0.16827118396759033,
0.08855253458023071,
-0.33251258730888367,
0.20825934410095215,
0.11089914292097092,
0.41010433435440063,
-0.09692040830850601,
0.0012383460998535156,
0.20487654209136963,
0.16055065393447876,
0.2482411116361618,
-0.4635753929615021,
-0.15831811726093292,
-0.19165050983428955,
-0.3073832094669342,
0.14557787775993347,
-0.06610328704118729,
-0.13106635212898254,
0.39359205961227417,
-0.03613927215337753,
0.06572027504444122,
-0.19327493011951447,
0.00100698322057724,
-0.2515191435813904,
-0.15094858407974243,
-0.19483473896980286,
0.015966925770044327,
-0.22142896056175232,
-0.05043540522456169,
-0.26836690306663513,
0.20394307374954224,
0.11528261750936508,
-0.03895575553178787,
-0.2019885629415512,
-0.12639975547790527,
-0.17505629360675812,
0.09587056189775467,
-0.061167456209659576,
0.06695056706666946,
0.04935375973582268,
0.040436554700136185,
0.21243011951446533,
0.20874544978141785,
0.3953591585159302,
0.5721637606620789,
0.3576987087726593,
-0.10423833131790161,
-0.20544858276844025,
0.21369221806526184,
-0.012208551168441772,
0.35178130865097046,
0.4592912197113037,
0.059458423405885696,
0.12396785616874695,
0.199274480342865,
0.22486010193824768,
-0.3814557194709778,
-0.3206067383289337,
-0.04009976610541344,
-0.01633504405617714,
-0.3836514949798584,
-0.6445526480674744,
0.19172415137290955,
-0.08655966073274612,
-0.09299278259277344,
0.46199873089790344,
-0.20214125514030457,
-0.18130603432655334,
0.3067103624343872,
0.11880967020988464,
0.7116556763648987,
0.2004757821559906,
-0.1280091106891632,
-0.08082973957061768,
0.14721162617206573,
0.6211409568786621,
-0.12598812580108643,
0.30969175696372986,
-0.09895922243595123,
-0.34365129470825195,
-0.09388183802366257,
0.02876719832420349,
0.218648761510849,
0.3569571375846863,
-0.09297424554824829,
0.3380039632320404,
0.2797406017780304,
0.05031014606356621,
0.024454642087221146,
0.38943755626678467,
0.2260688841342926,
-0.29189732670783997,
0.05191393569111824,
0.040939681231975555,
-0.26360800862312317,
0.1095682680606842,
-0.029113762080669403,
0.06142812594771385,
0.30432945489883423,
-0.017380662262439728,
-0.3451733887195587,
-0.001589260995388031,
-0.2504502534866333,
0.1799796223640442,
-0.2980843186378479,
-0.3518190383911133,
-0.014309242367744446,
0.22457793354988098,
-0.051153820008039474,
-0.4006478190422058,
-0.060093075037002563,
0.1267896294593811,
0.09874902665615082,
0.1411825716495514,
-0.23552784323692322,
-0.2179218977689743,
0.28058183193206787,
-0.06922587007284164,
-0.07415220141410828,
0.032699450850486755,
0.1559431254863739,
-0.4639070928096771,
-0.21319936215877533,
-0.03263254463672638,
0.19737188518047333,
0.26600706577301025,
0.28038570284843445,
0.13937042653560638,
-0.07972268015146255,
-0.2499895989894867,
-0.001124952919781208,
-0.0405939482152462,
-0.15223562717437744,
0.531467080116272,
-0.15184012055397034,
0.0904516875743866,
-0.20528092980384827,
0.3922710418701172,
0.1825878918170929,
0.1486111581325531,
-0.02756732702255249,
0.11244922876358032,
-0.1182924211025238,
-0.11030668020248413,
-0.09317553043365479,
-0.06052488088607788,
-0.11856216937303543,
0.008454520255327225,
-0.29406440258026123,
0.19962066411972046,
0.27630722522735596,
-0.016298582777380943,
0.07249584794044495,
0.3035910129547119,
-0.25033047795295715,
-0.457568883895874,
0.10085532814264297,
0.08082135021686554,
-0.07574636489152908,
-0.10017263889312744,
0.08798982203006744,
-0.11817143857479095,
0.15497618913650513,
0.6689578890800476,
-0.2593654990196228,
-0.22264665365219116,
0.009598851203918457,
0.2004629671573639,
0.08540656417608261,
0.1396985650062561,
-0.08338335156440735,
-0.07921189069747925,
-0.12510380148887634,
0.07765056192874908,
0.024542182683944702,
-0.1204695850610733,
-0.0428435355424881,
0.19635778665542603,
0.21678051352500916,
-0.09578903019428253,
-0.23582208156585693,
-0.324596643447876,
-0.3343942165374756,
-0.10725420713424683,
0.20262300968170166,
0.012907840311527252,
-0.0461440235376358,
-0.08299568295478821,
0.6750946640968323,
0.08769296854734421,
-0.3021237552165985,
0.24845552444458008,
-0.0822640061378479,
-0.050996020436286926,
-0.17750069499015808,
0.19915303587913513,
0.3842018246650696,
-0.12150600552558899,
-0.17338357865810394,
-0.23282815515995026,
0.37631648778915405,
-0.08606995642185211,
0.4022093415260315,
-0.08369158208370209,
0.15544922649860382,
-0.16203370690345764,
0.5856527090072632,
0.23155951499938965,
-0.04679866507649422,
-0.20633524656295776,
0.28424015641212463,
0.10000159591436386,
-0.20904818177223206,
-0.20226672291755676,
0.051618073135614395,
0.33272844552993774,
0.1875542551279068,
0.4447084665298462,
0.39823317527770996,
-0.12155617773532867,
-0.2642560303211212,
0.09424786269664764,
0.5052286386489868,
-0.19930879771709442,
0.20498985052108765,
0.0005274559371173382,
0.13664285838603973,
0.19577041268348694,
-0.1093682050704956,
0.22564071416854858,
0.03534727543592453,
0.304769366979599,
-0.3092609941959381,
0.7399809956550598,
0.1800457090139389,
-0.04088064283132553,
0.26147162914276123,
-0.4083422124385834,
-0.027955103665590286,
0.0511932373046875,
-0.27629613876342773,
0.21890032291412354,
-0.11413562297821045,
0.05269940197467804,
-0.2647417187690735,
-0.22853687405586243,
-0.014623750001192093,
0.2962864339351654,
-0.002693724352866411,
0.031127575784921646,
-0.5655739307403564,
-0.008411988615989685,
-0.20485199987888336,
0.0021113306283950806,
0.028320545330643654,
-0.03827006742358208,
0.5511711835861206,
0.07702211290597916,
-0.041578423231840134,
-0.21449188888072968,
-0.06528092920780182,
0.05460263416171074,
0.14385336637496948,
-0.28721684217453003,
0.2275797724723816,
0.3027360439300537,
-0.13196931779384613,
0.07006557285785675,
0.1666833758354187,
0.07416398823261261,
0.26832813024520874,
-0.053863245993852615,
0.2339264303445816,
0.3050244450569153,
-0.06516563147306442,
-0.09334377199411392,
0.40177035331726074,
0.03326905518770218,
-0.15578347444534302,
0.2595016062259674,
-0.00023682788014411926,
0.017757251858711243,
0.2346586138010025,
0.2817247807979584,
-0.06593585014343262,
0.025959346443414688,
0.459255188703537,
-0.06756645441055298,
0.14546972513198853,
0.13626807928085327,
0.005246706306934357,
-0.37799328565597534,
-0.01038924977183342,
0.350979745388031,
-0.45905059576034546,
0.05125473812222481,
-0.022730836644768715,
0.004870064556598663,
-0.1468215137720108,
0.5160329937934875,
0.16500578820705414,
0.03988877683877945,
-0.2612239420413971,
-0.29604411125183105,
-0.5132619738578796,
0.08484984189271927,
-0.4117299020290375,
-0.16564467549324036,
-0.02849666215479374,
0.43281829357147217,
0.07081688940525055,
0.19639864563941956,
-0.3687134385108948,
0.08428403735160828,
-0.1745309680700302,
0.5773721933364868,
-0.2791088819503784,
-0.08937016129493713,
-0.5378432273864746,
0.15635201334953308,
0.09824883192777634,
-0.3539040684700012,
0.45212867856025696,
0.26110634207725525,
-0.1391412615776062,
0.07427337765693665,
0.005071297287940979,
0.26286131143569946,
0.005235630087554455,
-0.3676958382129669,
0.09250601381063461,
0.33780398964881897,
0.0506775826215744,
0.09396832436323166,
-0.0835827887058258,
0.12262168526649475,
-0.4526345729827881,
0.19286896288394928,
0.09724687039852142,
0.3620455265045166,
-0.19569164514541626,
-0.15890656411647797,
-0.29978421330451965,
0.35243454575538635,
0.03415100276470184,
-0.20737066864967346,
-0.27364835143089294,
0.08183158934116364,
-0.1954088807106018,
0.2924795150756836,
0.3380967974662781,
0.14995163679122925,
-0.23145905137062073,
-0.12317950278520584,
-0.31143924593925476,
-0.1804192215204239,
0.3792820870876312,
-0.47693243622779846,
0.045383088290691376,
-0.4637560248374939,
0.23137111961841583,
0.2531643509864807,
0.1970571130514145,
-0.25030016899108887,
-0.3180619478225708,
0.22695736587047577,
-0.32072004675865173,
0.057510972023010254,
0.07607784122228622,
0.12044914066791534,
-0.2699720561504364,
-0.1574166715145111,
-0.40562427043914795,
0.032632339745759964,
-0.5015792846679688,
0.22198708355426788,
-0.30460089445114136
] |
https://github.com/huggingface/datasets/issues/6623 | > if dataset.n_shards % world_size != 0 then all the nodes will read/stream the full dataset in order (possibly reading/streaming the same data multiple times), BUT will only yield one example out of world_size so that each example goes to one exactly one GPU.
considering there's just 1 shard and 2 worker nodes, do you mean each worker node will load the whole dataset but still receive half of that shard while streaming? | streaming datasets doesn't work properly with multi-node | ### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave. | 73 | streaming datasets doesn't work properly with multi-node
### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave.
> if dataset.n_shards % world_size != 0 then all the nodes will read/stream the full dataset in order (possibly reading/streaming the same data multiple times), BUT will only yield one example out of world_size so that each example goes to one exactly one GPU.
considering there's just 1 shard and 2 worker nodes, do you mean each worker node will load the whole dataset but still receive half of that shard while streaming? | [
-0.5885023474693298,
-0.2717367708683014,
-0.022129017859697342,
0.05329866707324982,
-0.05288459733128548,
-0.24468931555747986,
0.28833165764808655,
-0.16213496029376984,
-0.05456581711769104,
0.17409411072731018,
0.13106313347816467,
0.20888292789459229,
-0.21015878021717072,
0.1710551381111145,
-0.05287248641252518,
-0.2316754013299942,
0.07644330710172653,
0.01057659462094307,
0.04034364968538284,
-0.2694319486618042,
-0.07909917831420898,
-0.16820268332958221,
-0.22020316123962402,
-0.4776022434234619,
-0.23010557889938354,
-0.34483352303504944,
-0.1880214959383011,
0.17915897071361542,
0.04292941093444824,
-0.0007918775081634521,
-0.024187937378883362,
0.21599668264389038,
0.22667305171489716,
0.26554247736930847,
-0.00011949403415201232,
-0.17549662292003632,
0.14307358860969543,
-0.033987656235694885,
-0.2797178626060486,
-0.10833810269832611,
-0.4525478482246399,
0.12000128626823425,
-0.0856480672955513,
-0.15769720077514648,
-0.005377188324928284,
0.0469653457403183,
0.16009725630283356,
-0.5938501954078674,
0.4552592635154724,
-0.03413572907447815,
0.08512648195028305,
0.01408693939447403,
-0.2336328625679016,
0.11152130365371704,
-0.18026015162467957,
0.3543376922607422,
0.005941025912761688,
-0.023008089512586594,
0.3836512565612793,
-0.10668213665485382,
-0.2726716697216034,
0.3208426833152771,
-0.17977496981620789,
0.3480873107910156,
-0.009544376283884048,
-0.1916971206665039,
-0.13937494158744812,
-0.3502672016620636,
-0.16309091448783875,
0.19770018756389618,
0.24191229045391083,
-0.12461245805025101,
-0.39788925647735596,
-0.521531343460083,
-0.14842446148395538,
-0.3500770926475525,
-0.23801052570343018,
0.18176981806755066,
-0.2481730580329895,
-0.0703870952129364,
-0.4510071277618408,
-0.23377658426761627,
-0.039797209203243256,
0.11789821088314056,
0.15419495105743408,
0.7694438695907593,
0.16675050556659698,
0.23403680324554443,
-0.1394328773021698,
0.29044508934020996,
0.3079175055027008,
-0.2309572994709015,
0.09334338456392288,
-0.13752999901771545,
-0.4325198531150818,
0.018086589872837067,
0.05734461918473244,
0.04305759817361832,
0.16307535767555237,
0.47958433628082275,
0.30966776609420776,
0.039084240794181824,
0.2876565754413605,
0.16717436909675598,
0.39613404870033264,
-0.18216004967689514,
-0.07782210409641266,
0.13634347915649414,
0.2166709154844284,
-0.017559371888637543,
0.08888927102088928,
0.020971247926354408,
0.21538354456424713,
0.23815034329891205,
-0.24705252051353455,
0.18153789639472961,
0.21558597683906555,
0.06319627165794373,
-0.057585135102272034,
-0.33602985739707947,
-0.03557462990283966,
-0.1887940913438797,
0.13759249448776245,
0.04293625056743622,
0.03659946843981743,
0.24672368168830872,
-0.4028873145580292,
0.15768982470035553,
-0.16016718745231628,
-0.5503530502319336,
-0.21842163801193237,
-0.3020685017108917,
-0.15051349997520447,
0.36816567182540894,
0.14705823361873627,
-0.0330776646733284,
0.2690260112285614,
-0.02857164293527603,
0.10693713277578354,
0.1553390473127365,
-0.07142554968595505,
-0.27262142300605774,
0.024798860773444176,
0.23033371567726135,
0.18815961480140686,
0.09010680019855499,
0.036062948405742645,
0.08091837167739868,
-0.07104326784610748,
0.17591574788093567,
-0.01980457827448845,
-0.33053672313690186,
0.19016502797603607,
0.08777797967195511,
-0.019701950252056122,
-0.013415093533694744,
-0.5710844993591309,
0.4722989499568939,
0.330960214138031,
-0.22632598876953125,
0.00015896186232566833,
-0.056308429688215256,
-0.37576544284820557,
-0.22712896764278412,
0.32718145847320557,
0.4236840605735779,
-0.08281472325325012,
-0.11036442220211029,
-0.07954616844654083,
0.10516591370105743,
0.559253990650177,
0.4052501320838928,
-0.17483340203762054,
-0.07906554639339447,
0.020856671035289764,
0.15972900390625,
0.16132764518260956,
-0.2096678912639618,
-0.25260594487190247,
0.4820108711719513,
-0.24641740322113037,
0.2487398236989975,
0.35342103242874146,
0.1166631281375885,
0.617304801940918,
-0.17541232705116272,
-0.07058148086071014,
0.6404229402542114,
-0.4585624933242798,
0.08418096601963043,
-0.38688284158706665,
-0.005343355238437653,
-0.10611443221569061,
0.25615841150283813,
0.16894984245300293,
0.12541131675243378,
0.24003133177757263,
0.2963806092739105,
0.3235984146595001,
0.08058828860521317,
0.35313987731933594,
-0.06989148259162903,
0.2761307954788208,
-0.2106955647468567,
0.049497976899147034,
-0.11211924254894257,
-0.6091260313987732,
0.28869563341140747,
0.07801954448223114,
-0.27191469073295593,
0.0680549144744873,
-0.23662494122982025,
0.44753289222717285,
-0.15206006169319153,
-0.0822150856256485,
-0.23689866065979004,
-0.03141500800848007,
0.26023662090301514,
0.2944309711456299,
-0.10916776955127716,
-0.3123038113117218,
0.2191813886165619,
-0.42277610301971436,
-0.02126145362854004,
-0.26497286558151245,
0.5215786099433899,
0.21814259886741638,
-0.21846994757652283,
-0.0010435879230499268,
0.045710932463407516,
0.14224129915237427,
-0.15118201076984406,
0.015415862202644348,
0.33918988704681396,
0.2921460270881653,
0.18274448812007904,
-0.08908434212207794,
0.1525992751121521,
0.40113458037376404,
-0.08527597039937973,
0.06607906520366669,
0.24203136563301086,
0.003439906984567642,
-0.3257346451282501,
-0.27416977286338806,
0.18110360205173492,
-0.15961357951164246,
0.3226219117641449,
0.12815937399864197,
0.05069836974143982,
0.2503218650817871,
-0.04333620145916939,
-0.1160278394818306,
0.07843576371669769,
0.10563630610704422,
-0.3318949341773987,
0.23888325691223145,
-0.10024002194404602,
-0.5517885088920593,
0.38689136505126953,
-0.007618499919772148,
0.06681092083454132,
-0.025056421756744385,
-0.183919757604599,
-0.0696144700050354,
-0.13988539576530457,
0.47877833247184753,
0.5028660297393799,
0.47347626090049744,
0.17877982556819916,
0.3006388545036316,
-0.029582621529698372,
0.09126587957143784,
-0.3178114593029022,
-0.0831855833530426,
0.04881472885608673,
0.23611204326152802,
0.2955628037452698,
-0.11971695721149445,
-0.04904571920633316,
-0.1970173865556717,
-0.23455947637557983,
0.3719569742679596,
0.05490919202566147,
-0.1710328459739685,
0.06568951159715652,
-0.31892722845077515,
-0.4927380681037903,
-0.22923643887043,
-0.045837175101041794,
-0.05014248937368393,
-0.17293314635753632,
0.06627776473760605,
0.7270770072937012,
-0.06778944283723831,
0.28438833355903625,
0.47979599237442017,
0.4485873579978943,
-0.21059271693229675,
0.1654486060142517,
-0.14575327932834625,
-0.18223978579044342,
0.0032022353261709213,
0.0369364470243454,
0.22898724675178528,
0.09430357813835144,
0.33727672696113586,
0.28389203548431396,
-0.16278596222400665,
-0.2981051802635193,
0.10762080550193787,
-0.09899180382490158,
0.00272422656416893,
-0.0963461697101593,
-0.17546817660331726,
-0.25050976872444153,
-0.03215603902935982,
0.003959033638238907,
-0.07086239755153656,
-0.24277536571025848,
-0.02813585475087166,
-0.013979624956846237,
-0.05706073343753815,
-0.2292422503232956,
-0.10658164322376251,
-0.008825637400150299,
-0.4428950250148773,
-0.33722180128097534,
0.03422681242227554,
-0.023857880383729935,
0.21627111732959747,
-0.106937475502491,
0.09920388460159302,
-0.317745178937912,
0.13228967785835266,
-0.2115560919046402,
0.004646945744752884,
-0.2248537242412567,
0.10413463413715363,
-0.20951318740844727,
-0.3363834023475647,
-0.18087321519851685,
0.016225799918174744,
-0.032758019864559174,
0.7001858353614807,
-0.3680460453033447,
-0.022672176361083984,
0.22942234575748444,
-0.28300631046295166,
0.13002845644950867,
-0.01745235174894333,
0.1841202676296234,
-0.21101859211921692,
0.0608733668923378,
-0.09832748770713806,
0.30754420161247253,
0.09404551982879639,
0.11913974583148956,
0.3478055000305176,
0.24098807573318481,
0.2969389855861664,
0.18660897016525269,
0.9571035504341125,
0.4824317395687103,
-0.04224644973874092,
0.14983172714710236,
0.19642145931720734,
-0.056599751114845276,
0.012742290273308754,
-0.0643312931060791,
0.3703346848487854,
-0.0830574780702591,
-0.045186202973127365,
0.12593674659729004,
-0.21250998973846436,
-0.34287744760513306,
-0.2323751598596573,
0.0019959434866905212,
0.11636404693126678,
-0.08302852511405945,
0.09244918823242188,
-0.2529964745044708,
0.17085915803909302,
0.15478980541229248,
0.08479215204715729,
0.20761753618717194,
-0.03211395442485809,
-0.4283945858478546,
0.06317974627017975,
0.27598223090171814,
0.016005147248506546,
-0.16827118396759033,
0.08855253458023071,
-0.33251258730888367,
0.20825934410095215,
0.11089914292097092,
0.41010433435440063,
-0.09692040830850601,
0.0012383460998535156,
0.20487654209136963,
0.16055065393447876,
0.2482411116361618,
-0.4635753929615021,
-0.15831811726093292,
-0.19165050983428955,
-0.3073832094669342,
0.14557787775993347,
-0.06610328704118729,
-0.13106635212898254,
0.39359205961227417,
-0.03613927215337753,
0.06572027504444122,
-0.19327493011951447,
0.00100698322057724,
-0.2515191435813904,
-0.15094858407974243,
-0.19483473896980286,
0.015966925770044327,
-0.22142896056175232,
-0.05043540522456169,
-0.26836690306663513,
0.20394307374954224,
0.11528261750936508,
-0.03895575553178787,
-0.2019885629415512,
-0.12639975547790527,
-0.17505629360675812,
0.09587056189775467,
-0.061167456209659576,
0.06695056706666946,
0.04935375973582268,
0.040436554700136185,
0.21243011951446533,
0.20874544978141785,
0.3953591585159302,
0.5721637606620789,
0.3576987087726593,
-0.10423833131790161,
-0.20544858276844025,
0.21369221806526184,
-0.012208551168441772,
0.35178130865097046,
0.4592912197113037,
0.059458423405885696,
0.12396785616874695,
0.199274480342865,
0.22486010193824768,
-0.3814557194709778,
-0.3206067383289337,
-0.04009976610541344,
-0.01633504405617714,
-0.3836514949798584,
-0.6445526480674744,
0.19172415137290955,
-0.08655966073274612,
-0.09299278259277344,
0.46199873089790344,
-0.20214125514030457,
-0.18130603432655334,
0.3067103624343872,
0.11880967020988464,
0.7116556763648987,
0.2004757821559906,
-0.1280091106891632,
-0.08082973957061768,
0.14721162617206573,
0.6211409568786621,
-0.12598812580108643,
0.30969175696372986,
-0.09895922243595123,
-0.34365129470825195,
-0.09388183802366257,
0.02876719832420349,
0.218648761510849,
0.3569571375846863,
-0.09297424554824829,
0.3380039632320404,
0.2797406017780304,
0.05031014606356621,
0.024454642087221146,
0.38943755626678467,
0.2260688841342926,
-0.29189732670783997,
0.05191393569111824,
0.040939681231975555,
-0.26360800862312317,
0.1095682680606842,
-0.029113762080669403,
0.06142812594771385,
0.30432945489883423,
-0.017380662262439728,
-0.3451733887195587,
-0.001589260995388031,
-0.2504502534866333,
0.1799796223640442,
-0.2980843186378479,
-0.3518190383911133,
-0.014309242367744446,
0.22457793354988098,
-0.051153820008039474,
-0.4006478190422058,
-0.060093075037002563,
0.1267896294593811,
0.09874902665615082,
0.1411825716495514,
-0.23552784323692322,
-0.2179218977689743,
0.28058183193206787,
-0.06922587007284164,
-0.07415220141410828,
0.032699450850486755,
0.1559431254863739,
-0.4639070928096771,
-0.21319936215877533,
-0.03263254463672638,
0.19737188518047333,
0.26600706577301025,
0.28038570284843445,
0.13937042653560638,
-0.07972268015146255,
-0.2499895989894867,
-0.001124952919781208,
-0.0405939482152462,
-0.15223562717437744,
0.531467080116272,
-0.15184012055397034,
0.0904516875743866,
-0.20528092980384827,
0.3922710418701172,
0.1825878918170929,
0.1486111581325531,
-0.02756732702255249,
0.11244922876358032,
-0.1182924211025238,
-0.11030668020248413,
-0.09317553043365479,
-0.06052488088607788,
-0.11856216937303543,
0.008454520255327225,
-0.29406440258026123,
0.19962066411972046,
0.27630722522735596,
-0.016298582777380943,
0.07249584794044495,
0.3035910129547119,
-0.25033047795295715,
-0.457568883895874,
0.10085532814264297,
0.08082135021686554,
-0.07574636489152908,
-0.10017263889312744,
0.08798982203006744,
-0.11817143857479095,
0.15497618913650513,
0.6689578890800476,
-0.2593654990196228,
-0.22264665365219116,
0.009598851203918457,
0.2004629671573639,
0.08540656417608261,
0.1396985650062561,
-0.08338335156440735,
-0.07921189069747925,
-0.12510380148887634,
0.07765056192874908,
0.024542182683944702,
-0.1204695850610733,
-0.0428435355424881,
0.19635778665542603,
0.21678051352500916,
-0.09578903019428253,
-0.23582208156585693,
-0.324596643447876,
-0.3343942165374756,
-0.10725420713424683,
0.20262300968170166,
0.012907840311527252,
-0.0461440235376358,
-0.08299568295478821,
0.6750946640968323,
0.08769296854734421,
-0.3021237552165985,
0.24845552444458008,
-0.0822640061378479,
-0.050996020436286926,
-0.17750069499015808,
0.19915303587913513,
0.3842018246650696,
-0.12150600552558899,
-0.17338357865810394,
-0.23282815515995026,
0.37631648778915405,
-0.08606995642185211,
0.4022093415260315,
-0.08369158208370209,
0.15544922649860382,
-0.16203370690345764,
0.5856527090072632,
0.23155951499938965,
-0.04679866507649422,
-0.20633524656295776,
0.28424015641212463,
0.10000159591436386,
-0.20904818177223206,
-0.20226672291755676,
0.051618073135614395,
0.33272844552993774,
0.1875542551279068,
0.4447084665298462,
0.39823317527770996,
-0.12155617773532867,
-0.2642560303211212,
0.09424786269664764,
0.5052286386489868,
-0.19930879771709442,
0.20498985052108765,
0.0005274559371173382,
0.13664285838603973,
0.19577041268348694,
-0.1093682050704956,
0.22564071416854858,
0.03534727543592453,
0.304769366979599,
-0.3092609941959381,
0.7399809956550598,
0.1800457090139389,
-0.04088064283132553,
0.26147162914276123,
-0.4083422124385834,
-0.027955103665590286,
0.0511932373046875,
-0.27629613876342773,
0.21890032291412354,
-0.11413562297821045,
0.05269940197467804,
-0.2647417187690735,
-0.22853687405586243,
-0.014623750001192093,
0.2962864339351654,
-0.002693724352866411,
0.031127575784921646,
-0.5655739307403564,
-0.008411988615989685,
-0.20485199987888336,
0.0021113306283950806,
0.028320545330643654,
-0.03827006742358208,
0.5511711835861206,
0.07702211290597916,
-0.041578423231840134,
-0.21449188888072968,
-0.06528092920780182,
0.05460263416171074,
0.14385336637496948,
-0.28721684217453003,
0.2275797724723816,
0.3027360439300537,
-0.13196931779384613,
0.07006557285785675,
0.1666833758354187,
0.07416398823261261,
0.26832813024520874,
-0.053863245993852615,
0.2339264303445816,
0.3050244450569153,
-0.06516563147306442,
-0.09334377199411392,
0.40177035331726074,
0.03326905518770218,
-0.15578347444534302,
0.2595016062259674,
-0.00023682788014411926,
0.017757251858711243,
0.2346586138010025,
0.2817247807979584,
-0.06593585014343262,
0.025959346443414688,
0.459255188703537,
-0.06756645441055298,
0.14546972513198853,
0.13626807928085327,
0.005246706306934357,
-0.37799328565597534,
-0.01038924977183342,
0.350979745388031,
-0.45905059576034546,
0.05125473812222481,
-0.022730836644768715,
0.004870064556598663,
-0.1468215137720108,
0.5160329937934875,
0.16500578820705414,
0.03988877683877945,
-0.2612239420413971,
-0.29604411125183105,
-0.5132619738578796,
0.08484984189271927,
-0.4117299020290375,
-0.16564467549324036,
-0.02849666215479374,
0.43281829357147217,
0.07081688940525055,
0.19639864563941956,
-0.3687134385108948,
0.08428403735160828,
-0.1745309680700302,
0.5773721933364868,
-0.2791088819503784,
-0.08937016129493713,
-0.5378432273864746,
0.15635201334953308,
0.09824883192777634,
-0.3539040684700012,
0.45212867856025696,
0.26110634207725525,
-0.1391412615776062,
0.07427337765693665,
0.005071297287940979,
0.26286131143569946,
0.005235630087554455,
-0.3676958382129669,
0.09250601381063461,
0.33780398964881897,
0.0506775826215744,
0.09396832436323166,
-0.0835827887058258,
0.12262168526649475,
-0.4526345729827881,
0.19286896288394928,
0.09724687039852142,
0.3620455265045166,
-0.19569164514541626,
-0.15890656411647797,
-0.29978421330451965,
0.35243454575538635,
0.03415100276470184,
-0.20737066864967346,
-0.27364835143089294,
0.08183158934116364,
-0.1954088807106018,
0.2924795150756836,
0.3380967974662781,
0.14995163679122925,
-0.23145905137062073,
-0.12317950278520584,
-0.31143924593925476,
-0.1804192215204239,
0.3792820870876312,
-0.47693243622779846,
0.045383088290691376,
-0.4637560248374939,
0.23137111961841583,
0.2531643509864807,
0.1970571130514145,
-0.25030016899108887,
-0.3180619478225708,
0.22695736587047577,
-0.32072004675865173,
0.057510972023010254,
0.07607784122228622,
0.12044914066791534,
-0.2699720561504364,
-0.1574166715145111,
-0.40562427043914795,
0.032632339745759964,
-0.5015792846679688,
0.22198708355426788,
-0.30460089445114136
] |
https://github.com/huggingface/datasets/issues/6623 | Yes both nodes will stream from the 1 shard, but each node will skip half of the examples. This way in total each example is seen once and exactly once during you distributed training.
Though it terms of I/O, the dataset is effectively read/streamed twice. | streaming datasets doesn't work properly with multi-node | ### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave. | 45 | streaming datasets doesn't work properly with multi-node
### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave.
Yes both nodes will stream from the 1 shard, but each node will skip half of the examples. This way in total each example is seen once and exactly once during you distributed training.
Though it terms of I/O, the dataset is effectively read/streamed twice. | [
-0.5885023474693298,
-0.2717367708683014,
-0.022129017859697342,
0.05329866707324982,
-0.05288459733128548,
-0.24468931555747986,
0.28833165764808655,
-0.16213496029376984,
-0.05456581711769104,
0.17409411072731018,
0.13106313347816467,
0.20888292789459229,
-0.21015878021717072,
0.1710551381111145,
-0.05287248641252518,
-0.2316754013299942,
0.07644330710172653,
0.01057659462094307,
0.04034364968538284,
-0.2694319486618042,
-0.07909917831420898,
-0.16820268332958221,
-0.22020316123962402,
-0.4776022434234619,
-0.23010557889938354,
-0.34483352303504944,
-0.1880214959383011,
0.17915897071361542,
0.04292941093444824,
-0.0007918775081634521,
-0.024187937378883362,
0.21599668264389038,
0.22667305171489716,
0.26554247736930847,
-0.00011949403415201232,
-0.17549662292003632,
0.14307358860969543,
-0.033987656235694885,
-0.2797178626060486,
-0.10833810269832611,
-0.4525478482246399,
0.12000128626823425,
-0.0856480672955513,
-0.15769720077514648,
-0.005377188324928284,
0.0469653457403183,
0.16009725630283356,
-0.5938501954078674,
0.4552592635154724,
-0.03413572907447815,
0.08512648195028305,
0.01408693939447403,
-0.2336328625679016,
0.11152130365371704,
-0.18026015162467957,
0.3543376922607422,
0.005941025912761688,
-0.023008089512586594,
0.3836512565612793,
-0.10668213665485382,
-0.2726716697216034,
0.3208426833152771,
-0.17977496981620789,
0.3480873107910156,
-0.009544376283884048,
-0.1916971206665039,
-0.13937494158744812,
-0.3502672016620636,
-0.16309091448783875,
0.19770018756389618,
0.24191229045391083,
-0.12461245805025101,
-0.39788925647735596,
-0.521531343460083,
-0.14842446148395538,
-0.3500770926475525,
-0.23801052570343018,
0.18176981806755066,
-0.2481730580329895,
-0.0703870952129364,
-0.4510071277618408,
-0.23377658426761627,
-0.039797209203243256,
0.11789821088314056,
0.15419495105743408,
0.7694438695907593,
0.16675050556659698,
0.23403680324554443,
-0.1394328773021698,
0.29044508934020996,
0.3079175055027008,
-0.2309572994709015,
0.09334338456392288,
-0.13752999901771545,
-0.4325198531150818,
0.018086589872837067,
0.05734461918473244,
0.04305759817361832,
0.16307535767555237,
0.47958433628082275,
0.30966776609420776,
0.039084240794181824,
0.2876565754413605,
0.16717436909675598,
0.39613404870033264,
-0.18216004967689514,
-0.07782210409641266,
0.13634347915649414,
0.2166709154844284,
-0.017559371888637543,
0.08888927102088928,
0.020971247926354408,
0.21538354456424713,
0.23815034329891205,
-0.24705252051353455,
0.18153789639472961,
0.21558597683906555,
0.06319627165794373,
-0.057585135102272034,
-0.33602985739707947,
-0.03557462990283966,
-0.1887940913438797,
0.13759249448776245,
0.04293625056743622,
0.03659946843981743,
0.24672368168830872,
-0.4028873145580292,
0.15768982470035553,
-0.16016718745231628,
-0.5503530502319336,
-0.21842163801193237,
-0.3020685017108917,
-0.15051349997520447,
0.36816567182540894,
0.14705823361873627,
-0.0330776646733284,
0.2690260112285614,
-0.02857164293527603,
0.10693713277578354,
0.1553390473127365,
-0.07142554968595505,
-0.27262142300605774,
0.024798860773444176,
0.23033371567726135,
0.18815961480140686,
0.09010680019855499,
0.036062948405742645,
0.08091837167739868,
-0.07104326784610748,
0.17591574788093567,
-0.01980457827448845,
-0.33053672313690186,
0.19016502797603607,
0.08777797967195511,
-0.019701950252056122,
-0.013415093533694744,
-0.5710844993591309,
0.4722989499568939,
0.330960214138031,
-0.22632598876953125,
0.00015896186232566833,
-0.056308429688215256,
-0.37576544284820557,
-0.22712896764278412,
0.32718145847320557,
0.4236840605735779,
-0.08281472325325012,
-0.11036442220211029,
-0.07954616844654083,
0.10516591370105743,
0.559253990650177,
0.4052501320838928,
-0.17483340203762054,
-0.07906554639339447,
0.020856671035289764,
0.15972900390625,
0.16132764518260956,
-0.2096678912639618,
-0.25260594487190247,
0.4820108711719513,
-0.24641740322113037,
0.2487398236989975,
0.35342103242874146,
0.1166631281375885,
0.617304801940918,
-0.17541232705116272,
-0.07058148086071014,
0.6404229402542114,
-0.4585624933242798,
0.08418096601963043,
-0.38688284158706665,
-0.005343355238437653,
-0.10611443221569061,
0.25615841150283813,
0.16894984245300293,
0.12541131675243378,
0.24003133177757263,
0.2963806092739105,
0.3235984146595001,
0.08058828860521317,
0.35313987731933594,
-0.06989148259162903,
0.2761307954788208,
-0.2106955647468567,
0.049497976899147034,
-0.11211924254894257,
-0.6091260313987732,
0.28869563341140747,
0.07801954448223114,
-0.27191469073295593,
0.0680549144744873,
-0.23662494122982025,
0.44753289222717285,
-0.15206006169319153,
-0.0822150856256485,
-0.23689866065979004,
-0.03141500800848007,
0.26023662090301514,
0.2944309711456299,
-0.10916776955127716,
-0.3123038113117218,
0.2191813886165619,
-0.42277610301971436,
-0.02126145362854004,
-0.26497286558151245,
0.5215786099433899,
0.21814259886741638,
-0.21846994757652283,
-0.0010435879230499268,
0.045710932463407516,
0.14224129915237427,
-0.15118201076984406,
0.015415862202644348,
0.33918988704681396,
0.2921460270881653,
0.18274448812007904,
-0.08908434212207794,
0.1525992751121521,
0.40113458037376404,
-0.08527597039937973,
0.06607906520366669,
0.24203136563301086,
0.003439906984567642,
-0.3257346451282501,
-0.27416977286338806,
0.18110360205173492,
-0.15961357951164246,
0.3226219117641449,
0.12815937399864197,
0.05069836974143982,
0.2503218650817871,
-0.04333620145916939,
-0.1160278394818306,
0.07843576371669769,
0.10563630610704422,
-0.3318949341773987,
0.23888325691223145,
-0.10024002194404602,
-0.5517885088920593,
0.38689136505126953,
-0.007618499919772148,
0.06681092083454132,
-0.025056421756744385,
-0.183919757604599,
-0.0696144700050354,
-0.13988539576530457,
0.47877833247184753,
0.5028660297393799,
0.47347626090049744,
0.17877982556819916,
0.3006388545036316,
-0.029582621529698372,
0.09126587957143784,
-0.3178114593029022,
-0.0831855833530426,
0.04881472885608673,
0.23611204326152802,
0.2955628037452698,
-0.11971695721149445,
-0.04904571920633316,
-0.1970173865556717,
-0.23455947637557983,
0.3719569742679596,
0.05490919202566147,
-0.1710328459739685,
0.06568951159715652,
-0.31892722845077515,
-0.4927380681037903,
-0.22923643887043,
-0.045837175101041794,
-0.05014248937368393,
-0.17293314635753632,
0.06627776473760605,
0.7270770072937012,
-0.06778944283723831,
0.28438833355903625,
0.47979599237442017,
0.4485873579978943,
-0.21059271693229675,
0.1654486060142517,
-0.14575327932834625,
-0.18223978579044342,
0.0032022353261709213,
0.0369364470243454,
0.22898724675178528,
0.09430357813835144,
0.33727672696113586,
0.28389203548431396,
-0.16278596222400665,
-0.2981051802635193,
0.10762080550193787,
-0.09899180382490158,
0.00272422656416893,
-0.0963461697101593,
-0.17546817660331726,
-0.25050976872444153,
-0.03215603902935982,
0.003959033638238907,
-0.07086239755153656,
-0.24277536571025848,
-0.02813585475087166,
-0.013979624956846237,
-0.05706073343753815,
-0.2292422503232956,
-0.10658164322376251,
-0.008825637400150299,
-0.4428950250148773,
-0.33722180128097534,
0.03422681242227554,
-0.023857880383729935,
0.21627111732959747,
-0.106937475502491,
0.09920388460159302,
-0.317745178937912,
0.13228967785835266,
-0.2115560919046402,
0.004646945744752884,
-0.2248537242412567,
0.10413463413715363,
-0.20951318740844727,
-0.3363834023475647,
-0.18087321519851685,
0.016225799918174744,
-0.032758019864559174,
0.7001858353614807,
-0.3680460453033447,
-0.022672176361083984,
0.22942234575748444,
-0.28300631046295166,
0.13002845644950867,
-0.01745235174894333,
0.1841202676296234,
-0.21101859211921692,
0.0608733668923378,
-0.09832748770713806,
0.30754420161247253,
0.09404551982879639,
0.11913974583148956,
0.3478055000305176,
0.24098807573318481,
0.2969389855861664,
0.18660897016525269,
0.9571035504341125,
0.4824317395687103,
-0.04224644973874092,
0.14983172714710236,
0.19642145931720734,
-0.056599751114845276,
0.012742290273308754,
-0.0643312931060791,
0.3703346848487854,
-0.0830574780702591,
-0.045186202973127365,
0.12593674659729004,
-0.21250998973846436,
-0.34287744760513306,
-0.2323751598596573,
0.0019959434866905212,
0.11636404693126678,
-0.08302852511405945,
0.09244918823242188,
-0.2529964745044708,
0.17085915803909302,
0.15478980541229248,
0.08479215204715729,
0.20761753618717194,
-0.03211395442485809,
-0.4283945858478546,
0.06317974627017975,
0.27598223090171814,
0.016005147248506546,
-0.16827118396759033,
0.08855253458023071,
-0.33251258730888367,
0.20825934410095215,
0.11089914292097092,
0.41010433435440063,
-0.09692040830850601,
0.0012383460998535156,
0.20487654209136963,
0.16055065393447876,
0.2482411116361618,
-0.4635753929615021,
-0.15831811726093292,
-0.19165050983428955,
-0.3073832094669342,
0.14557787775993347,
-0.06610328704118729,
-0.13106635212898254,
0.39359205961227417,
-0.03613927215337753,
0.06572027504444122,
-0.19327493011951447,
0.00100698322057724,
-0.2515191435813904,
-0.15094858407974243,
-0.19483473896980286,
0.015966925770044327,
-0.22142896056175232,
-0.05043540522456169,
-0.26836690306663513,
0.20394307374954224,
0.11528261750936508,
-0.03895575553178787,
-0.2019885629415512,
-0.12639975547790527,
-0.17505629360675812,
0.09587056189775467,
-0.061167456209659576,
0.06695056706666946,
0.04935375973582268,
0.040436554700136185,
0.21243011951446533,
0.20874544978141785,
0.3953591585159302,
0.5721637606620789,
0.3576987087726593,
-0.10423833131790161,
-0.20544858276844025,
0.21369221806526184,
-0.012208551168441772,
0.35178130865097046,
0.4592912197113037,
0.059458423405885696,
0.12396785616874695,
0.199274480342865,
0.22486010193824768,
-0.3814557194709778,
-0.3206067383289337,
-0.04009976610541344,
-0.01633504405617714,
-0.3836514949798584,
-0.6445526480674744,
0.19172415137290955,
-0.08655966073274612,
-0.09299278259277344,
0.46199873089790344,
-0.20214125514030457,
-0.18130603432655334,
0.3067103624343872,
0.11880967020988464,
0.7116556763648987,
0.2004757821559906,
-0.1280091106891632,
-0.08082973957061768,
0.14721162617206573,
0.6211409568786621,
-0.12598812580108643,
0.30969175696372986,
-0.09895922243595123,
-0.34365129470825195,
-0.09388183802366257,
0.02876719832420349,
0.218648761510849,
0.3569571375846863,
-0.09297424554824829,
0.3380039632320404,
0.2797406017780304,
0.05031014606356621,
0.024454642087221146,
0.38943755626678467,
0.2260688841342926,
-0.29189732670783997,
0.05191393569111824,
0.040939681231975555,
-0.26360800862312317,
0.1095682680606842,
-0.029113762080669403,
0.06142812594771385,
0.30432945489883423,
-0.017380662262439728,
-0.3451733887195587,
-0.001589260995388031,
-0.2504502534866333,
0.1799796223640442,
-0.2980843186378479,
-0.3518190383911133,
-0.014309242367744446,
0.22457793354988098,
-0.051153820008039474,
-0.4006478190422058,
-0.060093075037002563,
0.1267896294593811,
0.09874902665615082,
0.1411825716495514,
-0.23552784323692322,
-0.2179218977689743,
0.28058183193206787,
-0.06922587007284164,
-0.07415220141410828,
0.032699450850486755,
0.1559431254863739,
-0.4639070928096771,
-0.21319936215877533,
-0.03263254463672638,
0.19737188518047333,
0.26600706577301025,
0.28038570284843445,
0.13937042653560638,
-0.07972268015146255,
-0.2499895989894867,
-0.001124952919781208,
-0.0405939482152462,
-0.15223562717437744,
0.531467080116272,
-0.15184012055397034,
0.0904516875743866,
-0.20528092980384827,
0.3922710418701172,
0.1825878918170929,
0.1486111581325531,
-0.02756732702255249,
0.11244922876358032,
-0.1182924211025238,
-0.11030668020248413,
-0.09317553043365479,
-0.06052488088607788,
-0.11856216937303543,
0.008454520255327225,
-0.29406440258026123,
0.19962066411972046,
0.27630722522735596,
-0.016298582777380943,
0.07249584794044495,
0.3035910129547119,
-0.25033047795295715,
-0.457568883895874,
0.10085532814264297,
0.08082135021686554,
-0.07574636489152908,
-0.10017263889312744,
0.08798982203006744,
-0.11817143857479095,
0.15497618913650513,
0.6689578890800476,
-0.2593654990196228,
-0.22264665365219116,
0.009598851203918457,
0.2004629671573639,
0.08540656417608261,
0.1396985650062561,
-0.08338335156440735,
-0.07921189069747925,
-0.12510380148887634,
0.07765056192874908,
0.024542182683944702,
-0.1204695850610733,
-0.0428435355424881,
0.19635778665542603,
0.21678051352500916,
-0.09578903019428253,
-0.23582208156585693,
-0.324596643447876,
-0.3343942165374756,
-0.10725420713424683,
0.20262300968170166,
0.012907840311527252,
-0.0461440235376358,
-0.08299568295478821,
0.6750946640968323,
0.08769296854734421,
-0.3021237552165985,
0.24845552444458008,
-0.0822640061378479,
-0.050996020436286926,
-0.17750069499015808,
0.19915303587913513,
0.3842018246650696,
-0.12150600552558899,
-0.17338357865810394,
-0.23282815515995026,
0.37631648778915405,
-0.08606995642185211,
0.4022093415260315,
-0.08369158208370209,
0.15544922649860382,
-0.16203370690345764,
0.5856527090072632,
0.23155951499938965,
-0.04679866507649422,
-0.20633524656295776,
0.28424015641212463,
0.10000159591436386,
-0.20904818177223206,
-0.20226672291755676,
0.051618073135614395,
0.33272844552993774,
0.1875542551279068,
0.4447084665298462,
0.39823317527770996,
-0.12155617773532867,
-0.2642560303211212,
0.09424786269664764,
0.5052286386489868,
-0.19930879771709442,
0.20498985052108765,
0.0005274559371173382,
0.13664285838603973,
0.19577041268348694,
-0.1093682050704956,
0.22564071416854858,
0.03534727543592453,
0.304769366979599,
-0.3092609941959381,
0.7399809956550598,
0.1800457090139389,
-0.04088064283132553,
0.26147162914276123,
-0.4083422124385834,
-0.027955103665590286,
0.0511932373046875,
-0.27629613876342773,
0.21890032291412354,
-0.11413562297821045,
0.05269940197467804,
-0.2647417187690735,
-0.22853687405586243,
-0.014623750001192093,
0.2962864339351654,
-0.002693724352866411,
0.031127575784921646,
-0.5655739307403564,
-0.008411988615989685,
-0.20485199987888336,
0.0021113306283950806,
0.028320545330643654,
-0.03827006742358208,
0.5511711835861206,
0.07702211290597916,
-0.041578423231840134,
-0.21449188888072968,
-0.06528092920780182,
0.05460263416171074,
0.14385336637496948,
-0.28721684217453003,
0.2275797724723816,
0.3027360439300537,
-0.13196931779384613,
0.07006557285785675,
0.1666833758354187,
0.07416398823261261,
0.26832813024520874,
-0.053863245993852615,
0.2339264303445816,
0.3050244450569153,
-0.06516563147306442,
-0.09334377199411392,
0.40177035331726074,
0.03326905518770218,
-0.15578347444534302,
0.2595016062259674,
-0.00023682788014411926,
0.017757251858711243,
0.2346586138010025,
0.2817247807979584,
-0.06593585014343262,
0.025959346443414688,
0.459255188703537,
-0.06756645441055298,
0.14546972513198853,
0.13626807928085327,
0.005246706306934357,
-0.37799328565597534,
-0.01038924977183342,
0.350979745388031,
-0.45905059576034546,
0.05125473812222481,
-0.022730836644768715,
0.004870064556598663,
-0.1468215137720108,
0.5160329937934875,
0.16500578820705414,
0.03988877683877945,
-0.2612239420413971,
-0.29604411125183105,
-0.5132619738578796,
0.08484984189271927,
-0.4117299020290375,
-0.16564467549324036,
-0.02849666215479374,
0.43281829357147217,
0.07081688940525055,
0.19639864563941956,
-0.3687134385108948,
0.08428403735160828,
-0.1745309680700302,
0.5773721933364868,
-0.2791088819503784,
-0.08937016129493713,
-0.5378432273864746,
0.15635201334953308,
0.09824883192777634,
-0.3539040684700012,
0.45212867856025696,
0.26110634207725525,
-0.1391412615776062,
0.07427337765693665,
0.005071297287940979,
0.26286131143569946,
0.005235630087554455,
-0.3676958382129669,
0.09250601381063461,
0.33780398964881897,
0.0506775826215744,
0.09396832436323166,
-0.0835827887058258,
0.12262168526649475,
-0.4526345729827881,
0.19286896288394928,
0.09724687039852142,
0.3620455265045166,
-0.19569164514541626,
-0.15890656411647797,
-0.29978421330451965,
0.35243454575538635,
0.03415100276470184,
-0.20737066864967346,
-0.27364835143089294,
0.08183158934116364,
-0.1954088807106018,
0.2924795150756836,
0.3380967974662781,
0.14995163679122925,
-0.23145905137062073,
-0.12317950278520584,
-0.31143924593925476,
-0.1804192215204239,
0.3792820870876312,
-0.47693243622779846,
0.045383088290691376,
-0.4637560248374939,
0.23137111961841583,
0.2531643509864807,
0.1970571130514145,
-0.25030016899108887,
-0.3180619478225708,
0.22695736587047577,
-0.32072004675865173,
0.057510972023010254,
0.07607784122228622,
0.12044914066791534,
-0.2699720561504364,
-0.1574166715145111,
-0.40562427043914795,
0.032632339745759964,
-0.5015792846679688,
0.22198708355426788,
-0.30460089445114136
] |
https://github.com/huggingface/datasets/issues/6623 | what if the number of samples in that shard % num_nodes != 0? it will break/get stuck? or is the data repeated in that case for gradient sync? | streaming datasets doesn't work properly with multi-node | ### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave. | 28 | streaming datasets doesn't work properly with multi-node
### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave.
what if the number of samples in that shard % num_nodes != 0? it will break/get stuck? or is the data repeated in that case for gradient sync? | [
-0.5885023474693298,
-0.2717367708683014,
-0.022129017859697342,
0.05329866707324982,
-0.05288459733128548,
-0.24468931555747986,
0.28833165764808655,
-0.16213496029376984,
-0.05456581711769104,
0.17409411072731018,
0.13106313347816467,
0.20888292789459229,
-0.21015878021717072,
0.1710551381111145,
-0.05287248641252518,
-0.2316754013299942,
0.07644330710172653,
0.01057659462094307,
0.04034364968538284,
-0.2694319486618042,
-0.07909917831420898,
-0.16820268332958221,
-0.22020316123962402,
-0.4776022434234619,
-0.23010557889938354,
-0.34483352303504944,
-0.1880214959383011,
0.17915897071361542,
0.04292941093444824,
-0.0007918775081634521,
-0.024187937378883362,
0.21599668264389038,
0.22667305171489716,
0.26554247736930847,
-0.00011949403415201232,
-0.17549662292003632,
0.14307358860969543,
-0.033987656235694885,
-0.2797178626060486,
-0.10833810269832611,
-0.4525478482246399,
0.12000128626823425,
-0.0856480672955513,
-0.15769720077514648,
-0.005377188324928284,
0.0469653457403183,
0.16009725630283356,
-0.5938501954078674,
0.4552592635154724,
-0.03413572907447815,
0.08512648195028305,
0.01408693939447403,
-0.2336328625679016,
0.11152130365371704,
-0.18026015162467957,
0.3543376922607422,
0.005941025912761688,
-0.023008089512586594,
0.3836512565612793,
-0.10668213665485382,
-0.2726716697216034,
0.3208426833152771,
-0.17977496981620789,
0.3480873107910156,
-0.009544376283884048,
-0.1916971206665039,
-0.13937494158744812,
-0.3502672016620636,
-0.16309091448783875,
0.19770018756389618,
0.24191229045391083,
-0.12461245805025101,
-0.39788925647735596,
-0.521531343460083,
-0.14842446148395538,
-0.3500770926475525,
-0.23801052570343018,
0.18176981806755066,
-0.2481730580329895,
-0.0703870952129364,
-0.4510071277618408,
-0.23377658426761627,
-0.039797209203243256,
0.11789821088314056,
0.15419495105743408,
0.7694438695907593,
0.16675050556659698,
0.23403680324554443,
-0.1394328773021698,
0.29044508934020996,
0.3079175055027008,
-0.2309572994709015,
0.09334338456392288,
-0.13752999901771545,
-0.4325198531150818,
0.018086589872837067,
0.05734461918473244,
0.04305759817361832,
0.16307535767555237,
0.47958433628082275,
0.30966776609420776,
0.039084240794181824,
0.2876565754413605,
0.16717436909675598,
0.39613404870033264,
-0.18216004967689514,
-0.07782210409641266,
0.13634347915649414,
0.2166709154844284,
-0.017559371888637543,
0.08888927102088928,
0.020971247926354408,
0.21538354456424713,
0.23815034329891205,
-0.24705252051353455,
0.18153789639472961,
0.21558597683906555,
0.06319627165794373,
-0.057585135102272034,
-0.33602985739707947,
-0.03557462990283966,
-0.1887940913438797,
0.13759249448776245,
0.04293625056743622,
0.03659946843981743,
0.24672368168830872,
-0.4028873145580292,
0.15768982470035553,
-0.16016718745231628,
-0.5503530502319336,
-0.21842163801193237,
-0.3020685017108917,
-0.15051349997520447,
0.36816567182540894,
0.14705823361873627,
-0.0330776646733284,
0.2690260112285614,
-0.02857164293527603,
0.10693713277578354,
0.1553390473127365,
-0.07142554968595505,
-0.27262142300605774,
0.024798860773444176,
0.23033371567726135,
0.18815961480140686,
0.09010680019855499,
0.036062948405742645,
0.08091837167739868,
-0.07104326784610748,
0.17591574788093567,
-0.01980457827448845,
-0.33053672313690186,
0.19016502797603607,
0.08777797967195511,
-0.019701950252056122,
-0.013415093533694744,
-0.5710844993591309,
0.4722989499568939,
0.330960214138031,
-0.22632598876953125,
0.00015896186232566833,
-0.056308429688215256,
-0.37576544284820557,
-0.22712896764278412,
0.32718145847320557,
0.4236840605735779,
-0.08281472325325012,
-0.11036442220211029,
-0.07954616844654083,
0.10516591370105743,
0.559253990650177,
0.4052501320838928,
-0.17483340203762054,
-0.07906554639339447,
0.020856671035289764,
0.15972900390625,
0.16132764518260956,
-0.2096678912639618,
-0.25260594487190247,
0.4820108711719513,
-0.24641740322113037,
0.2487398236989975,
0.35342103242874146,
0.1166631281375885,
0.617304801940918,
-0.17541232705116272,
-0.07058148086071014,
0.6404229402542114,
-0.4585624933242798,
0.08418096601963043,
-0.38688284158706665,
-0.005343355238437653,
-0.10611443221569061,
0.25615841150283813,
0.16894984245300293,
0.12541131675243378,
0.24003133177757263,
0.2963806092739105,
0.3235984146595001,
0.08058828860521317,
0.35313987731933594,
-0.06989148259162903,
0.2761307954788208,
-0.2106955647468567,
0.049497976899147034,
-0.11211924254894257,
-0.6091260313987732,
0.28869563341140747,
0.07801954448223114,
-0.27191469073295593,
0.0680549144744873,
-0.23662494122982025,
0.44753289222717285,
-0.15206006169319153,
-0.0822150856256485,
-0.23689866065979004,
-0.03141500800848007,
0.26023662090301514,
0.2944309711456299,
-0.10916776955127716,
-0.3123038113117218,
0.2191813886165619,
-0.42277610301971436,
-0.02126145362854004,
-0.26497286558151245,
0.5215786099433899,
0.21814259886741638,
-0.21846994757652283,
-0.0010435879230499268,
0.045710932463407516,
0.14224129915237427,
-0.15118201076984406,
0.015415862202644348,
0.33918988704681396,
0.2921460270881653,
0.18274448812007904,
-0.08908434212207794,
0.1525992751121521,
0.40113458037376404,
-0.08527597039937973,
0.06607906520366669,
0.24203136563301086,
0.003439906984567642,
-0.3257346451282501,
-0.27416977286338806,
0.18110360205173492,
-0.15961357951164246,
0.3226219117641449,
0.12815937399864197,
0.05069836974143982,
0.2503218650817871,
-0.04333620145916939,
-0.1160278394818306,
0.07843576371669769,
0.10563630610704422,
-0.3318949341773987,
0.23888325691223145,
-0.10024002194404602,
-0.5517885088920593,
0.38689136505126953,
-0.007618499919772148,
0.06681092083454132,
-0.025056421756744385,
-0.183919757604599,
-0.0696144700050354,
-0.13988539576530457,
0.47877833247184753,
0.5028660297393799,
0.47347626090049744,
0.17877982556819916,
0.3006388545036316,
-0.029582621529698372,
0.09126587957143784,
-0.3178114593029022,
-0.0831855833530426,
0.04881472885608673,
0.23611204326152802,
0.2955628037452698,
-0.11971695721149445,
-0.04904571920633316,
-0.1970173865556717,
-0.23455947637557983,
0.3719569742679596,
0.05490919202566147,
-0.1710328459739685,
0.06568951159715652,
-0.31892722845077515,
-0.4927380681037903,
-0.22923643887043,
-0.045837175101041794,
-0.05014248937368393,
-0.17293314635753632,
0.06627776473760605,
0.7270770072937012,
-0.06778944283723831,
0.28438833355903625,
0.47979599237442017,
0.4485873579978943,
-0.21059271693229675,
0.1654486060142517,
-0.14575327932834625,
-0.18223978579044342,
0.0032022353261709213,
0.0369364470243454,
0.22898724675178528,
0.09430357813835144,
0.33727672696113586,
0.28389203548431396,
-0.16278596222400665,
-0.2981051802635193,
0.10762080550193787,
-0.09899180382490158,
0.00272422656416893,
-0.0963461697101593,
-0.17546817660331726,
-0.25050976872444153,
-0.03215603902935982,
0.003959033638238907,
-0.07086239755153656,
-0.24277536571025848,
-0.02813585475087166,
-0.013979624956846237,
-0.05706073343753815,
-0.2292422503232956,
-0.10658164322376251,
-0.008825637400150299,
-0.4428950250148773,
-0.33722180128097534,
0.03422681242227554,
-0.023857880383729935,
0.21627111732959747,
-0.106937475502491,
0.09920388460159302,
-0.317745178937912,
0.13228967785835266,
-0.2115560919046402,
0.004646945744752884,
-0.2248537242412567,
0.10413463413715363,
-0.20951318740844727,
-0.3363834023475647,
-0.18087321519851685,
0.016225799918174744,
-0.032758019864559174,
0.7001858353614807,
-0.3680460453033447,
-0.022672176361083984,
0.22942234575748444,
-0.28300631046295166,
0.13002845644950867,
-0.01745235174894333,
0.1841202676296234,
-0.21101859211921692,
0.0608733668923378,
-0.09832748770713806,
0.30754420161247253,
0.09404551982879639,
0.11913974583148956,
0.3478055000305176,
0.24098807573318481,
0.2969389855861664,
0.18660897016525269,
0.9571035504341125,
0.4824317395687103,
-0.04224644973874092,
0.14983172714710236,
0.19642145931720734,
-0.056599751114845276,
0.012742290273308754,
-0.0643312931060791,
0.3703346848487854,
-0.0830574780702591,
-0.045186202973127365,
0.12593674659729004,
-0.21250998973846436,
-0.34287744760513306,
-0.2323751598596573,
0.0019959434866905212,
0.11636404693126678,
-0.08302852511405945,
0.09244918823242188,
-0.2529964745044708,
0.17085915803909302,
0.15478980541229248,
0.08479215204715729,
0.20761753618717194,
-0.03211395442485809,
-0.4283945858478546,
0.06317974627017975,
0.27598223090171814,
0.016005147248506546,
-0.16827118396759033,
0.08855253458023071,
-0.33251258730888367,
0.20825934410095215,
0.11089914292097092,
0.41010433435440063,
-0.09692040830850601,
0.0012383460998535156,
0.20487654209136963,
0.16055065393447876,
0.2482411116361618,
-0.4635753929615021,
-0.15831811726093292,
-0.19165050983428955,
-0.3073832094669342,
0.14557787775993347,
-0.06610328704118729,
-0.13106635212898254,
0.39359205961227417,
-0.03613927215337753,
0.06572027504444122,
-0.19327493011951447,
0.00100698322057724,
-0.2515191435813904,
-0.15094858407974243,
-0.19483473896980286,
0.015966925770044327,
-0.22142896056175232,
-0.05043540522456169,
-0.26836690306663513,
0.20394307374954224,
0.11528261750936508,
-0.03895575553178787,
-0.2019885629415512,
-0.12639975547790527,
-0.17505629360675812,
0.09587056189775467,
-0.061167456209659576,
0.06695056706666946,
0.04935375973582268,
0.040436554700136185,
0.21243011951446533,
0.20874544978141785,
0.3953591585159302,
0.5721637606620789,
0.3576987087726593,
-0.10423833131790161,
-0.20544858276844025,
0.21369221806526184,
-0.012208551168441772,
0.35178130865097046,
0.4592912197113037,
0.059458423405885696,
0.12396785616874695,
0.199274480342865,
0.22486010193824768,
-0.3814557194709778,
-0.3206067383289337,
-0.04009976610541344,
-0.01633504405617714,
-0.3836514949798584,
-0.6445526480674744,
0.19172415137290955,
-0.08655966073274612,
-0.09299278259277344,
0.46199873089790344,
-0.20214125514030457,
-0.18130603432655334,
0.3067103624343872,
0.11880967020988464,
0.7116556763648987,
0.2004757821559906,
-0.1280091106891632,
-0.08082973957061768,
0.14721162617206573,
0.6211409568786621,
-0.12598812580108643,
0.30969175696372986,
-0.09895922243595123,
-0.34365129470825195,
-0.09388183802366257,
0.02876719832420349,
0.218648761510849,
0.3569571375846863,
-0.09297424554824829,
0.3380039632320404,
0.2797406017780304,
0.05031014606356621,
0.024454642087221146,
0.38943755626678467,
0.2260688841342926,
-0.29189732670783997,
0.05191393569111824,
0.040939681231975555,
-0.26360800862312317,
0.1095682680606842,
-0.029113762080669403,
0.06142812594771385,
0.30432945489883423,
-0.017380662262439728,
-0.3451733887195587,
-0.001589260995388031,
-0.2504502534866333,
0.1799796223640442,
-0.2980843186378479,
-0.3518190383911133,
-0.014309242367744446,
0.22457793354988098,
-0.051153820008039474,
-0.4006478190422058,
-0.060093075037002563,
0.1267896294593811,
0.09874902665615082,
0.1411825716495514,
-0.23552784323692322,
-0.2179218977689743,
0.28058183193206787,
-0.06922587007284164,
-0.07415220141410828,
0.032699450850486755,
0.1559431254863739,
-0.4639070928096771,
-0.21319936215877533,
-0.03263254463672638,
0.19737188518047333,
0.26600706577301025,
0.28038570284843445,
0.13937042653560638,
-0.07972268015146255,
-0.2499895989894867,
-0.001124952919781208,
-0.0405939482152462,
-0.15223562717437744,
0.531467080116272,
-0.15184012055397034,
0.0904516875743866,
-0.20528092980384827,
0.3922710418701172,
0.1825878918170929,
0.1486111581325531,
-0.02756732702255249,
0.11244922876358032,
-0.1182924211025238,
-0.11030668020248413,
-0.09317553043365479,
-0.06052488088607788,
-0.11856216937303543,
0.008454520255327225,
-0.29406440258026123,
0.19962066411972046,
0.27630722522735596,
-0.016298582777380943,
0.07249584794044495,
0.3035910129547119,
-0.25033047795295715,
-0.457568883895874,
0.10085532814264297,
0.08082135021686554,
-0.07574636489152908,
-0.10017263889312744,
0.08798982203006744,
-0.11817143857479095,
0.15497618913650513,
0.6689578890800476,
-0.2593654990196228,
-0.22264665365219116,
0.009598851203918457,
0.2004629671573639,
0.08540656417608261,
0.1396985650062561,
-0.08338335156440735,
-0.07921189069747925,
-0.12510380148887634,
0.07765056192874908,
0.024542182683944702,
-0.1204695850610733,
-0.0428435355424881,
0.19635778665542603,
0.21678051352500916,
-0.09578903019428253,
-0.23582208156585693,
-0.324596643447876,
-0.3343942165374756,
-0.10725420713424683,
0.20262300968170166,
0.012907840311527252,
-0.0461440235376358,
-0.08299568295478821,
0.6750946640968323,
0.08769296854734421,
-0.3021237552165985,
0.24845552444458008,
-0.0822640061378479,
-0.050996020436286926,
-0.17750069499015808,
0.19915303587913513,
0.3842018246650696,
-0.12150600552558899,
-0.17338357865810394,
-0.23282815515995026,
0.37631648778915405,
-0.08606995642185211,
0.4022093415260315,
-0.08369158208370209,
0.15544922649860382,
-0.16203370690345764,
0.5856527090072632,
0.23155951499938965,
-0.04679866507649422,
-0.20633524656295776,
0.28424015641212463,
0.10000159591436386,
-0.20904818177223206,
-0.20226672291755676,
0.051618073135614395,
0.33272844552993774,
0.1875542551279068,
0.4447084665298462,
0.39823317527770996,
-0.12155617773532867,
-0.2642560303211212,
0.09424786269664764,
0.5052286386489868,
-0.19930879771709442,
0.20498985052108765,
0.0005274559371173382,
0.13664285838603973,
0.19577041268348694,
-0.1093682050704956,
0.22564071416854858,
0.03534727543592453,
0.304769366979599,
-0.3092609941959381,
0.7399809956550598,
0.1800457090139389,
-0.04088064283132553,
0.26147162914276123,
-0.4083422124385834,
-0.027955103665590286,
0.0511932373046875,
-0.27629613876342773,
0.21890032291412354,
-0.11413562297821045,
0.05269940197467804,
-0.2647417187690735,
-0.22853687405586243,
-0.014623750001192093,
0.2962864339351654,
-0.002693724352866411,
0.031127575784921646,
-0.5655739307403564,
-0.008411988615989685,
-0.20485199987888336,
0.0021113306283950806,
0.028320545330643654,
-0.03827006742358208,
0.5511711835861206,
0.07702211290597916,
-0.041578423231840134,
-0.21449188888072968,
-0.06528092920780182,
0.05460263416171074,
0.14385336637496948,
-0.28721684217453003,
0.2275797724723816,
0.3027360439300537,
-0.13196931779384613,
0.07006557285785675,
0.1666833758354187,
0.07416398823261261,
0.26832813024520874,
-0.053863245993852615,
0.2339264303445816,
0.3050244450569153,
-0.06516563147306442,
-0.09334377199411392,
0.40177035331726074,
0.03326905518770218,
-0.15578347444534302,
0.2595016062259674,
-0.00023682788014411926,
0.017757251858711243,
0.2346586138010025,
0.2817247807979584,
-0.06593585014343262,
0.025959346443414688,
0.459255188703537,
-0.06756645441055298,
0.14546972513198853,
0.13626807928085327,
0.005246706306934357,
-0.37799328565597534,
-0.01038924977183342,
0.350979745388031,
-0.45905059576034546,
0.05125473812222481,
-0.022730836644768715,
0.004870064556598663,
-0.1468215137720108,
0.5160329937934875,
0.16500578820705414,
0.03988877683877945,
-0.2612239420413971,
-0.29604411125183105,
-0.5132619738578796,
0.08484984189271927,
-0.4117299020290375,
-0.16564467549324036,
-0.02849666215479374,
0.43281829357147217,
0.07081688940525055,
0.19639864563941956,
-0.3687134385108948,
0.08428403735160828,
-0.1745309680700302,
0.5773721933364868,
-0.2791088819503784,
-0.08937016129493713,
-0.5378432273864746,
0.15635201334953308,
0.09824883192777634,
-0.3539040684700012,
0.45212867856025696,
0.26110634207725525,
-0.1391412615776062,
0.07427337765693665,
0.005071297287940979,
0.26286131143569946,
0.005235630087554455,
-0.3676958382129669,
0.09250601381063461,
0.33780398964881897,
0.0506775826215744,
0.09396832436323166,
-0.0835827887058258,
0.12262168526649475,
-0.4526345729827881,
0.19286896288394928,
0.09724687039852142,
0.3620455265045166,
-0.19569164514541626,
-0.15890656411647797,
-0.29978421330451965,
0.35243454575538635,
0.03415100276470184,
-0.20737066864967346,
-0.27364835143089294,
0.08183158934116364,
-0.1954088807106018,
0.2924795150756836,
0.3380967974662781,
0.14995163679122925,
-0.23145905137062073,
-0.12317950278520584,
-0.31143924593925476,
-0.1804192215204239,
0.3792820870876312,
-0.47693243622779846,
0.045383088290691376,
-0.4637560248374939,
0.23137111961841583,
0.2531643509864807,
0.1970571130514145,
-0.25030016899108887,
-0.3180619478225708,
0.22695736587047577,
-0.32072004675865173,
0.057510972023010254,
0.07607784122228622,
0.12044914066791534,
-0.2699720561504364,
-0.1574166715145111,
-0.40562427043914795,
0.032632339745759964,
-0.5015792846679688,
0.22198708355426788,
-0.30460089445114136
] |
https://github.com/huggingface/datasets/issues/6623 | In the case one at least one of the noes will get an empty/incomplete batch. The data is not repeated in that case. If the training loop doesn't take this into account it can lead to unexpected behaviors indeed.
In the future we'd like to add a feature that would allow the nodes to ignore the last batch, this way all the nodes would only have full batches. | streaming datasets doesn't work properly with multi-node | ### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave. | 68 | streaming datasets doesn't work properly with multi-node
### Feature request
Let’s say I have a dataset with 5 samples with values [1, 2, 3, 4, 5], with 2 GPUs (for DDP) and batch size of 2. This dataset is an `IterableDataset` since I am streaming it.
Now I split the dataset using `split_dataset_by_node` to ensure it doesn’t get repeated. And since it’s already splitted, I don’t have to use `DistributedSampler` (also they don't work with iterable datasets anyway)?
But in this case I noticed that the:
First iteraton:
first GPU will get → [1, 2]
first GPU will get → [3, 4]
Second iteraton:
first GPU will get → [5]
first GPU will get → Nothing
which actually creates an issue since in case of `DistributedSampler`, the samples are repeated internally to ensure non of the GPUs at any iteration is missing any data for gradient sync.
So my questions are:
1. Here since splitting is happening before hand, how to make sure each GPU get’s a batch at each iteration to avoid gradient sync issues?
2. Do we need to use `DistributedSampler`? If yes, how?
3. in the docstrings of `split_dataset_by_node`, this is mentioned: *"If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`), then the shards are evenly assigned across the nodes, which is the most optimized. Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples."* Can you explain the last part here?
4. If `dataset.n_shards % world_size != 0`, is it possible to shard the streaming dataset on the fly to avoid the case where data is missing?
### Motivation
Somehow streaming datasets should work with DDP since for big LLMs a lot of data is required and DDP/multi-node is mostly used to train such models and streaming can actually help solve the data part of it.
### Your contribution
Yes, I can help in submitting the PR once we get mutual understanding on how it should behave.
In the case one at least one of the noes will get an empty/incomplete batch. The data is not repeated in that case. If the training loop doesn't take this into account it can lead to unexpected behaviors indeed.
In the future we'd like to add a feature that would allow the nodes to ignore the last batch, this way all the nodes would only have full batches. | [
-0.5885023474693298,
-0.2717367708683014,
-0.022129017859697342,
0.05329866707324982,
-0.05288459733128548,
-0.24468931555747986,
0.28833165764808655,
-0.16213496029376984,
-0.05456581711769104,
0.17409411072731018,
0.13106313347816467,
0.20888292789459229,
-0.21015878021717072,
0.1710551381111145,
-0.05287248641252518,
-0.2316754013299942,
0.07644330710172653,
0.01057659462094307,
0.04034364968538284,
-0.2694319486618042,
-0.07909917831420898,
-0.16820268332958221,
-0.22020316123962402,
-0.4776022434234619,
-0.23010557889938354,
-0.34483352303504944,
-0.1880214959383011,
0.17915897071361542,
0.04292941093444824,
-0.0007918775081634521,
-0.024187937378883362,
0.21599668264389038,
0.22667305171489716,
0.26554247736930847,
-0.00011949403415201232,
-0.17549662292003632,
0.14307358860969543,
-0.033987656235694885,
-0.2797178626060486,
-0.10833810269832611,
-0.4525478482246399,
0.12000128626823425,
-0.0856480672955513,
-0.15769720077514648,
-0.005377188324928284,
0.0469653457403183,
0.16009725630283356,
-0.5938501954078674,
0.4552592635154724,
-0.03413572907447815,
0.08512648195028305,
0.01408693939447403,
-0.2336328625679016,
0.11152130365371704,
-0.18026015162467957,
0.3543376922607422,
0.005941025912761688,
-0.023008089512586594,
0.3836512565612793,
-0.10668213665485382,
-0.2726716697216034,
0.3208426833152771,
-0.17977496981620789,
0.3480873107910156,
-0.009544376283884048,
-0.1916971206665039,
-0.13937494158744812,
-0.3502672016620636,
-0.16309091448783875,
0.19770018756389618,
0.24191229045391083,
-0.12461245805025101,
-0.39788925647735596,
-0.521531343460083,
-0.14842446148395538,
-0.3500770926475525,
-0.23801052570343018,
0.18176981806755066,
-0.2481730580329895,
-0.0703870952129364,
-0.4510071277618408,
-0.23377658426761627,
-0.039797209203243256,
0.11789821088314056,
0.15419495105743408,
0.7694438695907593,
0.16675050556659698,
0.23403680324554443,
-0.1394328773021698,
0.29044508934020996,
0.3079175055027008,
-0.2309572994709015,
0.09334338456392288,
-0.13752999901771545,
-0.4325198531150818,
0.018086589872837067,
0.05734461918473244,
0.04305759817361832,
0.16307535767555237,
0.47958433628082275,
0.30966776609420776,
0.039084240794181824,
0.2876565754413605,
0.16717436909675598,
0.39613404870033264,
-0.18216004967689514,
-0.07782210409641266,
0.13634347915649414,
0.2166709154844284,
-0.017559371888637543,
0.08888927102088928,
0.020971247926354408,
0.21538354456424713,
0.23815034329891205,
-0.24705252051353455,
0.18153789639472961,
0.21558597683906555,
0.06319627165794373,
-0.057585135102272034,
-0.33602985739707947,
-0.03557462990283966,
-0.1887940913438797,
0.13759249448776245,
0.04293625056743622,
0.03659946843981743,
0.24672368168830872,
-0.4028873145580292,
0.15768982470035553,
-0.16016718745231628,
-0.5503530502319336,
-0.21842163801193237,
-0.3020685017108917,
-0.15051349997520447,
0.36816567182540894,
0.14705823361873627,
-0.0330776646733284,
0.2690260112285614,
-0.02857164293527603,
0.10693713277578354,
0.1553390473127365,
-0.07142554968595505,
-0.27262142300605774,
0.024798860773444176,
0.23033371567726135,
0.18815961480140686,
0.09010680019855499,
0.036062948405742645,
0.08091837167739868,
-0.07104326784610748,
0.17591574788093567,
-0.01980457827448845,
-0.33053672313690186,
0.19016502797603607,
0.08777797967195511,
-0.019701950252056122,
-0.013415093533694744,
-0.5710844993591309,
0.4722989499568939,
0.330960214138031,
-0.22632598876953125,
0.00015896186232566833,
-0.056308429688215256,
-0.37576544284820557,
-0.22712896764278412,
0.32718145847320557,
0.4236840605735779,
-0.08281472325325012,
-0.11036442220211029,
-0.07954616844654083,
0.10516591370105743,
0.559253990650177,
0.4052501320838928,
-0.17483340203762054,
-0.07906554639339447,
0.020856671035289764,
0.15972900390625,
0.16132764518260956,
-0.2096678912639618,
-0.25260594487190247,
0.4820108711719513,
-0.24641740322113037,
0.2487398236989975,
0.35342103242874146,
0.1166631281375885,
0.617304801940918,
-0.17541232705116272,
-0.07058148086071014,
0.6404229402542114,
-0.4585624933242798,
0.08418096601963043,
-0.38688284158706665,
-0.005343355238437653,
-0.10611443221569061,
0.25615841150283813,
0.16894984245300293,
0.12541131675243378,
0.24003133177757263,
0.2963806092739105,
0.3235984146595001,
0.08058828860521317,
0.35313987731933594,
-0.06989148259162903,
0.2761307954788208,
-0.2106955647468567,
0.049497976899147034,
-0.11211924254894257,
-0.6091260313987732,
0.28869563341140747,
0.07801954448223114,
-0.27191469073295593,
0.0680549144744873,
-0.23662494122982025,
0.44753289222717285,
-0.15206006169319153,
-0.0822150856256485,
-0.23689866065979004,
-0.03141500800848007,
0.26023662090301514,
0.2944309711456299,
-0.10916776955127716,
-0.3123038113117218,
0.2191813886165619,
-0.42277610301971436,
-0.02126145362854004,
-0.26497286558151245,
0.5215786099433899,
0.21814259886741638,
-0.21846994757652283,
-0.0010435879230499268,
0.045710932463407516,
0.14224129915237427,
-0.15118201076984406,
0.015415862202644348,
0.33918988704681396,
0.2921460270881653,
0.18274448812007904,
-0.08908434212207794,
0.1525992751121521,
0.40113458037376404,
-0.08527597039937973,
0.06607906520366669,
0.24203136563301086,
0.003439906984567642,
-0.3257346451282501,
-0.27416977286338806,
0.18110360205173492,
-0.15961357951164246,
0.3226219117641449,
0.12815937399864197,
0.05069836974143982,
0.2503218650817871,
-0.04333620145916939,
-0.1160278394818306,
0.07843576371669769,
0.10563630610704422,
-0.3318949341773987,
0.23888325691223145,
-0.10024002194404602,
-0.5517885088920593,
0.38689136505126953,
-0.007618499919772148,
0.06681092083454132,
-0.025056421756744385,
-0.183919757604599,
-0.0696144700050354,
-0.13988539576530457,
0.47877833247184753,
0.5028660297393799,
0.47347626090049744,
0.17877982556819916,
0.3006388545036316,
-0.029582621529698372,
0.09126587957143784,
-0.3178114593029022,
-0.0831855833530426,
0.04881472885608673,
0.23611204326152802,
0.2955628037452698,
-0.11971695721149445,
-0.04904571920633316,
-0.1970173865556717,
-0.23455947637557983,
0.3719569742679596,
0.05490919202566147,
-0.1710328459739685,
0.06568951159715652,
-0.31892722845077515,
-0.4927380681037903,
-0.22923643887043,
-0.045837175101041794,
-0.05014248937368393,
-0.17293314635753632,
0.06627776473760605,
0.7270770072937012,
-0.06778944283723831,
0.28438833355903625,
0.47979599237442017,
0.4485873579978943,
-0.21059271693229675,
0.1654486060142517,
-0.14575327932834625,
-0.18223978579044342,
0.0032022353261709213,
0.0369364470243454,
0.22898724675178528,
0.09430357813835144,
0.33727672696113586,
0.28389203548431396,
-0.16278596222400665,
-0.2981051802635193,
0.10762080550193787,
-0.09899180382490158,
0.00272422656416893,
-0.0963461697101593,
-0.17546817660331726,
-0.25050976872444153,
-0.03215603902935982,
0.003959033638238907,
-0.07086239755153656,
-0.24277536571025848,
-0.02813585475087166,
-0.013979624956846237,
-0.05706073343753815,
-0.2292422503232956,
-0.10658164322376251,
-0.008825637400150299,
-0.4428950250148773,
-0.33722180128097534,
0.03422681242227554,
-0.023857880383729935,
0.21627111732959747,
-0.106937475502491,
0.09920388460159302,
-0.317745178937912,
0.13228967785835266,
-0.2115560919046402,
0.004646945744752884,
-0.2248537242412567,
0.10413463413715363,
-0.20951318740844727,
-0.3363834023475647,
-0.18087321519851685,
0.016225799918174744,
-0.032758019864559174,
0.7001858353614807,
-0.3680460453033447,
-0.022672176361083984,
0.22942234575748444,
-0.28300631046295166,
0.13002845644950867,
-0.01745235174894333,
0.1841202676296234,
-0.21101859211921692,
0.0608733668923378,
-0.09832748770713806,
0.30754420161247253,
0.09404551982879639,
0.11913974583148956,
0.3478055000305176,
0.24098807573318481,
0.2969389855861664,
0.18660897016525269,
0.9571035504341125,
0.4824317395687103,
-0.04224644973874092,
0.14983172714710236,
0.19642145931720734,
-0.056599751114845276,
0.012742290273308754,
-0.0643312931060791,
0.3703346848487854,
-0.0830574780702591,
-0.045186202973127365,
0.12593674659729004,
-0.21250998973846436,
-0.34287744760513306,
-0.2323751598596573,
0.0019959434866905212,
0.11636404693126678,
-0.08302852511405945,
0.09244918823242188,
-0.2529964745044708,
0.17085915803909302,
0.15478980541229248,
0.08479215204715729,
0.20761753618717194,
-0.03211395442485809,
-0.4283945858478546,
0.06317974627017975,
0.27598223090171814,
0.016005147248506546,
-0.16827118396759033,
0.08855253458023071,
-0.33251258730888367,
0.20825934410095215,
0.11089914292097092,
0.41010433435440063,
-0.09692040830850601,
0.0012383460998535156,
0.20487654209136963,
0.16055065393447876,
0.2482411116361618,
-0.4635753929615021,
-0.15831811726093292,
-0.19165050983428955,
-0.3073832094669342,
0.14557787775993347,
-0.06610328704118729,
-0.13106635212898254,
0.39359205961227417,
-0.03613927215337753,
0.06572027504444122,
-0.19327493011951447,
0.00100698322057724,
-0.2515191435813904,
-0.15094858407974243,
-0.19483473896980286,
0.015966925770044327,
-0.22142896056175232,
-0.05043540522456169,
-0.26836690306663513,
0.20394307374954224,
0.11528261750936508,
-0.03895575553178787,
-0.2019885629415512,
-0.12639975547790527,
-0.17505629360675812,
0.09587056189775467,
-0.061167456209659576,
0.06695056706666946,
0.04935375973582268,
0.040436554700136185,
0.21243011951446533,
0.20874544978141785,
0.3953591585159302,
0.5721637606620789,
0.3576987087726593,
-0.10423833131790161,
-0.20544858276844025,
0.21369221806526184,
-0.012208551168441772,
0.35178130865097046,
0.4592912197113037,
0.059458423405885696,
0.12396785616874695,
0.199274480342865,
0.22486010193824768,
-0.3814557194709778,
-0.3206067383289337,
-0.04009976610541344,
-0.01633504405617714,
-0.3836514949798584,
-0.6445526480674744,
0.19172415137290955,
-0.08655966073274612,
-0.09299278259277344,
0.46199873089790344,
-0.20214125514030457,
-0.18130603432655334,
0.3067103624343872,
0.11880967020988464,
0.7116556763648987,
0.2004757821559906,
-0.1280091106891632,
-0.08082973957061768,
0.14721162617206573,
0.6211409568786621,
-0.12598812580108643,
0.30969175696372986,
-0.09895922243595123,
-0.34365129470825195,
-0.09388183802366257,
0.02876719832420349,
0.218648761510849,
0.3569571375846863,
-0.09297424554824829,
0.3380039632320404,
0.2797406017780304,
0.05031014606356621,
0.024454642087221146,
0.38943755626678467,
0.2260688841342926,
-0.29189732670783997,
0.05191393569111824,
0.040939681231975555,
-0.26360800862312317,
0.1095682680606842,
-0.029113762080669403,
0.06142812594771385,
0.30432945489883423,
-0.017380662262439728,
-0.3451733887195587,
-0.001589260995388031,
-0.2504502534866333,
0.1799796223640442,
-0.2980843186378479,
-0.3518190383911133,
-0.014309242367744446,
0.22457793354988098,
-0.051153820008039474,
-0.4006478190422058,
-0.060093075037002563,
0.1267896294593811,
0.09874902665615082,
0.1411825716495514,
-0.23552784323692322,
-0.2179218977689743,
0.28058183193206787,
-0.06922587007284164,
-0.07415220141410828,
0.032699450850486755,
0.1559431254863739,
-0.4639070928096771,
-0.21319936215877533,
-0.03263254463672638,
0.19737188518047333,
0.26600706577301025,
0.28038570284843445,
0.13937042653560638,
-0.07972268015146255,
-0.2499895989894867,
-0.001124952919781208,
-0.0405939482152462,
-0.15223562717437744,
0.531467080116272,
-0.15184012055397034,
0.0904516875743866,
-0.20528092980384827,
0.3922710418701172,
0.1825878918170929,
0.1486111581325531,
-0.02756732702255249,
0.11244922876358032,
-0.1182924211025238,
-0.11030668020248413,
-0.09317553043365479,
-0.06052488088607788,
-0.11856216937303543,
0.008454520255327225,
-0.29406440258026123,
0.19962066411972046,
0.27630722522735596,
-0.016298582777380943,
0.07249584794044495,
0.3035910129547119,
-0.25033047795295715,
-0.457568883895874,
0.10085532814264297,
0.08082135021686554,
-0.07574636489152908,
-0.10017263889312744,
0.08798982203006744,
-0.11817143857479095,
0.15497618913650513,
0.6689578890800476,
-0.2593654990196228,
-0.22264665365219116,
0.009598851203918457,
0.2004629671573639,
0.08540656417608261,
0.1396985650062561,
-0.08338335156440735,
-0.07921189069747925,
-0.12510380148887634,
0.07765056192874908,
0.024542182683944702,
-0.1204695850610733,
-0.0428435355424881,
0.19635778665542603,
0.21678051352500916,
-0.09578903019428253,
-0.23582208156585693,
-0.324596643447876,
-0.3343942165374756,
-0.10725420713424683,
0.20262300968170166,
0.012907840311527252,
-0.0461440235376358,
-0.08299568295478821,
0.6750946640968323,
0.08769296854734421,
-0.3021237552165985,
0.24845552444458008,
-0.0822640061378479,
-0.050996020436286926,
-0.17750069499015808,
0.19915303587913513,
0.3842018246650696,
-0.12150600552558899,
-0.17338357865810394,
-0.23282815515995026,
0.37631648778915405,
-0.08606995642185211,
0.4022093415260315,
-0.08369158208370209,
0.15544922649860382,
-0.16203370690345764,
0.5856527090072632,
0.23155951499938965,
-0.04679866507649422,
-0.20633524656295776,
0.28424015641212463,
0.10000159591436386,
-0.20904818177223206,
-0.20226672291755676,
0.051618073135614395,
0.33272844552993774,
0.1875542551279068,
0.4447084665298462,
0.39823317527770996,
-0.12155617773532867,
-0.2642560303211212,
0.09424786269664764,
0.5052286386489868,
-0.19930879771709442,
0.20498985052108765,
0.0005274559371173382,
0.13664285838603973,
0.19577041268348694,
-0.1093682050704956,
0.22564071416854858,
0.03534727543592453,
0.304769366979599,
-0.3092609941959381,
0.7399809956550598,
0.1800457090139389,
-0.04088064283132553,
0.26147162914276123,
-0.4083422124385834,
-0.027955103665590286,
0.0511932373046875,
-0.27629613876342773,
0.21890032291412354,
-0.11413562297821045,
0.05269940197467804,
-0.2647417187690735,
-0.22853687405586243,
-0.014623750001192093,
0.2962864339351654,
-0.002693724352866411,
0.031127575784921646,
-0.5655739307403564,
-0.008411988615989685,
-0.20485199987888336,
0.0021113306283950806,
0.028320545330643654,
-0.03827006742358208,
0.5511711835861206,
0.07702211290597916,
-0.041578423231840134,
-0.21449188888072968,
-0.06528092920780182,
0.05460263416171074,
0.14385336637496948,
-0.28721684217453003,
0.2275797724723816,
0.3027360439300537,
-0.13196931779384613,
0.07006557285785675,
0.1666833758354187,
0.07416398823261261,
0.26832813024520874,
-0.053863245993852615,
0.2339264303445816,
0.3050244450569153,
-0.06516563147306442,
-0.09334377199411392,
0.40177035331726074,
0.03326905518770218,
-0.15578347444534302,
0.2595016062259674,
-0.00023682788014411926,
0.017757251858711243,
0.2346586138010025,
0.2817247807979584,
-0.06593585014343262,
0.025959346443414688,
0.459255188703537,
-0.06756645441055298,
0.14546972513198853,
0.13626807928085327,
0.005246706306934357,
-0.37799328565597534,
-0.01038924977183342,
0.350979745388031,
-0.45905059576034546,
0.05125473812222481,
-0.022730836644768715,
0.004870064556598663,
-0.1468215137720108,
0.5160329937934875,
0.16500578820705414,
0.03988877683877945,
-0.2612239420413971,
-0.29604411125183105,
-0.5132619738578796,
0.08484984189271927,
-0.4117299020290375,
-0.16564467549324036,
-0.02849666215479374,
0.43281829357147217,
0.07081688940525055,
0.19639864563941956,
-0.3687134385108948,
0.08428403735160828,
-0.1745309680700302,
0.5773721933364868,
-0.2791088819503784,
-0.08937016129493713,
-0.5378432273864746,
0.15635201334953308,
0.09824883192777634,
-0.3539040684700012,
0.45212867856025696,
0.26110634207725525,
-0.1391412615776062,
0.07427337765693665,
0.005071297287940979,
0.26286131143569946,
0.005235630087554455,
-0.3676958382129669,
0.09250601381063461,
0.33780398964881897,
0.0506775826215744,
0.09396832436323166,
-0.0835827887058258,
0.12262168526649475,
-0.4526345729827881,
0.19286896288394928,
0.09724687039852142,
0.3620455265045166,
-0.19569164514541626,
-0.15890656411647797,
-0.29978421330451965,
0.35243454575538635,
0.03415100276470184,
-0.20737066864967346,
-0.27364835143089294,
0.08183158934116364,
-0.1954088807106018,
0.2924795150756836,
0.3380967974662781,
0.14995163679122925,
-0.23145905137062073,
-0.12317950278520584,
-0.31143924593925476,
-0.1804192215204239,
0.3792820870876312,
-0.47693243622779846,
0.045383088290691376,
-0.4637560248374939,
0.23137111961841583,
0.2531643509864807,
0.1970571130514145,
-0.25030016899108887,
-0.3180619478225708,
0.22695736587047577,
-0.32072004675865173,
0.057510972023010254,
0.07607784122228622,
0.12044914066791534,
-0.2699720561504364,
-0.1574166715145111,
-0.40562427043914795,
0.032632339745759964,
-0.5015792846679688,
0.22198708355426788,
-0.30460089445114136
] |
https://github.com/huggingface/datasets/issues/6618 | Hi! Can you please share the error's stack trace so we can see where it comes from? | While importing load_dataset from datasets | ### Describe the bug
cannot import name 'DEFAULT_CIPHERS' from 'urllib3.util.ssl_' this is the error i received
### Steps to reproduce the bug
from datasets import load_dataset
### Expected behavior
No errors
### Environment info
python 3.11.5 | 17 | While importing load_dataset from datasets
### Describe the bug
cannot import name 'DEFAULT_CIPHERS' from 'urllib3.util.ssl_' this is the error i received
### Steps to reproduce the bug
from datasets import load_dataset
### Expected behavior
No errors
### Environment info
python 3.11.5
Hi! Can you please share the error's stack trace so we can see where it comes from? | [
0.02553679049015045,
-0.0960899293422699,
-0.01202813908457756,
0.30808398127555847,
0.20100738108158112,
0.12118995189666748,
0.3076993227005005,
-0.02027871645987034,
0.16383129358291626,
0.16387607157230377,
0.07356870919466019,
0.20870698988437653,
-0.0453374907374382,
0.22486478090286255,
-0.010323697701096535,
-0.08854030817747116,
0.03795933723449707,
-0.11755792796611786,
-0.1343417465686798,
-0.08287185430526733,
-0.26581519842147827,
0.28992894291877747,
-0.18643690645694733,
-0.03193062171339989,
0.16879205405712128,
0.014141449704766273,
-0.1925136148929596,
0.29297828674316406,
-0.30503565073013306,
-0.3261713683605194,
0.38788196444511414,
-0.1012846827507019,
0.3977859318256378,
0.08643285930156708,
-0.00011234589328523725,
-0.07913771271705627,
0.36974188685417175,
0.015161074697971344,
-0.03355153650045395,
-0.470453143119812,
-0.5806116461753845,
-0.43142029643058777,
0.1406441628932953,
-0.32072538137435913,
0.36564499139785767,
0.1480671912431717,
-0.14596295356750488,
-0.14254990220069885,
0.2450360655784607,
0.36443665623664856,
0.24022173881530762,
0.19046014547348022,
0.15952931344509125,
-0.10644888132810593,
0.33428871631622314,
-0.44106757640838623,
-0.1060420572757721,
0.3757067620754242,
-0.06672178208827972,
-0.05535488203167915,
0.3541308343410492,
0.24926592409610748,
-0.21048688888549805,
0.030058875679969788,
0.27987414598464966,
0.021131590008735657,
-0.014930907636880875,
-0.4703759253025055,
-0.1284697949886322,
0.2075527012348175,
0.38516291975975037,
-0.3053736686706543,
-0.032272983342409134,
0.06701798737049103,
0.1988714635372162,
-0.18061639368534088,
0.48838120698928833,
0.05424904078245163,
0.010762669146060944,
0.13253472745418549,
0.24273887276649475,
-0.1690889149904251,
-0.0841400995850563,
0.19292102754116058,
-0.20189189910888672,
0.4724831283092499,
-0.16227538883686066,
0.061334606260061264,
-0.065354123711586,
-0.24784313142299652,
0.4389994144439697,
-0.3556544780731201,
0.12223808467388153,
0.08670903742313385,
-0.23202630877494812,
0.14321982860565186,
0.14614872634410858,
0.11581660807132721,
-0.02202237769961357,
0.1160096526145935,
-0.07869714498519897,
0.021549362689256668,
-0.09361046552658081,
0.29374366998672485,
0.1633535474538803,
0.09156365692615509,
0.028090087696909904,
0.2239925116300583,
0.4188316762447357,
0.20877200365066528,
0.03118882328271866,
0.2086254209280014,
-0.01875334605574608,
-0.18117916584014893,
0.15382318198680878,
0.06474143266677856,
0.46892186999320984,
-0.09849834442138672,
-0.3385747969150543,
0.23375433683395386,
-0.04177612438797951,
-0.13675415515899658,
0.05483110249042511,
0.4141411781311035,
-0.1588600128889084,
0.18822985887527466,
0.08482615649700165,
0.04564640298485756,
-0.05759667232632637,
0.17443877458572388,
-0.16757142543792725,
-0.1858064830303192,
-0.1376136988401413,
-0.10949859768152237,
-0.0001993328332901001,
-0.18338394165039062,
0.145832359790802,
0.20561841130256653,
0.07790271937847137,
0.07166261970996857,
0.15232157707214355,
-0.0703311562538147,
-0.043130021542310715,
0.16476751863956451,
0.15672409534454346,
0.3111204504966736,
0.1860833466053009,
0.0002232864499092102,
-0.11120244115591049,
0.11449362337589264,
-0.7039685249328613,
-0.26508817076683044,
-0.19842146337032318,
0.21204417943954468,
-0.2765454649925232,
-0.19229993224143982,
-0.03251150995492935,
-0.1258443295955658,
-0.09724493324756622,
0.03746570646762848,
-0.32956838607788086,
-0.37241846323013306,
0.03843879699707031,
-0.2060108333826065,
0.24037885665893555,
0.16477572917938232,
-0.06738559156656265,
-0.16966889798641205,
-0.01306772232055664,
-0.2086106836795807,
0.2378397285938263,
0.03765609860420227,
-0.12443415820598602,
-0.22122246026992798,
-0.08149541914463043,
0.08899974822998047,
0.3034837245941162,
-0.2857157588005066,
-0.5515396595001221,
0.170106440782547,
0.09735492616891861,
-0.10354150086641312,
0.005366731435060501,
0.008233118802309036,
-0.0037278831005096436,
0.1105399951338768,
0.21718564629554749,
0.37016603350639343,
0.035913653671741486,
0.04334833472967148,
-0.041801389306783676,
-0.28849679231643677,
0.1526760309934616,
0.1679544448852539,
-0.04115274176001549,
-0.000554896891117096,
0.0013352669775485992,
-0.21094930171966553,
0.062196582555770874,
-0.1401839554309845,
-0.24210090935230255,
0.4701537489891052,
0.41093066334724426,
0.17404705286026,
0.2530912756919861,
0.10452811419963837,
-0.46245601773262024,
0.22233419120311737,
-0.01731663942337036,
0.20014724135398865,
-0.4171617031097412,
0.09273664653301239,
-0.3285067677497864,
0.08436769992113113,
-0.2936386168003082,
0.30734941363334656,
0.060402996838092804,
0.21983295679092407,
-0.31776756048202515,
0.0037487968802452087,
-0.23493114113807678,
0.03868138790130615,
-0.10754875093698502,
0.1017371267080307,
-0.3172740042209625,
0.44401589035987854,
-0.22986288368701935,
0.06304416060447693,
0.09637399017810822,
0.06909254938364029,
0.2709537744522095,
0.01788158342242241,
-0.292052298784256,
0.036968279629945755,
0.09752985835075378,
0.31266719102859497,
-0.15353235602378845,
-0.024366751313209534,
0.05274584889411926,
-0.5685095191001892,
0.15895748138427734,
0.2342654913663864,
0.1007973700761795,
0.061194755136966705,
0.35015758872032166,
0.28063470125198364,
-0.00516026746481657,
0.10783815383911133,
-0.12380313873291016,
0.08735813200473785,
0.2918430268764496,
-0.21040640771389008,
-0.10326173901557922,
-0.32125478982925415,
0.3325873613357544,
-0.04028424993157387,
0.09697955846786499,
-0.05868356674909592,
-0.13566268980503082,
-0.24745750427246094,
0.3271335959434509,
0.032567523419857025,
0.20735184848308563,
0.08520438522100449,
-0.011331640183925629,
-0.08867636322975159,
0.021434729918837547,
0.1905156522989273,
0.3946812152862549,
0.02285800129175186,
-0.09310115873813629,
0.3434097170829773,
0.03356029465794563,
-0.17750315368175507,
0.1573403775691986,
0.08903671056032181,
0.09929852187633514,
0.2100106030702591,
0.06358657777309418,
0.08367235213518143,
-0.22510580718517303,
-0.12658239901065826,
0.09842506051063538,
0.38376811146736145,
-0.41497671604156494,
0.21336553990840912,
-0.24509447813034058,
-0.26065146923065186,
0.03101949393749237,
-0.10516061633825302,
-0.12542366981506348,
-0.4427874684333801,
-0.2907395362854004,
0.018458833917975426,
-0.1781488060951233,
0.16627927124500275,
-0.058390527963638306,
0.037290215492248535,
0.22221453487873077,
-0.19413454830646515,
-0.2670815587043762,
-0.20541200041770935,
0.02568824589252472,
0.010299254208803177,
0.18086323142051697,
-0.1541556566953659,
0.38244643807411194,
-0.07234328985214233,
-0.1035650223493576,
-0.2071174532175064,
-0.36752068996429443,
0.07965318858623505,
0.012024980038404465,
0.2917082905769348,
0.447550505399704,
0.1187218427658081,
-0.05477599799633026,
-0.23145447671413422,
0.23283550143241882,
-0.03668242320418358,
-0.06612265855073929,
0.09331726282835007,
-0.16670581698417664,
-0.09558870643377304,
0.08349746465682983,
-0.3906209170818329,
-0.38127920031547546,
-0.27383506298065186,
-0.37455353140830994,
0.07367315888404846,
0.09302444756031036,
-0.10719664394855499,
-0.1559578776359558,
0.168332040309906,
0.14945662021636963,
0.10890140384435654,
-0.12337008863687515,
-0.2913774847984314,
0.39757710695266724,
-0.12663279473781586,
-0.410009503364563,
0.12785768508911133,
-0.12480725347995758,
0.19086246192455292,
-0.14185720682144165,
-0.5603805780410767,
-0.2046869397163391,
-0.2922917604446411,
0.23654061555862427,
-0.18254493176937103,
0.27309492230415344,
-0.12263210117816925,
-0.022450430318713188,
0.05519453436136246,
-0.20833942294120789,
-0.24277645349502563,
-0.28831276297569275,
0.023180227726697922,
0.23047509789466858,
0.2023102045059204,
0.6140865683555603,
-0.16907694935798645,
0.4722696542739868,
0.18029338121414185,
0.04849185049533844,
0.5941764712333679,
-0.03194278106093407,
0.1750902682542801,
0.0852806493639946,
-0.3505101501941681,
-0.17463424801826477,
0.028778210282325745,
0.10837754607200623,
0.208194300532341,
-0.1578506976366043,
0.04659174382686615,
-0.2692102789878845,
-0.14825987815856934,
0.0319950208067894,
-0.16385304927825928,
-0.08868938684463501,
-0.3130051791667938,
0.2694419324398041,
0.18875616788864136,
-0.03472227603197098,
-0.21305407583713531,
-0.1690765917301178,
0.044219087809324265,
0.20786404609680176,
-0.298356831073761,
0.01270950585603714,
-0.1603713035583496,
0.10816431790590286,
-0.42568233609199524,
0.3534225821495056,
0.09792344272136688,
0.5259202122688293,
-0.05136891454458237,
0.114077128469944,
0.07762209326028824,
-0.030013060197234154,
0.2806844413280487,
-0.2411973923444748,
0.023505859076976776,
0.19895149767398834,
-0.023517228662967682,
-0.46887660026550293,
-0.1088968813419342,
-0.22055523097515106,
-0.09264123439788818,
0.21160855889320374,
0.36250659823417664,
-0.27955129742622375,
0.11899307370185852,
0.1485779583454132,
0.2514075040817261,
-0.14247334003448486,
-0.2576497495174408,
-0.3717425763607025,
-0.5525254011154175,
-0.43312180042266846,
-0.09729410707950592,
-0.025235481560230255,
0.4001227021217346,
-0.03392941877245903,
0.09381294995546341,
0.004072990268468857,
-0.09178128838539124,
0.15717074275016785,
0.15633222460746765,
0.11591438949108124,
0.1413794755935669,
0.21654166281223297,
-0.04448956623673439,
-0.007740922272205353,
0.0193906482309103,
0.7926288843154907,
-0.22684241831302643,
-0.752051055431366,
0.03541440889239311,
0.17691637575626373,
0.06764912605285645,
0.056745368987321854,
-0.1391167789697647,
0.1583767682313919,
0.10856713354587555,
0.08371792733669281,
0.06939806044101715,
-0.022349802777171135,
0.27946561574935913,
0.08454032242298126,
-0.3639776408672333,
-0.3415968716144562,
0.3725995123386383,
-0.01877298206090927,
-0.10212233662605286,
0.6557703614234924,
0.007818667218089104,
-0.2670885920524597,
0.32141023874282837,
-0.2184034287929535,
0.7601138353347778,
0.13949176669120789,
0.1308879852294922,
0.32902154326438904,
-0.01617056131362915,
0.29306668043136597,
0.21962884068489075,
-0.21902452409267426,
-0.5138139128684998,
-0.1626586765050888,
0.04293408244848251,
-0.3877057731151581,
0.20296277105808258,
-0.2660449147224426,
-0.17098791897296906,
0.050633348524570465,
-0.12980441749095917,
0.3608745038509369,
0.2298247367143631,
0.21563223004341125,
-0.5483413934707642,
-0.015150494873523712,
-0.24506810307502747,
0.12755589187145233,
0.008852840401232243,
0.2002710998058319,
-0.23067934811115265,
0.049620337784290314,
0.14581741392612457,
-0.38610416650772095,
-0.04333392530679703,
0.3424680233001709,
-0.39683935046195984,
0.40160906314849854,
-0.055586449801921844,
-0.1538185179233551,
0.25431373715400696,
0.49903926253318787,
0.45388659834861755,
0.06058214232325554,
-0.27650073170661926,
0.2977127134799957,
-0.02539921924471855,
-0.004333019256591797,
0.0551142580807209,
0.08744567632675171,
0.1115647628903389,
-0.23576563596725464,
-0.16960029304027557,
-0.0009936895221471786,
0.0420696847140789,
-0.20326289534568787,
-0.033931538462638855,
0.18590210378170013,
0.3568348288536072,
-0.2725362181663513,
-0.3188658654689789,
-0.222861647605896,
0.29758763313293457,
-0.27748727798461914,
0.14368972182273865,
0.35668107867240906,
-0.13710632920265198,
0.3518802523612976,
-0.14317303895950317,
-0.2584018111228943,
0.014135591685771942,
0.47884976863861084,
-0.022925566881895065,
0.08739778399467468,
0.5913832187652588,
0.08617697656154633,
-0.062259286642074585,
-0.08214464038610458,
0.5878227949142456,
-0.11495646834373474,
-0.002090558409690857,
0.1880767047405243,
0.06586512178182602,
0.013117387890815735,
-0.061525601893663406,
0.3155566453933716,
0.06943336874246597,
0.0395694226026535,
0.14521344006061554,
-0.5375162363052368,
0.0061392709612846375,
0.18694359064102173,
0.08143475651741028,
0.07237565517425537,
0.1346597522497177,
-0.06980019807815552,
-0.228815957903862,
-0.41632699966430664,
-0.26560235023498535,
0.3345631957054138,
-0.1805942952632904,
0.08545296639204025,
0.3096538186073303,
0.11549876630306244,
0.06723625957965851,
-0.146728515625,
0.12154195457696915,
0.055145613849163055,
-0.041824426501989365,
-0.24200597405433655,
-0.40284061431884766,
0.09718911349773407,
0.18265514075756073,
-0.18150216341018677,
-0.01669454202055931,
-0.3710613250732422,
-0.02149149961769581,
0.03705817833542824,
0.1491749882698059,
0.25388485193252563,
0.044770631939172745,
0.3062055706977844,
-0.17457987368106842,
0.031749751418828964,
-0.23335519433021545,
0.28131985664367676,
-0.30885088443756104,
0.24844227731227875,
0.017061255872249603,
0.20253270864486694,
-0.0539546012878418,
0.0664324015378952,
-0.15804767608642578,
-0.09617718309164047,
-0.10917764157056808,
0.11650724709033966,
0.127533420920372,
-0.25002992153167725,
0.23031191527843475,
0.018334709107875824,
0.024464361369609833,
0.38603782653808594,
-0.6166849732398987,
0.08431268483400345,
0.2909267246723175,
0.2108510434627533,
-0.2309926301240921,
-0.14894576370716095,
-0.2835090756416321,
-0.04929504916071892,
-0.12954723834991455,
-0.1665658801794052,
0.09825330972671509,
0.017937511205673218,
-0.20924536883831024,
-0.11590873450040817,
0.3093053996562958,
0.20610260963439941,
0.5103486180305481,
0.4604107439517975,
-0.1999596655368805,
0.22079309821128845,
-0.006039422005414963,
-0.16184519231319427,
-0.12051212787628174,
0.46578022837638855,
-0.07719740271568298,
0.31568798422813416,
-0.00045314058661460876,
0.1795179396867752,
0.19262570142745972,
-0.5440988540649414,
0.24890415370464325,
-0.2068140208721161,
-0.14889080822467804,
-0.07643263041973114,
0.06448167562484741,
0.23883236944675446,
-0.24922755360603333,
0.09092073142528534,
-0.2246820032596588,
0.22443801164627075,
0.011106785386800766,
-0.1982215791940689,
-0.19329330325126648,
0.020183712244033813,
0.10265935957431793,
0.24963678419589996,
-0.13173076510429382,
-0.06405779719352722,
-0.21984347701072693,
0.2845182418823242,
-0.2986399233341217,
-0.4421229064464569,
0.23060156404972076,
0.1698843240737915,
-0.10468582808971405,
-0.21554255485534668,
0.2352343052625656,
0.11307738721370697,
-0.018512576818466187,
-0.07876655459403992,
0.0574258491396904,
0.4801429212093353,
0.23772750794887543,
0.12982773780822754,
0.009986285120248795,
0.14351913332939148,
-0.1271299421787262,
-0.08871768414974213,
0.11760953068733215,
0.24251362681388855,
0.5193853378295898,
0.3090222477912903,
0.15749908983707428,
-0.25264444947242737,
-0.3226427733898163,
0.30113211274147034,
0.022636067122220993,
-0.04213828593492508,
0.437865287065506,
-0.2764911651611328,
0.19283407926559448,
-0.1713656485080719,
0.19691793620586395,
-0.3575226664543152,
-0.08649910241365433,
0.554878830909729,
0.1537276804447174,
0.03971704840660095,
-0.1745000183582306,
0.06168470159173012,
-0.10925501585006714,
0.5514641404151917,
0.32812950015068054,
0.16909654438495636,
-0.2846253514289856,
-0.2328631728887558,
-0.8396716117858887,
0.3168759346008301,
0.14502321183681488,
-0.2916586697101593,
0.10789478570222855,
-0.2316846251487732,
-0.027788467705249786,
0.09198953211307526,
-0.06913568079471588,
0.17910915613174438,
-0.008718784898519516,
-0.12986159324645996,
-0.2974386215209961,
-0.3717603385448456,
0.06685040891170502,
0.1673821657896042,
-0.028477828949689865,
-0.35745424032211304,
0.12037373334169388,
-0.12687498331069946,
-0.0017765238881111145,
-0.388700008392334,
-0.36220186948776245,
-0.09259793907403946,
0.03938313201069832,
0.6595345735549927,
0.20601888000965118,
0.7294602990150452,
-0.027380533516407013,
0.07398427277803421,
0.06865066289901733,
-0.6393170952796936,
-0.0544687956571579,
0.21481209993362427,
0.007433081045746803,
0.09006096422672272,
-0.009896393865346909,
-0.20865051448345184,
-0.282707154750824,
0.24239249527454376,
-0.1323133409023285,
0.10101615637540817,
-0.31497225165367126,
0.19020810723304749,
0.161448135972023,
0.249250590801239,
-0.10973535478115082,
0.0990716814994812,
-0.012795727699995041,
0.23401901125907898,
-0.14983145892620087,
-0.33034569025039673,
0.521776556968689,
-0.20002710819244385,
-0.2910715341567993,
-0.15048156678676605,
0.20611584186553955,
-0.05463743954896927,
-0.14991602301597595,
-0.40658867359161377,
0.11120045185089111,
0.3926159143447876,
-0.14109447598457336,
-0.37175965309143066,
0.4308154881000519,
0.158900648355484,
0.29581135511398315,
-0.07537175714969635,
0.12054537236690521,
0.25460895895957947,
-0.37321382761001587,
0.054065585136413574,
-0.1200055480003357
] |
https://github.com/huggingface/datasets/issues/6612 | Hi ! We recently updated `cnn_dailymail` and now `datasets>=2.14` is needed to load it.
You can update `datasets` with
```
pip install -U datasets
``` | cnn_dailymail repeats itself | ### Describe the bug
When I try to load `cnn_dailymail` dataset, it takes longer than usual and when I checked the dataset it's 3x bigger than it's supposed to be.
Check https://huggingface.co/datasets/cnn_dailymail: it says 287k rows for train. But when I check length of train split it says 861339.
Also I checked data:
```
>>> ds['train']['highlights'][0]
"Harry Potter star Daniel Radcliffe gets £20M fortune as he turns 18 Monday . Young actor says he has no plans to fritter his cash away . Radcliffe's earnings from first five Potter films have been held in trust fund ."````
>>> ds['train']['highlights'][0]
"Harry Potter star Daniel Radcliffe gets £20M fortune as he turns 18 Monday . Young actor says he has no plans to fritter his cash away . Radcliffe's earnings from first five Potter films have been held in trust fund ."````
>>> ds['train']['highlights'][287113]
"Harry Potter star Daniel Radcliffe gets £20M fortune as he turns 18 Monday .\nYoung actor says he has no plans to fritter his cash away .\nRadcliffe's earnings from first five Potter films have been held in trust fund ."````
>>> ds['train']['highlights'][574226]
"Harry Potter star Daniel Radcliffe gets £20M fortune as he turns 18 Monday .\nYoung actor says he has no plans to fritter his cash away .\nRadcliffe's earnings from first five Potter films have been held in trust fund ."
```
The datasets seems to be updated 6 days ago to convert it to Parquet. Probably, there is some issue with backward compatability.
### Steps to reproduce the bug
1.
```
from datasets import load_dataset
ds = load_dataset('cnn_dailymail', '3.0.0')
len(ds['train'])
```
### Expected behavior
It should not repeat itself.
### Environment info
datasets==2.13.2
Python==3.7.13 | 25 | cnn_dailymail repeats itself
### Describe the bug
When I try to load `cnn_dailymail` dataset, it takes longer than usual and when I checked the dataset it's 3x bigger than it's supposed to be.
Check https://huggingface.co/datasets/cnn_dailymail: it says 287k rows for train. But when I check length of train split it says 861339.
Also I checked data:
```
>>> ds['train']['highlights'][0]
"Harry Potter star Daniel Radcliffe gets £20M fortune as he turns 18 Monday . Young actor says he has no plans to fritter his cash away . Radcliffe's earnings from first five Potter films have been held in trust fund ."````
>>> ds['train']['highlights'][0]
"Harry Potter star Daniel Radcliffe gets £20M fortune as he turns 18 Monday . Young actor says he has no plans to fritter his cash away . Radcliffe's earnings from first five Potter films have been held in trust fund ."````
>>> ds['train']['highlights'][287113]
"Harry Potter star Daniel Radcliffe gets £20M fortune as he turns 18 Monday .\nYoung actor says he has no plans to fritter his cash away .\nRadcliffe's earnings from first five Potter films have been held in trust fund ."````
>>> ds['train']['highlights'][574226]
"Harry Potter star Daniel Radcliffe gets £20M fortune as he turns 18 Monday .\nYoung actor says he has no plans to fritter his cash away .\nRadcliffe's earnings from first five Potter films have been held in trust fund ."
```
The datasets seems to be updated 6 days ago to convert it to Parquet. Probably, there is some issue with backward compatability.
### Steps to reproduce the bug
1.
```
from datasets import load_dataset
ds = load_dataset('cnn_dailymail', '3.0.0')
len(ds['train'])
```
### Expected behavior
It should not repeat itself.
### Environment info
datasets==2.13.2
Python==3.7.13
Hi ! We recently updated `cnn_dailymail` and now `datasets>=2.14` is needed to load it.
You can update `datasets` with
```
pip install -U datasets
``` | [
0.07091876864433289,
-0.30874955654144287,
0.029564738273620605,
0.6589643955230713,
-0.008779346942901611,
0.07012949883937836,
0.4404844641685486,
-0.0358312763273716,
-0.12530618906021118,
0.07747453451156616,
0.24863269925117493,
0.3104359209537506,
-0.21459093689918518,
0.2979711890220642,
0.3054756224155426,
0.05363384634256363,
0.1306930035352707,
-0.08649490773677826,
-0.11007703840732574,
-0.20676517486572266,
-0.09162212908267975,
0.17983821034431458,
-0.21325966715812683,
-0.12247857451438904,
-0.4137269854545593,
-0.049061667174100876,
-0.03855118900537491,
0.2444792538881302,
0.10296639055013657,
-0.04431379586458206,
0.11743699014186859,
-0.4179801642894745,
0.0445447713136673,
0.6658532619476318,
-0.00012312580656725913,
-0.04416771978139877,
0.3004106283187866,
-0.08767740428447723,
-0.13747328519821167,
-0.02300398051738739,
0.0012644007802009583,
-0.021772343665361404,
0.24458834528923035,
-0.25590038299560547,
-0.11342653632164001,
-0.1274380385875702,
-0.3751666843891144,
-0.01565372198820114,
0.572087824344635,
0.4610203802585602,
0.11631831526756287,
0.04798630625009537,
0.10146397352218628,
0.018514297902584076,
0.02129462920129299,
-0.037191811949014664,
0.001144111156463623,
0.34161967039108276,
-0.23856770992279053,
0.10048684477806091,
0.12192541360855103,
0.20981554687023163,
0.06295499950647354,
-0.09629268944263458,
0.0851149708032608,
0.0949939414858818,
-0.07110307365655899,
-0.35644522309303284,
-0.04125123843550682,
0.23730023205280304,
0.20724791288375854,
-0.10961324721574783,
0.03931182622909546,
-0.18896055221557617,
0.13360470533370972,
-0.3640766739845276,
0.12014932930469513,
0.29832276701927185,
0.11634229868650436,
0.2062445431947708,
-0.2812454402446747,
0.14655935764312744,
-0.008776083588600159,
0.3072446584701538,
-0.41531872749328613,
-0.02828594669699669,
0.005662743002176285,
0.10418151319026947,
0.04568679630756378,
-0.25108230113983154,
0.5221536159515381,
-0.07600031048059464,
0.32098498940467834,
0.07440169900655746,
-0.36966055631637573,
0.10323679447174072,
0.07324831187725067,
0.018233299255371094,
0.07740575075149536,
0.03522560000419617,
0.009092889726161957,
-0.1273820698261261,
-0.05595269799232483,
-0.1543118804693222,
0.21757757663726807,
0.19021591544151306,
-0.3775182366371155,
0.2851598560810089,
-0.06485413014888763,
0.1728571504354477,
-0.220908984541893,
0.038532424718141556,
-0.14257512986660004,
0.22506996989250183,
0.25814899802207947,
-0.25045397877693176,
0.3715072572231293,
-0.08680886030197144,
-0.10883738100528717,
0.4031270444393158,
-0.34505558013916016,
0.020629163831472397,
0.13366679847240448,
0.33524438738822937,
-0.06493490934371948,
0.1428806185722351,
-0.0949224978685379,
-0.0783073902130127,
0.07231966406106949,
-0.20617665350437164,
-0.2451867163181305,
-0.08878139406442642,
-0.16390776634216309,
0.2221056967973709,
-0.020917251706123352,
-0.39861029386520386,
0.13141964375972748,
0.3385010361671448,
0.2918846309185028,
-0.5121597051620483,
-0.24153462052345276,
-0.018068037927150726,
0.006707102060317993,
0.18231555819511414,
-0.5644171237945557,
0.197359099984169,
0.18762408196926117,
0.2607892155647278,
-0.14954063296318054,
0.23510043323040009,
-0.40089741349220276,
-0.5087980031967163,
0.12070579081773758,
0.09839588403701782,
-0.11837900429964066,
-0.25639790296554565,
0.2045455276966095,
0.07547713816165924,
0.043851908296346664,
-0.09710228443145752,
0.07109149545431137,
-0.2855178713798523,
0.018560215830802917,
-0.06505457311868668,
0.037916719913482666,
0.2698952555656433,
-0.48949649930000305,
-0.0069030895829200745,
-0.1731247752904892,
0.16568990051746368,
0.3244878351688385,
0.3367026746273041,
-0.2535496652126312,
0.04323374480009079,
-0.3071763515472412,
-0.28241831064224243,
0.2997318506240845,
0.1430612951517105,
-0.5389732718467712,
-0.014072451740503311,
-0.19156807661056519,
0.3660052716732025,
-0.0425880067050457,
0.12303201854228973,
-0.04227754473686218,
0.23540431261062622,
0.25055527687072754,
0.47181186079978943,
-0.08759589493274689,
0.024653807282447815,
-0.36940672993659973,
-0.3506869375705719,
0.3640548288822174,
0.23517093062400818,
0.1991230547428131,
0.18332967162132263,
-0.05733538419008255,
0.011147048324346542,
0.2868237793445587,
0.04321698099374771,
-0.34774279594421387,
-0.049943193793296814,
0.028188444674015045,
0.2448592334985733,
0.37707895040512085,
-0.1369662880897522,
-0.30478644371032715,
-0.021621182560920715,
0.052403807640075684,
-0.01354914903640747,
0.2603365182876587,
-0.1964433193206787,
-0.40983453392982483,
-0.002920307219028473,
-0.10958836227655411,
0.02854570746421814,
-0.010949522256851196,
0.05746877193450928,
-0.15016219019889832,
0.037626542150974274,
-0.23282252252101898,
0.42361539602279663,
-0.314441055059433,
0.11594803631305695,
-0.43389204144477844,
0.3650038242340088,
-0.005285442806780338,
0.0011165961623191833,
-0.03528923913836479,
0.30749276280403137,
0.3275769352912903,
-0.1924176663160324,
-0.012990167364478111,
0.056308262050151825,
0.21359556913375854,
0.016304679214954376,
-0.3194931745529175,
-0.05940215289592743,
0.23176288604736328,
-0.01988638937473297,
0.11815867573022842,
0.49514660239219666,
0.0709642767906189,
-0.15963827073574066,
0.06587331742048264,
0.24064409732818604,
0.20090103149414062,
-0.007908724248409271,
-0.051638975739479065,
-0.18945905566215515,
-0.01679162308573723,
-0.05599241331219673,
0.002290673553943634,
-0.13779689371585846,
0.23015429079532623,
-0.4028977155685425,
0.42264077067375183,
0.10273277014493942,
-0.5742029547691345,
0.15062910318374634,
0.28623175621032715,
-0.24473533034324646,
0.13585829734802246,
0.28183189034461975,
-0.32324856519699097,
-0.15083788335323334,
-0.2745553255081177,
0.15937352180480957,
0.3054322898387909,
0.08933096379041672,
0.1286192238330841,
0.20438987016677856,
-0.03450485318899155,
-0.1685175597667694,
0.14181452989578247,
-0.0757179856300354,
0.39505264163017273,
0.35621222853660583,
0.2499430924654007,
0.058217037469148636,
-0.45024487376213074,
-0.04719332605600357,
0.0941365510225296,
0.2903730273246765,
-0.29746213555336,
0.25717270374298096,
-0.43391191959381104,
0.014963604509830475,
-0.3839953541755676,
-0.33444109559059143,
-0.13006724417209625,
-0.1778993457555771,
0.00605514831840992,
-0.054341528564691544,
0.01923980563879013,
-0.10076741129159927,
0.13429267704486847,
0.4246813952922821,
0.2112618386745453,
-0.018692929297685623,
-0.05393712595105171,
-0.04804747924208641,
-0.3623034358024597,
-0.019423658028244972,
0.07093124091625214,
-0.20952409505844116,
0.196689635515213,
-0.09658822417259216,
-0.11447490751743317,
-0.18711358308792114,
-0.5993287563323975,
0.25089335441589355,
0.15910707414150238,
0.34259042143821716,
-0.003777347505092621,
0.20747779309749603,
0.20446588099002838,
0.07810287922620773,
-0.02039717510342598,
-0.11787717044353485,
0.050098665058612823,
0.06821055710315704,
-0.06797251105308533,
0.15451931953430176,
0.040377914905548096,
-0.45362845063209534,
-0.35800594091415405,
-0.1016944944858551,
0.23189416527748108,
-0.09731174260377884,
0.16477593779563904,
0.3584853410720825,
-0.05078379809856415,
0.09401807188987732,
-0.051345065236091614,
0.27211615443229675,
-0.48236921429634094,
-0.29563331604003906,
0.35050880908966064,
-0.04685043543577194,
-0.3853846788406372,
-0.06904353201389313,
-0.12731429934501648,
-0.4313541352748871,
-0.2226582169532776,
-0.8766411542892456,
-0.3904297351837158,
-0.24311946332454681,
-0.3873615562915802,
-0.12741121649742126,
-0.07711252570152283,
-0.01819669082760811,
-0.4009329378604889,
0.06357717514038086,
0.035059235990047455,
-0.24280205368995667,
-0.13052941858768463,
0.21884573996067047,
0.1451805830001831,
0.03163551911711693,
0.6921167969703674,
-0.2659691572189331,
0.1700054258108139,
0.4784142076969147,
-0.16129498183727264,
0.1283915638923645,
-0.2781670093536377,
0.13922223448753357,
-0.12366367876529694,
-0.19258104264736176,
-0.24487429857254028,
-0.08025674521923065,
-0.48543494939804077,
0.42370301485061646,
-0.19995936751365662,
-0.3469904363155365,
0.01762949675321579,
-0.17645305395126343,
-0.2062062919139862,
-0.19454312324523926,
0.1253267228603363,
0.20145292580127716,
0.05319196730852127,
0.21659113466739655,
0.05051784962415695,
0.00156412273645401,
-0.2692239582538605,
-0.06705590337514877,
-0.009452339261770248,
0.08333481848239899,
-0.01262093335390091,
0.12946641445159912,
0.000988401472568512,
-0.2976714074611664,
0.1895907074213028,
-0.07901562005281448,
0.325949102640152,
0.01451302319765091,
-0.08229685574769974,
0.23718488216400146,
-0.08439469337463379,
0.7047765254974365,
-0.04166235774755478,
-0.011201521381735802,
0.006700307130813599,
-0.03273565322160721,
-0.2745833992958069,
-0.30805742740631104,
-0.1508035957813263,
-0.23563635349273682,
0.26963409781455994,
0.5698649883270264,
-0.03085280954837799,
0.1467299610376358,
0.8113783001899719,
0.46613410115242004,
-0.19492289423942566,
-0.47400519251823425,
-0.24373731017112732,
-0.11986814439296722,
-0.07253237813711166,
0.21438363194465637,
-0.1254889965057373,
0.28574004769325256,
-0.026057254523038864,
-0.22979357838630676,
-0.12343951314687729,
-0.005357205867767334,
0.27353525161743164,
0.0918184369802475,
0.48924338817596436,
0.14489193260669708,
0.14918756484985352,
0.07253581285476685,
0.025508012622594833,
0.0330575630068779,
0.949273943901062,
-0.06612697243690491,
-0.20363284647464752,
0.08284512162208557,
-0.04043574631214142,
0.13604632019996643,
0.7006643414497375,
-0.1173020601272583,
-0.280385822057724,
-0.005111446604132652,
0.39235028624534607,
-0.1076284870505333,
-0.09462196379899979,
0.39484795928001404,
0.04006165638566017,
-0.5548852682113647,
-0.39894193410873413,
0.5295466184616089,
0.10211575031280518,
0.09965921938419342,
0.020349329337477684,
-0.2385527789592743,
-0.0911032110452652,
0.2833150625228882,
-0.26001787185668945,
1.171648383140564,
0.11078669130802155,
0.14318929612636566,
0.3639374077320099,
0.09161990880966187,
0.2121443897485733,
-0.4990886449813843,
-0.03625369817018509,
-0.4104028046131134,
-0.5198696255683899,
-0.06945671886205673,
-0.14416788518428802,
-0.10294795036315918,
0.3287149965763092,
-0.07062946259975433,
0.2540971040725708,
-0.20675374567508698,
0.3763100802898407,
0.010304398834705353,
0.2663072347640991,
0.1850578337907791,
0.32887575030326843,
-0.3079093396663666,
0.03245379030704498,
0.06051629036664963,
-0.12574928998947144,
-0.08229561895132065,
0.19417834281921387,
0.008591659367084503,
-0.23216496407985687,
-0.2920360267162323,
0.1709311157464981,
-0.16858331859111786,
0.027200348675251007,
0.07641836255788803,
-0.33318275213241577,
-0.09554967284202576,
-0.14249716699123383,
-0.015573401004076004,
0.05384962633252144,
-0.04406559839844704,
-0.017208918929100037,
0.01940438523888588,
0.020536962896585464,
-0.19504475593566895,
-0.09302219748497009,
0.3006304204463959,
0.10109163820743561,
-0.2698347866535187,
-0.08535126596689224,
0.051075540482997894,
-0.10893785953521729,
-0.23796020448207855,
0.4375118613243103,
-0.007235994562506676,
-0.3467489182949066,
-0.3565449118614197,
0.04347342997789383,
0.18211159110069275,
-0.10911659151315689,
0.05930197238922119,
-0.1851021945476532,
-0.03833100572228432,
0.08944027125835419,
0.061452772468328476,
-0.5133081674575806,
-0.2850494980812073,
0.06279583275318146,
0.36861246824264526,
0.025040507316589355,
0.2525217831134796,
0.5245646834373474,
-0.1529647409915924,
-0.15641847252845764,
0.15695954859256744,
0.3750365674495697,
-0.4534156918525696,
0.1802423894405365,
-0.16501083970069885,
0.082193523645401,
0.12204708158969879,
0.13779470324516296,
0.15215641260147095,
0.09208253026008606,
-0.3194452226161957,
-0.43194931745529175,
0.20678913593292236,
0.133768692612648,
0.18491046130657196,
0.35541751980781555,
0.15106041729450226,
0.06046644598245621,
0.014592818915843964,
0.035013288259506226,
-0.2155795693397522,
0.3290919363498688,
0.1431845724582672,
0.06022631376981735,
-0.027742501348257065,
-0.12283022701740265,
0.39095696806907654,
0.12707266211509705,
0.008093804121017456,
0.15978498756885529,
0.024486083537340164,
-0.19175246357917786,
-0.12402749806642532,
0.19555161893367767,
0.048475392162799835,
0.24457886815071106,
-0.085511215031147,
-0.22877493500709534,
-0.022430583834648132,
-0.18277564644813538,
0.36451321840286255,
0.08666734397411346,
0.2787637412548065,
-0.10124142467975616,
0.3971518278121948,
-0.24571412801742554,
-0.10210729390382767,
-0.08054009079933167,
-0.06948719918727875,
0.43343064188957214,
0.17162469029426575,
0.12127833068370819,
-0.06283895671367645,
0.10608294606208801,
-0.265703409910202,
0.06927964091300964,
0.24042876064777374,
-0.0993068516254425,
0.3200376629829407,
-0.3391519784927368,
-0.15097695589065552,
0.3434692621231079,
0.21751669049263,
0.5994464755058289,
-0.36847612261772156,
-0.2108842432498932,
-0.007714029401540756,
0.048016346991062164,
-0.4540727436542511,
-0.16882261633872986,
0.2425508052110672,
0.15621806681156158,
-0.1230357438325882,
0.3331424593925476,
0.030897274613380432,
0.08865021169185638,
-0.20077015459537506,
0.0007324814796447754,
0.37002748250961304,
0.0817176103591919,
0.4372554421424866,
0.07456705719232559,
-0.13080817461013794,
-0.11784482002258301,
0.3167073726654053,
-0.07788506895303726,
0.04339032992720604,
0.3725701570510864,
0.03772401064634323,
-0.08980551362037659,
0.18433183431625366,
0.15015286207199097,
0.2503678798675537,
-0.18660099804401398,
0.3668421506881714,
0.425833135843277,
-0.15428805351257324,
0.05092005804181099,
0.21263764798641205,
0.23702460527420044,
0.164886936545372,
-0.013482596725225449,
-0.490346759557724,
0.15930303931236267,
-0.07425783574581146,
0.26192760467529297,
0.6008666157722473,
-0.19644902646541595,
-0.2595137357711792,
0.156072735786438,
-0.09392645210027695,
-0.1512077897787094,
0.09846850484609604,
0.2502426207065582,
-0.10540177673101425,
-0.3993738293647766,
-0.1621599644422531,
0.20184370875358582,
0.16364838182926178,
-0.36530712246894836,
0.37298524379730225,
0.18401026725769043,
-0.16873452067375183,
0.030647646635770798,
0.30357253551483154,
0.2504827678203583,
0.41476696729660034,
0.15353788435459137,
0.2641562223434448,
0.09658987075090408,
-0.009089462459087372,
0.12883360683918,
0.10370251536369324,
0.18421681225299835,
0.023706629872322083,
0.16018441319465637,
0.04610287770628929,
-0.17901566624641418,
-0.05890991538763046,
0.07471556961536407,
0.19118346273899078,
-0.6860353350639343,
0.3527429401874542,
-0.1834283471107483,
0.21704888343811035,
-0.29175251722335815,
-0.055190347135066986,
-0.697516679763794,
0.02467988431453705,
0.5677510499954224,
-0.0005970709025859833,
0.11688341200351715,
0.03998490050435066,
0.022945061326026917,
-0.280515193939209,
0.45243772864341736,
0.20641225576400757,
0.17414364218711853,
-0.0942591056227684,
-0.11243581771850586,
-0.5129657983779907,
0.4343896210193634,
-0.3700419068336487,
0.1459537148475647,
0.32947829365730286,
0.03833357244729996,
-0.09145575761795044,
0.10067882388830185,
0.21756109595298767,
0.08269678056240082,
-0.33806997537612915,
0.10693491250276566,
-0.3481619656085968,
-0.09546057879924774,
0.093587726354599,
-0.10999565571546555,
0.047975942492485046,
-0.22639703750610352,
0.24900661408901215,
-0.6456295847892761,
-0.12491059303283691,
-0.01133937481790781,
-0.2933083772659302,
-0.24655674397945404,
0.0006144046783447266,
0.3965510427951813,
0.2241821587085724,
0.38018471002578735,
0.12770402431488037,
-0.05343349650502205,
-0.34915632009506226,
-0.2968333959579468,
-0.08704113960266113,
0.6270378232002258,
0.1287180483341217,
0.058284610509872437,
-0.019466619938611984,
-0.5059758424758911,
-0.1233540028333664,
0.037877026945352554,
0.10051339864730835,
-0.2661372423171997,
-0.25895360112190247,
-0.06505582481622696,
-0.17259395122528076,
0.26208004355430603,
0.05382920801639557,
0.4507704973220825,
-0.019040115177631378,
0.2587997317314148,
0.42917945981025696,
-0.573125958442688,
0.4212651550769806,
-0.341481477022171,
-0.3234770596027374,
-0.05362546071410179,
0.14565908908843994,
0.08463013172149658,
-0.034675970673561096,
-0.6067806482315063,
0.03683073818683624,
0.2611530125141144,
-0.0157450120896101,
0.01225656270980835,
0.30080536007881165,
0.01615368202328682,
-0.00006336718797683716,
-0.14167368412017822,
0.3824862241744995,
0.41562849283218384,
-0.20309002697467804,
0.06270169466733932,
-0.2671525478363037
] |
https://github.com/huggingface/datasets/issues/6610 | Hi! You are passing the wrong feature type to `cast_column`. This is the fixed call:
```python
ais_dataset = ais_dataset.cast_column("my_labeled_bbox", {"bbox": Sequence(Value(dtype="int64")), "label": ClassLabel(names=["cat", "dog"])})
``` | cast_column to Sequence(subfeatures_dict) has err | ### Describe the bug
I am working with the following demo code:
```
from datasets import load_dataset
from datasets.features import Sequence, Value, ClassLabel, Features
ais_dataset = load_dataset("/data/ryan.gao/ais_dataset_cache/raw/1978/")
ais_dataset = ais_dataset["train"]
def add_class(example):
example["my_labeled_bbox"] = {"bbox": [100,100,200,200], "label": "cat"}
return example
ais_dataset = ais_dataset.map(add_class, batched=False, num_proc=32)
ais_dataset = ais_dataset.cast_column("my_labeled_bbox", Sequence(
{
"bbox": Sequence(Value(dtype="int64")),
"label": ClassLabel(names=["cat", "dog"])
}))
print(ais_dataset[0])
```
However, executing this code results in an error:
```
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2111, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}")
TypeError: Couldn't cast array of type
int64
to
Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None)
```
Upon examining the source code in datasets/table.py at line 2035:
```
if isinstance(feature, Sequence) and isinstance(feature.feature, dict):
feature = {
name: Sequence(subfeature, length=feature.length) for name, subfeature in feature.feature.items()
}
```
I noticed that if subfeature is of type Sequence, the code results in Sequence(Sequence(...), ...) and Sequence(ClassLabel(...), ...), which appears to be the source of the error.
### Steps to reproduce the bug
run my demo code
### Expected behavior
no exception
### Environment info
python 3.9
datasets: 2.16.1 | 25 | cast_column to Sequence(subfeatures_dict) has err
### Describe the bug
I am working with the following demo code:
```
from datasets import load_dataset
from datasets.features import Sequence, Value, ClassLabel, Features
ais_dataset = load_dataset("/data/ryan.gao/ais_dataset_cache/raw/1978/")
ais_dataset = ais_dataset["train"]
def add_class(example):
example["my_labeled_bbox"] = {"bbox": [100,100,200,200], "label": "cat"}
return example
ais_dataset = ais_dataset.map(add_class, batched=False, num_proc=32)
ais_dataset = ais_dataset.cast_column("my_labeled_bbox", Sequence(
{
"bbox": Sequence(Value(dtype="int64")),
"label": ClassLabel(names=["cat", "dog"])
}))
print(ais_dataset[0])
```
However, executing this code results in an error:
```
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2111, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}")
TypeError: Couldn't cast array of type
int64
to
Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None)
```
Upon examining the source code in datasets/table.py at line 2035:
```
if isinstance(feature, Sequence) and isinstance(feature.feature, dict):
feature = {
name: Sequence(subfeature, length=feature.length) for name, subfeature in feature.feature.items()
}
```
I noticed that if subfeature is of type Sequence, the code results in Sequence(Sequence(...), ...) and Sequence(ClassLabel(...), ...), which appears to be the source of the error.
### Steps to reproduce the bug
run my demo code
### Expected behavior
no exception
### Environment info
python 3.9
datasets: 2.16.1
Hi! You are passing the wrong feature type to `cast_column`. This is the fixed call:
```python
ais_dataset = ais_dataset.cast_column("my_labeled_bbox", {"bbox": Sequence(Value(dtype="int64")), "label": ClassLabel(names=["cat", "dog"])})
``` | [
-0.06808836758136749,
-0.2487647533416748,
-0.06157679110765457,
0.015728870406746864,
0.5308369398117065,
0.24775570631027222,
0.4921039938926697,
0.2797868847846985,
0.1971459835767746,
-0.10834231972694397,
0.1848737597465515,
0.22724923491477966,
-0.12083391845226288,
0.37863239645957947,
-0.17962826788425446,
-0.20303714275360107,
0.45531246066093445,
-0.1145128682255745,
-0.00831269845366478,
0.10106025636196136,
-0.4560483396053314,
0.13075873255729675,
-0.5421671867370605,
0.22616799175739288,
0.002655141055583954,
-0.08513116836547852,
0.0513610765337944,
-0.3677842617034912,
-0.005814878270030022,
-0.3511534631252289,
0.44177645444869995,
-0.29729095101356506,
0.28920087218284607,
0.21175432205200195,
-0.00011738636385416612,
-0.058872126042842865,
0.4586848020553589,
0.07760418951511383,
-0.007284343242645264,
0.2057163119316101,
-0.46142998337745667,
-0.04128365218639374,
0.14486081898212433,
-0.48795273900032043,
-0.17643360793590546,
-0.09116078168153763,
-0.24718979001045227,
-0.31751519441604614,
-0.029161617159843445,
0.4845074415206909,
0.1776687055826187,
0.023762978613376617,
0.1587362289428711,
-0.03562360256910324,
0.15870821475982666,
-0.1779380738735199,
-0.25314509868621826,
-0.12773089110851288,
0.06752198934555054,
0.1961895376443863,
0.37535446882247925,
0.27778974175453186,
-0.14723268151283264,
-0.22666890919208527,
0.25519371032714844,
0.09153101593255997,
0.3564312756061554,
-0.32912418246269226,
-0.18674078583717346,
-0.09699307382106781,
0.5523717999458313,
-0.30875420570373535,
-0.32380473613739014,
-0.09832432121038437,
0.06321723759174347,
-0.18071383237838745,
0.039893362671136856,
-0.12652373313903809,
0.17301474511623383,
0.13375137746334076,
-0.23768754303455353,
0.4584795832633972,
0.010743014514446259,
0.12276172637939453,
-0.0925288200378418,
0.09065555036067963,
-0.12914304435253143,
0.09180542826652527,
-0.2091226875782013,
-0.46022236347198486,
-0.014874404296278954,
-0.028833866119384766,
0.00989492703229189,
0.14415161311626434,
-0.5307452082633972,
-0.2496882677078247,
-0.16735167801380157,
-0.07400434464216232,
-0.2047119140625,
0.031552087515592575,
-0.028105052188038826,
0.011468756943941116,
0.11374804377555847,
-0.11381567269563675,
0.2982642650604248,
0.2509405016899109,
-0.05097457766532898,
0.11632193624973297,
-0.221681147813797,
0.33291566371917725,
-0.0015030354261398315,
0.09255906939506531,
0.12232515960931778,
-0.14826661348342896,
0.17545196413993835,
0.20997032523155212,
0.24493032693862915,
-0.20351089537143707,
-0.2391240894794464,
0.2929682433605194,
-0.06639169901609421,
0.10429394245147705,
0.16493962705135345,
0.20326322317123413,
-0.03629555180668831,
0.2116217315196991,
0.0951438695192337,
0.35680368542671204,
0.03537894785404205,
-0.014188740402460098,
-0.2049705684185028,
0.12317833304405212,
-0.05365276336669922,
-0.24674737453460693,
-0.32298383116722107,
0.3856528699398041,
-0.1276218295097351,
0.00603128969669342,
-0.16822367906570435,
-0.13033902645111084,
-0.2818971276283264,
-0.1579139530658722,
0.05390574783086777,
0.282036691904068,
-0.27404022216796875,
0.24515140056610107,
0.21307598054409027,
0.053855568170547485,
-0.12285945564508438,
0.11113984882831573,
-0.1999775916337967,
-0.1039351373910904,
-0.17556843161582947,
0.2001296728849411,
-0.010821472853422165,
0.12495939433574677,
-0.25226256251335144,
-0.16537560522556305,
0.6826184391975403,
-0.19710561633110046,
0.27707168459892273,
-0.4943487346172333,
-0.45412808656692505,
-0.23627996444702148,
0.03270137310028076,
0.03083498775959015,
0.0038270577788352966,
0.15706007182598114,
0.004674237221479416,
-0.007444359362125397,
0.20098572969436646,
0.07309876382350922,
0.2264138013124466,
0.06689687073230743,
-0.25887352228164673,
0.15128293633460999,
0.2805543541908264,
-0.08322835713624954,
-0.11638861894607544,
0.2315317988395691,
-0.0007098540663719177,
-0.0560171976685524,
0.12749658524990082,
0.3574582636356354,
0.27597182989120483,
-0.4208102524280548,
0.054883360862731934,
0.34745168685913086,
-0.07318193465471268,
0.13789215683937073,
-0.11799125373363495,
-0.20120084285736084,
-0.014824191108345985,
0.06351827085018158,
-0.16776908934116364,
0.4127453565597534,
-0.01597164198756218,
-0.09603367745876312,
0.09711899608373642,
-0.10882223397493362,
0.12624436616897583,
0.1776353418827057,
0.12705174088478088,
0.20655906200408936,
0.05050762742757797,
-0.48121732473373413,
-0.21166837215423584,
0.05106481909751892,
0.4298551678657532,
-0.19655729830265045,
-0.24697619676589966,
-0.2032795399427414,
-0.2611616253852844,
0.14929673075675964,
-0.23712977766990662,
0.5411095023155212,
0.03218052536249161,
-0.19199423491954803,
0.0902061015367508,
-0.07335725426673889,
-0.08625375479459763,
0.3487264811992645,
-0.25937020778656006,
0.03220651298761368,
-0.6131832003593445,
0.15599852800369263,
-0.08316486328840256,
-0.15312987565994263,
-0.1035843938589096,
0.2659054696559906,
0.24906863272190094,
-0.04204713553190231,
-0.08291254192590714,
0.2848362624645233,
0.2443033903837204,
-0.2559356093406677,
-0.6009728908538818,
0.17081958055496216,
0.00390002503991127,
-0.35907062888145447,
-0.1682324856519699,
0.23887059092521667,
0.12276704609394073,
-0.0745696946978569,
-0.033960215747356415,
0.4081633388996124,
0.01374838873744011,
0.37667861580848694,
-0.13140076398849487,
0.16135036945343018,
0.06942804157733917,
0.008850879967212677,
-0.10221011936664581,
-0.36922866106033325,
-0.0766831561923027,
-0.1037919819355011,
-0.35436514019966125,
0.017155872657895088,
-0.18537789583206177,
0.260884165763855,
0.33944812417030334,
-0.132501482963562,
0.1232088953256607,
0.10592412948608398,
0.04923425614833832,
0.07510504126548767,
0.0070479195564985275,
0.13116583228111267,
0.26086950302124023,
-0.05056000128388405,
-0.08605353534221649,
0.03170199692249298,
-0.17347174882888794,
-0.002243656665086746,
0.16863131523132324,
0.2705605626106262,
0.017217207700014114,
-0.07015527039766312,
0.07919000089168549,
0.05130869150161743,
0.19997988641262054,
-0.11892509460449219,
0.025117889046669006,
0.18753467500209808,
-0.48895543813705444,
0.27232038974761963,
-0.3111679255962372,
-0.3265632688999176,
-0.04258608818054199,
-0.18927708268165588,
0.40509554743766785,
-0.5430177450180054,
-0.3550184965133667,
0.1872224658727646,
-0.2666431665420532,
0.15441381931304932,
-0.4146047830581665,
-0.3434278070926666,
0.41224542260169983,
-0.16517187654972076,
-0.02959194779396057,
0.0400007963180542,
0.0384037084877491,
0.04045715555548668,
0.08588866889476776,
0.206619530916214,
0.00440734438598156,
0.010921105742454529,
-0.17654183506965637,
-0.19035977125167847,
-0.1978813111782074,
-0.052235059440135956,
-0.18780051171779633,
-0.05741559714078903,
0.3934016525745392,
0.034555092453956604,
0.10697897523641586,
-0.3361693322658539,
0.17553317546844482,
0.0645551085472107,
-0.16767539083957672,
0.45929983258247375,
0.014407575130462646,
-0.19480785727500916,
-0.14357531070709229,
-0.12693503499031067,
-0.15483762323856354,
-0.3410121202468872,
-0.1111561506986618,
0.15717530250549316,
-0.016347624361515045,
0.03270888328552246,
0.14359880983829498,
-0.06298819929361343,
0.31841209530830383,
0.04117825627326965,
-0.1580977588891983,
0.5138845443725586,
0.3593284785747528,
0.025807473808526993,
-0.22918637096881866,
-0.10154445469379425,
-0.3829144835472107,
-0.08110678941011429,
0.07827708125114441,
-0.17007409036159515,
-0.08878026902675629,
-0.33136576414108276,
-0.016372621059417725,
0.08408719301223755,
-0.15590718388557434,
0.1806378811597824,
0.03007485345005989,
0.0064188167452812195,
0.031747788190841675,
0.10995253920555115,
0.012076795101165771,
0.19439798593521118,
-0.006692614406347275,
0.2650524377822876,
0.6776396632194519,
-0.020870961248874664,
-0.12523704767227173,
0.23852479457855225,
-0.3719642162322998,
0.386991411447525,
-0.0935339629650116,
-0.06673990935087204,
-0.32395344972610474,
-0.1326434314250946,
-0.09975315630435944,
-0.16003689169883728,
-0.16695481538772583,
0.043619997799396515,
-0.21349553763866425,
-0.21219389140605927,
0.2186306118965149,
0.3325081467628479,
0.1278596818447113,
-0.08142361044883728,
-0.06625157594680786,
-0.33663448691368103,
0.13236674666404724,
-0.12900707125663757,
0.07527199387550354,
-0.08559839427471161,
-0.07704252004623413,
0.06004250422120094,
0.05257848650217056,
-0.0031239762902259827,
-0.14119940996170044,
-0.5155323147773743,
-0.34130173921585083,
0.08342438191175461,
0.21141549944877625,
0.40697595477104187,
0.6117774844169617,
0.05665142834186554,
-0.20527276396751404,
-0.02240581065416336,
0.1272982656955719,
0.4906632900238037,
-0.39227843284606934,
0.05705418437719345,
0.34156471490859985,
0.33332493901252747,
-0.2560831308364868,
-0.3116447329521179,
-0.06099459156394005,
-0.14280728995800018,
0.18659237027168274,
0.18043072521686554,
0.005644083023071289,
0.05176122114062309,
0.522213876247406,
0.20469999313354492,
-0.1322261393070221,
-0.09381841123104095,
-0.22787564992904663,
-0.364429771900177,
-0.19606345891952515,
0.1429276317358017,
0.36865782737731934,
0.2278740108013153,
0.021211691200733185,
-0.16177773475646973,
-0.3132176101207733,
-0.16007870435714722,
-0.1332390010356903,
-0.10959688574075699,
0.2317185252904892,
-0.028123799711465836,
0.4735446870326996,
-0.4262405335903168,
-0.12815411388874054,
-0.016624299809336662,
0.2625059485435486,
-0.008590641431510448,
-0.21203777194023132,
0.1214112937450409,
-0.1138145700097084,
0.19883675873279572,
-0.014451861381530762,
-0.24001334607601166,
0.1092851310968399,
-0.08738957345485687,
0.20140478014945984,
-0.1760309934616089,
-0.3989860415458679,
0.43602293729782104,
0.08219315111637115,
-0.4388866126537323,
-0.6548398733139038,
0.42959386110305786,
0.11932867765426636,
-0.14200769364833832,
-0.22540119290351868,
0.19127076864242554,
-0.20124167203903198,
0.6755138039588928,
0.15376728773117065,
0.7638531923294067,
-0.003505626693367958,
-0.032132841646671295,
0.39784273505210876,
0.24407222867012024,
0.5097075700759888,
0.3865019679069519,
0.0747486874461174,
-0.38590192794799805,
-0.48017746210098267,
-0.13188055157661438,
-0.1946069747209549,
0.020544514060020447,
-0.08654138445854187,
-0.17587681114673615,
0.35646072030067444,
-0.47854626178741455,
0.46895453333854675,
-0.016364287585020065,
-0.28813743591308594,
0.24119272828102112,
-0.1660158485174179,
-0.07890255004167557,
0.13315308094024658,
0.2520860731601715,
-0.13375118374824524,
0.1460021734237671,
-0.07233836501836777,
-0.05337061360478401,
-0.05683860182762146,
-0.17651376128196716,
0.20989811420440674,
0.2240164577960968,
0.1576956957578659,
-0.01404564082622528,
0.013438999652862549,
0.2508254647254944,
0.586375892162323,
0.652492344379425,
-0.0786767303943634,
0.09737295657396317,
-0.06850934773683548,
0.42275646328926086,
0.13743704557418823,
0.08084375411272049,
-0.0912618339061737,
0.40088358521461487,
0.0400155708193779,
0.08755223453044891,
0.018267786130309105,
0.14705850183963776,
-0.1945425271987915,
0.09170836210250854,
0.07343631982803345,
0.20447255671024323,
-0.586951494216919,
-0.5745348930358887,
-0.1693345606327057,
0.07591891288757324,
-0.17704929411411285,
0.10339528322219849,
-0.17318861186504364,
-0.18377403914928436,
0.35346201062202454,
-0.2644927203655243,
-0.06777309626340866,
-0.07742848992347717,
0.3250434994697571,
0.38281184434890747,
0.168799489736557,
0.2431149184703827,
0.3029285669326782,
-0.19340088963508606,
-0.09265413135290146,
-0.16585710644721985,
0.24587848782539368,
-0.36053359508514404,
0.022834714502096176,
-0.25910279154777527,
-0.16412313282489777,
-0.035886138677597046,
0.3794012665748596,
-0.15381117165088654,
0.11588971316814423,
-0.16496148705482483,
-0.2727595269680023,
-0.33115777373313904,
0.28607410192489624,
0.06790027022361755,
0.05953213572502136,
-0.30115199089050293,
0.06601212918758392,
-0.2990875840187073,
-0.37317556142807007,
-0.21354669332504272,
-0.20872101187705994,
-0.45759886503219604,
0.20788688957691193,
0.31281572580337524,
0.1282767653465271,
-0.07639601826667786,
0.034812044352293015,
0.16146929562091827,
0.2502617835998535,
-0.1277592033147812,
-0.11694379150867462,
-0.05289082229137421,
0.08742623776197433,
0.11190693825483322,
0.0315733402967453,
-0.11526981741189957,
-0.13715681433677673,
-0.22249285876750946,
-0.2403373122215271,
-0.16784486174583435,
0.18403050303459167,
0.13610269129276276,
-0.07554789632558823,
0.22506383061408997,
-0.05076402425765991,
-0.09847472608089447,
0.2819129228591919,
-0.2615627944469452,
0.0023455843329429626,
-0.19110429286956787,
0.22824734449386597,
-0.16628819704055786,
0.032632142305374146,
-0.18137232959270477,
0.07909227162599564,
-0.19055332243442535,
-0.13942822813987732,
0.4571135342121124,
-0.30556392669677734,
-0.0532291978597641,
0.36160942912101746,
0.25304800271987915,
0.12218174338340759,
-0.4277443289756775,
-0.33371037244796753,
-0.06380301713943481,
0.1377483755350113,
-0.24137160181999207,
-0.33271634578704834,
0.011199109256267548,
-0.022472089156508446,
-0.06818775832653046,
0.3327934145927429,
0.14056158065795898,
-0.025846146047115326,
0.1967201828956604,
0.10498006641864777,
0.44823816418647766,
-0.20835068821907043,
0.15596745908260345,
0.4426133334636688,
0.18179862201213837,
0.0792798101902008,
0.202483132481575,
-0.006801063194870949,
0.23588666319847107,
0.6808600425720215,
0.10454191267490387,
0.022035567089915276,
0.6017282009124756,
-0.03576049953699112,
0.13030095398426056,
-0.15003536641597748,
0.2510480582714081,
0.4171715974807739,
-0.26654884219169617,
0.11819545924663544,
0.32469385862350464,
-0.3883427381515503,
-0.21624624729156494,
-0.26103031635284424,
-0.1309763491153717,
-0.028358351439237595,
-0.20678022503852844,
0.0937865674495697,
-0.08714868128299713,
0.06192809343338013,
-0.2388438582420349,
-0.3109055757522583,
-0.26047950983047485,
0.06801921874284744,
0.4278905987739563,
-0.04616678133606911,
0.22539210319519043,
-0.09919527173042297,
-0.12067361176013947,
0.10567036271095276,
0.2462470978498459,
-0.2701084613800049,
0.2651267945766449,
0.039760615676641464,
-0.0663340762257576,
0.2889159917831421,
-0.05455624312162399,
0.4946942925453186,
0.3373679220676422,
0.0813964456319809,
0.04618882015347481,
0.15272018313407898,
-0.28538888692855835,
0.1692904680967331,
0.12225279957056046,
-0.0792621448636055,
0.3430073857307434,
0.17739281058311462,
0.09831468760967255,
-0.09012337774038315,
0.1846918910741806,
0.08077973127365112,
0.376458078622818,
-0.15016689896583557,
0.8576192855834961,
-0.32477983832359314,
-0.3237677216529846,
-0.10991185158491135,
0.2954142987728119,
-0.33696654438972473,
0.15156112611293793,
0.040612198412418365,
-0.1525590717792511,
0.284841924905777,
0.3174484968185425,
0.054922617971897125,
-0.0027476344257593155,
0.33586397767066956,
0.23145388066768646,
0.04803628474473953,
-0.15755268931388855,
-0.036672309041023254,
-0.3513526916503906,
0.04393991082906723,
0.14040052890777588,
0.07111849635839462,
0.5474023222923279,
0.007064253091812134,
-0.10651279985904694,
0.0653420016169548,
-0.022309936583042145,
0.012262348085641861,
-0.17657791078090668,
0.5699431896209717,
-0.025735221803188324,
-0.3555871248245239,
0.15929335355758667,
0.062474921345710754,
-0.11857366561889648,
-0.523626983165741,
0.32110893726348877,
-0.17645210027694702,
0.10854868590831757,
0.06731364130973816,
-0.050766002386808395,
-0.12445651739835739,
-0.4083528220653534,
0.1480761617422104,
0.07148583978414536,
0.2633976340293884,
-0.06265881657600403,
-0.05904819071292877,
-0.06600797176361084,
-0.28208163380622864,
-0.18913502991199493,
0.3922150731086731,
-0.16554492712020874,
0.5063091516494751,
-0.03729310631752014,
0.42549586296081543,
-0.12583641707897186,
-0.013712722808122635,
0.13278482854366302,
0.009183462709188461,
-0.42155665159225464,
0.38789159059524536,
-0.36770209670066833,
0.33490121364593506,
0.2880419194698334,
-0.08691826462745667,
0.16874703764915466,
0.4514351487159729,
0.08169373869895935,
-0.6409966349601746,
0.5401331186294556,
-0.1149834394454956,
-0.2809724509716034,
-0.04267548769712448,
0.15629898011684418,
0.027808837592601776,
0.11574576795101166,
-0.2761994004249573,
-0.08857940137386322,
0.2872067391872406,
-0.12247945368289948,
-0.2924153208732605,
0.23937790095806122,
0.15771713852882385,
0.0317804217338562,
-0.15771692991256714,
0.23809124529361725,
0.009963374584913254,
-0.048636294901371,
0.07015187293291092,
-0.3156661093235016
] |
https://github.com/huggingface/datasets/issues/6610 | > Hi! You are passing the wrong feature type to `cast_column`. This is the fixed call:
>
> ```python
> ais_dataset = ais_dataset.cast_column("my_labeled_bbox", {"bbox": Sequence(Value(dtype="int64")), "label": ClassLabel(names=["cat", "dog"])})
> ```
thanks | cast_column to Sequence(subfeatures_dict) has err | ### Describe the bug
I am working with the following demo code:
```
from datasets import load_dataset
from datasets.features import Sequence, Value, ClassLabel, Features
ais_dataset = load_dataset("/data/ryan.gao/ais_dataset_cache/raw/1978/")
ais_dataset = ais_dataset["train"]
def add_class(example):
example["my_labeled_bbox"] = {"bbox": [100,100,200,200], "label": "cat"}
return example
ais_dataset = ais_dataset.map(add_class, batched=False, num_proc=32)
ais_dataset = ais_dataset.cast_column("my_labeled_bbox", Sequence(
{
"bbox": Sequence(Value(dtype="int64")),
"label": ClassLabel(names=["cat", "dog"])
}))
print(ais_dataset[0])
```
However, executing this code results in an error:
```
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2111, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}")
TypeError: Couldn't cast array of type
int64
to
Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None)
```
Upon examining the source code in datasets/table.py at line 2035:
```
if isinstance(feature, Sequence) and isinstance(feature.feature, dict):
feature = {
name: Sequence(subfeature, length=feature.length) for name, subfeature in feature.feature.items()
}
```
I noticed that if subfeature is of type Sequence, the code results in Sequence(Sequence(...), ...) and Sequence(ClassLabel(...), ...), which appears to be the source of the error.
### Steps to reproduce the bug
run my demo code
### Expected behavior
no exception
### Environment info
python 3.9
datasets: 2.16.1 | 31 | cast_column to Sequence(subfeatures_dict) has err
### Describe the bug
I am working with the following demo code:
```
from datasets import load_dataset
from datasets.features import Sequence, Value, ClassLabel, Features
ais_dataset = load_dataset("/data/ryan.gao/ais_dataset_cache/raw/1978/")
ais_dataset = ais_dataset["train"]
def add_class(example):
example["my_labeled_bbox"] = {"bbox": [100,100,200,200], "label": "cat"}
return example
ais_dataset = ais_dataset.map(add_class, batched=False, num_proc=32)
ais_dataset = ais_dataset.cast_column("my_labeled_bbox", Sequence(
{
"bbox": Sequence(Value(dtype="int64")),
"label": ClassLabel(names=["cat", "dog"])
}))
print(ais_dataset[0])
```
However, executing this code results in an error:
```
File "/home/protoss.gao/.local/lib/python3.9/site-packages/datasets/table.py", line 2111, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}")
TypeError: Couldn't cast array of type
int64
to
Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None)
```
Upon examining the source code in datasets/table.py at line 2035:
```
if isinstance(feature, Sequence) and isinstance(feature.feature, dict):
feature = {
name: Sequence(subfeature, length=feature.length) for name, subfeature in feature.feature.items()
}
```
I noticed that if subfeature is of type Sequence, the code results in Sequence(Sequence(...), ...) and Sequence(ClassLabel(...), ...), which appears to be the source of the error.
### Steps to reproduce the bug
run my demo code
### Expected behavior
no exception
### Environment info
python 3.9
datasets: 2.16.1
> Hi! You are passing the wrong feature type to `cast_column`. This is the fixed call:
>
> ```python
> ais_dataset = ais_dataset.cast_column("my_labeled_bbox", {"bbox": Sequence(Value(dtype="int64")), "label": ClassLabel(names=["cat", "dog"])})
> ```
thanks | [
-0.06808836758136749,
-0.2487647533416748,
-0.06157679110765457,
0.015728870406746864,
0.5308369398117065,
0.24775570631027222,
0.4921039938926697,
0.2797868847846985,
0.1971459835767746,
-0.10834231972694397,
0.1848737597465515,
0.22724923491477966,
-0.12083391845226288,
0.37863239645957947,
-0.17962826788425446,
-0.20303714275360107,
0.45531246066093445,
-0.1145128682255745,
-0.00831269845366478,
0.10106025636196136,
-0.4560483396053314,
0.13075873255729675,
-0.5421671867370605,
0.22616799175739288,
0.002655141055583954,
-0.08513116836547852,
0.0513610765337944,
-0.3677842617034912,
-0.005814878270030022,
-0.3511534631252289,
0.44177645444869995,
-0.29729095101356506,
0.28920087218284607,
0.21175432205200195,
-0.00011738636385416612,
-0.058872126042842865,
0.4586848020553589,
0.07760418951511383,
-0.007284343242645264,
0.2057163119316101,
-0.46142998337745667,
-0.04128365218639374,
0.14486081898212433,
-0.48795273900032043,
-0.17643360793590546,
-0.09116078168153763,
-0.24718979001045227,
-0.31751519441604614,
-0.029161617159843445,
0.4845074415206909,
0.1776687055826187,
0.023762978613376617,
0.1587362289428711,
-0.03562360256910324,
0.15870821475982666,
-0.1779380738735199,
-0.25314509868621826,
-0.12773089110851288,
0.06752198934555054,
0.1961895376443863,
0.37535446882247925,
0.27778974175453186,
-0.14723268151283264,
-0.22666890919208527,
0.25519371032714844,
0.09153101593255997,
0.3564312756061554,
-0.32912418246269226,
-0.18674078583717346,
-0.09699307382106781,
0.5523717999458313,
-0.30875420570373535,
-0.32380473613739014,
-0.09832432121038437,
0.06321723759174347,
-0.18071383237838745,
0.039893362671136856,
-0.12652373313903809,
0.17301474511623383,
0.13375137746334076,
-0.23768754303455353,
0.4584795832633972,
0.010743014514446259,
0.12276172637939453,
-0.0925288200378418,
0.09065555036067963,
-0.12914304435253143,
0.09180542826652527,
-0.2091226875782013,
-0.46022236347198486,
-0.014874404296278954,
-0.028833866119384766,
0.00989492703229189,
0.14415161311626434,
-0.5307452082633972,
-0.2496882677078247,
-0.16735167801380157,
-0.07400434464216232,
-0.2047119140625,
0.031552087515592575,
-0.028105052188038826,
0.011468756943941116,
0.11374804377555847,
-0.11381567269563675,
0.2982642650604248,
0.2509405016899109,
-0.05097457766532898,
0.11632193624973297,
-0.221681147813797,
0.33291566371917725,
-0.0015030354261398315,
0.09255906939506531,
0.12232515960931778,
-0.14826661348342896,
0.17545196413993835,
0.20997032523155212,
0.24493032693862915,
-0.20351089537143707,
-0.2391240894794464,
0.2929682433605194,
-0.06639169901609421,
0.10429394245147705,
0.16493962705135345,
0.20326322317123413,
-0.03629555180668831,
0.2116217315196991,
0.0951438695192337,
0.35680368542671204,
0.03537894785404205,
-0.014188740402460098,
-0.2049705684185028,
0.12317833304405212,
-0.05365276336669922,
-0.24674737453460693,
-0.32298383116722107,
0.3856528699398041,
-0.1276218295097351,
0.00603128969669342,
-0.16822367906570435,
-0.13033902645111084,
-0.2818971276283264,
-0.1579139530658722,
0.05390574783086777,
0.282036691904068,
-0.27404022216796875,
0.24515140056610107,
0.21307598054409027,
0.053855568170547485,
-0.12285945564508438,
0.11113984882831573,
-0.1999775916337967,
-0.1039351373910904,
-0.17556843161582947,
0.2001296728849411,
-0.010821472853422165,
0.12495939433574677,
-0.25226256251335144,
-0.16537560522556305,
0.6826184391975403,
-0.19710561633110046,
0.27707168459892273,
-0.4943487346172333,
-0.45412808656692505,
-0.23627996444702148,
0.03270137310028076,
0.03083498775959015,
0.0038270577788352966,
0.15706007182598114,
0.004674237221479416,
-0.007444359362125397,
0.20098572969436646,
0.07309876382350922,
0.2264138013124466,
0.06689687073230743,
-0.25887352228164673,
0.15128293633460999,
0.2805543541908264,
-0.08322835713624954,
-0.11638861894607544,
0.2315317988395691,
-0.0007098540663719177,
-0.0560171976685524,
0.12749658524990082,
0.3574582636356354,
0.27597182989120483,
-0.4208102524280548,
0.054883360862731934,
0.34745168685913086,
-0.07318193465471268,
0.13789215683937073,
-0.11799125373363495,
-0.20120084285736084,
-0.014824191108345985,
0.06351827085018158,
-0.16776908934116364,
0.4127453565597534,
-0.01597164198756218,
-0.09603367745876312,
0.09711899608373642,
-0.10882223397493362,
0.12624436616897583,
0.1776353418827057,
0.12705174088478088,
0.20655906200408936,
0.05050762742757797,
-0.48121732473373413,
-0.21166837215423584,
0.05106481909751892,
0.4298551678657532,
-0.19655729830265045,
-0.24697619676589966,
-0.2032795399427414,
-0.2611616253852844,
0.14929673075675964,
-0.23712977766990662,
0.5411095023155212,
0.03218052536249161,
-0.19199423491954803,
0.0902061015367508,
-0.07335725426673889,
-0.08625375479459763,
0.3487264811992645,
-0.25937020778656006,
0.03220651298761368,
-0.6131832003593445,
0.15599852800369263,
-0.08316486328840256,
-0.15312987565994263,
-0.1035843938589096,
0.2659054696559906,
0.24906863272190094,
-0.04204713553190231,
-0.08291254192590714,
0.2848362624645233,
0.2443033903837204,
-0.2559356093406677,
-0.6009728908538818,
0.17081958055496216,
0.00390002503991127,
-0.35907062888145447,
-0.1682324856519699,
0.23887059092521667,
0.12276704609394073,
-0.0745696946978569,
-0.033960215747356415,
0.4081633388996124,
0.01374838873744011,
0.37667861580848694,
-0.13140076398849487,
0.16135036945343018,
0.06942804157733917,
0.008850879967212677,
-0.10221011936664581,
-0.36922866106033325,
-0.0766831561923027,
-0.1037919819355011,
-0.35436514019966125,
0.017155872657895088,
-0.18537789583206177,
0.260884165763855,
0.33944812417030334,
-0.132501482963562,
0.1232088953256607,
0.10592412948608398,
0.04923425614833832,
0.07510504126548767,
0.0070479195564985275,
0.13116583228111267,
0.26086950302124023,
-0.05056000128388405,
-0.08605353534221649,
0.03170199692249298,
-0.17347174882888794,
-0.002243656665086746,
0.16863131523132324,
0.2705605626106262,
0.017217207700014114,
-0.07015527039766312,
0.07919000089168549,
0.05130869150161743,
0.19997988641262054,
-0.11892509460449219,
0.025117889046669006,
0.18753467500209808,
-0.48895543813705444,
0.27232038974761963,
-0.3111679255962372,
-0.3265632688999176,
-0.04258608818054199,
-0.18927708268165588,
0.40509554743766785,
-0.5430177450180054,
-0.3550184965133667,
0.1872224658727646,
-0.2666431665420532,
0.15441381931304932,
-0.4146047830581665,
-0.3434278070926666,
0.41224542260169983,
-0.16517187654972076,
-0.02959194779396057,
0.0400007963180542,
0.0384037084877491,
0.04045715555548668,
0.08588866889476776,
0.206619530916214,
0.00440734438598156,
0.010921105742454529,
-0.17654183506965637,
-0.19035977125167847,
-0.1978813111782074,
-0.052235059440135956,
-0.18780051171779633,
-0.05741559714078903,
0.3934016525745392,
0.034555092453956604,
0.10697897523641586,
-0.3361693322658539,
0.17553317546844482,
0.0645551085472107,
-0.16767539083957672,
0.45929983258247375,
0.014407575130462646,
-0.19480785727500916,
-0.14357531070709229,
-0.12693503499031067,
-0.15483762323856354,
-0.3410121202468872,
-0.1111561506986618,
0.15717530250549316,
-0.016347624361515045,
0.03270888328552246,
0.14359880983829498,
-0.06298819929361343,
0.31841209530830383,
0.04117825627326965,
-0.1580977588891983,
0.5138845443725586,
0.3593284785747528,
0.025807473808526993,
-0.22918637096881866,
-0.10154445469379425,
-0.3829144835472107,
-0.08110678941011429,
0.07827708125114441,
-0.17007409036159515,
-0.08878026902675629,
-0.33136576414108276,
-0.016372621059417725,
0.08408719301223755,
-0.15590718388557434,
0.1806378811597824,
0.03007485345005989,
0.0064188167452812195,
0.031747788190841675,
0.10995253920555115,
0.012076795101165771,
0.19439798593521118,
-0.006692614406347275,
0.2650524377822876,
0.6776396632194519,
-0.020870961248874664,
-0.12523704767227173,
0.23852479457855225,
-0.3719642162322998,
0.386991411447525,
-0.0935339629650116,
-0.06673990935087204,
-0.32395344972610474,
-0.1326434314250946,
-0.09975315630435944,
-0.16003689169883728,
-0.16695481538772583,
0.043619997799396515,
-0.21349553763866425,
-0.21219389140605927,
0.2186306118965149,
0.3325081467628479,
0.1278596818447113,
-0.08142361044883728,
-0.06625157594680786,
-0.33663448691368103,
0.13236674666404724,
-0.12900707125663757,
0.07527199387550354,
-0.08559839427471161,
-0.07704252004623413,
0.06004250422120094,
0.05257848650217056,
-0.0031239762902259827,
-0.14119940996170044,
-0.5155323147773743,
-0.34130173921585083,
0.08342438191175461,
0.21141549944877625,
0.40697595477104187,
0.6117774844169617,
0.05665142834186554,
-0.20527276396751404,
-0.02240581065416336,
0.1272982656955719,
0.4906632900238037,
-0.39227843284606934,
0.05705418437719345,
0.34156471490859985,
0.33332493901252747,
-0.2560831308364868,
-0.3116447329521179,
-0.06099459156394005,
-0.14280728995800018,
0.18659237027168274,
0.18043072521686554,
0.005644083023071289,
0.05176122114062309,
0.522213876247406,
0.20469999313354492,
-0.1322261393070221,
-0.09381841123104095,
-0.22787564992904663,
-0.364429771900177,
-0.19606345891952515,
0.1429276317358017,
0.36865782737731934,
0.2278740108013153,
0.021211691200733185,
-0.16177773475646973,
-0.3132176101207733,
-0.16007870435714722,
-0.1332390010356903,
-0.10959688574075699,
0.2317185252904892,
-0.028123799711465836,
0.4735446870326996,
-0.4262405335903168,
-0.12815411388874054,
-0.016624299809336662,
0.2625059485435486,
-0.008590641431510448,
-0.21203777194023132,
0.1214112937450409,
-0.1138145700097084,
0.19883675873279572,
-0.014451861381530762,
-0.24001334607601166,
0.1092851310968399,
-0.08738957345485687,
0.20140478014945984,
-0.1760309934616089,
-0.3989860415458679,
0.43602293729782104,
0.08219315111637115,
-0.4388866126537323,
-0.6548398733139038,
0.42959386110305786,
0.11932867765426636,
-0.14200769364833832,
-0.22540119290351868,
0.19127076864242554,
-0.20124167203903198,
0.6755138039588928,
0.15376728773117065,
0.7638531923294067,
-0.003505626693367958,
-0.032132841646671295,
0.39784273505210876,
0.24407222867012024,
0.5097075700759888,
0.3865019679069519,
0.0747486874461174,
-0.38590192794799805,
-0.48017746210098267,
-0.13188055157661438,
-0.1946069747209549,
0.020544514060020447,
-0.08654138445854187,
-0.17587681114673615,
0.35646072030067444,
-0.47854626178741455,
0.46895453333854675,
-0.016364287585020065,
-0.28813743591308594,
0.24119272828102112,
-0.1660158485174179,
-0.07890255004167557,
0.13315308094024658,
0.2520860731601715,
-0.13375118374824524,
0.1460021734237671,
-0.07233836501836777,
-0.05337061360478401,
-0.05683860182762146,
-0.17651376128196716,
0.20989811420440674,
0.2240164577960968,
0.1576956957578659,
-0.01404564082622528,
0.013438999652862549,
0.2508254647254944,
0.586375892162323,
0.652492344379425,
-0.0786767303943634,
0.09737295657396317,
-0.06850934773683548,
0.42275646328926086,
0.13743704557418823,
0.08084375411272049,
-0.0912618339061737,
0.40088358521461487,
0.0400155708193779,
0.08755223453044891,
0.018267786130309105,
0.14705850183963776,
-0.1945425271987915,
0.09170836210250854,
0.07343631982803345,
0.20447255671024323,
-0.586951494216919,
-0.5745348930358887,
-0.1693345606327057,
0.07591891288757324,
-0.17704929411411285,
0.10339528322219849,
-0.17318861186504364,
-0.18377403914928436,
0.35346201062202454,
-0.2644927203655243,
-0.06777309626340866,
-0.07742848992347717,
0.3250434994697571,
0.38281184434890747,
0.168799489736557,
0.2431149184703827,
0.3029285669326782,
-0.19340088963508606,
-0.09265413135290146,
-0.16585710644721985,
0.24587848782539368,
-0.36053359508514404,
0.022834714502096176,
-0.25910279154777527,
-0.16412313282489777,
-0.035886138677597046,
0.3794012665748596,
-0.15381117165088654,
0.11588971316814423,
-0.16496148705482483,
-0.2727595269680023,
-0.33115777373313904,
0.28607410192489624,
0.06790027022361755,
0.05953213572502136,
-0.30115199089050293,
0.06601212918758392,
-0.2990875840187073,
-0.37317556142807007,
-0.21354669332504272,
-0.20872101187705994,
-0.45759886503219604,
0.20788688957691193,
0.31281572580337524,
0.1282767653465271,
-0.07639601826667786,
0.034812044352293015,
0.16146929562091827,
0.2502617835998535,
-0.1277592033147812,
-0.11694379150867462,
-0.05289082229137421,
0.08742623776197433,
0.11190693825483322,
0.0315733402967453,
-0.11526981741189957,
-0.13715681433677673,
-0.22249285876750946,
-0.2403373122215271,
-0.16784486174583435,
0.18403050303459167,
0.13610269129276276,
-0.07554789632558823,
0.22506383061408997,
-0.05076402425765991,
-0.09847472608089447,
0.2819129228591919,
-0.2615627944469452,
0.0023455843329429626,
-0.19110429286956787,
0.22824734449386597,
-0.16628819704055786,
0.032632142305374146,
-0.18137232959270477,
0.07909227162599564,
-0.19055332243442535,
-0.13942822813987732,
0.4571135342121124,
-0.30556392669677734,
-0.0532291978597641,
0.36160942912101746,
0.25304800271987915,
0.12218174338340759,
-0.4277443289756775,
-0.33371037244796753,
-0.06380301713943481,
0.1377483755350113,
-0.24137160181999207,
-0.33271634578704834,
0.011199109256267548,
-0.022472089156508446,
-0.06818775832653046,
0.3327934145927429,
0.14056158065795898,
-0.025846146047115326,
0.1967201828956604,
0.10498006641864777,
0.44823816418647766,
-0.20835068821907043,
0.15596745908260345,
0.4426133334636688,
0.18179862201213837,
0.0792798101902008,
0.202483132481575,
-0.006801063194870949,
0.23588666319847107,
0.6808600425720215,
0.10454191267490387,
0.022035567089915276,
0.6017282009124756,
-0.03576049953699112,
0.13030095398426056,
-0.15003536641597748,
0.2510480582714081,
0.4171715974807739,
-0.26654884219169617,
0.11819545924663544,
0.32469385862350464,
-0.3883427381515503,
-0.21624624729156494,
-0.26103031635284424,
-0.1309763491153717,
-0.028358351439237595,
-0.20678022503852844,
0.0937865674495697,
-0.08714868128299713,
0.06192809343338013,
-0.2388438582420349,
-0.3109055757522583,
-0.26047950983047485,
0.06801921874284744,
0.4278905987739563,
-0.04616678133606911,
0.22539210319519043,
-0.09919527173042297,
-0.12067361176013947,
0.10567036271095276,
0.2462470978498459,
-0.2701084613800049,
0.2651267945766449,
0.039760615676641464,
-0.0663340762257576,
0.2889159917831421,
-0.05455624312162399,
0.4946942925453186,
0.3373679220676422,
0.0813964456319809,
0.04618882015347481,
0.15272018313407898,
-0.28538888692855835,
0.1692904680967331,
0.12225279957056046,
-0.0792621448636055,
0.3430073857307434,
0.17739281058311462,
0.09831468760967255,
-0.09012337774038315,
0.1846918910741806,
0.08077973127365112,
0.376458078622818,
-0.15016689896583557,
0.8576192855834961,
-0.32477983832359314,
-0.3237677216529846,
-0.10991185158491135,
0.2954142987728119,
-0.33696654438972473,
0.15156112611293793,
0.040612198412418365,
-0.1525590717792511,
0.284841924905777,
0.3174484968185425,
0.054922617971897125,
-0.0027476344257593155,
0.33586397767066956,
0.23145388066768646,
0.04803628474473953,
-0.15755268931388855,
-0.036672309041023254,
-0.3513526916503906,
0.04393991082906723,
0.14040052890777588,
0.07111849635839462,
0.5474023222923279,
0.007064253091812134,
-0.10651279985904694,
0.0653420016169548,
-0.022309936583042145,
0.012262348085641861,
-0.17657791078090668,
0.5699431896209717,
-0.025735221803188324,
-0.3555871248245239,
0.15929335355758667,
0.062474921345710754,
-0.11857366561889648,
-0.523626983165741,
0.32110893726348877,
-0.17645210027694702,
0.10854868590831757,
0.06731364130973816,
-0.050766002386808395,
-0.12445651739835739,
-0.4083528220653534,
0.1480761617422104,
0.07148583978414536,
0.2633976340293884,
-0.06265881657600403,
-0.05904819071292877,
-0.06600797176361084,
-0.28208163380622864,
-0.18913502991199493,
0.3922150731086731,
-0.16554492712020874,
0.5063091516494751,
-0.03729310631752014,
0.42549586296081543,
-0.12583641707897186,
-0.013712722808122635,
0.13278482854366302,
0.009183462709188461,
-0.42155665159225464,
0.38789159059524536,
-0.36770209670066833,
0.33490121364593506,
0.2880419194698334,
-0.08691826462745667,
0.16874703764915466,
0.4514351487159729,
0.08169373869895935,
-0.6409966349601746,
0.5401331186294556,
-0.1149834394454956,
-0.2809724509716034,
-0.04267548769712448,
0.15629898011684418,
0.027808837592601776,
0.11574576795101166,
-0.2761994004249573,
-0.08857940137386322,
0.2872067391872406,
-0.12247945368289948,
-0.2924153208732605,
0.23937790095806122,
0.15771713852882385,
0.0317804217338562,
-0.15771692991256714,
0.23809124529361725,
0.009963374584913254,
-0.048636294901371,
0.07015187293291092,
-0.3156661093235016
] |
https://github.com/huggingface/datasets/issues/6609 | I opened https://github.com/huggingface/datasets/pull/6632 to fix this issue. Once it's merged we'll do a new release of `datasets` | Wrong path for cache directory in offline mode | ### Describe the bug
Dear huggingfacers,
I'm trying to use a subset of the-stack dataset. When I run the command the first time
```
dataset = load_dataset(
path='bigcode/the-stack',
data_dir='data/fortran',
split='train' )
```
It downloads the files and caches them normally.
Nevertheless, since my compute nodes are not online (`HF_DATASETS_OFFLINE=1`) . Whenever I try to run the command again, the library is passing the wrong cache path:
`Cache directory for the-stack doesn't exist at /Users/user/.cache/huggingface/datasets/bigcode___the-stack/default-data_dir=data%2Ffortran-data_dir=data%2Ffortran`
when the right path is:
`'/Users/user/.cache/huggingface/datasets/bigcode___the-stack/default-data_dir=data\%2Ffortran`
Not sure why those redundancies are included in the path. If I try adding the correct path through the the cache_dir argument it throws an error:
ConnectionError: Couldn't reach the Hugging Face Hub for dataset 'bigcode/the-stack': Offline mode is enabled.
Your help with this issue is greatly appreciated. Thanks a lot for the great work.
### Steps to reproduce the bug
1:
`dataset = load_dataset(
path='bigcode/the-stack',
data_dir='data/fortran',
split='train' )`
2:
`HF_DATASETS_OFFLINE=1`
3:
`dataset = load_dataset(
path='bigcode/the-stack',
data_dir='data/fortran',
split='train' )`
### Expected behavior
being able to use the cached data
### Environment info
several different systems | 17 | Wrong path for cache directory in offline mode
### Describe the bug
Dear huggingfacers,
I'm trying to use a subset of the-stack dataset. When I run the command the first time
```
dataset = load_dataset(
path='bigcode/the-stack',
data_dir='data/fortran',
split='train' )
```
It downloads the files and caches them normally.
Nevertheless, since my compute nodes are not online (`HF_DATASETS_OFFLINE=1`) . Whenever I try to run the command again, the library is passing the wrong cache path:
`Cache directory for the-stack doesn't exist at /Users/user/.cache/huggingface/datasets/bigcode___the-stack/default-data_dir=data%2Ffortran-data_dir=data%2Ffortran`
when the right path is:
`'/Users/user/.cache/huggingface/datasets/bigcode___the-stack/default-data_dir=data\%2Ffortran`
Not sure why those redundancies are included in the path. If I try adding the correct path through the the cache_dir argument it throws an error:
ConnectionError: Couldn't reach the Hugging Face Hub for dataset 'bigcode/the-stack': Offline mode is enabled.
Your help with this issue is greatly appreciated. Thanks a lot for the great work.
### Steps to reproduce the bug
1:
`dataset = load_dataset(
path='bigcode/the-stack',
data_dir='data/fortran',
split='train' )`
2:
`HF_DATASETS_OFFLINE=1`
3:
`dataset = load_dataset(
path='bigcode/the-stack',
data_dir='data/fortran',
split='train' )`
### Expected behavior
being able to use the cached data
### Environment info
several different systems
I opened https://github.com/huggingface/datasets/pull/6632 to fix this issue. Once it's merged we'll do a new release of `datasets` | [
-0.07495970278978348,
-0.1799859255552292,
0.013488173484802246,
0.40448620915412903,
0.08871869742870331,
-0.08352793753147125,
0.22764024138450623,
-0.0113661615177989,
0.158774733543396,
0.026804406195878983,
0.08159554749727249,
0.05718464031815529,
0.169479638338089,
-0.03335284814238548,
0.18564555048942566,
-0.04741028696298599,
0.1815490871667862,
-0.049995195120573044,
-0.28688740730285645,
-0.14655958116054535,
-0.1322333961725235,
0.5205739140510559,
-0.18942731618881226,
0.045236118137836456,
-0.31550630927085876,
-0.12936171889305115,
-0.11688539385795593,
0.4859408438205719,
0.17039591073989868,
-0.16728609800338745,
0.5269396901130676,
-0.05195128545165062,
0.12245599925518036,
0.6617830991744995,
-0.00012785062426701188,
0.07809887826442719,
-0.010096313431859016,
-0.12990468740463257,
-0.3343222737312317,
-0.4124038517475128,
-0.20701904594898224,
-0.07830528914928436,
0.04067649692296982,
-0.3090358376502991,
-0.043524522334337234,
0.2869841456413269,
0.060194939374923706,
-0.508691132068634,
0.38431820273399353,
-0.028781142085790634,
0.04330575093626976,
0.32019054889678955,
-0.3334888219833374,
-0.09035590291023254,
0.05233025550842285,
0.3802697956562042,
-0.11045552790164948,
0.2880887985229492,
-0.10286493599414825,
0.04140186309814453,
-0.06338576972484589,
0.2380126565694809,
-0.127306267619133,
0.09036226570606232,
0.39500176906585693,
0.16258679330348969,
-0.31354382634162903,
0.21946579217910767,
0.35171493887901306,
0.33767256140708923,
0.29068246483802795,
-0.2062455713748932,
-0.15533897280693054,
-0.36493054032325745,
-0.3961842656135559,
-0.2963502109050751,
0.48031580448150635,
0.020601041615009308,
-0.10951325297355652,
0.12078697234392166,
-0.2116258591413498,
-0.2113332450389862,
-0.03125288337469101,
0.2080809772014618,
0.19896437227725983,
0.07665832340717316,
-0.2227829247713089,
0.08913955092430115,
0.09159146249294281,
0.2640761137008667,
-0.09258266538381577,
-0.11475687474012375,
-0.02775494195520878,
0.11922448873519897,
-0.22281275689601898,
0.476969838142395,
-0.030423186719417572,
0.3311160206794739,
0.19341522455215454,
0.1769791692495346,
0.04564574733376503,
-0.011297980323433876,
-0.26682233810424805,
-0.045102931559085846,
0.20704704523086548,
0.40205711126327515,
-0.018737494945526123,
-0.1763952076435089,
0.20620384812355042,
0.28888657689094543,
-0.16231833398342133,
-0.2898678183555603,
0.18139758706092834,
-0.2456156611442566,
0.0631408542394638,
-0.17020216584205627,
0.12770724296569824,
-0.27660036087036133,
-0.07415374368429184,
-0.2161787450313568,
0.08302260935306549,
-0.0521388053894043,
0.4131990969181061,
0.4832379221916199,
0.08113335072994232,
-0.003086533397436142,
0.13710665702819824,
0.08426328003406525,
-0.30211523175239563,
-0.1436229944229126,
-0.2580537796020508,
-0.15791577100753784,
-0.2672395408153534,
0.3240317106246948,
0.05342826247215271,
-0.3268349766731262,
0.4403027296066284,
-0.03852709382772446,
0.32665887475013733,
-0.21021105349063873,
-0.09369722753763199,
-0.04742583632469177,
0.10695244371891022,
0.12317166477441788,
-0.084104984998703,
0.29783838987350464,
0.3292193114757538,
0.1938222050666809,
-0.06006062775850296,
0.07420287281274796,
-0.26803141832351685,
-0.5389137864112854,
0.24648517370224,
-0.0900862067937851,
-0.20156526565551758,
0.0929248034954071,
-0.4272034466266632,
-0.2353290170431137,
0.13804611563682556,
-0.11387170851230621,
0.10961832106113434,
0.1390269696712494,
-0.1495765745639801,
-0.2619718313217163,
0.3602970838546753,
0.8354352116584778,
-0.08997269719839096,
-0.16946707665920258,
-0.042166873812675476,
0.17730093002319336,
0.11500981450080872,
0.38219377398490906,
-0.43844154477119446,
0.3396526277065277,
-0.5656213164329529,
-0.3399353325366974,
0.5158365368843079,
-0.6520372033119202,
-0.38683903217315674,
0.3879031836986542,
-0.18495520949363708,
0.014425113797187805,
0.1868818998336792,
0.19937030971050262,
-0.1308152973651886,
0.1216086596250534,
-0.23737072944641113,
0.24604736268520355,
0.14688825607299805,
0.09845495223999023,
-0.3092457056045532,
-0.17939764261245728,
0.19512176513671875,
-0.07887402921915054,
0.12834131717681885,
0.23331695795059204,
0.0909828394651413,
-0.15529179573059082,
0.40401414036750793,
0.05758201330900192,
0.09120162576436996,
0.31345629692077637,
0.08242432773113251,
0.23075222969055176,
0.14276370406150818,
0.2921174168586731,
-0.527584969997406,
0.19277973473072052,
-0.30204758048057556,
-0.17086587846279144,
-0.2879069149494171,
-0.14168356359004974,
-0.2513207495212555,
-0.29416120052337646,
-0.16639460623264313,
-0.07940024137496948,
-0.13155671954154968,
0.2690815031528473,
0.43766695261001587,
0.11652672290802002,
-0.25133803486824036,
0.5957996249198914,
0.048671796917915344,
0.23918096721172333,
-0.3393651843070984,
0.3977353870868683,
0.09809202700853348,
0.043878816068172455,
-0.3363931179046631,
0.06528215110301971,
0.43980544805526733,
-0.250027596950531,
-0.10202214121818542,
0.6647148132324219,
-0.18456710875034332,
0.29034268856048584,
-0.016207311302423477,
0.14281447231769562,
0.2237040102481842,
0.018019765615463257,
0.2359687089920044,
-0.07362005114555359,
-0.02938772365450859,
0.07754094153642654,
0.08625925332307816,
0.3057374358177185,
-0.25515902042388916,
0.2982374131679535,
0.004847541451454163,
-0.0671069473028183,
0.09896297752857208,
-0.09916304051876068,
-0.13206735253334045,
-0.1887049525976181,
0.47146305441856384,
-0.03516402095556259,
0.3739345669746399,
-0.14163292944431305,
-0.16295577585697174,
0.09795175492763519,
0.23509469628334045,
0.26351824402809143,
0.12078788876533508,
-0.14887380599975586,
-0.016531676054000854,
-0.03671543300151825,
0.15696623921394348,
0.2325141578912735,
0.35130774974823,
0.05762883648276329,
0.12999320030212402,
0.1035306453704834,
0.014627326279878616,
-0.20532000064849854,
0.1656063199043274,
-0.00364057719707489,
0.09476695954799652,
-0.23265723884105682,
0.0091802217066288,
-0.06469190120697021,
-0.2691975235939026,
-0.04173126444220543,
0.08272793889045715,
-0.046555113047361374,
-0.3068608045578003,
0.3270065188407898,
-0.4905933141708374,
-0.34892576932907104,
-0.32573434710502625,
-0.2944434583187103,
-0.4141474962234497,
-0.24940888583660126,
-0.10820882022380829,
0.23306356370449066,
0.10977888107299805,
0.14270314574241638,
-0.0985613614320755,
0.22577247023582458,
-0.2262161672115326,
-0.4158376455307007,
-0.28702351450920105,
-0.04443662241101265,
-0.23477108776569366,
-0.23755407333374023,
0.1979740560054779,
-0.05899807810783386,
0.07877205312252045,
-0.23088142275810242,
-0.19582971930503845,
-0.6247997879981995,
0.01632174849510193,
0.2372550368309021,
0.18776726722717285,
0.054834067821502686,
0.08911372721195221,
0.14670920372009277,
-0.1056121215224266,
-0.07765617966651917,
0.29351526498794556,
-0.3429892361164093,
0.08373527973890305,
-0.059986066073179245,
-0.04558354616165161,
0.0704074576497078,
-0.2053222954273224,
-0.10861566662788391,
-0.08692318946123123,
-0.14484748244285583,
0.41662636399269104,
-0.0634118914604187,
0.14848649501800537,
0.23631544411182404,
-0.1417318880558014,
-0.10271556675434113,
-0.3565726578235626,
0.0034447722136974335,
-0.38119980692863464,
-0.8864358067512512,
0.11341293156147003,
-0.21657966077327728,
-0.2329249531030655,
0.0770953893661499,
0.11045172810554504,
0.5119752883911133,
0.1385929435491562,
-0.653396725654602,
-0.22814896702766418,
-0.02055281400680542,
0.3103167414665222,
-0.049609579145908356,
0.12427324801683426,
0.33779388666152954,
-0.2947234511375427,
0.12803855538368225,
-0.15487045049667358,
-0.04265222325921059,
0.39540255069732666,
0.0008792765438556671,
0.484413743019104,
0.2363540083169937,
0.20914281904697418,
0.1363929808139801,
0.4753735661506653,
0.09640172123908997,
0.22684286534786224,
0.49505916237831116,
0.06696698069572449,
0.5792490243911743,
-0.2991565465927124,
-0.1659759283065796,
0.0029316991567611694,
0.035212814807891846,
-0.29723888635635376,
0.167758971452713,
0.3575787842273712,
0.12856802344322205,
-0.1793670654296875,
-0.23372191190719604,
-0.23403005301952362,
-0.4225601553916931,
-0.1168031319975853,
0.03585254028439522,
0.17207735776901245,
0.2063325047492981,
0.13447807729244232,
-0.4301455318927765,
-0.06845077127218246,
0.34659337997436523,
0.35910871624946594,
0.2514348328113556,
0.29012206196784973,
-0.1837952733039856,
0.0988548994064331,
-0.21617814898490906,
0.1622680425643921,
-0.09281189739704132,
0.06697265803813934,
-0.10567720979452133,
0.11214032024145126,
0.1278458535671234,
0.07665186375379562,
0.9235138893127441,
0.24604575335979462,
0.17877304553985596,
-0.057045914232730865,
-0.10989169776439667,
-0.5002946257591248,
-0.062029462307691574,
0.30211079120635986,
0.15311439335346222,
0.2821604609489441,
0.1595621407032013,
-0.0570659413933754,
-0.20492082834243774,
-0.23591414093971252,
0.10839696228504181,
-0.1562589555978775,
-0.2564704120159149,
-0.20279136300086975,
-0.35066670179367065,
-0.14654867351055145,
-0.1095983237028122,
0.045640282332897186,
0.028970684856176376,
0.1969040483236313,
0.033143021166324615,
0.14931288361549377,
0.04504340887069702,
-0.2638380527496338,
-0.25963884592056274,
0.4976857602596283,
-0.2753678858280182,
0.05268259346485138,
0.46981126070022583,
0.11948604881763458,
0.2724309265613556,
0.39926162362098694,
-0.17825916409492493,
0.13967272639274597,
0.13621705770492554,
0.028460219502449036,
0.1262580156326294,
0.5744567513465881,
-0.19733968377113342,
0.11119527369737625,
0.25606393814086914,
0.1620352566242218,
-0.07694664597511292,
-0.05759855732321739,
0.029658585786819458,
0.23409731686115265,
0.02594565600156784,
-0.40745365619659424,
0.44068944454193115,
0.08470746874809265,
-0.10981762409210205,
0.27699655294418335,
0.4539467692375183,
-0.3608948588371277,
0.21844205260276794,
-0.2544945478439331,
1.0212055444717407,
0.05165712907910347,
0.2796878218650818,
0.1759374439716339,
0.0009573251008987427,
0.6028240919113159,
-0.31474775075912476,
0.22849395871162415,
-0.07944542169570923,
-0.21550258994102478,
-0.14988559484481812,
-0.2102615237236023,
0.04177812859416008,
-0.031058751046657562,
-0.038247667253017426,
0.45544207096099854,
-0.16270644962787628,
0.3690357804298401,
-0.3514643907546997,
-0.19660866260528564,
-0.11672892421483994,
-0.2239346206188202,
-0.39785516262054443,
0.0063680969178676605,
0.04045690968632698,
0.4611313045024872,
-0.17701959609985352,
-0.04033055528998375,
0.006692841649055481,
-0.08341170847415924,
-0.03982868045568466,
-0.0665178894996643,
-0.5210342407226562,
0.1767999231815338,
0.18759649991989136,
-0.08792546391487122,
-0.2262391746044159,
0.487002968788147,
0.6687136292457581,
-0.1476767510175705,
-0.2108491212129593,
0.048484090715646744,
0.023008054122328758,
-0.0646297037601471,
-0.30322393774986267,
0.10567820072174072,
0.0023052021861076355,
-0.0049729421734809875,
-0.02875378727912903,
-0.2516207993030548,
-0.3043765425682068,
-0.29088321328163147,
0.028586506843566895,
-0.04147270321846008,
-0.16716113686561584,
-0.08267571777105331,
0.06340691447257996,
0.2891532778739929,
0.3517628014087677,
-0.054337065666913986,
-0.04198465123772621,
0.20326824486255646,
0.011788200587034225,
-0.07393166422843933,
-0.011001944541931152,
-0.2526249587535858,
-0.22645097970962524,
0.3567959666252136,
-0.15200427174568176,
-0.24839985370635986,
0.2887163460254669,
0.0877436101436615,
-0.06139145791530609,
0.09197420626878738,
-0.11787888407707214,
0.09495624899864197,
-0.32698309421539307,
0.11042335629463196,
-0.07630448788404465,
0.1430577039718628,
-0.05747762322425842,
0.1555621474981308,
0.27902305126190186,
0.05085662007331848,
-0.20205682516098022,
-0.2074001133441925,
-0.32531309127807617,
0.30194541811943054,
-0.15713781118392944,
-0.005471929907798767,
0.1703849732875824,
-0.04479319602251053,
0.09852070361375809,
-0.08838077634572983,
-0.1287548840045929,
0.21936579048633575,
-0.10586340725421906,
-0.13029929995536804,
0.20221787691116333,
-0.13316059112548828,
0.586076557636261,
0.08460898697376251,
-0.12817993760108948,
0.10428397357463837,
-0.2907460033893585,
0.030870217829942703,
-0.20105144381523132,
0.22767920792102814,
0.036330994218587875,
-0.19075578451156616,
0.0874616801738739,
-0.24920497834682465,
0.11190107464790344,
-0.25254595279693604,
0.4020121991634369,
0.6436382532119751,
0.04964671656489372,
-0.23424142599105835,
-0.023748986423015594,
-0.0033408571034669876,
-0.4401775896549225,
0.0480903796851635,
0.09837616980075836,
0.08130715787410736,
0.17459070682525635,
0.04524431750178337,
-0.37146490812301636,
-0.04600401222705841,
-0.12602269649505615,
-0.0053334347903728485,
0.22386568784713745,
0.14608602225780487,
0.25864890217781067,
-0.22105738520622253,
-0.11758934706449509,
0.1734667420387268,
0.3758443295955658,
-0.27268171310424805,
0.015064150094985962,
0.06534726917743683,
0.144203782081604,
-0.04280439764261246,
-0.18058408796787262,
-0.20991010963916779,
0.15073728561401367,
0.15404757857322693,
0.06131802499294281,
0.47132259607315063,
0.4541427493095398,
-0.24459117650985718,
0.10735682398080826,
-0.16654202342033386,
0.6500252485275269,
-0.26417452096939087,
0.2784208357334137,
-0.061326365917921066,
-0.006079830229282379,
0.2761521339416504,
0.28421592712402344,
0.44154688715934753,
0.04640330746769905,
0.22002652287483215,
-0.12190471589565277,
0.20952577888965607,
-0.08910956978797913,
0.09537340700626373,
-0.19545698165893555,
-0.460648775100708,
-0.22033369541168213,
0.2534043788909912,
-0.11886260658502579,
0.069709412753582,
-0.5283228158950806,
0.5990963578224182,
-0.33351820707321167,
-0.11905629932880402,
-0.23057684302330017,
0.25563427805900574,
-0.1879388988018036,
-0.13128280639648438,
0.0037261992692947388,
-0.22226744890213013,
-0.0840703472495079,
-0.02847343683242798,
0.02878693863749504,
-0.2709531784057617,
0.4111040234565735,
-0.0440824031829834,
0.11379699409008026,
-0.006836000829935074,
-0.05277056246995926,
0.23824036121368408,
0.10995887219905853,
-0.06472735852003098,
0.41246742010116577,
-0.036030009388923645,
-0.2205340564250946,
0.2483946681022644,
0.07631262391805649,
0.25811243057250977,
0.19452057778835297,
0.32831913232803345,
-0.08128723502159119,
0.165024995803833,
0.10192754864692688,
-0.01109146699309349,
-0.12461628019809723,
-0.14822746813297272,
0.06294462084770203,
0.12698432803153992,
-0.011911792680621147,
-0.04137081280350685,
0.35521408915519714,
-0.08100857585668564,
0.4605174660682678,
-0.20234793424606323,
0.29207471013069153,
-0.39800208806991577,
0.026908040046691895,
-0.18460522592067719,
-0.0016542226076126099,
-0.33729568123817444,
-0.08058994263410568,
0.08397357165813446,
-0.1650155633687973,
0.16988888382911682,
0.15020616352558136,
-0.028382018208503723,
0.041715580970048904,
0.30305108428001404,
0.25066813826560974,
0.17183774709701538,
-0.2736909091472626,
-0.3079034686088562,
-0.5690878033638,
0.08815455436706543,
-0.11741258203983307,
0.3194175064563751,
0.007112927734851837,
0.12288681417703629,
-0.02953290566802025,
-0.17449308931827545,
0.4874879717826843,
-0.04493653401732445,
0.14304442703723907,
-0.16760127246379852,
-0.18557129800319672,
-0.20311087369918823,
0.0772392749786377,
-0.0939604789018631,
0.18285441398620605,
-0.1713080108165741,
0.04835857078433037,
0.14094656705856323,
-0.142648845911026,
0.18500185012817383,
0.15378165245056152,
-0.25302737951278687,
-0.2149185836315155,
0.25991255044937134,
-0.00817803293466568,
-0.013962294906377792,
0.32794710993766785,
-0.2926156222820282,
-0.2418815791606903,
-0.11767522990703583,
-0.07839301228523254,
-0.1906280666589737,
-0.21324250102043152,
0.32100751996040344,
-0.6117419600486755,
-0.2303144782781601,
-0.5292349457740784,
0.15658418834209442,
0.3570241630077362,
-0.02227429486811161,
-0.21596018970012665,
0.09161201119422913,
-0.34261631965637207,
0.158835768699646,
0.38469135761260986,
0.36952051520347595,
-0.04484220966696739,
0.3074180483818054,
-0.23734042048454285,
-0.11915106326341629,
0.6368895173072815,
-0.25229310989379883,
0.10974776744842529,
-0.19649766385555267,
0.3939533233642578,
0.4347759187221527,
-0.2477562427520752,
-0.587608814239502,
-0.10882490873336792,
0.1612229347229004,
0.17235974967479706,
-0.006317906081676483,
-0.08289648592472076,
-0.39263588190078735,
0.052613794803619385,
0.14079752564430237,
0.3242914080619812,
0.07551068067550659,
-0.36137697100639343,
0.24035340547561646,
-0.11232977360486984
] |
https://github.com/huggingface/datasets/issues/6604 | I don't think the PR fixes the root cause, since it still relies on the `random` library which will often have its seed fixed. I think the builtin `uuid.uuid4()` is a better choice: https://docs.python.org/3/library/uuid.html | Transform fingerprint collisions due to setting fixed random seed | ### Describe the bug
The transform fingerprinting logic relies on the `random` library for random bits when the function is not hashable (e.g. bound methods as used in `trl`: https://github.com/huggingface/trl/blob/main/trl/trainer/dpo_trainer.py#L356). This causes collisions when the training code sets a fixed random seed, which is common practice: https://github.com/huggingface/alignment-handbook/blob/main/recipes/zephyr-7b-beta/sft/config_full.yaml#L45.
This results in fingerprint collisions which leads to silently loading incorrect cache files corresponding to completely different datasets.
### Steps to reproduce the bug
n/a
### Expected behavior
Use `uuid` v4 instead of `random.getrandbits()`
### Environment info
`datasets` main branch | 34 | Transform fingerprint collisions due to setting fixed random seed
### Describe the bug
The transform fingerprinting logic relies on the `random` library for random bits when the function is not hashable (e.g. bound methods as used in `trl`: https://github.com/huggingface/trl/blob/main/trl/trainer/dpo_trainer.py#L356). This causes collisions when the training code sets a fixed random seed, which is common practice: https://github.com/huggingface/alignment-handbook/blob/main/recipes/zephyr-7b-beta/sft/config_full.yaml#L45.
This results in fingerprint collisions which leads to silently loading incorrect cache files corresponding to completely different datasets.
### Steps to reproduce the bug
n/a
### Expected behavior
Use `uuid` v4 instead of `random.getrandbits()`
### Environment info
`datasets` main branch
I don't think the PR fixes the root cause, since it still relies on the `random` library which will often have its seed fixed. I think the builtin `uuid.uuid4()` is a better choice: https://docs.python.org/3/library/uuid.html | [
-0.1706395000219345,
-0.5525231957435608,
0.13183769583702087,
0.25794491171836853,
0.42352157831192017,
-0.03414187580347061,
0.15525738894939423,
0.3210907578468323,
-0.301504909992218,
0.17565152049064636,
-0.048530951142311096,
-0.053445473313331604,
-0.02663678303360939,
0.15088921785354614,
0.05550048127770424,
-0.12852339446544647,
0.07165052741765976,
0.13271406292915344,
-0.11288539320230484,
-0.0420951321721077,
-0.3027116656303406,
0.2853736877441406,
0.1658821552991867,
0.27128303050994873,
-0.41322842240333557,
0.08038781583309174,
-0.06397297978401184,
0.45540520548820496,
0.02471737563610077,
-0.26578953862190247,
0.03828500211238861,
0.1821611523628235,
0.02534906566143036,
0.16950839757919312,
-0.00011382783850422129,
-0.0034447386860847473,
0.06886850297451019,
-0.06950461119413376,
0.08697672188282013,
-0.07726477086544037,
0.09027180075645447,
0.0762706771492958,
-0.16779938340187073,
0.08839218318462372,
-0.20835506916046143,
-0.25900065898895264,
0.06404242664575577,
0.1837480664253235,
0.10704794526100159,
0.06805623322725296,
0.20864742994308472,
0.018265850841999054,
-0.03590475767850876,
0.021697986871004105,
0.36185476183891296,
0.17160627245903015,
-0.17610162496566772,
0.0946919173002243,
0.12204769998788834,
0.04454800486564636,
-0.27502119541168213,
0.3033764958381653,
0.157162606716156,
-0.09327664971351624,
0.34547239542007446,
0.2417151927947998,
0.3682290315628052,
-0.2106713056564331,
-0.03799523413181305,
0.37656521797180176,
-0.36842918395996094,
-0.23889689147472382,
-0.22203730046749115,
-0.3319665193557739,
-0.23741544783115387,
-0.32569777965545654,
0.3428592085838318,
0.06441853940486908,
-0.10155562311410904,
0.15594825148582458,
-0.4345278739929199,
0.20439860224723816,
0.17013514041900635,
-0.15656019747257233,
0.008886389434337616,
-0.11880496144294739,
0.1359841376543045,
0.017806675285100937,
0.2226065695285797,
0.06689675152301788,
0.13557963073253632,
0.20499670505523682,
-0.2582850456237793,
-0.1496589183807373,
0.043010205030441284,
-0.3208337128162384,
0.10583067685365677,
0.24857230484485626,
0.19843478500843048,
0.33212724328041077,
0.0861850455403328,
0.14841824769973755,
0.011216942220926285,
0.033936575055122375,
0.03664347156882286,
0.08903442323207855,
-0.273046612739563,
0.26352667808532715,
0.17911364138126373,
0.12550178170204163,
-0.30436843633651733,
0.21633943915367126,
0.26237887144088745,
-0.24318066239356995,
0.17319664359092712,
-0.07778741419315338,
-0.09366054832935333,
-0.24303379654884338,
0.01388377696275711,
0.20240312814712524,
-0.514030396938324,
0.1440635621547699,
-0.016549648717045784,
0.3666859567165375,
-0.18483978509902954,
0.04923625662922859,
0.41767311096191406,
-0.1705232858657837,
-0.26449090242385864,
-0.05572758987545967,
-0.3400617837905884,
-0.021342767402529716,
-0.18977059423923492,
0.25517427921295166,
-0.15768425166606903,
-0.008495345711708069,
0.393932968378067,
0.11799588799476624,
0.08240881562232971,
0.07277320325374603,
0.1987306922674179,
-0.0019387789070606232,
0.4183235168457031,
0.14299319684505463,
-0.06231994926929474,
-0.2806391716003418,
0.10373841226100922,
0.15296313166618347,
-0.27140021324157715,
0.1668623685836792,
-0.2222020924091339,
-0.11453891545534134,
0.2245563119649887,
0.215769961476326,
-0.34668678045272827,
0.03572537377476692,
0.23351171612739563,
-0.03053933009505272,
0.29469433426856995,
-0.27591556310653687,
0.08753515779972076,
-0.3774555027484894,
-0.2799341678619385,
-0.14662738144397736,
0.09279058873653412,
0.20322144031524658,
0.04250023514032364,
-0.40832725167274475,
0.4225846827030182,
0.011494278907775879,
0.06887929141521454,
0.16760610044002533,
-0.04035943001508713,
0.07181811332702637,
-0.32801946997642517,
0.034306153655052185,
0.031180057674646378,
-0.336354523897171,
-0.3111552894115448,
-0.32567450404167175,
-0.1790117472410202,
0.3539280593395233,
-0.04804399237036705,
0.118836410343647,
-0.03411245346069336,
-0.3079551160335541,
-0.001402357593178749,
0.3920871913433075,
-0.18640802800655365,
0.12850429117679596,
-0.5704222917556763,
-0.23702338337898254,
-0.025920454412698746,
0.12142966687679291,
0.114744633436203,
0.1066364049911499,
0.10202621668577194,
0.18477791547775269,
0.10752125084400177,
-0.12953516840934753,
0.09384270012378693,
0.18663987517356873,
0.16659511625766754,
0.20834985375404358,
0.18690116703510284,
0.21691350638866425,
-0.035632938146591187,
0.08273326605558395,
-0.39662161469459534,
0.060160353779792786,
0.3129684329032898,
-0.1360435038805008,
0.2599923610687256,
-0.293854296207428,
-0.3324706256389618,
-0.34813424944877625,
0.0673232302069664,
0.2780757546424866,
0.4464811086654663,
-0.11299288272857666,
0.20968136191368103,
0.23073317110538483,
-0.31678804755210876,
0.1854328066110611,
-0.6482864022254944,
0.10905911028385162,
-0.10479562729597092,
-0.05054827407002449,
-0.3431493937969208,
0.33217737078666687,
-0.08329583704471588,
-0.18058151006698608,
-0.07879586517810822,
0.2546255886554718,
0.04744594171643257,
0.014225374907255173,
-0.04473214969038963,
0.4283333420753479,
0.1788039207458496,
-0.03634584695100784,
-0.155690997838974,
0.12023577839136124,
-0.11583209037780762,
-0.06797219812870026,
0.05200892314314842,
0.6225818991661072,
0.011880075559020042,
-0.21929575502872467,
0.11161279678344727,
-0.18809933960437775,
0.14980153739452362,
-0.13757409155368805,
-0.18514788150787354,
0.030869394540786743,
0.07497188448905945,
0.029417596757411957,
0.3431139588356018,
0.2390725463628769,
-0.5231514573097229,
0.17378780245780945,
0.3995077311992645,
0.06637253612279892,
-0.11737219989299774,
0.17693984508514404,
-0.14354343712329865,
-0.1747978776693344,
-0.058603569865226746,
0.5320171117782593,
0.525749921798706,
0.21341858804225922,
-0.16805711388587952,
0.28262728452682495,
-0.0694018304347992,
-0.15845534205436707,
0.21403351426124573,
-0.08772441744804382,
-0.1960441619157791,
0.0929010659456253,
0.21073018014431,
0.21229945123195648,
-0.39933207631111145,
-0.14593611657619476,
-0.08466079086065292,
0.12747406959533691,
-0.3453494608402252,
0.06497319042682648,
-0.216396301984787,
0.09487348049879074,
-0.319376140832901,
-0.312548965215683,
-0.2283814400434494,
-0.26398590207099915,
0.25704073905944824,
0.39824607968330383,
-0.17516618967056274,
0.31682634353637695,
-0.010452568531036377,
0.3019207715988159,
-0.16419777274131775,
-0.0013853218406438828,
-0.22391559183597565,
-0.05792082101106644,
-0.3244994878768921,
0.04450751468539238,
0.10538600385189056,
-0.28982797265052795,
0.30362141132354736,
-0.49950599670410156,
-0.24169893562793732,
-0.1704249233007431,
-0.5688194632530212,
0.10294588655233383,
-0.3027522563934326,
0.05739276111125946,
0.28707754611968994,
-0.002189621329307556,
-0.07424351572990417,
0.00997987762093544,
0.40093961358070374,
-0.4392067790031433,
-0.31603145599365234,
-0.10468367487192154,
0.09041443467140198,
0.08111598342657089,
-0.19195973873138428,
-0.10075728595256805,
-0.11926211416721344,
-0.22518472373485565,
0.11723499000072479,
0.14065362513065338,
0.15053901076316833,
0.5707827806472778,
-0.02754700556397438,
-0.06284855306148529,
-0.3521794378757477,
0.17320655286312103,
-0.2318873554468155,
-0.5914297103881836,
0.22140710055828094,
-0.24364963173866272,
-0.25145161151885986,
-0.16244293749332428,
0.013025939464569092,
-0.06793787330389023,
0.2637365162372589,
-0.3888753056526184,
-0.532753050327301,
-0.2550705671310425,
0.3044636845588684,
-0.05165574699640274,
-0.013783220201730728,
0.30340123176574707,
0.3928473889827728,
-0.1347614824771881,
-0.02062637358903885,
0.03018029034137726,
0.09611427783966064,
-0.08008822798728943,
0.4585875868797302,
0.004819653928279877,
0.10224402695894241,
0.00783839076757431,
0.728308916091919,
0.08545839786529541,
-0.45808473229408264,
0.2305787354707718,
-0.11641170084476471,
0.23899543285369873,
-0.3723754584789276,
-0.07543054223060608,
0.20928162336349487,
0.10516370832920074,
0.08846266567707062,
0.32578039169311523,
0.09509517252445221,
0.29844000935554504,
-0.1087542474269867,
0.29639628529548645,
-0.11190927773714066,
-0.3506024181842804,
0.1632794886827469,
-0.052392974495887756,
-0.14808328449726105,
0.0846242606639862,
0.308575838804245,
-0.1369626820087433,
-0.31284183263778687,
0.15287888050079346,
0.1553453505039215,
0.016954882070422173,
0.22334527969360352,
0.09177784621715546,
0.04772491380572319,
-0.2605944275856018,
0.10061696916818619,
0.2398095428943634,
0.1106705591082573,
-0.2932240962982178,
-0.5108305215835571,
0.3054913878440857,
0.13862240314483643,
0.5063815116882324,
-0.07137352228164673,
0.19433175027370453,
-0.25966060161590576,
-0.7267714738845825,
0.03806231915950775,
-0.1777086853981018,
-0.08800728619098663,
-0.40979546308517456,
0.21732425689697266,
0.4251534342765808,
-0.03133011609315872,
-0.08732172846794128,
0.07651910930871964,
0.002762790769338608,
-0.09223287552595139,
0.12082614004611969,
-0.2006353735923767,
-0.3020075857639313,
-0.2600725293159485,
0.16327539086341858,
-0.035896994173526764,
-0.02173270657658577,
-0.1489546000957489,
-0.20226949453353882,
-0.1323419213294983,
-0.07457240670919418,
0.1339816153049469,
0.3763667941093445,
0.31418511271476746,
-0.23096957802772522,
0.24542218446731567,
0.19165857136249542,
0.1943834125995636,
0.48975566029548645,
0.3244423270225525,
-0.14751358330249786,
-0.3672802746295929,
0.06870874762535095,
-0.08485540002584457,
-0.35012760758399963,
0.544935405254364,
0.12925320863723755,
-0.10608167946338654,
-0.1199946254491806,
0.29162612557411194,
-0.19316281378269196,
0.10020163655281067,
0.08924639970064163,
0.14231997728347778,
-0.11829037219285965,
-0.1122715026140213,
-0.019030991941690445,
0.32959067821502686,
-0.024067476391792297,
0.4348650872707367,
-0.28658947348594666,
-0.3694676160812378,
0.41469332575798035,
0.2569870054721832,
1.2366275787353516,
0.04609544202685356,
0.39333778619766235,
0.34145399928092957,
0.03473497927188873,
0.06557716429233551,
0.07201369106769562,
0.22933556139469147,
-0.6562089323997498,
-0.6120426654815674,
-0.09797076880931854,
-0.0758785828948021,
-0.12016847729682922,
-0.23935618996620178,
-0.174130380153656,
0.09124025702476501,
-0.06660270690917969,
-0.059213586151599884,
-0.1036204993724823,
-0.1261564940214157,
0.1411096602678299,
-0.11240695416927338,
-0.054142341017723083,
0.1256670206785202,
0.011179359629750252,
0.32705795764923096,
-0.04325515776872635,
-0.15606370568275452,
-0.48689255118370056,
-0.13452288508415222,
0.06121845543384552,
0.1406804472208023,
-0.22077882289886475,
-0.03333055227994919,
0.25348371267318726,
-0.018783263862133026,
-0.5261369347572327,
0.1972668468952179,
0.32048630714416504,
0.08935856819152832,
-0.15742114186286926,
0.28890523314476013,
0.40729764103889465,
0.32366496324539185,
0.12848639488220215,
-0.12665341794490814,
0.21186932921409607,
0.010849185287952423,
0.03568193316459656,
-0.1738763451576233,
-0.11632154881954193,
-0.23180317878723145,
-0.5437464714050293,
-0.08735963702201843,
-0.22435356676578522,
-0.15008173882961273,
0.07481297850608826,
-0.2670249342918396,
-0.12142758071422577,
-0.21746602654457092,
0.13540323078632355,
0.05859564244747162,
-0.34670931100845337,
0.18456783890724182,
0.30120211839675903,
-0.4954584240913391,
-0.1523372232913971,
0.37724554538726807,
-0.08860650658607483,
0.36397063732147217,
0.17684178054332733,
-0.0010815933346748352,
-0.22468434274196625,
-0.01319248229265213,
0.2531036138534546,
0.40288543701171875,
-0.5410004258155823,
0.1971445232629776,
-0.09422135353088379,
-0.18028663098812103,
0.05257352441549301,
0.6512400507926941,
0.21428747475147247,
0.02652786672115326,
0.037193164229393005,
-0.11477979272603989,
-0.1716734915971756,
0.009695380926132202,
-0.1571933776140213,
0.46149933338165283,
0.191560298204422,
0.36209121346473694,
-0.16093774139881134,
0.28560134768486023,
-0.33735769987106323,
0.14038358628749847,
-0.2061651647090912,
0.13664120435714722,
-0.24342699348926544,
-0.23380634188652039,
0.20155611634254456,
-0.08499100804328918,
0.03735547885298729,
0.37056493759155273,
-0.274194598197937,
-0.12629945576190948,
-0.18932272493839264,
0.1316072940826416,
0.19922813773155212,
-0.011009488254785538,
-0.19032041728496552,
0.34927064180374146,
0.087928906083107,
-0.14803962409496307,
0.17073825001716614,
0.3758660554885864,
0.12002624571323395,
-0.05042809993028641,
0.36656591296195984,
0.05885511264204979,
0.15303269028663635,
0.049067143350839615,
-0.034138619899749756,
-0.039973385632038116,
-0.0009199269115924835,
-0.05725967511534691,
-0.38225099444389343,
-0.054598696529865265,
-0.004486542195081711,
0.3010939955711365,
0.2424117922782898,
-0.16335651278495789,
0.13379494845867157,
0.08890625834465027,
-0.23257574439048767,
0.2207661122083664,
0.4038740396499634,
0.2631615996360779,
-0.3139934539794922,
-0.382260799407959,
0.17839904129505157,
0.16733922064304352,
-0.1711331307888031,
-0.019973205402493477,
0.2353159785270691,
0.21646642684936523,
-0.08213136345148087,
0.4728800058364868,
0.017869360744953156,
-0.1868470013141632,
-0.11411994695663452,
0.12242649495601654,
0.4390067160129547,
-0.5575623512268066,
0.11663129925727844,
0.4097650647163391,
-0.240172877907753,
0.21816587448120117,
0.47526034712791443,
0.004801055416464806,
0.05835455283522606,
0.011695547960698605,
-0.12194152176380157,
0.31900671124458313,
-0.3358263075351715,
-0.04123842343688011,
0.010505804792046547,
-0.41206610202789307,
0.22479906678199768,
0.267311692237854,
-0.12770187854766846,
-0.03209994360804558,
0.1130916103720665,
0.6813116073608398,
-0.010357694700360298,
-0.505459725856781,
-0.17896531522274017,
0.2527173161506653,
-0.3298311233520508,
-0.0805707722902298,
-0.0402873270213604,
-0.1782366782426834,
-0.4391256868839264,
0.13934211432933807,
0.012965894304215908,
0.0438879132270813,
0.6352000832557678,
0.09819041192531586,
-0.13803142309188843,
-0.2908281087875366,
-0.2516077160835266,
-0.02390866167843342,
0.14237844944000244,
-0.33007022738456726,
0.29158446192741394,
-0.044830065220594406,
-0.4020322561264038,
0.3077085316181183,
0.18452134728431702,
0.2283809781074524,
0.3099111318588257,
0.2109803855419159,
0.02614147961139679,
-0.025815756991505623,
0.24790194630622864,
-0.1868031620979309,
0.35561227798461914,
0.13326504826545715,
-0.27032071352005005,
0.20474089682102203,
0.14253777265548706,
-0.19804173707962036,
0.07776550948619843,
-0.1616828888654709,
0.3494873642921448,
-0.11006606370210648,
0.6278562545776367,
0.008274266496300697,
0.1028701663017273,
0.09304831922054291,
0.08162324130535126,
-0.2723430097103119,
0.17085620760917664,
-0.06194771081209183,
0.045584194362163544,
0.11683831363916397,
-0.02299966849386692,
0.0737537369132042,
0.21156367659568787,
0.22837233543395996,
0.5994604825973511,
-0.6272451877593994,
-0.2227475643157959,
0.13197483122348785,
-0.3467048406600952,
0.6499618291854858,
-0.049900371581315994,
0.24532507359981537,
-0.15150722861289978,
0.012425601482391357,
-0.16474997997283936,
0.00906725600361824,
0.14613980054855347,
0.10217155516147614,
0.24024848639965057,
0.3945762515068054,
-0.21800586581230164,
0.10452164709568024,
-0.2925480008125305,
-0.25424817204475403,
0.14499026536941528,
-0.18180686235427856,
0.23732346296310425,
-0.12028521299362183,
0.11639715731143951,
0.13288867473602295,
-0.3119300603866577,
-0.11798588931560516,
0.0009848767658695579,
0.2725646495819092,
0.2818931043148041,
0.018499113619327545,
-0.1818704605102539,
-0.03730938956141472,
-0.2179861068725586,
-0.20332792401313782,
-0.35729116201400757,
0.14941179752349854,
-0.08755557239055634,
0.19433465600013733,
-0.009613633155822754,
-0.4762854278087616,
-0.4858578145503998,
0.24095842242240906,
0.10662543028593063,
0.18597440421581268,
-0.05316704884171486,
0.1687425822019577,
-0.1279125213623047,
0.1182837188243866,
0.1896006166934967,
0.3774234354496002,
0.052870552986860275,
0.1332927644252777,
-0.35516852140426636,
-0.4628089666366577,
0.5343228578567505,
-0.28468620777130127,
0.10852834582328796,
-0.1414751559495926,
0.11587297916412354,
-0.10614819824695587,
-0.4257773458957672,
-0.36005711555480957,
-0.08605015277862549,
-0.11113812774419785,
-0.06263961642980576,
-0.3132001757621765,
0.16467119753360748,
-0.24727541208267212,
-0.01174011081457138,
-0.046509429812431335,
0.1899588257074356,
0.24097849428653717,
-0.013833872973918915,
0.3342031240463257,
0.008717432618141174
] |
https://github.com/huggingface/datasets/issues/6603 | ```
ds = datasets.Dataset.from_dict(dict(a=[i for i in range(100)]))
ds.map(lambda item: dict(b=item['a'] * 2), cache_file_name="/tmp/whatever-fn") # this worked
ds.map(lambda item: dict(b=item['a'] * 2), cache_file_name="/tmp/whatever-folder/filename") # this failed
ds.map(lambda item: dict(b=item['a'] * 2), cache_file_name="/tmp/whatever-folder/") # this failed
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/whatever-folder/tmp1_izxvoo'
```
It will fail if the filename parents do not exists. If we have `os.makedirs("/tmp/whatever-folder")`, then it worked.
Maybe add the `mkdir -p` into the map function? | datasets map `cache_file_name` does not work | ### Describe the bug
In the documentation `datasets.Dataset.map` arg `cache_file_name` is said to be a string, but it doesn't work.
### Steps to reproduce the bug
1. pick a dataset
2. write a map function
3. do `ds.map(..., cache_file_name='some_filename')`
4. it crashes
### Expected behavior
It will tell you the filename you specified does not exist or it will generate a new file and tell you the filename does not exist.
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.10.201-168.748.amzn2int.x86_64-x86_64-with-glibc2.26
- Python version: 3.10.13
- `huggingface_hub` version: 0.20.2
- PyArrow version: 14.0.2
- Pandas version: 2.1.4
- `fsspec` version: 2023.12.2 | 71 | datasets map `cache_file_name` does not work
### Describe the bug
In the documentation `datasets.Dataset.map` arg `cache_file_name` is said to be a string, but it doesn't work.
### Steps to reproduce the bug
1. pick a dataset
2. write a map function
3. do `ds.map(..., cache_file_name='some_filename')`
4. it crashes
### Expected behavior
It will tell you the filename you specified does not exist or it will generate a new file and tell you the filename does not exist.
### Environment info
- `datasets` version: 2.16.0
- Platform: Linux-5.10.201-168.748.amzn2int.x86_64-x86_64-with-glibc2.26
- Python version: 3.10.13
- `huggingface_hub` version: 0.20.2
- PyArrow version: 14.0.2
- Pandas version: 2.1.4
- `fsspec` version: 2023.12.2
```
ds = datasets.Dataset.from_dict(dict(a=[i for i in range(100)]))
ds.map(lambda item: dict(b=item['a'] * 2), cache_file_name="/tmp/whatever-fn") # this worked
ds.map(lambda item: dict(b=item['a'] * 2), cache_file_name="/tmp/whatever-folder/filename") # this failed
ds.map(lambda item: dict(b=item['a'] * 2), cache_file_name="/tmp/whatever-folder/") # this failed
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/whatever-folder/tmp1_izxvoo'
```
It will fail if the filename parents do not exists. If we have `os.makedirs("/tmp/whatever-folder")`, then it worked.
Maybe add the `mkdir -p` into the map function? | [
-0.17607736587524414,
-0.22184181213378906,
0.028800055384635925,
0.3735642731189728,
0.35459649562835693,
0.26312312483787537,
0.2672741711139679,
0.3279056251049042,
0.2868582606315613,
0.11249053478240967,
-0.24395491182804108,
0.40131598711013794,
-0.07068009674549103,
-0.2143307328224182,
0.06859278678894043,
-0.09317554533481598,
0.23042599856853485,
-0.0648798942565918,
-0.11833829432725906,
0.14091677963733673,
-0.2557426989078522,
0.236441507935524,
-0.11755739897489548,
0.17706720530986786,
-0.5260127186775208,
-0.011501542292535305,
-0.23407858610153198,
0.27789026498794556,
0.06891900300979614,
-0.3888252377510071,
0.33980366587638855,
-0.07571178674697876,
0.07648126780986786,
0.5808266401290894,
-0.00011844107939396054,
-0.07618460059165955,
0.3528293967247009,
-0.07929790765047073,
-0.1981300413608551,
-0.24544869363307953,
-0.3356224000453949,
-0.10690271854400635,
-0.143442302942276,
-0.4662705659866333,
0.029818706214427948,
0.04323360323905945,
0.31940340995788574,
-0.6360977292060852,
0.15896303951740265,
0.34154078364372253,
0.18659162521362305,
0.05042362958192825,
0.09682778269052505,
-0.12909814715385437,
0.41369932889938354,
0.0614350363612175,
-0.22571752965450287,
0.12854337692260742,
0.2141110599040985,
-0.2846508324146271,
-0.05869776010513306,
0.1461564153432846,
-0.32116663455963135,
0.004324154928326607,
0.3215602934360504,
0.36089062690734863,
0.028087234124541283,
-0.2869876027107239,
0.1427011787891388,
0.23800380527973175,
0.524799108505249,
-0.6610263586044312,
-0.3920958936214447,
-0.21467654407024384,
-0.33983612060546875,
-0.1916404813528061,
0.3204496502876282,
-0.08247216045856476,
-0.15347403287887573,
0.17194949090480804,
0.017084937542676926,
-0.14340606331825256,
0.1595499962568283,
0.07916469871997833,
0.12464562058448792,
-0.03619224950671196,
-0.16742677986621857,
0.1100246012210846,
0.11193647980690002,
-0.1047213226556778,
-0.08047112822532654,
-0.2880233824253082,
-0.14569461345672607,
0.27953246235847473,
-0.48956745862960815,
-0.06959474086761475,
0.11938675493001938,
0.23011262714862823,
0.0831494927406311,
-0.16566824913024902,
0.09581534564495087,
-0.2325008362531662,
-0.23726597428321838,
0.25074124336242676,
-0.05621275678277016,
0.4245498478412628,
0.3036561608314514,
0.21429765224456787,
0.11965765804052353,
-0.06283623725175858,
-0.16079208254814148,
-0.09712310135364532,
0.20739439129829407,
-0.3050763010978699,
0.11636359989643097,
-0.006624039262533188,
0.33480533957481384,
0.03161335736513138,
-0.08606595546007156,
0.05677039921283722,
-0.17817506194114685,
0.08316080272197723,
0.24467995762825012,
0.4652714431285858,
-0.07626960426568985,
-0.07552932947874069,
-0.10496403276920319,
-0.04887092113494873,
0.07420598715543747,
0.1470479667186737,
-0.2865033447742462,
0.10310997068881989,
-0.2549595236778259,
0.2964087426662445,
0.14834709465503693,
-0.24937163293361664,
0.3380090594291687,
-0.15306703746318817,
-0.1008477658033371,
-0.050486061722040176,
-0.23347772657871246,
-0.1420241892337799,
0.16765376925468445,
0.22199104726314545,
-0.3111322522163391,
0.26870593428611755,
0.1174180805683136,
-0.3321484625339508,
-0.10723542422056198,
0.11611436307430267,
-0.4583888351917267,
-0.22055162489414215,
0.045720115303993225,
0.07625079154968262,
-0.09182611107826233,
0.05462052300572395,
-0.2804286777973175,
0.10765908658504486,
0.41306307911872864,
-0.34940770268440247,
0.2077585607767105,
0.15395018458366394,
-0.3534706234931946,
-0.400282084941864,
0.19392216205596924,
0.7271989583969116,
-0.20079834759235382,
-0.01846037060022354,
-0.11004774272441864,
0.06197599694132805,
0.07607942074537277,
0.13195368647575378,
0.16947399079799652,
-0.02659282088279724,
-0.5221890807151794,
0.4783223867416382,
0.20976169407367706,
-0.4630473852157593,
-0.5604048371315002,
0.22593837976455688,
-0.0593024343252182,
-0.06148960441350937,
0.2373247891664505,
0.020669374614953995,
0.03455822542309761,
-0.3140615224838257,
0.043053049594163895,
0.028289437294006348,
-0.08615681529045105,
0.07139942049980164,
-0.25959116220474243,
-0.1464497298002243,
0.16503208875656128,
0.035321809351444244,
-0.03150598704814911,
0.28156280517578125,
0.2509020268917084,
0.11134370416402817,
0.16030454635620117,
0.07343810051679611,
0.16251444816589355,
0.21349909901618958,
0.289257287979126,
0.08601094782352448,
0.12354420125484467,
-0.3890576958656311,
-0.6749588251113892,
0.37025707960128784,
0.025901727378368378,
-0.37912794947624207,
-0.2171529233455658,
-0.2124515175819397,
-0.028054550290107727,
-0.01181437075138092,
-0.03432413935661316,
-0.21874038875102997,
0.05867106840014458,
0.11698102951049805,
0.3121252655982971,
-0.09314548969268799,
-0.22909922897815704,
0.4488699734210968,
-0.03187405690550804,
0.10205795615911484,
-0.3207158148288727,
0.13243459165096283,
-0.06765985488891602,
-0.12667004764080048,
-0.37451571226119995,
-0.11585067957639694,
0.311179518699646,
-0.06758477538824081,
-0.11352217197418213,
0.571473240852356,
0.16207772493362427,
0.07296155393123627,
-0.06827577948570251,
0.15201044082641602,
0.031574130058288574,
-0.1870104968547821,
-0.09284760057926178,
0.12550970911979675,
0.16886620223522186,
-0.03626951575279236,
-0.16814327239990234,
-0.09699276089668274,
-0.22932979464530945,
0.1686955839395523,
-0.1769590675830841,
0.08647993952035904,
0.14281538128852844,
-0.1565471738576889,
0.06351713836193085,
-0.17744474112987518,
0.0712597668170929,
-0.14086532592773438,
0.5706049203872681,
-0.050698041915893555,
0.0031956806778907776,
-0.09242009371519089,
0.5194137692451477,
-0.07325275242328644,
0.2402561604976654,
0.013513220474123955,
-0.15376845002174377,
0.033486828207969666,
0.2010449320077896,
0.266486257314682,
0.648285984992981,
0.19890658557415009,
0.21910454332828522,
-0.004306217655539513,
-0.09616154432296753,
-0.09691157937049866,
0.18753230571746826,
-0.07579696178436279,
0.11290420591831207,
-0.05777323246002197,
0.07640637457370758,
0.042690545320510864,
-0.2852177321910858,
-0.24375247955322266,
0.13641533255577087,
0.15726900100708008,
-0.2997295558452606,
-0.03425806015729904,
-0.25673604011535645,
-0.05416373535990715,
0.10299014300107956,
-0.0724862590432167,
-0.18343830108642578,
-0.15244653820991516,
-0.09971028566360474,
0.3727891147136688,
-0.023074228316545486,
0.36004963517189026,
0.19400465488433838,
0.13611163198947906,
0.068972647190094,
-0.4706507921218872,
-0.5016130805015564,
-0.17289382219314575,
-0.013186205178499222,
-0.04833521693944931,
0.17320871353149414,
-0.16903960704803467,
0.13428181409835815,
-0.13743716478347778,
0.009100914001464844,
-0.4435892403125763,
-0.2364819049835205,
0.08610296249389648,
-0.04524444788694382,
0.24117045104503632,
0.1191512942314148,
0.12782035768032074,
-0.08858034014701843,
-0.06777121126651764,
0.15907099843025208,
-0.23433101177215576,
-0.3170695900917053,
-0.13910064101219177,
0.317398339509964,
-0.08391876518726349,
-0.281765878200531,
-0.01657017320394516,
-0.15115875005722046,
-0.39966750144958496,
0.3200356066226959,
-0.24031399190425873,
0.13542136549949646,
0.4026726484298706,
0.0775531679391861,
0.2214491069316864,
-0.17422673106193542,
0.05118474364280701,
-0.29555168747901917,
-0.27502942085266113,
0.31327179074287415,
-0.15679816901683807,
-0.1592933088541031,
-0.023949988186359406,
0.02579250931739807,
-0.005131320562213659,
0.12925344705581665,
-0.34093984961509705,
-0.33877748250961304,
-0.2280862182378769,
0.29764091968536377,
0.185675248503685,
0.3060415983200073,
0.45813196897506714,
0.07507087290287018,
-0.018754690885543823,
-0.31142720580101013,
-0.32385703921318054,
0.04476339370012283,
0.19730590283870697,
0.3702479600906372,
0.3288685083389282,
0.22662796080112457,
0.07205329090356827,
0.31238216161727905,
0.42980846762657166,
0.08949194848537445,
0.5353960394859314,
-0.2770107686519623,
0.5596063137054443,
-0.25957220792770386,
-0.330750048160553,
-0.07360385358333588,
-0.09497937560081482,
-0.20661363005638123,
0.0767601802945137,
0.05431845411658287,
-0.06505689769983292,
-0.15503308176994324,
-0.002051815390586853,
-0.16745096445083618,
-0.14687815308570862,
-0.1656271368265152,
-0.16280019283294678,
-0.036362238228321075,
0.1005556732416153,
0.07400635629892349,
-0.20700466632843018,
-0.17280644178390503,
0.20685017108917236,
0.21397289633750916,
0.19978369772434235,
-0.07678532600402832,
0.11207805573940277,
0.056831587105989456,
-0.48041799664497375,
0.28036218881607056,
0.09508869051933289,
0.2249094396829605,
-0.3019351065158844,
0.06235969066619873,
-0.12550443410873413,
0.12720558047294617,
1.054375171661377,
-0.2994754910469055,
0.17233246564865112,
0.02432040125131607,
0.1521960198879242,
-0.33039289712905884,
0.14677846431732178,
0.1779683381319046,
0.3921479284763336,
-0.0745486319065094,
0.5314957499504089,
-0.24885477125644684,
-0.14689743518829346,
-0.15192344784736633,
0.1488090306520462,
0.06147517263889313,
-0.17702807486057281,
-0.03830882906913757,
-0.04012327268719673,
-0.20263192057609558,
-0.11895706504583359,
0.20031344890594482,
-0.0031649023294448853,
0.3156298100948334,
-0.08819673210382462,
-0.09764809906482697,
-0.23221874237060547,
0.14234912395477295,
0.005868948996067047,
0.4494142532348633,
0.07580838352441788,
0.15267688035964966,
0.07145872712135315,
0.010240397416055202,
0.10666190087795258,
0.5032629370689392,
-0.4493216276168823,
-0.08201103657484055,
0.07027772068977356,
0.10486213862895966,
0.1899588704109192,
0.26463544368743896,
-0.30336204171180725,
-0.1931574046611786,
-0.16000358760356903,
0.145234152674675,
-0.21831519901752472,
0.03735312074422836,
0.2177244871854782,
0.17630289494991302,
-0.15136390924453735,
-0.3704390227794647,
0.6049964427947998,
0.4239090085029602,
-0.1732603907585144,
0.6924008727073669,
0.13429975509643555,
-0.49462684988975525,
0.32078832387924194,
-0.23651131987571716,
0.7698167562484741,
-0.0786503329873085,
0.1797596514225006,
-0.030746567994356155,
-0.03331786394119263,
0.6181027889251709,
-0.09893947839736938,
0.12524984776973724,
-0.2436280995607376,
-0.43548837304115295,
0.0023951157927513123,
-0.04160168766975403,
0.18642188608646393,
0.2702312469482422,
-0.26192206144332886,
0.4083278477191925,
0.1312282234430313,
0.40333834290504456,
0.007669679820537567,
-0.09000982344150543,
-0.1402008831501007,
-0.3525203466415405,
-0.320141077041626,
0.14351803064346313,
-0.009729389101266861,
0.16120341420173645,
0.11982016265392303,
0.06885191798210144,
-0.1662663370370865,
-0.25423818826675415,
-0.28699126839637756,
0.06502124667167664,
-0.37513411045074463,
0.1728639304637909,
-0.08894418179988861,
-0.016356103122234344,
-0.14209923148155212,
0.5666033625602722,
0.09124001860618591,
0.07658647745847702,
-0.2622910439968109,
0.16743037104606628,
0.05937550589442253,
0.24461443722248077,
-0.19434431195259094,
-0.1637740582227707,
0.27430474758148193,
0.18150167167186737,
0.020136207342147827,
0.13463962078094482,
-0.30010294914245605,
-0.28128695487976074,
0.07783657312393188,
0.06587480008602142,
-0.10664859414100647,
-0.07588481158018112,
-0.21532616019248962,
-0.17203941941261292,
-0.021247029304504395,
-0.16831430792808533,
0.09566737711429596,
0.038673385977745056,
-0.25729355216026306,
0.23430871963500977,
-0.23640549182891846,
-0.1633301079273224,
0.01040424220263958,
0.5188113451004028,
-0.2784143388271332,
0.1564294546842575,
0.28322750329971313,
-0.05489938333630562,
-0.1437949240207672,
-0.13578172028064728,
0.09105938673019409,
-0.027213914319872856,
-0.30092403292655945,
0.19182127714157104,
-0.03815869987010956,
-0.09157496690750122,
-0.03350348398089409,
0.037533991038799286,
0.2722629904747009,
0.1553608626127243,
-0.05424121394753456,
-0.3222201466560364,
-0.5103200674057007,
0.10036152601242065,
-0.1441219449043274,
0.2948133647441864,
0.07049208879470825,
-0.16727860271930695,
0.003797084093093872,
0.10145142674446106,
-0.27949008345603943,
0.20907330513000488,
-0.13852044939994812,
0.030613191425800323,
0.22106358408927917,
0.2297373116016388,
0.4780040383338928,
-0.36895251274108887,
0.054347507655620575,
0.36668917536735535,
-0.20047160983085632,
-0.17687402665615082,
-0.13014858961105347,
0.13598906993865967,
0.1728372424840927,
0.009322073310613632,
-0.23943433165550232,
-0.28634870052337646,
-0.10151655972003937,
-0.4375952482223511,
0.10874655097723007,
0.5891183614730835,
-0.030906401574611664,
0.16983374953269958,
0.39250102639198303,
-0.053081661462783813,
-0.07793936133384705,
0.14892607927322388,
-0.09909069538116455,
0.18897612392902374,
-0.08162908256053925,
0.15742994844913483,
-0.17506633698940277,
0.062216997146606445,
0.09878512471914291,
0.043370313942432404,
-0.17644932866096497,
-0.22531931102275848,
0.32989466190338135,
-0.2808152437210083,
-0.2589968144893646,
0.3182373642921448,
0.40115535259246826,
-0.02626064419746399,
-0.10547598451375961,
0.013075284659862518,
0.3512314558029175,
0.13547813892364502,
-0.2714264690876007,
-0.18113145232200623,
0.5995587706565857,
0.08634589612483978,
0.2227325588464737,
0.24100063741207123,
-0.029970094561576843,
-0.07818866521120071,
0.050927117466926575,
0.05441049486398697,
0.5116168856620789,
-0.17838169634342194,
0.09671364724636078,
0.27641037106513977,
0.1697774976491928,
0.29196619987487793,
0.47952210903167725,
0.2493867576122284,
0.14013779163360596,
0.7628121376037598,
-0.10371872782707214,
0.13994631171226501,
-0.2028885781764984,
0.12825995683670044,
-0.08445030450820923,
-0.2567514181137085,
0.2527877986431122,
0.005351759493350983,
-0.26871296763420105,
0.1592215746641159,
-0.1473209261894226,
0.3986867070198059,
-0.4733911454677582,
-0.00018682703375816345,
0.027519695460796356,
0.04588582366704941,
-0.15988370776176453,
-0.21790221333503723,
0.36666589975357056,
-0.040458619594573975,
0.14260786771774292,
-0.10445936024188995,
0.015646664425730705,
-0.32593870162963867,
0.6462470293045044,
-0.05517835542559624,
0.052360765635967255,
0.019735287874937057,
-0.2075229287147522,
0.3177310824394226,
0.3093344569206238,
-0.2679886817932129,
0.30077919363975525,
-0.1458984762430191,
-0.2686975598335266,
0.02059224620461464,
0.34564489126205444,
0.3395479917526245,
0.17736074328422546,
0.002862337976694107,
0.04197242483496666,
0.05834880843758583,
-0.13255956768989563,
-0.05734395608305931,
0.30593740940093994,
0.011169370263814926,
-0.2425045520067215,
0.17898167669773102,
0.106282077729702,
-0.11006997525691986,
0.10175883769989014,
0.13376908004283905,
0.28979286551475525,
-0.029111403971910477,
0.21198925375938416,
-0.2599180042743683,
-0.11439871042966843,
-0.071402907371521,
0.07698346674442291,
-0.4897366464138031,
-0.09999962896108627,
0.4868956208229065,
-0.3041272759437561,
0.2139866054058075,
-0.011052142828702927,
0.07125724107027054,
0.08552852272987366,
0.15827986598014832,
0.4242587089538574,
0.009067751467227936,
-0.29236096143722534,
0.05228477716445923,
-0.6260427236557007,
0.050910450518131256,
0.0008457433432340622,
0.12937244772911072,
-0.03438624367117882,
-0.08338725566864014,
-0.009164486080408096,
-0.01876995712518692,
0.2579076886177063,
-0.06844251602888107,
0.15340588986873627,
0.2848411202430725,
-0.2412099838256836,
-0.2543213963508606,
-0.15784308314323425,
0.08458491414785385,
0.16692504286766052,
-0.5349953770637512,
0.12698209285736084,
-0.18727034330368042,
0.021489322185516357,
-0.1739606112241745,
0.1655329167842865,
0.039249420166015625,
-0.11694193631410599,
0.4768911600112915,
-0.03529845178127289,
0.07120048999786377,
-0.06937666982412338,
0.051613032817840576,
-0.22448566555976868,
-0.0451580211520195,
-0.09824510663747787,
-0.15245342254638672,
-0.030182017013430595,
0.27062129974365234,
-0.5547441840171814,
-0.4552207887172699,
-0.34106630086898804,
0.13519111275672913,
0.14952975511550903,
-0.039481695741415024,
-0.1431344449520111,
0.18664434552192688,
-0.2662848234176636,
0.05133460834622383,
0.13082528114318848,
0.3726010322570801,
-0.25540441274642944,
0.45610299706459045,
-0.11410325765609741,
-0.3293452858924866,
0.6647634506225586,
-0.5780150294303894,
-0.2781299650669098,
0.12303587794303894,
0.19718903303146362,
0.23298689723014832,
-0.31634262204170227,
-0.3019963502883911,
-0.003922015428543091,
0.2772359848022461,
-0.05645778402686119,
-0.30976974964141846,
-0.10269960761070251,
-0.3300764560699463,
0.1861218959093094,
0.030316345393657684,
0.23580855131149292,
0.25858718156814575,
-0.15413770079612732,
0.2881373167037964,
-0.33197569847106934
] |
https://github.com/huggingface/datasets/issues/6600 | Hi! Parquet is the only format that supports complex/nested features such as `Translation`. So, this should work:
```python
test_dataset = load_dataset("opus100", name="en-fr", split="test")
# Save with .to_parquet()
test_parquet_path = "try_testset_save.parquet"
test_dataset.to_parquet(test_parquet_path)
# Load dataset from the Parquet
loaded_dataset = load_dataset("parquet", data_files=test_parquet_path)
print(test_dataset_fromfile[0]["translation"])
print(test_dataset_fromfile[0]["translation"]["en"])
``` | Loading CSV exported dataset has unexpected format | ### Describe the bug
I wanted to be able to save a HF dataset for translations and load it again in another script, but I'm a bit confused with the documentation and the result I've got so I'm opening this issue to ask if this behavior is as expected.
### Steps to reproduce the bug
The documentation I've mainly consulted is https://huggingface.co/docs/datasets/v2.16.1/en/package_reference/loading_methods#datasets.load_dataset and https://huggingface.co/docs/datasets/package_reference/main_classes#datasets.Dataset (where I've found `.to_csv()`)
```python
# Load a dataset of translations
test_dataset = load_dataset("opus100", name="en-fr", split="test")
# Save with .to_csv()
test_csv_path = "try_testset_save.csv"
test_dataset.to_csv(test_csv_path)
# Load dataset from the CSV
loaded_dataset = load_dataset("csv", data_files=test_csv_path)
print(test_dataset_fromfile[0]["translation"])
print(test_dataset_fromfile[0]["translation"]["en"])
```
```
Creating CSV from Arrow format: 100%
2/2 [00:00<00:00, 47.99ba/s]
Downloading data files: 100%
1/1 [00:00<00:00, 65.33it/s]
Extracting data files: 100%
1/1 [00:00<00:00, 42.10it/s]
Generating train split:
2000/0 [00:00<00:00, 47486.09 examples/s]
{'en': "She wasn't going to vaccinate her kid against polio, no way.", 'fr': 'Elle ne vaccinerait pas son enfant contre la polio. Pas question.'}
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[29], line 11
9 loaded_dataset = load_dataset("csv", data_files=test_csv_path)
10 print(test_dataset_fromfile[0]["translation"])
---> 11 print(test_dataset_fromfile[0]["translation"]["en"])
TypeError: string indices must be integers, not 'str'
```
### Expected behavior
Each translation was saved as a stringified dict like `"{'en': ""She wasn't going to vaccinate her kid against polio, no way."", 'fr': 'Elle ne vaccinerait pas son enfant contre la polio. Pas question.'}"` where I would have expected 2 columns (1st with English segments, and 2nd with French segments), and I was expecting `load_dataset` to infer the type of feature automatically as I haven't seen anything about it in the documentation.
Do you have an example of how to effectively save and load datasets of translations ?
### Environment info
- `datasets` version: 2.15.0
- Platform: Linux-3.10.0-1160.36.2.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.11.5
- `huggingface_hub` version: 0.16.4
- PyArrow version: 14.0.2
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0 | 44 | Loading CSV exported dataset has unexpected format
### Describe the bug
I wanted to be able to save a HF dataset for translations and load it again in another script, but I'm a bit confused with the documentation and the result I've got so I'm opening this issue to ask if this behavior is as expected.
### Steps to reproduce the bug
The documentation I've mainly consulted is https://huggingface.co/docs/datasets/v2.16.1/en/package_reference/loading_methods#datasets.load_dataset and https://huggingface.co/docs/datasets/package_reference/main_classes#datasets.Dataset (where I've found `.to_csv()`)
```python
# Load a dataset of translations
test_dataset = load_dataset("opus100", name="en-fr", split="test")
# Save with .to_csv()
test_csv_path = "try_testset_save.csv"
test_dataset.to_csv(test_csv_path)
# Load dataset from the CSV
loaded_dataset = load_dataset("csv", data_files=test_csv_path)
print(test_dataset_fromfile[0]["translation"])
print(test_dataset_fromfile[0]["translation"]["en"])
```
```
Creating CSV from Arrow format: 100%
2/2 [00:00<00:00, 47.99ba/s]
Downloading data files: 100%
1/1 [00:00<00:00, 65.33it/s]
Extracting data files: 100%
1/1 [00:00<00:00, 42.10it/s]
Generating train split:
2000/0 [00:00<00:00, 47486.09 examples/s]
{'en': "She wasn't going to vaccinate her kid against polio, no way.", 'fr': 'Elle ne vaccinerait pas son enfant contre la polio. Pas question.'}
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[29], line 11
9 loaded_dataset = load_dataset("csv", data_files=test_csv_path)
10 print(test_dataset_fromfile[0]["translation"])
---> 11 print(test_dataset_fromfile[0]["translation"]["en"])
TypeError: string indices must be integers, not 'str'
```
### Expected behavior
Each translation was saved as a stringified dict like `"{'en': ""She wasn't going to vaccinate her kid against polio, no way."", 'fr': 'Elle ne vaccinerait pas son enfant contre la polio. Pas question.'}"` where I would have expected 2 columns (1st with English segments, and 2nd with French segments), and I was expecting `load_dataset` to infer the type of feature automatically as I haven't seen anything about it in the documentation.
Do you have an example of how to effectively save and load datasets of translations ?
### Environment info
- `datasets` version: 2.15.0
- Platform: Linux-3.10.0-1160.36.2.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.11.5
- `huggingface_hub` version: 0.16.4
- PyArrow version: 14.0.2
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0
Hi! Parquet is the only format that supports complex/nested features such as `Translation`. So, this should work:
```python
test_dataset = load_dataset("opus100", name="en-fr", split="test")
# Save with .to_parquet()
test_parquet_path = "try_testset_save.parquet"
test_dataset.to_parquet(test_parquet_path)
# Load dataset from the Parquet
loaded_dataset = load_dataset("parquet", data_files=test_parquet_path)
print(test_dataset_fromfile[0]["translation"])
print(test_dataset_fromfile[0]["translation"]["en"])
``` | [
0.09366397559642792,
-0.301914244890213,
0.01883000135421753,
0.3817500174045563,
0.24329328536987305,
0.04965081065893173,
0.315578430891037,
0.07877084612846375,
0.13491548597812653,
0.09632612019777298,
-0.24815884232521057,
-0.04743877053260803,
0.17620520293712616,
0.2116120159626007,
0.334576278924942,
-0.143259659409523,
0.303672730922699,
0.08502645790576935,
-0.4367581605911255,
-0.1314423382282257,
-0.22809447348117828,
0.4494687020778656,
-0.07183337211608887,
0.09292539954185486,
0.11124391853809357,
0.14907757937908173,
-0.16879256069660187,
0.16885998845100403,
0.05831450968980789,
-0.229303777217865,
0.15809164941310883,
0.11135536432266235,
0.20604264736175537,
0.4037329852581024,
-0.00012558903836179525,
0.08201175928115845,
-0.004008529707789421,
-0.11978134512901306,
-0.18321989476680756,
-0.24709181487560272,
0.013846442103385925,
-0.09435887634754181,
0.06439365446567535,
-0.11815647035837173,
0.02706998586654663,
-0.13450400531291962,
-0.13870647549629211,
-0.3443034291267395,
0.16952162981033325,
0.2921079099178314,
0.15513762831687927,
0.38078078627586365,
-0.20691123604774475,
-0.06126517802476883,
0.3155248463153839,
0.19024182856082916,
-0.025867275893688202,
0.18207311630249023,
-0.17590224742889404,
0.009578272700309753,
0.03890467435121536,
0.1807984858751297,
-0.022536110132932663,
-0.09504105895757675,
0.22686965763568878,
0.23867985606193542,
-0.2990729808807373,
-0.10254624485969543,
0.06629277020692825,
0.2394334077835083,
0.4118885397911072,
-0.2540617883205414,
-0.34692665934562683,
-0.22601018846035004,
-0.20548218488693237,
-0.49688708782196045,
-0.01181543618440628,
0.2983764111995697,
0.21939000487327576,
0.2455936074256897,
0.0021458379924297333,
0.1572587788105011,
-0.20218238234519958,
0.07944722473621368,
-0.05701166018843651,
-0.27467289566993713,
-0.4432467222213745,
0.20950520038604736,
-0.10053601115942001,
0.04441240802407265,
-0.28067517280578613,
-0.24108102917671204,
-0.13238567113876343,
0.13618901371955872,
-0.05290745571255684,
0.18737244606018066,
0.000956118106842041,
0.05204154551029205,
0.20300623774528503,
-0.10234512388706207,
-0.0035112332552671432,
-0.10666832327842712,
-0.20315030217170715,
0.10552705079317093,
0.2893320918083191,
0.2503039538860321,
0.3184735178947449,
-0.18807272613048553,
-0.08066045492887497,
0.24730338156223297,
0.03743763267993927,
-0.19775620102882385,
0.09032571315765381,
-0.22214128077030182,
0.18519258499145508,
-0.03486087918281555,
0.1384364366531372,
-0.3499409854412079,
-0.344108521938324,
0.4105336666107178,
0.07247449457645416,
-0.030404679477214813,
-0.1886155605316162,
0.368207186460495,
-0.15960967540740967,
0.19882474839687347,
0.08393706381320953,
0.27583399415016174,
-0.37316766381263733,
-0.049918606877326965,
-0.1346273124217987,
0.03618386387825012,
-0.2330247461795807,
0.06911531835794449,
-0.14905868470668793,
-0.3503184914588928,
0.15646934509277344,
0.3039565682411194,
0.26387232542037964,
-0.3949246406555176,
-0.33764946460723877,
-0.17632398009300232,
0.5753581523895264,
0.09988685697317123,
0.23265564441680908,
0.30799365043640137,
0.3043743968009949,
-0.3076346814632416,
-0.12633071839809418,
-0.001629142090678215,
-0.30987030267715454,
-0.05339840054512024,
-0.17824402451515198,
0.0777551457285881,
-0.30883559584617615,
0.001614653505384922,
-0.3552803695201874,
0.21176278591156006,
0.019748732447624207,
-0.10038941353559494,
0.22126394510269165,
-0.1683315485715866,
-0.4414118826389313,
-0.28933006525039673,
0.2116909623146057,
0.6954666972160339,
-0.594170331954956,
-0.061713289469480515,
0.3312667906284332,
-0.2820900082588196,
0.09957116097211838,
0.4166431725025177,
-0.10718921571969986,
0.09920792281627655,
-0.5360670685768127,
0.13981619477272034,
-0.1136070191860199,
-0.24906842410564423,
-0.12198000401258469,
0.2797749936580658,
-0.10278473794460297,
0.3648049831390381,
0.061191461980342865,
-0.2536555528640747,
0.3905012607574463,
-0.05944492295384407,
0.0318523645401001,
0.09467076510190964,
0.10496758669614792,
0.06724431365728378,
-0.18414101004600525,
-0.02461627870798111,
0.32147011160850525,
-0.18389007449150085,
-0.1596299409866333,
0.14033080637454987,
0.2545219659805298,
-0.09682586789131165,
0.5173451900482178,
-0.17945393919944763,
0.0699932873249054,
0.33961647748947144,
-0.05361884459853172,
0.34479933977127075,
0.10261604189872742,
0.08534689992666245,
-0.5907803177833557,
0.083499476313591,
0.00992363691329956,
-0.17132163047790527,
0.11973530054092407,
-0.1440129578113556,
-0.36618873476982117,
0.07407650351524353,
-0.3803384006023407,
-0.04942398518323898,
-0.025771139189600945,
0.05852450057864189,
-0.1727597564458847,
0.27470916509628296,
0.030916787683963776,
0.2291923463344574,
-0.12471342086791992,
0.032503414899110794,
-0.45019352436065674,
0.3160610795021057,
0.14225585758686066,
0.111057348549366,
-0.1276891976594925,
0.2686977982521057,
0.32174211740493774,
-0.2867192029953003,
-0.09821219742298126,
0.40847134590148926,
0.1916053295135498,
0.5150744915008545,
-0.3099617063999176,
-0.16017553210258484,
0.23352359235286713,
-0.12263708561658859,
-0.03437396138906479,
0.08803113549947739,
0.26291635632514954,
-0.02717769145965576,
-0.4010501205921173,
0.7048600912094116,
-0.2557154893875122,
0.02441546320915222,
0.1216658279299736,
-0.2083168774843216,
0.21613457798957825,
0.03769324719905853,
-0.2483404278755188,
-0.4619513154029846,
0.2661275863647461,
0.0061290934681892395,
0.20096580684185028,
0.09584201872348785,
-0.32843005657196045,
0.16210077702999115,
0.6247155070304871,
-0.1647123396396637,
-0.22559350728988647,
0.23720015585422516,
-0.02554737776517868,
-0.12538397312164307,
0.10435931384563446,
0.052061811089515686,
0.29473885893821716,
-0.07442935556173325,
-0.016559282317757607,
0.20307029783725739,
0.06671915203332901,
-0.07879570126533508,
0.18826690316200256,
-0.16533194482326508,
0.2559555768966675,
0.32780712842941284,
0.011087000370025635,
-0.021526237949728966,
-0.4105904698371887,
0.26058489084243774,
-0.10149146616458893,
-0.05563519150018692,
-0.5951361060142517,
0.43554675579071045,
-0.3865439295768738,
0.03668674826622009,
-0.6840720772743225,
-0.05697440728545189,
-0.2996084690093994,
-0.18636417388916016,
-0.35323435068130493,
0.08111868798732758,
-0.139861598610878,
-0.19804638624191284,
-0.17179074883460999,
-0.10275900363922119,
-0.20311225950717926,
-0.15585841238498688,
0.1945091187953949,
0.07897317409515381,
-0.20976819097995758,
-0.11472521722316742,
-0.01702025905251503,
0.0033126547932624817,
0.25582751631736755,
-0.22546455264091492,
-0.1321776807308197,
-0.364770770072937,
-0.17866250872612,
0.35314616560935974,
-0.10883264243602753,
0.1628679484128952,
0.16038288176059723,
0.011422421783208847,
-0.1337263286113739,
-0.010647103190422058,
0.2763715386390686,
-0.045990776270627975,
-0.08090661466121674,
0.28254637122154236,
-0.22210940718650818,
-0.13108676671981812,
-0.11670665442943573,
-0.3198568820953369,
-0.179243266582489,
-0.045900993049144745,
0.2899854779243469,
-0.20031560957431793,
0.07381020486354828,
0.28041765093803406,
-0.014679718762636185,
-0.023228133097290993,
-0.04180971533060074,
-0.22650563716888428,
-0.40616679191589355,
-0.38542497158050537,
0.18678069114685059,
-0.41112497448921204,
-0.4877204895019531,
-0.10637254267930984,
0.1428385227918625,
-0.03237857669591904,
-0.0060820505023002625,
-0.47621309757232666,
-0.0013863630592823029,
-0.031361110508441925,
0.17597904801368713,
0.021223971620202065,
0.12813173234462738,
0.13371001183986664,
-0.26074111461639404,
0.15800729393959045,
-0.29099926352500916,
-0.32525667548179626,
0.11209481954574585,
0.17545291781425476,
-0.057383373379707336,
-0.028743907809257507,
0.43891361355781555,
-0.12308969348669052,
0.41652345657348633,
0.3598586320877075,
0.1371854692697525,
0.3457089066505432,
-0.25606444478034973,
0.5934515595436096,
-0.2602158784866333,
-0.28449687361717224,
0.041870176792144775,
-0.3534144163131714,
-0.13328580558300018,
0.40917569398880005,
-0.05039282143115997,
0.1678646057844162,
0.146378293633461,
0.019384555518627167,
-0.36231449246406555,
-0.3481951355934143,
0.26734113693237305,
-0.05594589561223984,
0.089724101126194,
0.05659153312444687,
0.1827598512172699,
-0.02427612617611885,
-0.12784047424793243,
0.0897882804274559,
0.3554983139038086,
0.2812337279319763,
0.13734446465969086,
-0.37124213576316833,
-0.1424160897731781,
-0.4037279486656189,
0.13164076209068298,
0.14616701006889343,
0.3755365312099457,
-0.03975418210029602,
0.025833286345005035,
0.0995810404419899,
-0.14252400398254395,
0.7694875597953796,
0.16056686639785767,
0.08269523084163666,
0.12565426528453827,
-0.21879258751869202,
-0.41907769441604614,
-0.1828237622976303,
0.05364470183849335,
0.13683007657527924,
0.021788563579320908,
0.3300580680370331,
-0.16625379025936127,
-0.30278390645980835,
0.08148379623889923,
0.3931148052215576,
-0.2834912836551666,
-0.13927724957466125,
-0.2779432237148285,
-0.2761235535144806,
-0.11870568990707397,
-0.114048533141613,
0.10456742346286774,
0.010868716984987259,
-0.1787356734275818,
0.08092942833900452,
0.15261080861091614,
0.11208520084619522,
0.046161726117134094,
-0.047526951879262924,
0.3379155993461609,
0.13038486242294312,
0.10220220685005188,
0.2396431267261505,
0.15417610108852386,
0.18765105307102203,
0.7116137742996216,
-0.17947745323181152,
-0.6064417958259583,
0.014548547565937042,
-0.3207772970199585,
0.2285143882036209,
0.3521009385585785,
-0.13337650895118713,
0.15704917907714844,
0.25494521856307983,
0.03489180654287338,
-0.3648008704185486,
-0.1175137460231781,
0.36439311504364014,
0.12048287689685822,
-0.24822643399238586,
-0.32467779517173767,
0.4003954529762268,
-0.18882307410240173,
0.1008923351764679,
0.24206694960594177,
0.4092300534248352,
-0.2025240957736969,
0.36756107211112976,
-0.1073383167386055,
0.6756740212440491,
0.03922140225768089,
0.43946394324302673,
0.5818983316421509,
-0.49076032638549805,
0.3381574749946594,
0.08918644487857819,
-0.1633264571428299,
-0.5192140340805054,
0.008730318397283554,
-0.1086038202047348,
0.04070304334163666,
0.06381934881210327,
-0.04598873108625412,
-0.07545828819274902,
0.4005906879901886,
-0.3110983967781067,
0.34388023614883423,
-0.12406985461711884,
-0.17651629447937012,
-0.0483974888920784,
-0.38316184282302856,
-0.3256106376647949,
-0.007494501769542694,
0.07357311248779297,
0.2758233845233917,
-0.24777057766914368,
-0.027051769196987152,
0.021553553640842438,
-0.15326783061027527,
-0.27843326330184937,
0.11661617457866669,
-0.1499241590499878,
-0.03368361294269562,
0.02370179072022438,
-0.4501405954360962,
0.14284636080265045,
0.335452139377594,
0.30253875255584717,
-0.04801325127482414,
-0.004390956833958626,
-0.019323833286762238,
0.02470998838543892,
0.225765198469162,
-0.16841019690036774,
-0.2242463231086731,
0.224397212266922,
0.1272003948688507,
-0.19332681596279144,
-0.19889453053474426,
-0.1279827207326889,
0.13723450899124146,
0.04241439700126648,
0.20799265801906586,
-0.1040399968624115,
-0.4001534879207611,
-0.3382284641265869,
-0.01993008702993393,
0.28074681758880615,
-0.21831493079662323,
-0.01370899099856615,
0.014559982344508171,
0.017715688794851303,
-0.040068842470645905,
-0.03577452525496483,
-0.34883439540863037,
-0.15692903101444244,
0.2794687747955322,
-0.20779989659786224,
-0.07843896001577377,
0.5283570885658264,
0.36771926283836365,
-0.29968276619911194,
-0.13670183718204498,
0.2349860519170761,
0.34194642305374146,
-0.8273352384567261,
0.13999232649803162,
-0.1280221790075302,
0.3436542749404907,
-0.22931435704231262,
0.2210390567779541,
0.15534445643424988,
-0.3406282365322113,
0.05671681463718414,
-0.37895768880844116,
0.02713467925786972,
-0.10044309496879578,
0.01737814210355282,
-0.14836709201335907,
0.34607046842575073,
0.08371227979660034,
-0.005831442773342133,
-0.14059114456176758,
-0.1603849083185196,
0.3000112771987915,
0.2224499136209488,
0.06555494666099548,
0.2537255585193634,
0.1363941729068756,
0.23343060910701752,
-0.3705470860004425,
0.0027747079730033875,
0.11014348268508911,
-0.17505699396133423,
-0.09196679294109344,
-0.6422078609466553,
0.21145287156105042,
0.0012133754789829254,
-0.15691763162612915,
0.14837104082107544,
0.11446844041347504,
-0.012593084946274757,
-0.32185789942741394,
0.379477858543396,
0.5154989957809448,
0.026653777807950974,
0.13051526248455048,
-0.009099980816245079,
0.11311926692724228,
-0.2342911809682846,
-0.02237527072429657,
0.2534387707710266,
0.5181381702423096,
0.10918746888637543,
0.12082070112228394,
-0.27654120326042175,
-0.05452999472618103,
-0.20950229465961456,
0.2079695612192154,
0.09411947429180145,
0.17658787965774536,
0.23472198843955994,
-0.4291131794452667,
0.2828431725502014,
0.05349337309598923,
0.5056519508361816,
0.23439112305641174,
-0.24443337321281433,
-0.04568219184875488,
0.09191073477268219,
0.03679206222295761,
0.037905506789684296,
0.005161900073289871,
0.1334647238254547,
0.07206720113754272,
-0.18679603934288025,
0.2280508279800415,
0.3055325746536255,
-0.0026510655879974365,
0.22447437047958374,
-0.0997200757265091,
0.2624322772026062,
-0.00001555308699607849,
0.0730513483285904,
0.38091862201690674,
-0.004568189382553101,
0.5078549981117249,
0.17117851972579956,
0.054047659039497375,
0.14223502576351166,
0.2829630970954895,
0.21491089463233948,
0.014728916808962822,
0.24524104595184326,
0.4976073205471039,
-0.12713348865509033,
-0.6350255012512207,
-0.02201300673186779,
0.08726410567760468,
-0.10335639119148254,
0.420226514339447,
0.27270177006721497,
0.5660048723220825,
-0.14235134422779083,
-0.21018736064434052,
-0.027096334844827652,
0.22291302680969238,
-0.2509670853614807,
-0.2061121165752411,
0.040547341108322144,
-0.03804662078619003,
-0.0673644170165062,
0.2469426989555359,
-0.22309164702892303,
-0.074600949883461,
0.15248115360736847,
0.16813254356384277,
-0.04335771128535271,
-0.33866745233535767,
0.00130409374833107,
-0.16412431001663208,
0.19600725173950195,
-0.1895045042037964,
0.2839502692222595,
0.24163907766342163,
-0.03322179988026619,
0.09074220061302185,
0.15316103398799896,
0.4331686794757843,
0.09066756069660187,
0.3003101944923401,
0.007852338254451752,
0.03055432438850403,
0.22756710648536682,
0.1683902144432068,
0.12339301407337189,
0.028938205912709236,
0.03898261487483978,
0.34974250197410583,
0.05932513624429703,
0.011815160512924194,
0.22973980009555817,
0.4036106467247009,
0.07090060412883759,
-0.27172738313674927,
-0.022635500878095627,
-0.20139923691749573,
0.06840206682682037,
-0.49533236026763916,
-0.04277456924319267,
-0.19789502024650574,
0.20622342824935913,
0.38907942175865173,
0.09566950798034668,
0.3372890055179596,
0.10442174226045609,
0.027236368507146835,
0.34727558493614197,
0.2769831120967865,
0.300324946641922,
0.21801744401454926,
-0.26804107427597046,
-0.0024334192276000977,
-0.4933232069015503,
0.19392748177051544,
-0.06355451047420502,
0.3334476947784424,
0.09942285716533661,
0.09808214753866196,
0.2627609968185425,
0.08678709715604782,
0.20712152123451233,
-0.14977896213531494,
-0.009161215275526047,
0.14954742789268494,
-0.030772924423217773,
-0.16318202018737793,
-0.0700162947177887,
0.13385339081287384,
-0.21600781381130219,
-0.32937437295913696,
0.2364753633737564,
0.04388388991355896,
-0.11087101697921753,
-0.24412593245506287,
0.18076138198375702,
-0.41099298000335693,
-0.2757514715194702,
0.4078647494316101,
0.23598508536815643,
0.09686460345983505,
-0.32596245408058167,
-0.18356987833976746,
-0.07955530285835266,
-0.056969042867422104,
0.0327126681804657,
0.3804573714733124,
-0.1713770627975464,
0.3264869451522827,
0.011266052722930908,
-0.42180538177490234,
-0.25400498509407043,
0.22401422262191772,
0.2547236680984497,
0.06234925240278244,
-0.30689430236816406,
0.3508031964302063,
-0.1272847205400467,
-0.2665928304195404,
0.24038349092006683,
0.6712567806243896,
-0.1461404263973236,
0.24826735258102417,
-0.01646728813648224,
-0.15604212880134583,
0.2652606964111328,
-0.4096328020095825,
-0.2621384859085083,
0.1799159049987793,
0.16525942087173462,
0.3497146964073181,
-0.3592226803302765,
-0.48163577914237976,
0.210446298122406,
0.2207917869091034,
-0.2128067910671234,
-0.15733861923217773,
0.05441439151763916,
-0.2609895169734955,
-0.11416207998991013,
-0.07306115329265594,
0.6406539678573608,
0.3980974555015564,
-0.401930570602417,
0.3418284058570862,
-0.4393019378185272
] |
https://github.com/huggingface/datasets/issues/6599 | Hi! Non-generic data processing is out of this library's scope, so it's downstream libraries/users' responsibility to implement such logic. | Easy way to segment into 30s snippets given an m4a file and a vtt file | ### Feature request
Uploading datasets is straightforward thanks to the ability to push Audio to hub. However, it would be nice if the data (text and audio) could be segmented when being pushed (if not possible already).
### Motivation
It's easy to create a vtt file from an audio file. If there could be auto-segmenting, this would make the creation of datasets much faster.
### Your contribution
I have made a custom script to do this but it's not all that clean - uses librosa and pydub. | 19 | Easy way to segment into 30s snippets given an m4a file and a vtt file
### Feature request
Uploading datasets is straightforward thanks to the ability to push Audio to hub. However, it would be nice if the data (text and audio) could be segmented when being pushed (if not possible already).
### Motivation
It's easy to create a vtt file from an audio file. If there could be auto-segmenting, this would make the creation of datasets much faster.
### Your contribution
I have made a custom script to do this but it's not all that clean - uses librosa and pydub.
Hi! Non-generic data processing is out of this library's scope, so it's downstream libraries/users' responsibility to implement such logic. | [
-0.650300920009613,
-0.3339020013809204,
-0.1150285005569458,
-0.06848037242889404,
0.23705556988716125,
-0.3140990436077118,
0.5622481107711792,
0.4451252222061157,
-0.5105161666870117,
0.2401493936777115,
-0.3567483723163605,
-0.044706277549266815,
-0.3566725254058838,
0.3612205386161804,
0.17482756078243256,
-0.21636544167995453,
-0.04710666835308075,
0.2412843406200409,
-0.10636937618255615,
0.08343669772148132,
0.1805257797241211,
-0.1064395159482956,
-0.06609845161437988,
-0.3520064949989319,
-0.17882251739501953,
0.16914384067058563,
-0.1363932192325592,
-0.05081084743142128,
0.008968222886323929,
-0.1361893266439438,
-0.34734001755714417,
-0.05211351439356804,
0.515807569026947,
0.4786275029182434,
-0.00011409083526814356,
-0.37441253662109375,
-0.15224871039390564,
-0.18008655309677124,
-0.14255686104297638,
0.4701499938964844,
-0.034879736602306366,
-0.16612055897712708,
-0.3724393844604492,
-0.09934473037719727,
-0.05433167144656181,
0.01431482657790184,
-0.07117465883493423,
-0.32331255078315735,
0.5660894513130188,
0.3362397253513336,
0.0564597025513649,
0.09165813028812408,
-0.37761762738227844,
-0.013338176533579826,
0.38829484581947327,
0.13331544399261475,
-0.04324246570467949,
0.16228504478931427,
0.518498420715332,
0.26452118158340454,
-0.1403944194316864,
0.31094270944595337,
-0.015539254993200302,
-0.06891762465238571,
0.4620518982410431,
-0.13257232308387756,
-0.09196668863296509,
-0.41904038190841675,
-0.007035214453935623,
0.43041881918907166,
0.6780226826667786,
-0.10481840372085571,
-0.2251751720905304,
-0.35828274488449097,
-0.0914837121963501,
-0.12405939400196075,
-0.3070719242095947,
0.421036958694458,
-0.07699541747570038,
0.154265359044075,
-0.08769871294498444,
-0.253761887550354,
-0.15124855935573578,
-0.06034404784440994,
0.21985077857971191,
0.10649308562278748,
-0.09696239978075027,
-0.32801318168640137,
0.26244720816612244,
-0.15097694098949432,
0.21457543969154358,
-0.03508756309747696,
-0.08045385777950287,
0.623782753944397,
-0.020076874643564224,
-0.39702993631362915,
-0.23501592874526978,
-0.2419845014810562,
0.005550399422645569,
0.16963890194892883,
-0.06375479698181152,
-0.030012337490916252,
-0.1847081482410431,
-0.07980058342218399,
0.07112854719161987,
-0.14766919612884521,
-0.05108550935983658,
-0.015577513724565506,
0.013539540581405163,
-0.2532930374145508,
0.1316104531288147,
-0.03014037199318409,
-0.07707290351390839,
-0.2595067322254181,
0.01735588163137436,
0.17400595545768738,
-0.2618815004825592,
-0.001498490571975708,
-0.22323250770568848,
-0.17574575543403625,
-0.38875409960746765,
-0.22787758708000183,
-0.034054458141326904,
-0.06770389527082443,
-0.08711567521095276,
-0.14050838351249695,
-0.2451399564743042,
0.22692318260669708,
-0.5197254419326782,
-0.1853293776512146,
0.08055202662944794,
0.10589443147182465,
-0.08961565792560577,
0.15673920512199402,
0.13861291110515594,
-0.0727163553237915,
-0.15367604792118073,
0.07165060937404633,
0.29636716842651367,
-0.08188605308532715,
-0.18580392003059387,
0.05341978371143341,
-0.006770327687263489,
-0.07467509806156158,
0.06902121007442474,
0.047730863094329834,
-0.2734068036079407,
0.11794954538345337,
-0.22299803793430328,
0.16072611510753632,
-0.21510565280914307,
-0.0668320506811142,
0.1438121795654297,
0.11788452416658401,
0.059864871203899384,
0.027602486312389374,
0.15291810035705566,
0.2227245271205902,
0.30548325181007385,
-0.26304394006729126,
0.10662683844566345,
0.036536261439323425,
0.14864091575145721,
-0.14398948848247528,
0.14950355887413025,
0.1067943125963211,
-0.4393296539783478,
-0.2709565758705139,
-0.04024819657206535,
0.21721115708351135,
0.2378881573677063,
0.284220814704895,
0.3004916310310364,
0.0748012438416481,
-0.02023141086101532,
0.4874305725097656,
0.10631582885980606,
-0.06107679754495621,
0.25507643818855286,
0.3296099007129669,
-0.327649861574173,
-0.2225547730922699,
-0.05641741678118706,
0.31734809279441833,
0.48787474632263184,
-0.33093005418777466,
0.30612966418266296,
0.42446476221084595,
-0.03991558775305748,
0.09363178163766861,
-0.06395842880010605,
-0.25374460220336914,
-0.2042718529701233,
0.3228467106819153,
0.15469369292259216,
-0.2099711298942566,
0.04501877725124359,
0.1650969386100769,
0.22669683396816254,
-0.28609004616737366,
0.37360191345214844,
0.04928859323263168,
0.5448518991470337,
-0.16599726676940918,
0.0007385425269603729,
-0.6522113680839539,
0.043808020651340485,
-0.26656535267829895,
0.22825965285301208,
-0.03001038357615471,
0.15075944364070892,
-0.27094602584838867,
0.15294967591762543,
-0.33623868227005005,
0.21257305145263672,
0.06806789338588715,
-0.0637216791510582,
-0.06639446318149567,
-0.1434067189693451,
-0.3551325798034668,
-0.15447407960891724,
-0.19050675630569458,
0.42187196016311646,
0.03739914670586586,
-0.020938483998179436,
0.25849616527557373,
0.2002272605895996,
-0.14794348180294037,
0.314145565032959,
0.30812132358551025,
0.006093761883676052,
-0.17815960943698883,
0.2567797303199768,
0.3307936191558838,
0.2915533781051636,
0.07303179055452347,
-0.08901190012693405,
0.5476541519165039,
0.36684489250183105,
-0.14314502477645874,
0.26387107372283936,
-0.26522156596183777,
-0.06291409581899643,
-0.12429982423782349,
-0.20515523850917816,
0.3687271773815155,
-0.3562875986099243,
0.20904353260993958,
0.2329384684562683,
-0.17279700934886932,
-0.10709934681653976,
-0.024141035974025726,
-0.2881987988948822,
0.16181312501430511,
0.031800590455532074,
-0.2678282856941223,
-0.1995624601840973,
0.089914470911026,
-0.2976147532463074,
0.36046525835990906,
0.48314931988716125,
-0.31738734245300293,
-0.023938670754432678,
0.013463006354868412,
-0.255563884973526,
0.061789773404598236,
0.07125402241945267,
-0.059298619627952576,
0.04272780567407608,
0.22944535315036774,
0.23043259978294373,
-0.20566028356552124,
0.253978967666626,
-0.2421163022518158,
0.09946539998054504,
0.047953467816114426,
-0.022873619571328163,
0.2619093358516693,
-0.116651251912117,
0.21620555222034454,
0.2928195297718048,
0.009570449590682983,
-0.24206358194351196,
-0.18317708373069763,
-0.14416304230690002,
0.02416817843914032,
-0.17950624227523804,
-0.14563727378845215,
-0.25687339901924133,
-0.4123844802379608,
-0.06092159077525139,
0.056713469326496124,
0.2057722508907318,
-0.17207369208335876,
-0.11972933262586594,
0.34780892729759216,
0.4306510388851166,
0.52790766954422,
0.001561872661113739,
0.19366441667079926,
0.48265188932418823,
0.1777777075767517,
0.27669063210487366,
0.16360202431678772,
0.21752268075942993,
0.4782440960407257,
-0.020742641761898994,
0.11240757256746292,
0.1962909996509552,
-0.1830856204032898,
0.007575564086437225,
0.10005806386470795,
0.08442467451095581,
0.18937738239765167,
-0.1107877790927887,
0.17331522703170776,
0.06110107898712158,
-0.3540111184120178,
-0.3355686068534851,
0.11208244413137436,
0.005979709327220917,
-0.10657545924186707,
0.08286361396312714,
-0.12649187445640564,
-0.2619609534740448,
0.06763105094432831,
-0.30785971879959106,
-0.4733812212944031,
0.20935243368148804,
0.24794989824295044,
0.06314616650342941,
-0.072882279753685,
-0.05464259907603264,
-0.10804656147956848,
0.26327505707740784,
-0.26722452044487,
0.13180094957351685,
0.3672668933868408,
0.27618876099586487,
-0.4933148920536041,
-0.062269311398267746,
-0.04356173053383827,
0.06505043804645538,
-0.14765654504299164,
0.1463814675807953,
0.019711747765541077,
0.2070411592721939,
-0.08745241910219193,
0.23369835317134857,
-0.33035433292388916,
0.25115135312080383,
0.14217248558998108,
-0.0696430653333664,
0.03319861739873886,
-0.15178126096725464,
0.44127070903778076,
-0.05054893717169762,
0.08221311867237091,
-0.0874674916267395,
-0.10906121134757996,
0.09955354034900665,
0.041935086250305176,
0.9014589786529541,
0.4815671741962433,
-0.07728654146194458,
-0.11214864253997803,
-0.058849744498729706,
-0.12129068374633789,
-0.21093270182609558,
0.08688616752624512,
0.36611512303352356,
0.12507861852645874,
-0.20830924808979034,
0.49095794558525085,
0.1633085012435913,
-0.07838420569896698,
-0.0030729249119758606,
-0.0490865483880043,
-0.23638968169689178,
-0.25680047273635864,
0.37978050112724304,
-0.12651878595352173,
0.19346246123313904,
-0.20918047428131104,
-0.01952367275953293,
-0.010365378111600876,
-0.10164117813110352,
0.11467282474040985,
0.11908947676420212,
0.39698532223701477,
-0.0034289024770259857,
-0.2620130181312561,
0.15433406829833984,
-0.16181349754333496,
-0.15621112287044525,
0.358978807926178,
-0.0844620019197464,
-0.11673323065042496,
-0.46874716877937317,
-0.25570812821388245,
-0.014812387526035309,
-0.03300231322646141,
-0.20452190935611725,
-0.14295560121536255,
-0.2317722737789154,
0.350945383310318,
0.17347511649131775,
0.07704931497573853,
-0.27399909496307373,
-0.019313357770442963,
0.3932325541973114,
0.3888900876045227,
-0.3873754143714905,
-0.10272572934627533,
0.23394304513931274,
0.09609567373991013,
0.12301532924175262,
-0.027046848088502884,
0.21144452691078186,
0.4408664107322693,
-0.1971208155155182,
0.004172384738922119,
0.4691706597805023,
0.13649994134902954,
-0.18290594220161438,
-0.2049630880355835,
0.381390243768692,
-0.15988722443580627,
0.3506401479244232,
-0.1971050202846527,
0.11255140602588654,
-0.017395827919244766,
0.3976280689239502,
-0.0849585235118866,
-0.3605005443096161,
0.36778825521469116,
0.13666757941246033,
-0.04855271428823471,
-0.09323908388614655,
0.2744540572166443,
-0.16456307470798492,
0.5622820258140564,
0.2915160059928894,
0.4103389084339142,
0.15766042470932007,
0.030998289585113525,
0.3299481272697449,
-0.4832443296909332,
-0.2069525569677353,
-0.17196162045001984,
0.0607212670147419,
-0.5413771867752075,
-0.2403411865234375,
0.2845694422721863,
-0.4743131995201111,
0.05772571265697479,
-0.2171734869480133,
0.04062620550394058,
-0.141474187374115,
0.20608942210674286,
0.08278632164001465,
1.125180959701538,
0.3540397882461548,
0.06621874123811722,
-0.057042405009269714,
0.11871756613254547,
-0.02768820896744728,
-0.5274684429168701,
-0.0947623997926712,
-0.20706291496753693,
-0.12397059798240662,
-0.03247980773448944,
-0.14401766657829285,
-0.3729734420776367,
0.15855512022972107,
-0.25212791562080383,
-0.20084911584854126,
-0.013736560940742493,
0.31935784220695496,
-0.2230873703956604,
0.048201389610767365,
-0.3352689743041992,
-0.2239384651184082,
0.15071964263916016,
0.06285341829061508,
-0.11887669563293457,
-0.017515946179628372,
0.009960807859897614,
-0.40777671337127686,
-0.09138830751180649,
0.16899429261684418,
-0.33228084444999695,
0.13207989931106567,
0.1800784468650818,
-0.2339259386062622,
0.08478770405054092,
0.07385692000389099,
0.09242461621761322,
-0.10384131968021393,
0.162467822432518,
0.3864453434944153,
0.032980598509311676,
0.16615085303783417,
-0.20041999220848083,
0.22839200496673584,
0.026050128042697906,
-0.06280843168497086,
0.21969793736934662,
-0.1456555724143982,
0.06173524260520935,
-0.06906434893608093,
0.17879873514175415,
-0.020522907376289368,
-0.035457536578178406,
-0.19183114171028137,
-0.21402902901172638,
-0.18492503464221954,
-0.07146292924880981,
0.18682244420051575,
0.08501369506120682,
0.055746257305145264,
0.0694539025425911,
0.28305989503860474,
-0.19118309020996094,
-0.03436146676540375,
0.20774996280670166,
0.1258063167333603,
-0.1797659546136856,
0.0038293711841106415,
0.001848248764872551,
-0.3109080493450165,
0.06720755994319916,
0.5004638433456421,
-0.4328727722167969,
-0.22718822956085205,
0.44135165214538574,
0.1954931616783142,
-0.42616912722587585,
0.04427061229944229,
-0.28860121965408325,
-0.019637197256088257,
0.25644004344940186,
0.011158004403114319,
0.13738015294075012,
-0.011904891580343246,
-0.2952733635902405,
-0.256985068321228,
0.03330817073583603,
0.2620466351509094,
-0.05073956772685051,
0.21761208772659302,
-0.34990647435188293,
0.0660824328660965,
-0.16212454438209534,
0.3928185999393463,
-0.2635476291179657,
0.12175940722227097,
0.13977649807929993,
0.27274981141090393,
-0.42858216166496277,
-0.2732764780521393,
-0.09586428850889206,
-0.12752313911914825,
-0.04719306528568268,
0.34222859144210815,
-0.47892123460769653,
-0.0736125111579895,
-0.18036800622940063,
0.1468813419342041,
0.1796884536743164,
-0.08231181651353836,
0.08946048468351364,
-0.01734485849738121,
-0.3505603075027466,
-0.3310580253601074,
0.21994920074939728,
-0.10766905546188354,
-0.03701896592974663,
-0.2289818674325943,
0.8799400925636292,
0.03802803158760071,
0.09121182560920715,
0.21854592859745026,
0.22030407190322876,
0.26413047313690186,
-0.12218868732452393,
0.03901113197207451,
-0.0037013553082942963,
-0.0008286908268928528,
0.041597869247198105,
0.43310073018074036,
0.8353452086448669,
-0.10932528972625732,
-0.016028322279453278,
0.0037950025871396065,
0.055375248193740845,
0.001940123736858368,
0.29447126388549805,
0.2592102885246277,
-0.011769991368055344,
0.08643493056297302,
0.16979560256004333,
0.24517284333705902,
0.14137311279773712,
0.024145152419805527,
-0.18000471591949463,
-0.23179255425930023,
0.0013986453413963318,
0.2369963526725769,
-0.05487526208162308,
0.28733929991722107,
0.30596810579299927,
0.04566185921430588,
-0.02127968519926071,
-0.19553616642951965,
0.03716287761926651,
0.6184564828872681,
-0.0074818432331085205,
0.010406727902591228,
-0.07355470210313797,
-0.22974173724651337,
0.182817280292511,
0.3670935332775116,
-0.540108323097229,
-0.2458576112985611,
0.6154550909996033,
-0.20056743919849396,
0.153896301984787,
-0.2697792053222656,
-0.6976853609085083,
0.16080869734287262,
0.10924328863620758,
0.30375850200653076,
0.5157368183135986,
0.11454189568758011,
-0.06128918379545212,
-0.18599101901054382,
0.11230350285768509,
0.1493961364030838,
0.07026691734790802,
0.14213091135025024,
-0.020960383117198944,
-0.14345663785934448,
-0.48431092500686646,
-0.06911591440439224,
0.029229089617729187,
0.005826088599860668,
0.0029514282941818237,
0.23731955885887146,
0.46924889087677,
0.32974258065223694,
0.03303692862391472,
-0.1532488763332367,
0.211128830909729,
-0.20017248392105103,
-0.1986188143491745,
0.03548439219594002,
0.34071192145347595,
0.15797199308872223,
-0.2528550624847412,
0.11640264093875885,
0.01105525717139244,
-0.3403329849243164,
0.2806645631790161,
-0.10555372387170792,
0.009534172713756561,
0.2718203663825989,
0.10303414613008499,
0.12910595536231995,
0.33379265666007996,
0.2826397716999054,
0.08879175037145615,
-0.16690433025360107,
0.20807676017284393,
-0.08705677092075348,
-0.298677921295166,
-0.3004732131958008,
0.1724284291267395,
-0.1276860386133194,
-0.07746971398591995,
-0.42216968536376953,
-0.3521699011325836,
-0.2737901210784912,
0.11047182977199554,
-0.01485313381999731,
-0.4286421537399292,
-0.10604240000247955,
0.11710913479328156,
0.06262558698654175,
-0.20863236486911774,
0.28657224774360657,
0.26760703325271606,
0.18103837966918945,
0.18497012555599213,
-0.11847319453954697,
-0.13825415074825287,
-0.29366692900657654,
-0.011298893950879574,
0.15375010669231415,
-0.07792453467845917,
0.04181011766195297,
0.31773829460144043,
0.488362580537796,
-0.10046758502721786,
0.016763836145401,
0.13668668270111084,
0.49532225728034973,
-0.41116148233413696,
0.1734534353017807,
0.13374564051628113,
0.31551963090896606,
-0.024991191923618317,
-0.1783190369606018,
0.11558836698532104,
0.00878504291176796,
-0.007964454591274261,
0.17739832401275635,
-0.058949097990989685,
0.23181268572807312,
-0.45529866218566895,
0.28753212094306946,
-0.21161599457263947,
0.2123643010854721,
-0.21397703886032104,
-0.18711644411087036,
-0.08668458461761475,
-0.06012190878391266,
0.04774019867181778,
-0.07612920552492142,
0.26748812198638916,
0.6046268939971924,
-0.1113104522228241,
0.17240743339061737,
-0.18695908784866333,
0.19298726320266724,
-0.22469733655452728,
0.35300031304359436,
-0.04289707541465759,
-0.02305503562092781,
-0.29720520973205566,
0.025079309940338135,
0.24469347298145294,
-0.08631294220685959,
-0.045156080275774,
-0.0010337531566619873,
-0.14009016752243042,
-0.4342041611671448,
0.2535113990306854,
-0.2615125775337219,
-0.23920969665050507,
-0.13489842414855957,
0.14668166637420654,
0.31133729219436646,
0.09234534949064255,
-0.44220590591430664,
-0.027728073298931122,
0.20163391530513763,
-0.2281321883201599,
0.07676926255226135,
0.2343183308839798,
0.14524619281291962,
-0.3030179738998413,
-0.07793476432561874,
0.2481134831905365,
0.12595757842063904,
-0.1538999378681183,
-0.10963211953639984,
-0.5992887020111084
] |
https://github.com/huggingface/datasets/issues/6598 | I am facing similar issue while reading a csv file from s3. Wondering if somebody has found a workaround. | Unexpected keyword argument 'hf' when downloading CSV dataset from S3 | ### Describe the bug
I receive this error message when using `load_dataset` with "csv" path and `dataset_files=s3://...`:
```
TypeError: Session.__init__() got an unexpected keyword argument 'hf'
```
I found a similar issue here: https://stackoverflow.com/questions/77596258/aws-issue-load-dataset-from-s3-fails-with-unexpected-keyword-argument-error-in
Full stacktrace:
```
.../site-packages/datasets/load.py:2549: in load_dataset
builder_instance.download_and_prepare(
.../site-packages/datasets/builder.py:1005: in download_and_prepare
self._download_and_prepare(
.../site-packages/datasets/builder.py:1078: in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
.../site-packages/datasets/packaged_modules/csv/csv.py:147: in _split_generators
data_files = dl_manager.download_and_extract(self.config.data_files)
.../site-packages/datasets/download/download_manager.py:562: in download_and_extract
return self.extract(self.download(url_or_urls))
.../site-packages/datasets/download/download_manager.py:426: in download
downloaded_path_or_paths = map_nested(
.../site-packages/datasets/utils/py_utils.py:466: in map_nested
mapped = [
.../site-packages/datasets/utils/py_utils.py:467: in <listcomp>
_single_map_nested((function, obj, types, None, True, None))
.../site-packages/datasets/utils/py_utils.py:387: in _single_map_nested
mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar]
.../site-packages/datasets/utils/py_utils.py:387: in <listcomp>
mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar]
.../site-packages/datasets/utils/py_utils.py:370: in _single_map_nested
return function(data_struct)
.../site-packages/datasets/download/download_manager.py:451: in _download
out = cached_path(url_or_filename, download_config=download_config)
.../site-packages/datasets/utils/file_utils.py:188: in cached_path
output_path = get_from_cache(
...1/site-packages/datasets/utils/file_utils.py:511: in get_from_cache
response = fsspec_head(url, storage_options=storage_options)
.../site-packages/datasets/utils/file_utils.py:316: in fsspec_head
fs, _, paths = fsspec.get_fs_token_paths(url, storage_options=storage_options)
.../site-packages/fsspec/core.py:622: in get_fs_token_paths
fs = filesystem(protocol, **inkwargs)
.../site-packages/fsspec/registry.py:290: in filesystem
return cls(**storage_options)
.../site-packages/fsspec/spec.py:79: in __call__
obj = super().__call__(*args, **kwargs)
.../site-packages/s3fs/core.py:187: in __init__
self.s3 = self.connect()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <s3fs.core.S3FileSystem object at 0x1500a1310>, refresh = True
def connect(self, refresh=True):
"""
Establish S3 connection object.
Parameters
----------
refresh : bool
Whether to create new session/client, even if a previous one with
the same parameters already exists. If False (default), an
existing one will be used if possible
"""
if refresh is False:
# back compat: we store whole FS instance now
return self.s3
anon, key, secret, kwargs, ckwargs, token, ssl = (
self.anon, self.key, self.secret, self.kwargs,
self.client_kwargs, self.token, self.use_ssl)
if not self.passed_in_session:
> self.session = botocore.session.Session(**self.kwargs)
E TypeError: Session.__init__() got an unexpected keyword argument 'hf'
```
### Steps to reproduce the bug
1. Assuming a valid CSV file located at `s3://bucket/data.csv`
2. Run the below code:
```
storage_options = {
"key": "...",
"secret": "...",
"client_kwargs": {
"endpoint_url": "...",
}
}
load_dataset("csv", data_files="s3://bucket/data.csv", storage_options=storage_options)
```
Encountered in version `2.16.1` but also reproduced in `2.16.0` and `2.15.0`.
Note: I encountered this in a unit test using a `moto` mock for S3, however since the error occurs before the session is instantiated, it should not be the issue.
### Expected behavior
No exception is raised, the boto3 session is created successfully, and the CSV file is downloaded successfully and returned as a dataset.
===
After some research I found that `DownloadConfig` has a `__post_init__` method that always forces this value to be set in its `storage_options`, even though in case of an S3 location the storage options get passed on to the S3 Session which does not expect this parameter. I assume this parameter is needed when reading from the huggingface hub and should not be set in this context.
Unfortunately there is nothing the user can do to work around it. Even if you manually do something like:
```
download_config = DownloadConfig()
del download_config.storage_options["hf"]
load_dataset("csv", data_files="s3://bucket/data.csv", download_config=download_config)
```
the library will still reinsert this parameter when `download_config = self.download_config.copy()` in line 418 of `download_manager.py` (`DownloadManager.download`).
Therefore `load_dataset` currently cannot be used to read a dataset in CSV format from an S3 location.
### Environment info
- `datasets` version: 2.16.1
- Platform: macOS-14.2.1-arm64-arm-64bit
- Python version: 3.11.7
- `huggingface_hub` version: 0.20.2
- PyArrow version: 14.0.2
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0
| 19 | Unexpected keyword argument 'hf' when downloading CSV dataset from S3
### Describe the bug
I receive this error message when using `load_dataset` with "csv" path and `dataset_files=s3://...`:
```
TypeError: Session.__init__() got an unexpected keyword argument 'hf'
```
I found a similar issue here: https://stackoverflow.com/questions/77596258/aws-issue-load-dataset-from-s3-fails-with-unexpected-keyword-argument-error-in
Full stacktrace:
```
.../site-packages/datasets/load.py:2549: in load_dataset
builder_instance.download_and_prepare(
.../site-packages/datasets/builder.py:1005: in download_and_prepare
self._download_and_prepare(
.../site-packages/datasets/builder.py:1078: in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
.../site-packages/datasets/packaged_modules/csv/csv.py:147: in _split_generators
data_files = dl_manager.download_and_extract(self.config.data_files)
.../site-packages/datasets/download/download_manager.py:562: in download_and_extract
return self.extract(self.download(url_or_urls))
.../site-packages/datasets/download/download_manager.py:426: in download
downloaded_path_or_paths = map_nested(
.../site-packages/datasets/utils/py_utils.py:466: in map_nested
mapped = [
.../site-packages/datasets/utils/py_utils.py:467: in <listcomp>
_single_map_nested((function, obj, types, None, True, None))
.../site-packages/datasets/utils/py_utils.py:387: in _single_map_nested
mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar]
.../site-packages/datasets/utils/py_utils.py:387: in <listcomp>
mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar]
.../site-packages/datasets/utils/py_utils.py:370: in _single_map_nested
return function(data_struct)
.../site-packages/datasets/download/download_manager.py:451: in _download
out = cached_path(url_or_filename, download_config=download_config)
.../site-packages/datasets/utils/file_utils.py:188: in cached_path
output_path = get_from_cache(
...1/site-packages/datasets/utils/file_utils.py:511: in get_from_cache
response = fsspec_head(url, storage_options=storage_options)
.../site-packages/datasets/utils/file_utils.py:316: in fsspec_head
fs, _, paths = fsspec.get_fs_token_paths(url, storage_options=storage_options)
.../site-packages/fsspec/core.py:622: in get_fs_token_paths
fs = filesystem(protocol, **inkwargs)
.../site-packages/fsspec/registry.py:290: in filesystem
return cls(**storage_options)
.../site-packages/fsspec/spec.py:79: in __call__
obj = super().__call__(*args, **kwargs)
.../site-packages/s3fs/core.py:187: in __init__
self.s3 = self.connect()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <s3fs.core.S3FileSystem object at 0x1500a1310>, refresh = True
def connect(self, refresh=True):
"""
Establish S3 connection object.
Parameters
----------
refresh : bool
Whether to create new session/client, even if a previous one with
the same parameters already exists. If False (default), an
existing one will be used if possible
"""
if refresh is False:
# back compat: we store whole FS instance now
return self.s3
anon, key, secret, kwargs, ckwargs, token, ssl = (
self.anon, self.key, self.secret, self.kwargs,
self.client_kwargs, self.token, self.use_ssl)
if not self.passed_in_session:
> self.session = botocore.session.Session(**self.kwargs)
E TypeError: Session.__init__() got an unexpected keyword argument 'hf'
```
### Steps to reproduce the bug
1. Assuming a valid CSV file located at `s3://bucket/data.csv`
2. Run the below code:
```
storage_options = {
"key": "...",
"secret": "...",
"client_kwargs": {
"endpoint_url": "...",
}
}
load_dataset("csv", data_files="s3://bucket/data.csv", storage_options=storage_options)
```
Encountered in version `2.16.1` but also reproduced in `2.16.0` and `2.15.0`.
Note: I encountered this in a unit test using a `moto` mock for S3, however since the error occurs before the session is instantiated, it should not be the issue.
### Expected behavior
No exception is raised, the boto3 session is created successfully, and the CSV file is downloaded successfully and returned as a dataset.
===
After some research I found that `DownloadConfig` has a `__post_init__` method that always forces this value to be set in its `storage_options`, even though in case of an S3 location the storage options get passed on to the S3 Session which does not expect this parameter. I assume this parameter is needed when reading from the huggingface hub and should not be set in this context.
Unfortunately there is nothing the user can do to work around it. Even if you manually do something like:
```
download_config = DownloadConfig()
del download_config.storage_options["hf"]
load_dataset("csv", data_files="s3://bucket/data.csv", download_config=download_config)
```
the library will still reinsert this parameter when `download_config = self.download_config.copy()` in line 418 of `download_manager.py` (`DownloadManager.download`).
Therefore `load_dataset` currently cannot be used to read a dataset in CSV format from an S3 location.
### Environment info
- `datasets` version: 2.16.1
- Platform: macOS-14.2.1-arm64-arm-64bit
- Python version: 3.11.7
- `huggingface_hub` version: 0.20.2
- PyArrow version: 14.0.2
- Pandas version: 2.1.4
- `fsspec` version: 2023.10.0
I am facing similar issue while reading a csv file from s3. Wondering if somebody has found a workaround. | [
0.05472029000520706,
-0.3772714138031006,
0.010761946439743042,
0.1927299201488495,
0.10700391232967377,
-0.1065262109041214,
0.39194580912590027,
0.10678645968437195,
0.04045405983924866,
-0.0982537716627121,
0.05330744385719299,
0.23410926759243011,
0.11373177170753479,
0.24079617857933044,
-0.08675950765609741,
0.10837613791227341,
0.27862995862960815,
0.07190089672803879,
-0.3322984278202057,
0.006894923746585846,
-0.4870143234729767,
0.36632683873176575,
-0.2785685062408447,
-0.05112985894083977,
0.2517607808113098,
0.12283814698457718,
-0.2287852168083191,
0.22358277440071106,
0.011222880333662033,
-0.4716825783252716,
0.3009051978588104,
0.1716405600309372,
0.3088865280151367,
0.46098431944847107,
-0.00011717282177414745,
-0.1685604304075241,
0.09041863679885864,
-0.02271709218621254,
-0.45942366123199463,
-0.31002503633499146,
-0.5226458311080933,
0.10284925252199173,
-0.05050119012594223,
-0.2098807394504547,
0.11996175348758698,
0.24536533653736115,
-0.2566124200820923,
-0.060236889868974686,
0.29773128032684326,
0.1907266080379486,
0.1608334630727768,
0.23569217324256897,
-0.512947678565979,
-0.3113895356655121,
0.47876858711242676,
0.2008887380361557,
-0.12401528656482697,
-0.040798310190439224,
-0.08553275465965271,
-0.17433080077171326,
0.19029001891613007,
0.12860067188739777,
-0.2827126383781433,
0.36811572313308716,
0.8289957046508789,
-0.05698901414871216,
-0.26318371295928955,
-0.01951727457344532,
-0.20499277114868164,
0.09577398002147675,
0.5616058111190796,
0.07208507508039474,
-0.3990716338157654,
-0.15840357542037964,
-0.1767038106918335,
-0.2836543023586273,
0.24255815148353577,
0.01660388708114624,
-0.14675460755825043,
0.007444119080901146,
0.15933170914649963,
-0.11188481748104095,
-0.12215983122587204,
0.2932067811489105,
0.10030770301818848,
0.2588723599910736,
-0.16403432190418243,
0.23820330202579498,
0.4359110891819,
-0.09147319197654724,
0.23896710574626923,
-0.35638129711151123,
-0.06269823014736176,
0.07112595438957214,
-0.41139379143714905,
0.13127468526363373,
0.1568640172481537,
0.06501567363739014,
0.05467855930328369,
-0.09738919138908386,
-0.11164076626300812,
-0.2821282148361206,
0.21362781524658203,
0.24104243516921997,
0.15327668190002441,
-0.17990607023239136,
0.1874677985906601,
0.019172262400388718,
-0.12699764966964722,
0.1606496274471283,
0.08915580809116364,
-0.27979129552841187,
-0.06195586174726486,
-0.2766605615615845,
0.11347156763076782,
-0.03124327026307583,
0.25318196415901184,
-0.22488164901733398,
-0.3680911064147949,
0.011340241879224777,
-0.1367107778787613,
-0.1157359704375267,
-0.2792420983314514,
0.4341071844100952,
0.05222101882100105,
0.023771435022354126,
0.14774003624916077,
0.3966388404369354,
-0.18225467205047607,
-0.2194962203502655,
-0.02685868740081787,
0.07922853529453278,
-0.27119654417037964,
0.03960287570953369,
-0.04782641679048538,
-0.1790638118982315,
-0.024677293375134468,
0.3143332302570343,
0.09861330687999725,
-0.11223316192626953,
-0.043132126331329346,
-0.06615777313709259,
0.03068651631474495,
-0.04087435454130173,
0.19233646988868713,
0.42588770389556885,
0.09402699768543243,
0.16952309012413025,
0.07265694439411163,
-0.01641591265797615,
-0.3807186484336853,
-0.2269960343837738,
-0.3649509847164154,
0.13776369392871857,
-0.19916275143623352,
-0.10325983166694641,
-0.5471592545509338,
-0.11475518345832825,
-0.04226977750658989,
0.06126017868518829,
-0.14380604028701782,
-0.19808195531368256,
-0.16248445212841034,
-0.22527186572551727,
0.05438631772994995,
0.551033616065979,
-0.43262848258018494,
0.011775538325309753,
-0.27847641706466675,
0.2042989730834961,
-0.13208594918251038,
0.25759947299957275,
-0.2816115617752075,
0.03633610159158707,
-0.3884238600730896,
0.40793630480766296,
0.01974456012248993,
-0.25979894399642944,
-0.21430906653404236,
0.5445476174354553,
0.06842535734176636,
0.026557311415672302,
0.2897258698940277,
-0.20124688744544983,
0.10501015186309814,
-0.20608368515968323,
0.091070756316185,
0.2656833231449127,
0.05849752575159073,
0.08005542308092117,
-0.16028136014938354,
-0.2704455852508545,
0.10086619108915329,
-0.04632160812616348,
0.08064396679401398,
0.045536890625953674,
0.1703197956085205,
-0.26339632272720337,
0.2718045711517334,
-0.10531462728977203,
-0.15120099484920502,
0.427045613527298,
0.33408740162849426,
0.24228833615779877,
-0.10367201268672943,
0.3007436990737915,
-0.5005974769592285,
0.17022103071212769,
0.21269869804382324,
-0.003071380779147148,
-0.33022984862327576,
-0.16083016991615295,
-0.34842368960380554,
-0.026265662163496017,
-0.09263749420642853,
0.12630131840705872,
0.0013971738517284393,
0.11542470008134842,
-0.24697081744670868,
-0.11753670871257782,
0.17763319611549377,
-0.030752457678318024,
0.060918159782886505,
0.09771385043859482,
0.15052586793899536,
0.05172031372785568,
-0.1817910522222519,
0.21079222857952118,
0.15427564084529877,
-0.2112717479467392,
0.4480034112930298,
-0.13637438416481018,
-0.25729238986968994,
0.34576216340065,
0.03822783753275871,
0.25069671869277954,
-0.09482117742300034,
0.039653241634368896,
-0.15116603672504425,
0.10125605762004852,
0.03787175565958023,
-0.3215705454349518,
0.2051585167646408,
-0.0285346657037735,
0.03938216716051102,
0.21604983508586884,
0.1151733249425888,
0.34444183111190796,
0.0010697096586227417,
-0.0472748763859272,
0.17160087823867798,
-0.06728340685367584,
0.29531240463256836,
-0.0934639573097229,
0.17866623401641846,
0.15582749247550964,
-0.04400951415300369,
0.0736912339925766,
-0.03916177153587341,
-0.05696658045053482,
0.45215192437171936,
-0.08705992251634598,
-0.04854083061218262,
0.12265543639659882,
-0.17816360294818878,
0.002883121371269226,
0.37237030267715454,
0.3973326086997986,
0.5266881585121155,
0.11931592226028442,
-0.27247095108032227,
0.012345477938652039,
0.13928237557411194,
-0.060112159699201584,
0.3349358141422272,
0.13988305628299713,
0.24718424677848816,
-0.04124322161078453,
-0.16293910145759583,
0.05290888622403145,
-0.1465185582637787,
-0.32985395193099976,
0.17786061763763428,
0.04747065156698227,
-0.6432306170463562,
0.3877999782562256,
-0.3197041153907776,
-0.3689807653427124,
0.05392608046531677,
0.443713515996933,
-0.07402840256690979,
-0.4755530059337616,
-0.2862183749675751,
0.3508525490760803,
-0.07419604063034058,
-0.04251747205853462,
-0.16819341480731964,
0.19519667327404022,
-0.06881912797689438,
-0.2971452474594116,
-0.06707249581813812,
-0.10776503384113312,
-0.1711650937795639,
-0.04683750495314598,
0.14478249847888947,
-0.1980779469013214,
0.45157766342163086,
-0.08698379993438721,
0.08608224987983704,
-0.28317761421203613,
-0.12932266294956207,
0.20493324100971222,
-0.023787887766957283,
0.3985983729362488,
0.3681076765060425,
0.33254608511924744,
-0.0919693261384964,
-0.28361889719963074,
0.17986561357975006,
0.11613168567419052,
0.050920262932777405,
0.2080722153186798,
-0.151373028755188,
-0.33437854051589966,
-0.13554055988788605,
-0.21343642473220825,
0.05088184028863907,
-0.23741266131401062,
-0.17326611280441284,
-0.08662283420562744,
-0.0448153093457222,
0.10959966480731964,
0.1451994776725769,
0.0845622643828392,
-0.09068921208381653,
-0.18355339765548706,
-0.4282517731189728,
-0.2408633530139923,
0.24602483212947845,
-0.0073177628219127655,
-0.220625102519989,
0.07432705163955688,
-0.011200286448001862,
0.34959328174591064,
0.009903330355882645,
-0.5550223588943481,
-0.04674869775772095,
0.022737858816981316,
0.33389294147491455,
-0.11993618309497833,
-0.007121168076992035,
0.04246639087796211,
-0.2382400780916214,
-0.0061677806079387665,
-0.21623258292675018,
-0.21258710324764252,
-0.00806720182299614,
0.20341049134731293,
0.43339067697525024,
0.07213722914457321,
0.4313965439796448,
0.19655555486679077,
0.7534830570220947,
-0.14127767086029053,
-0.1334003210067749,
0.6663435101509094,
-0.010009096004068851,
0.1756165325641632,
0.06882534921169281,
-0.2679131031036377,
-0.2140110582113266,
-0.26287662982940674,
-0.01359584927558899,
0.022729959338903427,
-0.24242888391017914,
-0.15867280960083008,
-0.139749675989151,
-0.02201445773243904,
-0.4359216094017029,
-0.353305846452713,
0.007662849500775337,
-0.2825765907764435,
0.058156006038188934,
0.19055107235908508,
0.15673735737800598,
-0.16138425469398499,
-0.0472198911011219,
0.15221147239208221,
0.19307255744934082,
0.22993388772010803,
-0.007361616939306259,
-0.05900964140892029,
-0.23415812849998474,
-0.30119192600250244,
0.5041162371635437,
-0.016132302582263947,
0.2843261957168579,
-0.12876519560813904,
0.021719463169574738,
0.1959886997938156,
-0.01856667920947075,
0.9572784304618835,
-0.3812982141971588,
0.08889028429985046,
-0.007157724350690842,
0.08092013001441956,
-0.3324486017227173,
-0.22741034626960754,
-0.2309872806072235,
0.02675332874059677,
-0.01472366414964199,
0.29501259326934814,
-0.3193063735961914,
-0.13604427874088287,
-0.0633532702922821,
-0.22696873545646667,
-0.09737139940261841,
-0.30252450704574585,
-0.0017131790518760681,
-0.3097801208496094,
-0.4436871409416199,
0.029792770743370056,
0.1966380476951599,
0.013941578567028046,
0.029703490436077118,
0.11193249374628067,
0.24871663749217987,
0.27542853355407715,
0.09684938937425613,
0.1963985413312912,
0.13369034230709076,
0.0703912153840065,
-0.008730471134185791,
-0.0734199583530426,
-0.024584610015153885,
0.3534638285636902,
0.6068015098571777,
0.05760577321052551,
-0.2991913855075836,
-0.0809272825717926,
-0.28926050662994385,
0.34995022416114807,
0.2595506012439728,
-0.010218460112810135,
0.5774989724159241,
0.02661168947815895,
0.16201773285865784,
-0.13835254311561584,
-0.037781596183776855,
0.6573675274848938,
-0.11385157704353333,
-0.17387650907039642,
-0.2810865342617035,
0.2567611038684845,
-0.16465139389038086,
-0.19551333785057068,
0.16379737854003906,
0.3170192539691925,
-0.16641685366630554,
0.5658513307571411,
-0.08185107260942459,
0.7460238337516785,
0.11378513276576996,
0.27471622824668884,
0.5058875679969788,
-0.05455879494547844,
0.5354592204093933,
0.03385010361671448,
-0.2960173785686493,
-0.28116607666015625,
-0.04143562540411949,
-0.030421264469623566,
-0.1321164071559906,
-0.004254978150129318,
0.23351848125457764,
-0.09511972963809967,
0.319940447807312,
-0.2524413466453552,
0.4071211814880371,
0.019359096884727478,
0.16933175921440125,
-0.12826170027256012,
-0.15953096747398376,
-0.15833894908428192,
0.1560034155845642,
-0.14525631070137024,
0.20962688326835632,
-0.1595020294189453,
-0.12960053980350494,
0.2525767683982849,
-0.48865896463394165,
-0.16351836919784546,
0.2946954071521759,
-0.15810617804527283,
0.07249394804239273,
-0.07040558755397797,
0.060842230916023254,
0.5215458869934082,
-0.13020414113998413,
-0.13783466815948486,
0.10152624547481537,
0.08652806282043457,
0.22240892052650452,
0.16722898185253143,
0.12242002785205841,
-0.11328871548175812,
-0.15824154019355774,
0.1858212947845459,
0.09670854359865189,
-0.22088822722434998,
0.1202010065317154,
0.026942528784275055,
-0.3131176233291626,
0.08176802098751068,
-0.20985016226768494,
-0.22073230147361755,
-0.4470403492450714,
-0.5384813547134399,
-0.11729196459054947,
-0.13789024949073792,
-0.10070271790027618,
0.08527826517820358,
-0.22385825216770172,
0.1045614629983902,
0.06117992103099823,
0.10114040970802307,
-0.28732675313949585,
-0.006617213599383831,
0.4907410442829132,
-0.3601687550544739,
-0.032550081610679626,
0.5696525573730469,
0.47401535511016846,
-0.17341583967208862,
-0.24928653240203857,
0.08405208587646484,
-0.1666337549686432,
-0.315912663936615,
0.21762539446353912,
0.15230366587638855,
0.10093316435813904,
0.1122225672006607,
0.002361888065934181,
0.3469866216182709,
-0.012534007430076599,
0.19198010861873627,
-0.42942437529563904,
0.48305293917655945,
0.033039629459381104,
-0.3692247271537781,
0.030657904222607613,
0.27319449186325073,
-0.18530410528182983,
0.04889321327209473,
-0.08174890279769897,
-0.2576777935028076,
0.04179343581199646,
0.008369214832782745,
0.11613430082798004,
0.3391323685646057,
0.1365441530942917,
0.3546549677848816,
-0.24823103845119476,
0.1082177609205246,
0.020688220858573914,
-0.1613507866859436,
-0.20037975907325745,
-0.5936896204948425,
0.18637418746948242,
0.21065698564052582,
0.00470348447561264,
0.2043323814868927,
-0.4233960509300232,
-0.011141041293740273,
-0.0006894432008266449,
0.13785459101200104,
0.25280410051345825,
-0.11136774718761444,
0.46748068928718567,
-0.06659556925296783,
-0.19682350754737854,
-0.24299222230911255,
0.13183408975601196,
-0.10131857544183731,
0.2302262783050537,
-0.06826932728290558,
0.2538541853427887,
0.03244714066386223,
0.027973510324954987,
-0.44190946221351624,
0.19513103365898132,
-0.22163647413253784,
0.1660781055688858,
0.371107816696167,
-0.31299686431884766,
0.23618309199810028,
-0.10489660501480103,
0.17028158903121948,
0.11687316745519638,
-0.3132779598236084,
-0.08895635604858398,
0.134307861328125,
0.21694429218769073,
-0.08083541691303253,
-0.26726406812667847,
-0.34675905108451843,
0.11080040037631989,
0.014602132141590118,
0.10205218940973282,
0.04629610478878021,
-0.07283138483762741,
0.03663598746061325,
-0.12160968780517578,
0.3622201681137085,
-0.11074639856815338,
0.05353661999106407,
0.6311355829238892,
-0.024820871651172638,
0.2194848358631134,
0.21330386400222778,
0.0508510060608387,
-0.0332975797355175,
0.5764169096946716,
0.06470129638910294,
-0.27305305004119873,
0.15796801447868347,
0.2391754388809204,
-0.08110597729682922,
-0.5749051570892334,
0.053288888186216354,
0.31044813990592957,
-0.08998233824968338,
0.3500657081604004,
0.14517280459403992,
0.3427969813346863,
-0.02965576946735382,
-0.11431382596492767,
-0.26722419261932373,
0.04791611433029175,
-0.09191210567951202,
-0.016726624220609665,
-0.47109031677246094,
-0.008128069341182709,
-0.2544652819633484,
0.12038356810808182,
-0.16339130699634552,
-0.3142021596431732,
0.4378339946269989,
0.2290915548801422,
0.23137131333351135,
-0.2591320276260376,
0.19944538176059723,
0.022388547658920288,
0.18741048872470856,
-0.3841019570827484,
0.07843269407749176,
-0.10361070185899734,
0.15113259851932526,
0.40102189779281616,
-0.10352367907762527,
0.6325241923332214,
0.32984983921051025,
-0.011328186839818954,
-0.2935943901538849,
0.18265822529792786,
0.0014213696122169495,
0.17238561809062958,
-0.16663858294487,
0.010392416268587112,
0.4686570167541504,
0.3373217284679413,
0.13437192142009735,
-0.15504533052444458,
0.16187898814678192,
0.1168673187494278,
0.18580207228660583,
-0.2116679698228836,
0.22458088397979736,
-0.16477596759796143,
0.042720332741737366,
-0.22742608189582825,
0.45203840732574463,
-0.3828260898590088,
-0.12326566874980927,
0.666349470615387,
0.20725810527801514,
0.2957136332988739,
0.006185498088598251,
0.04831256344914436,
-0.010052562691271305,
0.4123642146587372,
0.21343374252319336,
0.0996478870511055,
-0.6415421962738037,
0.2720876634120941,
-0.5403330326080322,
-0.15314435958862305,
-0.1873527467250824,
-0.005720853805541992,
0.24367190897464752,
0.19479212164878845,
0.2459644377231598,
0.07635578513145447,
0.31012773513793945,
0.2628329396247864,
-0.3277026116847992,
0.38965898752212524,
-0.24740135669708252,
-0.28803229331970215,
-0.14444181323051453,
0.08374831825494766,
-0.07858410477638245,
-0.3023137152194977,
0.023012734949588776,
0.04017101600766182,
-0.04883900284767151,
-0.4406587481498718,
-0.10025668144226074,
0.45645979046821594,
-0.10546332597732544,
0.5267993211746216,
-0.1658484786748886,
0.4332770109176636,
-0.07905487716197968,
-0.10108143091201782,
0.11314408481121063,
-0.41193246841430664,
-0.1290886402130127,
0.03944654017686844,
-0.19965125620365143,
0.21598860621452332,
0.03978627920150757,
0.03985104709863663,
-0.27591580152511597,
0.09339732676744461,
-0.1141480877995491,
-0.09078945964574814,
-0.3494408428668976,
0.4015266001224518,
-0.2888225018978119,
0.1907179355621338,
0.019899100065231323,
0.067920982837677,
-0.045404594391584396,
0.12250387668609619,
-0.21180257201194763,
-0.4127752184867859,
0.4199669659137726,
-0.2443777322769165,
-0.25242379307746887,
0.15612086653709412,
0.3624410331249237,
-0.048907000571489334,
-0.2713668644428253,
-0.3034343719482422,
0.06232133507728577,
0.22989732027053833,
-0.031165534630417824,
-0.17313748598098755,
0.318583607673645,
-0.020208166912198067,
0.09446394443511963,
0.017308421432971954,
0.21690842509269714,
-0.05464550107717514,
-0.4848620891571045,
0.02581709623336792,
-0.18960770964622498
] |
https://github.com/huggingface/datasets/issues/6597 | Also note the information in the docstring: https://github.com/huggingface/datasets/blob/9d6d16117a30ba345b0236407975f701c5b288d4/src/datasets/dataset_dict.py#L1582-L1585
> Also accepts `<dataset_name>`, which will default to the namespace of the logged-in user.
This behavior was "reverted" by the PR:
- #6519
We have therefore contradictory requirements. We should decide:
- whether to support passing dataset_namespace without user/org that defaults to the logged-in user (and not support canonical datasets)
- or vice-versa, to support canonical datasets and not support passing only dataset_name
As canonical datasets are "deprecated" (and will eventually disappear), I would choose the first option. However, if so, the Space to convert datasets to Parquet will not work for canonical datasets: https://huggingface.co/spaces/albertvillanova/convert-dataset-to-parquet | Dataset.push_to_hub of a canonical dataset creates an additional dataset under the user namespace | While using `Dataset.push_to_hub` of a canonical dataset, an additional dataset was created under my user namespace.
## Steps to reproduce the bug
The command:
```python
commit_info = ds.push_to_hub(
"caner",
config_name="default",
commit_message="Convert dataset to Parquet",
commit_description="Convert dataset to Parquet.",
create_pr=True,
token=token,
)
```
creates the additional dataset `albertvillanova/caner`. | 103 | Dataset.push_to_hub of a canonical dataset creates an additional dataset under the user namespace
While using `Dataset.push_to_hub` of a canonical dataset, an additional dataset was created under my user namespace.
## Steps to reproduce the bug
The command:
```python
commit_info = ds.push_to_hub(
"caner",
config_name="default",
commit_message="Convert dataset to Parquet",
commit_description="Convert dataset to Parquet.",
create_pr=True,
token=token,
)
```
creates the additional dataset `albertvillanova/caner`.
Also note the information in the docstring: https://github.com/huggingface/datasets/blob/9d6d16117a30ba345b0236407975f701c5b288d4/src/datasets/dataset_dict.py#L1582-L1585
> Also accepts `<dataset_name>`, which will default to the namespace of the logged-in user.
This behavior was "reverted" by the PR:
- #6519
We have therefore contradictory requirements. We should decide:
- whether to support passing dataset_namespace without user/org that defaults to the logged-in user (and not support canonical datasets)
- or vice-versa, to support canonical datasets and not support passing only dataset_name
As canonical datasets are "deprecated" (and will eventually disappear), I would choose the first option. However, if so, the Space to convert datasets to Parquet will not work for canonical datasets: https://huggingface.co/spaces/albertvillanova/convert-dataset-to-parquet | [
-0.0006193593144416809,
-0.1821044683456421,
0.02426648885011673,
0.128635436296463,
0.1866663694381714,
-0.11163036525249481,
0.22518958151340485,
0.07185616344213486,
0.0009449049830436707,
0.29711079597473145,
-0.012589387595653534,
0.3734179735183716,
-0.135340616106987,
0.054037660360336304,
0.19700603187084198,
-0.03923250734806061,
0.33911949396133423,
-0.0015244744718074799,
0.003138061612844467,
-0.11203300952911377,
-0.3743405044078827,
-0.04713601991534233,
0.13511481881141663,
0.11890839040279388,
-0.23493900895118713,
0.07310835272073746,
-0.05401960760354996,
0.25431308150291443,
-0.13510097563266754,
-0.3024565577507019,
0.5114591121673584,
0.21550947427749634,
-0.13479667901992798,
0.5041071772575378,
-0.00011568101035663858,
0.2224593609571457,
0.33082327246665955,
0.13062971830368042,
-0.10451988130807877,
-0.2704402208328247,
-0.20516183972358704,
-0.10725314915180206,
0.22135528922080994,
-0.23084405064582825,
-0.19089847803115845,
0.0679246261715889,
-0.0799066349864006,
-0.40419960021972656,
0.1959097981452942,
0.17067775130271912,
0.14423039555549622,
0.15808457136154175,
-0.1700623780488968,
-0.3528490364551544,
0.11260400712490082,
0.29265546798706055,
-0.27500057220458984,
0.012042786926031113,
0.02086540497839451,
0.12505918741226196,
0.05407043173909187,
0.11494328826665878,
0.058204613626003265,
0.019586410373449326,
0.4307291805744171,
0.0436197854578495,
-0.05108977109193802,
-0.13702812790870667,
0.0289979949593544,
0.16841918230056763,
0.21627001464366913,
-0.34401997923851013,
-0.2468208372592926,
-0.28057923913002014,
-0.002645310014486313,
-0.14583353698253632,
0.2492872178554535,
0.23663640022277832,
-0.1966591626405716,
0.09043295681476593,
-0.06780741363763809,
-0.06065557897090912,
-0.16530859470367432,
0.0042997095733881,
-0.3830907940864563,
0.22903138399124146,
-0.07455174624919891,
0.25598853826522827,
-0.06311161816120148,
-0.05846819281578064,
0.20956511795520782,
-0.3232230842113495,
0.13313283026218414,
-0.4624115228652954,
-0.19524313509464264,
-0.06632500886917114,
0.0064894575625658035,
0.2667069733142853,
0.1650664210319519,
0.04771922901272774,
-0.16558891534805298,
-0.07752831280231476,
-0.08859186619520187,
-0.1165504977107048,
0.2547473907470703,
-0.06543869525194168,
0.03900893032550812,
0.30100947618484497,
0.22332468628883362,
0.13101813197135925,
0.04861469566822052,
0.07973082363605499,
0.06176766753196716,
-0.1620330512523651,
0.052431702613830566,
-0.15784117579460144,
0.6943709254264832,
-0.03711254894733429,
-0.10685247927904129,
0.11267183721065521,
0.10974191129207611,
0.2977963089942932,
0.06804963946342468,
0.2752745449542999,
0.062261804938316345,
0.1272103190422058,
-0.1674109399318695,
0.3516944646835327,
0.004291899502277374,
-0.13031089305877686,
-0.2837689518928528,
-0.09012308716773987,
-0.281045138835907,
-0.09743048995733261,
0.09370330721139908,
-0.22738651931285858,
0.08459363132715225,
0.35512685775756836,
0.4092574119567871,
-0.15401974320411682,
0.037708625197410583,
0.050111204385757446,
-0.039578430354595184,
0.18343383073806763,
0.08918033540248871,
0.3054547905921936,
0.12825798988342285,
-0.44283366203308105,
-0.1355622112751007,
0.28962114453315735,
-0.41249120235443115,
-0.2417585551738739,
-0.01977485790848732,
0.19000421464443207,
-0.07795559614896774,
0.12281107902526855,
-0.5264626145362854,
-0.004999574739485979,
-0.07474737614393234,
0.11241653561592102,
0.07467679679393768,
-0.2186504751443863,
0.011871673166751862,
-0.3377259075641632,
0.05847513675689697,
0.1429978460073471,
-0.015769504010677338,
0.001514241099357605,
-0.032274454832077026,
0.08981295675039291,
0.11849263310432434,
0.18715162575244904,
-0.32977840304374695,
0.03857210651040077,
-0.2050156593322754,
-0.009292244911193848,
0.30967873334884644,
-0.6608354449272156,
-0.4060669243335724,
-0.2808862030506134,
-0.09706291556358337,
0.09764594584703445,
0.3373275101184845,
-0.07098992168903351,
0.37467247247695923,
-0.18646332621574402,
0.046308934688568115,
0.11868632584810257,
0.10608933866024017,
0.18776586651802063,
-0.26294419169425964,
-0.030628681182861328,
0.195700541138649,
0.024129673838615417,
0.11475463211536407,
0.1303563117980957,
0.13723774254322052,
0.45189452171325684,
0.0938873440027237,
-0.1751326322555542,
0.34685835242271423,
0.07696758210659027,
0.2834663689136505,
0.05175205320119858,
-0.019062910228967667,
0.057366445660591125,
-0.2340879887342453,
0.10798084735870361,
0.22185060381889343,
0.2310897409915924,
-0.08145678043365479,
-0.5123896598815918,
-0.45450177788734436,
0.07164162397384644,
-0.36876633763313293,
-0.05550195649266243,
0.07687294483184814,
0.2937641441822052,
0.04187111556529999,
-0.1088452935218811,
-0.13252213597297668,
0.40573200583457947,
-0.29387471079826355,
0.4174847900867462,
-0.419457346200943,
0.5345686674118042,
0.04675225913524628,
0.01772923767566681,
0.031178437173366547,
0.33853042125701904,
0.3645530641078949,
-0.15530581772327423,
0.03922441974282265,
0.26492488384246826,
0.2716532349586487,
0.267180860042572,
0.01212337613105774,
0.20774123072624207,
0.25433802604675293,
-0.3245365619659424,
0.16547894477844238,
0.16025766730308533,
0.12310377508401871,
0.08446738123893738,
-0.39658883213996887,
0.43387556076049805,
0.19130434095859528,
0.1370377391576767,
-0.20507821440696716,
0.1197851300239563,
0.06786803901195526,
-0.034383200109004974,
-0.062066446989774704,
-0.2203221619129181,
-0.13742941617965698,
0.17450621724128723,
0.26915523409843445,
0.015559589490294456,
-0.20446407794952393,
0.15020227432250977,
0.31570982933044434,
0.08505123853683472,
0.019138773903250694,
-0.0387459322810173,
-0.2574441730976105,
-0.19789473712444305,
0.20657776296138763,
0.27888256311416626,
0.17170369625091553,
0.11325539648532867,
-0.0344061553478241,
0.06273483484983444,
-0.11187730729579926,
-0.2010229229927063,
0.1152161955833435,
0.0254670362919569,
-0.18165741860866547,
0.01261062454432249,
0.19179141521453857,
-0.08151599764823914,
-0.2460319995880127,
0.27117466926574707,
0.10842369496822357,
0.19138281047344208,
-0.31354326009750366,
-0.22843234241008759,
-0.20706090331077576,
-0.16345259547233582,
-0.16684412956237793,
-0.07657438516616821,
-0.224398672580719,
-0.3425995409488678,
-0.046183545142412186,
0.40665486454963684,
-0.075429767370224,
0.23811262845993042,
0.10531329363584518,
0.10814725607633591,
-0.23566627502441406,
-0.09235941618680954,
-0.15078379213809967,
-0.07977429032325745,
-0.0520823709666729,
0.06532076001167297,
0.08381947875022888,
-0.16427293419837952,
0.3343283534049988,
-0.039428528398275375,
0.31242287158966064,
-0.589493989944458,
-0.44459977746009827,
0.029672062024474144,
-0.24648064374923706,
0.15965814888477325,
0.08091939985752106,
-0.03774614632129669,
0.27327248454093933,
-0.10050738602876663,
0.10001150518655777,
-0.21952365338802338,
-0.11367414891719818,
0.06949879974126816,
-0.2420303374528885,
-0.1010420024394989,
0.059550732374191284,
-0.11919063329696655,
-0.1355588138103485,
-0.24222834408283234,
0.048278383910655975,
0.34385108947753906,
-0.09711430966854095,
-0.025078915059566498,
-0.2256859689950943,
-0.017465677112340927,
0.18550530076026917,
-0.04634920507669449,
-0.18329447507858276,
-0.18438486754894257,
-0.04554609954357147,
-0.17895947396755219,
-0.08821900188922882,
-0.07068853825330734,
-0.07394906878471375,
0.10145996510982513,
0.10460424423217773,
-0.20000000298023224,
-0.5768498778343201,
-0.21300475299358368,
0.5250096917152405,
0.012445341795682907,
0.012388477101922035,
0.2819978594779968,
0.2029149830341339,
0.0030206628143787384,
-0.06638547778129578,
-0.47647416591644287,
-0.08022916316986084,
0.37622612714767456,
-0.23200467228889465,
-0.0075224339962005615,
-0.058292727917432785,
-0.013601496815681458,
0.39604100584983826,
0.3386194109916687,
0.09550587087869644,
0.39826375246047974,
-0.0211485642939806,
0.6063766479492188,
-0.2959791421890259,
-0.10224075615406036,
0.1158977523446083,
0.2136029452085495,
0.13282397389411926,
0.37315329909324646,
0.04337390139698982,
0.03539743274450302,
0.12555444240570068,
-0.3616448640823364,
-0.27788713574409485,
-0.410860538482666,
-0.42901235818862915,
-0.13839003443717957,
-0.10291452705860138,
0.09323107451200485,
-0.0700099766254425,
-0.20056721568107605,
-0.21500198543071747,
0.059372760355472565,
0.5262933373451233,
-0.23003046214580536,
0.10493697971105576,
-0.6748554706573486,
0.3333721160888672,
-0.4013829529285431,
0.04672757163643837,
-0.24176159501075745,
0.29197418689727783,
0.04772104322910309,
0.04606598615646362,
0.28899458050727844,
0.18688341975212097,
0.8734764456748962,
-0.4366903007030487,
0.14776714146137238,
-0.22654330730438232,
0.11941276490688324,
-0.25874757766723633,
0.03912971913814545,
-0.1040039211511612,
0.3955487310886383,
-0.3169466555118561,
0.6511169075965881,
-0.1842261403799057,
-0.3233885169029236,
-0.07743187248706818,
0.0018215328454971313,
-0.0544283464550972,
0.16382502019405365,
-0.10428446531295776,
-0.3537379503250122,
-0.22193199396133423,
0.24752302467823029,
0.23575469851493835,
0.3410917818546295,
0.01010407879948616,
0.07021655142307281,
-0.2671365439891815,
-0.07676313072443008,
0.18687579035758972,
-0.010184485465288162,
0.297783225774765,
-0.016132282093167305,
0.06204822659492493,
0.06694623827934265,
0.22671115398406982,
0.3262232840061188,
0.553246796131134,
-0.18224936723709106,
-0.7771329879760742,
-0.0190596841275692,
-0.01758527383208275,
0.1916511356830597,
0.5204013586044312,
-0.09043167531490326,
0.27953580021858215,
-0.3712475895881653,
0.03316115960478783,
-0.2505612373352051,
0.13485035300254822,
0.1546136736869812,
-0.07157549262046814,
-0.5722108483314514,
-0.2831948697566986,
0.21041402220726013,
0.044165998697280884,
-0.12896126508712769,
0.22042500972747803,
0.8481853604316711,
-0.4569820165634155,
0.46418100595474243,
-0.05833550542593002,
1.107770562171936,
0.12321381270885468,
0.467387855052948,
0.27303603291511536,
-0.42979422211647034,
0.8078635334968567,
-0.18395671248435974,
-0.10163197666406631,
-0.32431560754776,
0.06692066788673401,
-0.06084790080785751,
-0.0840897187590599,
0.14235137403011322,
-0.12298141419887543,
-0.1264769732952118,
0.17322708666324615,
-0.12762314081192017,
0.6125106811523438,
-0.05247548967599869,
0.26137498021125793,
0.030419686809182167,
-0.22774843871593475,
-0.17879904806613922,
0.1995263546705246,
-0.01696489192545414,
-0.08199431002140045,
-0.08834026753902435,
-0.015964092686772346,
-0.30416426062583923,
-0.0323704369366169,
-0.011656999588012695,
0.1215086579322815,
0.07548059523105621,
-0.06270146369934082,
0.05948900058865547,
-0.3386105000972748,
0.11833120882511139,
0.19367334246635437,
0.9950634837150574,
0.1983267366886139,
-0.25637438893318176,
0.24980811774730682,
-0.1789604276418686,
0.20695184171199799,
-0.030576832592487335,
-0.12211790680885315,
0.15880487859249115,
0.10862568020820618,
-0.06978840380907059,
-0.06276337057352066,
-0.04067816212773323,
-0.2949497103691101,
-0.19463643431663513,
0.011144932359457016,
0.10405127704143524,
-0.4763191044330597,
-0.0018750615417957306,
-0.025348380208015442,
-0.056889183819293976,
-0.3174239695072174,
0.0671393871307373,
-0.18186822533607483,
-0.02162645384669304,
-0.0917503833770752,
-0.12902332842350006,
-0.38877394795417786,
-0.020435066893696785,
-0.024108048528432846,
0.38352474570274353,
0.1802377998828888,
0.11696717143058777,
-0.4535350203514099,
-0.17275260388851166,
-0.06226581335067749,
-0.07197614759206772,
0.2730448842048645,
-0.46630537509918213,
0.19850382208824158,
-0.030718479305505753,
0.06625019013881683,
0.20881392061710358,
0.0496811717748642,
0.09446823596954346,
-0.010347563773393631,
0.03415115177631378,
-0.10427588224411011,
0.08808022737503052,
0.05498617887496948,
-0.2915177345275879,
0.1679128259420395,
0.20443880558013916,
0.3463062047958374,
-0.11308316886425018,
-0.1498248428106308,
-0.29582199454307556,
0.1817624419927597,
0.02315881848335266,
0.15335014462471008,
0.14358335733413696,
-0.1402290165424347,
-0.0968892052769661,
-0.2100123167037964,
0.03945980966091156,
0.04124569147825241,
-0.20788800716400146,
-0.18502822518348694,
-0.3166090250015259,
0.16156744956970215,
0.2705487012863159,
0.032555900514125824,
-0.18975290656089783,
-0.03726818785071373,
0.11788715422153473,
-0.13075345754623413,
0.48394936323165894,
0.31615927815437317,
-0.03643709421157837,
-0.23167753219604492,
0.7876291275024414,
0.15695172548294067,
-0.311345636844635,
0.2058817744255066,
0.09937290102243423,
-0.11387482285499573,
-0.38602423667907715,
0.17399746179580688,
-0.24269306659698486,
-0.032411739230155945,
-0.0051774270832538605,
0.30437174439430237,
0.5298488140106201,
0.16196486353874207,
0.09355416893959045,
-0.12150120735168457,
0.012914828956127167,
0.06633394211530685,
0.3788864016532898,
0.15522249042987823,
-0.2954178750514984,
-0.1792675107717514,
0.1508820801973343,
0.14275449514389038,
-0.0767495185136795,
-0.24432092905044556,
0.4087345004081726,
0.036202240735292435,
0.20037874579429626,
0.3524792492389679,
0.6693417429924011,
0.2528342604637146,
-0.11226008832454681,
-0.08003047853708267,
0.49427616596221924,
-0.23977112770080566,
0.43722668290138245,
0.30600303411483765,
-0.16453537344932556,
0.1377473771572113,
0.47464361786842346,
0.1896679848432541,
-0.16262835264205933,
0.4890594482421875,
0.14590884745121002,
0.5508161783218384,
0.2559688985347748,
-0.4271281957626343,
0.33926817774772644,
0.06665761768817902,
0.1630234718322754,
-0.0746932178735733,
-0.06952954828739166,
-0.03424679487943649,
0.05232267081737518,
0.3210703730583191,
-0.23268669843673706,
-0.23559004068374634,
-0.2856046259403229,
-0.15770642459392548,
-0.2926197648048401,
-0.18945260345935822,
-0.13526484370231628,
-0.19658096134662628,
-0.29553934931755066,
0.08651451766490936,
-0.39822736382484436,
-0.27057886123657227,
-0.08208140730857849,
-0.15893223881721497,
-0.03288911283016205,
-0.1607247292995453,
-0.06621794402599335,
0.11170567572116852,
0.1035776436328888,
-0.07311288267374039,
0.31003251671791077,
-0.06185969337821007,
-0.27668941020965576,
0.0397910550236702,
0.39338111877441406,
0.3609282374382019,
-0.020022477954626083,
-0.02474631555378437,
-0.1011032909154892,
0.4690778851509094,
0.05223111808300018,
0.08317166566848755,
0.11411327123641968,
0.02764250710606575,
0.01063164696097374,
0.06844231486320496,
0.149361714720726,
-0.07895398139953613,
-0.07572454959154129,
0.10987898707389832,
-0.11232493072748184,
-0.35112616419792175,
0.12535516917705536,
-0.25226083397865295,
-0.17791453003883362,
0.1303611397743225,
0.18072889745235443,
-0.31600096821784973,
-0.27022480964660645,
0.433879554271698,
0.029943112283945084,
0.09014423936605453,
-0.44758543372154236,
0.06501162052154541,
0.17273971438407898,
0.25404292345046997,
0.03830048441886902,
-0.36405542492866516,
-0.28677845001220703,
-0.3366885781288147,
-0.598159670829773,
0.6450446844100952,
-0.2253197431564331,
-0.08254123479127884,
0.0658254623413086,
-0.19687964022159576,
0.11993984878063202,
0.04326338693499565,
-0.3782905340194702,
0.10215890407562256,
-0.10172510147094727,
0.024612873792648315,
-0.10345454514026642,
0.004819505847990513,
0.274820476770401,
-0.49963319301605225,
0.04835469275712967,
-0.3192002773284912,
0.3305763602256775,
0.21641264855861664,
-0.02338821068406105,
-0.08467932045459747,
0.36912980675697327,
0.3612574636936188,
-0.2026704102754593,
0.16207867860794067,
0.13591904938220978,
0.2411900758743286,
-0.047399021685123444,
-0.0037754327058792114,
-0.1531977653503418,
-0.31121790409088135,
-0.5565631985664368,
0.26806196570396423,
-0.30103400349617004,
0.1577187478542328,
-0.07700899243354797,
-0.220331072807312,
-0.06315097212791443,
-0.12130293250083923,
0.24394714832305908,
0.1962127983570099,
-0.19312867522239685,
0.0786498412489891,
-0.25866907835006714,
-0.022088173776865005,
0.24231673777103424,
0.25170397758483887,
0.06474773585796356,
0.21971431374549866,
-0.19759292900562286,
-0.4514490067958832,
0.25296804308891296,
-0.08173093944787979,
-0.3800187110900879,
0.03148842230439186,
0.2891227602958679,
0.13965532183647156,
-0.2743326425552368,
-0.3555436134338379,
0.02834184467792511,
0.3067229688167572,
-0.20822519063949585,
-0.019080456346273422,
0.2945013642311096,
-0.22225140035152435,
-0.05946291610598564,
-0.032565996050834656,
-0.0903668999671936,
0.19642849266529083,
-0.20503345131874084,
0.5043056011199951,
-0.149697408080101
] |